Script changes for acala upgrade (#1726)
* Script changes for acala upgrade * Update package-lock
This commit is contained in:
parent
6c6661f621
commit
19149e653e
|
@ -157,7 +157,7 @@ const TESTNET = {
|
|||
terra: {
|
||||
rpc: "https://bombay-lcd.terra.dev",
|
||||
chain_id: "bombay-12",
|
||||
key: get_env_var("TERRA_MNEMONIC"),
|
||||
key: get_env_var("TERRA_MNEMONIC_TESTNET"),
|
||||
},
|
||||
ethereum: {
|
||||
rpc: `https://rpc.ankr.com/eth_goerli`,
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
"version": "1.0.0",
|
||||
"dependencies": {
|
||||
"@celo-tools/celo-ethers-wrapper": "^0.1.0",
|
||||
"@certusone/wormhole-sdk": "^0.7.1",
|
||||
"@certusone/wormhole-sdk": "^0.7.2",
|
||||
"@cosmjs/encoding": "^0.26.2",
|
||||
"@injectivelabs/networks": "^1.0.12",
|
||||
"@injectivelabs/sdk-ts": "^1.0.75",
|
||||
|
@ -595,9 +595,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@certusone/wormhole-sdk": {
|
||||
"version": "0.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@certusone/wormhole-sdk/-/wormhole-sdk-0.7.1.tgz",
|
||||
"integrity": "sha512-G6V2x/0vYsYgr6WQAn/meaQWoac0R2V2Nqho0/vxpx7br0KsCbwD84Sy5iLZREThnP8fRMrFf03pVXpZRzEtOA==",
|
||||
"version": "0.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@certusone/wormhole-sdk/-/wormhole-sdk-0.7.2.tgz",
|
||||
"integrity": "sha512-DRF7BM7RqnLfuB4beSnOSOyybNorg9uaFM2WMKKmjrIk1d+PNbItWRnY1WwL9xnHMc7+zGGfebqQX3ejvtX3PA==",
|
||||
"dependencies": {
|
||||
"@certusone/wormhole-sdk-proto-web": "^0.0.5",
|
||||
"@certusone/wormhole-sdk-wasm": "^0.0.1",
|
||||
|
@ -605,6 +605,7 @@
|
|||
"@solana/spl-token": "^0.1.8",
|
||||
"@solana/web3.js": "^1.24.0",
|
||||
"@terra-money/terra.js": "^3.1.3",
|
||||
"@xpla/xpla.js": "^0.2.1",
|
||||
"algosdk": "^1.15.0",
|
||||
"axios": "^0.24.0",
|
||||
"bech32": "^2.0.0",
|
||||
|
@ -14237,9 +14238,9 @@
|
|||
"requires": {}
|
||||
},
|
||||
"@certusone/wormhole-sdk": {
|
||||
"version": "0.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@certusone/wormhole-sdk/-/wormhole-sdk-0.7.1.tgz",
|
||||
"integrity": "sha512-G6V2x/0vYsYgr6WQAn/meaQWoac0R2V2Nqho0/vxpx7br0KsCbwD84Sy5iLZREThnP8fRMrFf03pVXpZRzEtOA==",
|
||||
"version": "0.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@certusone/wormhole-sdk/-/wormhole-sdk-0.7.2.tgz",
|
||||
"integrity": "sha512-DRF7BM7RqnLfuB4beSnOSOyybNorg9uaFM2WMKKmjrIk1d+PNbItWRnY1WwL9xnHMc7+zGGfebqQX3ejvtX3PA==",
|
||||
"requires": {
|
||||
"@certusone/wormhole-sdk-proto-web": "^0.0.5",
|
||||
"@certusone/wormhole-sdk-wasm": "^0.0.1",
|
||||
|
@ -14247,6 +14248,7 @@
|
|||
"@solana/spl-token": "^0.1.8",
|
||||
"@solana/web3.js": "^1.24.0",
|
||||
"@terra-money/terra.js": "^3.1.3",
|
||||
"@xpla/xpla.js": "^0.2.1",
|
||||
"algosdk": "^1.15.0",
|
||||
"axios": "^0.24.0",
|
||||
"bech32": "^2.0.0",
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"version": "0.0.1",
|
||||
"dependencies": {
|
||||
"@celo-tools/celo-ethers-wrapper": "^0.1.0",
|
||||
"@certusone/wormhole-sdk": "^0.7.1",
|
||||
"@certusone/wormhole-sdk": "^0.7.2",
|
||||
"@cosmjs/encoding": "^0.26.2",
|
||||
"@injectivelabs/networks": "^1.0.12",
|
||||
"@injectivelabs/sdk-ts": "^1.0.75",
|
||||
|
|
|
@ -14,3 +14,4 @@ BRIDGE_INIT_GOV_CHAIN_ID=0x1
|
|||
BRIDGE_INIT_GOV_CONTRACT=0x0000000000000000000000000000000000000000000000000000000000000004
|
||||
# There is no WETH on Acala.
|
||||
BRIDGE_INIT_WETH=0x0000000000000000000000000000000000000000
|
||||
BRIDGE_INIT_FINALITY=1
|
||||
|
|
|
@ -2,6 +2,13 @@
|
|||
|
||||
set -euo pipefail
|
||||
|
||||
if [ $# == 0 ]
|
||||
then
|
||||
chain=ethereum
|
||||
else
|
||||
chain=$1
|
||||
fi
|
||||
|
||||
# Run the upgrade simulation (./simulate_upgrade) against each contract twice
|
||||
# against the ethereum mainnet state. Running the upgrade twice ensures that the
|
||||
# contract is still upgradeable after the first upgrade.
|
||||
|
@ -14,24 +21,24 @@ function clean_up () {
|
|||
}
|
||||
trap clean_up SIGINT SIGTERM EXIT
|
||||
|
||||
echo "🍴 Forking mainnet..."
|
||||
./anvil_fork ethereum > /dev/null &
|
||||
echo "🍴 Forking mainnet for $chain ..."
|
||||
./anvil_fork $chain > /dev/null &
|
||||
ANVIL_PID=$!
|
||||
|
||||
# Sleep for 10 seconds here to give some time for the fork to complete.
|
||||
sleep 10
|
||||
|
||||
echo "========================= Updating core contract #1 ============================"
|
||||
./simulate_upgrade -m bridge -c ethereum -d
|
||||
./simulate_upgrade -m bridge -c $chain -d
|
||||
echo "========================= Updating core contract #2 ============================"
|
||||
./simulate_upgrade -m bridge -c ethereum -d
|
||||
./simulate_upgrade -m bridge -c $chain -d
|
||||
|
||||
echo "===================== Updating token bridge contract #1 ========================"
|
||||
./simulate_upgrade -m token_bridge -c ethereum -d
|
||||
./simulate_upgrade -m token_bridge -c $chain -d
|
||||
echo "===================== Updating token bridge contract #2 ========================"
|
||||
./simulate_upgrade -m token_bridge -c ethereum -d
|
||||
./simulate_upgrade -m token_bridge -c $chain -d
|
||||
|
||||
echo "====================== Updating NFT bridge contract #1 ========================="
|
||||
./simulate_upgrade -m nft_bridge -c ethereum -d
|
||||
./simulate_upgrade -m nft_bridge -c $chain -d
|
||||
echo "====================== Updating NFT bridge contract #2 ========================="
|
||||
./simulate_upgrade -m nft_bridge -c ethereum -d
|
||||
./simulate_upgrade -m nft_bridge -c $chain -d
|
||||
|
|
|
@ -209,8 +209,9 @@ module.exports = {
|
|||
);
|
||||
},
|
||||
network_id: 787,
|
||||
gasPrice: "0x2f3e3403ea",
|
||||
gas: "0x6fc3540",
|
||||
gasPrice: "0x33a70303ea",
|
||||
gasLimit: "0x6fc3540",
|
||||
gas: "0x6fc3400",
|
||||
},
|
||||
acala_testnet: {
|
||||
provider: () => {
|
||||
|
|
Loading…
Reference in New Issue