Skip to main content
Side-effect-free helpers for building ERC-20 calls and looking up tokens. Pair them with custom for ergonomic custom calldata.

Token registry — erc20Utils

Look up canonical token metadata (address + decimals) per chain.

Generic symbol lookup

For symbols not pinned as top-level properties:

ERC-20 calldata builders

Standard calls, amounts are raw bigint wei:
Each returns a Call. To include one in an action list, spread it into custom({ ...call }):

Composing calls — buildCall / buildApproveAndCall

buildCall constructs a Call from an ABI + function name + args:
buildApproveAndCall bundles an approval and a follow-up call into a [approve, call] tuple:

Slippage helper — getAmountWithSlippage

Subtracts bps basis points (1 bp = 0.01%) from a raw bigint amount.
Handy for computing a safe minAmountOut or amountOutMinimum before handing it to swap or the chain-scoped Uniswap V3 / SushiSwap V3 adapters.