# TriggerRewardsUtils

*GNSTriggerRewards facet internal library*

## initializeTriggerRewards

```solidity
function initializeTriggerRewards(uint16 _timeoutBlocks) internal
```

*Check ITriggerRewardsUtils interface for documentation*

## updateTriggerTimeoutBlocks

```solidity
function updateTriggerTimeoutBlocks(uint16 _timeoutBlocks) internal
```

*Check ITriggerRewardsUtils interface for documentation*

## distributeTriggerReward

```solidity
function distributeTriggerReward(uint256 _rewardGns) internal
```

*Check ITriggerRewardsUtils interface for documentation*

## claimPendingTriggerRewards

```solidity
function claimPendingTriggerRewards(address _oracle) internal
```

*Check ITriggerRewardsUtils interface for documentation*

## getTriggerTimeoutBlocks

```solidity
function getTriggerTimeoutBlocks() internal view returns (uint16)
```

*Check ITriggerRewardsUtils interface for documentation*

## hasActiveOrder

```solidity
function hasActiveOrder(uint256 _orderBlock, uint256 _currentBlock) internal view returns (bool)
```

*Check ITriggerRewardsUtils interface for documentation*

## getTriggerPendingRewardsGns

```solidity
function getTriggerPendingRewardsGns(address _oracle) internal view returns (uint256)
```

*Check ITriggerRewardsUtils interface for documentation*

## \_getSlot

```solidity
function _getSlot() internal pure returns (uint256)
```

*Returns storage slot to use when fetching storage relevant to library*

## \_getStorage

```solidity
function _getStorage() internal pure returns (struct ITriggerRewards.TriggerRewardsStorage s)
```

*Returns storage pointer for storage struct in diamond contract, at defined slot*

## \_getMultiCollatDiamond

```solidity
function _getMultiCollatDiamond() internal view returns (contract IGNSMultiCollatDiamond)
```

*Returns current address as multi-collateral diamond interface to call other facets functions.*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gains.trade/developer/technical-reference/contracts/libraries/triggerrewardsutils.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
