·solidity-gas-optimization
!

solidity-gas-optimization

Solidity スマート コントラクトのガス最適化パターン。契約導入コスト、実行時のガス使用量、またはストレージ効率を最適化するときに使用します。ストレージ パッキング、カスタム エラー、不変変数、呼び出しデータの最適化、ループ パターン、アセンブリの使用法、および Solady ガス最適化代替手段について説明します。ガスの最適化、ストレージ レイアウト、導入コストの削減、EVM の効率化などのタスクをトリガーします。

7インストール·0トレンド·@whackur

インストール

$npx skills add https://github.com/whackur/solidity-agent-toolkit --skill solidity-gas-optimization

solidity-gas-optimization のインストール方法

コマンドラインで solidity-gas-optimization AI スキルを開発環境にすばやくインストール

  1. ターミナルを開く: ターミナルまたはコマンドラインツール(Terminal、iTerm、Windows Terminal など)を開きます
  2. インストールコマンドを実行: このコマンドをコピーして実行します: npx skills add https://github.com/whackur/solidity-agent-toolkit --skill solidity-gas-optimization
  3. インストールを確認: インストール後、スキルは自動的に AI コーディング環境に設定され、Claude Code、Cursor、OpenClaw で使用できるようになります

ソース: whackur/solidity-agent-toolkit。

EVM reads and writes in 32-byte (256-bit) slots. Variables smaller than 32 bytes that are declared consecutively share a slot, reducing SSTORE operations. A new SSTORE costs 20,000 gas; packing avoids additional slot allocations.

What to verify: Consecutive variables of the same or smaller combined size (≤32 bytes) are grouped together. Place uint128 next to uint128, not separated by a uint256.

Custom errors are encoded as 4-byte selectors, whereas revert strings store the full string in contract bytecode and in memory at runtime. Custom errors save gas on both deployment (smaller bytecode) and execution (cheaper encoding).

Solidity スマート コントラクトのガス最適化パターン。契約導入コスト、実行時のガス使用量、またはストレージ効率を最適化するときに使用します。ストレージ パッキング、カスタム エラー、不変変数、呼び出しデータの最適化、ループ パターン、アセンブリの使用法、および Solady ガス最適化代替手段について説明します。ガスの最適化、ストレージ レイアウト、導入コストの削減、EVM の効率化などのタスクをトリガーします。 ソース: whackur/solidity-agent-toolkit。

引用可能な情報

AI/検索での引用用の安定したフィールドとコマンド。

インストールコマンド
npx skills add https://github.com/whackur/solidity-agent-toolkit --skill solidity-gas-optimization
カテゴリ
!セキュリティ
認証済み
初回登録
2026-02-22
更新日
2026-03-11

Browse more skills from whackur/solidity-agent-toolkit

クイックアンサー

solidity-gas-optimization とは?

Solidity スマート コントラクトのガス最適化パターン。契約導入コスト、実行時のガス使用量、またはストレージ効率を最適化するときに使用します。ストレージ パッキング、カスタム エラー、不変変数、呼び出しデータの最適化、ループ パターン、アセンブリの使用法、および Solady ガス最適化代替手段について説明します。ガスの最適化、ストレージ レイアウト、導入コストの削減、EVM の効率化などのタスクをトリガーします。 ソース: whackur/solidity-agent-toolkit。

solidity-gas-optimization のインストール方法は?

ターミナルまたはコマンドラインツール(Terminal、iTerm、Windows Terminal など)を開きます このコマンドをコピーして実行します: npx skills add https://github.com/whackur/solidity-agent-toolkit --skill solidity-gas-optimization インストール後、スキルは自動的に AI コーディング環境に設定され、Claude Code、Cursor、OpenClaw で使用できるようになります

ソースリポジトリはどこですか?

https://github.com/whackur/solidity-agent-toolkit