Before you can use the Bridge with the Ropsten testnet, you'll need to add two environment variables to the configuration file at testnet-contracts/.env
. Add MNEMONIC
from your MetaMask account, this will allow you to deploy the contracts to the Ropsten testnet. Add INFURA_PROJECT_ID
from your Infura account, this will allow you to start a Relayer service that listens for events on the Ropsten testnet.
Further reading:
# Deploy the contracts to the Ropsten network with the --network flag
yarn migrate --network ropsten
# Activate the contracts
yarn peggy:setup
# Get the Registry contract's address on the Ropsten network with the --network flag
yarn peggy:address --network ropsten
# Generate contract bindings
ebrelayer generate
# Start relayer
ebrelayer init tcp://localhost:26657 wss://ropsten.infura.io/ [REGISTRY_CONTRACT_ADDRESS] validator --chain-id=peggy
Send funds to the deployed contracts on the Ropsten testnet:
yarn peggy:lock --network ropsten [COSMOS_RECIPIENT_ADDRESS] eth [RWEI_AMOUNT]