From 883a7131a315ce7fff880623c456130e7ea3fe13 Mon Sep 17 00:00:00 2001 From: todd <81545601+todd-woko@users.noreply.github.com> Date: Fri, 23 Feb 2024 11:14:52 +0800 Subject: [PATCH] docs: upgrade bridge contract doc (#159) Co-authored-by: zakir <80246097+zakir-code@users.noreply.github.com> --- solidity/upgrade.md | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/solidity/upgrade.md b/solidity/upgrade.md index 70e99e8bf..5661d6a84 100644 --- a/solidity/upgrade.md +++ b/solidity/upgrade.md @@ -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 +yarn install -2. send upgradeTo +yarn typechain -npx hardhat send 0x6f1D09Fed11115d65E1071CD2109eDb300D80A27 "upgradeTo(address)" --driver-path "m/44'/60'/0'/0/0" --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 +# verify bridge logic contract +export ETHERSCAN_API_KEY="xxxxxxx" + +npx hardhat verify --network goerli + +# upgrade bridge logic contract +npx hardhat send 0xB1B68DFC4eE0A3123B897107aFbF43CEFEE9b0A2 "upgradeTo(address)" --is-ledger true --driver-path "m/44'/60'/0'/0/1" --network goerli ``` \ No newline at end of file