UniV4StandardModulePublic
Inherits: UniV4StandardModule, IArrakisLPModulePublic
this module can only set uni v4 pool that have generic hook, that don't require specific action to become liquidity provider.
State Variables
id
id = keccak256(abi.encode("UniV4StandardModulePublic"))
bytes32 public constant id =
0x22f7eb8a1e047f6c492e05813f6e9c6cb1563d057a61278b8e0ae7977af1ac3f;
notFirstDeposit
bool public notFirstDeposit;
Functions
constructor
constructor(
address poolManager_,
address guardian_
) UniV4StandardModule(poolManager_, guardian_);
deposit
function used by metaVault to deposit tokens into the strategy.
function deposit(
address depositor_,
uint256 proportion_
)
external
payable
onlyMetaVault
nonReentrant
whenNotPaused
returns (uint256 amount0, uint256 amount1);
Parameters
Name | Type | Description |
---|---|---|
depositor_ | address | address that will provide the tokens. |
proportion_ | uint256 | proportion of position needed to be add. |
Returns
Name | Type | Description |
---|---|---|
amount0 | uint256 | amount of token0 deposited. |
amount1 | uint256 | amount of token1 deposited. |
initializePosition
function initializePosition(
bytes calldata
) external override onlyMetaVault;
withdraw
function used by metaVault to withdraw tokens from the strategy.
function withdraw(
address receiver_,
uint256 proportion_
) public override returns (uint256 amount0, uint256 amount1);
Parameters
Name | Type | Description |
---|---|---|
receiver_ | address | address that will receive tokens. |
proportion_ | uint256 | proportion of position needed to be withdrawn. |
Returns
Name | Type | Description |
---|---|---|
amount0 | uint256 | amount of token0 withdrawn. |
amount1 | uint256 | amount of token1 withdrawn. |
unlockCallback
Called by the pool manager on msg.sender
when a lock is acquired
function unlockCallback(
bytes calldata data_
) public virtual returns (bytes memory);
Parameters
Name | Type | Description |
---|---|---|
data_ | bytes | The data that was passed to the call to lock |
Returns
Name | Type | Description |
---|---|---|
<none> | bytes | result data that you want to be returned from the lock call |