Skip to main content

Testnets

The default for a Treasury deployment is to use the mainnets networks for blockchains. The default for a demo is to use either testnets or devnets (see exact list here).

If you'd like to setup a Treasury deployment (not a demo), for testnets, you can follow this guide.

Modify Treasury nodes

The easiest way is to set -e XC_TESTNET=1 as an argument to your cord supervise run process that each runs Treasury nodes.

warning

All nodes (signing and api) must have -e XC_TESTNET=1 set. If any node does not, it may run into a consensus error upon serializing a transaction for a mainnet chain (whereas other nodes would serialize for testnet).

To confirm that the change has taken place, you can query for the Treasury resource locally.

curl localhost:8777/v1/treasury | jq

You should see that network is set to be !mainnet.

Once all nodes have switched over, your Treasury instance will work for "not mainnet" networks, and also report balances + transactions for supported chains.

Note that not all non-mainnet networks are supported, or have full indexing capabilites. Some testnets or devnets may be slow to report balances or transactions.

Update Treasury registration

If not already, you should update your registration to be associated with "not mainnet".

# login:
treasury token create
# update:
treasury admin update ${TREASURY_ID} --set-not-mainnet