Expand description
Trace-guided discovery of the storage slots a token keys its balances and allowances on. Trace-guided ERC-20 storage-layout discovery.
State overrides only help when they land on the slots a token actually reads. Most ERC-20s
use Solidity’s keccak256(holder || base_slot) mapping convention, but real tokens also use
Vyper’s reversed order, deep inheritance slots, proxies whose storage lives elsewhere, and
rebasing shares. This module traces the token’s read-only access, validates the observed slot
with a sentinel override, then recovers the mapping convention needed to fund a simulated swap.
Modules§
- IERC20
Layout Probe - Module containing a contract’s types and functions.
- IShares
Token - The view a share-accounted rebasing token keeps its mapping under. stETH is the one in the Tycho set; the rest of the family answers the same call.
Structs§
- Token
Layout - The slots needed to fund and approve one simulated token input.
Enums§
- Discovery
Error - Why a token’s storage layout could not be resolved.
- KeyOrder
- Mapping-key convention used by a token implementation.
- Mapping
Position - The base of one balance or allowance mapping.
Functions§
- discover_
layout - Resolves the storage a quote’s input token reads, so an override can fund it.