Skip to main content

PairInformation

Implements​

  • Serializable

Table of contents​

Constructors​

Properties​

Methods​

Constructors​

constructor​

• new PairInformation(activeId?, reserveX?, reserveY?, feesX?, feesY?, oracleSampleLifetime?, oracleSize?, oracleActiveSize?, oracleLastTimestamp?, oracleId?): PairInformation

Parameters​

NameTypeDefault valueDescription
activeIdu320The current id used for swaps, this is also linked with the price
reserveXu256ZEROThe sum of amounts of tokenX across all bins
reserveYu256ZEROThe sum of amounts of tokenY across all bins
feesXFeesDistributionundefinedThe current amount of fees to distribute in tokenX (total, protocol)
feesYFeesDistributionundefinedThe current amount of fees to distribute in tokenY (total, protocol)
oracleSampleLifetimeu320-
oracleSizeu320-
oracleActiveSizeu320-
oracleLastTimestampu640-
oracleIdu320-

Returns​

PairInformation

Defined in​

assembly/structs/PairInformation.ts:15

Properties​

activeId​

• activeId: u32 = 0

The current id used for swaps, this is also linked with the price

Defined in​

assembly/structs/PairInformation.ts:16


feesX​

• feesX: FeesDistribution

The current amount of fees to distribute in tokenX (total, protocol)

Defined in​

assembly/structs/PairInformation.ts:19


feesY​

• feesY: FeesDistribution

The current amount of fees to distribute in tokenY (total, protocol)

Defined in​

assembly/structs/PairInformation.ts:20


oracleActiveSize​

• oracleActiveSize: u32 = 0

Defined in​

assembly/structs/PairInformation.ts:23


oracleId​

• oracleId: u32 = 0

Defined in​

assembly/structs/PairInformation.ts:25


oracleLastTimestamp​

• oracleLastTimestamp: u64 = 0

Defined in​

assembly/structs/PairInformation.ts:24


oracleSampleLifetime​

• oracleSampleLifetime: u32 = 0

Defined in​

assembly/structs/PairInformation.ts:21


oracleSize​

• oracleSize: u32 = 0

Defined in​

assembly/structs/PairInformation.ts:22


reserveX​

• reserveX: u256 = ZERO

The sum of amounts of tokenX across all bins

Defined in​

assembly/structs/PairInformation.ts:17


reserveY​

• reserveY: u256 = ZERO

The sum of amounts of tokenY across all bins

Defined in​

assembly/structs/PairInformation.ts:18

Methods​

deserialize​

▸ deserialize(data, offset): Result<i32>

Parameters​

NameType
dataStaticArray<u8>
offseti32

Returns​

Result<i32>

Implementation of​

Serializable.deserialize

Defined in​

assembly/structs/PairInformation.ts:47


serialize​

▸ serialize(): StaticArray<u8>

Returns​

StaticArray<u8>

Implementation of​

Serializable.serialize

Defined in​

assembly/structs/PairInformation.ts:32