Skip to main content

OracleParameters

Implements

  • Serializable

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new OracleParameters(oracleSampleLifetime?, oracleSize?, oracleActiveSize?, oracleLastTimestamp?, oracleId?, min?, max?): OracleParameters

Parameters

NameTypeDefault valueDescription
oracleSampleLifetimeu320The lifetime of a sample, it accumulates information for up to this timestamp
oracleSizeu320The size of the oracle (last ids can be empty)
oracleActiveSizeu320The active size of the oracle (no empty data)
oracleLastTimestampu640The timestamp of the creation of the oracle's latest sample
oracleIdu320The index of the oracle's latest sample
minu320The min delta time of two samples
maxu320The safe max delta time of two samples

Returns

OracleParameters

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

NameType
dataStaticArray<u8>
offseti32

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

Defined in

assembly/structs/OracleParameters.ts:28