forked from PundiAI/fx-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: upgrade bridge contract doc (PundiAI#159)
Co-authored-by: zakir <80246097+zakir-code@users.noreply.github.com>
- Loading branch information
1 parent
e941c12
commit 0d0411e
Showing
1 changed file
with
15 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,23 @@ | ||
# Fx Bridge Contract Upgrade Process | ||
|
||
``` | ||
1. Deploy new bridge logic contract | ||
```shell | ||
# setup env | ||
cd solidity | ||
|
||
npx hardhat deploy-contract --contract-name FxBridgeLogicETH --is-ledger --driver-path "m/44'/60'/0'/0/0" --network <network> | ||
yarn install | ||
|
||
2. send upgradeTo | ||
yarn typechain | ||
|
||
npx hardhat send 0x6f1D09Fed11115d65E1071CD2109eDb300D80A27 "upgradeTo(address)" <new bridge logic address> --driver-path "m/44'/60'/0'/0/0" --network <network> | ||
# deploy bridge logic contract | ||
export GOERLI_URL="https://goerli.infura.io/v3/xxxxxxx" | ||
|
||
3. send migrate | ||
npx hardhat deploy-contract --contract-name FxBridgeLogicETH --is-ledger true --driver-path "m/44'/60'/0'/0/0" --network goerli | ||
|
||
npx hardhat send 0x6f1D09Fed11115d65E1071CD2109eDb300D80A27 "migrate()" --driver-path "m/44'/60'/0'/0/0" --network <network> | ||
# verify bridge logic contract | ||
export ETHERSCAN_API_KEY="xxxxxxx" | ||
|
||
npx hardhat verify <new bridge logic address> --network goerli | ||
|
||
# upgrade bridge logic contract | ||
npx hardhat send 0xB1B68DFC4eE0A3123B897107aFbF43CEFEE9b0A2 "upgradeTo(address)" <new bridge logic address> --is-ledger true --driver-path "m/44'/60'/0'/0/1" --network goerli | ||
``` |