parent
c01dd93adb
commit
8391c280dd
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "execute_governance",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
"program": "${workspaceFolder}/main.go",
|
||||
"args": [
|
||||
"execute_governance",
|
||||
"--contract", "${input:contract}",
|
||||
"--rpc", "${input:rpc}",
|
||||
"--key", "${input:key}",
|
||||
"${input:vaa}",
|
||||
],
|
||||
"env": {},
|
||||
},
|
||||
|
||||
],
|
||||
"inputs": [
|
||||
{
|
||||
"id": "contract",
|
||||
"type": "promptString",
|
||||
"description": "contract address",
|
||||
// devnet eth core contract
|
||||
"default": "0xC89Ce4735882C9F0f0FE26686c53074E09B0D550"
|
||||
},
|
||||
{
|
||||
"id": "rpc",
|
||||
"type": "promptString",
|
||||
"description": "RPC url",
|
||||
"default": "http://localhost:8545",
|
||||
},
|
||||
{
|
||||
"id": "key",
|
||||
"type": "promptString",
|
||||
"description": "key of wallet sending transaction",
|
||||
// ganche default account key
|
||||
"default": "4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d",
|
||||
},
|
||||
{
|
||||
"id": "vaa",
|
||||
"type": "promptString",
|
||||
"description": "hex VAA string",
|
||||
// this vaa is GuardianSetIndex: 1, which contains two signers: guardian-0 & guardian-1
|
||||
"default": "010000000001005e56dff434b7c2d81b38aa2544038839b61fd7654cc6c7bcf5c3cc61ad8f9e5d21df20d2f4c910c813dca110a627fa6db7d349d5988f28dd45971a7361bcc65d00000000001d0acf0400010000000000000000000000000000000000000000000000000000000000000004b5cc4c23133077212000000000000000000000000000000000000000000000000000000000436f72650200000000000102befa429d57cd18b7f8a4d91a2da9ab4af05d0fbe88d7d8b32a9105d228100e72dffe2fae0705d31c",
|
||||
},
|
||||
]
|
||||
}
|
|
@ -8,4 +8,47 @@ require (
|
|||
github.com/spf13/cobra v1.1.1
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect
|
||||
github.com/VictoriaMetrics/fastcache v1.6.0 // indirect
|
||||
github.com/btcsuite/btcd v0.21.0-beta // indirect
|
||||
github.com/cespare/xxhash/v2 v2.1.1 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea // indirect
|
||||
github.com/edsrzf/mmap-go v1.0.0 // indirect
|
||||
github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect
|
||||
github.com/go-ole/go-ole v1.2.1 // indirect
|
||||
github.com/go-stack/stack v1.8.0 // indirect
|
||||
github.com/golang/protobuf v1.5.2 // indirect
|
||||
github.com/golang/snappy v0.0.3 // indirect
|
||||
github.com/google/uuid v1.2.0 // indirect
|
||||
github.com/gorilla/websocket v1.4.2 // indirect
|
||||
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect
|
||||
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
|
||||
github.com/holiman/uint256 v1.2.0 // indirect
|
||||
github.com/huin/goupnp v1.0.1-0.20210626160114-33cdcbb30dda // indirect
|
||||
github.com/inconshreveable/mousetrap v1.0.0 // indirect
|
||||
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
|
||||
github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.9 // indirect
|
||||
github.com/olekukonko/tablewriter v0.0.5 // indirect
|
||||
github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/prometheus/tsdb v0.7.1 // indirect
|
||||
github.com/rjeczalik/notify v0.9.1 // indirect
|
||||
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/status-im/keycard-go v0.0.0-20200402102358-957c09536969 // indirect
|
||||
github.com/syndtr/goleveldb v1.0.1-0.20210305035536-64b5b1c73954 // indirect
|
||||
github.com/tklauser/go-sysconf v0.3.5 // indirect
|
||||
github.com/tklauser/numcpus v0.2.2 // indirect
|
||||
github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef // indirect
|
||||
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a // indirect
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
|
||||
golang.org/x/sys v0.0.0-20210917161153-d61c044b1678 // indirect
|
||||
golang.org/x/text v0.3.6 // indirect
|
||||
google.golang.org/protobuf v1.27.1 // indirect
|
||||
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
|
||||
)
|
||||
|
||||
replace github.com/certusone/wormhole/node => ../../node
|
||||
|
|
1094
clients/eth/go.sum
1094
clients/eth/go.sum
File diff suppressed because it is too large
Load Diff
|
@ -3,6 +3,9 @@ package main
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"strconv"
|
||||
|
||||
"github.com/certusone/wormhole/node/pkg/ethereum/abi"
|
||||
"github.com/certusone/wormhole/node/pkg/vaa"
|
||||
"github.com/ethereum/go-ethereum/accounts/abi/bind"
|
||||
|
@ -11,9 +14,6 @@ import (
|
|||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/ethereum/go-ethereum/ethclient"
|
||||
"github.com/spf13/cobra"
|
||||
"math"
|
||||
"os"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
// rootCmd represents the base command when called without any subcommands
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env bash
|
||||
# This script submits a VAA to devnet
|
||||
set -e
|
||||
|
||||
vaaHex=${1}
|
||||
devnetRPC=http://localhost:8545
|
||||
devnetCoreAddress=0xC89Ce4735882C9F0f0FE26686c53074E09B0D550
|
||||
key=4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d # one of the Ganche defaults
|
||||
|
||||
cd ./clients/eth
|
||||
|
||||
go run main.go execute_governance --contract=${devnetCoreAddress} --rpc=${devnetRPC} --key=${key} ${vaaHex}
|
||||
|
||||
echo "done executing_governance."
|
Loading…
Reference in New Issue