Skip to content

Commit

Permalink
evm: revert #42 (#45)
Browse files Browse the repository at this point in the history
* Revert "Adds VAA self signing logic and updates implementation addresses (#42)"

This reverts commit 105ad59.

* evm: clean ts/src/ethers-contracts

---------

Co-authored-by: A5 Pickle <[email protected]>
  • Loading branch information
a5-pickle and a5-pickle authored Dec 5, 2023
1 parent b36833e commit 74e11b1
Show file tree
Hide file tree
Showing 34 changed files with 1,240 additions and 1,651 deletions.
2 changes: 1 addition & 1 deletion evm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ all: build

.PHONY: clean
clean:
rm -rf anvil.log node_modules lib out
rm -rf anvil.log node_modules lib out ts/src/ethers-contracts

.PHONY: dependencies
dependencies: node_modules lib/forge-std lib/wormhole
Expand Down
2 changes: 1 addition & 1 deletion evm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Then run the following command to deploy (and set up) the proxy contract:

```
# sample deployment command
. env/put_your_env_file_here.env && shell-scripts/deploy_contracts.sh --private-key put_your_private_key_here
. env/put_your_env_file_here.env && PRIVATE_KEY=put_your_private_key_here bash shell-scripts/deploy_contracts.sh
```

## Test Suite
Expand Down
File renamed without changes.
14 changes: 0 additions & 14 deletions evm/env/mainnet/base.env

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
export CONFIGURE_CCTP_RPC="https://goerli-rollup.arbitrum.io/rpc"
export RPC=""

### Contract addresses
export RELEASE_WORMHOLE_ADDRESS=0xC7A204bDBFe983FCD8d8E61D02b475D4073fF97e
export RELEASE_CIRCLE_BRIDGE_ADDRESS=0x12dcfd3fe2e9eac2859fd1ed86d2ab8c5a2f9352
export RELEASE_WORMHOLE_FINALITY=1

### Deployed Circle Integration addresses
export CIRCLE_INTEGRATION_IMPLEMENTATION=0xD73aFD826D6bDD4D2fEF326DF5091451A5d8130a
export CIRCLE_INTEGRATION_IMPLEMENTATION=0xa098368aaadc0fdf3e309cda710d7a5f8bdeecd9
export CIRCLE_INTEGRATION_SETUP=0xb0a9feeaf74f2e8e2966bf774466ca3575ec8a6d
export CIRCLE_INTEGRATION_PROXY=0x2E8F5E00a9C5D450A72700546B89E2b70DfB00f2

Expand Down
4 changes: 2 additions & 2 deletions evm/env/testnet/avax.env → evm/env/testnet/avax-testnet.env
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
export CONFIGURE_CCTP_RPC="https://api.avax-test.network/ext/bc/C/rpc"
export RPC="https://api.avax-test.network/ext/bc/C/rpc"

### Contract addresses
export RELEASE_WORMHOLE_ADDRESS=0x7bbcE28e64B3F8b84d876Ab298393c38ad7aac4C
export RELEASE_CIRCLE_BRIDGE_ADDRESS=0xeb08f243e5d3fcff26a9e38ae5520a669f4019d0
export RELEASE_WORMHOLE_FINALITY=1

### Deployed Circle Integration addresses
export CIRCLE_INTEGRATION_IMPLEMENTATION=0xD73aFD826D6bDD4D2fEF326DF5091451A5d8130a
export CIRCLE_INTEGRATION_IMPLEMENTATION=0xf0ff9898918351148ffd97c7ddb412086505eae1
export CIRCLE_INTEGRATION_SETUP=0xd66a83c1cd3cf85a071daa6a4bcbea32e22931c0
export CIRCLE_INTEGRATION_PROXY=0x58f4c17449c90665891c42e14d34aae7a26a472e

Expand Down
15 changes: 0 additions & 15 deletions evm/env/testnet/base.env

This file was deleted.

4 changes: 2 additions & 2 deletions evm/env/testnet/eth.env → evm/env/testnet/eth-testnet.env
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
export CONFIGURE_CCTP_RPC="https://rpc.ankr.com/eth_goerli"
export RPC=""

