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
reserveXu256u256.ZeroThe sum of amounts of tokenX across all bins
reserveYu256u256.ZeroThe 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:14

Properties

activeId

activeId: u32 = 0

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

Defined in

assembly/structs/PairInformation.ts:15


feesX

feesX: FeesDistribution

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

Defined in

assembly/structs/PairInformation.ts:18


feesY

feesY: FeesDistribution

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

Defined in

assembly/structs/PairInformation.ts:19


oracleActiveSize

oracleActiveSize: u32 = 0

Defined in

assembly/structs/PairInformation.ts:22


oracleId

oracleId: u32 = 0

Defined in

assembly/structs/PairInformation.ts:24


oracleLastTimestamp

oracleLastTimestamp: u64 = 0

Defined in

assembly/structs/PairInformation.ts:23


oracleSampleLifetime

oracleSampleLifetime: u32 = 0

Defined in

assembly/structs/PairInformation.ts:20


oracleSize

oracleSize: u32 = 0

Defined in

assembly/structs/PairInformation.ts:21


reserveX

reserveX: u256 = u256.Zero

The sum of amounts of tokenX across all bins

Defined in

assembly/structs/PairInformation.ts:16


reserveY

reserveY: u256 = u256.Zero

The sum of amounts of tokenY across all bins

Defined in

assembly/structs/PairInformation.ts:17

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:46


serialize

serialize(): StaticArray<u8>

Returns

StaticArray<u8>

Implementation of

Serializable.serialize

Defined in

assembly/structs/PairInformation.ts:31