Evm/arbitrum mainnet deployment (#37)

* evm: Adds addresses for Arbitrum's `CircleIntegration` deployment.

* evm: Simplifies verification scripts.
This commit is contained in:
scnale 2023-06-22 12:51:03 -03:00 committed by GitHub
parent cc0a7c7692
commit 6b649274ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 38 additions and 25 deletions

View File

@ -4,3 +4,12 @@ export RPC=""
export RELEASE_WORMHOLE_ADDRESS=0xa5f208e072434bC67592E4C49C1B991BA79BCA46
export RELEASE_CIRCLE_BRIDGE_ADDRESS=0x19330d10D9Cc8751218eaf51E8885D058642E08A
export RELEASE_WORMHOLE_FINALITY=1
### Deployed Circle Integration addresses
export CIRCLE_INTEGRATION_IMPLEMENTATION=0xD73aFD826D6bDD4D2fEF326DF5091451A5d8130a
export CIRCLE_INTEGRATION_SETUP=0xC5180b274Ead8aC34131B6dDa0323e403d671De7
export CIRCLE_INTEGRATION_PROXY=0x2703483B1a5a7c577e8680de9Df8Be03c6f30e3c
# Used in verification scripts
export RELEASE_EVM_CHAIN_ID=42161

View File

@ -3,7 +3,7 @@
pragma solidity ^0.8.19;
import "forge-std/Script.sol";
import "forge-std/console.sol";
import "forge-std/console2.sol";
import {IWormhole} from "wormhole/interfaces/IWormhole.sol";
@ -38,25 +38,28 @@ contract ContractScript is Script {
function deployCircleIntegration() public {
// first Setup
setup = new CircleIntegrationSetup();
console2.log("CircleIntegrationSetup address: %s", address(setup));
// next Implementation
implementation = new CircleIntegrationImplementation();
console2.log("CircleIntegrationImplementation address: %s", address(implementation));
console.log("Wormhole address: %s, chainId: %s", address(wormhole), wormhole.chainId());
console2.log("Wormhole address: %s, chainId: %s", address(wormhole), wormhole.chainId());
// setup Proxy using Implementation
proxy = new CircleIntegrationProxy(
address(setup),
abi.encodeWithSelector(
bytes4(keccak256("setup(address,address,uint8,address,uint16,bytes32)")),
abi.encodeCall(CircleIntegrationSetup.setup, (
address(implementation),
address(wormhole),
uint8(vm.envUint("RELEASE_WORMHOLE_FINALITY")),
address(circleBridge),
wormhole.governanceChainId(),
wormhole.governanceContract()
)
))
);
console2.log("CircleIntegrationProxy address: %s", address(proxy));
}
function run() public {

0
evm/shell-scripts/deploy_contracts.sh Normal file → Executable file
View File

0
evm/shell-scripts/deploy_implementation_only.sh Normal file → Executable file
View File

0
evm/shell-scripts/make_ethers_types.sh Normal file → Executable file
View File

0
evm/shell-scripts/run_integration_tests.sh Normal file → Executable file
View File

0
evm/shell-scripts/submit_testnet_registration.sh Normal file → Executable file
View File

0
evm/shell-scripts/upgrade_proxy.sh Normal file → Executable file
View File

13
evm/shell-scripts/verify_implementation.sh Normal file → Executable file
View File

@ -1,13 +1,8 @@
#/bin/bash
#/usr/bin/env bash
chain_id=$1
deployed_addr=$2
optimizer_runs=$3
etherscan_key=$4
etherscan_key=$1
echo $chain_id $deployed_addr $optimizer_runs $etherscan_key
forge verify-contract --chain-id $chain_id --num-of-optimizations $optimizer_runs --watch \
--compiler-version v0.8.19 $deployed_addr \
forge verify-contract --chain-id $RELEASE_EVM_CHAIN_ID --watch \
--compiler-version v0.8.19 $CIRCLE_INTEGRATION_IMPLEMENTATION \
src/circle_integration/CircleIntegrationImplementation.sol:CircleIntegrationImplementation \
--etherscan-api-key $etherscan_key

20
evm/shell-scripts/verify_proxy.sh Normal file → Executable file
View File

@ -1,16 +1,14 @@
#/bin/bash
#/usr/bin/env bash
chain_id=$1
deployed_addr=$2
optimizer_runs=$3
etherscan_key=$4
setup_addr=$5
setup_bytes=$6
etherscan_key=$1
echo $chain_id $deployed_addr $optimizer_runs $etherscan_key
governance_chain_id=1
governance_contract=0x0000000000000000000000000000000000000000000000000000000000000004
forge verify-contract --chain-id $chain_id --num-of-optimizations $optimizer_runs --watch \
--constructor-args $(cast abi-encode "constructor(address,bytes)" $setup_addr $setup_bytes) \
--compiler-version v0.8.19 $deployed_addr \
setup_bytes=$(cast calldata "function setup(address,address,uint8,address,uint16,bytes32)" $CIRCLE_INTEGRATION_IMPLEMENTATION $RELEASE_WORMHOLE_ADDRESS $RELEASE_WORMHOLE_FINALITY $RELEASE_CIRCLE_BRIDGE_ADDRESS $governance_chain_id $governance_contract)
forge verify-contract --chain-id $RELEASE_EVM_CHAIN_ID --watch \
--constructor-args $(cast abi-encode "constructor(address,bytes)" $CIRCLE_INTEGRATION_SETUP $setup_bytes) \
--compiler-version v0.8.19 $CIRCLE_INTEGRATION_PROXY \
src/circle_integration/CircleIntegrationProxy.sol:CircleIntegrationProxy \
--etherscan-api-key $etherscan_key

View File

@ -0,0 +1,8 @@
#/usr/bin/env bash
etherscan_key=$1
forge verify-contract --chain-id $RELEASE_EVM_CHAIN_ID --watch \
--compiler-version v0.8.19 $CIRCLE_INTEGRATION_SETUP \
src/circle_integration/CircleIntegrationSetup.sol:CircleIntegrationSetup \
--etherscan-api-key $etherscan_key