Environment Configuration Variables
The following is a list of possible environment variables that can be configured for your project. These variables are read in the ENV class, located in @paima/utils/config.js
. Please refer to that file for more information on default values.
Funnel Configuration
These these variables are used if you only need to synchronize a single network for your application. If you need to synchronize multiple networks, learn more about funnel configuration here
Required variables
- Chain variables:
CHAIN_URI
: The URI of the chain.CHAIN_EXPLORER_URI
: The URI of the chain explorer.CHAIN_ID
: The ID of the chain.CHAIN_NAME
: The name of the chain.
- Chain currency variables:
CHAIN_CURRENCY_NAME
: The name of the chain currency.CHAIN_CURRENCY_SYMBOL
: The symbol of the chain currency.CHAIN_CURRENCY_DECIMALS
: The number of decimals for the chain currency.
CONTRACT_ADDRESS
: The address of your Paima L2 contract.START_BLOCKHEIGHT
: The block height at which the syncing process starts. This is usually the block height at which the contract was deployed.BLOCK_TIME
: The number of seconds it takes for new blocks to be created on the chain you deployed your L2 contract on.
Optional variables
- Primitive Catalogue:
DEFAULT_PRESYNC_STEP_SIZE
: number of blocks to process in each step during initial presync phase. If not provided, a value of 1000 is used. Generally no need to change this value.CDE_CONFIG_PATH
: allows you to specify a custom location for yourextensions.$NETWORK.yml
that is used to initialize primitive catalogue entries
- Cardano extensions
CARP_URL
: The URL of a Carp instance, required when using Cardano primitives.CARDANO_NETWORK
: One ofpreview
,preprod
,mainnet
. It needs to match the network indexed by the Carp instance.DEFAULT_FUNNEL_GROUP_SIZE
: The number of blocks queried in one funnel sync step. If not set, a value of 100 is used. Generally no need to change this value.
Others
Required variables
- Database connection variables (self explanatory):
DB_USER
DB_PW
DB_NAME
DB_HOST
DB_PORT
BACKEND_URI
: The URL of where your game node server will be deployed. This is used by the Middleware to interact with your game node.WEBSERVER_PORT
: The port to use for running your game node server.