Editing config.toml file

Editing config.toml file

In order to enable a new chain, a DSP must add the following to the config.toml environment variable file. This is the file that holds the environment variables for your DSP’s API instance. Each sidechain will need a new [sidechains.CHAIN_NAME] section. CHAIN_NAME - this is the account on the EOS mainnet that has registered with the liquidx.dsp contract as the chain’s name. This name can be found from the block producers of the chain, other DSPs, or the community.

# sidechain section, if no sidechains, leave as [sidechains], can add additional sidechains with [sidechains.newchain] ...
    # dsp
    dsp_port = 3116 # dsp port to run new chain's services on, this is the port developers will push to, must be unique per new chain
    dsp_account = "test1" # DSP Account on new chain
    dsp_private_key = "" # DSP active private key on new chain
    # nodeos
    nodeos_host = "localhost" # nodeos host running new chain
    nodeos_port = 8888 # nodeos host port
    nodeos_secured = false # nodeos secured bool (true: https, false: http)
    nodeos_chainid = "" # chainid of new chain
    nodeos_websocket_port = 8887 # nodeos websocket port, can be same per nodeos instance
    nodoes_latest = true # if using 2.0+ version of nodeos, true, if less than 2.0, false
    webhook_dapp_port = 8113 # nodeos webhook port, must be unique per chain
    # demux
    demux_webhook_port = 3196 # port demux runs on, must be unique per new chain
    demux_socket_mode = "sub"
    demux_head_block = 1 # head block to sync demux from
    # demux defaults to first pulling head block from toml file if postgres database is not set
    # after database is set, defaults to database, to overwrite and default to toml file, pass true
    demux_bypass_database_head_block = false
    demux_max_pending_messages = 500 # amount of pending messages to add to the stack before disconnecting the demux websocket to allow pending messages to process
    # sidechain 
    liquidx_contract = "liquidx.dsp" # liquidx contract on the EOS mainnet
    name = "test1" # CHAIN_NAME - contract on the EOS mainnet that registered the new chain
    # the mapping below contains the dappservices:dappservicex and mainnet DSP account to the new chain's DSP account mapping
    mapping = "dappservices:dappservicex,uuddlrlrbass:uuddlrlrbass"
  # [sidechains.ANOTHER_CHAIN_NAME]
    # ...

Once this has been configured, the environment variables for the DSP can be updated with:

systemctl stop dsp
cd $(readlink -f `which setup-dsp` | xargs dirname)
systemctl start dsp

You can also upgrade to the latest version of the DSP software by reinstalling the DSP, be sure to backup any logs you wish to preserve first.

Last updated