-
Notifications
You must be signed in to change notification settings - Fork 3
AMPL Meter Passport prod deployment
Nithin Krishna edited this page May 26, 2021
·
9 revisions
- Setup deployer key
# create keyfile
export KEYFILE=[Path to key file]
export PASSPHRASE=
- Deploy AMPL contracts
# use existing deployment
yarn hardhat --network prodEthereumBaseChain deploy:use_deployed \
--ampleforth-deployment-yaml "https://raw.githubusercontent.com/ampleforth/uFragments-eth-integration/master/migrations/deployments/mainnet-prod.yaml?token=ABPZMDVRUTAMJAQJVMZO7M3AVZRYA"
# deploy on bsc
export ETHERSCAN_API_KEY=BSC_API_KEY
yarn hardhat \
--network prodBscSatChain \
deploy:ampleforth_xc \
--keyfile $KEYFILE --passphrase $PASSPHRASE \
--token-name "Ample BSC (BRG Meter Passport)" \
--token-symbol "AMPL-BSC-mp" \
--base-chain-network prodEthereumBaseChain
- Use deployed chain bridge contract and deploy handlers
export ETHERSCAN_API_KEY=ETH_API_KEY
yarn hardhat --network prodEthereumBaseChain deploy:chain_bridge_use_deployed \
--bridge-address "0x0682642d18ebb4bb5e759AF07A7DE4eADAE8E8c5" \
--generic-handler-address "0x30b7026e9E5b35C844F6B115Ab4558c3F7e7e3B1"
yarn hardhat --network prodEthereumBaseChain deploy:chain_bridge_base_chain \
--keyfile $KEYFILE --passphrase $PASSPHRASE \
--use-deployed true
#deploy on bsc
export ETHERSCAN_API_KEY=BSC_API_KEY
yarn hardhat --network prodBscSatChain deploy:chain_bridge_use_deployed \
--bridge-address "0x39fCb6203cf870F5E37DcCabF99F9bC39108CA70" \
--generic-handler-address "0x047B69380FD7257274361ED9BEc137Ddf0dfc75e"
yarn hardhat --network prodBscSatChain deploy:chain_bridge_satellite_chain \
--keyfile $KEYFILE --passphrase $PASSPHRASE \
--use-deployed true
- Inspect state
# prints ampl state
yarn hardhat info:ampl \
--networks "[\"prodEthereumBaseChain\", \"prodBscSatChain\"]"
# prints ampl balances across chains
yarn hardhat info:ampl:balance \
--networks "[\"prodEthereumBaseChain\", \"prodBscSatChain\"]" \
--wallet "0x3b2b9EfdaE5291F3Bb9C7e6508C7e67534511585"
# prints bridge state
yarn hardhat info:chain_bridge \
--networks "[\"prodEthereumBaseChain\", \"prodBscSatChain\"]"
# get transaction history
yarn hardhat info:cb_ampl_tx --networks "[\"prodEthereumBaseChain\", \"prodBscSatChain\"]" --output-csv-path prod-tx.csv
- Cross-chain transactions
# report rebase from base-chain to satellite-chains
yarn hardhat --network prodEthereumBaseChain report_rebase:base_chain \
--satellite-chain-networks "[\"prodBscSatChain\"]" \
--keyfile $KEYFILE --passphrase $PASSPHRASE
# wait for relayer to report rebase execute rebase on satellite chains
yarn hardhat rebase:satellite_chain \
--networks "[\"prodBscSatChain\"]" \
--keyfile $KEYFILE --passphrase $PASSPHRASE
# cross-chain transfer from base to satellite
yarn hardhat --network prodEthereumBaseChain xc_transfer \
--target-chain-network prodBscSatChain \
--keyfile $KEYFILE --passphrase $PASSPHRASE \
--recipient-address "0x5A617f363674489339226E8A448307763a43108F" \
--amount 1
# cross-chain transfer from satellite to base
yarn hardhat --network prodBscSatChain xc_transfer \
--target-chain-network prodEthereumBaseChain \
--keyfile $KEYFILE --passphrase $PASSPHRASE \
--recipient-address "0x5A617f363674489339226E8A448307763a43108F" \
--amount 1