Get Started
Global Parameters
Certain parameters are configured globally. These parameters may be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, These global values will be used as defaults on the operations that use them. When such operations are called, there is a place in each to override the global value, if needed.
For example, you can set chainId
to 43114
at SDK initialization and then you do not have to pass the same value on calls to operations like getBlock. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.
Available Globals
The following global parameters are available.
Name | Type | Required | Description |
---|---|---|---|
chainId | string | No | A supported EVM chain id, chain alias, or blockchain id. |
network | components.GlobalParamNetwork | No | A supported network type, either mainnet or a testnet. |
Example
Was this page helpful?