Join Testnets
This doc is for developers, and it aims to show how they can join the PlasmaChain Testnet and deploy their smart contracts. If you are looking for information on how to run nodes or to become a validator, please checkout our Validator Guide.
Prerequisite
- Loom installed. See instructions.
Generate a private key
Once Loom is installed, you need to generate a private key with Loom and get your public address:
./loom genkey -k priv_key -a pub_key
You should see something like this printed out in the console:
local address: 0x3B334bEd1e7d3e7d9214495120160D9236aCbC31
local address base64: OzNL7R59Pn2SFElRIBYNkjasvDE=
This will create two files named priv_key
and pub_key
. The priv_key
file contains your private key that you'll use to deploy contracts to the DAppChain.
Deploy Truffle Example to a Testnet
Make sure you have node and yarn/npm installed.
Obtain the testnet URL from PlasmaChain Testnets page
Get the source code from the Truffle DAppChain repo:
git clone https://github.com/loomnetwork/truffle-dappchain-example cd truffle-dappchain-example
Copy the private key to the root directory of the example repo:
cp ../priv_key extdev_private_key
If you wish to deploy the example contracts to
extdev-plasma-us1
skip this step. Otherwise, add the network you wish to deploy to intruffle-config.js
.Install node modules:
yarn
Deploy to
extdev
by running:yarn deploy:extdev