OracleParameters
Implements
Serializable
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new OracleParameters(oracleSampleLifetime?, oracleSize?, oracleActiveSize?, oracleLastTimestamp?, oracleId?, min?, max?): OracleParameters
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
oracleSampleLifetime | u32 | 0 | The lifetime of a sample, it accumulates information for up to this timestamp |
oracleSize | u32 | 0 | The size of the oracle (last ids can be empty) |
oracleActiveSize | u32 | 0 | The active size of the oracle (no empty data) |
oracleLastTimestamp | u64 | 0 | The timestamp of the creation of the oracle's latest sample |
oracleId | u32 | 0 | The index of the oracle's latest sample |
min | u32 | 0 | The min delta time of two samples |
max | u32 | 0 | The safe max delta time of two samples |
Returns
Defined in
assembly/structs/OracleParameters.ts:14
Properties
max
• max: u32 = 0
The safe max delta time of two samples
Defined in
assembly/structs/OracleParameters.ts:21
min
• min: u32 = 0
The min delta time of two samples
Defined in
assembly/structs/OracleParameters.ts:20
oracleActiveSize
• oracleActiveSize: u32 = 0
The active size of the oracle (no empty data)
Defined in
assembly/structs/OracleParameters.ts:17
oracleId
• oracleId: u32 = 0
The index of the oracle's latest sample
Defined in
assembly/structs/OracleParameters.ts:19
oracleLastTimestamp
• oracleLastTimestamp: u64 = 0
The timestamp of the creation of the oracle's latest sample
Defined in
assembly/structs/OracleParameters.ts:18
oracleSampleLifetime
• oracleSampleLifetime: u32 = 0
The lifetime of a sample, it accumulates information for up to this timestamp
Defined in
assembly/structs/OracleParameters.ts:15
oracleSize
• oracleSize: u32 = 0
The size of the oracle (last ids can be empty)
Defined in
assembly/structs/OracleParameters.ts:16
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/OracleParameters.ts:40
serialize
▸ serialize(): StaticArray<u8>
Returns
StaticArray<u8>
Implementation of
Serializable.serialize