Parameters
This document provides detailed information about the various parameters used in the 0xGassless SDK functions and configuration. Understanding these parameters is crucial for correctly utilizing the SDK and configuring your environment.
Configuration Parameters
These parameters are used to configure the SDK during initialization.
network
Description: Specifies the blockchain network to use.
Type: String
Example Values:
base
,ropsten
Usage:
rpcUrl
Description: The RPC URL for connecting to the blockchain.
Type: String
Example Value:
https://base.infura.io/v3/YOUR_INFURA_PROJECT_ID
Usage:
bundlerUrl
Description: The URL of the 0xGassless bundler service.
Type: String
Example Value:
https://bundler.0xgassless.com/{chainId}
Usage:
paymasterUrl
Description: The URL of the 0xGassless Paymaster service.
Type: String
Example Value:
https://paymaster.0xgassless.com/v1/{chainId}/rpc
Usage:
privateKey
Description: The private key of the account to use for signing transactions.
Type: String
Example Value:
0xYourPrivateKey
Usage:
Transaction Parameters
These parameters are used when sending transactions through the SDK.
to
Description: The recipient address of the transaction.
Type: String
Example Value:
0xRecipientAddress
Usage:
value
Description: The amount of value to send (in wei).
Type: String
Example Value:
0
Usage:
data
Description: The data payload for the transaction.
Type: String
Example Value:
0xYourData
Usage:
Smart Account Parameters
These parameters are used when interacting with Smart Accounts.
moduleAddress
Description: The address of the module to add or remove.
Type: String
Example Value:
0xModuleAddress
Usage:
accountAddress
Description: The address of the Smart Account.
Type: String
Example Value:
0xSmartAccountAddress
Usage:
ownerAddress
Description: The address of the owner of the new Smart Account.
Type: String
Example Value:
0xOwnerAddress
Usage:
factoryAddress
Description: The address of the Smart Account Factory contract.
Type: String
Example Value:
0xFactoryAddress
Usage:
Example Configuration
Here is an example of a complete configuration object for initializing the 0xGassless SDK:
Example Transaction
Here is an example of a transaction object used with the sendTransaction
method: