Configuration
Last updated
Last updated
An options parameter can be passed to the Client
object:
Some key options are:
network
— Sets default configuration settings for the specified environment. Options are; local
, banksia
, myrtle
didClientConfig.rpcUrl
- While optional you may want to set your own RPC instead of using the default RPC of the Client (free and public but may not be reliable)
As you deploy your application on different environments (Production, test, staging), you may want to set a VERIDA_NETWORK
and POLYGON_RPC_URL
environment variable in your application to choose the network and RPC to use appropriately. Note that the client does not read the environment variables and so there is no syntax imposed on the naming of the variables. It is up to you to pass the environment variable to the ClientConfig
.
For example:
Refer to the documentation of your framework, if any, for how to set and use encironment variables.