wormchain: Use wormhole-sdk package
Now that the vaa code has moved into a separate sdk package we can use it directly rather than going through the node package. This should also fix an issue where we didn't check for duplicate guardian signatures during VAA verification.
This commit is contained in:
parent
bad2b6c5c6
commit
153e92d4f4
|
@ -3,29 +3,32 @@ module github.com/wormhole-foundation/wormhole-chain
|
|||
go 1.16
|
||||
|
||||
require (
|
||||
github.com/certusone/wormhole/node v0.0.0-20211115153408-0a93202f6e5d
|
||||
github.com/cosmos/cosmos-sdk v0.45.7
|
||||
github.com/cosmos/ibc-go v1.2.2
|
||||
github.com/ethereum/go-ethereum v1.10.6
|
||||
github.com/dgraph-io/ristretto v0.1.0 // indirect
|
||||
github.com/ethereum/go-ethereum v1.10.21
|
||||
github.com/gogo/protobuf v1.3.3
|
||||
github.com/golang/glog v1.0.0 // indirect
|
||||
github.com/golang/protobuf v1.5.2
|
||||
github.com/google/btree v1.0.1 // indirect
|
||||
github.com/gorilla/mux v1.8.0
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.16.0
|
||||
github.com/holiman/uint256 v1.2.0
|
||||
github.com/spf13/cast v1.5.0
|
||||
github.com/spf13/cobra v1.5.0
|
||||
github.com/stretchr/testify v1.8.0
|
||||
github.com/tendermint/spm v0.1.9
|
||||
github.com/tendermint/tendermint v0.34.20
|
||||
github.com/tendermint/tm-db v0.6.7
|
||||
github.com/wormhole-foundation/wormhole/sdk v0.0.0-20220921004715-3103e59217da
|
||||
google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd
|
||||
google.golang.org/grpc v1.48.0
|
||||
nhooyr.io/websocket v1.8.7 // indirect
|
||||
)
|
||||
|
||||
replace (
|
||||
github.com/99designs/keyring => github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76
|
||||
github.com/cosmos/cosmos-sdk v0.45.7 => github.com/wormhole-foundation/cosmos-sdk v0.45.7-wormhole
|
||||
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
|
||||
github.com/wormhole-foundation/wormhole/sdk => ../sdk
|
||||
google.golang.org/grpc => google.golang.org/grpc v1.33.2
|
||||
)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -5,8 +5,8 @@ import (
|
|||
"context"
|
||||
"encoding/binary"
|
||||
|
||||
"github.com/certusone/wormhole/node/pkg/vaa"
|
||||
"github.com/wormhole-foundation/wormhole-chain/x/wormhole/keeper"
|
||||
"github.com/wormhole-foundation/wormhole/sdk/vaa"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/wormhole-foundation/wormhole-chain/x/tokenbridge/types"
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package types
|
||||
|
||||
import (
|
||||
"github.com/certusone/wormhole/node/pkg/vaa"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
btypes "github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||
"github.com/wormhole-foundation/wormhole-chain/x/wormhole/types"
|
||||
"github.com/wormhole-foundation/wormhole/sdk/vaa"
|
||||
)
|
||||
|
||||
type AccountKeeper interface {
|
||||
|
|
|
@ -6,12 +6,12 @@ import (
|
|||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/certusone/wormhole/node/pkg/vaa"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
|
||||
"github.com/wormhole-foundation/wormhole-chain/x/wormhole/keeper"
|
||||
"github.com/wormhole-foundation/wormhole-chain/x/wormhole/types"
|
||||
"github.com/wormhole-foundation/wormhole/sdk/vaa"
|
||||
)
|
||||
|
||||
// NewWormholeGovernanceProposalHandler creates a governance handler to manage new proposal types.
|
||||
|
|
|
@ -5,9 +5,9 @@ import (
|
|||
"context"
|
||||
"encoding/binary"
|
||||
|
||||
"github.com/certusone/wormhole/node/pkg/vaa"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/wormhole-foundation/wormhole-chain/x/wormhole/types"
|
||||
"github.com/wormhole-foundation/wormhole/sdk/vaa"
|
||||
)
|
||||
|
||||
type GovernanceAction uint8
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package keeper
|
||||
|
||||
import (
|
||||
"github.com/certusone/wormhole/node/pkg/vaa"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/wormhole-foundation/wormhole-chain/x/wormhole/types"
|
||||
"github.com/wormhole-foundation/wormhole/sdk/vaa"
|
||||
)
|
||||
|
||||
func ParseVAA(data []byte) (*vaa.VAA, error) {
|
||||
|
|
|
@ -7,12 +7,12 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/certusone/wormhole/node/pkg/vaa"
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/stretchr/testify/assert"
|
||||
keepertest "github.com/wormhole-foundation/wormhole-chain/testutil/keeper"
|
||||
"github.com/wormhole-foundation/wormhole-chain/x/wormhole/keeper"
|
||||
"github.com/wormhole-foundation/wormhole-chain/x/wormhole/types"
|
||||
"github.com/wormhole-foundation/wormhole/sdk/vaa"
|
||||
)
|
||||
|
||||
func TestCalculateQuorum(t *testing.T) {
|
||||
|
|
Loading…
Reference in New Issue