Skip to content

@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

@proxies:predictClone(implementation salt deployer?)
NameTypeDescription
implementationaddressImplementation contract the clone delegates to
saltbytes32CREATE2 salt
[deployer]addressCREATE2 factory (defaults to the Arachnid deployer)

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.

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. deployer defaults to the Arachnid CREATE2 factory used by proxies:clone.