forge_clone
Clones a verified contract from a block explorer into a local Foundry project, letting you inspect and build on on-chain code locally.
Instructions
Clone a verified contract from a block explorer into a local Foundry project (forge clone).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"address": "<address>"
},
"name": "forge_clone"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | Chain name or ID (e.g. mainnet, 1, optimism, 10) | |
| address | Yes | Address of the verified contract to clone | |
| destination | No | Directory to clone into | |
| etherscanApiKey | No | Etherscan API key |