Optional Parameters

What other options do you have?

All four main Relay SDK methods use the same optional parameters.

Optional Parameters

relayRequestOptions is a type with the following properties:

type RelayRequestOptions = {
  gasLimit?: BigNumberish;
  retries?: number;
  • gasLimit: the gas limit of the relay call. This effectively sets an upper price limit for the relay call.

    • If you are using your own custom gas limit, please add a 150k gas buffer on top of the expected gas usage for the transaction. This is for the Gelato Relay execution overhead, and adding this buffer reduces your chance of the task cancelling before it is executed on-chain.

    • If your contract has any hardcoded requirements about gas usage, please always explicitly pass the gasLimit to the SDK/API, as Gelato will not know what hardcoded gas expectations your contract has. Otherwise, your relay requests might not be executable.

  • retries: the number of retries that Gelato should attempt before discarding this relay call. This can be useful if the state of the target contract is not fully known and such reverts can not be definitively avoided.

Last updated