Interface: GSNConfig

GSNConfig

The interface describing all possible configuration parameters for a GSN Provider. Note that you probably do not need to modify most of these parameters. They exist to support all possible combinations of use-cases and networks.
Source:

Members

auditorsCount :number

The number of Penalizer Relay Servers to send the signed transaction for audit.
Type:
  • number
Source:

blacklistedRelays :Array

The list of Relay Server not to be used. Entries must be either a host URL or a manager address.
Type:
  • Array
Source:

calldataEstimationSlackFactor :number

If the calldata gas estimation is non-deterministic, as is the case on L2s, use a factor to supply some extra gas.
Type:
  • number
Source:

clientDefaultConfigUrl :string

The URL that will be read to fill in the necessary fields in client configuration.
Type:
  • string
Source:

clientId :IntString

Value used to identify applications in RelayRequests.
Type:
  • IntString
Source:

dappOwner :Address

Field required by SingletonWhitelistPaymaster to select the dapp configuration
Type:
  • Address
Source:

domainSeparatorName :string

The name of the EIP-712 Domain Separator field. Note that this is usually the name of the request the users will see in MetaMask or other wallets. Note: The domain type must be first registered on-chain by calling 'Forwarder::registerDomainSeparator'.
Type:
  • string
Source:

environment :Environment

The name of preconfigured network. Supported values: "ganacheLocal", "ethereumMainnet", "arbitrum".
Type:
  • Environment
Source:

gasPriceFactorPercent :number

The 'gasPrice'/'maxPriorityFeePerGas' reported by the network will be increased by this value, in percents.
Type:
  • number
Source:

gasPriceOraclePath :string

For JSON response format, the field to get from the object.
Type:
  • string
Source:

gasPriceOracleUrl :string

The URL to access to get the gas price from. This is done instead of reading the 'gasPrice'/'maxPriorityFeePerGas' from the RPC node.
Type:
  • string
Source:

gasPriceSlackPercent :number

The Relay Client is allowed to accept a Relay Server that requires higher gas fees than originally proposed.
Type:
  • number
Source:

getGasFeesBlocks :number

The number of past blocks to query in 'eth_getGasFees' RPC request.
Type:
  • number
Source:

getGasFeesPercentile :number

The miner reward "percentile" to query in 'eth_getGasFees' RPC request.
Type:
  • number
Source:

jsonStringifyRequest :boolean

Should be 'true' for Metamask, false for Ganache.
Type:
  • boolean
Source:

loggerConfiguration :LoggerConfiguration

The object representing configuration for remote logs collection service.
Type:
  • LoggerConfiguration
Source:

maxApprovalDataLength :number

The maximum length of the 'approvalData' parameter.
Type:
  • number
Source:

maxPaymasterDataLength :number

The maximum length of the 'approvalData' parameter.
Type:
  • number
Source:

maxRelayNonceGap :number

The maximum number of transactions allowed between last known to the client and returned by the Relay Server.
Type:
  • number
Source:

maxViewableGasLimit :IntString

The absolute maximum gas limit to pass to a view call and DRY-RUN call. Will override the maximum dictated by block size limits and entries' balances.
Type:
  • IntString
Source:

methodSuffix :string

Allows the use of versioned methods, i.e. 'eth_signTypedData_v4'. Should be '_v4' for Metamask.
Type:
  • string
Source:

minMaxPriorityFeePerGas :number

The absolute maximum priority gas fee the Relay Provider is willing to pay.
Type:
  • number
Source:

minViewableGasLimit :string

The absolute minimum gas limit to pass to a view call and DRY-RUN call. If Paymaster or Worker do not have enough ether to supply it to the view call the request will fail.
Type:
  • string
Source:

pastEventsQueryMaxPageCount :number

When querying a large range with a small 'pastEventsQueryMaxPageSize' the number of pages may become insane.
Type:
  • number
Source:

pastEventsQueryMaxPageSize :number

In case of querying large block ranges is restricted, set limit and use pagination.
Type:
  • number
Source:

paymasterAddress :Address|PaymasterType

The address or type of the Paymaster contract to be used.
Type:
  • Address | PaymasterType
Source:

performDryRunViewRelayCall :boolean

If set to 'true' the client will make the view call to the RelayHub before requesting user signature for Request.
Type:
  • boolean
Source:

performEstimateGasFromRealSender :boolean

In case there is an issue making an 'estimateGas' from a Forwarder address, make it from the real sender address. Note that the estimation will not be precise in this case as '_msgSender' will consume significantly less gas.
Type:
  • boolean
Source:

preferredRelays :Array

The list of Relay Server to be tried first. Entries must be full Relay Servers URLs.
Type:
  • Array
Source:

relayTimeoutGrace :number

Provider will forget the Relay Server failures that occurred more than 'relayTimeoutGrace' seconds ago.
Type:
  • number
Source:

requestValidSeconds :number

The number of seconds the RelayRequest will be valid for.
Type:
  • number
Source:

requiredVersionRange :string

The SemVer string defining which contracts versions are supported.
Type:
  • string
Source:

skipErc165Check :boolean

If set to 'true' the Relay will not perform an ERC-165 interfaces check on the GSN contracts.
Type:
  • boolean
Source:

tokenPaymasterDomainSeparators :Record.<Address, EIP712Domain>

Fields required by TokenPaymasterProvider for the supported tokens
Type:
  • Record.<Address, EIP712Domain>
Source:

useClientDefaultConfigUrl :boolean

If set to 'true' the client will request the default configuration from clientDefaultConfigUrl.
Type:
  • boolean
Source:

verifierServerApiKey :string

The API key to send as part of an Approval Request to the Verifier Server at verifierServerUrl. It is used to associate the GSN Client with the account that will be charged for the gas off-chain. Note: in some cases it may be important to keep this API Key secret and avoid exposing it to the browser.
Type:
  • string
Source:

verifierServerUrl :string

If verifierServerApiKey is configured the GSN Client will make an Approval Request to this URL.
Type:
  • string
Source:

waitForSuccessPingGrace :number

The number of milliseconds to wait after the first Relay Server responds to the ping before picking a winner.
Type:
  • number
Source:

waitForSuccessSliceSize :number

The number of Relay Servers to be pinged simultaneously.
Type:
  • number
Source: