Documentation

Last updated: April 12, 2026

What we migrate

ChainClone creates a complete, deployable copy of any EVM smart contract from any supported source chain. Here is exactly what is included:

Bytecode

We extract the deployed bytecode from the source chain using eth_getCode. This is the compiled, binary representation of the contract logic. The copy is bit-for-bit identical to the original — same function selectors, same opcodes, same ABI.

Storage state

Smart contract storage is a key-value store of 32-byte slots. We enumerate all non-zero storage slots using a combination of strategies (see Storage enumeration) and include all discovered values in the migration output. This preserves balances, ownership mappings, counters, and any other state variables.

Native balance

If the contract holds native currency (ETH, BNB, MATIC, etc.), we record the balance and include the same amount in the migration output. Note: for paid on-chain deployments, we pre-fund the destination contract with the equivalent amount; you are responsible for ensuring the funding is correct.

Constructor arguments

We infer constructor arguments from the deployment transaction on the source chain (where available from block explorers or verified source). These are used to produce a clean redeployment on the destination chain.

Proxy and implementation pairs

Upgradeable proxy contracts (EIP-1967, OpenZeppelin Transparent Proxy, UUPS, Beacon Proxy) are detected automatically. Both the proxy and its current implementation are included in the migration output, with proper initialization data.

Token balances (ERC-20, ERC-721, ERC-1155)

For token contracts, we enumerate the full balance mapping from storage slots. This means all holder balances are preserved in the cloned contract. See Token balances for details and limitations.


What we don't migrate

Some data is structurally impossible or deliberately excluded from migration:

Important: You are responsible for verifying that the migrated contract functions correctly on the destination chain. ChainClone provides the raw migration — testing and validation are your responsibility.

Storage enumeration

Enumerating all storage slots in a deployed contract is a non-trivial problem — EVM contracts can theoretically use any of 2256 possible storage slots. We use several complementary strategies:

Strategy 1: Verified source code analysis

If the contract is verified on a block explorer (Etherscan, Basescan, etc.), we parse the source code to determine the storage layout — exactly which slots correspond to which variables. This is the most accurate method.

Strategy 2: Sequential scan

We scan slots 0 through N (default: first 1,000 slots) using eth_getStorageAt. This catches all simple state variables, arrays (at their base slots), and fixed-size mappings.

Strategy 3: Event-driven slot discovery

We replay relevant events (Transfer, Approval, Deposit, etc.) from the contract's history to discover mapping keys. For ERC-20 contracts, for example, every Transfer event reveals a holder's address, which we use to compute the corresponding storage slot.

Strategy 4: Known slot patterns

ERC-20 balance mappings are always stored at keccak256(address . slot). ERC-721 owners at keccak256(tokenId . slot). We recognize these patterns for all major token standards and enumerate them directly.

Coverage: For most ERC-20 and ERC-721 contracts with fewer than 10,000 holders, we achieve near-100% storage coverage. For contracts with millions of holders (USDC, USDT, etc.), complete enumeration is computationally expensive and may take significant time. Contact us for large-scale migrations.

Proxy contracts

We detect the following proxy patterns automatically:

For each proxy, both the proxy contract and its current implementation are included in the migration. The proxy's storage (including the stored implementation address) is updated to point to the new implementation address on the destination chain.

Token balances

Token balance migration works differently depending on the standard:

ERC-20

Balance storage is at keccak256(abi.encode(holder_address, balanceOf_slot)). We enumerate all holders from Transfer events and reconstruct the full balance mapping. Total supply is preserved.

ERC-721

Token ownership is stored at keccak256(abi.encode(tokenId, owners_slot)). We enumerate all token IDs from Transfer events. The balanceOf mapping is reconstructed from ownership data.

ERC-1155

The multi-token balance mapping is at keccak256(abi.encode(tokenId, keccak256(abi.encode(holder, balances_slot)))). We enumerate from TransferSingle and TransferBatch events.

Supported chains

The following chains are supported as source chains (we can read contracts from these):

ChainChain IDRPC source
Ethereum Mainnet1Public RPCs + ChainRPC
Base8453Public RPCs + ChainRPC
Arbitrum One42161Public RPCs + ChainRPC
Optimism10Public RPCs + ChainRPC
Polygon137Public RPCs + ChainRPC
BNB Chain56Public RPCs + ChainRPC
Avalanche C-Chain43114Public RPCs + ChainRPC
Custom RPCAny EVMYour endpoint

Destination chains (we can deploy to these):

DestinationPrice per contractNotes
L2aaS (your own chain)FreeImport as genesis allocation or live deployment
Export ZIP$47.50 USDCDeploy anywhere yourself
Base / Arbitrum / Optimism / Polygon$97.53 USDCWe deploy on-chain for you
BNB Chain$31.17 USDCWe deploy on-chain for you
Ethereum L1$478.21 USDCIncludes mainnet gas budget

Pricing

Pricing is per contract. Volume discounts apply automatically to all contracts in a single order:

Order sizeDiscount
1–4 contractsNo discount
5–9 contracts5% off
10–19 contracts10% off
20–49 contracts20% off
50–99 contracts30% off
100+ contracts40% off

Payment is in USDC or USDT via your wallet. Payment is verified on-chain before migration begins.

Refund policy

Gas costs are non-refundable. Any gas fees spent on the destination chain during a migration attempt cannot be recovered — they are burned on-chain. This is a fundamental property of blockchain networks, not a policy we can override.

Our refund policy:

To request a refund, use the job URL from your results page. Refunds are processed within 48 hours to the same wallet that paid.

Free sample download

Before paying, you can download a free sample for the first contract in your order. The sample ZIP contains:

The sample does not include the full storage state dump (that requires payment). It is enough to verify that we correctly identified the contract and its structure, but not enough to deploy a functional clone on your own.

Known limitations

Ready to migrate?

Start a migration →