PairInformation
Implements
Serializable
Table of contents
Constructors
Properties
- activeId
- feesX
- feesY
- oracleActiveSize
- oracleId
- oracleLastTimestamp
- oracleSampleLifetime
- oracleSize
- reserveX
- reserveY
Methods
Constructors
constructor
• new PairInformation(activeId?
, reserveX?
, reserveY?
, feesX?
, feesY?
, oracleSampleLifetime?
, oracleSize?
, oracleActiveSize?
, oracleLastTimestamp?
, oracleId?
): PairInformation
Parameters
Name | Type | Default value | Description |
---|---|---|---|
activeId | u32 | 0 | The current id used for swaps, this is also linked with the price |
reserveX | u256 | u256.Zero | The sum of amounts of tokenX across all bins |
reserveY | u256 | u256.Zero | The sum of amounts of tokenY across all bins |
feesX | FeesDistribution | undefined | The current amount of fees to distribute in tokenX (total, protocol) |
feesY | FeesDistribution | undefined | The current amount of fees to distribute in tokenY (total, protocol) |
oracleSampleLifetime | u32 | 0 | - |
oracleSize | u32 | 0 | - |
oracleActiveSize | u32 | 0 | - |
oracleLastTimestamp | u64 | 0 | - |
oracleId | u32 | 0 | - |
Returns
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
Name | Type |
---|---|
data | StaticArray <u8 > |
offset | i32 |
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