This is an example DApp to interact with a Terra-Bridge between Ethereum and Terra-Chain testnets using Web3.
The bridge connects 2 networks, called Home and Foreign. Home in this case is Terra-Chain testnet, and Foreign is Ethereum Kovan testnet.
The native currency is the currency that is used as gas for making transactions. For Home network this is CLC, and for Foreign network it is ETH.
- To request for test
CLCtokens, please contact team@contractland.io - To request for test
ETHtokens, join https://gitter.im/kovan-testnet/faucet chat and input your receiving address
npm install
-
Populate
USER_ADDRESSandUSER_ADDRESS_PRIVATE_KEYin.env. This is the account where the transfers will be made from.USER_ADDRESS_PRIVATE_KEYneed to be provided without '0x' prefix. -
To verify user address balances on both chains, run
node scripts/readBalances.js. User address need to have native currency (gas) on both networks. -
Use provided scripts for making transfers between networks:
- To transfer
ETHfrom Ethereum to Terra run:node scripts/transferETHFromEthereumToTerra.js - To transfer
ETHfrom Terra to Ethereum run:node scripts/transferETHFromTerraToEthereum.js - To transfer
CLCfrom Terra to Ethereum run:node scripts/transferCLCFromTerraToEthereum.js - To transfer
CLCfrom Ethereum to Terra run:node scripts/transferCLCFromEthereumToTerra.js
- To transfer