@proxies:predictClone
Predicted address of a deterministic ERC-1167 clone deployed with proxies:clone --salt. Pure computation, no chain read.
On-chain (@proxies:predictClone!): The salt may be a live value (a counter or registry read); the implementation and deployer shape the creation code and must be constants.
⚗️ Experimental — available at next.evmcrispr.com.
Returns: address
Syntax
Section titled “Syntax”@proxies:predictClone(implementation salt deployer?)Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
implementation | address | Implementation contract the clone delegates to |
salt | bytes32 | CREATE2 salt |
[deployer] | address | CREATE2 factory (defaults to the Arachnid deployer) |
On-chain face (@proxies:predictClone!)
Section titled “On-chain face (@proxies:predictClone!)”CREATE2 recomputed at judgement: keccak(0xff . deployer . salt . keccak(initcode)) masked to its low 160 bits. The implementation and
deployer shape the creation code and must be constants; the salt may be
live — a counter or registry read — which is the case the face exists
for, e.g. asserting where the NEXT clone of a factory will land.
Examples
Section titled “Examples”load proxies
set $implementation 0xf8D1677c8a0c961938bf2f9aDc3F3CFDA759A9d9
set $predicted @proxies:predictClone($implementation 0x0000000000000000000000000000000000000000000000000000000000000001)proxies:clone $clone $implementation --salt 0x0000000000000000000000000000000000000000000000000000000000000001# $predicted == $clone- Pure computation (CREATE2 with the ERC-1167 initcode hash) — no chain
read.
deployerdefaults to the Arachnid CREATE2 factory used by proxies:clone.