Interface: ServerConfigParams

ServerConfigParams

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

alertedDelaySeconds :number

The duration of time the Relay will throttle incoming RelayRequests after suffering a loss. This indicates a transaction reverted on-chain, which may be an attempted attack to drain the relay.
Type:
  • number
Source:

blacklistedPaymasters :Array

The Paymasters in this array will not be served.
Type:
  • Array
Source:

blacklistedRecipients :Array

The Recipients in this array will not be served.
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. Note that the server should have a smaller factor then the clients to avoid rejecting valid Relay Requests.
Type:
  • number
Source:

checkInterval :number

The interval, in milliseconds, with which the Relay will poll the RPC node for new confirmed blocks.
Type:
  • number
Source:

dbAutoCompactionInterval :number

Automatically compact the database with this interval.
Type:
  • number
Source:

dbPruneTxAfterBlocks :number

Remove transactions that were send this many blocks ago from database.
Type:
  • number
Source:

dbPruneTxAfterSeconds :number

Remove transactions that were send this many seconds ago from database.
Type:
  • number
Source:

defaultGasLimit :number

Only used to set 'addRelayWorker' gas limit as it fails estimation.
Type:
  • number
Deprecated:
  • Yes
Source:

defaultPriorityFee :string

In case the RPC node reports 'maxPriorityFeePerGas' to be 0, override it with this value.
Type:
  • string
Source:

devMode :boolean

With this flag set to true the Relay will always clean up its own storage. Only use for testing.
Type:
  • boolean
Source:

environmentName :string

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

ethereumNodeUrl :string

The URL of the Ethereum RPC Node that is used to interact with the blockchain.
Type:
  • string
Source:

etherscanApiKey :string

If running the Relay in a Penalizer mode it will require an Etherscan API key.
Type:
  • string
Source:

etherscanApiUrl :string

If running the Relay in a Penalizer mode it will require an Etherscan API URL to query transactions.
Type:
  • string
Source:

gasPriceFactor :number

The 'gasPrice'/'maxPriorityFeePerGas' reported by the network will be multiplied by this value.
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:

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:

loggerUrl :string

The URL of the remote logger service. Setting it enables remote log collection.
Type:
  • string
Source:

loggerUserId :string

The user ID for the remote logger service.
Type:
  • string
Source:

loggingProvider :LoggingProviderMode

Set what information to output to console from the RPC node calls. Possible values: 0 NONE 1 DURATION 2 ALL 3 CHATTY
Type:
  • LoggingProviderMode
Source:

logLevel :NpmLogLevel

The logging level for the Relay process. 'error' , 'warn' , 'info' , 'debug'
Type:
  • NpmLogLevel
Source:

managerMinBalance :string

The minimum balance of the Relay Manager. If the balance gets lower than that Relay Manager will pull its revenue from the RelayHub.
Type:
  • string
Source:

managerStakeTokenAddress :string

The address of the ERC-20 tokens that are used as stake kept on the StakeManager contract.
Type:
  • string
Source:

managerTargetBalance :string

The balance of the Relay Manager that the Relay will try to maintain by pulling its revenue from the RelayHub.
Type:
  • string
Source:

maxAcceptanceBudget :number

The maximum value the Relay is ready to risk in one call when relaying a transaction, denominated in gas. If the incoming Relay Request requires more gas to verify itself on-chain it will be rejected.
Type:
  • number
Source:

maxAlertedDelayMS :number

Alerted mode will delay incoming RelayRequests by no more than this amount of time.
Type:
  • number
Source:

maxMaxFeePerGas :string

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

minAlertedDelayMS :number

Alerted mode will delay incoming RelayRequests by at least this amount of time.
Type:
  • number
Source:

ownerAddress :string

An address of the owner of this relay. Must be set to the address that will be putting the stake for the Relay.
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

If the number of blocks per 'getLogs' query is limited, use pagination with this page size.
Type:
  • number
Source:

pendingTransactionTimeoutSeconds :number

Once a transaction is broadcast, the Relay will boost it after this number of seconds.
Type:
  • number
Source:

port :number

The port on which the Relay process will listen for connections. Affects the docker configuration. Defaults to 8090.
Type:
  • number
Source:

recentActionAvoidRepeatDistanceBlocks :number

Number of blocks the server will not repeat a ServerAction for regardless of blockchain state to avoid duplicates.
Type:
  • number
Source:

refreshStateTimeoutBlocks :number

The Relay will re-read relevant blockchain state after so many blocks.
Type:
  • number
Source:

relayHubAddress :string

The address of the RelayHub contract.
Type:
  • string
Source:

requestMinValidSeconds :number

If the RelayRequest becomes invalid this soon after it is received it should be rejected.
Type:
  • number
Source:

requiredVersionRange :string

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

retryGasPriceFactor :number

If the transaction is stuck pending for some time the Relay will multiply its 'maxFeePerGas' and 'maxPriorityFeePerGas' by this value.
Type:
  • number
Source:

runPaymasterReputations :boolean

If set to 'true' this Relay will keep track of Paymasters' reputations.
Type:
  • boolean
Source:

runPenalizer :boolean

If set to 'true' this Relay will run in Penalizer mode by listening to '/audit' HTTP requests.
Type:
  • boolean
Source:

skipErc165Check :boolean

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

trustedPaymasters :Array

The Paymasters in this array will have unlimited maxAcceptanceBudget and reputation.
Type:
  • Array
Source:

url :string

The URL with which the Relay will register on the RelayRegistrar. This must be a publicly accessible URL for the clients to be able to reach your Relay.
Type:
  • string
Source:

whitelistedPaymasters :Array

Only the Paymasters in this array will be served. Can only be set together with 'url' set to empty string.
Type:
  • Array
Source:

whitelistedRecipients :Array

Only the Recipients in this array will be served. Can only be set together with 'url' set to empty string. Empty whitelist means the whitelist will not be applied.
Type:
  • Array
Source:

withdrawToOwnerOnBalance :string

If the balance of the Relay Manager on the RelayHub is above this value it will be sent to the owner.
Type:
  • string
Source:

workdir :string

The name of the directory used to store the database and private keys.
Type:
  • string
Source:

workerMinBalance :string

The minimum balance of the worker. If the balance gets lower than that Relay Manager will top it up.
Type:
  • string
Source:

workerTargetBalance :string

The balance of the worker that the Relay will try to maintain by sending funds to it from the Manager.
Type:
  • string
Source: