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.
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. |