Skip to main content

LiquidityParameters

Implements

  • Serializable

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new LiquidityParameters(tokenX?, tokenY?, binStep?, amountX?, amountY?, amountXMin?, amountYMin?, activeIdDesired?, idSlippage?, deltaIds?, distributionX?, distributionY?, to?, deadline?): LiquidityParameters

Parameters

NameTypeDefault valueDescription
tokenXIERC20undefinedThe address of token X
tokenYIERC20undefinedThe address of token Y
binStepu640The bin step of the pair
amountXu256u256.ZeroThe amount to send of token X
amountYu256u256.ZeroThe amount to send of token Y
amountXMinu256u256.ZeroThe min amount of token X added to liquidity
amountYMinu256u256.ZeroThe min amount of token Y added to liquidity
activeIdDesiredu640The active id that user wants to add liquidity from
idSlippageu640The number of id that are allowed to slip
deltaIdsi64[][]The list of delta ids to add liquidity (deltaId = activeId - desiredId)
distributionXu256[][]The distribution of tokenX with sum(distributionX) = 1e18 (100%) or 0 (0%)
distributionYu256[][]The distribution of tokenY with sum(distributionY) = 1e18 (100%) or 0 (0%)
toAddressundefinedThe address of the recipient
deadlineu640The deadline of the tx

Returns

LiquidityParameters

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

NameType
dataStaticArray<u8>
offseti32

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

Defined in

assembly/structs/LiquidityParameters.ts:45