ITriggerRewardsUtils

Interface for GNSTriggerRewards facet (inherits types and also contains functions, events, and custom errors)

initializeTriggerRewards

function initializeTriggerRewards(uint16 _timeoutBlocks) external

Initializes parameters for trigger rewards facet

Parameters

Name
Type
Description

_timeoutBlocks

uint16

blocks after which a trigger times out

updateTriggerTimeoutBlocks

function updateTriggerTimeoutBlocks(uint16 _timeoutBlocks) external

Updates the blocks after which a trigger times out

Parameters

Name
Type
Description

_timeoutBlocks

uint16

blocks after which a trigger times out

distributeTriggerReward

function distributeTriggerReward(uint256 _rewardGns) external

Distributes GNS rewards to oracles for a specific trigger

Parameters

Name
Type
Description

_rewardGns

uint256

total GNS reward to be distributed among oracles

claimPendingTriggerRewards

Claims pending GNS trigger rewards for the caller

Parameters

Name
Type
Description

_oracle

address

address of the oracle

getTriggerTimeoutBlocks

Returns current triggerTimeoutBlocks value

hasActiveOrder

Checks if an order is active (exists and has not timed out)

Parameters

Name
Type
Description

_orderBlock

uint256

block number of the order

getTriggerPendingRewardsGns

Returns the pending GNS trigger rewards for an oracle

Parameters

Name
Type
Description

_oracle

address

address of the oracle

TriggerTimeoutBlocksUpdated

Emitted when timeoutBlocks is updated

Parameters

Name
Type
Description

timeoutBlocks

uint16

blocks after which a trigger times out

TriggerRewarded

Emitted when trigger rewards are distributed for a specific order

Parameters

Name
Type
Description

rewardsPerOracleGns

uint256

reward in GNS distributed per oracle

oraclesCount

uint256

number of oracles rewarded

TriggerRewardsClaimed

Emitted when pending GNS trigger rewards are claimed by an oracle

Parameters

Name
Type
Description

oracle

address

address of the oracle

rewardsGns

uint256

GNS rewards claimed

TimeoutBlocksZero

NoPendingTriggerRewards

Was this helpful?