GTokenOpenPnlFeed

Manages open pnl oracle requests for a gToken vault

Methods

function LINK_FEE_BALANCE_DIVIDER() external view returns (uint256)

Returns

NameTypeDescription

_0

uint256

undefined

forceNewEpoch

function forceNewEpoch() external nonpayable

fulfill

function fulfill(bytes32 requestId, int256 value) external nonpayable

Parameters

NameTypeDescription

requestId

bytes32

undefined

value

int256

undefined

gToken

function gToken() external view returns (contract IGToken)

Returns

NameTypeDescription

_0

contract IGToken

undefined

job

function job() external view returns (bytes32)

Returns

NameTypeDescription

_0

bytes32

undefined

lastRequestId

function lastRequestId() external view returns (uint256)

Returns

NameTypeDescription

_0

uint256

undefined

minAnswers

function minAnswers() external view returns (uint256)

Returns

NameTypeDescription

_0

uint256

undefined

newOpenPnlRequestOrEpoch

function newOpenPnlRequestOrEpoch() external nonpayable

nextEpochValues

function nextEpochValues(uint256) external view returns (int256)

Parameters

NameTypeDescription

_0

uint256

undefined

Returns

NameTypeDescription

_0

int256

undefined

nextEpochValuesLastRequest

function nextEpochValuesLastRequest() external view returns (uint256)

Returns

NameTypeDescription

_0

uint256

undefined

nextEpochValuesRequestCount

function nextEpochValuesRequestCount() external view returns (uint256)

Returns

NameTypeDescription

_0

uint256

undefined

oracles

function oracles(uint256) external view returns (address)

Parameters

NameTypeDescription

_0

uint256

undefined

Returns

NameTypeDescription

_0

address

undefined

requestAnswers

function requestAnswers(uint256, uint256) external view returns (int256)

Parameters

NameTypeDescription

_0

uint256

undefined

_1

uint256

undefined

Returns

NameTypeDescription

_0

int256

undefined

requestIds

function requestIds(bytes32) external view returns (uint256)

Parameters

NameTypeDescription

_0

bytes32

undefined

Returns

NameTypeDescription

_0

uint256

undefined

requests

function requests(uint256) external view returns (bool initiated, bool active, uint256 linkFeePerNode)

Parameters

NameTypeDescription

_0

uint256

undefined

Returns

NameTypeDescription

initiated

bool

undefined

active

bool

undefined

linkFeePerNode

uint256

undefined

requestsCount

function requestsCount() external view returns (uint256)

Returns

NameTypeDescription

_0

uint256

undefined

requestsEvery

function requestsEvery() external view returns (uint256)

Returns

NameTypeDescription

_0

uint256

undefined

requestsStart

function requestsStart() external view returns (uint256)

Returns

NameTypeDescription

_0

uint256

undefined

resetNextEpochValueRequests

function resetNextEpochValueRequests() external nonpayable

updateJob

function updateJob(bytes32 newValue) external nonpayable

Parameters

NameTypeDescription

newValue

bytes32

undefined

updateMinAnswers

function updateMinAnswers(uint256 newValue) external nonpayable

Parameters

NameTypeDescription

newValue

uint256

undefined

updateOracle

function updateOracle(uint256 _index, address newValue) external nonpayable

Parameters

NameTypeDescription

_index

uint256

undefined

newValue

address

undefined

updateOracles

function updateOracles(address[] newValues) external nonpayable

Parameters

NameTypeDescription

newValues

address[]

undefined

updateRequestsCount

function updateRequestsCount(uint256 newValue) external nonpayable

Parameters

NameTypeDescription

newValue

uint256

undefined

updateRequestsEvery

function updateRequestsEvery(uint256 newValue) external nonpayable

Parameters

NameTypeDescription

newValue

uint256

undefined

updateRequestsInfoBatch

function updateRequestsInfoBatch(uint256 newRequestsStart, uint256 newRequestsEvery, uint256 newRequestsCount) external nonpayable

Parameters

NameTypeDescription

newRequestsStart

uint256

undefined

newRequestsEvery

uint256

undefined

newRequestsCount

uint256

undefined

updateRequestsStart

function updateRequestsStart(uint256 newValue) external nonpayable

Parameters

NameTypeDescription

newValue

uint256

undefined

Events

ChainlinkCancelled

event ChainlinkCancelled(bytes32 indexed id)

Parameters

NameTypeDescription

id indexed

bytes32

undefined

ChainlinkFulfilled

event ChainlinkFulfilled(bytes32 indexed id)

Parameters

NameTypeDescription

id indexed

bytes32

undefined

ChainlinkRequested

event ChainlinkRequested(bytes32 indexed id)

Parameters

NameTypeDescription

id indexed

bytes32

undefined

JobUpdated

event JobUpdated(bytes32 newValue)

Parameters

NameTypeDescription

newValue

bytes32

undefined

NewEpoch

event NewEpoch(uint256 indexed newEpoch, uint256 indexed requestId, int256[] epochMedianValues, int256 epochAverageValue, uint256 newEpochPositiveOpenPnl)

Parameters

NameTypeDescription

newEpoch indexed

uint256

undefined

requestId indexed

uint256

undefined

epochMedianValues

int256[]

undefined

epochAverageValue

int256

undefined

newEpochPositiveOpenPnl

uint256

undefined

NewEpochForced

event NewEpochForced(uint256 indexed newEpoch)

Parameters

NameTypeDescription

newEpoch indexed

uint256

undefined

NextEpochValueRequested

event NextEpochValueRequested(uint256 indexed currEpoch, uint256 indexed requestId, bytes32 job, uint256 oraclesCount, uint256 linkFeePerNode)

Parameters

NameTypeDescription

currEpoch indexed

uint256

undefined

requestId indexed

uint256

undefined

job

bytes32

undefined

oraclesCount

uint256

undefined

linkFeePerNode

uint256

undefined

NextEpochValuesReset

event NextEpochValuesReset(uint256 indexed currEpoch, uint256 requestsResetCount)

Parameters

NameTypeDescription

currEpoch indexed

uint256

undefined

requestsResetCount

uint256

undefined

NumberParamUpdated

event NumberParamUpdated(string name, uint256 newValue)

Parameters

NameTypeDescription

name

string

undefined

newValue

uint256

undefined

OracleUpdated

event OracleUpdated(uint256 index, address newValue)

Parameters

NameTypeDescription

index

uint256

undefined

newValue

address

undefined

OraclesUpdated

event OraclesUpdated(address[] newValues)

Parameters

NameTypeDescription

newValues

address[]

undefined

RequestMedianValueSet

event RequestMedianValueSet(uint256 indexed currEpoch, uint256 indexed requestId, int256[] requestValues, int256 medianValue)

Parameters

NameTypeDescription

currEpoch indexed

uint256

undefined

requestId indexed

uint256

undefined

requestValues

int256[]

undefined

medianValue

int256

undefined

RequestValueReceived

event RequestValueReceived(bool isLate, uint256 indexed currEpoch, uint256 indexed requestId, bytes32 oracleRequestId, address indexed oracle, int256 requestValue, uint256 linkFee)

Parameters

NameTypeDescription

isLate

bool

undefined

currEpoch indexed

uint256

undefined

requestId indexed

uint256

undefined

oracleRequestId

bytes32

undefined

oracle indexed

address

undefined

requestValue

int256

undefined

linkFee

uint256

undefined