LiquidityParameters
Implements
Serializable
Table of contents
Constructors
Properties
- activeIdDesired
- amountX
- amountXMin
- amountY
- amountYMin
- binStep
- deadline
- deltaIds
- distributionX
- distributionY
- idSlippage
- to
- tokenX
- tokenY
Methods
Constructors
constructor
• new LiquidityParameters(tokenX?
, tokenY?
, binStep?
, amountX?
, amountY?
, amountXMin?
, amountYMin?
, activeIdDesired?
, idSlippage?
, deltaIds?
, distributionX?
, distributionY?
, to?
, deadline?
): LiquidityParameters
Parameters
Name | Type | Default value | Description |
---|---|---|---|
tokenX | IERC20 | undefined | The address of token X |
tokenY | IERC20 | undefined | The address of token Y |
binStep | u64 | 0 | The bin step of the pair |
amountX | u256 | u256.Zero | The amount to send of token X |
amountY | u256 | u256.Zero | The amount to send of token Y |
amountXMin | u256 | u256.Zero | The min amount of token X added to liquidity |
amountYMin | u256 | u256.Zero | The min amount of token Y added to liquidity |
activeIdDesired | u64 | 0 | The active id that user wants to add liquidity from |
idSlippage | u64 | 0 | The number of id that are allowed to slip |
deltaIds | i64 [] | [] | The list of delta ids to add liquidity (deltaId = activeId - desiredId ) |
distributionX | u256 [] | [] | The distribution of tokenX with sum(distributionX) = 1e18 (100%) or 0 (0%) |
distributionY | u256 [] | [] | The distribution of tokenY with sum(distributionY) = 1e18 (100%) or 0 (0%) |
to | Address | undefined | The address of the recipient |
deadline | u64 | 0 | The deadline of the tx |
Returns
Defined in
assembly/structs/LiquidityParameters.ts:24
Properties
activeIdDesired
• activeIdDesired: u64
= 0
The active id that user wants to add liquidity from
Defined in
assembly/structs/LiquidityParameters.ts:32
amountX
• amountX: u256
= u256.Zero
The amount to send of token X
Defined in
assembly/structs/LiquidityParameters.ts:28
amountXMin
• amountXMin: u256
= u256.Zero
The min amount of token X added to liquidity
Defined in
assembly/structs/LiquidityParameters.ts:30
amountY
• amountY: u256
= u256.Zero
The amount to send of token Y
Defined in
assembly/structs/LiquidityParameters.ts:29
amountYMin
• amountYMin: u256
= u256.Zero
The min amount of token Y added to liquidity
Defined in
assembly/structs/LiquidityParameters.ts:31
binStep
• binStep: u64
= 0
The bin step of the pair
Defined in
assembly/structs/LiquidityParameters.ts:27
deadline
• deadline: u64
= 0
The deadline of the tx
Defined in
assembly/structs/LiquidityParameters.ts:38
deltaIds
• deltaIds: i64
[] = []
The list of delta ids to add liquidity (deltaId = activeId - desiredId
)
Defined in
assembly/structs/LiquidityParameters.ts:34
distributionX
• distributionX: u256
[] = []
The distribution of tokenX with sum(distributionX) = 1e18 (100%) or 0 (0%)
Defined in
assembly/structs/LiquidityParameters.ts:35
distributionY
• distributionY: u256
[] = []
The distribution of tokenY with sum(distributionY) = 1e18 (100%) or 0 (0%)
Defined in
assembly/structs/LiquidityParameters.ts:36
idSlippage
• idSlippage: u64
= 0
The number of id that are allowed to slip
Defined in
assembly/structs/LiquidityParameters.ts:33
to
• to: Address
The address of the recipient
Defined in
assembly/structs/LiquidityParameters.ts:37
tokenX
• tokenX: IERC20
The address of token X
Defined in
assembly/structs/LiquidityParameters.ts:25
tokenY
• tokenY: IERC20
The address of token Y
Defined in
assembly/structs/LiquidityParameters.ts:26
Methods
deserialize
▸ deserialize(data
, offset
): Result
<i32
>
Parameters
Name | Type |
---|---|
data | StaticArray <u8 > |
offset | i32 |
Returns
Result
<i32
>
Implementation of
Serializable.deserialize
Defined in
assembly/structs/LiquidityParameters.ts:64
serialize
▸ serialize(): StaticArray
<u8
>
Returns
StaticArray
<u8
>
Implementation of
Serializable.serialize