### Contract addresses
export RELEASE_WORMHOLE_ADDRESS=0x706abc4E45D419950511e474C7B9Ed348A4a716c
export RELEASE_CIRCLE_BRIDGE_ADDRESS=0xd0c3da58f55358142b8d3e06c1c30c5c6114efe8
export RELEASE_WORMHOLE_FINALITY=200

### Deployed Circle Integration addresses
export CIRCLE_INTEGRATION_IMPLEMENTATION=0xD73aFD826D6bDD4D2fEF326DF5091451A5d8130a
export CIRCLE_INTEGRATION_IMPLEMENTATION=0x4fa4b2c3744b29D0e4F1AaFE8B758F953FaCf1A4
export CIRCLE_INTEGRATION_SETUP=0xB9aCd3891EBf91EC09cfe337EE5A8EEfF4317846
export CIRCLE_INTEGRATION_PROXY=0x0a69146716b3a21622287efa1607424c663069a4

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
export CONFIGURE_CCTP_RPC="https://rpc.goerli.optimism.gateway.fm"
export RPC="https://goerli.optimism.io"

### Contract addresses
export RELEASE_WORMHOLE_ADDRESS=0x6b9C8671cdDC8dEab9c719bB87cBd3e782bA6a35
export RELEASE_CIRCLE_BRIDGE_ADDRESS=0x23a04d5935ed8bc8e3eb78db3541f0abfb001c6e
export RELEASE_WORMHOLE_FINALITY=1


### Deployed Circle Integration addresses
export CIRCLE_INTEGRATION_IMPLEMENTATION=0xD4Bab83eDe934973d22f1da04819fe2E5b5a9Ef4
export CIRCLE_INTEGRATION_IMPLEMENTATION=0xD73aFD826D6bDD4D2fEF326DF5091451A5d8130a
export CIRCLE_INTEGRATION_SETUP=0xC5180b274Ead8aC34131B6dDa0323e403d671De7
export CIRCLE_INTEGRATION_PROXY=0x2703483B1a5a7c577e8680de9Df8Be03c6f30e3c

