How to use the Relay Context Contract
uint256 _getFee()
: a value denoting how much fee to pay.address _getFeeToken()
: the address of the token the fee is paid in.address _getFeeCollector()
: the address to which to send your payment.onlyGelatoRelay
: a modifier which will only allow Gelato Relay to call this function._isGelatoRelay(address _forwarder)
: a function which returns true if the address matches Gelato Relay’s address._getFeeCollector()
: a function to retrieve the fee collector address._getFee()
: a function to retrieve the fee that Gelato will charge._getFeeToken()
: a function to retrieve the address of the token used for fee payment._transferRelayFee()
: a function which transfers the fee amount to Gelato, with no cap._transferRelayFeeCapped(uint256 _maxFee)
: a function which transfers the fee amount to Gelato which a set cap from the argument maxFee in wei. This helps limit fees on function calls in case of gas volatility or just for general budgeting.onlyGelatoRelay
: a modifier which will only allow Gelato Relay to call this function._isGelatoRelay(address _forwarder)
: a function which returns true if the address matches Gelato Relay’s address._getFeeCollector()
: a function to retrieve the fee collector address.