eth-concepts

Reference Ethereum gas mechanics, transaction types, storage layout, ABI encoding, and EVM execution semantics.

6|20|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/andresdefi/cryptoskills --skill eth-concepts-andresdefi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: eth-concepts
Source: https://github.com/andresdefi/cryptoskills/tree/main/skills/eth-concepts
Command: npx skills add https://github.com/andresdefi/cryptoskills --skill eth-concepts-andresdefi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI agents and developers frequently generate Ethereum code with fundamental misconceptions about gas units, transaction types, storage slots, and wei denominations, causing real bugs and lost funds. This Skill provides an accurate, up-to-date conceptual reference for EVM development. ## Core Features & Use Cases - Gas & Fee Reference: Covers the EIP-1559 fee model, opcode gas costs, blob gas (EIP-4844), and gas optimization techniques with concrete numbers. - Storage & ABI Deep Dives: Explains slot packing rules, mapping/array slot derivation, string encoding, and calldata layout, with cast commands for reading storage directly. - Network Evolution Context: Documents Pectra and Fusaka upgrades (EIP-7702, PeerDAS, secp256r1 precompile), sub-gwei gas reality, and the 2026 MEV landscape. - Use Case: When writing a Solidity contract, ask the agent to verify storage packing for gas optimization — it will apply the slot packing rules and check the layout with forge inspect instead of guessing. ## Quick Start Ask the agent to explain how to compute the storage slot of a mapping value in a Solidity contract and read it with cast.

Frequently Asked Questions about eth-concepts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I read a mapping value directly from contract storage?

Compute the slot as keccak256 of the key concatenated with the mapping's declared slot, both left-padded to 32 bytes. Use `cast index address 0xUser 3 | xargs cast storage 0xContract` to read it in one command.

How does EIP-1559 gas pricing work on Ethereum?

Transactions specify maxFeePerGas and maxPriorityFeePerGas. The effective price is min(maxFee, baseFee + priorityFee), where the base fee burns and adjusts 12.5% per block toward a 15M gas target. Overpayment of maxFee is refunded.

What is the difference between CALL, DELEGATECALL, and STATICCALL?

CALL executes code in the callee's context and can send ETH. DELEGATECALL runs the target's code against the caller's storage and msg.sender, which is how proxies work. STATICCALL forbids any state modification and is used for view functions.

Why does my transaction run out of gas even with a high limit?

Common causes are unbounded loops, cold storage access costing 2,100 gas per slot, quadratic memory expansion, and the 63/64 rule limiting gas forwarded to nested calls. Trace the failure with `cast run 0xTxHash` to find where gas ran out.

Does Solidity storage packing always save gas?

Packing only saves gas when packed variables are read or written in the same transaction. Declaration order determines packing, structs always start a new slot, and you should verify the actual layout with `forge inspect Contract storage-layout`.

When should I use abi.encode instead of abi.encodePacked?

Use abi.encode whenever hashing multiple values for signatures or storage keys, because abi.encodePacked is ambiguous for dynamic types and can produce hash collisions. encodePacked is only safe for fixed-length types.