IMakinaXModule
Inherits: IMakinaXContext, IMakinaXGovernable, IOracleRegistry, IWeirollComponent, ISwapComponent, IBridgeComponent
Functions
initialize
Initializes the module with the given parameters.
function initialize(MakinaXModuleInitParams calldata params, MakinaXModuleServiceParams calldata serviceParams)
external;Parameters
| Name | Type | Description |
|---|---|---|
| params | MakinaXModuleInitParams | The strategy and risk initialization parameters. |
| serviceParams | MakinaXModuleServiceParams | The protocol-controlled service initialization parameters. |
sweepERC20
Sweeps the entire balance of a given ERC20 token to the Safe.
function sweepERC20(address token) external;Parameters
| Name | Type | Description |
|---|---|---|
| token | address | The address of the ERC20 token to sweep. |
sweepERC721
Sweeps a given ERC721 token to the Safe.
function sweepERC721(address token, uint256 tokenId) external;Parameters
| Name | Type | Description |
|---|---|---|
| token | address | The address of the ERC721 collection to sweep from. |
| tokenId | uint256 | The id of the ERC721 token to sweep. |
sweepERC6909
Sweeps the entire balance of a given ERC6909 token of type id to the Safe.
function sweepERC6909(address token, uint256 id) external;Parameters
| Name | Type | Description |
|---|---|---|
| token | address | The address of the ERC6909 token contract. |
| id | uint256 | The type of the ERC6909 token to sweep. |
sweepNative
Sweeps the entire native currency balance (e.g. ETH) to the Safe.
function sweepNative() external;Structs
MakinaXModuleInitParams
Strategy and risk initialization parameters.
struct MakinaXModuleInitParams {
address safe;
IMakinaXGovernable.OperatingMode initialOperatingMode;
bytes32 initialAllowedInstrRoot;
uint256 initialMaxPositionIncreaseLossBps;
uint256 initialMaxPositionDecreaseLossBps;
uint256 initialInstrCooldownDuration;
uint256 initialMaxSwapLossBps;
uint256 initialSwapCooldownDuration;
}Properties
| Name | Type | Description |
|---|---|---|
| safe | address | The address of the Safe that the module will be connected to. |
| initialOperatingMode | IMakinaXGovernable.OperatingMode | The initial operating mode of the module. |
| initialAllowedInstrRoot | bytes32 | The root of the Merkle tree containing the allowed instructions for the module. |
| initialMaxPositionIncreaseLossBps | uint256 | The max allowed value loss (in basis points) for position increases while in WALLED mode. |
| initialMaxPositionDecreaseLossBps | uint256 | The max allowed value loss (in basis points) for position decreases while in WALLED mode. |
| initialInstrCooldownDuration | uint256 | The cooldown duration (in seconds) for position management while in WALLED mode. |
| initialMaxSwapLossBps | uint256 | The maximum allowed loss in basis points for swap operations while in FENCED or WALLED mode. |
| initialSwapCooldownDuration | uint256 | The cooldown duration (in seconds) for swap operations while in FENCED or WALLED mode. |
MakinaXModuleServiceParams
Protocol-controlled service initialization parameters.
struct MakinaXModuleServiceParams {
address initialProvider;
uint256 initialSwapFeeRate;
}Properties
| Name | Type | Description |
|---|---|---|
| initialProvider | address | The address of the MakinaX service account. |
| initialSwapFeeRate | uint256 | The fee rate for swap operations, 1e18 = 100%. |