Build an unsigned contract creation (nothing sent)
contract_build_creationBuild an unsigned EVM contract creation from bytecode plus optional constructor ABI and args (blocktools buildEvmTransfer create). Returns the initcode (data, no 'to'), initcode_keccak256, an approval of the initcode against that hash or a createHash you pin (blocktools evmApproveCall), a verifyTx check, and with 'from' the predicted address (deployer's pending nonce, blocktools evmCreateAddress). Value only for a payable constructor. Initcode is capped at 49152 bytes (EIP-3860). Creation is irreversible and the bytecode is not verified by SwapChan; say so. The user's own wallet signs and sends; SwapChan never does. Powered by blocktools (ABI coding). How to combine this with the other tools: swapchan_playbook (workflows: find-money, best-swap, rebalance, revoke-approvals, bridge-stuck, token-safety, recover-old-wallet).
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": {
"chainId": "<chainId>",
"bytecode": "<bytecode>"
},
"name": "contract_build_creation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| abi | No | Optional ABI JSON to use instead of the Sourcify / Etherscan lookup (labelled as pasted; not checked against source). | |
| args | No | Arguments in order; arrays/tuples as JSON lists, big numbers as decimal strings. | |
| from | No | Deployer address, for the predicted contract address | |
| value | No | Wei to send to the new contract (payable constructor only) | |
| chainId | Yes | EVM chain id or name (1 eth, 8453 base, 42161 arbitrum, 10 optimism, 137 polygon, 56 bnb, 43114 avalanche, 59144 linea, 534352 scroll). | |
| bytecode | Yes | Creation bytecode (0x hex), without constructor args | |
| createHash | No | Expected initcode keccak-256 to pin; a mismatch fails the verdict |