BuilderFactory
State Variablesβ
OWNERβ
address public immutable OWNER
Functionsβ
constructorβ
constructor(address owner) ;
onlyOwnerβ
modifier onlyOwner() ;
_onlyOwnerβ
function _onlyOwner() internal view;
deployBuilderβ
Deploys a BuilderWallet contract using CREATE2.
function deployBuilder(uint48 builderCode, address builderAdmin) external onlyOwner returns (address wallet);
Parameters
| Name | Type | Description |
|---|---|---|
builderCode | uint48 | The uint256 used as the CREATE2 salt (must match caller's referral code). |
builderAdmin | address | The EOA/multisig allowed to sweep tokens from the wallet. |
Returns
| Name | Type | Description |
|---|---|---|
wallet | address | The deployed wallet address (deterministic). |
predictBuilderWalletβ
Computes the CREATE2 address for (builderCode, builderAdmin).
Must match the formula used in the RiskEngine.
function predictBuilderWallet(uint48 builderCode) external view returns (address);
Eventsβ
BuilderWalletDeployedβ
Emitted when a new builder wallet is deployed
event BuilderWalletDeployed(uint48 indexed builderCode, address indexed wallet, address indexed builderAdmin);
Parameters
| Name | Type | Description |
|---|---|---|
builderCode | uint48 | The builder code used as salt |
wallet | address | The address of the deployed wallet |
builderAdmin | address | The admin address for the wallet |