Skip to content

Commit

Permalink
docs: upgrade bridge contract doc (PundiAI#159)
Browse files Browse the repository at this point in the history
Co-authored-by: zakir <80246097+zakir-code@users.noreply.github.com>
  • Loading branch information
todd-woko and zakir-code authored Feb 23, 2024
1 parent e941c12 commit 0d0411e
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions solidity/upgrade.md
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
```

0 comments on commit 0d0411e

Please sign in to comment.