Ethereum
Installation
SKILL.md
Nonce and Stuck Transactions
- Every Ethereum account has a nonce that increments with each transaction — if tx with nonce 5 is pending, nonces 6+ are blocked until 5 confirms
- To unstick: send a new tx with the SAME nonce and higher gas — this replaces the pending tx (even a 0 ETH self-transfer works)
- MetaMask "Speed up" and "Cancel" buttons do exactly this — they resubmit with same nonce and higher priority fee
- Nonce gaps cause permanent stuck state — if nonce 3 was never broadcast but 4 was, 4 will never confirm until 3 is sent
Gas (EIP-1559)
maxFeePerGas= max total you'll pay per gas unit.maxPriorityFeePerGas= tip to validator.baseFee= burned, set by protocol- Actual cost:
min(baseFee + priorityFee, maxFee) × gasUsed— unused gas is refunded, but failed txs still consume gas - Gas limit is separate from gas price — setting limit too low causes "out of gas" revert, but you still pay for gas used up to that point
- Check current base fee at etherscan.io/gastracker or via
eth_gasPriceRPC — wallets often overestimate by 20-50%
Token Approvals (Critical Security)
- ERC-20
approve()grants a contract permission to spend your tokens — many dApps request unlimited (type(uint256).max) approval - If that contract gets hacked, attacker can drain all approved tokens even years later — audit approvals at revoke.cash
- Recommend users approve only the exact amount needed, or revoke after each use
- Approvals persist forever until explicitly revoked — changing wallets doesn't help if the old address still has tokens