stack_configureExternalContracts
Add external contract addresses and ABIs to the Scaffold-ETH debug UI to interact with protocols like USDC, Aave, and Uniswap. Supports bundled ABIs for common types.
Instructions
Configure external contracts for the Scaffold-ETH debug UI.
Adds contract addresses and ABIs to packages/nextjs/contracts/externalContracts.ts so you can interact with external protocols (USDC, Aave, Uniswap) in the debug UI.
WHEN TO USE: When building projects that interact with external contracts:
Token interactions: "build a USDC vault" → add USDC with type: "ERC20"
DeFi integrations: "integrate with Aave" → add Aave pool with type: "AaveV3Pool"
DEX swaps: "swap on Uniswap" → add router with type: "UniswapV3Router"
BUNDLED ABIs (no external fetch needed):
ERC20: Standard tokens (USDC, DAI, WETH, etc.)
ERC721: NFT contracts
ERC4626: Tokenized vaults
AaveV3Pool: Aave lending pool
AaveV3PoolDataProvider: Aave data queries
UniswapV3Router: Uniswap V3 swaps
UniswapV3Quoter: Swap quotes
UniswapV2Router: V2-style DEX swaps
If a contract type is not bundled and no ABI is provided:
Try using Blockscout MCP to fetch the ABI
Or instruct the user to get the ABI from Etherscan/Blockscout manually
CHAIN IDs: Adds entries for BOTH 31337 (local fork) AND the real chainId, so contracts work during local dev and after mainnet deployment.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | Chain name for address lookup (mainnet, base, optimism, arbitrum, polygon). Defaults to project's configured chain. | |
| contracts | Yes | List of external contracts to configure |