Expand Down
33 changes: 17 additions & 16 deletions evm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,29 @@
"version": "0.1.0",
"main": "index.js",
"license": "ISC",
"type": "module",
"devDependencies": {
"@types/chai": "^4.3.3",
"@types/mocha": "^9.1.1",
"@types/node": "^20.0.0",
"@types/yargs": "^17.0.24",
"@types/node": "^18.11.17",
"chai": "^4.3.6",
"mocha": "^10.0.0",
"ts-mocha": "^10.0.0",
"tsx": "^3.13.0",
"typescript": "^5.2.2"
"ethers": "^5.7.1"
},
"dependencies": {
"@certusone/wormhole-sdk": "^0.10.3",
"@noble/secp256k1": "^2.0.0",
"@certusone/wormhole-sdk": "^0.9.0",
"@improbable-eng/grpc-web-node-http-transport": "^0.15.0",
"@openzeppelin/contracts": "^4.7.3",
"@typechain/ethers-v5": "^11.1.1",
"@xlabs-xyz/ledger-signer": "0.0.3",
"@typechain/ethers-v5": "^10.1.1",
"@types/argparse": "^2.0.10",
"@types/chai": "^4.3.3",
"@types/mocha": "^9.1.1",
"argparse": "^2.0.1",
"axios": "^1.1.3",
"dotenv": "^16.0.3",
"ethers": "^5.7.1",
"typechain": "^8.3.1",
"yargs": "^17.7.2"
"elliptic": "^6.5.4",
"express": "^4.18.2",
"mocha": "^10.0.0",
"ts-mocha": "^10.0.0",
"ts-node": "^10.9.1",
"typechain": "^8.1.1",
"typescript": "^4.8.3"
},
"scripts": {
"build-types": "bash shell-scripts/make_ethers_types.sh",
Expand Down
7 changes: 4 additions & 3 deletions evm/shell-scripts/deploy_contracts.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env bash
#!/bin/bash

forge script $(dirname $0)/../forge-scripts/deploy_contracts.sol \
--rpc-url $CONFIGURE_CCTP_RPC \
--broadcast --slow $@
--rpc-url $RPC \
--private-key $PRIVATE_KEY \
--broadcast --slow
7 changes: 4 additions & 3 deletions evm/shell-scripts/deploy_implementation_only.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/usr/bin/env bash
#!/bin/bash

set -euo pipefail

forge script $(dirname $0)/../forge-scripts/deploy_implementation_only.sol \
-vv \
--rpc-url $CONFIGURE_CCTP_RPC \
--broadcast --slow $@
--rpc-url $RPC \
--private-key $PRIVATE_KEY \
--broadcast --slow
4 changes: 2 additions & 2 deletions evm/shell-scripts/make_ethers_types.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#!/bin/bash

SRC=$(dirname $0)/../out
DST=$(dirname $0)/../ts/src/ethers-contracts

typechain --target=ethers-v5 --node16-modules --out-dir=$DST $SRC/*/*.json
typechain --target=ethers-v5 --out-dir=$DST $SRC/*/*.json
2 changes: 1 addition & 1 deletion evm/shell-scripts/run_integration_tests.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#/bin/bash

pgrep anvil > /dev/null
if [ $? -eq 0 ]; then
Expand Down
13 changes: 5 additions & 8 deletions evm/shell-scripts/submit_testnet_registration.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#!/usr/bin/env bash

# Usage: ./submit_testnet_registration <target chain> <foreign chain> <foreign emitter> <foreign domain> <forge script args (keys)>
#!/bin/bash

set -euo pipefail

Expand All @@ -10,9 +8,8 @@ export FOREIGN_EMITTER=$3
export FOREIGN_DOMAIN=$4
export SIGNER_KEY=$5

shift 5 # <- remove 5 first arguments

forge script $(dirname $0)/../forge-scripts/submit_testnet_registration.sol \
forge script $(dirname $0)/../forge-scripts/generate_registration_vaa.sol \
-vv \
--rpc-url $CONFIGURE_CCTP_RPC \
--broadcast --slow $@
--rpc-url $RPC \
--private-key $PRIVATE_KEY \
--broadcast --slow
4 changes: 2 additions & 2 deletions evm/shell-scripts/upgrade_proxy.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
#!/bin/bash

set -euo pipefail

npx tsx $(dirname $0)/../ts/scripts/upgrade_proxy.ts $@
ts-node $(dirname $0)/../ts/scripts/upgrade_proxy.ts $@
2 changes: 1 addition & 1 deletion evm/shell-scripts/verify_implementation.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#/usr/bin/env bash

etherscan_key=$1

Expand Down
2 changes: 1 addition & 1 deletion evm/shell-scripts/verify_proxy.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#/usr/bin/env bash

etherscan_key=$1

Expand Down
2 changes: 1 addition & 1 deletion evm/shell-scripts/verify_setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#/usr/bin/env bash

etherscan_key=$1

Expand Down
6 changes: 3 additions & 3 deletions evm/ts/scripts/contract_governance.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {ethers} from "ethers";
import {tryNativeToUint8Array} from "@certusone/wormhole-sdk";
import {MockGuardians} from "@certusone/wormhole-sdk/lib/esm/mock";
import {CircleGovernanceEmitter} from "../test/helpers/mock.js";
import {MockGuardians} from "@certusone/wormhole-sdk/lib/cjs/mock";
import {CircleGovernanceEmitter} from "../test/helpers/mock";
import {abi as WORMHOLE_ABI} from "../../out/IWormhole.sol/IWormhole.json";
import {abi as CIRCLE_INTEGRATION_ABI} from "../../out/CircleIntegration.sol/CircleIntegration.json";
import {getTimeNow} from "../test/helpers/utils.js";
import {getTimeNow} from "../test/helpers/utils";
import {expect} from "chai";

require("dotenv").config({path: process.argv.slice(2)[0]});
Expand Down
120 changes: 0 additions & 120 deletions evm/ts/scripts/sign_vaa.ts

This file was deleted.

Loading

0 comments on commit 74e11b1

Please sign in to comment.