Tooling
ModuleKit
Module Registry
Modules
Calcmoduleaddress

⚠️ Deprecation Notice

ModuleKit was developed by Rhinestone and is no longer actively supported. If you're building modules and need assistance, reach out to Rhinestone at gm@rhinestone.dev


title: "calcModuleAddress"

Calculate the address of a module to be deployed via the Registry.

Usage

bytes32 salt = keccak256(abi.encodePacked("SALT"));
bytes memory initCode = abi.encodePacked(type(Module).creationCode);
 
address moduleAddress = registry.calcModuleAddress(salt, initCode);

Parameters

salt

  • Type: bytes32

The salt value to use for the module deployment.

initCode

  • Type: bytes

The initialization code for the module deployment.

Returns

moduleAddress

  • Type: address

The address of the module.