You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nibiru#2697 adds the canonical ERC-2470 Singleton Factory to Nibiru's default EVM genesis. We should document how developers can use ERC-2470 and CREATE2 for predictable EVM contract addresses on Nibiru.
Scope
Explain the CREATE2 address formula and the inputs that must match:
factory/deployer address
salt
complete creation bytecode (initCode), including constructor arguments
Document the canonical ERC-2470 factory address and its deploy(bytes,bytes32) interface.
Show how to predict an address before deployment and verify it through EVM JSON-RPC.
Explain that Nibiru includes the factory in default EVM genesis for new chains and that the same pattern is conventional across many EVM networks.
Include practical examples for Foundry/cast or equivalent tooling.
Call out important caveats:
constructor msg.sender is the factory
constructor arguments affect the address
initialization should be atomic where possible
salts are namespaces, not secrets
CREATE2 does not itself guarantee identical runtime behavior if init code is chain-dependent
Context
Nibiru#2697 adds the canonical ERC-2470 Singleton Factory to Nibiru's default EVM genesis. We should document how developers can use ERC-2470 and
CREATE2for predictable EVM contract addresses on Nibiru.Scope
CREATE2address formula and the inputs that must match:initCode), including constructor argumentsdeploy(bytes,bytes32)interface.msg.senderis the factoryCREATE2does not itself guarantee identical runtime behavior if init code is chain-dependentAcceptance Criteria
CREATE2section.instantiate2.