From 685622d7f2fd7f96ab0cbce2334e2ddf26b1f391 Mon Sep 17 00:00:00 2001 From: skosito Date: Fri, 15 Mar 2024 15:16:09 +0100 Subject: [PATCH 01/41] Add address tests --- common/address.go | 8 -------- common/address_test.go | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 8 deletions(-) diff --git a/common/address.go b/common/address.go index c79a4c5c9f..6a2cdd7df1 100644 --- a/common/address.go +++ b/common/address.go @@ -7,7 +7,6 @@ import ( "github.com/btcsuite/btcutil" eth "github.com/ethereum/go-ethereum/common" - "github.com/zeta-chain/zetacore/common/cosmos" ) type Address string @@ -29,10 +28,6 @@ func NewAddress(address string) Address { return NoAddress } -func (addr Address) AccAddress() (cosmos.AccAddress, error) { - return cosmos.AccAddressFromBech32(addr.String()) -} - func (addr Address) Equals(addr2 Address) bool { return strings.EqualFold(addr.String(), addr2.String()) } @@ -68,9 +63,6 @@ func DecodeBtcAddress(inputAddress string, chainID int64) (address btcutil.Addre if err != nil { return nil, err } - if chainParams == nil { - return nil, fmt.Errorf("chain params not found") - } address, err = btcutil.DecodeAddress(inputAddress, chainParams) if err != nil { return nil, fmt.Errorf("decode address failed: %s , for input address %s", err.Error(), inputAddress) diff --git a/common/address_test.go b/common/address_test.go index d39945935c..dd78dda391 100644 --- a/common/address_test.go +++ b/common/address_test.go @@ -1,6 +1,7 @@ package common import ( + "errors" "testing" "github.com/stretchr/testify/require" @@ -13,12 +14,22 @@ func TestPackage(t *testing.T) { TestingT(t) } func TestAddress(t *testing.T) { addr := NewAddress("bnb1lejrrtta9cgr49fuh7ktu3sddhe0ff7wenlpn6") require.EqualValuesf(t, NoAddress, addr, "address string should be empty") + require.True(t, addr.IsEmpty()) addr = NewAddress("bogus") require.EqualValuesf(t, NoAddress, addr, "address string should be empty") + require.True(t, addr.IsEmpty()) addr = NewAddress("0x90f2b1ae50e6018230e90a33f98c7844a0ab635a") require.EqualValuesf(t, "0x90f2b1ae50e6018230e90a33f98c7844a0ab635a", addr.String(), "address string should be equal") + require.False(t, addr.IsEmpty()) + + addr2 := NewAddress("0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5") + require.EqualValuesf(t, "0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5", addr2.String(), "address string should be equal") + require.False(t, addr.IsEmpty()) + + require.False(t, addr.Equals(addr2)) + require.True(t, addr.Equals(addr)) } func TestDecodeBtcAddress(t *testing.T) { @@ -61,3 +72,30 @@ func TestDecodeBtcAddress(t *testing.T) { require.NoError(t, err) }) } + +func TestConvertRecoverToError(t *testing.T) { + t.Run("recover with string", func(t *testing.T) { + err := ConvertRecoverToError("error occurred") + require.Error(t, err) + require.Equal(t, "error occurred", err.Error()) + }) + + t.Run("recover with error", func(t *testing.T) { + originalErr := errors.New("original error") + err := ConvertRecoverToError(originalErr) + require.Error(t, err) + require.Equal(t, originalErr, err) + }) + + t.Run("recover with non-string and non-error", func(t *testing.T) { + err := ConvertRecoverToError(12345) + require.Error(t, err) + require.Equal(t, "12345", err.Error()) + }) + + t.Run("recover with nil", func(t *testing.T) { + err := ConvertRecoverToError(nil) + require.Error(t, err) + require.Equal(t, "", err.Error()) + }) +} From 8fb2498bca470b9512c309671b080eb08a4e1d4d Mon Sep 17 00:00:00 2001 From: skosito Date: Fri, 15 Mar 2024 15:21:05 +0100 Subject: [PATCH 02/41] Add authz tx types tests --- common/authz_tx_types_test.go | 51 +++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 common/authz_tx_types_test.go diff --git a/common/authz_tx_types_test.go b/common/authz_tx_types_test.go new file mode 100644 index 0000000000..2f5fcce8b1 --- /dev/null +++ b/common/authz_tx_types_test.go @@ -0,0 +1,51 @@ +package common + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func TestTxTypeString(t *testing.T) { + tests := []struct { + name string + txType TxType + expectedString string + }{ + {"InboundVoter", InboundVoter, "InboundVoter"}, + {"OutboundVoter", OutboundVoter, "OutboundVoter"}, + {"NonceVoter", NonceVoter, "NonceVoter"}, + {"GasPriceVoter", GasPriceVoter, "GasPriceVoter"}, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + require.Equal(t, test.expectedString, test.txType.String()) + }) + } +} + +func TestKeyTypeString(t *testing.T) { + tests := []struct { + name string + keyType KeyType + expectedString string + }{ + {"TssSignerKey", TssSignerKey, "tss_signer"}, + {"ValidatorGranteeKey", ValidatorGranteeKey, "validator_grantee"}, + {"ZetaClientGranteeKey", ZetaClientGranteeKey, "zetaclient_grantee"}, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + require.Equal(t, test.expectedString, test.keyType.String()) + }) + } +} + +func TestGetAllKeyTypes(t *testing.T) { + expectedKeys := []KeyType{ValidatorGranteeKey, ZetaClientGranteeKey, TssSignerKey} + actualKeys := GetAllKeyTypes() + + require.ElementsMatch(t, expectedKeys, actualKeys) +} From 3654bcfde0db64167fac83ec92bee1ee1ac5c572 Mon Sep 17 00:00:00 2001 From: skosito Date: Fri, 15 Mar 2024 15:26:25 +0100 Subject: [PATCH 03/41] Add bitcoin tests --- common/bitcoin_test.go | 46 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 common/bitcoin_test.go diff --git a/common/bitcoin_test.go b/common/bitcoin_test.go new file mode 100644 index 0000000000..9f4c075a25 --- /dev/null +++ b/common/bitcoin_test.go @@ -0,0 +1,46 @@ +package common + +import ( + "testing" + + "github.com/btcsuite/btcd/chaincfg" + "github.com/stretchr/testify/require" +) + +func TestBitcoinNetParamsFromChainID(t *testing.T) { + tests := []struct { + name string + chainID int64 + expected *chaincfg.Params + wantErr bool + }{ + {"Regnet", BtcRegtestChain().ChainId, BitcoinRegnetParams, false}, + {"Mainnet", BtcMainnetChain().ChainId, BitcoinMainnetParams, false}, + {"Testnet", BtcTestNetChain().ChainId, BitcoinTestnetParams, false}, + {"Unknown", -1, nil, true}, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + params, err := BitcoinNetParamsFromChainID(tt.chainID) + if tt.wantErr { + require.Error(t, err) + } else { + require.NoError(t, err) + require.Equal(t, tt.expected, params) + } + }) + } +} + +func TestIsBitcoinRegnet(t *testing.T) { + require.True(t, IsBitcoinRegnet(BtcRegtestChain().ChainId)) + require.False(t, IsBitcoinRegnet(BtcMainnetChain().ChainId)) + require.False(t, IsBitcoinRegnet(BtcTestNetChain().ChainId)) +} + +func TestIsBitcoinMainnet(t *testing.T) { + require.True(t, IsBitcoinMainnet(BtcMainnetChain().ChainId)) + require.False(t, IsBitcoinMainnet(BtcRegtestChain().ChainId)) + require.False(t, IsBitcoinMainnet(BtcTestNetChain().ChainId)) +} From 1e47e3bd8bb6cbec278e267441fbacebaee69631 Mon Sep 17 00:00:00 2001 From: skosito Date: Fri, 15 Mar 2024 15:34:01 +0100 Subject: [PATCH 04/41] Add chain id tests --- common/chain_id_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/chain_id_test.go b/common/chain_id_test.go index cd4a18ca18..142162b097 100644 --- a/common/chain_id_test.go +++ b/common/chain_id_test.go @@ -41,6 +41,11 @@ func TestCosmosToEthChainID(t *testing.T) { chainID: "athens-701_2", isErr: true, }, + { + name: "invalid number format", + chainID: "cosmoshub_abc-1", + isErr: true, + }, } for _, tc := range testCases { From bc5849c9854d749b53cee2be544a71d6a5ef4302 Mon Sep 17 00:00:00 2001 From: skosito Date: Fri, 15 Mar 2024 16:20:10 +0100 Subject: [PATCH 05/41] Add tss tests --- common/tss.go | 2 -- common/tss_test.go | 81 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+), 2 deletions(-) create mode 100644 common/tss_test.go diff --git a/common/tss.go b/common/tss.go index e64f206645..2f7831ae4c 100644 --- a/common/tss.go +++ b/common/tss.go @@ -15,8 +15,6 @@ func GetTssAddrEVM(tssPubkey string) (ethcommon.Address, error) { if err != nil { return keyAddr, err } - //keyAddrBytes := pubk.EVMAddress().Bytes() - pubk.Bytes() decompresspubkey, err := crypto.DecompressPubkey(pubk.Bytes()) if err != nil { return keyAddr, err diff --git a/common/tss_test.go b/common/tss_test.go new file mode 100644 index 0000000000..661cc3569d --- /dev/null +++ b/common/tss_test.go @@ -0,0 +1,81 @@ +package common + +import ( + "testing" + + "github.com/btcsuite/btcd/chaincfg" + "github.com/cosmos/cosmos-sdk/testutil/testdata" + "github.com/stretchr/testify/require" + "github.com/zeta-chain/zetacore/common/cosmos" +) + +func TestGetTssAddrEVM(t *testing.T) { + _, pubKey, _ := testdata.KeyTestPubAddr() + pk, err := cosmos.Bech32ifyPubKey(cosmos.Bech32PubKeyTypeAccPub, pubKey) + require.NoError(t, err) + testCases := []struct { + name string + tssPubkey string + wantErr bool + }{ + { + name: "Valid TSS pubkey", + tssPubkey: pk, + wantErr: false, + }, + { + name: "Invalid TSS pubkey", + tssPubkey: "invalid", + wantErr: true, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + addr, err := GetTssAddrEVM(tc.tssPubkey) + if tc.wantErr { + require.Error(t, err) + } else { + require.NoError(t, err) + require.NotEmpty(t, addr) + } + }) + } +} + +func TestGetTssAddrBTC(t *testing.T) { + _, pubKey, _ := testdata.KeyTestPubAddr() + pk, err := cosmos.Bech32ifyPubKey(cosmos.Bech32PubKeyTypeAccPub, pubKey) + require.NoError(t, err) + testCases := []struct { + name string + tssPubkey string + bitcoinParams *chaincfg.Params + wantErr bool + }{ + { + name: "Valid TSS pubkey", + tssPubkey: pk, + bitcoinParams: &chaincfg.TestNet3Params, + wantErr: false, + }, + { + name: "Invalid TSS pubkey", + tssPubkey: "invalid", + bitcoinParams: &chaincfg.TestNet3Params, + wantErr: true, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + addr, err := GetTssAddrBTC(tc.tssPubkey, tc.bitcoinParams) + if tc.wantErr { + require.Error(t, err) + } else { + require.NoError(t, err) + require.NotEmpty(t, addr) + } + }) + } +} From 3554f4cd662b0b46acfdb368ab7f022108117266 Mon Sep 17 00:00:00 2001 From: skosito Date: Fri, 15 Mar 2024 16:52:07 +0100 Subject: [PATCH 06/41] Add utils test --- common/utils_test.go | 127 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 common/utils_test.go diff --git a/common/utils_test.go b/common/utils_test.go new file mode 100644 index 0000000000..d63cc107bd --- /dev/null +++ b/common/utils_test.go @@ -0,0 +1,127 @@ +package common + +import ( + "encoding/hex" + "testing" + + "github.com/btcsuite/btcd/chaincfg/chainhash" + ethcommon "github.com/ethereum/go-ethereum/common" + "github.com/stretchr/testify/require" +) + +func TestNonceMarkAmount(t *testing.T) { + tests := []struct { + name string + nonce uint64 + expect int64 + }{ + {"base_case", 100, 2100}, + {"zero_nonce", 0, 2000}, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + result := NonceMarkAmount(tt.nonce) + require.Equal(t, tt.expect, result) + }) + } +} + +func TestHashToString(t *testing.T) { + evmChainId := int64(5) + btcChainId := int64(8332) + unknownChainId := int64(3) + mockEthBlockHash := []byte("0xc2339489a45f8976d45482ad6fa08751a1eae91f92d60645521ca0aff2422639") + mockBtcBlockHash := []byte("00000000000000000002dcaa3853ac587d4cafdd0aa1fff45942ab5798f29afd") + expectedBtcHash, err := chainhash.NewHashFromStr("00000000000000000002dcaa3853ac587d4cafdd0aa1fff45942ab5798f29afd") + require.NoError(t, err) + + tests := []struct { + name string + chainID int64 + blockHash []byte + expect string + wantErr bool + }{ + {"evm chain", evmChainId, mockEthBlockHash, hex.EncodeToString(mockEthBlockHash), false}, + {"btc chain", btcChainId, expectedBtcHash.CloneBytes(), expectedBtcHash.String(), false}, + {"btc chain invalid hash", btcChainId, mockBtcBlockHash, "", true}, + {"unknown chain", unknownChainId, mockEthBlockHash, "", true}, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + result, err := HashToString(tt.chainID, tt.blockHash) + if tt.wantErr { + require.Error(t, err) + } else { + require.NoError(t, err) + require.Equal(t, tt.expect, result) + } + }) + } +} + +func TestStringToHash(t *testing.T) { + evmChainId := int64(5) + btcChainId := int64(8332) + unknownChainId := int64(3) + wrontBtcHash := "00000000000000000002dcaa3853ac587d4cafdd0aa1fff45942ab5798f29afd00000000000000000002dcaa3853ac587d4cafdd0aa1fff45942ab5798f29afd" + expectedBtcHash, err := chainhash.NewHashFromStr("00000000000000000002dcaa3853ac587d4cafdd0aa1fff45942ab5798f29afd") + require.NoError(t, err) + + tests := []struct { + name string + chainID int64 + hash string + expect []byte + wantErr bool + }{ + {"evm chain", evmChainId, "95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5", ethcommon.HexToHash("95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5").Bytes(), false}, + {"btc chain", btcChainId, expectedBtcHash.String(), expectedBtcHash.CloneBytes(), false}, + {"btc chain invalid hash", btcChainId, wrontBtcHash, nil, true}, + {"unknown chain", unknownChainId, "", nil, true}, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + result, err := StringToHash(tt.chainID, tt.hash) + if tt.wantErr { + require.Error(t, err) + } else { + require.NoError(t, err) + require.Equal(t, tt.expect, result) + } + }) + } +} + +func TestParseAddressAndData(t *testing.T) { + expectedShortMsgResult, err := hex.DecodeString("1a2b3c4d5e6f708192a3b4c5d6e7f808") + require.NoError(t, err) + tests := []struct { + name string + message string + expectAddr ethcommon.Address + expectData []byte + wantErr bool + }{ + {"valid msg", "95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5", ethcommon.HexToAddress("95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5"), []byte{}, false}, + {"empty msg", "", ethcommon.Address{}, nil, false}, + {"invalid hex", "invalidHex", ethcommon.Address{}, nil, true}, + {"short msg", "1a2b3c4d5e6f708192a3b4c5d6e7f808", ethcommon.Address{}, expectedShortMsgResult, false}, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + addr, data, err := ParseAddressAndData(tt.message) + if tt.wantErr { + require.Error(t, err) + } else { + require.NoError(t, err) + require.Equal(t, tt.expectAddr, addr) + require.Equal(t, tt.expectData, data) + } + }) + } +} From eff53a5965490740c5999048d8db9032467274f1 Mon Sep 17 00:00:00 2001 From: skosito Date: Fri, 15 Mar 2024 17:02:30 +0100 Subject: [PATCH 07/41] Add gas limits tests --- common/gas_limits_test.go | 56 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 common/gas_limits_test.go diff --git a/common/gas_limits_test.go b/common/gas_limits_test.go new file mode 100644 index 0000000000..ce8b1d4663 --- /dev/null +++ b/common/gas_limits_test.go @@ -0,0 +1,56 @@ +package common + +import ( + "testing" + + "cosmossdk.io/math" + "github.com/stretchr/testify/require" +) + +func TestMultiplyGasPrice(t *testing.T) { + testCases := []struct { + name string + medianGasPrice string // Using string to facilitate easy creation of sdkmath.Uint + multiplierString string + expectedGasPrice string // Expected result also as string for easy comparison + wantErr bool + }{ + { + name: "valid multiplication", + medianGasPrice: "100", + multiplierString: "1.5", + expectedGasPrice: "150", // 100 * 1.5 + wantErr: false, + }, + { + name: "invalid multiplier format", + medianGasPrice: "100", + multiplierString: "abc", + expectedGasPrice: "", + wantErr: true, + }, + { + name: "zero median price", + medianGasPrice: "0", + multiplierString: "1.5", + expectedGasPrice: "0", + wantErr: false, + }, + } + + for _, tc := range testCases { + tc := tc + t.Run(tc.name, func(t *testing.T) { + medianGasPriceUint := math.NewUintFromString(tc.medianGasPrice) + + result, err := MultiplyGasPrice(medianGasPriceUint, tc.multiplierString) + if tc.wantErr { + require.Error(t, err) + } else { + require.NoError(t, err) + expectedGasPriceUint := math.NewUintFromString(tc.expectedGasPrice) + require.True(t, result.Equal(expectedGasPriceUint)) + } + }) + } +} From 4137f915a26659a66d23fcf4dde4ac77a0086dd1 Mon Sep 17 00:00:00 2001 From: skosito Date: Fri, 15 Mar 2024 17:11:15 +0100 Subject: [PATCH 08/41] Add chains test --- common/chains_test.go | 122 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 common/chains_test.go diff --git a/common/chains_test.go b/common/chains_test.go new file mode 100644 index 0000000000..bfe1523398 --- /dev/null +++ b/common/chains_test.go @@ -0,0 +1,122 @@ +package common + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func TestChainRetrievalFunctions(t *testing.T) { + tests := []struct { + name string + function func() Chain + expected Chain + }{ + {"ZetaChainMainnet", ZetaChainMainnet, Chain{ChainName: ChainName_zeta_mainnet, ChainId: 7000}}, + {"ZetaTestnetChain", ZetaTestnetChain, Chain{ChainName: ChainName_zeta_testnet, ChainId: 7001}}, + {"ZetaMocknetChain", ZetaMocknetChain, Chain{ChainName: ChainName_zeta_mainnet, ChainId: 70000}}, + {"ZetaPrivnetChain", ZetaPrivnetChain, Chain{ChainName: ChainName_zeta_mainnet, ChainId: 101}}, + {"EthChain", EthChain, Chain{ChainName: ChainName_eth_mainnet, ChainId: 1}}, + {"BscMainnetChain", BscMainnetChain, Chain{ChainName: ChainName_bsc_mainnet, ChainId: 56}}, + {"BtcMainnetChain", BtcMainnetChain, Chain{ChainName: ChainName_btc_mainnet, ChainId: 8332}}, + {"PolygonChain", PolygonChain, Chain{ChainName: ChainName_polygon_mainnet, ChainId: 137}}, + {"SepoliaChain", SepoliaChain, Chain{ChainName: ChainName_sepolia_testnet, ChainId: 11155111}}, + {"GoerliChain", GoerliChain, Chain{ChainName: ChainName_goerli_testnet, ChainId: 5}}, + {"BscTestnetChain", BscTestnetChain, Chain{ChainName: ChainName_bsc_testnet, ChainId: 97}}, + {"BtcTestNetChain", BtcTestNetChain, Chain{ChainName: ChainName_btc_testnet, ChainId: 18332}}, + {"MumbaiChain", MumbaiChain, Chain{ChainName: ChainName_mumbai_testnet, ChainId: 80001}}, + {"BtcRegtestChain", BtcRegtestChain, Chain{ChainName: ChainName_btc_regtest, ChainId: 18444}}, + {"GoerliLocalnetChain", GoerliLocalnetChain, Chain{ChainName: ChainName_goerli_localnet, ChainId: 1337}}, + } + + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + chain := tc.function() + require.Equal(t, tc.expected, chain) + }) + } +} + +func TestChainListFunctions(t *testing.T) { + listTests := []struct { + name string + function func() []*Chain + expected []Chain + }{ + {"DefaultChainsList", DefaultChainsList, []Chain{BtcMainnetChain(), BscMainnetChain(), EthChain(), BtcTestNetChain(), MumbaiChain(), BscTestnetChain(), GoerliChain(), SepoliaChain(), BtcRegtestChain(), GoerliLocalnetChain(), ZetaChainMainnet(), ZetaTestnetChain(), ZetaMocknetChain(), ZetaPrivnetChain()}}, + {"MainnetChainList", MainnetChainList, []Chain{ZetaChainMainnet(), BtcMainnetChain(), BscMainnetChain(), EthChain()}}, + {"TestnetChainList", TestnetChainList, []Chain{ZetaTestnetChain(), BtcTestNetChain(), MumbaiChain(), BscTestnetChain(), GoerliChain(), SepoliaChain()}}, + {"PrivnetChainList", PrivnetChainList, []Chain{ZetaPrivnetChain(), BtcRegtestChain(), GoerliLocalnetChain()}}, + {"ExternalChainList", ExternalChainList, []Chain{BtcMainnetChain(), BscMainnetChain(), EthChain(), BtcTestNetChain(), MumbaiChain(), BscTestnetChain(), GoerliChain(), SepoliaChain(), BtcRegtestChain(), GoerliLocalnetChain()}}, + {"ZetaChainList", ZetaChainList, []Chain{ZetaChainMainnet(), ZetaTestnetChain(), ZetaMocknetChain(), ZetaPrivnetChain()}}, + } + + for _, lt := range listTests { + t.Run(lt.name, func(t *testing.T) { + chains := lt.function() + require.Equal(t, len(lt.expected), len(chains)) + for i, expectedChain := range lt.expected { + require.Equal(t, &expectedChain, chains[i]) + } + }) + } +} + +func TestZetaChainFromChainID(t *testing.T) { + tests := []struct { + name string + chainID string + expected Chain + wantErr bool + }{ + { + name: "ZetaChainMainnet", + chainID: "cosmoshub_7000-1", + expected: ZetaChainMainnet(), + wantErr: false, + }, + { + name: "ZetaTestnetChain", + chainID: "cosmoshub_7001-1", + expected: ZetaTestnetChain(), + wantErr: false, + }, + { + name: "ZetaMocknetChain", + chainID: "cosmoshub_70000-1", + expected: ZetaMocknetChain(), + wantErr: false, + }, + { + name: "ZetaPrivnetChain", + chainID: "cosmoshub_101-1", + expected: ZetaPrivnetChain(), + wantErr: false, + }, + { + name: "unknown chain", + chainID: "cosmoshub_1234-1", + expected: Chain{}, + wantErr: true, + }, + { + name: "invalid chain id", + chainID: "cosmoshub_abc-1", + expected: Chain{}, + wantErr: true, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + result, err := ZetaChainFromChainID(tt.chainID) + if tt.wantErr { + require.Error(t, err) + require.Equal(t, Chain{}, result) + } else { + require.NoError(t, err) + require.Equal(t, tt.expected, result) + } + }) + } +} From 9bf4e327d74d78fee5ce4d25da1d3cce19eeac17 Mon Sep 17 00:00:00 2001 From: skosito Date: Fri, 15 Mar 2024 17:27:01 +0100 Subject: [PATCH 09/41] Add coin tests --- common/coin.go | 5 +--- common/coin_test.go | 64 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 4 deletions(-) diff --git a/common/coin.go b/common/coin.go index b05a6d3cec..e2b4e0d44e 100644 --- a/common/coin.go +++ b/common/coin.go @@ -24,9 +24,6 @@ func GetAzetaDecFromAmountInZeta(zetaAmount string) (sdk.Dec, error) { if err != nil { return sdk.Dec{}, err } - zetaToAzetaConvertionFactor, err := sdk.NewDecFromStr("1000000000000000000") - if err != nil { - return sdk.Dec{}, err - } + zetaToAzetaConvertionFactor := sdk.NewDecFromInt(sdk.NewInt(1000000000000000000)) return zetaDec.Mul(zetaToAzetaConvertionFactor), nil } diff --git a/common/coin_test.go b/common/coin_test.go index 4adfbc2d8d..b43feb8f24 100644 --- a/common/coin_test.go +++ b/common/coin_test.go @@ -63,3 +63,67 @@ func Test_GetAzetaDecFromAmountInZeta(t *testing.T) { } } + +func TestGetCoinType(t *testing.T) { + tests := []struct { + name string + coin string + want common.CoinType + wantErr bool + }{ + { + name: "valid coin type 0", + coin: "0", + want: common.CoinType(0), + wantErr: false, + }, + { + name: "valid coin type 1", + coin: "1", + want: common.CoinType(1), + wantErr: false, + }, + { + name: "valid coin type 2", + coin: "2", + want: common.CoinType(2), + wantErr: false, + }, + { + name: "valid coin type 3", + coin: "3", + want: common.CoinType(3), + wantErr: false, + }, + { + name: "invalid coin type negative", + coin: "-1", + want: common.CoinType_Cmd, + wantErr: true, + }, + { + name: "invalid coin type large number", + coin: "4", + want: common.CoinType_Cmd, + wantErr: true, + }, + { + name: "invalid coin type non-integer", + coin: "abc", + want: common.CoinType_Cmd, + wantErr: true, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := common.GetCoinType(tt.coin) + if tt.wantErr { + require.Error(t, err) + } else { + require.NoError(t, err) + require.Equal(t, tt.want, got) + } + }) + } +} From 8f6300917a4bcc4ad97b64915e7044d41d4158af Mon Sep 17 00:00:00 2001 From: skosito Date: Fri, 15 Mar 2024 18:24:46 +0100 Subject: [PATCH 10/41] Increase headers test coverage --- common/headers_test.go | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/common/headers_test.go b/common/headers_test.go index db0bc002d4..0e37dc1329 100644 --- a/common/headers_test.go +++ b/common/headers_test.go @@ -32,7 +32,7 @@ func generateHeader() { } func TestTrueEthereumHeader(t *testing.T) { - generateHeader() + // generateHeader() var header ethtypes.Header // read file into a byte slice file, err := os.Open("./testdata/eth_header_18495266.json") @@ -50,6 +50,13 @@ func TestTrueEthereumHeader(t *testing.T) { headerData := common.NewEthereumHeader(buffer.Bytes()) err = headerData.Validate(header.Hash().Bytes(), 1, 18495266) require.NoError(t, err) + + parentHash, err := headerData.ParentHash() + require.NoError(t, err) + require.Equal(t, header.ParentHash.Bytes(), parentHash) + + err = headerData.ValidateTimestamp(time.Now()) + require.NoError(t, err) } func TestFalseEthereumHeader(t *testing.T) { @@ -103,6 +110,20 @@ func TestFakeBitcoinHeader(t *testing.T) { } } +func TestNonExistentHeaderType(t *testing.T) { + headerData := common.HeaderData{} + + err := headerData.Validate([]byte{}, 18332, 0) + require.EqualError(t, err, "unrecognized header type") + + parentHash, err := headerData.ParentHash() + require.EqualError(t, err, "unrecognized header type") + require.Nil(t, parentHash) + + err = headerData.ValidateTimestamp(time.Now()) + require.ErrorContains(t, err, "unrecognized header type") +} + func BitcoinHeaderValidationLiveTest(t *testing.T) { client := createBTCClient(t) bn, err := client.GetBlockCount() @@ -174,13 +195,18 @@ func unmarshalHeader(t *testing.T, headerBytes []byte) *wire.BlockHeader { func validateTrueBitcoinHeader(t *testing.T, header *wire.BlockHeader, headerBytes []byte) { blockHash := header.BlockHash() + headerData := common.NewBitcoinHeader(headerBytes) // True Bitcoin header should pass validation - err := common.ValidateBitcoinHeader(headerBytes, blockHash[:], 18332) + err := headerData.Validate(blockHash[:], 18332, 0) require.NoError(t, err) // True Bitcoin header should pass timestamp validation - err = common.NewBitcoinHeader(headerBytes).ValidateTimestamp(time.Now()) + err = headerData.ValidateTimestamp(time.Now()) + require.NoError(t, err) + + parentHash, err := headerData.ParentHash() require.NoError(t, err) + require.Equal(t, header.PrevBlock.CloneBytes(), parentHash) } func validateFakeBitcoinHeader(t *testing.T, header *wire.BlockHeader, headerBytes []byte) { From 37f4c25ae003ad530bb14103dc936ebaebc3a7a6 Mon Sep 17 00:00:00 2001 From: skosito Date: Fri, 15 Mar 2024 20:12:57 +0100 Subject: [PATCH 11/41] Increase eth proofs test coverage --- common/ethereum/proof_test.go | 104 +++++++++++++++++++++++++++------- 1 file changed, 85 insertions(+), 19 deletions(-) diff --git a/common/ethereum/proof_test.go b/common/ethereum/proof_test.go index 257a9ab26e..a7193931ce 100644 --- a/common/ethereum/proof_test.go +++ b/common/ethereum/proof_test.go @@ -31,31 +31,97 @@ func TestProofGeneration(t *testing.T) { receiptTree := NewTrie(receipts) require.EqualValues(t, header.ReceiptHash.Hex(), header.ReceiptHash.Hex()) - for i, receipt := range receipts { - // generate a proof for each receipt and verify it - proof, err := receiptTree.GenerateProof(i) + t.Run("generate proof for receipts", func(t *testing.T) { + for i, receipt := range receipts { + // generate a proof for each receipt and verify it + proof, err := receiptTree.GenerateProof(i) + require.NoError(t, err) + + verified, err := proof.Verify(header.ReceiptHash, i) + require.NoError(t, err) + + // recover the receipt from the proof and compare it with the original receipt + // NOTE: eth receipts only hashes the following fields + // data := &receiptRLP{r.statusEncoding(), r.CumulativeGasUsed, r.Bloom, r.Logs} + var verifiedReceipt types.Receipt + err = verifiedReceipt.UnmarshalBinary(verified) + require.NoError(t, err) + require.EqualValues(t, receipt.Status, verifiedReceipt.Status) + require.EqualValues(t, receipt.CumulativeGasUsed, verifiedReceipt.CumulativeGasUsed) + require.EqualValues(t, receipt.Bloom.Bytes(), verifiedReceipt.Bloom.Bytes()) + require.EqualValues(t, len(receipt.Logs), len(verifiedReceipt.Logs)) + for i, log := range receipt.Logs { + require.EqualValues(t, log.Address, verifiedReceipt.Logs[i].Address) + require.EqualValues(t, log.Topics, verifiedReceipt.Logs[i].Topics) + require.EqualValues(t, log.Data, verifiedReceipt.Logs[i].Data) + } + } + }) + + t.Run("should not generate proof for negative tx index", func(t *testing.T) { + proof, err := receiptTree.GenerateProof(-1) + require.Error(t, err) + require.Nil(t, proof) + }) + + t.Run("has key", func(t *testing.T) { + proof, err := receiptTree.GenerateProof(0) require.NoError(t, err) + require.Greater(t, len(proof.Keys), 0) - verified, err := proof.Verify(header.ReceiptHash, i) + proof2, err := receiptTree.GenerateProof(1) require.NoError(t, err) + require.Equal(t, len(proof2.Keys), 3) - // recover the receipt from the proof and compare it with the original receipt - // NOTE: eth receipts only hashes the following fields - // data := &receiptRLP{r.statusEncoding(), r.CumulativeGasUsed, r.Bloom, r.Logs} - var verifiedReceipt types.Receipt - err = verifiedReceipt.UnmarshalBinary(verified) + key := proof.Keys[0] + has, err := proof.Has(key) require.NoError(t, err) - require.EqualValues(t, receipt.Status, verifiedReceipt.Status) - require.EqualValues(t, receipt.CumulativeGasUsed, verifiedReceipt.CumulativeGasUsed) - require.EqualValues(t, receipt.Bloom.Bytes(), verifiedReceipt.Bloom.Bytes()) - require.EqualValues(t, len(receipt.Logs), len(verifiedReceipt.Logs)) - for i, log := range receipt.Logs { - require.EqualValues(t, log.Address, verifiedReceipt.Logs[i].Address) - require.EqualValues(t, log.Topics, verifiedReceipt.Logs[i].Topics) - require.EqualValues(t, log.Data, verifiedReceipt.Logs[i].Data) - } - } + require.True(t, has) + + key2 := proof2.Keys[2] + has, err = proof.Has(key2) + require.NoError(t, err) + require.False(t, has) + }) + + t.Run("get key", func(t *testing.T) { + proof, err := receiptTree.GenerateProof(0) + require.NoError(t, err) + require.Greater(t, len(proof.Keys), 0) + + proof2, err := receiptTree.GenerateProof(1) + require.NoError(t, err) + require.Equal(t, len(proof2.Keys), 3) + + key := proof.Keys[0] + _, err = proof.Get(key) + require.NoError(t, err) + + key2 := proof2.Keys[2] + _, err = proof.Get(key2) + require.Error(t, err) + }) + + t.Run("delete key", func(t *testing.T) { + proof, err := receiptTree.GenerateProof(0) + require.NoError(t, err) + require.Greater(t, len(proof.Keys), 0) + + proof2, err := receiptTree.GenerateProof(1) + require.NoError(t, err) + require.Equal(t, len(proof2.Keys), 3) + + key := proof.Keys[0] + err = proof.Delete(key) + require.NoError(t, err) + + err = proof.Delete(key) + require.Error(t, err) + key2 := proof2.Keys[2] + err = proof.Delete(key2) + require.Error(t, err) + }) } // readHeader reads a header from a file. From ff132dcafe7e7a406dee78685024992c53fe869a Mon Sep 17 00:00:00 2001 From: skosito Date: Fri, 15 Mar 2024 20:50:09 +0100 Subject: [PATCH 12/41] Add more chain tests --- common/chain_test.go | 139 +++++++++++++++++++++++++++++++++++++++++ common/headers_test.go | 2 +- 2 files changed, 140 insertions(+), 1 deletion(-) diff --git a/common/chain_test.go b/common/chain_test.go index f0e3c1ceed..50c8a700aa 100644 --- a/common/chain_test.go +++ b/common/chain_test.go @@ -3,6 +3,7 @@ package common import ( "testing" + "github.com/btcsuite/btcd/chaincfg" "github.com/stretchr/testify/require" ) @@ -56,3 +57,141 @@ func TestChain_InChainList(t *testing.T) { require.True(t, ZetaTestnetChain().InChainList(ZetaChainList())) require.False(t, EthChain().InChainList(ZetaChainList())) } + +func TestIsZetaChain(t *testing.T) { + tests := []struct { + name string + chainID int64 + want bool + }{ + {"Zeta Mainnet", ZetaChainMainnet().ChainId, true}, + {"Zeta Testnet", ZetaTestnetChain().ChainId, true}, + {"Zeta Mocknet", ZetaMocknetChain().ChainId, true}, + {"Zeta Privnet", ZetaPrivnetChain().ChainId, true}, + {"Non-Zeta", EthChain().ChainId, false}, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + require.Equal(t, tt.want, IsZetaChain(tt.chainID)) + }) + } +} + +func TestIsEVMChain(t *testing.T) { + tests := []struct { + name string + chainID int64 + want bool + }{ + {"Ethereum Mainnet", EthChain().ChainId, true}, + {"Goerli Testnet", GoerliChain().ChainId, true}, + {"Sepolia Testnet", SepoliaChain().ChainId, true}, + {"Non-EVM", BtcMainnetChain().ChainId, false}, + {"Zeta Mainnet", ZetaChainMainnet().ChainId, false}, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + require.Equal(t, tt.want, IsEVMChain(tt.chainID)) + }) + } +} + +func TestIsBitcoinChain(t *testing.T) { + tests := []struct { + name string + chainID int64 + want bool + }{ + {"Bitcoin Mainnet", BtcMainnetChain().ChainId, true}, + {"Bitcoin Testnet", BtcTestNetChain().ChainId, true}, + {"Bitcoin Regtest", BtcRegtestChain().ChainId, true}, + {"Non-Bitcoin", EthChain().ChainId, false}, + {"Zeta Mainnet", ZetaChainMainnet().ChainId, false}, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + require.Equal(t, tt.want, IsBitcoinChain(tt.chainID)) + }) + } +} + +func TestIsEthereumChain(t *testing.T) { + tests := []struct { + name string + chainID int64 + want bool + }{ + {"Ethereum Mainnet", EthChain().ChainId, true}, + {"Goerli Testnet", GoerliChain().ChainId, true}, + {"Sepolia Testnet", SepoliaChain().ChainId, true}, + {"Non-Ethereum", BtcMainnetChain().ChainId, false}, + {"Zeta Mainnet", ZetaChainMainnet().ChainId, false}, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + require.Equal(t, tt.want, IsEthereumChain(tt.chainID)) + }) + } +} + +func TestChain_IsExternalChain(t *testing.T) { + require.False(t, ZetaChainMainnet().IsExternalChain()) + require.True(t, EthChain().IsExternalChain()) +} + +func TestChain_IsEmpty(t *testing.T) { + require.True(t, Chain{}.IsEmpty()) + require.False(t, ZetaChainMainnet().IsEmpty()) +} + +func TestChains_Has(t *testing.T) { + chains := Chains{ZetaChainMainnet(), ZetaTestnetChain()} + require.True(t, chains.Has(ZetaChainMainnet())) + require.False(t, chains.Has(EthChain())) +} + +func TestChains_Distinct(t *testing.T) { + chains := Chains{ZetaChainMainnet(), ZetaChainMainnet(), ZetaTestnetChain()} + distinctChains := chains.Distinct() + require.Len(t, distinctChains, 2) +} + +func TestChains_Strings(t *testing.T) { + chains := Chains{ZetaChainMainnet(), ZetaTestnetChain()} + strings := chains.Strings() + expected := []string{chains[0].String(), chains[1].String()} + require.Equal(t, expected, strings) +} + +func TestGetChainFromChainID(t *testing.T) { + chain := GetChainFromChainID(ZetaChainMainnet().ChainId) + require.Equal(t, ZetaChainMainnet(), *chain) + require.Nil(t, GetChainFromChainID(9999)) +} + +func TestGetBTCChainParams(t *testing.T) { + params, err := GetBTCChainParams(BtcMainnetChain().ChainId) + require.NoError(t, err) + require.Equal(t, &chaincfg.MainNetParams, params) + + _, err = GetBTCChainParams(9999) + require.Error(t, err) +} + +func TestGetBTCChainIDFromChainParams(t *testing.T) { + chainID, err := GetBTCChainIDFromChainParams(&chaincfg.MainNetParams) + require.NoError(t, err) + require.Equal(t, int64(8332), chainID) + + _, err = GetBTCChainIDFromChainParams(&chaincfg.Params{Name: "unknown"}) + require.Error(t, err) +} + +func TestChainIDInChainList(t *testing.T) { + require.True(t, ChainIDInChainList(ZetaChainMainnet().ChainId, ZetaChainList())) + require.False(t, ChainIDInChainList(EthChain().ChainId, ZetaChainList())) +} diff --git a/common/headers_test.go b/common/headers_test.go index 0e37dc1329..49e14dea29 100644 --- a/common/headers_test.go +++ b/common/headers_test.go @@ -32,7 +32,7 @@ func generateHeader() { } func TestTrueEthereumHeader(t *testing.T) { - // generateHeader() + generateHeader() var header ethtypes.Header // read file into a byte slice file, err := os.Open("./testdata/eth_header_18495266.json") From 2b2cbb1379fb2d6ff632e9c8a7a537dff8528855 Mon Sep 17 00:00:00 2001 From: skosito Date: Mon, 18 Mar 2024 15:18:15 +0100 Subject: [PATCH 13/41] Add more pubkey tests --- common/pubkey.go | 33 ---------- common/pubkey_test.go | 144 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+), 33 deletions(-) diff --git a/common/pubkey.go b/common/pubkey.go index db3af5bc54..a149661d9c 100644 --- a/common/pubkey.go +++ b/common/pubkey.go @@ -10,13 +10,10 @@ import ( secp256k1 "github.com/btcsuite/btcd/btcec/v2" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/btcsuite/btcutil/bech32" - "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/keyring" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" eth "github.com/ethereum/go-ethereum/crypto" - "github.com/tendermint/tendermint/crypto" "github.com/zeta-chain/zetacore/common/cosmos" ) @@ -58,19 +55,6 @@ func NewPubKey(key string) (PubKey, error) { return PubKey(key), nil } -// NewPubKeyFromCrypto -func NewPubKeyFromCrypto(pk crypto.PubKey) (PubKey, error) { - tmp, err := codec.FromTmPubKeyInterface(pk) - if err != nil { - return EmptyPubKey, fmt.Errorf("fail to create PubKey from crypto.PubKey,err:%w", err) - } - s, err := cosmos.Bech32ifyPubKey(cosmos.Bech32PubKeyTypeAccPub, tmp) - if err != nil { - return EmptyPubKey, fmt.Errorf("fail to create PubKey from crypto.PubKey,err:%w", err) - } - return PubKey(s), nil -} - // Equals check whether two are the same func (pubKey PubKey) Equals(pubKey1 PubKey) bool { return pubKey == pubKey1 @@ -114,14 +98,6 @@ func (pubKey PubKey) GetEVMAddress() (Address, error) { return NewAddress(str), nil } -func (pubKey PubKey) GetZetaAddress() (cosmos.AccAddress, error) { - addr, err := pubKey.GetEVMAddress() - if err != nil { - return nil, err - } - return cosmos.AccAddressFromBech32(addr.String()) -} - // MarshalJSON to Marshals to JSON using Bech32 func (pubKey PubKey) MarshalJSON() ([]byte, error) { return json.Marshal(pubKey.String()) @@ -199,15 +175,6 @@ func (pks PubKeys) Strings() []string { return allStrings } -// ConvertAndEncode converts from a base64 encoded byte string to hex or base32 encoded byte string and then to bech32 -func ConvertAndEncode(hrp string, data []byte) (string, error) { - converted, err := bech32.ConvertBits(data, 8, 5, true) - if err != nil { - return "", fmt.Errorf("encoding bech32 failed,%w", err) - } - return bech32.Encode(hrp, converted) -} - // NewPubKeySet create a new instance of PubKeySet , which contains two keys func NewPubKeySet(secp256k1, ed25519 PubKey) PubKeySet { return PubKeySet{ diff --git a/common/pubkey_test.go b/common/pubkey_test.go index 9b7b0c5ffd..713cb35167 100644 --- a/common/pubkey_test.go +++ b/common/pubkey_test.go @@ -5,12 +5,14 @@ import ( "encoding/json" "fmt" "os" + "testing" "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/testutil/testdata" "github.com/tendermint/tendermint/crypto/secp256k1" . "gopkg.in/check.v1" + "github.com/stretchr/testify/require" "github.com/zeta-chain/zetacore/common/cosmos" ) @@ -190,3 +192,145 @@ func (s *PubKeyTestSuite) TestEquals(c *C) { pk1, pk2, pk3, pk4, }), Equals, true) } + +func TestNewPubKey(t *testing.T) { + t.Run("should create new pub key from string", func(t *testing.T) { + _, pubKey, _ := testdata.KeyTestPubAddr() + spk, err := cosmos.Bech32ifyPubKey(cosmos.Bech32PubKeyTypeAccPub, pubKey) + require.Nil(t, err) + pk, err := NewPubKey(spk) + require.Nil(t, err) + require.Equal(t, PubKey(spk), pk) + }) + + t.Run("should return empty pub key from empty string", func(t *testing.T) { + pk, err := NewPubKey("") + require.Nil(t, err) + require.Equal(t, EmptyPubKey, pk) + }) + + t.Run("should fail if not bech32 encoded string", func(t *testing.T) { + pk, err := NewPubKey("invalid") + require.Error(t, err) + require.Equal(t, EmptyPubKey, pk) + }) +} + +func TestGetAddressFromPubkeyString(t *testing.T) { + t.Run("should get address from pubkey string", func(t *testing.T) { + _, pubKey, _ := testdata.KeyTestPubAddr() + spk, err := cosmos.Bech32ifyPubKey(cosmos.Bech32PubKeyTypeAccPub, pubKey) + require.Nil(t, err) + _, err = GetAddressFromPubkeyString(spk) + require.Nil(t, err) + }) + + t.Run("should get address from nonbech32 string", func(t *testing.T) { + _, err := GetAddressFromPubkeyString("invalid") + require.Error(t, err) + }) +} + +func TestPubKeys(t *testing.T) { + t.Run("should valid if all are valid", func(t *testing.T) { + _, pubKey1, _ := testdata.KeyTestPubAddr() + spk1, _ := cosmos.Bech32ifyPubKey(cosmos.Bech32PubKeyTypeAccPub, pubKey1) + pk1, _ := NewPubKey(spk1) + + _, pubKey2, _ := testdata.KeyTestPubAddr() + spk2, _ := cosmos.Bech32ifyPubKey(cosmos.Bech32PubKeyTypeAccPub, pubKey2) + pk2, _ := NewPubKey(spk2) + + _, pubKey3, _ := testdata.KeyTestPubAddr() + spk3, _ := cosmos.Bech32ifyPubKey(cosmos.Bech32PubKeyTypeAccPub, pubKey3) + pk3, _ := NewPubKey(spk3) + + pubKeys := PubKeys{ + pk1, pk2, pk3, + } + + require.Nil(t, pubKeys.Valid()) + }) + + t.Run("should invalid if one is invalid", func(t *testing.T) { + _, pubKey1, _ := testdata.KeyTestPubAddr() + spk1, _ := cosmos.Bech32ifyPubKey(cosmos.Bech32PubKeyTypeAccPub, pubKey1) + pk1, _ := NewPubKey(spk1) + + _, pubKey2, _ := testdata.KeyTestPubAddr() + spk2, _ := cosmos.Bech32ifyPubKey(cosmos.Bech32PubKeyTypeAccPub, pubKey2) + pk2, _ := NewPubKey(spk2) + + _, pubKey3, _ := testdata.KeyTestPubAddr() + spk3, _ := cosmos.Bech32ifyPubKey(cosmos.Bech32PubKeyTypeAccPub, pubKey3) + pk3, _ := NewPubKey(spk3) + + pubKeys := PubKeys{ + pk1, pk2, pk3, PubKey("invalid"), + } + + require.NotNil(t, pubKeys.Valid()) + }) + + t.Run("contains", func(t *testing.T) { + _, pubKey1, _ := testdata.KeyTestPubAddr() + spk1, _ := cosmos.Bech32ifyPubKey(cosmos.Bech32PubKeyTypeAccPub, pubKey1) + pk1, _ := NewPubKey(spk1) + + _, pubKey2, _ := testdata.KeyTestPubAddr() + spk2, _ := cosmos.Bech32ifyPubKey(cosmos.Bech32PubKeyTypeAccPub, pubKey2) + pk2, _ := NewPubKey(spk2) + + _, pubKey3, _ := testdata.KeyTestPubAddr() + spk3, _ := cosmos.Bech32ifyPubKey(cosmos.Bech32PubKeyTypeAccPub, pubKey3) + pk3, _ := NewPubKey(spk3) + + pubKeys := PubKeys{ + pk1, pk2, + } + + require.True(t, pubKeys.Contains(pk1)) + require.True(t, pubKeys.Contains(pk2)) + require.False(t, pubKeys.Contains(pk3)) + }) + + t.Run("should concat string", func(t *testing.T) { + _, pubKey1, _ := testdata.KeyTestPubAddr() + spk1, _ := cosmos.Bech32ifyPubKey(cosmos.Bech32PubKeyTypeAccPub, pubKey1) + pk1, _ := NewPubKey(spk1) + + _, pubKey2, _ := testdata.KeyTestPubAddr() + spk2, _ := cosmos.Bech32ifyPubKey(cosmos.Bech32PubKeyTypeAccPub, pubKey2) + pk2, _ := NewPubKey(spk2) + + _, pubKey3, _ := testdata.KeyTestPubAddr() + spk3, _ := cosmos.Bech32ifyPubKey(cosmos.Bech32PubKeyTypeAccPub, pubKey3) + pk3, _ := NewPubKey(spk3) + + pubKeys := PubKeys{ + pk1, pk2, pk3, + } + + require.Equal(t, fmt.Sprintf("%s, %s, %s", pk1.String(), pk2.String(), pk3.String()), pubKeys.String()) + }) + + t.Run("should return strings array", func(t *testing.T) { + _, pubKey1, _ := testdata.KeyTestPubAddr() + spk1, _ := cosmos.Bech32ifyPubKey(cosmos.Bech32PubKeyTypeAccPub, pubKey1) + pk1, _ := NewPubKey(spk1) + + _, pubKey2, _ := testdata.KeyTestPubAddr() + spk2, _ := cosmos.Bech32ifyPubKey(cosmos.Bech32PubKeyTypeAccPub, pubKey2) + pk2, _ := NewPubKey(spk2) + + _, pubKey3, _ := testdata.KeyTestPubAddr() + spk3, _ := cosmos.Bech32ifyPubKey(cosmos.Bech32PubKeyTypeAccPub, pubKey3) + pk3, _ := NewPubKey(spk3) + + pubKeys := PubKeys{ + pk1, pk2, pk3, + } + + require.Equal(t, []string{pk1.String(), pk2.String(), pk3.String()}, pubKeys.Strings()) + }) +} From 73856dec854f9991e71ba7013e9feca50d158e5d Mon Sep 17 00:00:00 2001 From: skosito Date: Mon, 18 Mar 2024 15:37:06 +0100 Subject: [PATCH 14/41] Add more chain tests --- common/chain.go | 7 --- common/chain_test.go | 142 +++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 136 insertions(+), 13 deletions(-) diff --git a/common/chain.go b/common/chain.go index 8f02baa388..20386e2a09 100644 --- a/common/chain.go +++ b/common/chain.go @@ -9,13 +9,6 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" ) -// ParseChainName returns the ChainName from a string -// if no such name exists, returns the empty chain name: ChainName_empty -func ParseChainName(chain string) ChainName { - c := ChainName_value[chain] - return ChainName(c) -} - type SigninAlgo string // Chains represent a slice of Chain diff --git a/common/chain_test.go b/common/chain_test.go index 50c8a700aa..8bf1ffccb3 100644 --- a/common/chain_test.go +++ b/common/chain_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/btcsuite/btcd/chaincfg" + ethcommon "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" ) @@ -16,7 +17,7 @@ func TestChain_EncodeAddress(t *testing.T) { wantErr bool }{ { - name: "should error if b is not a valid address on the network", + name: "should error if b is not a valid address on the bitcoin network", chain: Chain{ ChainName: ChainName_btc_testnet, ChainId: 18332, @@ -26,15 +27,35 @@ func TestChain_EncodeAddress(t *testing.T) { wantErr: true, }, { - name: "should pass if b is a valid address on the network", + name: "should error if b is not a valid address on the evm network", chain: Chain{ - ChainName: ChainName_btc_mainnet, - ChainId: 8332, + ChainName: ChainName_goerli_testnet, + ChainId: 5, }, - b: []byte("bc1qk0cc73p8m7hswn8y2q080xa4e5pxapnqgp7h9c"), - want: "bc1qk0cc73p8m7hswn8y2q080xa4e5pxapnqgp7h9c", + b: ethcommon.Hex2Bytes("0x321"), + want: "", + wantErr: true, + }, + { + name: "should pass if b is a valid address on the evm network", + chain: Chain{ + ChainName: ChainName_goerli_testnet, + ChainId: 5, + }, + b: []byte("0x321"), + want: "0x0000000000000000000000000000003078333231", wantErr: false, }, + { + name: "should error if chain not supported", + chain: Chain{ + ChainName: 999, + ChainId: 999, + }, + b: ethcommon.Hex2Bytes("0x321"), + want: "", + wantErr: true, + }, } for _, tc := range tests { @@ -50,6 +71,59 @@ func TestChain_EncodeAddress(t *testing.T) { } } +func TestChain_DecodeAddress(t *testing.T) { + tests := []struct { + name string + chain Chain + b string + want []byte + wantErr bool + }{ + { + name: "should decode on btc chain", + chain: Chain{ + ChainName: ChainName_btc_testnet, + ChainId: 18332, + }, + want: []byte("bc1qk0cc73p8m7hswn8y2q080xa4e5pxapnqgp7h9c"), + b: "bc1qk0cc73p8m7hswn8y2q080xa4e5pxapnqgp7h9c", + wantErr: false, + }, + { + name: "should decode on evm chain", + chain: Chain{ + ChainName: ChainName_goerli_testnet, + ChainId: 5, + }, + want: ethcommon.HexToAddress("0x321").Bytes(), + b: "0x321", + wantErr: false, + }, + { + name: "should error if chain not supported", + chain: Chain{ + ChainName: 999, + ChainId: 999, + }, + want: ethcommon.Hex2Bytes("0x321"), + b: "", + wantErr: true, + }, + } + + for _, tc := range tests { + tc := tc + t.Run(tc.name, func(t *testing.T) { + s, err := tc.chain.DecodeAddress(tc.b) + if tc.wantErr { + require.Error(t, err) + return + } + require.Equal(t, tc.want, s) + }) + } +} + func TestChain_InChainList(t *testing.T) { require.True(t, ZetaChainMainnet().InChainList(ZetaChainList())) require.True(t, ZetaMocknetChain().InChainList(ZetaChainList())) @@ -98,6 +172,49 @@ func TestIsEVMChain(t *testing.T) { } } +func TestIsHeaderSupportedEVMChain(t *testing.T) { + tests := []struct { + name string + chainID int64 + want bool + }{ + {"Ethereum Mainnet", EthChain().ChainId, true}, + {"Goerli Testnet", GoerliChain().ChainId, true}, + {"Goerli Localnet", GoerliLocalnetChain().ChainId, true}, + {"Sepolia Testnet", SepoliaChain().ChainId, true}, + {"BSC Testnet", BscTestnetChain().ChainId, true}, + {"BSC Mainnet", BscMainnetChain().ChainId, true}, + {"Non-EVM", BtcMainnetChain().ChainId, false}, + {"Zeta Mainnet", ZetaChainMainnet().ChainId, false}, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + require.Equal(t, tt.want, IsHeaderSupportedEvmChain(tt.chainID)) + }) + } +} + +func TestSupportMerkleProof(t *testing.T) { + tests := []struct { + name string + chain Chain + want bool + }{ + {"Ethereum Mainnet", EthChain(), true}, + {"BSC Testnet", BscTestnetChain(), true}, + {"BSC Mainnet", BscMainnetChain(), true}, + {"Non-EVM", BtcMainnetChain(), true}, + {"Zeta Mainnet", ZetaChainMainnet(), false}, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + require.Equal(t, tt.want, tt.chain.SupportMerkleProof()) + }) + } +} + func TestIsBitcoinChain(t *testing.T) { tests := []struct { name string @@ -143,6 +260,11 @@ func TestChain_IsExternalChain(t *testing.T) { require.True(t, EthChain().IsExternalChain()) } +func TestChain_IsZetaChain(t *testing.T) { + require.True(t, ZetaChainMainnet().IsZetaChain()) + require.False(t, EthChain().IsZetaChain()) +} + func TestChain_IsEmpty(t *testing.T) { require.True(t, Chain{}.IsEmpty()) require.False(t, ZetaChainMainnet().IsEmpty()) @@ -187,6 +309,14 @@ func TestGetBTCChainIDFromChainParams(t *testing.T) { require.NoError(t, err) require.Equal(t, int64(8332), chainID) + chainID, err = GetBTCChainIDFromChainParams(&chaincfg.RegressionNetParams) + require.NoError(t, err) + require.Equal(t, int64(18444), chainID) + + chainID, err = GetBTCChainIDFromChainParams(&chaincfg.TestNet3Params) + require.NoError(t, err) + require.Equal(t, int64(18332), chainID) + _, err = GetBTCChainIDFromChainParams(&chaincfg.Params{Name: "unknown"}) require.Error(t, err) } From 0817b0da91014d64c01c9e14a72a349326730235 Mon Sep 17 00:00:00 2001 From: skosito Date: Mon, 18 Mar 2024 15:41:11 +0100 Subject: [PATCH 15/41] Missing eth proof test --- common/ethereum/proof_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/common/ethereum/proof_test.go b/common/ethereum/proof_test.go index a7193931ce..e654416e66 100644 --- a/common/ethereum/proof_test.go +++ b/common/ethereum/proof_test.go @@ -58,6 +58,15 @@ func TestProofGeneration(t *testing.T) { } }) + t.Run("should error verify for negative key", func(t *testing.T) { + proof, err := receiptTree.GenerateProof(0) + require.NoError(t, err) + + verified, err := proof.Verify(header.ReceiptHash, -1) + require.Error(t, err) + require.Nil(t, verified) + }) + t.Run("should not generate proof for negative tx index", func(t *testing.T) { proof, err := receiptTree.GenerateProof(-1) require.Error(t, err) From a346f2bb7a1324b32aa92e12e41b326d0fc3dde8 Mon Sep 17 00:00:00 2001 From: skosito Date: Mon, 18 Mar 2024 16:10:43 +0100 Subject: [PATCH 16/41] Add more tests --- common/chain_test.go | 10 ++++++++++ common/gas_limits.go | 5 +---- common/pubkey.go | 8 -------- common/pubkey_test.go | 34 ++++++++++++++++++++++++++++++++++ 4 files changed, 45 insertions(+), 12 deletions(-) diff --git a/common/chain_test.go b/common/chain_test.go index 8bf1ffccb3..987d27567d 100644 --- a/common/chain_test.go +++ b/common/chain_test.go @@ -26,6 +26,16 @@ func TestChain_EncodeAddress(t *testing.T) { want: "", wantErr: true, }, + { + name: "should pass if b is a valid address on the network", + chain: Chain{ + ChainName: ChainName_btc_mainnet, + ChainId: 8332, + }, + b: []byte("bc1qk0cc73p8m7hswn8y2q080xa4e5pxapnqgp7h9c"), + want: "bc1qk0cc73p8m7hswn8y2q080xa4e5pxapnqgp7h9c", + wantErr: false, + }, { name: "should error if b is not a valid address on the evm network", chain: Chain{ diff --git a/common/gas_limits.go b/common/gas_limits.go index bbd1f0a6c5..96748d1d86 100644 --- a/common/gas_limits.go +++ b/common/gas_limits.go @@ -18,9 +18,6 @@ func MultiplyGasPrice(medianGasPrice sdkmath.Uint, multiplierString string) (sdk if err != nil { return sdkmath.ZeroUint(), err } - gasPrice, err := sdk.NewDecFromStr(medianGasPrice.String()) - if err != nil { - return sdkmath.ZeroUint(), err - } + gasPrice := sdk.NewDecFromBigInt(medianGasPrice.BigInt()) return sdkmath.NewUintFromString(gasPrice.Mul(multiplier).TruncateInt().String()), nil } diff --git a/common/pubkey.go b/common/pubkey.go index a149661d9c..1c597cc25c 100644 --- a/common/pubkey.go +++ b/common/pubkey.go @@ -175,14 +175,6 @@ func (pks PubKeys) Strings() []string { return allStrings } -// NewPubKeySet create a new instance of PubKeySet , which contains two keys -func NewPubKeySet(secp256k1, ed25519 PubKey) PubKeySet { - return PubKeySet{ - Secp256k1: secp256k1, - Ed25519: ed25519, - } -} - func GetPubkeyBech32FromRecord(record *keyring.Record) (string, error) { pk, ok := record.PubKey.GetCachedValue().(cryptotypes.PubKey) if !ok { diff --git a/common/pubkey_test.go b/common/pubkey_test.go index 713cb35167..406bb53f09 100644 --- a/common/pubkey_test.go +++ b/common/pubkey_test.go @@ -145,6 +145,9 @@ func (s *PubKeyTestSuite) TestPubKeyGetAddress(c *C) { c.Assert(err, IsNil) c.Assert(addrETH.String(), Equals, d.addrETH.mocknet) + addrETH, err = pk.GetAddress(BtcRegtestChain()) + c.Assert(err, IsNil) + c.Assert(addrETH.String(), Equals, NoAddress) } } @@ -191,6 +194,12 @@ func (s *PubKeyTestSuite) TestEquals(c *C) { }.Equals(PubKeys{ pk1, pk2, pk3, pk4, }), Equals, true) + + c.Assert(PubKeys{ + pk1, pk2, pk3, + }.Equals(PubKeys{ + pk1, pk2, pk4, + }), Equals, false) } func TestNewPubKey(t *testing.T) { @@ -334,3 +343,28 @@ func TestPubKeys(t *testing.T) { require.Equal(t, []string{pk1.String(), pk2.String(), pk3.String()}, pubKeys.Strings()) }) } + +func TestGetEVMAddress(t *testing.T) { + t.Run("should return empty if pubkey is empty", func(t *testing.T) { + pubKey := PubKey("") + e, err := pubKey.GetEVMAddress() + require.Nil(t, err) + require.Equal(t, NoAddress, e) + }) + + t.Run("should return addr from pubkey", func(t *testing.T) { + _, pubKey, _ := testdata.KeyTestPubAddr() + spk, _ := cosmos.Bech32ifyPubKey(cosmos.Bech32PubKeyTypeAccPub, pubKey) + pk, _ := NewPubKey(spk) + + _, err := pk.GetEVMAddress() + require.NotNil(t, err) + }) + + t.Run("should error if non bech32", func(t *testing.T) { + pk := PubKey("invalid") + e, err := pk.GetEVMAddress() + require.NotNil(t, err) + require.Equal(t, NoAddress, e) + }) +} From 768beabbbbdfb593c44a560278b8f570103d75d3 Mon Sep 17 00:00:00 2001 From: skosito Date: Mon, 18 Mar 2024 16:27:05 +0100 Subject: [PATCH 17/41] Fix test --- common/pubkey_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/pubkey_test.go b/common/pubkey_test.go index 406bb53f09..225d7286bb 100644 --- a/common/pubkey_test.go +++ b/common/pubkey_test.go @@ -358,7 +358,7 @@ func TestGetEVMAddress(t *testing.T) { pk, _ := NewPubKey(spk) _, err := pk.GetEVMAddress() - require.NotNil(t, err) + require.Nil(t, err) }) t.Run("should error if non bech32", func(t *testing.T) { From 014f7525a530ed2a91c94c63487f543a653c57b3 Mon Sep 17 00:00:00 2001 From: skosito Date: Mon, 18 Mar 2024 16:49:25 +0100 Subject: [PATCH 18/41] Fix test --- common/pubkey_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/pubkey_test.go b/common/pubkey_test.go index 225d7286bb..6984f31f26 100644 --- a/common/pubkey_test.go +++ b/common/pubkey_test.go @@ -147,7 +147,7 @@ func (s *PubKeyTestSuite) TestPubKeyGetAddress(c *C) { addrETH, err = pk.GetAddress(BtcRegtestChain()) c.Assert(err, IsNil) - c.Assert(addrETH.String(), Equals, NoAddress) + c.Assert(addrETH, Equals, NoAddress) } } From 98997248556dbee36bf1edc63fd35e90231e6f46 Mon Sep 17 00:00:00 2001 From: skosito Date: Mon, 18 Mar 2024 21:30:31 +0100 Subject: [PATCH 19/41] Add tests for common proof eth proofs --- common/ethereum/proof_test.go | 2 +- common/ethereum/testdata/tx_0.json | 1 + common/ethereum/testdata/tx_1.json | 1 + common/ethereum/testdata/tx_10.json | 1 + common/ethereum/testdata/tx_11.json | 1 + common/ethereum/testdata/tx_12.json | 1 + common/ethereum/testdata/tx_13.json | 1 + common/ethereum/testdata/tx_14.json | 1 + common/ethereum/testdata/tx_15.json | 1 + common/ethereum/testdata/tx_16.json | 1 + common/ethereum/testdata/tx_17.json | 1 + common/ethereum/testdata/tx_18.json | 1 + common/ethereum/testdata/tx_19.json | 1 + common/ethereum/testdata/tx_2.json | 1 + common/ethereum/testdata/tx_20.json | 1 + common/ethereum/testdata/tx_21.json | 1 + common/ethereum/testdata/tx_22.json | 1 + common/ethereum/testdata/tx_23.json | 1 + common/ethereum/testdata/tx_24.json | 1 + common/ethereum/testdata/tx_25.json | 1 + common/ethereum/testdata/tx_26.json | 1 + common/ethereum/testdata/tx_27.json | 1 + common/ethereum/testdata/tx_28.json | 1 + common/ethereum/testdata/tx_29.json | 1 + common/ethereum/testdata/tx_3.json | 1 + common/ethereum/testdata/tx_30.json | 1 + common/ethereum/testdata/tx_31.json | 1 + common/ethereum/testdata/tx_32.json | 1 + common/ethereum/testdata/tx_33.json | 1 + common/ethereum/testdata/tx_34.json | 1 + common/ethereum/testdata/tx_35.json | 1 + common/ethereum/testdata/tx_36.json | 1 + common/ethereum/testdata/tx_37.json | 1 + common/ethereum/testdata/tx_38.json | 1 + common/ethereum/testdata/tx_39.json | 1 + common/ethereum/testdata/tx_4.json | 1 + common/ethereum/testdata/tx_40.json | 1 + common/ethereum/testdata/tx_41.json | 1 + common/ethereum/testdata/tx_42.json | 1 + common/ethereum/testdata/tx_43.json | 1 + common/ethereum/testdata/tx_44.json | 1 + common/ethereum/testdata/tx_45.json | 1 + common/ethereum/testdata/tx_46.json | 1 + common/ethereum/testdata/tx_47.json | 1 + common/ethereum/testdata/tx_48.json | 1 + common/ethereum/testdata/tx_49.json | 1 + common/ethereum/testdata/tx_5.json | 1 + common/ethereum/testdata/tx_50.json | 1 + common/ethereum/testdata/tx_51.json | 1 + common/ethereum/testdata/tx_52.json | 1 + common/ethereum/testdata/tx_53.json | 1 + common/ethereum/testdata/tx_54.json | 1 + common/ethereum/testdata/tx_55.json | 1 + common/ethereum/testdata/tx_56.json | 1 + common/ethereum/testdata/tx_57.json | 1 + common/ethereum/testdata/tx_58.json | 1 + common/ethereum/testdata/tx_59.json | 1 + common/ethereum/testdata/tx_6.json | 1 + common/ethereum/testdata/tx_60.json | 1 + common/ethereum/testdata/tx_61.json | 1 + common/ethereum/testdata/tx_62.json | 1 + common/ethereum/testdata/tx_63.json | 1 + common/ethereum/testdata/tx_64.json | 1 + common/ethereum/testdata/tx_65.json | 1 + common/ethereum/testdata/tx_66.json | 1 + common/ethereum/testdata/tx_67.json | 1 + common/ethereum/testdata/tx_68.json | 1 + common/ethereum/testdata/tx_69.json | 1 + common/ethereum/testdata/tx_7.json | 1 + common/ethereum/testdata/tx_70.json | 1 + common/ethereum/testdata/tx_71.json | 1 + common/ethereum/testdata/tx_72.json | 1 + common/ethereum/testdata/tx_73.json | 1 + common/ethereum/testdata/tx_74.json | 1 + common/ethereum/testdata/tx_75.json | 1 + common/ethereum/testdata/tx_76.json | 1 + common/ethereum/testdata/tx_77.json | 1 + common/ethereum/testdata/tx_78.json | 1 + common/ethereum/testdata/tx_79.json | 1 + common/ethereum/testdata/tx_8.json | 1 + common/ethereum/testdata/tx_80.json | 1 + common/ethereum/testdata/tx_9.json | 1 + common/proof_test.go | 121 +++++++++++++++++++++++++++- 83 files changed, 201 insertions(+), 3 deletions(-) create mode 100644 common/ethereum/testdata/tx_0.json create mode 100644 common/ethereum/testdata/tx_1.json create mode 100644 common/ethereum/testdata/tx_10.json create mode 100644 common/ethereum/testdata/tx_11.json create mode 100644 common/ethereum/testdata/tx_12.json create mode 100644 common/ethereum/testdata/tx_13.json create mode 100644 common/ethereum/testdata/tx_14.json create mode 100644 common/ethereum/testdata/tx_15.json create mode 100644 common/ethereum/testdata/tx_16.json create mode 100644 common/ethereum/testdata/tx_17.json create mode 100644 common/ethereum/testdata/tx_18.json create mode 100644 common/ethereum/testdata/tx_19.json create mode 100644 common/ethereum/testdata/tx_2.json create mode 100644 common/ethereum/testdata/tx_20.json create mode 100644 common/ethereum/testdata/tx_21.json create mode 100644 common/ethereum/testdata/tx_22.json create mode 100644 common/ethereum/testdata/tx_23.json create mode 100644 common/ethereum/testdata/tx_24.json create mode 100644 common/ethereum/testdata/tx_25.json create mode 100644 common/ethereum/testdata/tx_26.json create mode 100644 common/ethereum/testdata/tx_27.json create mode 100644 common/ethereum/testdata/tx_28.json create mode 100644 common/ethereum/testdata/tx_29.json create mode 100644 common/ethereum/testdata/tx_3.json create mode 100644 common/ethereum/testdata/tx_30.json create mode 100644 common/ethereum/testdata/tx_31.json create mode 100644 common/ethereum/testdata/tx_32.json create mode 100644 common/ethereum/testdata/tx_33.json create mode 100644 common/ethereum/testdata/tx_34.json create mode 100644 common/ethereum/testdata/tx_35.json create mode 100644 common/ethereum/testdata/tx_36.json create mode 100644 common/ethereum/testdata/tx_37.json create mode 100644 common/ethereum/testdata/tx_38.json create mode 100644 common/ethereum/testdata/tx_39.json create mode 100644 common/ethereum/testdata/tx_4.json create mode 100644 common/ethereum/testdata/tx_40.json create mode 100644 common/ethereum/testdata/tx_41.json create mode 100644 common/ethereum/testdata/tx_42.json create mode 100644 common/ethereum/testdata/tx_43.json create mode 100644 common/ethereum/testdata/tx_44.json create mode 100644 common/ethereum/testdata/tx_45.json create mode 100644 common/ethereum/testdata/tx_46.json create mode 100644 common/ethereum/testdata/tx_47.json create mode 100644 common/ethereum/testdata/tx_48.json create mode 100644 common/ethereum/testdata/tx_49.json create mode 100644 common/ethereum/testdata/tx_5.json create mode 100644 common/ethereum/testdata/tx_50.json create mode 100644 common/ethereum/testdata/tx_51.json create mode 100644 common/ethereum/testdata/tx_52.json create mode 100644 common/ethereum/testdata/tx_53.json create mode 100644 common/ethereum/testdata/tx_54.json create mode 100644 common/ethereum/testdata/tx_55.json create mode 100644 common/ethereum/testdata/tx_56.json create mode 100644 common/ethereum/testdata/tx_57.json create mode 100644 common/ethereum/testdata/tx_58.json create mode 100644 common/ethereum/testdata/tx_59.json create mode 100644 common/ethereum/testdata/tx_6.json create mode 100644 common/ethereum/testdata/tx_60.json create mode 100644 common/ethereum/testdata/tx_61.json create mode 100644 common/ethereum/testdata/tx_62.json create mode 100644 common/ethereum/testdata/tx_63.json create mode 100644 common/ethereum/testdata/tx_64.json create mode 100644 common/ethereum/testdata/tx_65.json create mode 100644 common/ethereum/testdata/tx_66.json create mode 100644 common/ethereum/testdata/tx_67.json create mode 100644 common/ethereum/testdata/tx_68.json create mode 100644 common/ethereum/testdata/tx_69.json create mode 100644 common/ethereum/testdata/tx_7.json create mode 100644 common/ethereum/testdata/tx_70.json create mode 100644 common/ethereum/testdata/tx_71.json create mode 100644 common/ethereum/testdata/tx_72.json create mode 100644 common/ethereum/testdata/tx_73.json create mode 100644 common/ethereum/testdata/tx_74.json create mode 100644 common/ethereum/testdata/tx_75.json create mode 100644 common/ethereum/testdata/tx_76.json create mode 100644 common/ethereum/testdata/tx_77.json create mode 100644 common/ethereum/testdata/tx_78.json create mode 100644 common/ethereum/testdata/tx_79.json create mode 100644 common/ethereum/testdata/tx_8.json create mode 100644 common/ethereum/testdata/tx_80.json create mode 100644 common/ethereum/testdata/tx_9.json diff --git a/common/ethereum/proof_test.go b/common/ethereum/proof_test.go index e654416e66..41efe7c733 100644 --- a/common/ethereum/proof_test.go +++ b/common/ethereum/proof_test.go @@ -29,7 +29,7 @@ func TestProofGeneration(t *testing.T) { // generate a trie from the receipts and compare the root hash with the one in the header receiptTree := NewTrie(receipts) - require.EqualValues(t, header.ReceiptHash.Hex(), header.ReceiptHash.Hex()) + require.EqualValues(t, header.ReceiptHash.Hex(), receiptTree.Trie.Hash().Hex()) t.Run("generate proof for receipts", func(t *testing.T) { for i, receipt := range receipts { diff --git a/common/ethereum/testdata/tx_0.json b/common/ethereum/testdata/tx_0.json new file mode 100644 index 0000000000..72f6850717 --- /dev/null +++ b/common/ethereum/testdata/tx_0.json @@ -0,0 +1 @@ +{"type":"0x0","nonce":"0xa","gasPrice":"0xba43b7400","maxPriorityFeePerGas":null,"maxFeePerGas":null,"gas":"0x5208","value":"0x6eca061a6ae6000","input":"0x","v":"0x1c","r":"0xad65d4e70e14dcb909f36ee4abf1655724eb66bff1390404229c9f7db6636272","s":"0x78a48a7e41509aca5109a1af23499a7b912ff44e8d7a7dd9bc8982bf6fb0f1a3","to":"0x27bc84873c51b0b6c2612918bf2620e543449aa6","hash":"0xe5a58e3d4460acf272945bc15bd91bad5b626b3f8ef33a36630cbce97d86b172"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_1.json b/common/ethereum/testdata/tx_1.json new file mode 100644 index 0000000000..c7eea641c4 --- /dev/null +++ b/common/ethereum/testdata/tx_1.json @@ -0,0 +1 @@ +{"type":"0x0","nonce":"0x9","gasPrice":"0xba43b7400","maxPriorityFeePerGas":null,"maxFeePerGas":null,"gas":"0x5208","value":"0x6eca061a6ae6000","input":"0x","v":"0x1c","r":"0x5346e38fcda628152ff4c4e1d491868890db7d083af4d628f243b732dd34ccf","s":"0x387ab2dcc14c58f775d4e29f008814519b33e03392cb6a2f21028d4ffa9de18e","to":"0x27bc84873c51b0b6c2612918bf2620e543449aa6","hash":"0x2fd214d899e3b8e3ac957ab69927461f0c0a3afe9fc3b79a73a71a3f18c97e35"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_10.json b/common/ethereum/testdata/tx_10.json new file mode 100644 index 0000000000..a71a21c944 --- /dev/null +++ b/common/ethereum/testdata/tx_10.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x1","gasPrice":null,"maxPriorityFeePerGas":"0xef2e08b9","maxFeePerGas":"0xef2e08b9","gas":"0x680ac","value":"0x0","input":"0xbcfaa79d0000000000000000000000003a549672d9a4de8a096dcf75d947a4fd0c607cc0","v":"0x0","r":"0x2d20517083012bbc1a05d9f8fe6212c25571e665dc6a748dd4d5e880ebb283b9","s":"0x6c8f134233167478bc566ed6550177a800395b6b1dd6b8334f2406ae521e6c73","to":"0x837ad475f0177bcb6cf426a725d5d52dfb577ee7","chainId":"0xaa36a7","accessList":[],"hash":"0xb24efa8d61c60ec11386273038d5db7ac691c650507ec4521c5e8cb24d5bc183"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_11.json b/common/ethereum/testdata/tx_11.json new file mode 100644 index 0000000000..ea29920d48 --- /dev/null +++ b/common/ethereum/testdata/tx_11.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x5","gasPrice":null,"maxPriorityFeePerGas":"0xef2e08b9","maxFeePerGas":"0xef2e08b9","gas":"0x1ece2","value":"0x0","input":"0xe54a9a7c000000000000000000000000c4415d84a928f1ce494181f62a15c22f138b36eb000000000000000000000000cba6c4ce8380a5cdb49424a56b7dc897c213576a00000000000000000000000000000000000000000000000000000001faa3b500000000000000000000000000000000000000000000000000000000000007ab320000000000000000000000000000000000000000000000000000018cc4fad0390000000000000000000000000000000000000000000000000000000000000015000000000000000000000000000000000000000000000000000000000000001c18528531bd3d3d2fdcb6045aba88f2597e8a1eff465144f0b9f4b760a8f4718f0b316449c456e7f9b14a576ba58a86214098b191386a8619aee39106fd3e5b54","v":"0x0","r":"0xa2db0665dad00644136fd0885911a5dab1ea34cfcf8f38863f4126440a361521","s":"0x6bed21da45e9c1b6ea7bf75e4d722c8d75a5697a1b020ea838d4268c574bdd0c","to":"0x321ce961084fcf3a56de4be2f2006707a0421aa4","chainId":"0xaa36a7","accessList":[],"hash":"0x42fcbccabd349cecdbf0beeebc9933764d07050c9bd9215f653530c269f6f7e8"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_12.json b/common/ethereum/testdata/tx_12.json new file mode 100644 index 0000000000..e6d9eafa4f --- /dev/null +++ b/common/ethereum/testdata/tx_12.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x1","gasPrice":null,"maxPriorityFeePerGas":"0xef2e08b9","maxFeePerGas":"0xef2e08b9","gas":"0x680ac","value":"0x0","input":"0xbcfaa79d0000000000000000000000008e864788917344c996a959b165389172c0d11323","v":"0x0","r":"0xda67a8e07070c90f9c6b22392417d39223fc1a6e81db3e3404ca4dea637cf473","s":"0x1bb5353986d78ca9ab169edcc78d6141c789a6ac140a284494aa72d2011cf0b6","to":"0x837ad475f0177bcb6cf426a725d5d52dfb577ee7","chainId":"0xaa36a7","accessList":[],"hash":"0x2b858ea5056974cd589179f22861f44f85ee57035e7aad2da161f56f089c2573"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_13.json b/common/ethereum/testdata/tx_13.json new file mode 100644 index 0000000000..049c766a3e --- /dev/null +++ b/common/ethereum/testdata/tx_13.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x1","gasPrice":null,"maxPriorityFeePerGas":"0xef28d519","maxFeePerGas":"0xef28d519","gas":"0x680ac","value":"0x0","input":"0xbcfaa79d000000000000000000000000b44f4fac885b2c8926333f7b275271e07049a76b","v":"0x0","r":"0x41a20f0eabf40a98d5576034e9d78f2013d2e651d33a28e0212298ac69baba07","s":"0x1c8a1d3d14e8bf5c229d174f0bf911d0706ad6f347c5f34dd37ef0ff44c25844","to":"0x837ad475f0177bcb6cf426a725d5d52dfb577ee7","chainId":"0xaa36a7","accessList":[],"hash":"0x99bc1fb41e6620f1c4d60880bc813222d9012849b5e5c7a74b6da5c77784c43d"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_14.json b/common/ethereum/testdata/tx_14.json new file mode 100644 index 0000000000..40842cf209 --- /dev/null +++ b/common/ethereum/testdata/tx_14.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x0","gasPrice":null,"maxPriorityFeePerGas":"0xef28d519","maxFeePerGas":"0xef28d519","gas":"0xcb71","value":"0x0","input":"0xa0712d6800000000000000000000000000000000000000000000003635c9adc5dea00000","v":"0x0","r":"0x1bae609ea15491e11160e7ebf009a3577f7187b4ceb5fb097fcc1bd78cd1088c","s":"0x62945a04a7b1f1ba4dd54fbd852c8121a0a3baf040d429344d8bf7d6ca5470be","to":"0x4873528341d33ec918c7465f244491acb75bc95f","chainId":"0xaa36a7","accessList":[],"hash":"0x39ac5411adf30f48274ed9e83d1a5e345572f4858191870f49304ac25c172841"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_15.json b/common/ethereum/testdata/tx_15.json new file mode 100644 index 0000000000..a78b8e153a --- /dev/null +++ b/common/ethereum/testdata/tx_15.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x8","gasPrice":null,"maxPriorityFeePerGas":"0xef28d519","maxFeePerGas":"0xef28d519","gas":"0x8f5c","value":"0x0","input":"0x40c10f19000000000000000000000000bbb1d19f0d7bfaff24ebe03f5be95162111e8acc00000000000000000000000000000000000000000000021e19e0c9bab2400000","v":"0x0","r":"0xba1c780a0869cdea6e2513f2704cbcacfa9a1abfabde0cd45923803d01dbd990","s":"0x75ce054c00320de8b47e393d26fd2b407b93244815fa604abc644cd126732eb4","to":"0x1cd40deb4196d219097499031922ff690f9ea813","chainId":"0xaa36a7","accessList":[],"hash":"0x39f0b135ba1fe235a61a06d1c68d8d91c02d504a3f3974a022a5adfc49c338b4"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_16.json b/common/ethereum/testdata/tx_16.json new file mode 100644 index 0000000000..ab82dd7c4a --- /dev/null +++ b/common/ethereum/testdata/tx_16.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x7","gasPrice":null,"maxPriorityFeePerGas":"0xef28d519","maxFeePerGas":"0xef28d519","gas":"0x8f50","value":"0x0","input":"0x40c10f1900000000000000000000000016d1008ea65d4754651b30308ba8d3c2b404e7e600000000000000000000000000000000000000000000021e19e0c9bab2400000","v":"0x0","r":"0x860f41498f6e3ef4c0a055902420f40c38ec1f22714d9510e5c715b24c53ae72","s":"0x4abf49732884966be49449d2fa91be189ddf160da28764fdd677179cf180ed09","to":"0x1cd40deb4196d219097499031922ff690f9ea813","chainId":"0xaa36a7","accessList":[],"hash":"0x75c215eefb48ea43521ea96206e919f50533eeb7a78792043e98bd32a2ad3a6d"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_17.json b/common/ethereum/testdata/tx_17.json new file mode 100644 index 0000000000..e616d8dbeb --- /dev/null +++ b/common/ethereum/testdata/tx_17.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x0","gasPrice":null,"maxPriorityFeePerGas":"0xef28d519","maxFeePerGas":"0xef28d519","gas":"0xcb71","value":"0x0","input":"0xa0712d6800000000000000000000000000000000000000000000003635c9adc5dea00000","v":"0x0","r":"0x7c5eab4ab9022b868581ac9083c633e5090f577bb3a54b7140fc29459822dc74","s":"0x66b05179388d539fb1152c268148be583a0eb399741471dd909372cb2628fc6","to":"0x4873528341d33ec918c7465f244491acb75bc95f","chainId":"0xaa36a7","accessList":[],"hash":"0xc3b3d23a26280cb8997823b23b0610c39e2019a7e3f39959734b056d3f95420b"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_18.json b/common/ethereum/testdata/tx_18.json new file mode 100644 index 0000000000..2546dfebd7 --- /dev/null +++ b/common/ethereum/testdata/tx_18.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x5","gasPrice":null,"maxPriorityFeePerGas":"0xef28d519","maxFeePerGas":"0xef28d519","gas":"0xb775","value":"0x0","input":"0x095ea7b3000000000000000000000000321ce961084fcf3a56de4be2f2006707a0421aa4000000000000000000000000000000000000000000084595161401484a000000","v":"0x0","r":"0x245a6280a096860c078f6ac75173406314c2fa9700c54fa6b88d09db1d7d5a02","s":"0x701c4643e0913301aaf883b344f0eb97717adcfe26e0971799a9b8ba45009c85","to":"0x4873528341d33ec918c7465f244491acb75bc95f","chainId":"0xaa36a7","accessList":[],"hash":"0x3f321a12e595e4e3f31655a3a589b2e022d5b1f166488271f6d169a913eee26b"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_19.json b/common/ethereum/testdata/tx_19.json new file mode 100644 index 0000000000..d3ebcc8440 --- /dev/null +++ b/common/ethereum/testdata/tx_19.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x7","gasPrice":null,"maxPriorityFeePerGas":"0xef28d519","maxFeePerGas":"0xef28d519","gas":"0x88b1","value":"0x0","input":"0xa0712d6800000000000000000000000000000000000000000000021e19e0c9bab2400000","v":"0x1","r":"0xc91f146920ffd1dff637b4948de15b22235ca0621bc7f328fcf19811020c4f5f","s":"0x5a53ea07fd391b17f079b20a4b4098d6b45045c7d34ceb1a1880cb7b97c5bd5b","to":"0x4873528341d33ec918c7465f244491acb75bc95f","chainId":"0xaa36a7","accessList":[],"hash":"0x8ef26786006171ab31b65aaeb0f059cc81d240dc6f58176416dedf3ba30fb0fb"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_2.json b/common/ethereum/testdata/tx_2.json new file mode 100644 index 0000000000..48084f3a16 --- /dev/null +++ b/common/ethereum/testdata/tx_2.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x1f2f","gasPrice":null,"maxPriorityFeePerGas":"0x34339ecb9","maxFeePerGas":"0x34339ecb9","gas":"0x5208","value":"0x11c37937e080000","input":"0x","v":"0x0","r":"0x771474ce910e5d1f20dfd66fd220017f31def1f453b41bc117f9ffb71a2266dd","s":"0x3493502e9db40e370cbae827767ba370ca1cca8d2b4d99bb38410f493a2b53e5","to":"0x283e010826ac7c5f3e3a14414a500f855f6c77b7","chainId":"0xaa36a7","accessList":[],"hash":"0xab13feef2d739e8276da60663b9a58f3886eca8f7873093f9f31015b6c7a404f"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_20.json b/common/ethereum/testdata/tx_20.json new file mode 100644 index 0000000000..7c38238f79 --- /dev/null +++ b/common/ethereum/testdata/tx_20.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x5","gasPrice":null,"maxPriorityFeePerGas":"0xef28d519","maxFeePerGas":"0xef28d519","gas":"0x1a9c1","value":"0x0","input":"0xe54a9a7c000000000000000000000000bac1752f90a431d314bc7f8f03b02580059c799e000000000000000000000000130c318bef3a60f05541955003b2baa1d691335f00000000000000000000000000000000000000000000000000000000423883c0000000000000000000000000000000000000000000000000000000000003e41e0000000000000000000000000000000000000000000000000000018cc4fac00f0000000000000000000000000000000000000000000000000000000000000015000000000000000000000000000000000000000000000000000000000000001bef05e33e36492b7b8c747c6c082d566f6faa8e42b47217e7218e27668bd3a55470301d19ead5c9bd3be29a94267b6d2d7ef6257e8bdd1d1ab3e8e88203026598","v":"0x1","r":"0xd7e176bb3668e1b2855d1bcb137cc9c9277ac2e20ae4d66d6e4be16988939c26","s":"0x539d036df2cccf7f3a79faabd25c38c1c7e634f6526f43e8b5394dfe228e5116","to":"0x321ce961084fcf3a56de4be2f2006707a0421aa4","chainId":"0xaa36a7","accessList":[],"hash":"0xeb7337b7307584a78ae5d2b2fdd0872554f68468bbeed30791f6e4e01718d9f0"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_21.json b/common/ethereum/testdata/tx_21.json new file mode 100644 index 0000000000..330c5625f4 --- /dev/null +++ b/common/ethereum/testdata/tx_21.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x0","gasPrice":null,"maxPriorityFeePerGas":"0xef28d519","maxFeePerGas":"0xef28d519","gas":"0xcb71","value":"0x0","input":"0xa0712d6800000000000000000000000000000000000000000000003635c9adc5dea00000","v":"0x1","r":"0x935b7232937d0d9590ba7ca28c730949d936128811c8eec8f8d83a984be5f98f","s":"0x5d887c30f5b77e7b8b54a4124259fbd978e755a872a0b02f7b5fcc87395c83fa","to":"0x4873528341d33ec918c7465f244491acb75bc95f","chainId":"0xaa36a7","accessList":[],"hash":"0x6371e54c8ea54159a7d310dc29c725f593274be169823a175debe06330be67f5"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_22.json b/common/ethereum/testdata/tx_22.json new file mode 100644 index 0000000000..cdd7260d80 --- /dev/null +++ b/common/ethereum/testdata/tx_22.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x0","gasPrice":null,"maxPriorityFeePerGas":"0xef28d519","maxFeePerGas":"0xef28d519","gas":"0xcb71","value":"0x0","input":"0xa0712d6800000000000000000000000000000000000000000000003635c9adc5dea00000","v":"0x0","r":"0xb401d669266282f7abdbf09a9412799994cb64d45344a5c923d231a961365bd","s":"0x6a81cb37e249f8dc8d4ab15105848af1fbeb4345bb2755eb31ed109065b18911","to":"0x4873528341d33ec918c7465f244491acb75bc95f","chainId":"0xaa36a7","accessList":[],"hash":"0x05c85848bce75d102a110a0d379c01413de3a50a5f189258dd47c4fc3cb3c45a"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_23.json b/common/ethereum/testdata/tx_23.json new file mode 100644 index 0000000000..b8a017aeb5 --- /dev/null +++ b/common/ethereum/testdata/tx_23.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0xd","gasPrice":null,"maxPriorityFeePerGas":"0xef28d519","maxFeePerGas":"0xef28d519","gas":"0x8f5c","value":"0x0","input":"0x40c10f19000000000000000000000000160c9f73c956177c473987cde20c654519a435a000000000000000000000000000000000000000000000021e19e0c9bab2400000","v":"0x1","r":"0xd07f8d28d68d570c60a9aa0c3b0a7fc01a0ebee784623c840b10c6c81c50118d","s":"0x64cb98266102a6d74863bdd17b141ed4a3b8819144b26ce864428d863bef716b","to":"0x11dc5c441971bb3b2e933e0256e8a6bc6c41a91a","chainId":"0xaa36a7","accessList":[],"hash":"0xb2f460aa0450f7b2d621d5761e5a33a3d21e13b380bf439cbf85017dd0a06118"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_24.json b/common/ethereum/testdata/tx_24.json new file mode 100644 index 0000000000..ee28880dbc --- /dev/null +++ b/common/ethereum/testdata/tx_24.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x6","gasPrice":null,"maxPriorityFeePerGas":"0xef28d519","maxFeePerGas":"0xef28d519","gas":"0x2510f","value":"0x0","input":"0x676df6b3000000000000000000000000f769a322bb34cd3218f3568d94f4f838ba83ae0600000000000000000000000076dd2d7311ad402325b4a0cd92512f17719393b70000000000000000000000000000000000000000000000000000000017d7840000000000000000000000000000000000000000000000000000000000000a21b40000000000000000000000000000000000000000000000000000018cc4faa4710000000000000000000000000000000000000000000000000000000000000015000000000000000000000000000000000000000000000000000000000000001cc72f43acb4ea67bc717920874aed2ae1d35ca4413eb754b4229b134a71376b1c690920ebdc3470631862e9d5989077367bc40e75803bc5bde7561a027c6f19f5","v":"0x0","r":"0xf9a6b902daf8dbb3bfe5fe2f19ade45ee0d2212e18af3549b1ab7f1a9f0f8df7","s":"0x74608e710203129093d2009f11795d597fd81a9326e98166546fbb2932a291e8","to":"0x321ce961084fcf3a56de4be2f2006707a0421aa4","chainId":"0xaa36a7","accessList":[],"hash":"0x064e6910450c8878f51a7d594bfc26eca5d972ed805087e19e1853049208b0d6"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_25.json b/common/ethereum/testdata/tx_25.json new file mode 100644 index 0000000000..7bd244aa79 --- /dev/null +++ b/common/ethereum/testdata/tx_25.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x0","gasPrice":null,"maxPriorityFeePerGas":"0xef28d519","maxFeePerGas":"0xef28d519","gas":"0xcb71","value":"0x0","input":"0xa0712d6800000000000000000000000000000000000000000000003635c9adc5dea00000","v":"0x1","r":"0x31f0a79b32af23f243cd4562a4e57c572c0e43370166358c280fbc6f60931af8","s":"0x3d85c6062690306eee6901b77efebf020db96fb03b5bffeb96acb79da5ebcda5","to":"0x4873528341d33ec918c7465f244491acb75bc95f","chainId":"0xaa36a7","accessList":[],"hash":"0xc0816ffefb3f8605c006df368eb07d0704062e935700f88edf74afc962c6eb3c"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_26.json b/common/ethereum/testdata/tx_26.json new file mode 100644 index 0000000000..c218dc2a8a --- /dev/null +++ b/common/ethereum/testdata/tx_26.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0xb","gasPrice":null,"maxPriorityFeePerGas":"0xef28d519","maxFeePerGas":"0xef28d519","gas":"0x8f5c","value":"0x0","input":"0x40c10f19000000000000000000000000c1393cc33b8574e18b0408f276e6e067f9317b3900000000000000000000000000000000000000000000010f0cf064dd59200000","v":"0x1","r":"0x2b4433429a538b971a4320327758d0850bde755768c2efa9505894619640fa2","s":"0x76e486a5802b7ac28645b82b3c04d3482b4f06267897bf3a1f6823298b86c124","to":"0xd75edf81cd2109d4264624dbf34bd4dee36f18b9","chainId":"0xaa36a7","accessList":[],"hash":"0x59dd57653e2fffbbc21d67bc20bd426261ba972179579d92990acb0ed44604c8"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_27.json b/common/ethereum/testdata/tx_27.json new file mode 100644 index 0000000000..e312d9516a --- /dev/null +++ b/common/ethereum/testdata/tx_27.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x8","gasPrice":null,"maxPriorityFeePerGas":"0xef27dfee","maxFeePerGas":"0xef27dfee","gas":"0x8f5c","value":"0x0","input":"0x40c10f1900000000000000000000000072d98af9ff745277bcda4da0d76d603c4a8cc44f00000000000000000000000000000000000000000000021e19e0c9bab2400000","v":"0x1","r":"0x1ac0c0f70662693eda898abcb43b0dd98a71ac8f1e9ef17ec527ad3245d92ebe","s":"0x5f59470a1fcafd796852e8c9e16275d4362693ccd0537502df353d3730c0a40a","to":"0x01fa8deeddea8e4e465f158d93e162438d61c9eb","chainId":"0xaa36a7","accessList":[],"hash":"0x43dfd90c01da2c3843b28102040a427acc8aa5545e7898d5ec28eadb11a8eaee"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_28.json b/common/ethereum/testdata/tx_28.json new file mode 100644 index 0000000000..273528da4f --- /dev/null +++ b/common/ethereum/testdata/tx_28.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x9","gasPrice":null,"maxPriorityFeePerGas":"0xef27dfee","maxFeePerGas":"0xef27dfee","gas":"0xcb71","value":"0x0","input":"0xa0712d6800000000000000000000000000000000000000000000003635c9adc5dea00000","v":"0x0","r":"0x1fc3e6b5a3eca11d87b27b2ff019da693d2f1bc424521f0a89e3c234b5884c6b","s":"0x1b67d0ccb00e1cb90e1b55c170ec619f451c667f4204a614e5c9285cd0eb4743","to":"0x4873528341d33ec918c7465f244491acb75bc95f","chainId":"0xaa36a7","accessList":[],"hash":"0x6e7ae03ba63ee6f0cfb3203eff114513aaba07a57cc041543352f04509a181f6"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_29.json b/common/ethereum/testdata/tx_29.json new file mode 100644 index 0000000000..8fd746afce --- /dev/null +++ b/common/ethereum/testdata/tx_29.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x3","gasPrice":null,"maxPriorityFeePerGas":"0xef27dfee","maxFeePerGas":"0xef27dfee","gas":"0x218ed","value":"0x0","input":"0x79df7682000000000000000000000000a58d25d47ace3ffefb69545a5051675fa7fcdaba00000000000000000000000000000000000000000000000000000000000aa2360000000000000000000000000000000000000000000000000000018cc4fa83e900000000000000000000000000000000000000000000000000000002363e7f000000000000000000000000000000000000000000000000000000000000000015000000000000000000000000000000000000000000000000000000000000001cdfdd1c0764948ba4905a33b20e73eac6ae97f60acc227e7999994b27754cb750100b6c3943583482a7d7c5c8405d4de1866d502aced535280cd0830645efa5f4","v":"0x1","r":"0x3868fea76c781d29cabb53a636a8670b25c069dc22b85a847e24b148c29bdfa2","s":"0x18932b5908953b2b32e0ad114d368b27ac16e4cc274c50dda79e75fab1244b8f","to":"0x321ce961084fcf3a56de4be2f2006707a0421aa4","chainId":"0xaa36a7","accessList":[],"hash":"0x772246c4c281b2ed30092e387c6b9cf49e0dbe7abcd9bb68805bce6a47c2fd30"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_3.json b/common/ethereum/testdata/tx_3.json new file mode 100644 index 0000000000..93d695f2b2 --- /dev/null +++ b/common/ethereum/testdata/tx_3.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x1f2e","gasPrice":null,"maxPriorityFeePerGas":"0x34334b919","maxFeePerGas":"0x34334b919","gas":"0x5208","value":"0x11c37937e080000","input":"0x","v":"0x0","r":"0x901d712c0baf63755b62aee05ff7d6c1a03950df56e8bcb9ebab90d0636223b7","s":"0x45999ad141201529681859a15768141ae128d0378be24759a6628d0181a70cf1","to":"0xb6329332d9aee433cab9cd26d98b5ffbd3beb1bd","chainId":"0xaa36a7","accessList":[],"hash":"0x7f92fc9ccdc51b58557e1de4bd3f2548cf1cbb9e89cfce0ebf74ecf161870d6d"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_30.json b/common/ethereum/testdata/tx_30.json new file mode 100644 index 0000000000..61fe22a570 --- /dev/null +++ b/common/ethereum/testdata/tx_30.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0xba527","gasPrice":null,"maxPriorityFeePerGas":"0xb2d05e00","maxFeePerGas":"0xb4561f6c","gas":"0x41514","value":"0x0","input":"0x0a321cff0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000003b6a65f92fa6320b8cc85b50ff383d7c973b784bccf28e09bd460d1444bff51d465ae00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003b6a74ce9de2ca234c9771f3f384670460f9436dad290cdfe23a4a09b06da3ac3ea1900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003b6a8a424519e1385cb96347b410eb90deba3753103549a295d637ae106965d1a85dc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003b6a9258dafa6e7425b0c01d3cb080429d43e7bdc1dad18f54886af927c2be8688d5400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003b6aac8d202810ca4baa9a253bd92756e4f05d119f4aeaa9afcd82fc28b114d2a6e6100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003b6ab1545eded911750a8d7653827de20dcbc9055d0bfe12ea115792e634a7de132fa00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003b6ace53b921c229eacba0675467674b016c903f6a1a50aebca04506442a63025f92f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003b6ade64a5b4c36edfcf3d0ea5493eace6e693e3cc69e4743098b6eb44a84870ed2ab00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003b6aef813e1de3a66419df9531ff02223d9c4e334742b58e8186a73fdeb595f61618b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003b6afb0bbdf1f7ef38369ff4f8c88ae285951da89ce14be87572bcd3398861bdb9c0900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","v":"0x1","r":"0xfe8f0b4d473c65f8646c454c0ef7cd823b78474a278785ab3509732b632bc82f","s":"0x1f7083fe102b3a37c20af09e76ff306e1bfcfbe51b076b296e03118935fcbac4","to":"0xd4d3d0db6e0de6697346140e889522f01e18dc36","chainId":"0xaa36a7","accessList":[],"hash":"0x39d18b3ade0f992a3db856c25c8e3b3d188234388646972d311d7c504ae1295b"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_31.json b/common/ethereum/testdata/tx_31.json new file mode 100644 index 0000000000..7bb2fdb633 --- /dev/null +++ b/common/ethereum/testdata/tx_31.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x37","gasPrice":null,"maxPriorityFeePerGas":"0xb38e0b19","maxFeePerGas":"0xb38e0b19","gas":"0xb4b4","value":"0x0","input":"0x095ea7b3000000000000000000000000321ce961084fcf3a56de4be2f2006707a0421aa4000000000000000000000000000000000000000000000878678326eac9000000","v":"0x0","r":"0xaa287453608d48316f479fe36538fffc3c7c8904bbadd0b4777ea82ca1fa23e7","s":"0x5fc1c689f1f6bc520044759bcb9bcc9fc325a5018f4fa7c16ddfb23acd50376e","to":"0xbe1d0db61e7562d88ef1fab7436d02b6d00ce728","chainId":"0xaa36a7","accessList":[],"hash":"0x9c05318df1bdb300aae680b2cbacabc8d562550ba1a97ab0e569bb7db686fa01"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_32.json b/common/ethereum/testdata/tx_32.json new file mode 100644 index 0000000000..d42904f3a9 --- /dev/null +++ b/common/ethereum/testdata/tx_32.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x2","gasPrice":null,"maxPriorityFeePerGas":"0xb38e0b19","maxFeePerGas":"0xb38e0b19","gas":"0xb49c","value":"0x0","input":"0x095ea7b3000000000000000000000000321ce961084fcf3a56de4be2f2006707a0421aa4000000000000000000000000000000000000000000000000000009184e72a000","v":"0x0","r":"0x488eaa62b241f32b07fb330885a19619a497fd7f32e73956dd84901e84a24303","s":"0x279e75937d10ed94d7df18cb648922f3c8142dc7e6fc01f359b571e17c8c091c","to":"0x08394e7e653472694ecd4527656b2881e5701a14","chainId":"0xaa36a7","accessList":[],"hash":"0x2a1fc8b3a85b88dc2b1f95477fcb3876503f64c1a2f7d4bfa0e487db4813953e"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_33.json b/common/ethereum/testdata/tx_33.json new file mode 100644 index 0000000000..ad450b5415 --- /dev/null +++ b/common/ethereum/testdata/tx_33.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x2","gasPrice":null,"maxPriorityFeePerGas":"0xb38e0b19","maxFeePerGas":"0xb38e0b19","gas":"0xb490","value":"0x0","input":"0x095ea7b3000000000000000000000000321ce961084fcf3a56de4be2f2006707a0421aa400000000000000000000000000000000000000000000000000000002540be400","v":"0x1","r":"0xd903f3108df77123f38234a9c489cc9c909248bceceb5f7a86881a12dd9719c5","s":"0x6fef73733e954bae02070389fba08abfde5977d71b94c3b64c0dd85b9b029985","to":"0x08394e7e653472694ecd4527656b2881e5701a14","chainId":"0xaa36a7","accessList":[],"hash":"0xdbeb6aa535fcc95d5b499b650dfd5361daf49e14bc0723f4a8d87d1fa3022905"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_34.json b/common/ethereum/testdata/tx_34.json new file mode 100644 index 0000000000..3657c58a4b --- /dev/null +++ b/common/ethereum/testdata/tx_34.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0xa66","gasPrice":null,"maxPriorityFeePerGas":"0x89173700","maxFeePerGas":"0x12a05f200","gas":"0x30d40","value":"0x0","input":"0x9ed93318000000000000000000000000b4d68d677a5f765117d374569d5ecd5739ad5df6","v":"0x1","r":"0x96da26670a0c8c6225041ebdf1b03882889a72bb31383df5a1b896729b702256","s":"0x2bcdbd102ea07a18157ab90ea6474800a297b13a8e0e4338441ce655ad26e9c3","to":"0x53844f9577c2334e541aec7df7174ece5df1fcf0","chainId":"0xaa36a7","accessList":[],"hash":"0xc7b374861bc29413cc71c89ad81d285270c84fdaaa465b452e90f33228aee34b"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_35.json b/common/ethereum/testdata/tx_35.json new file mode 100644 index 0000000000..bbcf7d8f14 --- /dev/null +++ b/common/ethereum/testdata/tx_35.json @@ -0,0 +1 @@ +{"type":"0x0","nonce":"0x20b","gasPrice":"0x696fee32","maxPriorityFeePerGas":null,"maxFeePerGas":null,"gas":"0x3f066","value":"0x0","input":"0x40c10f190000000000000000000000003f4b6664338f23d2397c953f2ab4ce8031663f800000000000000000000000000000000000000000000000008ac7230489e80000","v":"0x1546d71","r":"0xfc4b7defe19ca8f10596e5466b989f6e75c895ff3901a79cdb5154034cedb645","s":"0x578b3dfe49a37f6af8fff509966a5a2d735184c0be178ce890ad01a5948a4e80","to":"0xf875fecff122927e53c3b07f4258c690b026004b","hash":"0xa2fc58ad754b05bf941eb415df526cfd5c750cde573498c1727d421327457179"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_36.json b/common/ethereum/testdata/tx_36.json new file mode 100644 index 0000000000..a1f7be49db --- /dev/null +++ b/common/ethereum/testdata/tx_36.json @@ -0,0 +1 @@ +{"type":"0x0","nonce":"0x7","gasPrice":"0x696fee32","maxPriorityFeePerGas":null,"maxFeePerGas":null,"gas":"0x5208","value":"0x2d84e69f2f4939e","input":"0x","v":"0x1546d71","r":"0xba0a586e7453c8e475504debb8a381fd20177080f99c190f1389095050aa74","s":"0x523142b61e70515dc08cc30ad22f0bc88b20ad722d12b6738e57a079af6cfcbf","to":"0x45a318273749d6eb00f5f6ca3bc7cd3de26d642a","hash":"0x63afbe677969883b9d78c8fbe62cf0fe72ef31220744770837320d4a27d2b4f1"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_37.json b/common/ethereum/testdata/tx_37.json new file mode 100644 index 0000000000..f6928e7e29 --- /dev/null +++ b/common/ethereum/testdata/tx_37.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x7d","gasPrice":null,"maxPriorityFeePerGas":"0x59682f00","maxFeePerGas":"0x5ae3892c","gas":"0x173bf8","value":"0x0","input":"0x6d73e6690000000000000000000000001accf626b21eb0816d0c4eea5f4b577bdc4ca931","v":"0x0","r":"0x326f9040177503b22a6a7e4c03ca43c72f0853f2abd39f6e3fc2bf75da8fd509","s":"0x3fc0374732482be74b141e801b95fe83fd911ec24276f376c2f27303989ef8ac","to":"0xee66b7c8d83cb0f73b176fe1cad10501c5145422","chainId":"0xaa36a7","accessList":[],"hash":"0xcd719f107c1867eca2e7a8a1c84f3bb9f3da121ea5a6023fe07c96352f06e383"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_38.json b/common/ethereum/testdata/tx_38.json new file mode 100644 index 0000000000..14afcb864b --- /dev/null +++ b/common/ethereum/testdata/tx_38.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x3","gasPrice":null,"maxPriorityFeePerGas":"0x59682f00","maxFeePerGas":"0x5a683f11","gas":"0x5208","value":"0x1ae13ca65f0530","input":"0x","v":"0x0","r":"0xfc4815c7ca21bc49b2248516d1f73381e71b5d1c0d2343b55049e704c5cc2fa9","s":"0x2fa4e1111045a4f5a4436d9ae2819bfe11a74e6b393a4bd000676709fc29680d","to":"0x4eaf936c172b5e5511959167e8ab4f7031113ca3","chainId":"0xaa36a7","accessList":[],"hash":"0x392fbb6f4bec78563030c40437d27bb9b6295654692f3b08187d67199219d47b"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_39.json b/common/ethereum/testdata/tx_39.json new file mode 100644 index 0000000000..e9e8bb18d6 --- /dev/null +++ b/common/ethereum/testdata/tx_39.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x8","gasPrice":null,"maxPriorityFeePerGas":"0x59682f00","maxFeePerGas":"0x5a66f417","gas":"0xb775","value":"0x0","input":"0x095ea7b3000000000000000000000000321ce961084fcf3a56de4be2f2006707a0421aa400000000000000000000000000000000000000000000010f0cf064dd59200000","v":"0x0","r":"0x26905b6a1896b5a7dc62b620ffd247e0a0c1719a65d023592b8f2610c688c796","s":"0x4b65b3c4b1db54b1d7b306e88575040c3b581a8d47319782c8bc0060feafb1dc","to":"0x4873528341d33ec918c7465f244491acb75bc95f","chainId":"0xaa36a7","accessList":[],"hash":"0x157ed28cd282a00683ddc2b3b83063548c2f858b09ac673c53bd5ff988daab2f"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_4.json b/common/ethereum/testdata/tx_4.json new file mode 100644 index 0000000000..e81c6d632d --- /dev/null +++ b/common/ethereum/testdata/tx_4.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x73a60","gasPrice":null,"maxPriorityFeePerGas":"0x12a05f200","maxFeePerGas":"0x12c9b558f","gas":"0x7a1200","value":"0x0","input":"0x701f58c5000000000000000000000000000000000000000000000000000000000006da3b1b703837252c58fcd836dbc3427b16e90a1b674e53d646d2ce03cd39ed3c2206000000000000000000000000000000000000000000000000000000001debdc510000000000000000000000000000000000000000000000000000000000000000c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470fef7bd9f889811e59e4076a0174087135f080177302763019adaf531257e3a87000000000000000000000000000000000000000000000000000000006592ae88c49502d5f407227b0610edfe50f3d691e2b5b056a57074374770b54d1f57e4f800000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000081e00000000000000000000000000000000000000000000000000000000000010440000000000000000000000000000000000000000000000000000000000006da3c000000000000000000000000000000000000000000000000000000006592ae93000000000000000000000000000000000000000000000000000000001debdfb7e10bf8327d32a8b36507fe247cde91bf7fc9f7dc9fff4756afc71d83302700ae0000000000000000000000000000000000000000000000000000000000000000c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470dd0a27c89fafd8d9b2011a7a89ad888ebf9fc917d6249671c15e1b1698e850c95642bd87242930f52c8931d10f34f8531dca77b91b6e77ec1efac4e61d220584000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000003e0000000000000000000000000000000000000000000000000000000000000026800000000000000000000000000000000000000000000800b00000000000000000000000000000000000000000000000000000000000000041b703837252c58fcd836dbc3427b16e90a1b674e53d646d2ce03cd39ed3c220600000365000000000000000000000000000000000000800b00000000000000000000000000000000000000000000000000000000000000030000000000000000000000006592ae930000000000000000000000006592ae9a0001036500000000000000000000000000000000000080010000000000000000000000000000000000000000000000000000000000000005c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470000103650000000000000000000000000000000000008001000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000001036500000000000000000000000000000000000080080000000000000000000000000000000000000000000000000000000000000000fef7bd9f889811e59e4076a0174087135f080177302763019adaf531257e3a870001036500000000000000000000000000000000000080080000000000000000000000000000000000000000000000000000000000000001fe7eba37b3b456ebb82b8328e23a9e3f5c5db907f4dd050be6adbca56c67f19a0001036500000000000000000000000000000000000080080000000000000000000000000000000000000000000000000000000000000002a36a6877a54e792d65d50090b1de7c40b06fd6b02efd8541c5d40c63a92f4edc0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007d6600000000000000000000000001007d55040366f797697ff21592c7e8c2d1b12f31b77b564096909019064a4569764b94d5b17e001b703837252c58fcd836dbc3427b16e90a1b674e53d646d2ce03cd39ed3c22064d2d8b5dc302cf347261ca28bda0a608c3354307c7dc7880886b0f1ab35e0d10090124859912869a4656f81e70cabf613e33df43e720288c85664eb79db0ce594b33090176d62a25270bec6880a9e9fab7307b044cd505f632fbbb13df740876a3ffd2e509013a4a4ee56d436f4888a1084a9d1d30ec72cee879e05f4d0a588c93a04e2ddda30901ebd4a3604c9341dce5e24d253580958dd4e99fd2496d036c9fdbb710118fbe990901b915cd9d3b8eeedb64e0da74c0e0328c53dcf8530b0ada04f3de6f6bedec3ac60901884b5dae3ab5c8bea0bf0c071dccadf7fbe967a81c408329ae30e9f73a476dec090127224e8f7c5da6217509ecf088f2fb0def887a5228b4a402dc60025f081da276090154f05ac3ec5450318d8d3d4799ef43ddb2d199e74d9ead927d0b474191f711900901d9dde6527599131ef1dbf75bc5d08554fb27e504440e61ce92af592e7bddf8f9090103341cd246bb83e01a371613d03ace3b31125af9ed94fbcfb3094839ca58849e0901ab3183a92fb2c56685fd2ddf9cf7d2a77a5f7b9bdb136e218d93b1f9e9d96ba209015e0886dffd50bba01f19088c5eb3f4c5d50bb209e7cd091dc601379713a8019709017a26985f89f804f88c96fc38ec9ce5d3b7e2bb8c375ca17ea72ed8a946c06f09090118e89f6367c44b190ccc589af9571edf207566611cfca80319eba2161814bf7d0901802c07a09781f0f52e2f160df91c676800ab4126e66dccb66e392aa93aafb4c1090171d85a6d0db8718001a7d815352f9089f9fd8c4c9541c34ad80bb79414bb838509018a6ad844251c6b4f3f57f57ac34bbc7bb3262f2e1764e392ded2606addafc0da0901f5111a0c5063928bb2710a740ba2d64622b1e84ded9345f5b0a03c1b3f3aa0a509016d89d5c44585d4b5f260c29ab90e6560a5a2ee9defb4461430e70444a387f9b8090138c61147a4c5dcdefa774b213eb763d49a11fe87fca00c16e44a3afa902df2b50901c388bd0c28c07a11d77d275b0bac5a6080cae4a52dfaa201153945be3ed09a6909010e43c366b93e4e8b834624159fa5a0d415ac8f77a89ff4f235f60d8e8ab496c50901519665363be0b0333fb08b3407e5b23637d35a0f15de40831f439681211eda980901943a86b49a75a89b3afe73e28938c79a9c57cfdfe3c98c36ece3cd435a8875d309018c954ef5d8d8ebac19fe48bdbb65e19d2b8170fa31d1f5d3316977069466b2440901d879a63f93ccf6b013fd6d3d4a68712f84c6be55cbfe58613bd764d857175191090104eb0e56cce1d36d48e207fb31fe525b62ce9955492aa79709556b67f0c169b1090167ffb2e0c5e89bf869d355fb66f417db6a83923ee7abd2b79f526cc046dd47420901025ef65847c4913a9537358941d8e61cd2bae9df2752fc54db068976161318ad0901de700bc4ba2d78655ca3517e6ccc73ee0aa201e785e007912a05a6d1e7a2458309010377c013063f9ebcd4207eeb8eca9e09876d5b4584d09836bb199ff997754939090107787d84bb13ff3a2b0002c2bba1e8029abd56a5d9f2a04555471e7da3087fc90901ece304265c1e1fe5b4895d2eb5789a8b16383961eb5c9ec28ac2586827ca9f7c090128337119d10d651244aab2fee94285e1e4997014500ce79506f2e041ee9e5bc30901d9a5c410a18dba5ddbbb79f92a6859e8fe3f1aecd9dd3c403a0c840b78ee33530901f7c18241e228bbe84d2b94f2ba007002b6ffaeb3130104e9c4112c34cb754a2a0901e3d43b029d7e4220843103c9340f711589c015782e16a9e75fa7bc8a3f1a023309017b03c3c7057f4789686f64059220eaa7f7e346a6987f136ce16d84478bf6b88909014a037ab9674d45d94a52095fbe7d23c77909a6118c1eff9db8ba40eb2871a36f090193b933bb8e498c4e73749ac8c59ecee5e230df413bf12d2c5c09e7a42dddfef809011733b6ae5ad9f182bb49243f671aed96519f3cce76f44cfb47172e14992ffa170901b7e5fbd4aa0c3c6d1fe57d6eb96233582bde33c82e6c43f374781a8e4d5225d309015bd30b6f509272b7949985888a83f82218c32708107715fe4492fee268e9e3910901f71f1019acce8f648168260ca5b40e008a7b4a64e877763d9985104f79d0cfe5090187b0951b5630c79f466d5bcdb23b8dfba48bc20ca7398e37c55c7338680c32d00901b6da8a11b1e05d544be4a62fbc46e417884b3b0eeaece3f4350da6f44c1ce44c090157354a82bea840f006737e1a6e634bbc14496fbfae091b0af0a0cd159e4d37f9090155f9d5a5eb505b9ad8705f6688fd7a65b6955ddd3a8d6177255f96f806fa8e5e0901970c700f5876b37e25de852001e843ad132a08f48472b498a71d0df2a6b3751d090153c608658b3befff78f0923b58bbd3b81562947ea18c0dbb91808d955c1fb0d40901795e5952f72e70aee3dde06cb4b9412e464bcf97fcab17cd73b14f3dfb0ff57a0901e033734bdfa4fe81cda5c726b73363ba8c7fe705091b53e5d935f811fe5b317d09016a41be508212d1303283007c2809ec1fcc0a6bddf0de28dabdfb55e39dad64f209014acd8b71ba0dd30f34cb6fc42307dce0e81f9474062772ccc36a30dd4be5808e0901d790d05036fe7704490ca23751202571f26503295aa6202dadf8f072902a14c50901e2efe78a77d57858574a9e72679d006e48270413a48191e01041e4ea14620ded09018a78180a67c0a1bb1068b1d36051e95bb3031e9015442525cdfe3ab16c94d47a0901e4863d1baed4caaca8b9cc2570f960b2aec5de6567d33b1045a7e0ee980b4db909017a845619ad38ec537951c81441b9f119baa0c24ed185fa1f9d95b31e7bfc16940901a3556cdd41a15d36fc3ad1f1fa7edf978e4680d5fa41e060c20c91867ea7792e0901954611375e33a0b4136ff1fa7cfd91b352cafe163e09e0aa727ab374f79a55470901687fdb0f2286a6c6ea38e3370efe559781ed74c3752c05e5529792db251562b109013da69e84ec72c4fe526a5740922fb453c5e4aa6a8852373e5119f208d16c59e8090176672d0e52bcae65ff3c6d2c8d7974eafd4357f2b125f8aa84ba8820d051b7c9090180622d51a7102e27e8dd54d6eafbcafd54184429c0adde25df239ff68263d15d0901c30ae922045997de204b19f35115a430224407d23776e94f60c1d331086acad30901cbeb72143b7fd8360e0a2288bf96a85e46cd59a90076cf2a8e241783635e3f1e0901109abbf8e6fa76677413d85520f78bac7512becbb380210464b7a3c5e31f0cf30901116a29338cf19147c50f0295edbab82fcdc2d6595d9d6e23f45c0a93d4e66d36090161d5b914373ca495e0460b35523a3e80b94910045c4bcf681381f8517542f50a0901c9d697519e683b634f966bb473d802f2e06506d9731f7ffe839286f8d822d416090148c9682d3751ebdb1673ca7e3ac325f54f9da1debfc03a793c5ac3da02f4abcb09016512e744a70fb3eda691bcfd2f8c1085fa2d167b6dd1ad33b6a114486e82439109013cfe1be4f08948962de6ab58bc98ef2907785c6bd68550fef53bcb10269ab5920901915d1f7c88d7093d6d08806f6f2e4ef971174e4b6998e843684fa4729a5cdbcd09017664713ba39421fa338f9141e4b8021c867197664e0da255e0609fb53210eb600901f8a82f5f467b6333641ed870dafc20bae00a35720eefc5b65dab1fa5bcb525140901d909b8267d1080dd17c923e92e06c705851149532aa2cbcad0b1b6ce439772f9090113dba8ebb9c1f872f16eb5315bb17f7e4e2f79e9ae7a48e53d462edbb983c9800901a558db63989c635eac44ebb5b809c5e330890e35ec16f9e1f56ea57e2c993e560901082e7859e5485ac5b575e8275dbdb8d279efd769b4aa7cd6a55a7c2bf17cad660901276b96cea4abc44e5fc449c5f8e1503bf9af9b4c6d8e48390e1ab9974f05f8160901ec6b900408d5f628f97a0b79820274f888865ce72b040d74f89d14a3090dc99809019949d8314960226eee3c74ae84180b7c52208c36e8a681480b5faeff25729a1609016c7ad9c570eabe75241634b6a38905079921df562c58d2397ce5b9596e09030d0901437261f84213fbdffd33f88295762e9efbc86f8ebb667d22e46e2f54816dded30901992139dd0db587459995d3e8567d37c28f4aaa28e60ca03c6587c80a0b9f3db309019b1ca19d6ee7d8a6febb6d131ed91b054931b1325f8cad30ef5b9bd2a8fb71bf0901556ec3a3dd3795a5c5c472b77a49bff8bea64603e7e5d0be367db48f2cb6abde0901aeb5c60ef1b2211904884081e66c714aa202fcbb68bdf1a9a7f3eb430d4e5a520901ec7eae014f0f00c760fe6c35ca3b7cd5123c54f6721545fe8053813ed972ade009012b4d0d392d75e4229ac4d542a84e0a8810eb23b28eca8a4dcc113591321f99120901e2fd648dab8c8f72410b0ba2869e5d6143d41c39b4b43033fdb9617ef79d990a0901c7315025052cc6683424d5b140f5ef44796bd11dd292fb52ce59fa617ee893d00901339cd2647349aaf0c0df1f5fa89741c344c7444858163f81a87f01aa69beab74090185bfc5eae860b637689bde7c5b218ee9db91f198a5da36456e82b8e11199763d0901278c7cad8ce742c60331c35cef2a7ea1e3b3bf85f221a3a403e804cf1a925b0e09017c002d1aa36688a90d2c552aa2721d417de193777b99150d047a81585cb960120901ed277adb1abe57c54433b8f8809a580f117b743b58316fa0ecb0fa61c4e55c4f0901d66b9aec63d0708c1966aa4941c5970f42166cde3e25071d32c9920b1b3e495d0901b3fefe05cc5e84cdbd1f1550720db5f29f0577ceba46c3496a7f55032ce51e15090182a03a560a29ee768751ed9e74d1d28675fba1003f906dfa7d2a15476cf34363090104542a9b98d856e2b28eaaa68fbcefd459264ebf213069ccd233c0ffdd4f81d60901030f20c33ebbd7e02add990258713cd5a741b6910c5b186e1344bc167d61570009011a541e68791c9bb03342bfd6e051896c5ac3732e923900d4198a4e5f45fee746090189903a92729f76491b7dd41287a436a71fa9148d8bedb8276b2bccb46a33a95609013436de1423090e38c2542a1e8e3cbabc5797c75b815ba9ccd1eeac48cbc6bec6090171bd981d42d15980f42a88c1d8a269d754f7834ba49caa0d4d04e695eb2ccd9f090156173334573ea8c6ea8c6f5fd35e075902d79ebe24fe984fca974f30c3cd47220901d5d718bfbbf4e149ced51b1b82789b2a87e908c95151e0d87bec45b12e7f1f1f09014a00b2384953b261f1f0f01401a4d64bfadb844477a57fccb1debe0c6889a27b0901004c76c2e1d8d08253ddd39610980c1481caa381d60ce78b32e03250e0ba4b740901b2451aacdd74a013e35521a5cdfb80718940949b4aaebc29ca5d15a20039449309014f85e5f4c4a0619a748b38b9844a16672a39faba8d516362d601125c4853134b090157b838e60db7053ff95c493fd119404a93ca1813d7e73c960944de837c956c190901288520dda1b2f9030672aa0c6e991c892a0bc8e1e70b929f3ddb609186944a710901f0760a65454bd6829bc57affa9cef3b53b506c38aecd132128dd5d1076bda1970901da6fb0556e83b457a02672000d73e3de7e557465d59d3e97458d056fcde9549409017ad52c704b53067f2722768423b0b0ad29bc06dd634aaab4ee41167695e171ae0901c0a636395155c062cdd7a0ada368f0f735a20ed84a3e483a7cb0d565fcbf1597090137f1cf6d7dfd918a917b03436d25fc1a176f7c4244c0512965177ff194cd270a090168a1c9ca2f70bf00372db5c93695df7c8323d5e04fcb102b3822433fcd2b326d090195ce7d1caf584bae005bb09c7a23f97c7b4e9752da0bbcce3b93d485f0d6a5cb09010b631fabcd9a6ca2e6369c2e91ca7b1178f53870a708e10c82181c08976ef8e2090177d4938c502474e9ec1ef97d058c9342181aae158c576882bda6c0251d5017ec09017479570de3871e41abc9b3f47c416dc3ab5ec08e060df3bef4429c285f5e84560901406920490d4fe8a1908ccb232a519a30c6e91877b84b9bc38616497f1e349afa0901f3a8ddec2131f2b929c0d2437413a4c3f01839cc38b2b61b7b2f1550a37644eb0901da0bef25a621e6f87a427b1e73853707ff11d570a8db935ef94f314dae3821390901204190e52eab39de8581df53329c6b6d78de5d123f48d43615badef9d8c186a10901542d09939ad8f5eb280a5e9f63ae3abae94dcc22029b1c9105c0c78fd3c843e0090109cfe7b957db966a7b220ed5305c25281c4134c85eacc7d348061a6251304e73090181843b2ea3385328d6d15f3177dc13a5ecd23706b35d56214e71880df51d696b090115c1ce72f96fd625c734dd8856832688f00b1c68d7093848627094d59bc86752090155c5038c3a76bce1deb0f4c5e7bf5168ca717cbbb781abe26a8907865de404f409015735e9d3c0ee472ac3aadee00ecfd394d11b67146303f60b3d4e5f6080289a3a090110ca9a49868e4089d08c0032afd62b04bf155fe3750479bccad11f9bcf6c0df409014419cf7fba1f6ae6018eacb90fa829bf0f67155d4142b184bf587570304dc7fc0901835f37b8b68807f3814264f2203295a1bfe95cb4e25fce5fdc09d03f9d38145b0901446e9eeeff09fed62e05deb8fd02744686badc0cbe82f42f7eadf7e09bb6157b090137a3bfb5a682029390832568a9320e4e9f1cc06ccac444626ea3093507ee27dd0901986375e1944d97be47017f16efc4bd40e6a4070bb421f5721f19ea51bbe7680209013da55a107dec7aefa10102f2317e93a220681a843e79499b7cf0b5f07628438509013b8a64a304075c0229f9d698ad62cc82e439ee3684a1ca4fc297abc403c60fad090140a76dc35793d212100a9e98c0efda17053651b614aa51d31833a43147464d660901ea7cd570ee52908c57fef587c532155331219a81e3b73ab633d0559b8510c7440901de74782dc5be304fcc09ff62dd9d47c09d158d7f45fe6be2c56946bf6eda348409016e3ca4e8f3ca39ccf0ebfb307f818d4bd8f17672dbc5379ef0582a4be99a5f2a09015737063a991431340bf2553df6b36b6b073948366a3dc9b8eb6d328f752c225009013003e608a507e016919b76b653ab25135e155326be3f5adbdb2d634e905d13eb09011e2c6f07ce881064c00721d15b8f5287175aa8ecb6baa38de993d8fc3124ee600901eb82251423ef1735072d1df84a2aff3f54844d541f000ba3af9535745cb67623090141a81a6627581dc3954489911f4cd76dcac0897efa01f4b37ea1f0fbc845805909017dcd406d1727e947d9ea3f3d55118686dcbed7d0716d3dbe754d9b8f5e1c166409015ca5cf83b37a98bea7497fa7d852c6da92c4c42c03b86494259f9480e8b071230901022d06035c81b4e91a1abb5ed04d879ffb84b0e1c52bd727b7dae7d4fcb891260901025e3a6b6b2b49961ea7d9514eeb30c6c81fda93f40da0f830b497bb6d17192e0901ee3aeba0073e93fc842e734a87ac048fed64118722b41476720647dd2434a8bc09014dab9c682b2f9a4dcc466682d92d3b72d38f0c8ba2eaa19cc7aebdcd56c2299e0901e93a305bb11be876fea7fe96d400aa56be9a816a652366158ae8fcc6f7cc7ff60901517f5e8ec4a86ecb221ca0d8624f815c7ca23037f459b3537a503f3a505db8f8090192331b3d5880cac5905a333665d42797afed710f1acc99af8e0479efc76877a709010747d2a2171f3c6ae352afb2a1971746d4f009630f7edffa5459cdfa919c6dec0901371a3554bca32d85afa438fbbc88d32880052531b06761bdd71f7fd45717360c09011531b1926a4344fbaa368e1f07d5fdad543bbc771a8d5e471ae6fd6f1425e46109017a189b750d58ba69af72b223114b8ca7697c61bf31c8c75b22b287cca6cae24709011f3c46ee4eff3f14c80d99f998fbd0d53dbfe94f94ab641084cf8d6466a68ac70901608f73261ec00d6bcbdbb9626abc7c1135d19481f33c70ca8fb76a4aa6a0b99f09014fb3cb495385eb0109bf6518fd3e34892aba58331432ed0b3742de64be65e88f09011513d41916db1607839c1a375f747b202ddd629b3d938789cfba10b38042d9980901e7a0e9448910881733da2adc11ceb05a15b7791ba512f735bac532e2fe34736f09014430ddd2eb8dd75a16b354c82c4a427a77cafca2dc8f867c255fd3bd8589360609019ac340c2b622d0e9a30b3d16e65e1441d5c0e1dabc2dd934a846da730c19ddf20901c210908c22d3bea99f90634396ca0667244a3722d7c2be24960681e174e19b2209012899e904ba73717748e48d7554d32f754c9401a0f7a6277483944c02d86caf270901fdd4b3c372df8d748ae1081a2034ffc30bf8c6afbaf6efd7c9ca3e97f65a008109013700c450d58c2c2426ec845b23dbeaa55ee977cba1a279a4ea5fed22d25c4ebe09012868f9958a1d85b94ab13a2d61f1599936df5010b3c8613cf4ae2e293bbd694e0901ee8928dceb67e092a0d205af7dd838f1ebf77a44290f8de1eca7365c91c99a150901ed280b038ecf9ceef8e839546c268f8efe14ed4b8368b88ad43a5607f9b639ec09016eba9d19a554e7e4d1beb922bf55e169cd0523ea041d8a3b72a4e3f40fca73d60901e1e6121011967bfc5b632d34e28e72a8025ec197a869649e258e345b186331d3090113ab57dd93791f60437148398e91d4759a47070410ea201dd54d520c675715510901c438debdcd4ad3a24822f19b74d7beb6b8943df808d418e11af58797938c900c09019f4ab93bac002ed1fa628dbb08a8dabd0a8dda36327aec2d41ad5ab788d017d90901e07f1f77fea156d41f3e6966cb4da6e6c7451a221d8566bce0d0e29c2b4e91ea09016656d55b92791a4925fb5176490d4928064227299cfec87aa928c3c27bcf58c60901efaa1b24fbca9f6af203df9802097193d3bda9b0a5290e2ea36c73fd99b8c7160901e1ff90a8ff1e061334400e1fdb48aea0c4f0fcb6309f80f93a4a36623cd44f390901410bb85e8837b51f58c9ebd6e4651ace53bba389e2e0a847c82b7fe17b34ba410901beb758395aab513462b45d13b6b37855edd558891f53d3d020021346ab887c700901f0f3a15590018c3dcf3bd734fa3b8ae8d68e77755fc3d7964fb722908aaccc610901fc31f9707e715699234b0c2b07076dda78404dddcae5073f45552f17217a2910090153d3e20889faf94ee2fe3dd6dee0effb07fd07d6010186ce739d36a470670e0a09012ede1137aeff4fcc7814afa182286e62a11fb411b78223de5da80ebabf57bf22090164566d6f6e6b12308368d218587f44015187600e62f524ebe7abc703077d6bbc0901eb9fbb561c107ff98a99d25ad98af509dffbabf411c5e465d23a6f90815bd6fb09016cda18dd29b3bb2612b71e8517eae1c215b5dc669d363838e7997cbddb5780b309013dd56cc6f1e71886365d2a1a809524925c30932ff384593096c446ce745566a609018026f5bee2eac5bfdfb345100292e23f511846de0535f222f78725a2e1c134750901f0b57dea48fb3867b7ea504fb6af653de6d59e1f904c4fc0ddad4361a50527c40901d328d770141599efcd7f5acbf591f6667c3c850997dd166eb7a8a883953d573a09016a96115f7ea0b353716f66c5c83ead91287bf72256ccdc8a46a990267a12a3ec090115e4098d5f7e4a3307a5d1415c06d69be4953624106ef3f98701ae033e68d0100901bc16ad6620a2997f7b5361ed4cebc7dd99ce11d26ededd007bd3547403d8fc980901f53f7bac8255c0370f6736267a3c0705ed04702d6f52f4d54a661310a2aafcb70901d55004f7b55a7c56a388cb15d074a9610e87d7b126640ed735bbd46da7b788740901efec319209bc749e6252f01327aa0e9be47690c15e444d69229de233417fa9740901d7e59d393f9bfcdd739cff976a27b8effe014814e1434082dcfc0fa9570144120901f59dc6b8b0687691e28f45fa3c75411053f1a212bcdd1eddbaed6a916abf397c09012454f209473324dc2f0cf8a9989f76ce96ed49bfb5317620886cb1184d3484170901b853b37e2c5dec09a449b1df54cdbec2f5e5de76b47c0052bb965ac9363efe990901c156674c54903ad321af678b6833a91009bbd7e2c3d295e0b423307e3466da550901047605ef7b9758fdb2c19d690bcbf05cddc4f9b458aff2d8ff5c1f2853adadd10901d5f13b27b69f5c639705b658df4f9a2a9ce595c04f43c2f4c9328b789426947209010aaffd8428848fc5ff1041e24ca462f14827739f1964655460caa28b2bfed32409011fe48cc3a042874558b88901726d06674f5eda0b13dc5a529c2197cd6e9e53180901028bb5f6a40177cf0f7249891be4b3a8028a3c67d1b96d1a98904a4a64f9dd92090127f6756db801e6147003d14c118dba77080075e3081d4858b502c3c3de058b1a0901ab7edb00586b71b5638b7070a0a7e12b70ce29522e42d2c343a5f53968119caf0901feadafc44a5e038a96ea48398c9055f89e58abea3fbc485600e4e78599e7d9940901a2178b7f2c66e65dc6a0e78d587fe1af8a614967a86cb093ff2ae07c46fb5eab09018592c9705f664b49005a5970c06d1825d456e4b4e605a7deb1f6f76ee43b8625090109e8b753b44fb28c9ce2cfaf59b551b3309a657f47e4f28a8d138ed1e19babed090115095215b49283e3c4789d24e78fe9a4019a3da2ffeef658b735a0767b6c24f30901da4d570f5233e3b51c7260008a59a4aff168c00e0c5cd1350e36de21804f3847090122d93e6ee179f338c2aba34a8fdeb5f35e1bb893d72d794d6d9760e94a2b8d7f09011d536558e1ca18f36e5733ac8b1c94af4d7fd45a98917da7fd285c7199a319ce090110540ecd67340f1fc56cca670b2afc66a51245b8f856c80651de37a908d7ea870901bcd225d70a33bcbb293595a40ddb017ce5d45033eecbc822e7f73d2f909fb14c090174dfb386968a6dcdc3f0eb793778d9e6771058d30984378b93abc9cb0782199d0901b15d982f292011023444c0013be0599010e64ea380858e1cd6e6e9b8c062bc8b090169b62cd6150b1371e5b85ac1255ab290f23102d7d31c96246a247cd7fc87bd45090193e05398726ac9b741004a2001df1b3d49456fe6d84db1c0975cd71db947ab7f090183593f34612c8f16e5365825ca9b28434c4b388f91310768f34b3f57570928c309018776a750a1b368f94b85e533cb18e0cadf8aac270b32b2168b342ad89cb9e39f0901cb5823f51fc909c4e69cfdd27ad163c324af2a54e76397bde0cd3c232d28b77b0901175bf5885e42953776ab6cd0a0684b0ab009b2461ac9317243a460b4e0f487c10901de9cc5e5c6c162ec20d47875569b2aeb9ae904f3581a352413bed09fc864d2000901b10206188224ac5504b14f18c05d37cab66b656c589c8663fd34ed69f0b34a150901614a77d974386871a0d655977458188e8a4f0efa8ffc1ca776e69b53b09b070e090117aaf9d5385967ad09d13268c60d9abc8e66d278226a200e269c6bf36a52be780901ca02626803c4d2b4f5a8d5813967b63b9d0664e96d200b549015144dfb7200e4090129560dce3b799cef089947772851258d8563830bd15bc0862f86f4549314f1cf0901526e0007c9e728274313b16eff2e362cbde9da95e0ffe80a55560ad8c3434540090164c25c6a0fa882f0d728cfaa768d88408773e0d8e0099b0a76e0a4e288cdeed4090154a7ef4b3342cb78f6ef05dc6a89714f1b5699bda93da4e1225f52b205baeb6e0901c36cc469c09a5490e65aee7f43e6cc9076e090e8716604e62e502a94177f24a80901c4b2bf0e1c54fca6573f613416e9a4a7c6e9b3d76457afae840eab6fa1e0754309016f2c96da5c08d19487043cbed6c0e31f6bbb121d2f4020ce064128ad09cba6880901699eccf1727c5ccecfd1148a46ebbec55a87407fbb51982594b2189deb6524f3090162d4a58f9b67734f082abfec9dcd230434e19642df5a662c810b98dcd5d7fa7309014890657837e2c58a23f9f691662f24cd1a1314db0de5462ba6b301712ff0563a090173bfec191bc0cb4d2fbaf9b69436ca5b1e787b8c2fc5ac9b53ec9d23a72ff2d30901f21f4daeaf5821c7cb51a4fad623cadb69bd2aa0ea761ba4ac2c8f17e59e9c760901832b2475f5b11d15a7c3db469a70a7a41893e72c2a0d1515733a3cca4f54baca090137ec7ed69bc5c2fc2bfac19308cc7916ce1b103178976bc5d273f6c68df4430f090193ce8c5427f4e9569f2afc7983f259185f2110f931904618e3927281c954720109018a8c168672bcb27e890390f07dcaa8797fb22dec5a4ccd8f749904d4781da35f0901ff7bf344ce8ee340bb599168b7e90b45009243de7b2a0f83fad4ae80a02d502609012edd6e5183ee9c8795125fab3a962699c7f7ca9e1eb75382dd135b4346b69a6e0901877a777ed504a8615a44fe5de3e7ce2e8981c30890f080aba07089e9d95364cb09014167b9d042a85c0598bddd04cd7eb0c0c028b13b9a0ea0c4e6aad19e523f9433090103369de01dc922dc377ea68a3f5ca385594256e4133b22814752e9fd6c5bfd5f09016ebafddc8f323bdd94db3b83457fc8796d2c59f0fd442a05e6dda56360dc8a7e0901060023817ef1a380b9e5b27139e38b2977589e1b39769af443d174cd869032d7090197aec95cd3535487ef156ea8a314880fc1f69a28615ba61c48028e74aec7d69e09018595063965439f54d71881dc36af161ffa440ef1c2392446ed8d19ca66db21af0901ab1f96c3ca15d9541f0ca42e893015fca577f994ee64def00679ddcceb0d6c570901386910131a5842a240b96a9a0fdb466f4df5def762639b35616930542265a3a30901e2aa4aba4be94241596b1cea5fa4d8c5a22cbf66fb0ac2e10ee1b734585bbb7d0901c4726426543b79757422363fccfb5c378ad39f7338da68be6d956a7b5ae53f540901ee3df4be14e182f79ca390463f84014f0119c506f6e4988900bc0136d6befa9209012aa5a4dd791e33ff2c7f1f623978cb4316cf87081ce8439bfb09aa8c3b115448090115ba0aae5592c23743440119ff3c33a2e56056093823cd37fd8d2b186a4e35710901bdf2b79d124b16b4042d9b0e7b03ab4f8efdeb5e646294d7696a8dbf4e7f3b950901c037eaef2d09d1938c19e08cfeaf56d51ff8204ff618dd6d8118b4746fb4362d090135d5ddb544b11be08c68ad68529148566ea222750cd31e53321f5b836e62af2909014e534414811f05dceb0db8b83744bcdacc3ed16045b6ddead7a8a908b77a241c09016bb683da8d8a327c92491e82af946adaa18d322fbd97a03e26fff1408eb17c020901834b743ebfd4f326a8c2c37b390137957d4440c34d471dd6d975d78b460c1909090116467cc7eafa835a5f9f5a13c346e46c0e679addb6bf1303d1aac238bde872fa0901b28efcd1df506195395b714d4eeeac908b1b965cc1ed4ce5825110832796cf9809018c860089832f22106cc66f8685be68d399bc10eb6a61830858afb887364fd90c0901b2ea8b77dd57cf40850532f390a9caebafb7c94377b11d8bd27d7b95ff4c22e80901051f075808190d0982b8c57606196584eedd6d08679cf871f805121809a65ef30901a7affb398696cd594490aebb4a3cae387b37987bf5fdb9726b815c388b90904c0901dd287018aba1bb2b010dce7c16fdc3ac7a31f562c06a9cf5d8e55d5289c1889c09014635b392bbae8d2928eae5182576d5b5117d1ec66c38050caab8ec42da2a24ea0901f3732b6a46136784a6fcc7c175126df56147acd254fcf557d5b5ffeb8686d2f10901fcb57dfaddafae392133c588d0423b829cccacd3f258435d4a811c6a41ee18970901cee49b45b80ca82aa6f9c84c46c46dadea8a6dc16844b284fb9b2a0c009aba460901eff2f759eee922e55569df9d2969a01dc4617a6a4cea789b9986c030087029880901d66ab2f43b9fb492df582e2f3a27b76fabb7a66928d91e3a817c4baae7b557ba090112316c8da083cc5f8902ce965feee9ce49c25c5b2dad74886d421027e329c84f0901edcee6bb3b0691a807f94da1b0b4840e978e091507c0b7c5780cd38fb532cbeb090175eb332175d01991784f782d955e261b243ce36f74aab6ad6a323b4f9e13bb8b0901204dce9198fd4a84b93b6bc06ad69404fbc0f942d33b8036aee59f4f34295dc60901b546143defc15da595ca5f7780a43f227a3857346af31bb9319d555b304a96120901bf065c3460fde53999880cb27196faac978229e62314c1989cea7abf22c6da200901e6a24d6bc90002c3b7bac193460db96106b3ae4722c4e65364478a3a86ed136b09018664795f0c703156b953488959d023c6586ab454ac07bcf057500a56953dc3b1090162bb0277c8c843c65b86a076420c32fd87c023400a94a446c25e6dd0e5a90c5609019699eed251d345959fbdfaec4cac4152d847bd8d993b4cbd3d0529d6df94bf8e0901624768c0e46d5175d93e8888ab3a19da824b6b194ffafbf6a2290fe7a50f6f160901982ddbe357095eaf9e6232f164bc443cafaf5ee29351f9ae5bedd721acc0badf0901a7cf09a0712c4d03f5ccbb726ea6dfd184a6de64b6fd512b4906b5b5d3f50db9090115e93de0ec0b097b54c58cfe0773249c166dfa040f3e86c911dad45b6acab07109015d0df3a83f189338894e55995da3b03e083cdfa5be682620b637d4776bcdbc810901dfb60dd4bf8667d8855513e649815d397792f60e3e37d42677e4801e7a27978e09011acd1561e30f466f14e561e90b2eb26ec8ea0d52369e8e5d6639665534f558b009015ec6363c2ce4212b231cf8dacfbbc841efe4633bd9f2e4fa9b9bc4b7fbf0d7340901717d67c4b49c02743cc3293a2ad71bc016cd461ccac4dc7673b2bd2d317ba7ac09013e6a7c4b956991c98f9cdffb889e5ee4e6c8bd44924f6858d9b007e4ed6d8bdc0901bb52e24966ded08f35a7739c1e9f3950d13980755ca6549d0654bfeb3d7bcfa80901bcd225d6ecb8e25a8ff62f642fbf1cfa0b9782117defa2600a4888398c3e9aac09013a107fdc17eec24749e475f82e2bb34c0fcaecff6a93307d9ca3b40f5c97ff700901593481fd08755d4d9d8acfe57e47f6f860a7466b4107a89aa08fcac7875f241509013250b79ec6b03d6930a3bf14f4a9e8eb41ccc0c58e497a7fae07fb138dcac9340901283873de6ee14e0270e11ba67e71d5dd3e9f9dd14a39dc98cbec6502e780d298090114153e7ce0f18a14bd2c78c483743f3605c3c65db5b525a869b02a2fa227dd200901cef3c0918130f2f1827fc8dbbb471888d54c374e5a086b0683aa13ae346c8f10090147bb3ea006fe45c7ef0f6dd106be4fbf3baf8092d77599fc83e8ed8e0edd459a090183956f36df1ac3c26e72e6063dd7db4f267ef82bb50baeef5ece7635c3474bb2090189ea7d4ac003b671a0f4871a262848a8dd2f54d09930b7a8342dd160f7ee06dc0901cbcb4292db8948036a40e7d2c17fc175d3decd3253b054fc07eb2ccaa7835744090140e2400fe7af92ec2bb6b4aeec68f8e9fa4fdb2058da4f179f819c16fc344d190901d9bb84fcf9181d84ef5caaf6d1c53f62f576d2d33454da81bbf7f28f8156e0580901d356affa987831b1586d52a4d3338ca1982534e057805570b7de02fdc58df74b09016c20010ebed2f2cb388f74eb0a869fe4f92b18a99501c05a2ff7035197c8d1fb090106aae672eb564906bf66ad2b83cb60059e53f756b228a32671d2b00cb0a706d709011cc139b2d299bf0cf0714032caadc9a9c22222ed2b2507549be213ff4e255623090189189aa17746de7af8a9488925cab687ed519499c0f9344441ace43dac94cd42090167c5a7e64bee4c360e8e0f7dbbbe28e4cb2c663998153b0a5515677968a0732509014862df7c6a8cc18c52ff84a428f1f0ff2bc7d684a3de9a0a18d6e1c44b7a1d030901cb3c6d4412f17b07de4100e8499c78ef80c74c9a0a3a1cb55ce5315fc27303f609010fce084119c9bab60658b29ce57d3ce4b47d2803d91cc757a7c7f1486aeb21ec0901f2fcdf48cd7d60a4d3b7cc8dfd400c92853e5d92d39a61f09dbe04668e6ad5e10901f07129facea843e48a11e9d04905176fbfb50d30864629ef5d83e4dcc509b0a8090107988496a6fa95cc2b7a16c282765c7179d563f65b2c041e29a11d9841c79cc509016643977b458cf0536e6d887c3b704916b312f5952d9d4b3bff1cf5fb00d8460a090154b3de2e2c930ad90b238e449343812929338fa793a21235518de082edf25fe609012986509db7a53707db566d5a29a4f52370dd51f636fe1cee9b2f9ea3cf13661e090176c049c08506000d73400c8b06643ea5495464dc2604e0f5380f2574c6d0c85b09012074c8eab7cbf6bcc0215dc7a591730734433e81fb01430c0ca05c9db766401e0901201b8ea220a910a40953d731c8ee81dee5ef23c03aa6c7d1bff6394677aa99150901d1c4cd9a33c407cba964843aedb20580e79b3d2b5805aafcfd50b914dce7c9380901f0c332d9e4cafa5c8de68fdee4f4fef2fc6d7f5ab83653e551affe1fa2d99a570901bf98776879555ecaacaf4596db5664fe2c60760aded561860e4fd452dbf2eaba0901b9c6116fe6e64b448bb9e76b10d7fc3060ce242da9608e2840d0e074a94d2582090175365ba689f37f101fbb3e94857856197e4732905380e9e969f1ccb36b3759700901cd3c109631c16bb5010bf00de06f99418ff6040d61e5c9ab308d549f41a4ad2f090102c657ede8616b60d5c1d69453e45ce239a33952e83454da99d2e1af02e7dec20901d02e9f8bba5618fbaacc6fd0395c828bca369cd0564da2b85e2f76930c2f62020901925b4a414c49e1033e82be37f76f90a0120ec51e7f8409979d6b84271e8229a3090165b031031ff567557d968a52b2fec80b051dcd5cd9e1310b98499651e4309c4c0901a6171b2565b0414ee54a94573c7326dd80a6c9503e953af5c4f12ae301acd8420901b2cffb12fae3605d1aa46a81d5c977d6ffa47701767868c3d39e994ec65224b70901ca0dc7436e4e4ded3b34dd4ef72494876e400f75ff493c8a776256f75ccacf450901ab495a9a31a5f870fb8b83d1bd19c71f54064a5954a86f69c23b349bcb31cc45090100f006234597c052f3e41fa7e1195d52400d3e9dc57fb580312a502cce024346090193dc30d835f2860107b7ba611df90a6daff31e93c719aa9d91537eabd846cefd0901c725965be5cd9b28838c324f73521cf029263279ee5351af5dfe1d079e03f0c909014ae13fd42e3f76b21aa44616afcfad95e812ee0110a66b9c35c61cc0e7450adb09014a2f5b8d08091ffd1dbe7055f5920ccfd816e9360a931cd832d57710eb999cd00901ff9a820df23b6510950b7d9082a0942f23fe0336f68af49fdc08dc3f41668e9c09014681d07169b750f4b12a1e7d363556c945fb08849a3cd29417a197dbb2039c590901cbf89162d7d0abecb95f2fb5d7b7572c73cdcc3de29927b2db34b09133fe05fd0901c643af48c1776cce1fa3c984b2554ba26ea4427f108f36d5538c08ddd573a4130901e5b8956ac12c9acede6debfb01bbbdd4cb7a8b23d084b810dc26bb75c5dbca7a09016f39948eec16f96add9ed48c0aeb693157a24c7302287bc6cb9c428fd0d92c0609013eb00bb258478fb1b9b7562a7a6b43c57e4d8337126b5f7d0b56b0573b635b7209013196aca86ec12dd6e5f0f7c9dc6f7977f27be8fec41d4c193e16f44063a201630901f9bf5ed28ab1a8d88fcb1541c7301c5ee2a74709e99e66898e676f4ae6d600fc09012228dc1b6a832e32bcbe6c50a124949e5dbc0fbdde98b3ef08f8d436825c5e22090113fe58ae1e27742ba8bbf12517ad442da783c79b5e8f82601d16d446926a27fa09019f9e37a93966b38d929139dd9d811b67d634950fdb5821a982deac5c16387b7a0901b439a36cb63502f5942f81d96becfddbafc096f4534a35b459ec48d5c2097e7c0901983eeaf042bf7c0769b5da4f11b42a22d7821feafc423efec24cfc17d29d9c6c090149b3648dd2356a7c6d6401286aef6fa2ab3d521b13f044b9e2e2a72c028e707509011c0cb6e9e0d2eaaa7e195da3fd5d0e9019c2c59e1e84bf1f79ef0136e5e6a7ce090126f6a6eb9e368d0133bba2515e770ed553394b7d399d77cce040a61077e6a78a090125be0df7dd2bb1f1a1d7a07244c8082936f280fe73f3567f8a4ec5bf5d00fd8b0901cf98533af83e4bbf9b9397196318e5948672f2234ca6ca40eb0ce5c641e858100901ca0e02033862385c72a7daf5856ea105741a00285076fb6bdb4754779f88012109017af61d8de8f4d53578abb4958940b261f2006b610176095409d27f08d70ca605090160b889902f48fec35216b5cb9189138d8e2d7c8292b5bdf91c4b143e332a4f3109016ab93621c17458c5ba35f604fe9878c7f0d5a8769da521a437ef20577fbaf3be0901687dbbc7ce4150ba0a6c13330c2d8e8f3d11ebf7f9e101c8b84255a27f359a3b0901bc97594a4b993c4815fe6f9a7b5ed0f1751e0fa6eaaa566d9cfe24737bafefe30901ceca8f34e0907373901725c838421ba5d944e5ffef06b2c980ea1d8862ebecce0901e5f55112534aab0bc114e6f9aa489321bb2dd5e7a0da4bf266bf9dc2b59112cd0901baacdcc28107524f3282e15fe1bdfb2db913bcf84874a1bb6a9bd00065f70a3e0901f7c469b761387e1e0f0f5ddbc81f3062a3bb407588061c614f4163b219fd30c90901a0927a4ab797ccb9a1472b4227c603163a234454ef4bd2abd02aecacceb5401b090151cdfef0db476f7839a9e6df9e747be2eeadc180410758cf0519c3602ebd4ba709013a8970a46d79f63dae9782a44eb51f1a9a511358600218d1d0c222306981ff1009018270a02c65e4cea5ce2f8d7c5b69c10fea4fd8ba165b3eaf53a0dd934e2699d7090113f091c57c402f7a567218daa082188f2d8a3025452a8f022acd205b4d1dfb1d0901e0fd3bb9b5b096fa21b1a161f63f7f16a5dda655beb4b621ffc78f0e38178bc60901eb66bd4438003dab9bb98c9bd7e9288b6c032f808f54289e777f2924463b14920901362d984c4ca18f1baf127454ad4da9c341efb61397ec92246f01a9b9643816d30901b26427f9f7a033c14d5d00b11df22c8da63cd2390dd14425103af558d675e3e809014cd18884cd24f2eac37329695c06aad1eb8dd288e03721aa63c4809468b721280901e9882a4607f37505d23280fa0b1b6c029abfd0d2ba3d4b4e295bf3289e9a687a090196696521d92d46933d803899ca5243b869ab82999a93a5b48bc192dd0e7a52fb090121b1e1b0b0dc03e81919db2b334a513bfd67213a725f41cc51b26cdd96154ea209019e2cb9c4c3aa7556e4d8101ea3c5e89ba4024c611210a7236b82cf3d656f851d0901cd715734e6e45cafc2c5340b9866b03a9dbe7adde80b75f881c7e01f2a01c49b0901697d47c3f19d5fe0587ded0ff0a199717af15260d43efd775a1dbd4e791f05770901d94b4b4434043f721784f508bf8faf84edaefc253499c0a6cd5e302e38d2b526090117bf944c2082414e103b0f83c3c703ff3cc7669ef96a0521078a7fc6f1ba979609017d42453b2570509ecd813a79d5127afccc9e06dd95f14c178ecc800b583adc4e0901db680e6dbf273888df09e66de25227a03135a19f60549085c5ff6b5f3c4d1e0609012a85e7d6ce4799a05d04a404d01f7f795de638eb2d8f25b83d1bbef7e4e4232509017b7de790ce5139eff7ab4bd7ec05cf29313daf1644ad83b18df5ea75641176c909017f361a59b02f503d219568705c4a1172677851efd732a63072c362d793285c350901119ec94aeb889517b12a98703f041b6ac06230ab247ed8f3f2f124563abe296d0901a2a4b0e8ae9ea9aabc37de6aa83e284f0468b7a90a7100238c4de27a4b1bb5c20901244ab19fe58c3b45cdcb7e70d991b172c8f8b0d8d56367a395e1d4696c59ae8b0901f27738187b1fc963f3b5be00dc6372a4e0473ccbe6236361ee5c89e1e0157646090105d582deacc53f58cb43f448c9c06a7acb8cb94de96294072aa627c33fa2551f09015fe18af87417b62ac56a56b5e4bf0a589bc383652f03741b9309febe966664f80901a59e0f78c362c9086e963f94701f6130c7f7b728e3baf287d6b9dd099696a7f509014e0091e4cd137983671e5350012dd84105dfcaee3a2547e311ee2e5ea16be9a60901ab7458f8d17af921167e16faa627f205e69a27876b757c2deaed72eac0fb3e6b09019d291cca18d322891d05778665dd8fdf423a76c61a5938af7b9611e8857f00f009010a5be5f76d9b60d67535e3d13bd74317a6b8c2543b153244745e624dfa2879e80901ff0e17b79e1fdec94f1a16e08aa2c34dfdae10fd269f68aca0d2c1c204292872090193af91e5c5bb41d98de4470df6cb20fef8d4a324ec2557172559a7a63b90cc72090174467930a6ed8d8ffa87d6d7e8602cfb858826a879c9641f4a24b4b97d8700ee0901bb630448fd1f35bdc895005f1467ed606a0c7f71b4f185f8bec1b427f195f1450901da4d3120cf07962e74c2f13086dbc94e2b8576aee8bf3c45a231a46b298abc9a0901d92da4cc2df933a7a864337ebc2f7ca290e2ef232a5b9b5e6721a3e780d63a3909019e0fc0ffb7abfc61f2c60724aed98fdd012691c44b6329f6409a8790af1400950901856dd77b546050514c97265ae3e4f683abd073e062566e16816b9ac8fd1240f00901eb264505f51822ea8fed8f881b2d97de32ea76874b61bbf4b184aa25fd7404a00901d9ef5b1ea96501b3d2e0ccbefce6ce9ceb2c6eb7f4447dee0a1d201629a8e742090100357a4cd5b429b1505895c01d343850ba6c2892ff59872f609221d761962de709012130552cb6f60a46cbdf8aec2bcb22b119df3a41b2275ad1c39312f4cf1a2b90090113044cfff482a563afc706bef82884db8e7b4205eae6b35ed3e7c1f8041860f60901b999e5c53671697c6233c15f6ed49851886a5af35766b6430e310ae95ce98f010901245de2c61a1ea032a81f1e5a89fd38ab0b61ef84b65fd1724e6678964bce3d9a0901dea1d70d7dd99626ee6fa337e09b542c662c110980f7ce21e651e3e6546c27900901c10c29ffa474b2e07dc615d32bc943de2e78d972e2b9ab61dd783371c41d827f0901674b08e3d4920e8e63f2839badd1e0fc7be1bfae93b8117d765ad53fd4889edf09011b464a84db7ee96ca4d9b5da00ba8ab294391115d9bedc0a857d7835a13617ec09015b0d5794b84d5e657741b9e32376f958dc74867960886766f0dd0f9843617cbe0901e6ce036d89569e9f64642d987ee27ee5bcaadc2bc0501d8f20a776705b4438f809010097016e5ac73c8a5f788013922468f25a5c55fb0e782dbe76be0eb6e00dacad0901db985ed27e89ecfdda358a8a32963c6b13f4958589def26e5178eb818529aa8a0901b63cf6171bcdea1ae70f79fe34d260d57f67655fe0413b863c9c0d4de2f5cce0090168b15c34d70becc27a13a249e27ed0326b846aaad2ea6b190ed36c61c0d688d20901f775640fc3ce5c3bbd58f339c2a58355150d36cca60e6a85b944067d476969300901e0615439614ee942a0be39390e84984b760a78195fc33ef37b75bb57243102b00901a5f9fadfad2301318f90170fc7a8062d2597e632ca9b76c0a0aeb93a6ab63f010901cc0997bc407f7893f80dfae78f54f9c9e2788443f207a5dea4f039438efeb9ea0901f2ce304fc17dbbb3b36066a052f7b5add29b55e4842d69d762dfe272feba1f640901b1b8be0be86efd9352e2704c0af67849b648e14df9f8c4d15c5e4e34cf39ced90901604c3e294a18244e93b66445e01546463770be46cb1e0c5ec7712756913c089b090184c535af08df026cf3a4a03a3f52a570fc91633c94ff6ce80f94d00cd8f4134f0901c608e5e6941a81616961282f2132078bc0991497b11aa9fa623fd66d4a583cd00901306429eefc158b8448e8a8a825e647234dc7af6db80599ee16818b04c283d2ca0901bba3ced05f06077c3f605b9866f2b22924087e54e9c339060bf30b1795b62aa90901211763c539fcdbadd892c85d8034680a2bbb698f5b8d213563c46cdfa432170f0901c2c639aa063703426d5e73a1b5d52cdae6dd4128ab6c6203e09479b1c3ed363809010732ecee654a7290bd2cb4fe5897634a8eaafcc0404087e698f73f4344f90b8409018575516a84b184abc1e1043ce1e339d5473e896633a61be66a6949c54cd53e070901598f28d4f18291cabd327a95815df0ab25cea083a4d8bfa5a20db30c3950b3050901cb411d1d5c853d6aaa80e79ffee12063aaf249ea7348eb3970c196a436bed8c6090156bcb5a633f66a8cd0c5faf766fad972524f0520b64f7ab8c5bd6fec17626c900901acbbbe12ad4312a9dd91395f714cbad5cbb2168ef29e8a2e7eab431c7b92a9430901d6e6e2af703a185f6d114a52a7b77bf0c6bb1a54105eaf2f08e86cb8844fbd1c0901b3cac153d3e29f9ec33a98d151af275409337dd061a0acdd877671d99edd82a409017dfa5f8231dfefad392f9120adc42614507f275cfbfc0e858ecce83ef8a9f8a10901ad58b443ef9e6d5d211fa56b2e5cb5f0d67cb8ba8bf32c8c4e966d09c982b0990901fbdf7533666c0ac779e268e26b5b621c6d728b4bf0b2aa9e9a08e3a15d59289809010ce299a87474b422012d5c7e917d2ebb8684b28530edc1cf24672325024df12f0901d0724245650b5d858c59dae31bcd5ec52ebc260890fe1572628462b89bfcb8c70901391a4e78a32b7a44eee0e8a64ebfe3b6038bdf1607b167a1de883f6c59bf32c50901ffa4c3fbc631d320817ec394f31493e207f5d5e5bd75928d1a683e6a5ec78d17090109d232f1da62be698471df3642f2b8a8640d2cd1f7bfc1dc4a5838244d798df009015399fc524dab2bf89bca7ab140242dba866225dbd3fe29577e92b079e29fbf610901c38e63b8f0814ee4b3001a4490a2184f8bdf67c7db89531498b9df93ca0efb700901948ceb97f29d5263217a5867325db1fd5462a0e7b3c1542895e071523a3399e009010a51c605bfa959a4ec35403d464e76ff12567469af381b7a44d8b34b2be70c4d0901fb51d63aaf79f001a8d683f2ccfd01b64b4ba57680da2d599f617bb29f73c8f409012349dec9ce8607d84ddf9e2adad5534057752221dc709268a05a092a04a801ef0901ec3e13d3842b9ba9b5e66a42922f4e0a2fd1802282e396bc7f02346f569fe0430901fd7866676662f92ee7520c02f79d14d286436455762d1baf511fef350fc35c060901cb0b1da399cf56c77fe5142836a95cce09783eb67a7ba7a13cf51402318a9e1509018c1ae6873220a54fb59938e757f1d321fd9409e8aa0e7841c3e82fe99332993c090130bad63c14ba68557a377804b549f43a5a95f968418720b9939875f93f5e3ad20901be21bd31941617c1095f78414ba497ba3a983f08fccfcd391571582c1d4889a80901e768e37ad1bf52f0d7438aebe2d7480bbe4466e61be19e01ceeb4b2542c88e950901134a702ebe5b87b02de733752085867afa471bbe9c82a40ccd7eaac451b15ee409011bc6d525c92785fa97f8114443a47baac29ab783afef7e9059ede6774da9d1510901be4f9400a66d05d8471c9d249c08f25b628b7df716c4925032aa77006ba3ea7709012313fe4214ffbb1aae40699faaba4dd3c325d4168ff3094653194edf0f7001ea090171868e3c9fa4e3cd876934c25e3ee50f4c53b7e51f3b8d7684ee8a9ba3a225ef09015743606b593bc779c33137e180c1fb4fdf8d16fce93cb2e8edcd5b97596a4afe090171fcb0ed6c423c46e6843342e9f9240e2c2787e1b62137f864e9865521c78afb09016bc571d7f7887c37d53a9e345c8491b731bd22edf727ad4103916586254bf7a109014f5fc1fa60729d2e121d52c09ba23d3be0b391945ebb1608bf682e4c8b51dc030901d297a01e1a794d6da9bcb7ff892171a8fd4ad3f23719c2f3635817b4d1bb508c090142e64c317c99495758a7685c83ee8a2c2795cb91fc1b8c11d97948bfe599d8f5090172003e645099721b5a9a76df15a5adba1b881b079ce93941d80b58fd95202eb2090123ea8f3a371110f33b806f9830a11d4172913e74ab6624b67b357c54b883b80609014e3a4080c9b47b737dbf8a3f3481b8f1b39e54e07e6a074eab221d5c56347dbf090149811919fcaa0cd1d29bea834886486539fd8f31e9117eedd1de0b489b66793f09017f32ba7a730cff7c1a90b6e5ea6d2c372c17b12a0388e38d34f5c17878383ed80901e7b513d3ec4c05f9fbf99631925a9e94cdbb1ce8f502c111e9240caad1e8ac2a09015db5ecba6dba3f02d51c6a31f24881d77e5a12b5e81546ad612a0ad24836aa1b09012907f868f71f7a8c72bb16f1dedc02da9565757b40dd74aea47e11f2421a632f090129af15c54a53f5971355479b64ac582264d36d3a89018e243b7c848434ab0dab0901913cf997b5644af66a75b8ddb75d73a85a178b3a3f29cbe294381c8c1aa9fbec090101d067dbbb3fecd086d57a3719f17d0e044f16e9b773be124f54a49f2dc91db80901a1c47415785554e38a08879db23f56231f38182bd50b94979aba77962df215690901f2ff6d89c3c0481166b00d418b8da308ca78f34953239e9e0ab9f614d9ed94b7090160a391d07fdd8129332ebdba1acc3a320d2928e6cead95f4f93069eb0f3fc5130901dedd4bdbca901b529a48a407a99472163273e1b3fd87009d90c985e10ea9cc7b0901082d85b802144dcc17490dc2b86c58b6f0d82fc5b183bbe46af67faf84438dcb09019669a287358830f23935b4369c7a6a4f46fada634f3c97faa4e815b6b50da4cc0901f4889e7d7ef216036fce98d0de170cb17aa92cc12e3af5155c4d818e16da118e0901fafc72312b1462077671f37fe9e7898a96a9368cb7e31e1d721b3a696f89fe240901f8afd88ff4ebdc685f0881148b57f1c6e1e9f20de49617c21f2a3a3c47f7fd2d0901d865398b58576f5c02d44b140d0151d00677b60f2342515358fec13f96d53eef0901bb4a74649203498b541adbd4db1a41d9ca4cd895827a2aaae344507327772ce00901bbf339ad56eb1a196bc1b2433032ba406a4530a65a19777ac2ec9d3056248ab30901591ff9cbf4208dca2904933f51b65f90e9bbaa9a40788b552eca081b962372d40901c2476fc45dbdd5b14e18222facbebb2d6f72075bb1086902e59842f7215742560901030c23a4082f3987e0e490c78a748a2f772434a9b1a377edc7cd3c99251bd8f50901f39dd3f5d978406175bbde757fc25042c08e688e3df039ef5aa1d8202b4dd8ce090177a9f5e275327692b42ead15494bf79ea6cd75963d0639df5b8e7830ab2b42210901a3e70bbd689deef6b1ae092d44c4a0bd88a817f2c54ecc3d339847ce456f45140901dc580a73bace7805a4e60fe4e9e0660efc481708251c2c75a82ebaac1e472b37090106f172bc3436e01e305bd8fc7f0562d7fbb2ccd86ebd9211547ac2d6157457fd09019b0bc56227615c5512bc1970c73b22055a6603e136081cc356688fae057bb7e1090110d3de99cb2cebd54428eb0cda030951c00a392c777aa9e0be4a8e3de3d2ce4d090101e5d1b1f08d90f311bab7432ee319a754e1b0089709d0c8a64e9c7f842cd2bd090170d9b20990e7a29c29d41fd2b7bb2f6e9a93a8875c2ee1dfaa06bd516a3ae23a09012d48a9aedb879fd7ee4fbb1ddae4319b45ab8865005387ac333d1c160cbf00e90901ac488fae7f548b45443bd36fa8b31a03a87cd14574a36d5cbde77a54f750e9bf09018674ce5e691c9279e130a13f2e170b5223b5d844c2552fc5bb53d7d49e3abdf409013811683c3f16a2b43273cbb2e93e56eaead5d66adfc03626b7f64810f0e5f0960901996991fefb4a56f8070466b7f8a1f65d7920e7a13cb929aeb22e9f9a425aeba10901135fbee3d3b06903833440b0ed8ba2647fc69b39469e2c0f0aa738acac97f8390901d7ebb210c8090d5d19fe006a08011e4cf321cbafb7330b683e63b01e4587b11209011b4812c8cc2e17ead86d08da4217cca4a0a6cd16c3e6b03334059f82e2ef668409011afac6c841c55099a87b5628e482bea4a6c852fb41f96dc96f9c6edcaefb47ae0901b0198f16dcd3e74d5ddd1e8c9ca78987a4957792e2333ef5d72b2c1bb445b9000901a6e3ff6824ff90cab16b5eb35cfd460bfe387ba56b07ee986d686d656424b6a70901a904879c395047a9ba137f75636d193de43cd6d15a292a4b3e33b1c99a26497109010f0c6fce6a77ad1bf7b26c83b9a01c8e3cadd8381e66ccaec5e81bca943f26a709012dcd89e966b579c3c1e71c4caf09c8919e9dca60797a5e1b7ca93804212e091809019ad9a8cd7afffcd26ffd2697b780d1b1e4ab5bc2198bc9bf0433e6988f4cab3c09016bf10e76e0c40898e6b2ef4c9fa7ea71c1f731b0032117534f4db28590b5251a0901fb19b035ac2909c999536531373a13bfb5dc3a6749e03918993282b76c3d77a709013b55ae7c42ebda58760b1a9c786a6ecadecbeb48a955c8388e0b0cf143f688c60901c38d6f16840920ba77807561f0b3df11e4228fcc2ceb42e66aa7ec2d8b2b41580901f274ac4d51759f23369c1350ad754dd3b6f705d5aba8678f234dff654eaf0e4e0901d46e7f372c6c8933cec6a1667ca2b46b6b57d6f9ca23cd165f1abe319ab1d4a009014b5967f969ec3649482fb64f67bd2dfd6d4590578dc9a413ba29c4ad370cb259090198f425181bc8607e30358427b63811d9fa6e23262d7de4df2da8bbf42b8eafcb09013974d23bb04ef703902e59dbdbaaac65e1126ce38189c80d175440c3db427b4b09014b16d6cf19e19c8ba05b75ca5b0530649a149c63e9a51b38441db48c2b37a395090148e2f8983b12e02b0b9702e13212371dcac70eb2af0c41c63a56b83151929d030901c907142a5413bcbcacbb0283efef7f1e547f504e3a8331d272d3d083905b891e0901056a2bc3c111a798da1c38040933770b31344cb32969f2ec4e4ea89beec13fde0901312ea867af96822de15239b53cd0413f1de86852aa69a28b350234e2bc9dd98b0901975f3cb03757a9b3abc38376fd359c6d075a1d0d92d1e31eb279a3f2b45b67990901a79bb682a0930185e338ca79e3d30a8094c0df6024e117c674f28f45ddaa46d40901f4754a9c4930325296ed73dedf917aedbb97890c7bb6e100f802de2df1ec5cb309014843a9eef2484c48ac346ea36b4ed1c9b9085bc28aa73e27c6eacd565c9971c60901308bea6b5693c10c830c58de8f48380fc61f40c78ef726643a66a9ffeb774db00901b24d39f299d6eef51f13fc951f0e6e512c1713512d839833c9bc3476130cd70c090124f4d00c1a0180ba5227def2b7979555c09a63b107a7c74e265e1fe734fdd32e0901877c7733f5a0313b386693010790bccdc7e94e541ef38ab5c73b64a4293da2710901ac17f6d9bc26a24f95d53fccd244c7ac29f89fba2fe77e2b84b49f9cbac238000901222f358015960b07e7b3db57fd28d5488d15fa99f2bd0d8a2565ea70f0d13af4090171d5a8834b2ca318c73046920a33adc9be5b4b8f6bb661567de5404b05cf60f109012ce4f1a3ce3e96860f42b78ae98ea7bef57777ea1c332cc2cf150355e6ea9d5b09011dc03f89eb314775024d29862f492c5886b201e41c0c3637aba7d02dedaf0bed0901fcce86f36a94662c5f8051578fdbe17f02a91cabe1bdd68d6ed46c881ec648e609014de6f631a808201ec6568a08124dd678632f1c5895a9201002d8a5050731a4690901d80774e83ee1caf6c665a23711bd4d6f0198f6e1e3dffcb8848afc7df4bd1cc60901090eda81536672c31fbbbcb3155cd7206a4b006b5b85e8819f4218fc5ffd18e909012dde04226e755a354d9efc406e8ad67ac8a58177bf7b70bb48b3cce8faaddc1409015be72d4d1820c00d66c1cbc0feabf6f8848cb2b6a14332c5fac962d5dcd6f52409010dd049e501b6a361a57ddb880f18819e6be5a36f3911cce4c00d34d1dc7d83af09013faa96ebd3ad2115f2d98643716fb0610e2f8ef447b44f975ac7170437fbe85909018ec27679847ad3bc600272e9a68de96cc1fdb6ed7f7a88f06cd13c6dfd20f45509017f93ce06163c0111734fc964dda01eefbfac631a603d45d53bbfb60e9376988009010f0c6ebcdd5a5f523cb62c0c90d6239ea15afc193a74e2b0f9d4d6c653858c580901a9d885be2ecdaaccf96b345356de596591970689d7cddda605731209e4ee90da09012dea47fdbdceac713c7f6249bb0dda04bafaff378ad31ef28e6248506ffb5e31090124c721ae195ec11424b18608b10f2a05b920263bf288b4b36da0a6af27b8747609017e6a798deee205c01d466883080e66b61774e229071cf46830cc50d31cca42be09018334d88cac4af32a29e8462579c163c1cb5ce12c3e74a3d2cccbbdea30b937220901194938465557dfd707604459d53d8041c4edf985d3b57fcd8d21035533bc03780901d7b9b4074e39daaf21413099938530d6287df1f2825af6c9690d6a7407774cb209015d5e8850052e466904109261fddf16bb2f750e7f92843bf930b3ec902eb217190901f20055caf6cc6f90194c870dec58b51358645173db63be9932b1ca644e35823e0901aa1fd5ca9adb2a091be44f28372e48453592c58cfc53796d86220ea23d228f82090177c637842e495a119022009f8655fcf23a11b564bec62ed87ac0bef31c4c14b90901cab5ccaa73ac344e3e6d695a4327721b1d56646a245c090dcf73740b0cb47ec30901364445b9422f4b98680b229239057e6ee3a3c5fe5082b6bfe0412ec42ca96cb7090194925f6073e2e8478ef7c0662774a420601325fbf9deb0b1838deb8b0a0bda600901024ef2bb551da7331968d96fb18ef7b0f792f9b33774158adce73ff4a53564d409011c398d639bf645a28b809a2293e8166852c3ff59d359d8008dae13c561ec289c0901ca35b8455da7335f2ad13a9dcc533c0712888b21ae1a53218a505a98797d039e0901d7508522380fb9f5b831de42e215f208063add03aee67eb60d09d466652fb32e0901ea30fcc04e50c1db322c1cddee88d5022530f995515ce5ee118020b488ac8c4c0901f3863d3bdef2fc71839f9e7e3ad2f2f705fc9b5876b832c32d3a7f8c11f4f95d09018453a623757821b6fb97fe0a0db7036f9e5463717ad2fe84329ff4528cd865bf0901f0d0bedaeb7a1173256861a3a418507e43a84a2d4f5186894796ae85fa66f4df090103176bd95e548dcde0a39a8c8d724287d78bed9e74b2704796ea90a760e268a709017ac87cdea4ce91e3226a0fbedc10df1ed6886cde75f659ae548d7df19e5429da0901c55656f0b719fa3028289edb29d6328de6478e1e8c518f9ae518f96009b237d90901a2aa6212ae80d8b28850c51eacd22f365e665941814c40370f9c8da6c1e2f8fc090152610524281ac702e306e1da29c293e6370c2108ff05668aa187171b5672a6490901818530a6f18d5aba3d52f57d42953ed933c6e1a2ebaccd66a72751ecab2a0a1209019f84f7064cd773a752d1cc5dce51e01827cd2bf2458cf4950b98ba0b334c99810901676197eedf4641d35b66ea94f8e5cc80457065f72a75c884b5b96945e8033d7809013d3c9b87e7ad67e93f05543f9d0fe7a24bfde301e568274fefc2b9d253fb2eda0901642616bb60f17c423ce4e52e8d5349de7387036cf4f547fa2e223476447f00450901139ba4edbb94ecbfbbaed5d412cc21790d0b13959be8c87a41e8f7ed98dd454a09018939b0ffaa5978b2737d5659908ea5c75615a2fd619a236178aae5b02273ec9309012e1805ecc4f06fbebb5019c44368ff24ec9f5148256494aa7bb065b0c10634b009010515fbf361e9bdbcde88d4c43808d35748a031ec42fb7062a434b985acb35b4c0901f0f5d7735af9264ad42d9883151077b2a05051bf975db945b86462846b86439a09014c5e7cc757151a1b345394beddf2dd81aabb9c2d4ce68f8cca91056987de03e20901098461f8f4993a806055a96ecd4b29979cf82f74add5af0959604d743d3d82bb090137ab3175a40828e3370d235a9e8fb4b0faa093e54ffe1a3ec0c402e5088ed220090186744150d2b5fc82e5b7f63fc2fd6fc3c34df2d97637a8d06c0b5f1f4eb872680901a9164c3c6562dfa9fe301038bf5d4ca67be9129f91cf6bde8cd3b5b54aacfaac09012b931490e219edc982b235cb7a74de4083bc44b51a4ef5860f43c7778fca33940901241ffcfc6ca69b3ded522398339495622bb3729ff751d0b9f9e725c4b8e70d1409016f193147a36108f7b433af6b644c6f6bbe8f3ec4afc4d297b24df7180d3b9d860901eb3b582714fdaaececc51bb2c38227158b44e7a5ea4ae0211358f9083b25a8120901b28c9087346ab548bb08115ddde1223d683f4a1d5aba010b17adfb599daf1e1e090126509b44c44b714f98ef9212a5528d5ee98775e948ca0d9177753dd6272ce2e309012384f50559efcfc8c2d5c7ba9c6bb987940236ad1260b241ecad3127e569896f0901753c8d3ba70adda7fdc32477f949698ba74ab9adff00a9428f811c37584492e109015d1114ae1a88951da5d7fbb8004596203677fe581e03d1fc88bcb11333f651190901f50ca50b4b14b03724421ecacd3d185afe1547ffa799b61bd657843dfb49369e09016e1a19e0e268937c933beb8fc30ab38b39963f44ec19a08ec8eb08dd8b7d7a320901a69e4971bcdf95b9d00f6c870968bdfa53529b0e0f68f3537f5d9953d67967240901173dcfbb955d7388ae8f2e7ce3ec6a0aee2e1e34934dcddc38a61d8cad74bda609017716088882f49fbdf404e5ef893ae85c833f0fc60efc1157849caa656d2416fc0901fc18fb1fb893ee91647bc4d3f82bd9921a641dc17675b1620ed32b24f01062e20901b65e6c1635b01e63283c44fe9c88de530129aa494f85219e27e9f955464b1f6a09014b2ad7060af647401a094b3f66bb40e7d71331b6ac8c92a75874643f3b5ad38809012f556c0dc30c87ba0f764ffca5bb3712eadfa3cd87d2d1e0d2e4f18a331826e70901627a66fb4b3d58e4e07e325e9c0d6672fc44be3d7e781e6d3562503ac5ce56120901c81679e05654ed03c1ec9e6425600c020b9408b900022481d59b355e3c1e90ca0901a52328429b66b84a3f30074d390052fafa3d14fcb9ff9ac4bf9c95d514d3315f0901e76d4399b34a9e2deeeb8c4402d10f129fd4614f53d4a36304aa2a165f19cb640901494fd4a75efaae9ec13eb045315ec13af58b395c7d5650a503f9957200b36e8009011a988514b969e5d02f3cd384489143624f063d9e080777af1d1a1283701aafc70901cf5bed7945d6a097a57de42bc1becf78b9444ec3a0109d0db868ec41047c89b9090151fbd77f5715941c9b54413004e8b701e55fed1186bbfdee59083fecf8b7420409015850cb260969c5449209627e21644363dded018bd1965b6a16da09f5ac544bbe0901dda6dc1b4592bde95ad8c26b7385f8a2cfcd9cb5defb28d41babd4f4a36ad4a10901efb4e182956527ba2394c3a95440d2b58c230ae1f9e3ba7ca1b59f55c14f457f0901669b2d795cdb45ac99f4cec7d49ae03efbcfb77558fe1f87a760abbdfd64906d090149e31c78033626b2edfca8b12a256a6893b886f88223c2fd8ac1618fbd3584cb0901bd4d1375fcd388f57a0dd86275c421a4f7c1007e2b309305511099e4b014be400901ddafe41b959969de96d82f9b905462051c02815e78e3e6a3caa9fe293cd82046090191d9caed4c19288ddbc718dc302004f40955dfccbf8bf0db79cc47874324626609012b213ea3dd26b54e9d66811d09190ef6d6211fa864b50959887967395dd2d0ff0901bc23d814281e3a3e9b90a57a66f77b4408eedba4975034487b596894627005910901fe56189003bd1f2da8f51189ac77ecd6c804b6ce5df85407445f18fd0182a6ea090151475bccf1e30e1a8fb7a4b88d35bba5ec703f81c16e91c8b2f4e3652f4d3b630901d5b010ae953441a5752bee1a3ccf055a51c4e4f7dfb60e52d62dc609ea055f9f0901d91a1f41ac2885cd9f957dde00734233d9b795ad2d28bbfd77431fb25a71faf70901441c787039586ede439c8204494a7c1586a2946d7b8e49174496e80d7a52167609011cf123a254c4e9564beb4e3e669f44b76217abf8d97283be779f648b5762ad0909011712d49f913d1c5f0e0f729626d1e6750ca8bca02904f3fb20653280c87922c00901ac972197dc3293a6e7122d6f7ccad66682c4889eba5445c6bfb2200c8ad97ca9090179bd1a5e686febea3f7925725318b05837decba9f1e6fedc852897d12d1b990c090126d3f10280ffc84c157b1aa70071fd763d98028a7b26ee2b8069b14daeb0b6ee090141811abaed7fbf74392a551567bff77549c0f0f8b54a26f09a6ec15fb452b555090192cb72a778aa95f3d848c1dfbce5599d04dcfd1bd0d25a1458300703617d283b0901caefc6cfa9ab088a29b5d94f6211078aedb0a2da27f2b6282ca133321acb140d09014826caa78810c5d8cfe3dc2b5b2b383ee5c121244644b87a31b5ed31f04a934f0901c14eaaec1ce795387a45eb9bed82e16ccf9b01a9b4ebad662002156fe12a634f0901850f2c1a7707775c8f29eb262f2a84900c11fea6ea2bf06440c3dcbf2c807a310901b61a4d14a85e75f4220747af21ae8f7029e54930b6c3982aaf5b2f21ea593bd80901ee84dfaf910f4b7ad447ba3d16b6752a1f584e6f598ec61eacd9ebc9a9b2753b0901101113c370f2c9563699365f5a260a564511d8c5afd1928b56da6f920dcead6f090125e35b7a83d660daa292d0809bcaab398cbb4d32a966fc28ba7dd47f2b8ccd9609014f6c592ea9d24d15818d187ac85d34cdc8c37cb5725b3aa6bb4e212a04404adb090183c6134eb4621b64f7b7e3eec5d4665a7b43afea19dca9dd09b72c92bc9ba3a609019109cfdd5a8195321689691c59d647c360465e4273ae13974a11deb69a0c5d96090161353dfbf9de8f6543110bb3acef086b652e4b49942645556a47253f5393676809015c580911c1b589609e52149d901aa34a2f1b4a035ffdaaf5e2c77383fd5d77e409017a29d3b5a01fe362e43cd6261d006f0bbdaf027774dba610b3a03cf299f431df09014b3d452b44d9c52eab3aec0abf79dc89d0ab9eb3b322a52e1889c8a6910a3cb3090173ac9cc6466cbc1541ec9e8247213c3fc5463606a97bf9ec2bc1088e0df30abb090147eb4a06ea74a50ae59cc27b4ca5a2b166a0d692c61d5dc70ee289df8bb91e6d0901868c34695829f8399758b0710a6d7f6f39d989ebd135052c08db176a887f902b09019021fc1673f83fba4de0dc089dddd33e8daaac5c7d6a52fb61be41cacdb5c290090142352889a4c8ba02d731594d2a67429a7135ad3022b7ae53e81a986dba35e4460901ac4baa3942e1aad2037f0e1582d0f8a597fdd4d5b5f98e5d8f14b52e4f8da34909013b36e52453a8bf4f1a61fe7b2b205b79fa396bae6bb4deb2663dcbcdedd502740901b8c5337a23fa9200b73481024f1473dce8c67f5bff19e1943cbf5aa96cbc9b790901e293269aa116a813d74dd50787e534e2d4db382f4c263e1f5e2bf4aaf075d175090103ab85212941d0b8b0795b8937870bdd5bd318b9147d08df97e3479ce6e761fd09014448e74228b5be882842a734e6148047860770e7eb02a420d5301752e7f202920901294aba654feef0249d3578dab7373756d5f827d1c475160349c3db392a78796009012f6155b640e367660856d7db7e6bc03dfbe7c046e1271d34f53bbcaa57bf8b9b09018c70fb27990511107413ea3b45d67064c15f4056ebefbd164b28d7fa108893f909019499c32441a132d8c44fa1bb0ba1c03ce67f205442ed23f1190e5318e26098c709014b3979ae8960eb445e98b409ba5681ea5e8b4dda5a0ab3aa937350b2aaab0a790901362b603af70cd6fb60a28efba12ebb42ff56f8cced7e2e88e8abc86108a7b228090189531ea9dea4fa039a1a909645b9b0e36b1ae50e58a5a3d8c40a5d698d2361560901011e7ac5fab7ee1de54142d0579945c61162910dd14b869651cbabe1a70425590901181d9869c4251e97c01cd190e59a4c846c99e55f07689827c5363f8197817331090145ba93564872b7accb57742863914a2ea6a0bc5687a278112b4e3478c0f0a2550901d0e4caa08950b91832c91f47cfa4e91162336f87b2f97ac288e63ed22fba5d440901d8f2df84196a7a2b1f417b146e14784839d28c394bc59f7d9b37cd3e282eb1ce0901b13fe04e1a19b4717b21d94dfef02214f3f497dc8797f2427b554a197e3ba0af09013e591405c80ff858d997d29df8f4a4a7959a0e8857c24a9852059be5f97194f309011b912eb6351dc3fe377da31a8160f1583d1f39fb28f2dc76065d9f6b5f909607090144ba1f1e9b1de85a8be03119e0050c61e68e3ba14bcea0e2a3e46093a4867a28090127060faaad5b870b12daf5d41a65d6c651f8640dfefdedb7fc585a8d6d4c50e709010b62ea0f300052b1aafa1154dd300634f93d50a212d384964f5122243d89168209014c47cf588b8e8071ac30a75dc748e51505c7e6d7cbd987773ef66e3ed1af21f409018e4299eeba566c4549f7255346dd871ecbf829cd3c850d8ac6136cb56496e2d209011e8afa3acba1cff411bce88640ddf4be0e46a1fecfd186a5e368fe2a075bd058090196148ce0ffa7e82d79597c0ab786ead627787a7fe40345afe4200d8c608b35220901abf0042085f900c264a41cb16c443e67121bf45ad4ed896c41940e1219f766060901f1a752a1b9ac3e7de708f0c2d26e50090a86cba4128d839efaaf9ad4316d87e10901b254b11e1b6fa1806c236da67e594cc5dc605d8e86d78967246f44ef6e4a10ff090174f2716bf4f963d494bea34f109d6411b330c975b27da936b028966bf9778c6b09015ed4d5fe4c8135ae388ae9edbd0829e65cba1f73b8291158261e55e6a67724a90901c00b4f911fb283a8dd9abf1f25f3ba38463773e6d30e94102e9479204498ea8309012d6c6fb0b863b687967cec3a588a2daac2246e787e4fb70fb275c3bc7d50b19d090101935a58e0ef049a98c10022c90ea2f66d0262fd2739acc2ae27be707b5bc50209012f250de866c2686f9aff982c2748853f23fe74e64a2b061b71729d12bdb269620901f6a416bcc7840dd017226b8190563c9717f28237f7572cff1f2b277b379d00140901f585bafcd808b6e6c25c93ded2a0165bfd7ec277d32bf617b093705e98200f560901c2b3c62139229ed3ff614fee27fb165cd47941d9c34527f7a5c69daff9cd96da09010f0e9f6adae818b4fdeae4fc93503c7b594cc80110e0ddf12e6765f538182f720901286f783112ba36cb18dca551d861394ef45ffdb47ef57d763fa4ca54ede717320901e3c5042a362a73d1b00566eeb926ac260e227b0f0127beac6d1a2522e37b68d50901935e8d496f4acd591a2ba84be633c8c42cbc67d0fe63775a182aa6a5ceb2d59d0901feff38f59836da0df75f33f1510f9964310f36126bb4603cd83579095a2a0f2c090126a72fcc296da6387a2e297e9687d997e6492279e76bbe564c046cd6a0aa8794090132890e1996e1a4f1049b7f060e8623fdcd340e871b28d4b228f7d7a95774ba50090145205b823fbc9021f57aebcc364c58a7c2c74c5dd0a25bb74650329aca7e25af09011bd3da6ff8a1a138078b85d279d123ea54d139c71a9e13a62fae11b591deb5420901c4c5ab277f9e7b0b00eb5dc42eabf316c00f103ebbedd5937232527fd5e1241009010a80feead8d22e1c0fa57b98f5cc97e67a26fe33637d74eee36dd138f2873f0f0901ee10326d08c6065a49ca56ac879ad552e77f9baca0f0fe5bf8e4fdb4c88e5b20090195bf7f6858680e56ed4a53c8fcaaeb3d35e1489f3aa045aa42a360adee3c5af60901095565451215be390fef6795cd506c89cee31850add5ff2c77b88e64f23e87c909019c9786b6ef874ca1347d9629c59a42b2283206c160f4fedacbf1ccb5ed3179c20901a0b3560b2b3c7e13918918c43d387c7da532110ef3fb95a1bf9035ba5e5cfdd809013d20ff14ef7fafbb4621ccebaf4821436a95054876622e2bfa079ffbe6d65c080901d0de2a6c4b7bd3b5740e0c3b9b2ab5ec91052df1665b7a2348417ee615b37c230901adad2bf9065b332f85cb874895ee8015692529396ff8b92f4e82dae1a3085b680901ac3c6ab8f81b48d77d5a4f82e48317ec29680fab57c91b136876b335ae273c990901fd8d8bf3b8d2a66153e797a26a6a624a2dd961354c1884275ce5032cb54e88f20901a2bb9db194461f9bbbee537d6b96d4c166299aade8227cd4145822225261cbaa090160dc561ecb9fb9a13acbcc5b0e74d2cf0191ab39cb7651f9f7f2c4ad43eb77b60901193c1d38e94e50adcc3e0e78273890728d712904c9231a14d1fe6480a321be6709012ba2ad457191982d8f81c5da3d574e99de10f221b659fd00f9d7c72ff8f374480901375cd7554fb76a4b2ecce5a89a57aedf6d13975335217dae26457255ba48f7cd0901b8f30956dc5a480dbff8badaac4e9bdf65de7bed8b2f68e9613ebd8a8dd1439609012a5e75c8f2c5a319355f2dbc11ac7cc0fd6255f7d7f75ea5f4a0c6b13df06c0c0901dfe9fb90d7c7755cff668eabb2b386557562b26f9615e0c6c105fa1414b1bb3d09019efd2c86e57ca47804217dcc9c1e8bf4f02ddead1fd7213b10320b819ceca5fe0901d2163e582264738f7eb3e00ee6e929e0325bb6f7d232bb41fc8b1365a9935954090161fce465509e02650acb7911dcd19f7e49169587db14e22a578337c6da4f35470901aa64e2fc3817a60475e38781f76b4a128a1b97c79a50435697fb17db3e0731820901fe86a985a6e9904b8491529d84cc1fe3acc8786b4e9fc331867ad3b71d70bac609013dd54bf4fa6d4df4f1d0bd288a1a99e83ad2ae2851c73698a5471ed2d631e8e509011bc13d1d8b8ab4c5d416ef4646a4de9d619f3c2c91f4e7c87747cc74fdcc3f2609015d165421e449f24927f9b8100d8541c7ca593e75093de487b789c39e536328e909013ed5532bf7a2daecac3337f18a787c5d854f67e0c90d0551cfb9880040eeb4fd0901ea21eb1abaac7fd9a4821f77372a4a0637caf764ad6b130b94af91f8e8fd76b30901527abbed4dc5c4ce3d1515e71b4b8e79335a5944a52a32b4898109c6362e854109014dd2cd6e0b0a095c877e12891fbf23746f2adb36416aa65da3f4ff97ee0fe7f809012c479b7aedd03e649da173c1fb03e6dd3f8e25873aeb9bdb806938d2eeae96e80901b32a23775cf77428393654eb373a0fd243bd2c109874181c0fe451dd1b4849bf0901832de59e44bff273f0021ce18921b976d81966497670e298920e94953a8d89af09017273e4d5d6751e8507008df45e6c90963a0a73f98a23c47e73e25b93008374dd09015794cd080c71219ca78b1321ab521995a950bc8556bedfb24f81ed7d9724d706090160bd6b1bc1930db842b4693348ceb35b25aaa0aedb9d723c49450d7fbaf4e41a090122b6b26b0c6eda6893767fb17b573f5f3834776a31edf66c2bb028be7f92589d0901e3ee0556b3df683900f59f1545e3fbff9c5fb3e0c6643b2aca4bf0f6706d78970901aaf770420b4136868965a13966e4a89754ec80fb528266ed03e5944a7aaf022409012d36cc1799fd769b32082735bfd7a5aea8a90cfc156044c822f14be2e7ff1eba0901753a127d1388a9f7396727d46f71ed22f4b18751f6677307c43382e399882d210901eca4448be40d9382463ca6a9d074f9c8dc73ed74b51845511855b3ae1be1f287090110f34afaa4aa9b9edc98f01b8761e73a1b14eb7dee8669322796ee992face2000901099d5ee5f495baf07cb5ed13bba15f91582ab4f8d9030241fa97f6cbda22595c0901c4d9b57c340c780b90746f513155b8bf94dba13643eac6d498def207cca63b670901661326270a4818dc2aa875cdeb72f0d75ec12e06851593a0dcd41f8d6bb4701b090103abbec941dd7584a6d8bd938eb877adaf9049ebd8fa227fea7ededc8f214b56090145e4d3ba75c694b08b0e15c19670b07b69bdb6f2604131f5ab2510057311d6810901d0f7bf5dbbd7232e9632d6927c20593104682cc383060f4d242bd637ed3bf1b10901552437fc5c5bfe5a7e8f66f59257f1c00209fc49976a708ffa616fe18434985d0901335f46a0de4a33503f877cc53d8c129a6f6169e6588bc01f1a327d3f76052ba80901a94383359b9b70e03a2f1c779096dcde9466f85fb356f6ed4dd18e42018a61770901300a5c6ed108646ac4ef1618fe94d56d2326dd379ffd72b32d17388dc61a94ac0901e43b33709350e18b547b39b6b89f287377d4c20c6d56f109542d9e05d2923ce809018483808edfc9a27feaa683d83cefbe8fd2d5beee9360333848a72cd9585269c109015709676ccc17af1f3f39f5225774563e2c7fe85cb5dc099f3fa43891180dc7f80901674b0eca2e9b4bdebceef95121c0a6d040f6efd7dae714a357fc434a8781ae5c09010cc3127c44829c3bfbb49a0a604db7d3c61e43ab229d98f7bc626b935fd47efb0901c0520e64a9caf47adbb047ad2e5fe08a1fa5db7fba2db9f73569cb939100770d09016927ec030399d7fe15c35ecec44523798e621410ecba3d93c7bb7e61b23f02070901f2ef5f01bbc37073a7ae11db6bf292e8138f1ebe0b66673ea65c69ba8ee62b1009010c4a693fa3d45bad655825284e3f3c3648ab46a30c97cacef17b9c1e9748e5600901f57b5a6bff767eaeba4d8b06b85cfab0bc5cf61d9c8c596f83eb7b251801dd9e0901d691593ba03081fe431b65d407e24ce9a86a55054f9046a2ea6eb927f1525f1309014e9b482bbe89986afac675f85b0da6296a52376c38586020dba15513310a5e7d0901b9dd5a8602932d895161f0748b62bf315699487debd00cb7f83e0e6bcf6101ae0901d5ff917de575813d5673dcdcb21844388d7bbc1a7df37c2df7995d9c20f94d410901ad0efeeb29b0b8d0b73acdd5f3ad47297ce439fd8da8bfe828486538c83104490901865d75c4dc46afda5fd75486d32a6869857a02daf6bc8fb12884f9c4635393950901389af7752dcd2133ce5ced5d37f037b0e8a680712fd0db8a3a6f99f89abcb8a00901e874f3a7ce4f51244afed7a4a27ccac8982b8f58e813664b97d06af62fb8d61f09017703ec1fce976cdf39ced90f480a57db5c1bf95fa4714669fc05fa81c61719e709011d8e432fe670b13d9f7a26f0522c5b96eb989987ffbd9ed605f8eff4018010f90901eaf6ca68b6a22cc9d5dde1ae9b248788f9c360366874d97dcf9767a579c5e1770901feec39edbf40b6ddd20a6b3a5c07797694f96c8d5c703d0b17df4710630e1a350901ca95a977d81d35dbc4375fa7459b03c9f9689ad919843a749612e9c0b8308e4e0901d7a68dfdec7308225abf467bd3bc0fd04ad1955e24473a02801b8959f1243d5a09013f83dd843da95af113fd285ad8c1fb419367680420b0edc99c0fb2ba522ab5c5090149deb0bed133b158f028e1fc5f15fb95e138ec008f625d556bdce8dfaff04c81090143047eab2361bc9e1e07364ecf1d741a33441cdb71f0fc0e4dbe2bfbf861baef0901f7eb6dd901982daec92ffcd328375860dea99f38c9e4fe3f4a535ee0813c59b10901e68a789172f90d74b4bd79525af6a445d0793d4fa69a950901d10f4dc86dc9b20901100795ecb92868560e77c156a608d750fb419c3476a2baa4c9acad1d8e99be0b090117e7e47da6fa6ec6de232f6dba9f3cc67bb915c3c6354d3cc54e43579d2166360901bf9eb977095cc11279f95e767bb646284f5680a1f80cbc2187dc1ec9c1a8a34c0901707d2180ed6ab768b5289a0014cb4489ed1603e4f4f3ddf2193884ce3c0fa7870901d527c107bb29c66cd010694e82a2bf75fb388e5a0e83c908d5a5b199877acd6209017dceb138053ec84a94ce7eef006ef3dfa72dfbeb7029b6e798d06d673f363a5d0901a22db9b476eb694fd730fd42ac0c0efe45da36f0657165d00f839849f5d650410901ebe08ca84305d0dfa66b19cc7dbd314306629498b9d4affd0a149e5e7d42a0df0901a968688114ba5cebd5e239926ea7a281b45e221cee68574e879df0740ed857340901e98706dfd597897d76985495df5b8c8e198b03a63db776e1b7184244abaa5e240901cafc7e3533b3e8ebcd66a1f5c51270f6d4aa63236a8f3d53fe115427d5518b4009018b965c6ff4c848abeaaff5c665bae53561a603ea39fe478cb3f187b703b03bfb0901e47893584bb553047a0bb4403d725e093ef8380972b866e9a970fcf4f3839a9f09012b44489e0f1925700dd57dc8c218b9d3744d0c455507f50128e37e25a2a116510901b5f60f832d6ed63054e6c5c335888c329c94f4e3c38adf4162c8ee88f54bfb2d09012ad0c19a0d1ecad49666dea242048e4bb945136aeb5c810702b5588b84559837090126a4aac1380d7ba9eb2220963bad23e19c3ceff400d9cc5653e343621bb7760a0901029288b9fb443eab243648c3ab3b482621f9dec4faaa1f9969daed9c033024fc09015a75b8337b7dafb8a42d595e2f0be62763887ed4d02222d7cd5a3ad6da360c6b090189fd8d90b07b1b39010a9d3c800024e746fe191b571fd249d57381485ec67f8d09012d3c6043107729dca137ef70695f919116bddc6786fe476c6db12c00e95566a10901c50d0c7f1a92529a2022ed56a920f059ec9a24ffc0f9a09e5adec590b67bbd030901a6c7e1913da8b857581d3548406e5b47801f84aa771a67519e171cd69029f2800901a5f3b9794c7173d13a747fe32b390594781fce02a714770bc9218ed0b5fa5cd20901bad923a751f6086c654cab0667b2a07b766633f1768bc8a22c0ed673f81a02f40901f340dd306470ea7824dce4e9c0f5fe2644a64c92483d9962c45f4d656da745c20901535ef6773a71eaa61770f06178bc09cf74f55f33ead5c6b5059b5e2ca908247409010caa58b8786e1942d739277ffccad6f5520a1efd4ef932ecb32309e7dbe31b860901f00c8f704470a8ece453343af99e6653d71e21647b89ed0624de57405e15d0f409011bf9ae8d1574a029053d67078b714ce6c34cfe602f9be76564fd4cdce79de052090187b229629af58ae26d70b40b4742bf4b09a677a816b6d3a38beb902caf069d2909011677dd5a09021677d30b09041678177b09121677d30c09051677d30d09031677ecbd09071678281c09041677dd5b09021678177c09121677d30e09051678177d09131677e343090b1677d30f09031678177e09131677d31109081677dd5c09021677e34409071678177f09121677ecbf09061677d31209081677e345090c1677e346090c1677dd5d0901167806dd09041677d31309031677dd5e09031678178009121677d31409021677d3150906167806de09011678281e09021677d31609031677e34709081677d31709061677d3180902167806df09061677ecc00903167806e009081677e348090d1678281f09031678282009031677dd5f09031677dd600903167806e109011678178109121677e349090a1677d31909021677dd6109011677e34a09091677dd6209031678178209121677dd6309031677d31a09041677e34b090e1677d31b0904167806e509081677e34c090b1677e34d09081678282309011677e34e09051677d31c09031677e34f090d1677d31d09051677d31e09051677d97709041677dd6409031677dd6509081677e35009091678178309111677d31f09021678178409121677d32009061678178509131677e35109071677d32109061677dd6709041677d32209021677d32309041677dd6809021677d32409071677d32509011677d32609031677e35209071677dd6909021677d32709071678178609131677d32809021677e353090516781787090b1677d32909041677d32a09031677eccb09021678178809101677dd6a09031677d32b09041678178909131677d97809051678178a090a1677dd6b0903167806eb090c167806ec090e1678178b09131677d32c09031678282c09061677e354090b1677d32d09021677d32e09071678178c09121677dd6c09071677d32f09061677d33009061677e35509061677e356090d1677d33109031678178d09121678178e09131677ecd009061677dd6d09090126315e396cf6b65da00600000000333a6cf6b65da006000000002889010000000000000000000000000000000b12c0522789080000000000000000000000000000000b12c1ddba0052865b957ad07a7af812a58d349b1f44e302d8f058f3d15df6c6196fd468f91012c0522800a4d4582a5c2308c2dc67818e88f8053ef011f54738f9798e84f200d1002a2a1a12c0522900a9f38c52d58b1ff11c8adbb9eac4303f69d60a0d267241b9cada51a926c777a912c0522a0018855cbdef5d4782f7455dfc707dee5c486bab298ed32c5d590dd09cee15373e12c0522b00322f9cb7bc927570f891ba806fa81a801ec7fde03c7b7ebbe10fe62ff362212612c0522c0022f45c939b33d03f167d4e6e6f44a2877dc97da1a503cea6a1045006fcb0d58d12c058ea00bcf001b045e328b2cbbe63b018f45c6a51593005a8e77e829923e31f799f7ded12c058eb00dfbeadc29737c2ec999a37b305bdc54aced504545259c57fc9ffbe81317bb11312c0522d89080000000000000000000000000000000b16781b2732916011b592001677e1593a01b4203520b6001677d56b3a0122c0236b24001678102d3a0337cb0f04e6001677e15a3a0275f5a212ce001677dcf63230755b3c86001677dcf732c1d56cf218001677d56c32c1d56cf218001677d56d3260eab6790c001677d56e3a0122c0236b24001677dcf832916011b592001677e15b32f24ac82e9e001677e15c3a015333810904801678102e3a0398b3c7df4c801677dcf93260eab6790c001677dcfa3260eab6790c001678102f3a0398b5c57df2001677e15d3a02150aeb99c200167810303a0368406a416c0016781b283230755b3c86001677e15e32f24ac82e9e001677dcfb32916011b592001677d56f3a0122c0236b24001677e15f3a0183aad9e430001677d5703260eab6790c001677e1603a015333810904801677d5713a0122c0236b2400167810313a021508edfb1c801677dcfd32916011b59200167810323a01e495905d3c00167820db32c1d56cf218001677ec9832916011b592001677d5723a0153357ea7aa00167810333a0368406a416c00167810343a0368406a416c001677e1613a0275f5a212ce001677e1623a02457e4937a2801677d5733a0122c0236b24001677ec9c3a0153357ea7aa001677d5743260eab6790c001677d57532c1d56cf218001677d5763a0153357ea7aa00167803243a02a66afd4f54001677d5773230755b3c8600167810353a0368406a416c001677e7323a0122c0236b24001677d57832c1d36f5372801677dcfe32916011b592001677dcff3260eab6790c001677d57932f24ac82e9e001677e1633a0122c0236b24001677d57a3a0122c0236b24001677d57b3260eab6790c001677dd003260eab6790c001677e1643a0275f5a212ce001677d57c32916011b592001677e1653a0183a8dc458a801677d57d32916011b592001677d57e3260eab6790c001677e1663a0153357ea7aa001677d57f3a0183aad9e430001677e1673a01b4203520b6001677d58032c1d56cf218001677eca03a0122c0236b24001677d5813260eab6790c001677d58232916011b59200167810363a0368406a416c001677d58332916011b592001677dd0132916011b59200167810373a0368406a416c001677fd7e3a0183aad9e43000167810383a0398b5c57df200167803293a0183aad9e430001677eca43260eab6790c00167810393a0398b5c57df2001678103a3a0398b5c57df2001678103b3a030755b3c860001678103c3a0398b5c57df20016781b2b3a0122c0236b24001677d58532916011b592001678103d3a0368406a416c001678103e3a0368406a416c001677d58632c1d56cf218001677d58732c1d56cf218001677dd0232916011b592001678103f3a0398b5c57df2001677d58832f24ac82e9e001677e1683a02150aeb99c2001677d5893a0183aad9e430001678032b3230755b3c8600000000b939a47e4cc9df0c801677d58a32c1d56cf21800167810403a0368406a416c001678032d3a02458046d648001677dd033a0153357ea7aa001677e1693a02458046d648001677d58b32916011b592001677d58c32916011b592001677d58d32916011b592001677d58e3a0153357ea7aa001677dd043260eab6790c001678032f3230755b3c86001677dd053a0183aad9e430001677d58f32916011b592001677d59032f24ac82e9e001677dd063a01b4203520b6001677d5913260eab6790c001677e16a3a01e495905d3c00167820e13260eab6790c001677dd0732916011b592001677d59232f24ac82e9e001677e16b3a021508edfb1c801677dd0832916011b59200167803313a0122c0236b24001677fd8132c1d56cf218001677d59332f248ca8ff8801677dd093230755b3c860016781b3132916011b592001677e16c3a02a66afd4f54001deb21111106ca0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006da3d000000000000000000000000000000000000000000000000000000006592ae9d000000000000000000000000000000000000000000000000000000001debe31d2cda7e6af18763e5637dbe6110bb1ca020a87813da610f530fda6573f89e733d0000000000000000000000000000000000000000000000000000000000000000c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470fdff6ab6c3fd2be5e13e796e29cab95c4fc55274917e8b7b9b7d5b577057806b52ffcb41c3d105bc1f7d1a5abdf5b8e7aba552905088addc79b850dc2981234c000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000003e0000000000000000000000000000000000000000000000000000000000000026800000000000000000000000000000000000000000000800b0000000000000000000000000000000000000000000000000000000000000004e10bf8327d32a8b36507fe247cde91bf7fc9f7dc9fff4756afc71d83302700ae00000365000000000000000000000000000000000000800b00000000000000000000000000000000000000000000000000000000000000030000000000000000000000006592ae9d0000000000000000000000006592aea40001036500000000000000000000000000000000000080010000000000000000000000000000000000000000000000000000000000000005c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470000103650000000000000000000000000000000000008001000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000001036500000000000000000000000000000000000080080000000000000000000000000000000000000000000000000000000000000000fef7bd9f889811e59e4076a0174087135f080177302763019adaf531257e3a87000103650000000000000000000000000000000000008008000000000000000000000000000000000000000000000000000000000000000185c6640126b2cc9564e4e4df5f484f09b85f1c047a1614f328373bf2a1bb584f00010365000000000000000000000000000000000000800800000000000000000000000000000000000000000000000000000000000000026dd71e2a2f97b4e08a4e175d14888c2a5bbd2007aecdb77c99a2a921fc74a5be0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007e4300000000000000000000000001007e3204036628209bcbe0c8c05e4c95f66367824a90ebaa3749976486d4ad2203b9a294d0a000e10bf8327d32a8b36507fe247cde91bf7fc9f7dc9fff4756afc71d83302700ae003c36f796251e56d71f10dab505914217cf9cb759eae4938e72cf9eab51f0c409012307df722a48e56fb1746746cfdb649283ff9f23365f8ce7b46135a3cb8d65f409011bd754491ffb8677e6d006b06ec253e484ec4ab29c95efcf784a3083db7ee03c09010130d49bbf3edd24c3fb63d241235d08d7ee7f3be5ce8df2a1d887811bf8c3c00901993677f04f064d1e1b1bb09bdfb9234fb3611b8d1a42ea1e7eba6971e307097309010864d49ae58bd582ad33d6dc0d2bb0b17abf8fb574e8a56778e5e73cdc108fb1090117d59f54dfa252c657b262d88fb2239ef54280aa1b054fb7ebaccdf9e3f9a9ee0901a6ee7c694029443335c9948ceebfe396d411686eab8ec3979f00f38db45a54950901a08198924d5641fd2aa958454ec13144202f2013d7319f97a01bfaf6554ff2b109016582a7e0dc61231acbac482de1f07b9a1853bd92e1558b0df3d32ebd970f67780901ebdcf00f07bf10df609fd6445d67ca347c621580ad47fc2864e61bcb122ca90809016a8602630588ebd658cade77e0ebceffaa50e73115ddfd5b83809a0d2f7c167d0901ac61f428a143a27acf62f9237694c008b584a3209d341c1b0977d27c656dafaf0901c6632ee4d108eea3d337eb1a9f4de1fab097f85468d1930686d72b400ae5b1d70901a7b7f6c24d9c4c1952bb13269f1490c94919018606aad4a677596a0c52b3266e090139f47f8538c69f1beed6ea6800ec64312828e41b3e90618a8e6809acd7b9d6dd09010c4cf3ad6ef7b41d1dfc1c98e1ad650933b1db9943274540623bf3e36f79f1180901e5eac25006ee2ff0bd099ab76a0b7d981344d0da5af136f22786ef16602f51ad0901a69bab99f8aa5dc07ca53d1772214d33fd458be7e8faa33a6fbab7aaadd980350901cffd4142a35aa6bddc3feb6c16206428d410c20d0b85c13e1323b78ae5e4df3b09013f6ebad00edba0c9ab6fe7a01f01f70f85e0934495c12dcf6b08b4fe48a0474b0901681f72e2688abcc1cb7a0b262361736a4fa257243f30b22f0155b46b9de5b890090197c53f0cb5bde411907b5029444a6c017b199c67ef1556f3670d81a09476540f090182a519e108e32eb1f7112149782bb5be79552e03aaec4d4324402cf38aec361b090182fee57fd2277a550d05b6f44519d5014aad5ce177f9ed19cfe502ddf893407b0901ae4d687db6dfe5e138bf920aefb5ae567ceba0d9164f63753b2954d3f0fac3420901273270fc47dbe918273d4781f767150b02f843bcf417b146252522737441e04109014753e0ac4b930575bcc6a09714269739d633c0c7761e5da9614ff4416b097e8d0901ac333a37b97b9eddf1eb96f5ac89510c993f23d6e685d24abac1f27be113654609017deeab34a19fab4fd03d1b44ff08255bab5077a21b839d4f466a1ec36cf750ee0901a931fa4726bdea65abd0105bbaa9406c2de9f00518482cbf658af83e6fabf82e0901f7d92c096d557ba498f18e29245bcc22015d94a5c0dce24c554e966387522cde0901c03eba1ae60691d45f9796957899ce49faae86e0fb4eac14164548303ec561a50901229d8f59ca693cef4872d260c3240541c81c4c40b860bbd0e182a051471a33b30901a7070897b5e01ee15962e0b454d7b78f88ed0a454bf111315491e4c48229fa750901681a7d8837ba1cc106a53a54f0da9c8f3ac5f0658895b94a0e8eb5ccc365e721090161a06feecf07ec75ebfa9dfecfaa4901125250f09ebba0a766c1944a06cc270b0901f21206bb4b8ebe24b58adbce0d02c491f7a15a6daa7b337a8cc60551b13039e40901ca6910627574dddbcaad7b34827353b1feaf07a52bc2957178b84863e5901cec0901ab51b4af57d4b390630d5f1a3ee447c894dad5fc5baa54860cac9fe5b09201ff09013969f71f7297575139248b20774c92c067fd64bcf0687a0a440e9874225391a8090122494d058c34207b29ab6895b32c27de46f32180401352727a71dd95ef1cf638090128f30f414bba82be39e4340216168a1b4db7b516ec2dad6e5d01c7dba163eeb50901428a857ce3ff94412830eaf9853364ab48a97f0ba35f4e2a49e478d81e0a3ae20901e517b750dc2f3cc4beab4337c3ae79d282d3d8c0f6d7219055649a7128d93f9f0901fb857c93b8de9fb6cf664dc5a567e08564f8d6126629c71c7da27b8c56276d4d0901011b7b6ffe1e6b7dab628ab0fa61e1befc5f1a6190948c5714acd10bff1eacc30901568aeb6ec21b0f249b967499968908ebb128bb4b793ee2b0b0f25f934d6d4fd20901d9a2e722fb038d36bdbd69e22345dfadecf5c6149d2717a9c4e5d350619c631e0901bd136f9e9b19fca949d2ce70eecee3d67f6f3bea742405287b334847902af80e09013ca87326d99e5ff74e374d55c9ac47d6089ef56c2a88375cdb6cccdde986eb54090146eeabec6291d60ffbbcc88ed4f4a3838c1deb6cd422d1d1a97bd0c0f6904110090133a435593dbacf89ba5f3cf99074b18ee4f979007be7fa041008692f9ef55a3e0901244789099b8d9c351e64590f1a7b7a3fb6f1f90f87064188ff626f53455811ec09011c7d34503afe5572f8a0d81374b863df7b36e8e400695ec4a2c9190b5d22bf890901c7fbd9042f65867fcbc5f4c3b83aeae9a1d77b206f649e50d957f01174cb893b0901b4c11a55c691515d5c56c9f03b43bc6b7f5ead8a3b2c6a6d65f3eb87d1000ea309012cc647b96da953657f003e05fc891b8eab55d26bca1923c990fb93c234c2091209019c915b0724b6b4f3d8d0dcb455a8fb3ba6dde334c0ef30c0c939fc801d0a1b5e0901080ab299026d067255d46f486eb594571dceb99f6eb2753b00cfdec18f6d67b80901c00e2c36edb3a280336ef35dbf973ac887514fef7c91144bbf564ebe1064833e09011413d807f64969dae6782610aa896f1296c4d9b8c7b2a0bb04f40698d25165680901d7def528d1f56a267ae0de0d638af31d0c67a8e6130e36f0b9c7325a7341fd4a09013fb0adb0c5da50f50373852e4bfdd72b30e26329d74df2e0265993b7611f967e0901a6d79b30ee4cff4afbb9b0cf681c2191080cb6ae66f1420ddd65fcb2b2e11abe0901d5b874cfeae0edae9b8049df0db803dee9e9f90a4fefac58390d80c9754e91e00901fc1342a25289aa866d349419b869bae4b76b40047125df515bfe6a000b16a1f50901055c49e0c69fffb153ca1de7883b12eac51fda18f9672bbc6b82cb89e9078c9509013bf7926818ac073b9dc31eec22e0b6c4b44ad30bb0c25aa319833baf9cd26736090199e04f7239e05c5f37053bf5a2be3ddaa25f08033585c9a83287abeb27db5bdb0901b093447ed6ff45b7a6c5c24661f0c344b85bad194664cecdf9e81e5a483561d309010dca8355377f85754335a4e71ba60053bf28ad6f84338b3200ae609008e22ef60901a317b54d60193f3492ac2563bb3f4faa3e48add6fa0adf9fc94fae370ab4ca670901c3474ce547b3b9a3e5681dbf13463ba6f4578fe5401a12d564c3268972a047db090146783c17fc49529361b364d2fe899468560b7a4328e0acd48975377f413314830901fd4dbdd7db7f6b42b4e343efdfa39c88b97a3187ec2dcd24b20b7cec20b11c450901fac2249ed0eda2a11a68ce064acf307ee8276f650aecacb887f6117585802a94090191588584fe2768524fe282b149b3a9b679bab10ba184e13fbb16feb2858fbb8e0901b8f513795ccd00240e8f5c9d7074efc88c22020e5727bb2747487116283f1bce090127b95caf28f1af84bb33f4192b47eba77785955905a8ba9d09ba2c71616c410f09017af4ad149d218f68d4687502ca8e36d634e1f401f8540734e42054ff88b5266409016dd4812e1fddba3cc06b69ab4b0d703e412cc27830cdc7dc3e7ea3957d8cae6d0901fe2881cd9219519e5638f5b428254de22f24f2a08fec6e283473b48350bb60cb09011f6b09e45e0dcf408f926874a4018327d7be2a56bbcd439d3cc5a78e3a4d65250901e1c9ddca757a71ede6dd2becb9ae1684a90aa375d5dbb3ae24320c4694eb716c09019311ce6791922d35cab0bbf944b2d044fefef5dc0ef950bfff06b7819ddc545709012532ca5d78431f80ae7e0cb219cd91e4e88d201855d91623b21ce7d72737d79f0901a7e589b3cf5261995ddcfa3dbd3a836a591a27710384fcfb76377f2cd7c758490901ceed2ece7b4f6dac39091ce4f5bb6568c4e72ffa5378d03c6c7b512ec86d41080901bebe58f09e7aa077add8c2277510f0864fbf4035b24c6663625406bcc49275d70901c3d72f25f8264d6f2340b1bfed060b1e4d153c01ffdc441e53e0d10cdafb08ab0901a8f64e8194eed13156cfafff33d50efe040526361512a32b92b7313b1287386209014ad85d0debc96ed43cc6dafbffd4e6eddcddc789e1d6a5b18af330d975c1ef19090125536a7c8d6b2b67c1da2e894c6f95f7a06846bd6eeb2dd7e1dd336c9b0427bb09016493318364ab6e7ff04224e757502721517c5b32761f8c9e56f877988ead4188090105d5b87a277a7a64eee7dbc051bd7b0c9975f7a92dd13bcd97111dd689b6017e0901c86b68a0a29c911941eed8ba150de879c2c648653eddfe63e88b6f760dcdf6ff090180a7b989e79a1e946311354dc4333a3ff570f224d17657c9b0e95b9febc955650901989f6553bd69f1e3225b72d793352d8e91f8d2faa849a992aeb07fc63dae1fad09016f96f887bc983309cf63de5b0730bd70447cfd2557aa15a754b2ab4d7f3c557e0901f584df9621f848f9826fb75d2d707d743a6e6f811e66da918fcaaab066e5f3c3090116c598675982d66ac2c38074ec185b6fd7bc745ef4da9c907e9dac8c97baa0e90901da5e3d1f63b9af8c2798097d251ff44634059cb01292e37fbe546722fd79d099090122e969203c9b116d25579eb30638105d6d9346eae08525f0455f564f6cbe3a0d0901d26be5a1c469e87e13cc95bf902ab8b08fcd4f0a59853308a58ddcdbc2690fb809017b90e47edbc1dfb78a757d2147c754876b3f9e0e89769c58728bfcc6da82f9ea090149bd45527db1b94fa16aaee0637b1f047ec3592657d872e79c428bb35a2a43e109012a4bf6cdac868c0ce041cf78511e80dc3fb5d319382dcb3183a5c85ab55e12740901479c2d310ba19a2887ae71d441006c8ec39346c43cba4627d7e117073ccf6b1d09015e24761660a6068ed145879a5c15c864290d9fa0fdb8775e42cc44d96d205d750901ebf01a555707ab4505db1917fd3f030d35e299580d18f7f2b2ca7c0fe10a8eec0901d318f8a7dadabfe3fb599c3ceaebf4bd716ae0f73e17121d28db00e83866db080901e2b1ad2333982058050567575ea6f7db6acabcaebd77859164136a1258ed762b0901d7c7c7276b4bfc647d3ab422c1d1f28194f70be704d1adf160ce84b267cf507009017c15098d9cc5878cc8c3973124059030008e47cfc0054bc89aa98d3dff8e93460901d654c968abb957215a7c1be15b238a2fc9a17e4531ae5e7e09b5d963b18f27fb090177c727fae551298091298469377aa0ad8e5c94a0d77cde0da9d15137322c540b0901bd938b9ac15ce10a5e46992c3115dff5b85e62cc4d51ee0bf5228c9e92f4765d0901fc3540cdc78120056ec625b4a234bc806ec41176252228f388d9fbab4066a13909010d6ef822b7598f1bddcdc273b6a80236bac4aea2f6e4a743d67d14f43188307109011e41b869605313e5f192ba40bbd1c888f16838b0048c7f7ab7d86e4972ae02040901c655c71ac082f2245ee690635d4eb6a292ab44357111c65f419d52e3c4f857320901fe2f2f48a89cf3c6ae16120c13581b174d3a88cb9af0269a301360428f29ebb3090101b074263773972a23ff69e03d5ad4525bd93a1783e195fd64403ca4680b2e720901f24bc46d279740388ae3e51669470d1c77c4161bd5435ee6a04297d4c2a122e90901bf51a85dacc68e4946db69b82ed3abd723f8b679443591a094ffca9224c5bc94090177add778da61370fe6c753c752fa48c230ef76171ce7390154bad6a8dd74cf2b090122262a796a94290459c42c0b6b145c99d94d8e541d953b47224cb5d6404a49850901e479fdda2752d53d6848824fa46feb56bff72e48a6dee217e7031787a0254c2e0901c137ea8dc8ba124b7e01ec829c3cb56a8d36be648b6fd4326b1c79ffcfd88cec0901b33d7ba3cf3a31547d4f3f7a4da1697ee46ea767401b9b529f08dc626c595cb30901cbaf5a59c7a5be960b52fe6f47fbf3af99e1003899788c66fab93f0447dccf0c0901f6cff2831c3581d19b98d9b70824b39e1eaebb3cd2c0ec48e98d5b423e7a7028090194170f71c9580aa2ae9b43654d983ba56c7d200eada95972eef4ed306932456309010f516949e635c0964c92be4933dbc51b946da9a7dbc894ea1bbaf2c980c2f0ba0901c878b7f804aff56aa75bcdc0e6a6ae42a941d6c0e0dfb3c37bcc5ad6ded514ef0901612c4952638cf3e5196015b240ff652631c47634ebd730d118cf7412c34a1c080901d90ebd01a835c4256fe84866c77e68aac91f2b22f695e9adbaf51a75e1e3115f0901ef190776357734d0e31bdee7cfaa63951dd7be67b8d79c8f1e41c3e58087739a0901a12b279388b630005bac1cf8e93d3649df72212530cfde41939a7df7413bf7a109011b650e1c72e98eae92571e78f4763c5546452fdf6feb31d6846a61aa37a3bb0809014a5a1801fe42e596f1666a5f1a4b74b118333523dd5182ce4a62be4b911912220901cf8af103d31a9eeb07230bbdff88a49faaeff748e474d6a5cfac6ddb95e07aac09011eb22ddea596b392e519bcfeb956347e7fa948d9468233e3809765db036223540901c733c6a59dd351b89a41939d2d3bdb22d023f5de95f902a5bdf72a1521a722b60901ebe289c6f45ac30a0b57a3a954735f1200b18cd90fe61987444fb8fab4d0143e0901998ec6191fdebb385cbd542cae02308fc55dfb3461c8fcf54c0c2d97c46c21ca0901d51471f522e3bc31f3284f47057a9b3ce18d3188d59b91fc84c37190db3f065a09017046d276a10530e0a4b4893a26569299da1c25237e42aca67916b898697cc318090100e866c85d68e224dc19d3dd859a93acb05c9c5ddbae3a05c3d666252e511b7609012f612f274e29a75ca7f5d8d7c72aed0efb9443eca7120bbe40fc19d81dbb84960901b7580bfc0e2612c2e919f5c6a081bf38bf3e9658752b2f1004112cf028b487860901ebc7d1224790ac40a4f77ee0a71daea7a2446478e57b4d1c612951307164949b0901eea852f4c0f64a829c68208a2f90a2c498918138588595e54a0dcea3eb165328090103d27ced8e1631fdc92680ac0af1a177daa3129544f4aa2c887797021bf2c83e09013cd8ef022f01bfbc6a7dec9eae71f000c552acec8a0819b253e9e8c261f1ab280901939c69234c4d46527ce56e29cb4027454c08cf0ff7b2e7392d6077b0bd06500009018cd96f0f1c9a94feaa0839fc7b12b7ae5f0bfcfe067584485ba0a144aa98d25309010b7047129334b4db930e6af4b5c944a9385f47e9c1f597e8d659041d6f75516809014e46710322abb21bd2c1894b593bfcccebec6d83198e2c4bea3ee8c40fe054fc09015ec477a73111711a4a9d43741b43401a3572013266bc3d76562bd8dc8d5bfc0b0901f0ddef1ccb808ba4f078c6a5bc9029edbd1637f54e0df56c25b6d01727b0995c0901a7da350946ea2b32e6ce97ca5e2eab8088fb630c92b27f3be4f8f73c2b21dd280901e26830a3dd25a1d9e8c9fc5f5b77f21936c1b9ab149c990fbb24b830c298bed10901b82f6797e491e91ec7b99ee1d9bfb669042a70352c54b942841afab4ed397f0509016a4d1d307c1d5ac97795431995ab2a17f70b56dcdb02fee8b563113cc7649db60901e2d9816f335da4af133dbbb960377153b16bf34f389f7b0be1cd0ddaa21b27650901a29c6a5686f32a8b0e09a8c1246d047757dfd2dda877a29da47484e409c0183c0901fb18e20cbd7882800f742f6448c14cb857826513cbca05c6cd4654eb084b979c0901445bfb305c11b28dfda35c7821d3d1472d9deeb2e7de3e1837b4d9995858e8d509019781f1cbb75754f366821194d6998bcc111956ee08020622ebca2901b558827f0901b101432588861993d4dbee666081261e246ac245c54f69b726b9ed73743e3b070901e70289adcd60474c1e12d61619ade1c4c7d3f3b297145c7224ebd46dc6761214090178400d46e9cc165c75f87298124a8b3ae2ae48eab636345fba067314c5cb4b8c090133cefb1d1240e60f52c7372c6f9398337e85616f6aa1f87073f1248261ae34d609013f720b448a59356cd94de5363d35564ed03c38a3ee031c98dc148d8c181f40890901b580ae710e42d364823c5370d3eebdbc157738396f1697fd2bcb203671b4b05b09015b66735ce7f6507269730a1e4304b7831a751cd2cfccbe78d1bd63c6615f24de090165eacc24a1671aa9484c06d3732e0defda30f1ffaa100c87448e6aa4d962770509014c7a784dadcf579a693dbc3bcaeaa9896c4d789361037eca94ca2cca4039425b09013d78a667f26572644f1ae27dc0ecfd40c46998c3b5bb069186871f0afc755f690901aa65a6269351b8782b7107c3d3f4ebdc86078108a2fe188354420e7ffb77022009014358b0a90cfa55895d547e70c391af858caa00e1bad1a4ea1822b3e1196221660901f0c2b4e79cba21befa93e57fdb7427ca9b4fcafd55ed6acf1755493ddb95129a0901dd7b83cd80af29eac7591814f12e7860c5af2c04fce36a343fc582e0cbea1f1c090163d8eb33a8eab98c928b4313202176afea88a25c04afd6459d3bca6ab7ee012c0901c022470f7f5b0c1f0b6828d7a022b12e47e1dc2112c1eea1b7adb3597214f24509018063876b44d3f26ebaabd7857e361a35f4d0ce2c330e98bed4f23e20ae0b4bd809014417525f2942668457af7fb5935a876ae110ff88e5e910807fe86157e50d199a0901b1256587f404ce46bfff0c573de8a738b4f83741056a5c3ded2880f2e3b714100901607bbe3d446a312de710be8114e2729e695d916321f527322bf78c9bce24930d090110c27d17288de7ea106c958ed16705da0204a2aae136aa35a3a18f04bc3196d80901df8613b2d68efdc45ee3b975651970e3fdb5cfb5ea96b19e30ae659cdcd68f260901b806caa256b9065910f08e1df4da4a0265ae7a4934e2171b2e0ac5cf13535e740901705b64da78be5e0e528c1519d15dd81547f98480bbc25ed113cd8ce7201125d6090151f54fb608f58018f7270d8f7e86e0a439a6864b1550b51702c91b2e907168280901b4881a6ffc313c6b1c7bf2d44f2a6ee0e5697293b75dd1164643697a43143e6c0901ee30043aae32b5eabee420989e0623ff0cf450a2c51506107a869123f9a3a14f090164d9a5fb6bfacb911af0350c689f8db09eb5d1fd889e9b53906f35d04963b2250901648222d0b6ec33024fbbfbeeca908e57fc154f8af2b71aeb6e8ae1eade44090e090132df07cba183b6717b02951dda63345512a7cbadccef2d333917b6ae5ec405610901a767634711a3a49629349d8a1398940f5f8f0cdd56ff8fcd77db143c89c7dcc90901bd717fd406972a5d05887431e004d6a8c05ac29fe57350644576c51ef78c90e00901f83b0a634eaece47d0fba45e9fe70c50263f392a86126bd3329731f5f6ab0671090112cb56b75d82a00e49186175f2410f03b193664c8818fb0950867eb3c07c40750901fc8d9712b920e34598c0d477f50dbed4068272a6b60f92d294b2c0a72c2f90360901435a196d2da25d6c68e9bdc77d3c1f55f14e263c36aa88cc7a93fdeccfc8dbea0901bb5a8fd0d3831fc4cbef004d366f1dca00096eea439f07a62b2efdf70947bfa30901a0213be5d60713813cf2d2146586c9a956ed4a5112c0be89270c9cd5a20fa02f090181ab12b02d6faf9ad95221c8d0746962559949b5ce12196920f530527651fa8b0901bb3103172dc95a86210333b846291e452abd3a8c0c3d129c01464c16fa7e7e6d09012807999fa7da67e642c260fb0db939fada884ec45bb9525433d8ff80e5e0b49709010c4f3e2c34ad67d056003ac14bdd4071d39801246ad5b76147904aec4a1b1c130901ff5b236cc142f18d1c123a373f910d229d179b26de10194b24fb8df0bbf6cbee0901fc05c9eeb46aa1c161d77f2eaf265b9f778c16f085aee23f93d235d4fce6cb5609010df7d9b921f2b8e3bf4161b73a4364ca5cc12a96293cb6138af365344b2eec3309010d2e93885272bf24478941ba45db47d9d6403824d32053649901eec6269f06ca09019d454d28a1a38d18e0e44e69721cd09ffb715c76b5a525553370b09140c0686109012a1ce76c3f34e51ccd7464e07ea9610cd638206aecc94fce96be5490c0fa2fa409019c74eb513b94f99c5e1ef5f173efb42e32ca3c1807368388acc0fa54a11ca086090181a8def6e7ae0c28962a54180ce8016693d6ae3e460cd1d9cc1f78ce3f5316a109014beb1bef823be8ef971bb054f99b9daa62049c332b334dcc08a162874af9aa9a090113fd049d9d5a4d7a79d3ca37bedcf0d86af91b0da4d611461eb99decd5761c450901f0ac08daee9f45c3745845aa4c4e1aeb3cd71592eea23c6e6545acced5f6886e09010e9a6605b9a6edcd2215217de3e9fcdb852d64338f217760e3a1dc93cefc7ca409019997caa4346a5260b5ad23788825bb276d1cf90914a33c604b91dd38a2a259190901782d6d01bdd9ffa0628293d765b7df2ce2e8da50166b4069f11cf924889e9bbb090128acf7215a38e282ff91809667ffe568c2dd1dae0d4a4ab36b4b4866cedabb550901f825bf231013e7dc32b8f1422f674f1077ea57c576667b01f5f935de99bd7fa409010f2381a7cb36fceea19ce86028b9bf730be988294dca68d994c7c2c5ec846d090901e380b7293e2473c3cfaa3c481021ecc2c6294a26e978683ac17798ff0b16277b090133817441143c463c8f805a32214e74dc60e32c1d26895757ef9a4f15e0c42862090179d9025ff31f15ea5267f3f449c6067ad843f36b65b5d0a474459cfc56d400490901d3c16fac80984c7eaf37c195384afea0fc8df908c88281247e1732f583b9ea4b0901baba0b6b9002e64da6d87c9555554e11cd75dd40f7ed0a46a179543a864e621a0901f00271fe542c1f819178928e99c2f954df39fbe9835578417dc7292e2bb0b628090180598e28994f44be7de9ef7c174a247691305fe65878f442b7ff6d63693e840b0901352d3fe436d8484755d99ad76baf765666190ba1dc84c5ece01b6ac43745d60e0901e4d0fbe57f71b09298adb0c54549a0627c62530d5aba11df71f2cd9edaf5c0600901a85572b2a3036c97c98ec631ccc8cdbbd7d1d16383b271545ef5d52fee18421d0901b3b14c00ed5b57c97b0d7ad9cd9baf02bca3c6597e81e0c3b2ad0ee8704cc037090124787e4345bc13455ea537ed392682f23f0869a3d27bab57ef84d42cb522aaed0901fb84bdb0a551181e9eec4ab1793c968e93e0f8c195d9b7bde532b9a53863827e09014ea65565b2945c3bf215e5e6de80ebc8523902b48e883343166fbd0cdef9d89a0901990dd3f1145e051e84cc1f4b18fe027770a3a7c022b8b600b4d9b4b4b721a7ad0901de1d13051ae16f2e8d762cfa2d25189dddbf9819142944714e27855a9b89d1fe09014bd2d2d3dc8ee8cae5cc880ed92749c6e1cb0e3f985da6cd897b3405836dfc1609010a9ffb9d6df0613e01c1d1c5ab73b53abbf686614e9b670e5d5ab349bbe8872e0901266595e4cdbfd126d0ea0f87175a349d2d90e81acde37c212a4b8d75f81ac42c0901bb85d2c91f7af50631f69c99c26adbdbb4f1d2ece80de24713f7e7a15e0f3a5809014c5698b7697b94d5a88049b6ee74b07bd3a1e0764000623b25d657bc22d8656f09010d35d0a9f3cce3e33cc605823c8dc9ab44573ff92b5ddc85070784f7e33173790901d1bddd4e3c1862053aef33d18e6c70cd355e5816a2dead4f7aa2bdeb563987600901a26d7cb2ba532d40fa5af43aa30466e765a503e7bc8c898a58b737856b3d93320901151fa258332e5be89e7119b4b9e86148cd6ef113a917fec87547f26c96cf5dcb09010abe9c5c2dc7737bf0432214a7bfcb6892926839de72eedcd74c148a1d0f1aa60901feefaedd0dce855740a7832596718ff2f9506e9e59322775a0810a5de9f0296309017c0dac1eeb015364753c02c724254b9ff289d742e7fa0db99f49bbaf44dcba2a09016d2801b1c3824809d2722990f7927776bea98786a28702306ca8c391944cbbf309017e58d4fe54e27114d6e39260575a83f67ac3ffdd58b68b5ccca49b20647780310901c6820f94cbc2a65532f44128ec6b83844905db8c17de6dce6844e6ad471f3b2b09014cf6f9c94895f9dd3cb8b0dcd1ec8df2daab17a48163ae59805d6789be1e084d0901a613f2fc26206aa60b3de60bd9cc0413467302b72efad4186eb2e39453143922090103600697cc049d5619089ab09f605b55b0ebc08d890d3ab7a3c68cf79a0e5fd709018678ebd0bddbd20da6af8050da461596ff2db37f455ee0ce8d69b7b108610f8309013ac484cce1885c3a5ae1614758bd8ded170e57cd2e6dc3c555e608029a3565230901fe96ff3dc37e9b28eac3da75f3add2bf43686418ef383b8439db9c1cdb1625c7090104aae8357e4b97307707fdc2fc2c1d25452e20cd3df38b66723479dfe991674c09013dd8c0449b08589a1bb4f354b9983f76302b9de90ab453dc0592a8ffe4914aa90901bc5b8950241063dae6ccde10a5acfd0257afac4ebea39cdc86151a02cedd5ae9090107cd656f644df611abaf159e8598a562c116e611ef2840691461a8efac7b8b5f09010dd14bfa673be1b26f313256a55eb8cad13a9b21e806cf83fe32c034b890247f0901345c5d28364b5a9650c925b427b210ad9e6aaf2f73a9bdd976ea01ff0843644b0901fdfa9350383467df859c82c1ef0df041f4ed3cf52183ef8db9f81dc31bfbf7b00901c5ddf1ad1719e2002b2c4987d9e139b9ad9c4619010d2a7aa7dd02b480b58bde090155ea17a5ef80d16b058de3bd01b1f3eeb3c109e12e11e55dd588386270a0944609017c35b46dc9c0a5ffeca1c772b3b4b60c9f99eac55e7d0ba21882d38f84e6f1e90901cb236fd136343a432d9196315da97d9b79b1b8548c445b9d3817c6f0810cb4f909010eef7df885449524975e572a011f0f5219111f732ba1663beffed9146e3039c5090199dbbe61022ea7a0329b122812658f21aa35fcecec545f0ad251e44539d8363d09018924b725c2ad3896dfc8098ce2d42611d3c662944d94055c89a71653d329e3c80901449bd212fc7015d098e103639fbeb11b703c1b1d68dfeba03f3ae458fdf78d7e0901883de22c73a0d2665c9d86ab930db61843fadb6ec5e12043e62fff6da90ae3a90901f9a7728012ea87876aefa44412e93c94b0f3c504cadec9c3d705d4b8ab3c71e6090130d8730aceded6387120d7f132d385197d7506d4714f7a8616cbcf1b84b53f2b090123b0dcc6d4696e88d84967c6e05b8fcf5c9881a6572aaf72167d83dbd2c83bf209012bf5845cab98d1ab66e2ac7ae6516f9b1c54e54f72d9ae62e417c74fa876ea3a0901f10d2d0673cb638ebdab73ccd0401b2fb42ee22c32c67c6e42120dc33f1c24bb0901728227dafe7fd2d2553ad32324283d8a027c24ffb856ba54c4e5d2c65b754e460901822575f31c8d51e0095237ecca7480194bc522e1ee0a0068ce718af5a024a2a8090131e5f73fe5fa1651d8b56f2aad8505b099c5f26263e292169a8cebd5f20ec4fe09011e06360e2e85667c817d184f88677c9049fbb3ed350d4ce222b5c4ca602734a709018d70ce3ce19c68b6cb840fb28d27edafe4e7f9573f665bdb32f85d71aecb838b09010a3c15bca595624cac368f99e81930b71e2f55207198c26e7c3197cedb1a7377090109ae0f786b1c93d17f1e70c3276b4fea434f32758f4c94ac057cb18e16f8416809015a8f022fd046cbb77a47519bd283a7d4cf5d6e97135e0ec1e3b99909c452e45c09019a268a4a2c98ed3707ec044e1968fc994dd6c2b5b832eb7acdd180691fb8b7d609012a8f77fa956abea042594e07227a4b0fefeced506a00675d479e7b9a789d8329090141e0e4f5b7fcc563715b7ae3b11b0a9215a17ef75e64bb610af51d4cce0a629b0901754a712aba0c5abc9f78dcf813cc1b5a592e630504ea8f4cbf204a4534259db5090159512e6f4436f013d84049c1772665a42862cc388fb1c7c71bae5af62d75be92090196785c59d704ea4532c7e1b7a682187e0793aa674581611c9a34fc3ff4c4802a090182ed9b0036b9f11103b3f69e65e89f34b9401df6c0d727ebc034f9ca0cad35b709014e7fc6b1215697eed1caf831ebaa317f622f5908a94911feed507d056b77d88109012b73c25628f3db98e6d082594461161a3cc64c1768f51c9def997c8d07acbd2009018585490d33038fee7bec9844a2774d43103ffc848aac3bc0ec4bb9ecf3f2471309019576567aff6499bdd18e36ee7c3a16cb9a6dae49a0d096ba1d9fa6c5f245a2350901584f7fa4aaf29bdfb877cd8b8430a5cb965cfa1d2f62cc777129ea807684792c09015fee49a75c2cda830771bd2a120e1893c1e88bb02783b75625eb63a4f5769ba3090161558d789a78a07758c1beb6dcd10782972b1b90fc7eaa8500447357276076d6090165bdaa618570a3159e622572c31611381e20a5e3899496adba893ce4a3912de809011ba79559bfc383fb0c3b32f0b1f786880ecf52d1626532c14bbcc485a3bc52f909011388bafb704544c58f384d25c1405a3983d0961c669a7a2a52b6c6c5f7abceff09019350c6f3ef45a3129e11e739ae8c574c50322d0c1f260f54960319287f0245b80901893d1dd6091ff4a517e85d94f627a960da36fe230020d2a2165d1d66d004a9d209016f2c964db2250ffbc3fda3062da3f1bc9310fdfa1f182c187dcbb38930670b490901a96ef4f18ef3ddd0a1b283ed83beaf16b0c92538a91fa810e9d93db1c54cab4809017460213da4b43ee31c1aeaec1f54524da0b6cf73091f65f17ee36cbf71d94fb3090136f203a17bba548f2ccab10270714e5cbf72eb59d3a8140bf54559187995d9ed0901c25b3363c2692764761f0703755e2f053f6d9d0a00ad2cabecd19469f6066d4e090154def4d4465e3c5a8241a262b4f391befc5a88363c301404293abda815260b0609019652729a31e940ea08547786f2dfccd4ddabc540a607824c239493b82e57bdaf090132cf5651141ee48737ac7458a0b13108643b042d9432ad3476244b99dbb37cc10901cd7a39982eea730f8ab1ff1722a0c93740a5729bd675dbae85d13abce28f42c40901787d170e46c8bb853c065f51934b17759fc3207783a26cecd79c5674b198d5510901167faa85d41cd6dcf5ffb329a53d60e858e5b4159e3c9cef716c1d459ea6913e0901307aff6e2f2024aba9e539b8311147ed04aa8d50082abad9c38efd9b8172a4aa090131dfa96ec2ee82869d1447345b788fb6f907a7a42426fa2915f1dee73cd463a609018defbf96d591087d6100e19b7fe1e8e3bd6b185f77c5d2a134f1e886b79428400901bc0da5caea784c485425a4a183c210bc5b821e529cc70e22ab7ff50e042aa374090133208ef9659f3be5b80818f081f2f242df31cadf3790d13f02f974924c716d090901be8bc668f300a5ebdcc59b9a0bae58a992cbdd33ad2752b37e0ff4dad9d927c3090188ec2753d493d596c65d23b3073ccd640b317bd2d2613f041f88234c64e2cf3d090149b0b0083965c30d3b609f682ef4f1fa93727bed983ca6da3e8f7add3db75157090106542e1ad45d962dd8db86f2e71197463344260397a59b3f2c54856dcbd8beb1090149b8b8c725946209b9c39319a5754457c28d9868b72418e93da25f2b84a3a4cd09014cbe84801d63fa1059e64d7e15dad13893b15d141894beaa39dbafbaef55c7bc0901aa97312715772527b5ee2ed08415306b9c314d807251a01be43e8eda409caeb70901ae3288074723c58dff4c50ee07313697ab7007a94823053b3c1df87eef6989990901ce4d3bcea1c8361ca5e747f84e2b8ed9d4e058a9c0bbb720fa9eee1c2365578d0901728c0dbd067c44faf5c31415f8a075fb82d3c342cfc83d95875ea099f721f16209018ae848ecefc53eaa05ab175f85e64d31e197dcc71b5626a5bc9a8ade5be7a32f09013b682192bca6dc12df8b4edb7a201bebe80f17696795f61330719aa22fd994200901b064deccc15dc24281c392db5f35588f1ae0c783e1d0491541c7ac89bf59109009012ca4f24e2a437a4b18677199b6a94c0b381d213f75881f3862eaf4a3d2431f19090187eddc55e6bd011fa2dc4bf28fccac473a81b0a25f4c29dcfbcd394d3192ece60901115c48623c63077ef733544b70e6b27a7b8b6485770fbed525d7dd35154c37d50901ef7d1e47c570159d9420a027d310aa1a5f0996bc9f10504747a1d8c9ad2f42850901c846426acd4b17b4dbd8fd27af43393d1f527a8e4d7900cb962668282318951a0901dbaba16f7573f6c2cb1d3f915e3e8bca1643226ca37f16cc31cb23125c03f5cd090183337d540b29999c3485088dc4781ab386d32e86cc89cc71ddd8b1c474645e51090117ff8bc1210636632a49670ca93224f81ac8e93cd287ad719b182d7b636a743f0901f3fd2a4f136d0a89dab35989c72beb3be738c5c5c583f063dfa7ae4013b9bc0009016a6da0e088487cd9fa1d39f160eb5d26f1a6219b4773c50ca93520dc430861ab0901fd519bfaf3e8c3faddbbd6302e398f8d20628376d945d7a941c97867e8036d260901f0feb4e5b9ac118af2c57bcf1935096d7c44431aa6e4cf443142ecc6880638860901a467732619879ab8f6f0f7a9065ccada58eb4a68f8fc21dd5b502fc56d0aa3be09019ffc9565256641ace4a93d024f39fbf6258e07e2c4d1af306c62f5cee68c0e4f0901bcfe8f034d0fa4530f5592bfea687969e0481af891f165c1ed4168df2fb45b340901fffd57f7f6e8b4af86c1a8d53d2e72c91e173ba8b81de9111e62568e058ad586090199f2a36e83c9f9dbeffe683526e7819aaf192f3aec47b42a4bdeab72801846e009015efbcf34a7db4bf50eae851092feee5bcff37afcd94076698cd5c0353aec52ae09018452e9fd9b87e4bdb67b6f2efdcf7c9ee077768d9f7263e330bd2cdfd46c249c09014326b15ac8ce6e66961e87dbf92c8f5ca72a573461e72272e1a3fdec0de632da09016ce34441391a9ccdea5bc0235a9c2d10788b4a40dfa2f123348d399d792cc33b0901d1b4ace9a2625cb7f6dc7e02a4100eba310c9791d15c5192a6f0da246409516d090116c50c0c574749e619d2bdf14f70ea884cc527c704df0b8b84624a148abd689909015b60c1654308e3ff3d71918f05d19cc2d098c1e22a993ac201295b011601d0ff0901a082935f6173b17916309cf3548d5aaf39a3cf8208b6b974f92d3b881b1b7a620901e5140e4b5a7c825cad02fd15f54dc9189fd303d7b582866b16969f5e6d9bb8950901b1703474e05c11f1cbfeab8cfead0ad4158c1ccc482abb072bad0e3b30e70d4e09010341e36cb1211ae070b1a50ed4ed7dccc7d2cfe0bac25d9d13c2a2cd2d8c02740901ce7f3cea3bb98aaf032565df46d26a542f25985de89295cc86386c8622a7c6020901f4ff93c2a8c7bda7b2e9b7cc4ab1cdb576e9ba38cf86a9a50ea0aadf032ca72c09019fd3215e3837aa9ca90e99968f67b796ba05e274aa6c7ad44f7394c4c9f49f440901301e14d0ae5ebd924b6ecb4a34f76d46376e5c8e4b03994d30467f91455a4fd00901b0eadaced1420d25ecf72a3938d8ac91f40098a01fa6cb342c4f57063cae2883090102d9c5484854b92df6e15e32f18ecb5e9650faf91c10a96712336379c8bf91f209011b9344aa018c7bf415127052b8ad3b91c1115d44bcf69ae579941c3724e5b60c0901142fc15385cc7dee8cef934f805b9a9912b1766f074c919622ac796c29a4afb40901731299fe7a5277f1b52a93fe764809b806caba80d573fbfaa6d0acb2cfde243709014a95bb8719db17c116bf1778aedef19abc9cc889708f679d86f0ce9490ea82050901f45b1c68bc755ae579e1918f584eda519e110ac6ed21ab30def0bb4ed15728100901c7494897b226265c496fab1b07db542d4bdda73927ec71cd925509e656adc0cc090155c27ae7dade93fea58162aef5b54fbbcc93e05d89a1b5df7797101713e93a550901e8fb9c3526d2f3f850805bc642fc0e1f00c0c88fcc6cd981cd721691545db57e09015ef75a4f8117334a708002ba5b41e363bba1eb38015359f6c635b1286e4eb6d80901df31114034b891e6996821630fe4d89d67379ee55010e4eb40fbe9da63344390090100a8bc72726af550d4da31fd7447a56fbf591b35f703cbcefa9e89e8afb9f33d0901ad5eb34d3ef838ba05c38446c0b6349fdcf6d63f59613855bd39b1add1f2c1ac0901bce6ac205fd81c4be40663e4698cf4f8666e955968e1892fddf2902270d3c03c090138e583ec27d98dc7699a9b6da373e999f4c8e1f796df7fce856bc3924c14440c090115123f9b9f9eebeeaed8953b250e1eb987435b44fd297919489cc51f5ccd3cc709014c8bd465863fc7c1e96c5aa0b97577b5811ed9a2e6100e81a95143683ba599a909018f359461b404b1aa000b901f7338868c68f54cdce712404400f5a147832a0ce60901dd87671190452efd5f886cd350cfd5391334f9c97004c6ebd87c3b08bce83a730901987714afae0e5a13a64ee2feeb0bac94abb9ad71a49eb0a978588f94d27f611a090115f1bc9840001d421b4828fe617216386c7e3ffd37359cb61909e059ccfffabe090142521bcbc6ba25e5d210c18e6b3059f3c8e9cffaf3f47d44cad6d5436deb1c780901d084a1fac3adb44c67dedf398b9a1ad8d65cf5a83f2992425ea167e442b639b10901deb965913ebf8ec3d3da70672485a8d189959dab2202e5d8a50dcacd87036ef70901923ac9b730c60b86585799e2b5fee7158aeb004f397e7d48d6c5ebe9a7e8cf850901367a3912c4c3eeab5166ebd678e58c47b2a75d98a51de4443541ccf211ab1ccb0901bec9e4aaae8a037ba559683e552b790eeef467cc824d61d8d6c74eb4280145090901c9f8be712fe1f37604b58cd3d56d8d020006a531050c55ce69cc6c14876688f90901a5c67d44bc8072b918ca24ebde8e3dbe238d1d58abba20567b551dd957541113090119b6cc705e4696658240d470200c5112f1ae0e73bc6a1f07f8835a8da7d45663090144a9bb5e70d7dc96278eb08f14ddd44686a8e2fe2c301302bb4e698be897db850901e66166728f4f9bc72e4aafce63a0cd244d343f65200c201c24ba5fb8afa78f8409018ace80eb755706e6498ddfbb463a67c317b816779540faaef13db6bc18e2ca9009015be5fd38e650ee89847ea55fe8d0117882a4468fab1ded8707c95f027688c00f090145a453f1c03a542106b7b1ceedddb9e882e1e65c213cbe6778ea90fb3e3db9a1090172134e42c3adcdc78e0361d85adaceae552503aaf6c3d6545bd13febb30885880901382c5a2f154474fcfcad7894bac725b4d185b803027b5179bfda8c591e25fd38090153a2ccbb99f517b64b84e7d8b6729b32a995729e70c18abdb97a7257e978700f09013f3318ab6ce6cc6231b095dbd64410b140f01402c00b663f65110374bf46703d0901c70ff10f11358475790713128c69822e8f72111d0a2419f156bafbd2b6f6a9d2090115ac1412fd002c0caadad7b7e4787973f90e739e4656704009f7f9b13e9acdc30901257425cba6d3c021f6d520c1fd410755178fc8a17ed794213e25835d6fe91b05090145eafc61808daf3c249d2184b90a876e3c8c427bb21ac59ba6b2e7bc75cba5900901baacc958716cb91e5cbd82c1f75aa42c277b3a399012586a01abf4eace880dff0901894872c36a41bdb8624167b61ee2eb757dfa77a9b898a836d2e374fffaee680a0901a61ae63d456ce2eb52bb6047b799fb4867aab01e1be9259ac4a448e727c161040901a02687516030294a17c98571e9b372fb76b51a7a0a38429d8021adbf82cc8bd20901df4f9207012152164b5de0331e306c1218057a8c24603a30cac75f36daacb8c20901aaa28503be1cb44e7e15f1b0cb2553ac1625fc33bd8b0486e55ee6e1838c0fd20901c8111fe12e35d80de732f19f7ed7639bd6c8a013e2333333f1879c8ff1b8df6d0901660af7397dc7d304c47b09ca7d48803443fd41dc0175a2060ce9848d7142214a090139f9bf5aed3a8e0b977a9587097652794aa7141b40755f50245762a34c8b8afa0901913ddffbd2a6f68082aff98ae4d13b589f26e749f2da4319f159e988e9aaed1b090133b0f262cb0d31cb28b24145cf34886e68ba25632cdcc6e77572c970d7de4b27090110e91dee5be072b8493617ce42bc742e96626afcc0bba27f08e2b8ef3ea2e8450901540138863d1d6806e9e4d757e0e1e71f7f678be14fd2b9c79a9d24a83a8349e1090132c1fc583f81b6fb5f45a01ea160296a0554ec012134574bda3b21d89440c9c50901b7f8086c4c7ac56ae5ddb7c7a23f9f0fbc780b040d2260c112fd6d04c4afdac70901ff0f6f6528b7f1884ed7f1175008f4a3f98dd4e1a376af7da29a51334766d8410901e33a77b804cbb416695177ab389c3e04e6d87934edfcb903c50d215a83748aa60901247337ba39162e1636d508fe406719ee10ed2bd0063ea102d5e168d673a8ca7c09010570b86ce7ad042417789c469618eb540ec2540b4f60eb4b5669a2613a716ef109018631fcb8219503f5c25cea3e32926602d0cd3ebeeb47df19c39f93d65df1d02f0901ede587b244fced990e41cf03bbdf98056aa6fca88f38c99efe20614a391e0d0f0901e539e9b2cad8529798078d7ae3a384c057d77243e92bddc5eeb38c31b0a1f3dd0901980aa1a2429d07e5eed399b09fa1e7012d18bfc9e8c4b7a94375fb6a9998699009011272a3128c7d8791b47a22df4059eee96bd283ee6cc54cbc29ffb592811292980901116a2c3e2212fa02936f46cf1aabf98f365ac8b38d2d05617899abdc3ffd94e009011c09bea75c51ff962c09d09d1c10ebf6c307eba0e683d3d012fb369d303c3d2a09012670ef8a3fd60cfb37cb52b5001130a98d082107c728a4e338f1fea94fb0edb409015e9ae93654affc69925b6c78fad1e7170776dc183566dafc0818f9efa996d2fc090108122b94662a4c823bd3c6f7f60fc08566a20b027ecc15c0138d1e5f6187e4c009018aed3767b6217ec5692dceb1fb8eb7bda3b7b1856e06159e70b6aa075cfc05ba090123d06e1ae93c80b984983caa4f0dc931bf536d0ce4546319dbc8fad2779c673d0901d0c14c4c1a16c34acaf4a444b2396a26854daf91651931ef9e1d9a590ae6e2560901f3fec7ba29287df71d7a5260226ade4e6c656f138cb6a9a591af2bb8827aae8c090149bad4ed7906b043bacd5ee973b7287dfd1217fef5210370a22a2e42f638707a09015262d0b8fb0dc3495931168a142dfdddac2459707aca75e692372830dd035005090133993c2428644651f7584086639eb177844340912fb09109ce7bd81a29b2dac8090117df5696e23cf7724c48375d5c1e1dac93e81df000a3c693afb2ebb1d7f6e1970901f989e7da5e10677ea618751ca3c6b4c0686d60cacc586f5eff74851f83cefd7e09010ee1e9fc83a2e7fbd47ba57d59fc26851f7aea74cabdc1604a3b762340744d6d0901d0256e413e19bab8751acea6f2f799761a55a50edcfc25c7ec5ac0725ec1da0a09018b745de2e2169a4f33ae450ba201abe363ccc3271d8e8ad96d8af1da38275a7d09014764ee032bd4cd2367da1e03e43951a021839c70218f8bf87b95e657c9d0869809018238725554f66d47ea27dfc6ddb7a6bf652c7faad92085676502d0de9a3f998409013cc28b4dc2dbad72a398e89a64328dad6588414a2e4c8bfa06eae91a9251728f0901a72cd05484e4bee50873b4d35e06cc46c4414494f3c77ec2fa9d8ab18712d5b60901d20bba3a16fa0e15565706baaf3723abbc1448f1bf5ddd98f0fe19ef538f43dd0901d8b6d868b4ecbd7782c807bcb9d046ab1a115c6f845a05de2bf7bc001bf7907109015c82437887d6b3d917845524a2c73b815e1ce2de01dd5453ee713044e34491c3090155b38b663d930b9c7f2047c1c47c0f758e43991fcbda21d69ff39b216a6328070901d4cdfbc4c7e31d04cd8bbea5e9af32bfcef1706f5f617baf234e48bd8cfd345e0901fe4f434f7b6a05678e03eb5dbfa4be2bb44bfd5d4c0d6b0a5625cf5b1a6495610901bf0516102901026249a246c66f4512f38fbff20585dcbd50c99a3859e2348fb2090136630f72e413b137604393eb7ce99ac5bf38e83780cf139596fc9970b04f0dc609018bb6f6e25fdbf517cc6345287e2e622ac3b0d323988b862c75b604b338da89ee0901b147c1fbb3d55e35b48d6c3897dde379acb20d3ad900d8d4a046feac004b5c670901172010387c06dfe854c6e75cec15f1050b5e173ba4573d0f5687d001d391008e0901ad2ef1a4bdb110431451a6f95667e3431ec8eec8b66eb4a4cbcd0ffb51d4b34d0901313fb782b5fc1650aec0623650baedc43f28b0d90f823a086c3b08aee9f36b280901818bb3eb55a463ff7f808be6524e9905eda2f20e9e6083595c040e2b24b5df3d09015f64ea5b13f14dfa1252ac0cfffd3dd2bf63b4ceeef256b18cce6153f6e7aa9e09015b0ffc2fb695131e0326727cfae4398321dcd4be63a743b99659d07406945f110901324ffb7f27675737fa54515b30167dfe31eb45d40689ecb9073b40904b76139b0901b0922d4138d67fcd5aa6cff51b999964c51b93358a9ecfda82c2f5ceddcc26a40901e5bcc179eafeebe73284d0ea1a8634195fa5f6263cf438672f672d9e239180110901611b0fafb67a57f257e9243add8eb59add420f623ea1b4d25870b407be1a65170901a3124b921bf3adbc774024a272d3cf76bb77929ec0db5eab296a0a381476d8440901d6f27f6528a37068a4631602518a9913af1b250c9cb80fb259220da21ed0be0e0901498786684e50ed7aff3df42941064479d22d262f027671670840bce84eeb447f0901c6f68593bd5b2b044fbf3780aba2c49d0d18149e0a015e5ef37edd5521499e4b090175ab38339ea10eed3f7e7b9c18bd2a8985ca69f1bac2f7babd149941813dcc250901828a9a3f441bb0aa9be6c7a89fa391b98c83d6255abc7cdf6e47e894a98c783f090107cfb55fb7226931118516acc2b99bb48025bc79cf7c8828ebfa22687f13f4720901bd66b3aa1fa446e10f37d6dec19f2b968a528d4d90eeb101f1adaf32203092910901aad7c971b682fb014ed34370e57e14b224a0c157cc29cbbb9038912c17c493f30901006e5153b73dd1038761e479e313ae00ba64be216e887d51b83cc8f887b162070901eb893d2a70c9404b3f3f6ce86a588704e2d7d304fa21964e4649194eb4fe20d20901e1384d92e5a8f8bdedbd039c26705ed20aa312cd6c87ebbb9246696db1a44fcb0901089e6429c466a460431da65d2ad7a5d5bc4530d8bdb47a23620e8bffbcf8afde0901ef827a67d8e38c218480bafa1330e01b9a23445e5e5233d4a2c26690fff80af30901d11cc66e328b7c09d5ab6d496e3251cfdbc629bd36b087817e3d22d43a0450970901f0e2ac55284c2d5ec0d2e7923a08dd897ca87b361640e2342199a4ea380d47e10901bd4991317cde36667b92fa144f9ff2e42d85254a9937d3a0622494b754c8697b0901456b4e58413e67b1b316306098d3f98c6fbba70eeaf1e9c30dd26379e5f0eb710901d34104101147baac3025993acf6235f6329279acc4bbc66231291629b82438dc0901a026db24e42768cd3c8639c1efd36422829a214fa0a6c5622050a6fdbf31968709013b0d58a6fdbb7fd212812f7d2c18281f4f87fd405dd6812e655c023f065796c4090115348668fb86450a991253d1297605704fe1ba2663b53308e19567abe807bad709010640cbe049ceaf7f23b1b89f06ccddc98be50e4839f1fa05a75774b454b730fd0901fb35ec0f44909462d19675014d2f2641f7012efa40baee740565d0e585b2a72e090165fae4c2cc0875e41aacd384ca9b2b81cbd77a065348873bfe1189121560d6850901c5c016d2c00b8136ef00b2fe877dd7dabf5f78548b42d539b7630c0d1bda28b10901e455aae4a0c11aff61fc38c90c8aadefbf26cd603f75eb579cb4c2e9978e229e0901bd5d9ca1d69681fdf39bd04e7e817d4f580ba2bdb91124e1e0ec31cf0539d47609016d897a4741e9cb8321b774e3c9e98a71546c6e7f297aed8865b445e49b8c212709013b6e5cd825e55340f613fc8a0b3fe65ed6a3f91de386582e6a56f14213f32ac00901e7621d8a8cdd30a3f44e6b4b269a2fccfc1939b9b0372e771707e8e2c0ef1f5d0901e58dd164e2e541cdd2b8b7f68efa2b17fbd144b8fdf4305bf065bd54e5a9f6d8090174b8a43588ae51addf9f73c1b63630a86f18fc3a06b69eb27c708d0c98c85c320901dc92c13e19fb6138452a6635ccb7343987cf4ca2c775134d2369a3530ce0e22d0901cd3d73ff5315ca3ea1abc98fbf1d040d1545130545eb4516f59ae54e0f4415bf0901311268fb36ef2520db92be90bc26bfd109546094a910a8bd1092bd1e973d66e1090165c6ba8a1ada6b191ca6f8469319dee9f54956fa072ee66c6584707708a5ee6c0901d20b5a59a926c94de0779815a54048518e2ef800ff42bfb5608541040a32c56b0901fe96afba97491bb327409f09483828aea269c7f0f8a6ffc8a56dde141f136363090147bfd72ebd942f45f6c57d45c3cd62996054c64a71ff56cea3afa2fe7deb78980901193f3aa5be31ea3bdbafea2095798b9fb56be87ba943698db3defa2b472ccdc609016638567170e1f6c71887199d58826765d4fbce50450e0645e357da808ded5733090119f33dd8a121dad3c61fe6b4af0b758c587cc5b7d817013f40a0b1defea3bce40901ab8b6551a13458e1f30c0fcc41f3d7fe887e7bf34bbac6b2523f02ce7c622fcb0901c465ab5c9c8badad3c7238b90e47b04be26fa3c675645d888906892883827b5e0901659e04ff29b2449e252dc77ae7f2e79687cbc3fa9a18d7c1e47934589b9388220901868a816df51b85b7dbe6efd214a9b82b8292e4d108654f839f4766d9c383120209017c016870a94437890f9c540ba03803a2546b94bf55e49b286da9d5c74214a1b90901a2f21e6b9073b73ac478689f18d173f5b826e11c7fe81c88e03d9b1daa782cb809017cb4acdad98dd322ac3be6e4dde1609aea8110a720e45a6429f7c4c1ae70798b0901a426a38bfdcb5d86f454af72b8f3580614fee67e03dff6d86ad2d5c51f3f3241090111bd888f2afa0a58d52b9912c6ad866c8e9f3a02afccc9c3c5aa369d5227e8270901f3c1d02e45a7a954da6252bb7e8fbb29fa7e32f021c677614256e33f66b33891090107544b43cfc53d25030a3acb507c68531f0b2333810990f836e81fc141ea08a809019f28baa7c4b136e204b209ff180611d4daceba63949edff86b35960b935d91750901933c24141bd40ca55d4c038fc529cac8d3a3f3b048019c6874fb2e93767a9de709013f72ea723e91bea88397c5ab83eb304fbeaa94c46a087a83d391a7ef2aa4b8b3090147c0ebcfbbe2fe74f02d02498952eb3f06391dc7833bf178caccb876e3f7b3be0901b435ba1b19d77ec5efcc9c8a82ba1b6b5dc13de11729aa7d3404c3d82bdc36870901e8609e7dd92d45a06dd8176bac9aba7ae4b290c09bd172e4253bfa48b7b5e5300901b53350537f73e33e77ae352641a19b9d69f4db0524099c9218f6da90aab50ae40901ba9ccf3cebe2e71b5da0e0ebf1d804140774e9935c721127e28b5405b05c468209013df46368a9d0c127494609914444b17e772a13fa2eaf8a0b67480dc90918853409019db8f4dd49231486390ea3f4e9136ee0802e1213d52c753b6b1948db24d52d340901baa2bc104cd529135314cb6efb09e3b71159977e6a993e471fcfc80030b1183b0901076b18a732a4d136eabf3c9473d0ab70639218d32bb9e0280bf898f1a955684309018ee8bb176d4a05781e9c38366143991db65f34c08658d9e96966e0149785e15109010e99fbe65e6ed9114ca5729e8fa1bebdb593be9a79da9dcb1ff1a95f420ef13209015b737a9f4d940166bbeb8d2b4a8409f773dd49cdc90b51fa55e2b70eeafc1ec00901bde76b31ee10eed2f94ce39b5f2285427a06338b93d09559813cb9676d7454a20901bebde7dcc078f3ad8957f97390657314ac8dbc1b7e5f34d5974b41c8e27d8cfa0901e1ff02ea3c1753ac1d083793c6998dd6f4ea4f1d788607d6c589ed89f91da1dd09014382bcfe2e14f29bb394ca4c36fd217867be64bd5d21004d958e1ee0a957d69009018482ddae1530aab768f1e412fd091a650d0b4b61a2ac3e52fa64a8a2fbf19ecc0901343ee603cbf0e224b1df2e87319ceb114791767bf31b05f1cffbdacfa44e18a1090199a2aca7e1abfd3f255e3af7063722f4e6229e652e3d2fe0f156ba624d7e1ab409014cfdedd95ea233a50041947ffd13b421e21073a4f177fc7aa49b899e406213900901ca652f2819a2a04416e00f62c63749c3881b1a7ea8ca973991b77f99fb3934c20901cb4ab872f1ffba3e962b26b5a265c75ba33e9d0b6bfa47961ea714214ada0f150901ed09f89254b9c04bd7952b6eb98d9b650da00a4be5d2fb5b64fcbd0e1462c0af09012b1b9759671e2813a0df144d6f23e6471b9f170f985d499aa1139ba83d02e52c0901abc068ec410ab471ddee53a03fad86b7d8445c6662c8fddbbb9ff0e068382b400901bd2939a6937851f90443f66d7f7e91e37b8b91ae76b3b8ce2f422cc84be26ae50901546c71d2fc8d3b64f4534a0b3e422069b16d48bc8377015c7b49b9854c9bf9a30901ec87ae146d3f2c3775e724844b680d1cd898bd482198fca4b6b6e26b1bbcef500901d32be897a8d05c0aca4a296f6b914d255c1bafd55f4f1dbc0e4be0d1e92ff5b00901d7f61dd232725e121c31b55ae2a37d8d1517acc6d2b8607d7cca04bcc74642cb09013911bca0e1bb3a4295ab18a1953558777251bbaa09c0302a0d697e90338103d70901ca3d98ba8d480c4a72c077f73920d9ed1edc0350d5a9af4a7cbc63d8bd0bc91e090128c3937c586059b53a87bde7ab7b2119f3fa9eef4f1b03951a06a759b0f4688b09014cbf1296d11391426dde2cf93e6215c43baa814dca96f4ea5230b6aa436a412a0901094cc558dd134cc0b54456182098a2dfd7278e04d4f2e917e45dff81303c6566090146b50aad8e8878d22d95184f624940940a4fb59e32f05d4d4b9dabd77e4281e30901dea37f87da33ff5637e23cc1b1474702bce9ebdbd4a51ce6dfbc5c2ccda3c30c09018cb3b5025b12026f211d3db000c9d5d4a1b7693667f52d6642f24540d07b553a0901476d1a614200b549ba5e6870d3ca9517fdd06f2e5ebd99546c19ef2120cb61b80901408113acefb687b0cc2c12eaec2db2e2a502c3793d45db114ee1b2341253bbb20901060c0f444c99584c97399686a42a2bb41eb2bf360fc0a4eb2b45e753f3f0b19e0901ffb1fa37a0418f1559364d041e81f65132f434bc77cb4bc25bed648ccee46ac1090199dbd98867dafae8c6e61bedb7a63e893471e654774695ab0804435a5697c84309016709fe5192c61603933e810d49f3d6c1aea2f17fd767cde771d1bf52a51c05dc0901411602bc4e97160b29d7d9cfcd7bbf5d096c9b450d37e9a0fed162d0fafe12760901ae71d1f6e245e106b0c6f2c418347add6033605c8604c753fe1385b7742a610309015aed3cde745e0e11f0571ba3cb887d39670d3fd9de689ffd9ce9e597c296529509017232e30a18859fc23fa4d5208f5d4e368dd064ecfb7b610a0df272b6e54729e60901ae0ecf90a76c1e748e2c56085e1365fe8ac838940f4aecb85fb1d87fc735fbac090104945a62d9d89d49df48b537fb5e688189d46db9840510146b518c34bd37eb1c0901e910bc5a99cf8b2d355cd9c663d3d03a8a4518652e897bb4ec3f22a4ed5b73f709014068bd93e177b39c6fe5ceecd72d60a87a99e9b9c402a2797892c39d37cf8d9409016e5be36704c660db679af7ee8ba54b85ab341161ceb1c6fb3b5c9fe7252ec7a00901978afb1b4fd4020e79f58c7034efefa12266db9200dff3a18f5dee089fc6c9650901d13bb6fc0601d1ddca347b5f66adc42d027cd9ae9e1a331a6fdeffb23c8e0ff609011fafac64eb47382331407d91e79f552d8f6ca5c2cbb8f468e87d05258badfb7e0901d3b09851185fa3318f3ac6fed3967655abfa964b7d88ca4cef500daa1dbc941709012a696cde5256b772645700b682d08f96d1234436108a03f9d711e9b5af5d6ba309011c4bb2876ee67685463c714673a9cebeab82c3ba944b7a7489c1a9fcddcc069a09017ec6bb76dd07d91a0383fb1c4c61659b5e27266f78b45789574e6e3ee05556430901dd2cd3058917fe0d842f4c3a32143dd05d47919677e0260fc8a9e0f08036ef79090164ef51a80ac8c17c6445cf054f0032bf40e40f3c1ebc7b425b6302c228299e9a09012d31b6a0f1938ff249b2651ed838c43c0f8ac5e2f93f78e38fbb25c16261aaf309013561f17f397989026d288df95e4bb2b381d6c0ee82d99fd67213d2b17c282e9c0901c2ab162e9af9819d9da09ef36ad49651911ba9ae92bd2e8a5319386d2bd9e0900901a17ef8dc1eb82ba811c6a20fe7c923535966e887744e79e15f5c6df0acb287820901a45542e6db83094e76f47096fa567300cda19bd1b2fef63e9f08c317e34bb97c0901610a19ad26e36155ab99008ece8acc27e93ef733dc63ce8f9afc02796d83982b09012687aa8d38f3ba74f62128d9f4590d8444da98cd80b06b174f4f7067443a2bea0901daa70756df744a461c29c3bfe339f89d04150a1b36f701a89644c771f7be408509013468d505ec633cca8a7b6be5ab3e3445db8cb65540ce08e2b0404a11e00ea14a0901620d0a78788f7060197c1334900a905eb199b339b96a55fcee0e34861a44743e0901db27f74f000f01e5d2cacbae247a7548e7cbb5032e9ccf03ed19ca098ab3092f090122fbdf44eae37c62911bfd9bc2900ed7bb9f34f0285d0a026a562629a2eef5900901399f4dde56e4b8605ede590b766a3ec5b764d5d3dea4df3f1ec10da9427cbb15090194867bf906fc914dba16d8e22ed24671882f68be5b83f44b60ba85919397005a09014180203c77b82ce7cd917e963737eb2561f671db7f9a7521e8712f5fbda9cb250901a66e05343b468dcb0dbd980575cd782b53b4e82ac6d1dc93ada6e8f2a3e7f00d0901521eb031da784746a4fa7e643a78984e03207269ee4cc92601064d9a3ec28e790901b1e67eb2673d5f28c391fc006224e9112c86c0d0684663a4743475957e3650e7090163a60094942a3cf2fd231f4bf10fd3967e1b7a3abb2dea4b7febdd55670fb0930901f65e6795ab7205f366cf1fb95f64ef58ab4416765fb55b706707969abf8e62c5090196d031a2c76475b8233d962070e97b995fe4055630bdbc070b27c1e4c28cc2e60901c0ff76106241ac7a9ec356018cc4434671c3d4279ee248b09928e70214d5b3f709019f2af47cc62e3d407ba94ead56df8f252468fdf7acba52bff765079c721d01a1090164354acd0f56d77bd0058eae777a5923bf33f86cfc0917d80d9f4c509579d6a50901afb5948edd77ef864bf68d730ad18584e64801717ba3970fd45b3b3879d27a9409012a0241e549d366b6882144e371e0ec37ad7434295d41d3dda8414bbb29da7720090108208f7cfc1e67fc857b6577e3daf9e7f0562b235ec4c949ba18276c535ad864090139e0108d59148ba7c3d316bbbe634dbe694c75429d34f23247b4db603af21434090195bf45e4fb5aa47a9f9a07ff44ef96c179777a16c0437d1284b3e19bb8e4632509012231125cfd122e67cacd35cc731236864d686d771e9cf638d723112f9f0e3bf7090101ea94dfdbac2042e6332e0b4655ee06116044ddd30b52fb81e2cacfd6158e2b090114f4262bb4cb5bce9b6094d2405a251a6a2ab4cddc9a6cbbe55ba46073ac0c5f0901432a0c1937c52c2fa4b3db2e098daf4f34c78327169ff80bb7a7c3e6a593d6ea0901e095bf939a44c6351bbc581c2c5bff70e0ef11ab4db7efb1c43b9c33e72d12760901830f376593cf2f561b6ca68d958ca2896d331886e18c7b6e19dfb5788e50b2e8090167a14bf65972f3b6c2e6c871c8b77dc448267ee5a0158227804d660ee3350f3009014401e1c820c00b9a4d92e07755c456b0caed4be9a33b7e68be34481560e2cb8c090113f0f397ff2671fc6d8982fb48b23d408fc7053f33170445d2d820649fe0bd1909015b4a40f79dc582cc9fd5eecce2698075edefbc639f17cd1d84e9f9f777d49c67090130e6da68f55f565521b7d54a32fce16aa15b969c0bdce10a976f21e06b6438320901ef3c1d5583fca6352cbd064b43fc2f02c743d99558f40664c5f836173ef85a030901874f5227fb0b54bb342bf38b510e6a929bbb0075f78789f79b3a4d543ed0caf4090130020a94cbf23fa0c9aea0fff165b30f1891000ca8925ad000f8d5b98587567809016596dded7bf762c2f3f4b8c411a582dfea28194d861461b3c51e70102df140f70901fbd076850271866a30cc55637f81d82f2945c3457fe7bfc7b542fcb39f02ec3d0901a6e16968cad002b9f8119fd94fc856afacca826a9c9c7056f2f26271e05e66c209011847667817ef89daaf39e62dfb018f7c65b3e0664a901bcdcab493f3db0352300901e72084953498bee116cc68197c28405d9a474892b39d4fc17cd4525b5d2ff78c090141e1155c7f2533f8e592b40b556e505e80b14c8689d92b1e3e13141652d1fa0d0901a78a06876a4492d2995856d83ff32f0fec5c89ac4a61861c07dd841a516276ca0901fb207e4f306671926ba5aca720bc5cc85eae91b4b639a05e02212c6c92678835090198841716e12a39ca9a423a7b1ec5a7e2439751ce2a74ea2e443f2852238bf39409013bfa5a369e42d6ffc5bc35b0f806c50ff7aaf9f0ae5bfc6c6703063655a2824209017adbd63543acb3e22af6b1ce9d5f8ac55c6aaf6f0d3b7e7a36c4d602945feb7a0901ba1e34d7c4d2addb0d38f4d69ca1d010c8e464a6f31c093f9659b1d52e17c58609013e9f0403027266913f35476bfee6f6715b2a152c4df95b8cb1c134e4d16cea260901e60b6a61f77c392b5844a4c1d0647ed0ac1925e151898b432720278163bcf2fc0901bf3187c58f61662f1a7f16f87d9737c9e119dbfa8388ee7b1debf0e8edd200e509014435e64c3bdf07350b21bcab27001df0de787ef8e3ec137369791974eaea6c4009018ed79e0930287180ed640a0cfba41d13a65f8354c4b8376438e71e50032f43ff0901b3df0971b145e17301361d77db870a49c1d1dc49d85db842eddd336f38b6b082090170489b9e32cddafd133deb5958bf81d120f165496417eb603b7aa99f28a4ad2f090125635a103e48ef25236d3099e6004c7581f30849d76767151317b258bb23e53e0901482661940e49fb6d28443056ed4d27fec6148ae474a66a4a5d63bf02750045440901dc5e8d887789acbf6aa8ebc93072f89df3332f5a8b66708784daacdcd53f081e09017e8bee229c7f7a488937cf3ea628854ad34f8cab83c0388d08eada332f1dece909015531b1aa60d9123fa62a63161e33eb7805ccabfb2a6672bde006793bea8d0e2f090136a8072a3afe04ee182056aaa3682c17ef9c647c4b8f10a6465959fccedb419f0901ee2ff2206c24c24591168199349ea6fb12843b7f854f66731d5522fafc7c332509011b4b4626334c8825f9d1e49f3dae4a1fb24a8c8f1583ba18a8dc7cdac7038e730901f66a3f3359d54f42b8c8b448ab39b95eb01bd75db61bbd74d02f05b75387001c0901a06691a2fe7c6928b95ffd6fd315ef065fa4f1d264243eea2c3b797f243ff1b0090158e59dd512a8a42bb8ecade11c5e07b984d58f2bb8630d3dbad77b367498d3450901799ff1a9a5cdc1003ab7cc32f33314b78e63add50be8d26549ac9f7cc06f51270901ca4b23504c1fbe07343ad59ef2fe5b1e80c9a1d9a55bf2bc06f9f530313b973809014ea971bad00590c6823ff03c062eef0bfa8c07a1bc14963ce9d7e5c1c46fd43409013fa9cb49434c134712b0e5144f6791737bbd2ae7d9b956adb36e53de7b713848090193a0bb54f2a14f97324e4fadc44bee60023ee57dc55244ad306f4366c6a5264909015b4c3caf6eb877add00694765a82825a048f7f528f6a1c5f9dd931b4ee3d20b30901748b80f996dbf617f1358122a0b592f6e2ae9f998fbaf9d033a3c31b894196340901d30d07c0a999c5b320915211f73825d743d062f65c6575d2052f4c708935210a0901914219d8cdc839e67c9347552983105ff1947cb2fb553a25498469f1ea97096e0901633b5aa151b4d2c26dec7725da0f57d7fd71f7d7f809ee33de417b1e64de28670901490a60578d0f5c00c4e8eb427a943a79f2fc266fb0180f2fc9e361a3bcab9709090116cd808a2851cb7ef059dee41319f48dadde58f86db0ac8203cfb4fef79503130901c22473203d54c7592f35b41cbb5cab53f8b1453d29770504f5dfec79b23f15280901c33638641bdd308d9fe9f951bbb3a55043e3ed72dd907f6c2e76c0c012578be5090161fb4442e508a9d63ddcf7428ebd9fca7ae8deee30d41bcb998319fe3d154aa6090161e17aed9d36d296241abd09bd827f6fe65ee1d6199803e95977481f5dc42a4a0901137e200a4e9101a3ff2ad23fda8f2d25b05e0ca3b958c0da84ad4d1768d51a7609013449ccab703f05409d387a12473c12a1b013d0c56083ebb34e3bf79651bdc2e00901b22978559b4a7fca3bd6e07c3eed4e3d5a8638833763cb862eca5410e670ee3109011c33b56ad65aaff152b1b694fadf83968a3883c78e332e62061c44eb012a24a00901b2738c1e278ed64a4366ac57100a56acb2e6f238a8c9eb407dd348137784ad620901444198de9c1c1d2a30602f91b7c1581a2708921b74bee974691a343ffbadcdd20901ff196170f4a5963a83ceb967601a65c93d3ba15d15ed8b06039efb82712b6ed1090125d6389f7c838f7e47d45788f9f4b8e63b2d750e64758d2d901024c9b7c08faa0901e67d8611caf85688d8420be4996a4a20961cc8fe5494e6d937823fe9b790b5300901353a3977a6405a00fd66c79ceced8b1a0d1c9d77fa5a305afc01c2221bd503f209019e0ebec14e455a2a14ba015c73e1137f1e487b5f40498586b896189ffe691db30901c5b7607153e33ba4146ca76e7ffcb9785e88607f0f17bce9b75a7b4eb46c6d990901feba40ede4fa54f471e39b4310616e8494f006613f83baeb823b5135d68035e4090130456cbe12e3d3824f6742311656f77dd4c8a17a29b6b104a6bb9d36c273430f09011991079ef560fabdc7d8e69c2f859d8077ea5093f66464c0fc8cd901e5f8050c090163d7540907c2330eb962fa526db7bab5cc8c7cdf86434f8cc37a28140703ccba0901282e47f9cbc9c43f4c106b1b5b8742eb7abfc30abfadc7bcc10d4c1aa9b0a73109016814156850a805c114cb418aa6aea9e82451926c03c0c5326b254cd5792e0b950901fa683b05d6b9558088677688a32194f3afd281254441bc76af6f65920aca007409010c5873620fdef9efa3e15900f8dc25d5cab2a4d002b230444f6453c4bb0a7dcb0901bb13ab22306f4c7af001b3c9841be353cae46d0922f1df99107db6b42d22330409017bf13790aec19e24874aa2f5e5b33592dc6340289a8436614b67b5a7f9cb54bc0901d163818fd4726a09b92fcd4e6ca8c35a566acb968bf9a031a2729e9fa324aaa309011a5feb2a2c701e7ca0e475ccc188295cf3f6807891aba3c69ed763646b1098d70901f4318b98f9727d9d46f0672d76e52bfb033e7ca4e2c18a0ef3dfa02f6706e1a909019d0b2edc71d2f3b886af5e630bcd8bc719fac07014d71dc92691c7bf78b489970901fd9284ae50bad19a5e975e85b1391ffe27d34d0673e907b3c8734e3d6198b9fa090173cfb0ca468cd6e6118d6e2a33932df420cfc28d386fa67ee0ad3af4531778570901ff5bc4980478cf8eeb4cfd9d4c045f7c0d7ada2fe0234bf305e206dc298796670901543a44e6b316bf295b7006297c9d6085f7ffe3f9f43eb62a07710ab5fbcc2018090175038488e3134909e20c4ce3cabab467d9586e44c78797f3785290dcf535a9d60901e3f37cace93f1bf1fcad2d9705635f93fd9c8656b59a4fd06149df558fc797b209014ef14ac62f4d6796d8395209a752546b89dd00247ae9a995654393dc81ce41a60901df6c1959e472b9fef495cd9b8f5dda6f88cdb957d34de818264340269da27a59090193e480b3402aa485d1841e990ae848f1e0a0b063c0259605e20191dcfcf66b7d090124135f1a1702e74060462424747d6b9303b7af59379d7a1a872846558845fa920901bb0a92f18e0ab08892c080401a5ae18bf6e10e10b8768f9cdfe5e92bc4b3a5fb0901e15810495b601a6a58bd326fad81b64792cd7102ff1abf6f9ce692e00cda467f0901bd5c300c99083d01ad40394b22f561850916f4dfde1cdb88ed4250766282c60c09015de7bfb9832a99d84d37d191410266638d0f2ec9090269be7019c109e57686d70901300651c30f50a9c3ac724abc014d601a7fcacd04726f659e9565b45b08b63fa40901d63cc20b52d73292b6f0bd76dfa4c79424b697056be06e36c1cee90546c35e890901963cfe070915562d38d67ffdc4888255355b5e2ff80119fd213e3dc0187dc8aa09015fe4876e52fa64b3717c111cac6bb0b980131959dfc3fa9de7a6efcf0c2a7c0b09014806e8c42ee83325c537aa20cb5a2219f1e4e6daa50cc723d968bb4c6c965638090176c3db83e96f407710e072afd574238d44866fe145db6cbe3c6e2d4b01861af10901f226876649deb7b46dd07e9d936275955da53b4fffccf3f78c0defd9c35d06e3090189e47d9e5f7cb7b1d06b3eca583238262dab516f1bcdd72f8e26a664ed11bc5f0901300e712d0fae44f50e779f9ef0ab183a94ad8b5f77b2965960f4e5a482dc791109012e091dc7349c101c46084dfe00952276bb3c31ce4b45eff372d2a567e551b15b0901b7db2abf9c1190cf220ff993a00a7457c8b40dac7c847ed06b5e0517393ef42909017649d3f345fec4d3764b919763f326e1c340039ac104f09ab6bf1f94ead97e5309015087d51e3f0345cbcd089b1aa9b8b8beb9241143d9f7be90db40f5eb3be7e36b0901e595072f92494a8decebdd6f4aadecc5f62fbd6fa79f89c6e69d414daca5346e09014a1d4cc393743c5de29942019c82967932152bab90b0db320ccc212d53de341309010d348c890ca14c7d730e78497590824563dc4b686b6cb11aad05973e872d4a7809015bdb72f497840ee6cd31260e3b747f76175afc28d4686b80a78fb1c5a468f1960901c34f063267364196f3bc40fb1a6221073da4ca4e15c1277428fa742ece68195709017070370ecd10b43b4ff4ba25085b6765693da226aba731d45551fc4054fd41950901e0aaed8c7b96a6cab508aea508bd792a2d0e4dc9605cafb8795a205631d084f909014aa91903fd731d47963f23a844140f7d527031f88e652fbfbd1243291ad542980901b9b3916d4a1b3d8e13011cdcfe0b388b0dcef415d0ce25921cf1b05008f6a779090146aec295b2454fd8df49a1f959e68210b6405f0ee8ef0b8ca068d57b811a4aef09010ccb83150c27a6611b8eb1b1b01a549980c0045b57887c7e76b0d0b5ee6ecbd80901ef3629e322614a22880dd136cb6bd3d975053f09de14cfe13de9e3ae61413cec0901587534b72d8a80c77c9bef923fba2a140f747918a86bde3b569341ea2353a40a09016a3e6edf146c2e8e84f6291c8e9e5d41e58c4e5f160b275657e545e00d1f5895090139d8ab66aa492de58a7e49746d67a9f5b8a6431cc4f021f429705dfcf178f7e60901ae520dd7014f55b191f1e9326e9ca66ac68894f0524efbf63b32a0faf9d0357d09010e87d1cb541e62185953d04316ae32a3ad33f25fee93121d27ab0b4a0f0c91a00901af842cd5b576cdda55b78bd3ba1472f10c5728d71dc6d829fce0da9911fb54e0090137ba4b9c24601c48d290c5d9cb1f90e265698cae7eb3bf3f52ac21b3111cda51090190bff564f5b1db8a0563ca1ace95593f58b3548c83af126fbec83548098615a80901b984c7aeba30b5fe0165dacd720e0715c82026de5b9abb684152e9b09ec4cbd909013dec9bb6d225dde16360972b9f25415c8a68c8ef5008ae138fd5033d486395ae0901d5138ff2324be09c140f3cd8919b416b9663746f236336c35e7a2b480bdc7a9b0901e70d759d6bcf0c9d1b0517f5872a3ad31272df6f859ecb87e78a0f182543032d0901dae838faba6d63dc5bedf2638ecdf68554cc3be2bab2fae97e6fb63d9108a904090174e43574f2d16b7b237370f732e0a2655112c7fd1b9b4a88770d6efa41dae5950901885b7b39b2e3a7bc58ee70a7e09a3436d984e02937bc61927c6f272c9f38a01809012c0b66bda2d623f9a83afc09933925eaf5ff7ae04a25c35d9c10070c0c2c8f360901f3f1c44d39a1078285865570c3071c9de2952146fd9eab4b55c5fbd92b3a2fde0901c2b50670302314ce6b5bdc8e316dede02827a24ff50e8ca739ef6f69ca214d7c0901dfd50250c7bf65604eb4a8cb540dc9c0c19b2bec32fe7004b8894bb446728dda09011ae756272527570b5a8394f9ffe7c9d3be63a096ab8ad3a8023827be103ff1f0090163da8ea4d584a5bff96ccf40358cac6498d86dc318b6fc7cafb4e7dee84bcb140901d3da8e06bd00df391bb0c6c967accdcf60a5c9760f069960100b483e753ec5dc0901e5e415f1e7ecc597a153544fb35273e3f769750ba3743833d16ecc207da3387909010846cc87df60e435f000624ea038f4e6340c04a572fedb051ad9d9e035bd22fc09013b5b0893e63b553847c7879ddd6eb8e9600c12a89c06a4f35881fdb0c98fb8c009019be27d8b54607812b7a491a4afab4ed1672fe6e6617ce536646a002702b8260b090180fbe64c887dc8913a038e61d5c15925a412b1c5084c60d7cbd8c1bd94778b590901012bf9638ff104d473da8167e2a5be839f507db64f94c15b1ea869bd739b8d7c090140cd527f6c5886dcd75e5cba9e904d32492f32006c94797e822b07b727153f0f0901359b625252082a67a91b0e7dd8b9b305ba68933c3ae98d085e61791a991a5654090154405942a4c0a06f3910f647a9bea36d4944145194ef179fe584d56af26408130901da92b9a36faeb8097af8aacc72527505c997d61680a8568039d46dd799e05a35090192f3d8e1bfb9d84589c8100ac5d55bd0ba3cd5d4f8c26609c7c9fd494287d5f509014822df3f5c8948246db29804ab09ab1e061a3b08f1060ecf3d765929b5cad0820901ff45fbca3fefb756642f45e619ba509bd9337a3569cbc1e09d49b2ddaae2242c0901976a7ede7784e34a3d0580efb913a8fb9696e36d34c20c3d9b6550e0c570670b0901b9d20bfe352bc90f2bc86e7ecfb692bf61b81f05e88f129bd43bc2d0f9bbe1e10901ac277d77ec8be689b5e61b76a5a1addfecaab1aab99f948f953c56b83d0366a509016042bf3ef3fac6ea9d6d6347dbaaf2b281f8eaee383fde765a26432fcc525b8309017d82408db731510a3e63578253c456cc57d6d6a0731d3b8e8d3073bbbceb15f80901acaddd36dc340867fabd0303653d921c519d29371677eebed0924f5e2cc0244c09010034b81ac0c2b4c86debb18b8871b04226a8b686b11293849767c73788d5f9c20901538dd54ae2ae69bb4e0a8fad8ce1db76f5aa79f54f7337cc2d2634fd1c0d4986090101a45ea22c0b661590d764b1d0024d43cd21f8a838fa39fc1add291aa2794bde0901007cc91a309a78f2049c026feadfc70d2f0583a1f443e1175fe731afbb9c366909010f856a5815e28bb76c869d1b544bffa5a7e70e5ad1dd43263c1aeec5e389e36409016e4da4ecae0190afb14e9fb712e0d878f754018b75e4f493a0ba5e53649d89c00901616c25294dc8a57f35637666879ebb426fc3937f3d182a55c9553944534cc6c109012acff365e4a631f374b832be67dae5e4f0614ffb3991a18cb4e4651a6a4284f90901934c389b438fe8aa94ec485a04e66e80db8c301cbee7d7d701056dcb06af120b0901ea34a4f6342323408f82129e034c164dcfd380232993cc7946fd5ac27de376850901d050cc91b2324676d2020a68c6f944b3a71b37737c601b67136af2a59f9544440901829998b5286b1f8f2fc3d4f87403c7a0f87ebb39543d90e5cccdd71a96dfbb7c0901d640771708b7639968b498b50fc23e8d1963c8b476eef5ee43f88837c44682b9090103bbee16cd77c77bea9a57197edbc9207ceaafa4345f6f74fcb1ad2cb5d87146090147b83ccb57c6ba5e39db219ce9237719a8890eadea0fb808589be2c2148d4622090126cd4badc4f1d34bafda44f5047b9c2fc02933a5c2888e787529ac09c72a632a090183bf8662bf99fee7efe24d459db917a1f3670f9f48509a42b62cdde8017b783a0901ab7846356434f071215dce51313ab0b2385cdf47ddb0efcbee6557c44b93e15c0901b6fbdf053c35641dfcca3fe9228887bd9b339f49e6dd84ffece0f4d053e171f209013639722aa99a1fe989af81458ec4b711d0c06fca3f66351a3778347362800e6f0901ed677fffb9e2910c8b1169e0e8c175d67a29bf7eed6438236a0d692635d2293b0901773b20ff043c72689a8b91e16c4fc3a29be4a0d2208cd5ff626dcf791f01b22209013e13d307d7a21cc015365f93a4b191215bd2ce409a4a6f408fcff595b6cd85a309011ec35dec5720d1ec1fc97840525c8a54db69aa6a30ff056a010fa9e0927eaf9a0901f69b72f04b62b2000fb90efb1d13b53e095d06488aeb884bcbbd7d962e04e48709019a34c9c699864ba08f581ccf8b0511234a85200f552eb67f4dd51ca82c66ec5d090191e39777efcfadfb1612ad827c41ec4fce70eddc03679ce3b5dac735538df09a090127b6a47b1fae322d829b2b3b2733d2b1d1a0c5a774cde1360d54c154aa1a08c809011a6ab0c2156c8b73b01c497c79a3ce4c2df2a2c2ddc9451ef63789d9680e038c09010c9c0770189426ca9c88c2d9c0736694d30583a80eb2c21a98a2f1da083b73d30901016fb3bbce7e7baf95861b6bbff6256532a76e185206d290e92d78a5412205bd0901b2843ef771d8d9744f98822280b8160510767be360d47d2ae975003d14e0b23c09015497d41a6fd76a095d1911491b8518b67ada33efca3c858b03281e104539de6d09011375566b90474f7fb4ca016e5dbf4f9c7f648547f22de447326d975678ab376d090172c82d8a8416dbdeb8563cc9bbf162e269015623d8251d3f2a1dc5117d0f8912090110336e8858db9c4959f945f87805d0e87d11e3b3c912cd996f67f61b240960930901544fd63e679f0f4c0290abd7914ffe188c98a8655ffc46da7f36077a89d333f20901d2d87135e5c3bc89269597c7342b510ca207b727b2c554896cd5763889fcfa4209016e8ae7522d048068b51844466fb876d77c92fdafe0f9e1a4ea6f2ebd3ed6470c090127c46f2604a20e71c59ebd91bddf07ed6e031015226caa26cc36ab9d1bdbecc10901e70054e855f89b389d584c1dde8fe7645782a2e9b6389e65908e41e747a762320901fd7232139a1713d2f2e9bf254544a492e83f6f221aa7a86408c3cf09cd4c899d090184fd1a9d20de6d7ce82da87c44336822f9402c013f5e75676c0e204a232543f90901cfa56f250703471917beea81e43377e8d2ac24666110f619bc94cab654b6f1f70901414702a0a5740821d7bcdb7a49bfed05c8d944cfcf146ee9ee0cfed502e464f70901aac03a94e1226c4f1c160d19e1c48423509eaf13116ee4aba214c51d2c26bcf90901c40a15a557c1dc32347f33423b9a4bb031e2ffa11dad466c8f9059beac98d96c0901e27f144e065aca796ea4c3c4c7be0028ad2c930ff941100a2218b6e6bd1d8f3c09011b2cd0ff9f79d82b62b1f344754de1ac8ff3a507f8e10f0b306533b1322702990901f4f13666c676560e0821735b265b4a67139b8083218ba29761264fc3af786ded090172643d54b4ff0bd07f6a9870639f2a0757d5deaed02af6170fd6074099da5eb00901ecb150e45cf520b3039cdf0ed797d776d19f87ce161519f66307ea6f6dab4cb50901f46e1ef6fa523aa88960ed5e9ebae62c94a643407b75f23078cf76a39194283709012b4070189a101b747dd8b75056ebb0a4a74c0ece883434fc10c82bcea1be16b109015ea727c5c49d05e3d4e53072168129707d252c94ab910655aa1b35cd658fea23090195f2e7a83a941de8a02607c25e644f689e11e53e3aedaaf991e38f1aa2c790db09018838af0c1cf5881bbaed981d01e374efd635cb4db8fd82bfcf3bfa1d3846de910901edfc1bf1e9b7c768eb8ad4f2d81ed69673a20f82b766d78bc9f8df9a929c67bc0901e054718bc6ded75b54672431933c294b350400838071aee6934bef8639e7d86e0901daeeab0b0d5508a8bdeb8662ccc4df9a405de6988c6c1970c1da0032cbd52a070901e3d07422737b33b00d13019711a43c3919c33b1f423843d8f6287b07ee1a47630901136a5580bc680ad1136bd61c897321c86618f0a26ee05dadd015b568ca2c3f0f0901dcc1bfdb489d85c7ca3f4221811f98ba69d348d38f28cc95db7a21fa3a26aa3e0901ba49efb414a88742a876a57f5f580f4da77a3a7180cbd17ae4cfd0d9469333cb090116fbfcb50391113400f53b0fb94d7a5c1811b60c8afd7f94a9306487fabf841509015edc9ba4c73e859499120436d1d8128679f0f81bffd66e7df37b37013f2c397f09014e01d36c9887da1f1d2ca8f4019dec1c64c113a6b1a5f926cae84afba4a3fc100901d1df8ffa7aa24befe28cee44afeb27c4d61d6363e65aa49c45635eafdb60643609017c77cc2cbe7c1fff6c7aa2bffd025653359be896b21458c7c2df78af808a862b0901f0f6142f5767610b896d5ce7352263b06deba38177b5ff5e6fdc3f86413a907b09011677dd5a09061677d30b09051678177b09021677d30c09051677d30d09041678281c09081677dd5b09011677d30e09021677d30f090616783c50090316783c5109061677d31109041677dd5c09061677e34409021677ecbe090516783c5209081677d31209061677e34509021677dd5d09011677d31309051677dd5e09071678281d09141677d31409041677d31509071678281e091216783c5309071677d316090616783c5409041677e34709021677d31709051677d318090616783c55090716783c5609071678281f090d16782820090d1677dd5f09041677dd6009051677ecc2090416783c5709081677e349090216783c58090416783c5909071677d31909031677ecc309051677ecc409051678282109141677dd6109041677dd62090216782822091216783c5a09081677dd6309051677d31a09011677e34b09011677d31b09071677e34c09041677e34d09021678282309101677e34e09041677d31c09061677ecc5090516783c5b09071677e34f09011677ecc609061677d31d09071677d31e09081677ecc709021677d97709031677dd6409051678282409141677e35009031678178309031677d31f09041677d32009081677e35109021678282509141677dd6609011677d32109041677dd6709041677d322090316783c5c09071677d323090316783c5d09041677ecc809051678282609141677dd6809011677d32409071677d32509081678282709141677d32609051678282809141677ecc909031677e35209071677dd6909051677d327090416783c5e09081677d32809061677ecca09041678282909141677e35309041678178709091677d32909031677d32a090616783c5f090816781788090316783c6009081677eccc09041678282a09141677dd6a09011677d32b09061677eccd090216783c6109041677d97809091678178a090a1677dd6b09021678282b091416783c6209051677d32c09071678282c090e1677d32d09081677d32e09061678282d090c16783c6309051677d32f09061677d33009051677ecce09021677e35509021677d33109071677eccf09051678282e090e1677ecd009011678282f09140126315e396d07f540fa7800000000333a6d07f540fa78000000002889010000000000000000000000000000000a12c0522789080000000000000000000000000000000a12c058ec0011a152bc34bde1dac7262a47f547fcf739ebd546b144f3263cc00f36642b53a912c058ed007b2a3128e1498019d4f08838bc55b2def5591875eb604c4815dbc53d9dab5acd12c058ee00d341b9f64b96f4d0ed1a3b3b89ffa97ecb31b0e7c41742a36a10c35c58adb7e112c05fb400de357ce8e5a80bef5df560ce72bbbee8710714f8af49c8df179c7934e8cd7a8412c05fb5001e29cecadc30d73a9404232ed63e27811f5269994b137f8ad27cdc8b766ee56712c05fb600634730eabf920d55f6ae07e15b8d5bdbdb6757675b16bbeba35e618d3a38774a12c05fb700053a71adea481b6c3fbdfc676b0affe4ed4cbfdb3c53b2a73b0fec4d1e16913d12c05fb800399200e5d1bef1adccbe7ead60c2115c81b3324575d678a089a0dfec5fb156c812c0522d89080000000000000000000000000000000a16781b273a0275f3a47428801677e15932916011b592001677d56b3a0122c0236b24001678102d32916011b5920016782c1e3a0183aad9e430001677e15a3230735d9de0801677dcf632c1d56cf21800167820d93a02457e4937a2801678317f3a015333810904801677dcf732c1d56cf218001677d56c32915e1416ec801677d56d3a0122c0236b240016782c1f32c1d36f5372801677d56e3a0183aad9e430001677dcf832f246ccf153001677e15b32c1d56cf218001677e15c3a0153357ea7aa001677dcf93a0122c0236b240016782c2032f24ac82e9e001677dcfa32f248ca8ff88016781b283a030753b629ba801677e15e32c1d56cf2180016782c213a015333810904801677dcfb32f248ca8ff8801677d56f3a0153357ea7aa001677dcfc3230755b3c86001677e15f3260eab6790c001677d5703a0183aad9e430001677e1603260eab6790c001677e73132f24ac82e9e001677d57132f248ca8ff88016782c223a0183aad9e43000167810313a01b4203520b6001677dcfd3260eab6790c001678318032c1d36f537280167810323a01e49392be9680167820da3a03c92b20ba7800167820db3a0183aad9e430001677d5723a0153357ea7aa001677ec993260eab6790c001677ec9a32c1d56cf218001677ec9b32f24ac82e9e001677e1623260eab6790c001677d57332c1d56cf218001678318132c1d56cf218001677d5743a0122c0236b24001677d5753a015333810904801677d57632c1d36f5372801677d5773a0183a8dc458a8016782c2332915e1416ec8016781b293a03c92b20ba78001677ec9d32916011b5920016782c2432f24ac82e9e001677d57832f24ac82e9e001677dcfe3a0153357ea7aa001677dcff3230755b3c86001677d57932f248ca8ff88016781b2a3a02a66afd4f54001677e1633260e8b8da66801677d57a32f24ac82e9e001677d57b32916011b592001677dd003a0122bc282dd9001677d57c3a0122c0236b24001677e1653260eab6790c001677d57d32c1d36f5372801677ec9e32f24ac82e9e0016782c253a0153357ea7aa00167820dc3a03c92b20ba7800167831823a0183aad9e430001677ec9f3260eab6790c001677d57e32916011b592001677e1663260eab6790c001677d57f3a0122c0236b24001677d58032916011b592001677eca03230755b3c86001677d58132c1d56cf218001677d58232f24ac82e9e0016782c263a0153357ea7aa00167810363260eab6790c001677eca132c1d36f5372801677d58332f248ca8ff8801677dd0132c1d56cf2180016782c273a0183aad9e43000167820dd3a03c92b20ba78001677eca33a0122c0236b24001678103b32916011b5920016781b2b3a02a66afd4f540016782c2832c1d36f5372801677d5853a0122c0236b24001677d58632916011b592001677d5873a0122c0236b24001677dd023230755b3c86001677d5883260eab6790c0016781b2c3a03c92b20ba78001677eca53260eab6790c001677e16832c1d36f5372801677d58932c1d56cf21800167820de3a03c92b20ba7800000000b939a47e0b186bb7001677d58a3230735d9de0801677e73332f24ac82e9e001677eca632c1d56cf218001677d58b3a0153357ea7aa0016782c293a0183a8dc458a80167820df3a03c92b20ba78001677d58c3a0122c0236b24001677d58d3a0153357ea7aa0016781b2d3a03683c6f04210016782c2a3a0153357ea7aa001677eca732f24ac82e9e0016781b2e3a03c92b20ba78001677d58e3a0122c0236b24001677dd043230755b3c860016781b2f3a03c92b20ba780016782c2b3a0153357ea7aa00167820e03a03c92b20ba78001677d58f3a0122be25cc7e801677d5903a0153357ea7aa001677d59132c1d56cf218001677e16a3260eab6790c0016782c2c3a0183a8dc458a8016782c2d3a0122c0236b2400167820e13a03683873c6d6001677dd073260eab6790c001677d5923a01b4203520b6001677dd0832f24ac82e9e001677eca832f248ca8ff88016781b303a03c92527de87801677d5933a0183aad9e430001677dd093230755b3c860016781b313a0275f5a212ce001677e16c3230755b3c86001deb21111106ca0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006da3e000000000000000000000000000000000000000000000000000000006592aea7000000000000000000000000000000000000000000000000000000001debe6835f33e65eb95f977dd0e956f2bf2bc2c2c3ae20fea461833b96c17f47f8b493b60000000000000000000000000000000000000000000000000000000000000000c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470b08cd39a037ef336a7bf373192496a3220742bffaccca06eb84202d4c198e71365f32a901f459ceb68431f39027d1ebfbc91ecf86a06c78ffafee4add8c59963000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000003e0000000000000000000000000000000000000000000000000000000000000026800000000000000000000000000000000000000000000800b00000000000000000000000000000000000000000000000000000000000000042cda7e6af18763e5637dbe6110bb1ca020a87813da610f530fda6573f89e733d00000365000000000000000000000000000000000000800b00000000000000000000000000000000000000000000000000000000000000030000000000000000000000006592aea70000000000000000000000006592aeae0001036500000000000000000000000000000000000080010000000000000000000000000000000000000000000000000000000000000005c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470000103650000000000000000000000000000000000008001000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000001036500000000000000000000000000000000000080080000000000000000000000000000000000000000000000000000000000000000fef7bd9f889811e59e4076a0174087135f080177302763019adaf531257e3a870001036500000000000000000000000000000000000080080000000000000000000000000000000000000000000000000000000000000001fffff7525bfaac25ac302e98533664687348dac717e10e78e5be9cadd5859a7600010365000000000000000000000000000000000000800800000000000000000000000000000000000000000000000000000000000000027e4f93b62b3f78f5e8abfebcae0a28f010eccbc3ccb7770c714c4ad7dbe927bf0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007f4f00000000000000000000000001007f3e04036614789e711c17eb63a902fa90a5dfae0cb4a793fffc353a2c8769efa78867c1f6002cda7e6af18763e5637dbe6110bb1ca020a87813da610f530fda6573f89e733d6431f3381d99bf0d75166c3ab7a0ed3ad2e8768df9ac793afde36a4af8b185e30901e913a273840ea8135c618e52bde381f32b851d8050222ffbc886d0ea5a7e38cf0901ba6d8edaa3554e40388dd9624c158f33ba42c6ef27d9af062f02214aeae11783090174615022d06700bfeb0a75471006455e81e4c092680ce5d27c5d26aa721bbeb1090151f80d801fe804144303c50bf630fd4bb151f1935ded734e78d9d88c8db076480901d8be85b3cf2a26aabd292cb205b8710f5803cd3d293afeb202d2361b5b6aaeba09015babfef3eb47b9eca42f7f29cf74f57d81ada7239f3f36061dc8448709a7135409015bacf500f775b2e6ede7a4258062cf5ab3597a06738d3ad08db556e72ae73f0d090120ea2dabfdf7eee23f2f618cf752758efd8c4ae616de16dfa3a6bc3741f4f48e090182bc570075d7b1913b748ea82f0c9f5faae86f5ea9fd6fbb5225dd2d37abd53f0901a484b75ef1aa77e0f8fe69528d0f9011b6bd31aec63ddfb6a53bc79d25b1860f090126bc094388cda9d347dab0798c2cf89207dccfb2b559a42b66f4e34ccec92f5009018a8f65030d871f3d4138f143f7ffd5c3dfa40e854b08150b237414fd3d524e0f0901d172a7d256268b9ba3c58181324ebabbbdc577808b6464f2b43a0fd221d7d89b090179149f3a18666e1aeab278ccfe1cd9340d40275a9ab9bdf9f522f4dd0a96fbe00901b5c7b742eec308a3c75ae3159820eb18e83c6095d3104496b458b2195057a6110901344d1f30f8afdee3d1bda85be147fe19db615298ad5a6e87193adc8b6a511c7809010eb2d603a63b7d290c62ebfeb2b5d60e4cc29d892897d70ea7fcdfba78fb6e9409010d9f9c4d2b19aabcd82b17ca29673552353a321c4bbd16505154f58d7b6b1fd309018b8b3d0dff1737c45436966279a244c9f5eb59c826ba90ca9be88e08cf144e620901cfb21ccef3605d33523598082c0cbfb21f73a806b9af47ea5d5f388d8a2cb0f00901b7245e74bcb5da3642351818103632960be5ddadb0bb1f2e59e00c25174e628b0901a328604db3886de47fca361200bf127009966227e0d44514261951078102975b0901d671773c263b18ab09661d335b57abd44b5d59e6762db6e70e260afdc7fe46df0901bc9dc3f5e74f8b5021ac52f54757761c3809d0c1bbd8359c09f45e3024d6c2160901d0f18903fda21dd80db15f2899a2ea68edaf85cf9afbaf5aaf167d09dc0fdad80901473f5ec2ce856c012ce9bd6b341e61d8278fa24c23bf80234b34ca205e628e9d090149603848612c4ae2932729264811939320ffee848b4ffcf10c2bd45980d706b60901f7e91aa53b3f7504d3744df465750964e1ea7a325292228951ad4fe727b77791090197becaefb996acde952c62abcbe394fb63094efe9e52d969522bd452b010877e090173302841a6df85b9e1acd2e3e61f41ddb21cbdec06e19223124b997cc13da3620901a34cd7e76a186cd9ab9d20d7422efa4af0f1be9a19600fce0b457a4563524f6009013407f122e0b72d66215cc050bc1d81866829832159397c9ec67df35a4417e7770901a9b9489535672e15604b1b92666339b3b4ff6c6004d0265fb3cd52ae6caefe310901fe02537798d9b47f5920c6c7ed10f9b8172448359530cfc7be362b728caf8d0d0901839a3222ebc6544dfd3ec08d73c7e9929757c080f95eb558b66ae09e6461c359090167ef685e92d5be123c432f2cd16aef97d3c926f45e50aabfdd39a23bb77e7ebf090116eac5724dc15bfaf5d9f467695992992e0d7eef9399f82157523e46a77084b40901b064881cbd1e57b82c561d46d522f14719d0120cac94f23302bd7a65f93843db09015852ad0a9cfd9c05c9e3547b6b70aeefeaad2147615fbc018f14718ecdd96e410901d72a06c6e6f94a25fe392ede9d2cbaffd759db72d926e40e1f720eaa580bd2920901a684484fa2f8bcba04eb22272264fe5c620f6db6d32965189c7a53e683b2095509010473bf9476084e287cac2c24253eeb64b8a5a7de4f49b27218a435fe0bf155fb0901129c7e280552a398ba85ab0aac3ee2bd75f5af886e741c44703e410d4fb3da79090177aea3aead62344068ae029f84974cdce1dd355d98f59229fb206f14ddf4ad0d0901675f80feb59f7c59c9b7d5eedc36a6f60d43c5caf8d528c1002ce776ea3a93f70901f4b67f34adf2fa5cdec47a9bd14abb8dd1fb23233ab2f0013ce1d0d67ca7b60b09018af1b626e292bd1a096941b9e74ec8b073166c90f721303a983b088db08a5c5109012e54fe9e42d6305f62924c2b4e0b70d2980f2dc28b32b0325d6d032d8eb0cd3609013a749531944c7a82e7882396a41e9833296d5d705f1cab227bd0090eb36490cc0901c03af9a43dc36493ce27ec483bf907ee8e3bd43889ac8bbfb11c170f5f29745b0901f6e7e63ca910a33ba77421c82055fb758551323fe8eda96f38e14eeac1337fe10901f37722750975e173d7cf022fc0bb9442313f0236ca9ff397aef786064dc49ec60901c90c4ce2ef61c15d4dfe9f12157b197325f58bb26f4b3caa0aac2008b447f46409013be974401f35c78b16e4c6352f92e7fae1557918bca090d3efda8cd4c2b282460901a3607b81b416d0e5ee5246f0dd9656b99fccdd34f63cd5543b341dcac979570709011351ea76d53f79d5eda79178b17bb88b0d5606c65105026840835e4195ca984e09012471ef08a3d648baf23091800775fa3fc9baf9c85da40e335a67620317ab0b4709010ce02cb39ed2e2001efbf4ec25545f1994178db013e7dabf20baaf5556fee5340901cedeb36f4db0e8be775603fcd95e9c3b9a277d3ac08c02d65b61c03787c461580901e651bfda86e8322a9fc8068f14d65b0ef9cb12b1466f514dee10a6e9cd9c74f109017c50f8d8cc07c06f0f0bdd4f2b40c4b287105c9b4c4779844d57f3de9dcc421209018c4d5021a0dd919647bf160990c7794bcd9c1d5c7281a7062950c8e7a09fc718090164da52c708c7ebbd262fcb6563b6c55a8b137d4dc2acbfc81c6b4105c96861880901b58a57ee1f05e327f0247f8550f747fef894afe6ba4f5036f15e7d934e05d99909010507045b7e765e13b46c383c424b8b593c6ef50b794abce90bcba62ff0b46e5b09011bc7a66dbb81d98d856fd384f28695da28893d26e843d9e9fd146fb80795e3d70901da2d2eb89008ad2033823d89967b1497dd021c08731f75c865c4a447dfef7f990901ddc7f70147730301374f4a6e89eb3022cf5cf49bdf8166056ed08cdff73a56910901de14ca818eb97dc4ae35a3efa98cc504838347363b8cfc6722f853eb4586839509017c653082353cf06dc3aa3019dea63dadf7614443cac2a3bda5a2d9b6e768c8120901fa94efae73594f6f77d36f4aee2c2a53a8413f14f304614b56b106192f23cc1e09010505d37f13f4d6c9531dbe83b18fbf16d5039733959e41143ddbd11ad18d710709011cf0ddf85becd15faa8011538961f7c15cbe67373de7d1af6e9fbfe3b3c844d00901724cae3a0b546a795b0080ea48b8144c217c7b3099dd47ea03799a9e624ca35809017cd52fcc5a03476a88c658a40b17dfd179151f0751403bff61b88b70e831bfb30901d34467e95665f8518811b0beb40cca095d96f62e48c520cbad1636da345a20650901058f9498bf2cd09d8a927bf41bb2569c1ca19ff6aadb2aa5a39e2840db5151530901b6df01ab321ed6c5406c34beac2973cb6f07ae4636988ae9b16b3b5525060d160901254133ffccb0d61ac10e89d64d4b51e82de732a849ae6e1488417557e2a7b8c50901b12c4de7d8d47bab5849a612e6a76cdedc65debb61c2f48661da34d02d31521609011ecaa3a2eaa874e052d9b569c857f1ad61b682459f2aeaa416039261fc7d69ee090171be70cf6bcd0acb5c14a8269fe6f2245d9afbd0bc03dfa063a2da14c70617570901d3032d6ad73067452adb3ef82ec11e2d6ad382c5b8f484faf7eb7aa3270c34a60901a7646a318282488e3426ef45c4cf3d8cbfd91364477e31294d5918ba93e1a68e09010db297bbba54c0989ae3c4767123e06323231115a9a4d7a7ed5b35659e1b3d3e0901b6642d11568a873f1d571c972965985ad2339e1b32ac0e721abac5ece990976b090108614e75aab873537ecabdfe7722370a3fad13b2e7371b1ab050033b32e413ea0901b6099e22aca37782f26b180bc152bdfe1fb8b79a9419440a9aad16b09f124f900901f1ffe2d06fb29183e9037d1abee33fc039bf015ddee441bc9fc63acb40d6ca4009016dbbc04caed9a9ed6ae77d2a6bef3de614deed5dfd7a1026d7ccae5af171448b090133690d92fb520e8c19e2216f41079327002c8aa7504fd68dc9f372274ff86498090184b6a2ad5acb16d14faafde8a505e5e32768491273bee3dbb0a27eb7487b69520901b209c302506a9528d61fd59d8cfff1de9afa97a20149ae8f5881ca52d205165c090100d77ecb2aba6987eeacd2ed413689784320e54a04af52e613200d56f1e898ed0901c3cd9b3c40a1ad6abfaad1f56f42f08301305163fb040e4144f1276ff0e922f10901fd2e55f254005d3d527f752c47b47786e93338a29f3dcccf87c750ce60eaf802090105bac51b33d6ecc1c487a95423a7e2705f3eec3624d0320c6ebc9ee8028b348a09014a7330abd296d2d1d468690439858628825de0c3661fc3183cbcd7ec86fc30d7090164cc61567bd392fab49a9eaf792d0a3a5c3ff02c0e224bcf96e1b84591c057c60901a00d5be8ee2c98e3c8fbe715bc9c4ff594017c7bc147d9db4ed8f21eb692cb1f0901a289129e1349a95d7ae2dba75040f1ea75ace181695d5a1a805f6c9b18037b68090112e12e8047bea380b37fa603085733c664d88d1e1147bf03a0cb0e049aad2dc50901553bf6827e1c925f95c111a5634ee413f75f1fef29825752a5a112eab3a869340901f2fa0915df8f43f37f9bea893a6c3e237e9c054acb7b6494c93d5a130062850409012ce2bc48aed86dd9f5c80d5058b06d9fd154f96532ca753e79e377de6925908a090159714e3bf8776fb8f9db8b9dc7954e9169aa8f2bb8d29dfd7f066a83d1132d1709016574244ee793f8b1fb6afc6bade57e882cf3785f7a3baef30325c451b31d0b950901d3cc4945496f1304b76f4f3d30aa645d558596f0cacdc0feba295fb5dca14040090198da06ae4996f3edd9894f382d5ef7e817684845db3453a9540f2bd15fdb6c0909010d0043a0dba1be2f9ab0f6605c11edfd9c6ec848e6ce83b8c28ff50cf03aa98b0901058dbdec51d44b4c27d0c71f54ba4d018ad4e7bc871d165eb8a217651f1bfd420901931163e4526b235940134a29a98190d6d0d384f0583183f2f5d6421cebb9660f0901d7f69ff9065850a93cf815d99fb776545aaeddee2aa6c5aa6feaeccfe9c2d6720901340ec8338e7b7eb22f6c64d0be8fd827406546ba3f3fb78ddb5f2e3a44cfcfbb0901886de50fd48b02804805d1105f3c7c3aa08b36d179d78c2908986f94646158cf0901c14cf8362ecdad0e10033f77ec69679e44046970d66b3fc4add6d1908f0a6b3a0901b3d6e7fb8448115c9994f74674b5a280809d8c75377d7602f447057c8ba520080901c0be14c404f56b067f53aa9acd04449c143da1bf6af4b82e42c2c80b05da61600901312346ab33a4cf89126fa4a724b05b33fbdd21e8d8e6c57bb04acc3f3731df1b09019a85a2017a73956fe9919fd293c3f492c140e6ea75088fb3f98b308d4de5fc6f0901b8779d44e35716ce01e48318701800fb667f161712f1fca1018d4a994903258e0901ae86f48c52406382e312046551c9386e21e5c74da31cf7e1a956ecc6faf10fbc0901804bfc436febd838186a50ea6fb4b9cb2f30bca007f1642e3bbb576fe7c2ae250901ffce1b25b3dd3badcd3da80ce5e472ef0dda4e76bb9a306bfb616daba03fe21a0901da89ddc1dda0723bd1521ec539395747bd8c21bb5caaf983dc11a7427822886409018c97b8c2e18ad541bda6c25e1b048c4063225448b03c47b2c5c3bfd6997b350f09012dff6c1f6c27c1b0af9459f4e0e0150c47c970c7caa726a4a0a5876195ea0c8f0901f5f8b1a4cb3973f49d2d595899898d0407c1dad9d607b08637074228e0ff29a809018b637e3b5e0d4f906f741028296dd7fa0011a1e51fda845e2935efd313f86d3809014bc45c6ff08182f19aa896ff069f35cfe0e833f44358ce00ed2639463dacfd5909012ba8ce21fba4ce794a33ecea7d886c4a2c538bbd48445edb0a745da8da3a66d2090119b0147e866e587b0c0da59b55df60b2cb23c36f4357eb992c7e2ade5a3551a60901519501dcdf84e665734f427786358a64e61236552a0470fecdfc3dc4279a336209014466c160d7afe53c4e74f26c5172a3a07170cfc9eade265e4937fe2288fd50e409017a1db8612035a360703d54e7abb465203ac220e16a0db3f3d8bdc1edbf04c4560901cbc454d29c293ea8fa0a8bb88d71f335d6fd1c1cf82b10b0f6e38b0a00ec13340901c62953aaa4ebe2bfe17fde5b86cc4b91f64d3846f55c3c8ba6860a33c65d785209010bdfcf90a1573400d8eb82287477567b46afe0071e0b3f7df9fc7cab6eacea7c0901c8cd9a8bef9ab52bf7ec23a396a0da4fd29df60040526a5c4463cfea67df60ee0901699e04beaeaef466090b0df9a53c3a203c90dc97bfcca710f83254729f95367c09018e20cfd5437d2098c050940acb8213e195507bb425a8ecd9a448f2d2b40e8b8209019b939dd03cebfdd61e19680501b8d4a998909577612127bf3156df3e32ab8f280901a16163f9d489f5dfd32bd989a3855226fa15a0aa2d3e0b089951dbe7a78c1f4b09010f8df201506d446600b1c41c6c568fb1a40fa2e08b893543c1e53228d931606509013d3044707f6bcf1a9fea52aa112e80b82c62877a5d7121cff4c41d4bdea47288090183c367e6bf2ae2a5def7ed9c4fdea0c11ad3ceba3e030a4b3b3d3da389940eef0901366cccd847fb8cc2088f1a1916c031c5bb4f32eb93cb719cb2b676544686db3f090144c8929f6edc11d50fccd5b6e853f20a7eb5251939c0f5d397bbe670bf60e33b0901233ccc28eb5a3aa0c3642e2dbd5f9d298e7e74363cb0c5f09a7683ea69fc05cc09017bff0275f4fe8988d87fe3e69b3a6d68be17bb1860230cfa327f05b3aa3569d10901eb96cea1eed02885b3d350fb4a1d62455d20e320d697d47e0d49af8ad15663ae0901456e292d75f7b009ee6867a3e40d212d1df3e01c1a334c7fa5d8fea4e2012c58090182bf38a09028f8fcdc97be440c3aaf2796f7510da49c0a9f9a44e840a5c6b638090140a836b18b546636aecf93c5154b7b0d370785fd509fdb27545b85211f342c3309012538159494f0ac4b34189001d63c40ad33f274fe7b7e0e79f716d1235846d00009018b61e93557885ff841484039e161ac4472529b37de4b9585f8e1ffbd9f0fadad0901014a7b87350ccb965101e24b7992e125030ac07c180115da72deeb80b9dd086e0901998631270ee265a136d32abb22585e67f934ced1b94d0c03f59353547b3d2a190901caa22a348127b3abe3a35b2df10a7d06f9ed1170a638cbc758d57cecfc4b16ae0901ac9f1e354a3408590b42769bec8e5393f22b65660e53a22e0eac98474e5c6935090153cf8e5bda52e61001104ce36a5f1b7d17f8933130fee684e84aba3c554040ec0901856f4b5c828a52acebbfafcf90cfbce5e9cc2d6e720fadceb9dd63a8e7c911980901e58d690cac021aaaf43bac85040d8c33726fea98f94759a4fc8feaa3f1a36ecd0901b8d2cf0f370fe0fabef4e5d383b2d1f4f06e8c667e6e5defeb0872d82ee467e4090160d5798aed8b450d13e5f41e23a93dceb0324d40672d476f6f202d05a96b30c30901e4f745978e5913dec69d945ada207e5fb2f23b3e1a4b691228257543ce328faf09014a635d28afe84f50e2c65017be3b3a78d7700157e6b3e3ebdc8a429f5268ff8609015bb7a996f04ea8030a28cf31912bf202dab6cf99aea845331459ee5ed2e65eb309019c81aaa614d0d07c83b2a4a4ba6fc737f63820122c73b17a66672bd97e35be6d0901b1488c3a7d3a196311fe96db6b9a17aa8e1dfe26e4c2c56884c83f844350e059090180d7e797b350ad53f8ac1240bb5f71194a80d2622f67f64476ac64098860f04e09019822357b907c06aa2d11f958a40f88c617c73f3f9a8ee4d81a7fe7828205bc8b0901065ca96118fac517cce348fb63676ea8a47c6f94c3faf4497666b9d49d3137d4090187a5b25c90b46f358402a369331f8ae2ed2f6a69a6ada3c2cd33a514a73014950901b1cf412450fca1226afb21687539c235b733b2890f929c2deedc78cf0c978fea0901f9562ff9c8872e2c67cecd9ba9a7b035168427db8fdafaeb6518a93da5a181c50901275acfb776f7c5693b2ee741fcb2f953ea847cd86b0a8c4267f3a01b966f51ba0901545b9e842b18106dad7ad020ae3afa53ff264db0a0b25e5e100df7710959384d0901261461525d0cfdf1695423b211862c70c50438926ea82638efc4921a0b0a92aa09011d7c345135ad3c8f44c239d17fc4bdd98665e19f76e3fd83f1b15a934aae793609015afd13009a5b5749ca311513411a047807e27e84f229991120e1e99feedea3b10901926c344bbe1501e396cbe3c3e0b7a94041bf6dc6de8502a2867649439227ac5d0901d33ebaa054a0b2a67677323b3331b8d380ae494f59401ecd39f69a58794681190901078fbe86ad9a7a1f4537d863f472f3abc53191dc99dc6bcf123f39246f84892b0901e9275152e09d5dbdabbd05eff929b1191d452c8971f7f1eedf8797b24aeedda409010d52e90e1ea35a87ab8c656a74913897b4093a1c4291a321508ff175f69179a90901308a75688cdf653c2425af86b2f05be0648bd6dfa71e25894553f14646ebba2009015d78cfacd97776fa2a059b8f5adfd4aa8afc63810c000ddc4072857b7bc5747509019cfe28eed630c688f0c0b006646e99e2c35d98ec023fc39f0e116bc6fa546b8d0901b5a7adf835166eb16fb7cee8a6aeeb3668a5f55e5bfaab82cabb8dcf5aacc8b00901d3eb8f5e4fb31be2f87d7b585ff6066891c2b7bc07d812d954d5c018fecae40b090110965108191b708f8e6e830d41f608b4e85a7b20cd8f31757c55c955c0d155c70901c87454f27324a4d27fa3b059cf8aa1865e6a9be54becb1f260dada433ae2dff909017b5307125f0db350863d2f46e8b59f9cf33bd2214e67bafbe42e74bfa9dbc70109015448da91e614d0a7553cc067a7ffc728cab68d17aa7d584eac5f71e7ad12844609019582e1bdd224cc59d3a5fb85f52044bcc487120a4cc31cc8cafad9be514e591e0901c003952aa13ce5aa9340c06405e0cbd9762c69c8fbab44a0c1cb54650621ac34090150e786ffb3611f95dc85625b8c5f4363b9b32d361124752c855ed4de3831affc0901544f4cdee1e0306ea00434cfb3980994bf69481491df7f43d4ded49189d19f3609016fb8fb8aae9d6359e6ec72cd154fa1f784ce25699da35b2ac79b9f72cc4bfcf10901838d917dcc18bb6428b5c78f515a5530347c6b1c8fe928616b1c04db28296d1c09013889d7cbd2d855145c0a397204ecacee027b7b17dab295612b78b265a94a318c09013e033e578d22ca824d56565bddbc8ccabfbeb8ba05c544eaf591ce13755ff488090134c99f833f8f450b1e1f96e3f473898816ca9ac38a63c81618ccbea56b756863090142016485b7f226db9493de42a0d1f21c9de1998d3b496e4aa7cafb5937daee880901bf7925f4863da6534a0cdc07c001c7a3a0008ade1d9e9a73bde6f4477cb21772090140c210acf1688533eb1a94a06f1dfaa7b62634529192a6a269b7b0a2d1498e4509017d29c1fb0f427e0f08ffdf8e583164efefcd000ab0a2544f18a06744f17cc04a0901bcbbc10482d8bd21470bb672ce4db0a1b44bce18d314fe4edfda32da93f49768090113b3b92d96de46ee75dbd40631e6a257017399a87c893d82d249bc1b308b634809011d2a6891f54491d02012556ce7c9ae22fa1a115d04693d3ec6273ce7cb855bf109013b2e7968a79bc6330a6439b7660021b6720e327bf52447a05f10c362b205ddff09014a819dbb63005f3e163369b4a375f234d8bccef7a183fc70179f0dcb5643b0790901531837ba91d91a462670de0fa3ef10dc71226f19dbc04eafe00528a52e841ed209012171fb40ccd390b8079caf4d665665b096575677f088c30440fe3337f14dbe0809013b90309e7aa1b004a0c59320b7a2bc3f23306aea28cf68d4cba07d08c4d057d209015463c97d6128a40fed8ffdb32614dfa01d508877c024538606fac2521abecfc809019f0aee70042c5a5f46bda619149dbbc875c2ee00affbbbd2b59569faaff438410901e340317c80d48ae186f96bcf7566acdc561ec3a1bc0c48864f174b533789521a09016c72b29ca1161bf7926cac78fa30e8d1510d0ca8daf2173309c20a6e47de13f7090151b182fcd8823d53b5d43abdd7936f8b2a344fba37ffbf96bd03dff4c1467305090166ea93d0a9c87504b278d32d16bf2523a223d7942417fc51545755b689b98c2709012bc3173b5d459a73d404eadcb3cfd290e049a8c4671d08712b93e74775ee0a0c0901c5e6f35651ff0b7d4256885cea14403e30ee29d83734edea6223e6607d1d07630901c86d48870e6761f341f3083d45925b1697728452c422d20750b83131a7ae9a2b09010b446b4306d872ac3588109113f0339b7ee8b4f224ec67a5ec842e7ce4bedf64090143dfd4bc05019f4fbae8d2f38191b040f6a49cce503e5aa57a626c44b01741f10901878d24ddd4070b65edca65475c0d9baeffde6f1f06efc666e12efb91001d3be6090125d78c2111ff61d52d0e2ee29107f9623f61ee8b623f89af6c900b3b09dcdb300901b52e6df2a8551eb09242ff34100132bbe5264e8b13ebc6c0651bb9f5f13263d90901c7f8a0c483418b5319a43430667a99bf6ab0ba2acbeca8a7598abef94fcec7ce09012d4396c7f3b88fba8534c809c333b3b731c5aa780be61c9a9776bb81fdf141600901436d7df6d9d21259a9bf974f1d8526997b814df1a444da8ae470acbdc6a735f60901a7d9d49dfc27ebc6ca5fb2e1f0cb74bc066147fafdc92c9d7b43684cc9d7adea09014f33849df2770ae0541bcfe84006aed4d19745c1aaa463f9762c19e7e86b3d2a0901853b3755f300729191758d11e70b530ee7dd0ab2dd9a30e11b93cb028d2eddfe090171bd1b0ce4f1068507383e3383718c7dd6be1c9b7229ea2e8c13ac64e4fdc400090145992241f6e1339f0d651ccd09ff6af16a24c1d3beaea384f696a2259f9d4c560901f26c94d75691b82c21ba81787c82c4cd35f5f5b507b970242adc1d068d8b30e609014f58d07883c34361b9ef75e66843a5496a9be175a514ac2e8c6e84c19d0284980901bdf0720c2e56fd9831454ab783e3475c3f4f63ef3986a40e2ac40317802ecf5b0901ce6364d549b9a41d64be252c3a29f5732023ea83bb46cf78444d9f545348f0040901a903c87d2c64d0779d307c522c14061e1a9134046728d21b431ef9adbc791adb0901f956cb6eba01e66530ed8451c4df91e671e53daa230df821b4cdca7fb0a0fdd60901dec607dbb5002c5d9d9b8c73b0eabe278c26881d90b93ef54a833b9d430ee64e090193223ef328d6fa169e69b62fc171bb0186d89cdda55c41ad9201c506402b639809015e9acbb1989c1975638aec5e05879a402c45decd7df046575d6801ba7df5554d09011f7fade7559e52443bd085bf2040a67f8ea1f534a6cc7de78d56867a4781a9c209016b22a53a92f1cdd209a4f6ee550f795cb9f727b15a255144cfcc60b48c3fc2060901d70e707ebf4933bba1c3ca572f577bc2b559f3ab1ccfba2521a6e89ab964cfe30901656b7aa292a9616785b4e7eb5c792b373fdf40d273dee5cc990d60e5dfe938860901b6622a6df06a10712bcd93a58929e64d9fd7e0bebc2c872d1a3f1380eb14758d0901d6da18ac0740302083f05b4563dfbcd63d03e033400a0f3c4e6e28441ef7b6230901fe3dfa546c2ae6b23d80731707daababd6b845b7090884079535757906ea2cfa090191a352a31a50e278a08dfd42ba60a5a568ab9786da6faefc08b399352664d7a7090139db2f9d8f4529679f9ed232c6b098f5319c34f8f20fa225d91c94d28ca8d6b30901df3855896fc275b452a19a6c07cb9b5354aa4acde1ebee5b0d9b73c30e491d3c0901f01546e6242c178146674af995c4475163653e612d60553585c73b7f2607f965090119ab52a0d29d9141a630d31fecba3cba64039a51d6792bc1a8b8276023a5651009017f35f7680f3b5f65a8cf0ff52072c2cf3ee38e3bd863f18656b0579f32da987b0901de812e65125965a6efd61b812de2590b0ead48d8b3992f9b24127383bcaec3d709019eca9a05a4c7be206511e9f208e91697f7aa83f059a7ebbaa561f6e7697d1a520901d4b4a1d33bbc027585fa957df7a36f913073f65a8d3ff157b184736b7674c43e0901a36f0f9d609e5214f7ae6c789b897774b9d169a4f54d4075cd0d1cd112afe7e909019226b5b72244a1e1a96f7f224f82198db3c74116de55b85bd6927f1bb465f65e090120a39ec1f97709f63f88fb755145ab5a55647d027664639820b52e9430a35d410901bf5ec000e5c39d3d4a9a18f09825fbec936e320e389717d7807dad3b4ad28bfb0901c716d457450afe95539a1b8851f469f5f03ef40dc23ab345faf67babd3c062f60901628c885ac61911a44a1f873047b70c0f39c1b1f0bc6d77886ee99bb040a20677090116ff63068dbb75836c87c5da4964294d23617ab1c711c560e2f7f4449347f61f09018ec0a1228c7ec966d4f232197f968b295d2f86bf32a5f2aea0c9a301154b272c0901978ca1a71994f5757843f16c660ee375bbb60db5db8712f729824e240875e53509013eb16166e95f9f4bced91b7f32153b26e09f339fd233e67db66ac991c455090f090125f6df2173519d40ab9e9a5702013886eb9ff20756f01e7ae065c84e0695b9a1090184d200fd00b167570a8b5d6418fadaf943643e7fdeff9877314a568fea9828900901b330cd65b93568802f8f76426c56e3147f61e10ba775c73e17d6d92b453ff1a20901df66b5d38f77462c2355f38c36d989786b490cccb4054d2f621b510c9042c73e0901be493bab828deffcac7e2990f7e8aa02c87825bf9bab97f9eb52d4da6422d9c70901dac378c190d2f6ff43ef439ee24b66adae21eda862925d6e71f48d29fb1d7bff0901a28db450859446ad9785350cc75a3548cae3297a678bb6e140b1a1289adb243b09017dfe7d39afea2667955f5ff1945b9d88a1bd5832d5c8c980d28ed10952e8c4ec09014a0fbb399f4ee6f8fbf0c71615cf0d316f8625684feab43d5ba00c255352101709018736ce685445a11bb36fe33313225cacb06073fda615c8f37cbc28d1c323d2a6090184210cfd659ef6ddb1ea97b6d9f04de8cf6203ee6c5eee71d3c4104549e74fd0090103154cad8f51c265be0282d01e6224cf6028cbb84fb8006c043060b94c6d391009015cacfa7a0ca2f16dbe551cec2c07105adb165f34d3b777f7a77832c2bc2b33f909010e0e9d4c499e58b6f6a8d9f2c27eb60412bb8ea94768098ffe492f57ed55ad0209016d23e3a6fd5148016b29b1aca3f52d7e1546d454a9f586c202eeaee1afeeb3ef090157a4ed61f5fac88a0a162b513c75f3a26a306ddd0b3a901ee96274fd680062b60901f2b438fa26aa518afaa69e84c79605940224ba87704b2481ae8a7086070b529609011ecd4a90ab1688deb2e522c00d08c71d07744296449e58fb94099f89c43a00740901c1fef2812ed437e626bf5700fcdf36061aaf85318359e9e671891af0d90e55e70901f0278824eff0dca93593b568b057adccc0e62ffe8f3748056b8351632344cdf20901a50d08f3b43288f48051e1f5263e2f46ebdf8863ffadab28dfea8159c38aab0d090100237e554d59b3476f36f4ba3c1f0db3fdb6b9dd79de6404aeb33edf2e23124c09016a209a0e3689124a35bbf8051b86279de7b0a663bac7f56c8df95b99c487119a0901d93742c354df6aed6de836e73911bbcea5a3714a72747bf00775ed26e3221cf50901d9a5470920c9b05a055fcbda47f70cfb9995dc68a9b0dd23b7e926c0a6990e82090150cb52e03ebe9d158c8e4a53e780482a0caae56a03c86052a2f856ce7764d9dc0901de4819e0129e3100c43b6fdabff9bcb2c3585410d124f250156d5918a79855b50901d3b56ecc6398b5f66d3703f74d3de7fc85089267af36c2bb1b8dbed01a6a78ff0901d4be0e4dccd247331c8886af99509f4e3a6bfd563ebf9976808cf93b52c7a3440901c41ad881c8bf276bc9813a0c29dd71b0ed1ad5cd33be7cf2cdff1570208196570901ba87a850edc719194cc601aca4b80e5358912a82daa684f4ec80183f12b93a7e09019401123ce92701bfacccfcb7c0404dc5e2ec8bead83a78d0a6ebfe9f7cc4715109016412caf19aa649e966f306fa06c3b440d9966072456ebf7f3093e200ae7a095809014216f7e38d17271fcb851baadf9a7e45bc6cdf80499978198f29b0391e4fc79e09019b67103764310497cfbf5c69e4783e524c2dbf9c034a096cf3a655870e1a9264090103cb7a1f49cd9f9829b77de85e96b3db2727986f2af6288839fdb332a9d1bf55090198b0acb2e80ca1985fa703b0cbe3643cabf5bcd800598b189ecbdd4b952aee730901e0ab774d56ce76cf1c369619f144dbb865b2c0cb14f25cf5b0aab06be76ae6800901a1ea0dfedf2a723242e40d0bc6e94f33635d8e241d747afd943623c0e36a104e090177df87695424ff7dbbd5acad33e72563a8a22d2d2a98ef580b5e84cb38f0aeef0901dc14e24959d04099fefb6c4a922b0c92d541284c593652ec370640415d79060a0901dd4b046f41b5464bb954710390a2464237639942c832afaee9be933351082e120901b3a35a59c6f4d78fca84537ba05417489a9f7c14030150ba461a5086817a15ad0901f581d57f192e3cb39ec26140d37062d7c750a4865f183f68aae766b032bf39a909010ec6910505f87255dcf7b1e68a014df2b6b096834dcba4a5293cdff19cb3c5350901c288bac7165fab1fa3e503ce88cc8ae0c769a1df1839ec99b1fe2dff92b820d409010137033995d47cd63a1d0532504ec2928a0456e3667c4fd34dc737810516474509018e1cc01b0747a2881a4680d90b18f25a0357ea0176268623dbfcb8aa9a7687bd09017167dd8a321bd33c8f9d07214a5ff403e06cca67831f6537f445d3aef6f3845c09012bff3daeb52124b143bef9b7407a40a406512d410dd4d35dc5595c653e3becb20901867a7fa8c1b4750ce022f2f25a137c27f7fcf5c7ece498a46c4d150b7e5221ec0901e1422fbc87f431a39574f7c346280770c2b31d7ef932738a0792a5a456d203050901455e7930feaae4e9712dee2cec7babddcdfd810ec45ee2949137e79bbe86e79b0901b993e15fc9d0ca62bd70be725d47bd400c9d6a7996b6da8f971b94a2fe8e8ce5090135b1f732ff5861bfe144707e661fb849e41d05e7380cc47f1b40a6bdc576da600901dd9dd5929bebbb4e0ac8ac6b5b3fe852134d8fd9f57f8ff1e942140e8f915cf3090100e9f507ec9acd3818851147df61979fa07d09389fac520f5d2f4fa35b32315609018dbd9a457bc831fbebeea1d274decaab68139ab8309ee6b664ce93c52ddb0d6a090147569f97b68e081b2080aa164a3dca4d99a89b9d13550f3c1be1f09d0192cfc4090119611090192582ab79f9700d7569ed1e94819f37b2f45690b29acf1dbfc21edc09011d04a80ac798d7feb616454e2453a0996d269f0e56939b4f3466e8d73b1b4e1209011c7e8cb0df75d96935720690ea8b466873ff7f807fa218ea6ed1c1a18c7800ae0901b25fd1dba8ffe12e615099de9eafc26e4ad3ffe9f17d60310c31096a6ab9e5d409016986403d6b7e4e886b67589e416542051c950d31e5ce1a021c55b45cc0aee2d109016158b4cd64d72ce924a0c2c4d3aec230cf58b12bafb589f150f41b1db8fb5adb0901c2a6bbf630f96a962f499ca6183fbda862bc4cd0e53d2dc5db4d1cf9d0f78ad909011ede70079a69c4a10c53bcf1ad1ac2853eff48ba87ec8e68b35d0dd571a7313009015fe8e42757aeb1e8696bc21ab471e1e3bfa7c46114cfe56114193acfded4bc11090105ec1d535b5f8fb89a1c81462b5ad4cf8079d96c1d32ebd8476679b3584d46c50901bc62c86f1d0b2060c91e2b9acbc82ddc90be6866eeaf2d5eb47961488b980df90901937bdce946f88503291573262fcb3d0f3f6219ce18e6707e1e8fc236c6eccafd090144921aea76fa0b4ea13a10b853d295185793b28bc427b95aacf1cf1e05aed1b509013f41f1bc844775961f8e0668d0055fd4524eb079fc881bdb1102141c1b3bbf620901951f0c8edcd633f7359dca647d445348790c733a75547db8df430830c4a089ac0901f7b711787cd07e2764c7c414ffd3c5986eecddaf5277ce86e34461b9fe27b31309012552880a07f0f4fcdedbc9cd7f60c668fe5f367001d000056b5b2df63b2dbf4b0901e15219a2fdeaf837e56d0554c9fcae1f07fe0d3b9edd431ddf92e819bd6a951609019514b335827277a00e9d59d60c8cd80d142a95f4de319a07ebe2f4e429307ab7090188b31c8085715ee12e366449ef39c26dea018e00cd146d63ca3115afacd0d1f80901ec00282c840e8a25dcc19b6568c9cacc089e59138cad4fd7000c4ee037e4dcba090166cdf218b493f7470bbb610094d95bf0ea7fe0989ee47bc5d03a3db6d1a656350901abee202847d34d744e8a33138551c0052b78459ecc9861fe5807194e603cdadf0901d910fbcc2c4ce2c08d8aee1462f05b66f1e3e7f9283363bcdd87c2939a8ddd8109014f4cc0e97bff59eca73e07146432e2ab77726ebedb68b31ef2377c1bb57026ec09014b36cd88eb476a03f99b2aa49f9236c28e899a754521d6d3395f38dec92810190901fcd09cbe75820e0542945e885b1e97275b8d0017a13f606fa018e2113d5eaf6409013c734ac11987f41b4387a28d6e63364bd0ed74e3cff2bddfb66fe1f4d9f3646e09013b0dd22e4b17f1a48f3ba82fd6891c283c3b01a22b56f99a6439afe896815c1a09010165671c66e9cefd63c03e169c30fd427655f8b327af95b4818031e628bc128109019d95f88629dd2c6fc64d769f1e0d9d221a934e222531e6a51ee78851189cc4960901e4b3238b59bc01814996b8bd0a4cb1468faaa46f757d1963c326533007647460090190ad21e3afc5e62701dab8db610c2577a875f6f1db9ff260d3f9aad5d6b27ac6090145a26c36c990dd628597b666150e453c4f65dba609b431f9e14e11e18be113980901becdc9bd831c5013344159b5df71ca7777ece3c78042d2bd4226ae705a265b210901985f96932c7696c59c88ea0b55b74a7920677a83220f7cc5c0985bd81e8a27f609013a3b66f0c983a1cba007f2f34a3950a4d88772ed55d3c418e4e7878982acf84d09017b27fe670891f2aecc2b1035b99e8d8163d194f905adadef13d35d711a33e5ba090188f083b7dbdb7288128a60b64bad29e6f53f5b411304625d320a974ba5cb2a4c09019c9b63cd703d30ee2122c833e22235ae124843ef1dfdb7161cc37a686e52e8b60901dec731bb22f4c292c6d8fd11a42046c6f192443a6f581045398bcd350b3c78d30901d19dfa90517251d7f6afac4ea3a20c210f35f082ff86b6cfbf7f913a93127c850901d4a5ec8ea66c1369272a0d19bb1d527923b75ebb06955d6b417970357f6cc7de09013ee4e449ad78e6d48ad265e1a535f598121798a73df80b05a78e015c7d97eb8b09017fca416000cedfddff4507c29939774d43dc2ffc423029ccd6e7275715cb54fe09017f89e774e38c8e0e3928395ca48e0cd69679b7719fe21c0f5a959edaea1ae23409010d86a34606019b6455b13732665ce5377da5f85fd25a697b1c2c74eeb2ede4260901ada23f4b2491cd61843c11596963bf0d049b1a90ceec2407c082238a4b856f7e0901da8e8698f92157c3a6396181766d30fc2e8896a9edaf63b1775f50364a6da1b4090101ec91930eb827dbb8c06b1fa9a1b677ec50016caeaab5b8349785c6115287bc0901bfe65dc1d32300bc3dae434bb172f373147673b05e9def7ef36096e27d2e826f0901b964d321b12aaf882c63209832a0eaf9655715832f6c02b370afa7d566d0935809019315f04b587ea5ec9c53221e81370f230ace37e1ada796fd305a0c82af7805d50901b694de2e73fa5fbfefd6cbf1f0145877bbd7de51d80dddaef10bde68d3c5662b09010e4d553b8474ac2a0deff61c1e9e0d3950cdb13f389fd3b16e6a65c2568ae25409018f579a85ffd39a38e2da2dca0082ea0ad3bdc6d18a56b1e4d88db43f2fcbcf6209018e73d11b5d72671b3232bff32209e9fad9815f2a63db1aed3bb8148db9abf570090199b3dd6da52ba585e0572abadcb79013eabd1c98e82f035f52e7f1cdc5d4cb2109016d4c1ad77b83bd480b7dfbc9641830cada2bba283f21ce3c14e8fb0fd1d7500a0901918f547f37df42701c4f17bdf746c687c12d0fa615aae09ab2e1c0eda9409e270901e67c0ea462961ca514c03a8bc6d0f887cc7f765aec2577143236d79d4b7a2e4c0901ef7ea9d2c6f118b8be660d466f55c7d5ac876558014cfb3bc2e41f99080eaff50901a264dacaa4c0f883e83565a87a8fa00b18ecc9184df5aa5eb0a2a1b143e17e2a0901a9391ded8dd5fdc967de3c965d8e8bd9fccc13ccd4df292510ac3bf7761e1e70090164cfa617ff14fb7bf4bdc1f9fe4c9050db01bcfba3910a4ea974a4b4827a9ca70901cf7408a1de4b2af543052ab0b982d80707927bfb6ea0675c565164f713ba7b6b09016eb75a24a2f33149b5aaadcb0b5bc4ed2d5c2f6d848349c0811b5b83592d41040901f64d43a182d72d0fd29b37f57344918db1b3cd8226b777432ad6a1847fa767ce09013235340155e7c0eb904b2aef29ff813566e92a2e26c446620603653c8648fc90090187fdd8672ce0cb72a79065400f9e3b2de289467617f24c06a38c83acb8f61d7a0901bd6f5fa0edba4f82e69323c33df61ec17d3323432b8c71d126674617410bad520901730e5090d4f8e4ff246f22859b8d6dadc3b537789d2a8bed31ea1a04c4e6920309017ed985ac2c3149662cdae330b9407a221e916f4923d8e9d50bb06982291a827309012432a6d84ccd26135f4f7ead0110f2fec1379001321d186b0040314f219777690901b448a5ab6cad054afcbab8c439fa55991f61129fe696c9a8b20f28e32ff86d490901daae0c154ecf5314a66bfe21e34bed25a41ffda20062b419b43acbb64e1fb80a09012049d70140e63a0c70d9afd30e97c956cd4831b2ae7a3c57f63b9d9b7900c311090110a1f37d59fec7868f28d5b4d5218bec093dc97a6dda246af462475d8dadc3c709014c06f9f3bd1528b02f28b1716f965e7b24cc400fbe9c68de1d82c8d40005364409018b2a54756e2b2b42e09e65f76790f797e3d3adfdaf85770af7c8fe2521603595090128ad32690fdb94d1bfd4f6ea18ba6ae3ae043b1b85f8e5b8698c1d0ac5c316950901430606acc58f82443ba6f6a59ee874100d9fe34bed92ab0e3e93bbb1c935ce850901c0b2fab5d66d3b0ab3b485456f5fef4c438c6955199706cfa94292b1e0782fdb0901604766d76a5ed08877e520bea18f9b7affd2e045708f9c33bfd374951754e41409016421a5a13c43b2726933842c03f090db404f4c6e8dca5ab886c87e566b1deb2109017b655b57774e25b516ee147c03e5151ec3690f539b63a5baa73462ae916f87af090134ae064e7f0ccd7da848cd95e77fdba78fb46799b9da2315976f9ab2b2a00644090176be375d3d7c8ceec766010da01c3ce861b0348a30e045e5989db012d2cf69f4090109b3d89041757562692eee38e41d73db7289805aa22fbcd5054692801635e7b90901b86305832e0a4417481f8f698a5444cb327e79fa916a90a181cdd5e614e4aaf70901d1c450e816c17e587de17ffcddfdf814a7ef323782862fa03a660d206832d1230901caeeb0cce9ed14c5e4fb2a8ae32e7a177c604b21d9f1d7cedfdd5cf17ae55a9f0901465371dde2d737823037c0f04ab8d07cec12bd94df47771b2999be30879ee6c50901f0d5c1398ab2e9ee01fbefcbef96fcbaf33da8560c3513a8802b20a2bda2961009019e6ee9f4943b98b49ab08efff2830811a843037c679cdf573fb3e6edffefeb2509013e87d8f9f58dd69316ccfdfa9f94992bc49a744e68abb9108ad90206904d0f300901d11e009bc7bcdb3860b33050ba630c1d6e08b28781afbb3e82c93d8e1f1245810901a80c1da01af5e26dc752282c8aa5835602c60589e4551085cc6f5f2bea13819d090148a131407612ed6ffcc18f1e09f0d3da462a8e7d78fa3463dfb1fb30c07a3ad8090169264f5e8c4ac38310d4b3788a96542b6461c79ed74fe7d523a9e5702375812b0901ccd747b042382b42bab906f5426476809348691ca604e30cd059d99ed698781e090183d65c29d7322499ce86bd2cc8c22b4f205d4153c93f0a8553d32ea3a1a1bcad090137a7f8b080c5ddd72953e7514720d4e9cc26fa03c9752999f7b8794fc1c9bc540901a38f6dcc69ca41b8ad17b424c36777d35b56c6d41088ec3e45be39c8c4ada707090108c8ec914a616bbcde8d33b798d6dac6226b7b9c9455b35cec452888a76a81820901fd81b17fd59085ec5c8fd9872fef02122f9d82379895df70ab07cf2448c3ccd709015ef2d0a9a949515cc004a11168a1717121944e9bcc2e078415d77b38a2ca19c109014ec5785de24aef89addc74da390d121cef2d58ec2db9219695d051d7baf2c1af09019f8aa57a0abbf782261f8edfa6cd8b95893b380a4c5ba7d28f1204c69e1855a10901904e32d73f5acbebfb827e77ae68e0040a70a93beb0bd56e9d4ef899d9a45340090189e38b1e4d3645c19a586e7d293c8382ae34c8b125ed1b1d94d5bcd07e9a87b80901e3c96bef4fb9516cd8bb6ea6c7fc375dadde3bb9739a96941e0e18a66bfed68609018f5b85a64056650c84c17f21fcbad350031ee0d51ec00ee8e7e2301abf70d8950901962d50e498b2c7e7cbb72ce06719abe3b392ed48272f3d08507f69736bb6de5409012585d16f3a1565d2069553d057ca4db0e1eb26ffc4f8030deb90807b37c30f520901d4a05ef9d746a2f98643cabbc5938608c65d725294d39f1c7ee33c038239ef5409019e2df2d5874b33d6717595122dca938b3d09b6efc9a6e1072e61d9be43eec94f0901fe10890c681ac4ac60ce8073ef0c61249e44dbfbe1e6fb8b991e787ef6a41a8f090148baf85f4787a8d1bc6a7dab8c2d2318b41fb293cca5d410a78fb40d97f113f20901b5ef3a1fcee97c3459a76bde4e280d14b5048dd084b3ea771b7405acc93479c30901ffeed1817dada94b43ab8b6ac33b12408031533f01dd788d64e2cfb5df83ba630901fe5267974c19c9d0299f502d778c922fed53c76dbd16959e4df2d3867091ab2909017bf2cb5de3a5133ef8da2c3a8ae941d7558e6d74641853ef7dc0a52bf9e39fb30901b83eec21306283b0d98a7ee846ad62e604615a47f692384071404a0d88e32aee09013f037fdfbbf7387ce5375b77e54525f537aec5865c951d5657ad8ac5ff80b4ab090162af8943bbf211e894bd62a80aa97783d8c595bd43a78fb9742b9ff51a98451f090189344b8cdbeff675863f9614d433109e983c4ecfdf2aeab2bfc7fd0c049f673009019bdfc0ee49db019e66019d672828c8db21059ddd393d3b7708e72343f45ef59d09019bdbd31c983d75689e0af0b35d649e8b3017fb0ac2e858c22babd9e713593e9a0901a507177c5531d4dcd90de27de6013e107b06f5dca81651ed411c738fa53d3ffc0901969164a6b37efd395bfa1fbf1dcbfb557a9f37fff11dc45bb198f82c91dda91a0901ae54fdf74bc6feb0bae97899d5cb3991cd44afbebf53bf072385c59ee3af89de09011758db7d258acd9f1c989ca379d49c2e94bc6718acf77d49b299cf13a69d84d60901c53eb3440324cb36a2de3ccac0eca55bed3cd523297bc9785b2f1ba339a08ceb09015e1955c8be656b0afc693ba0e58884565abf4e733016fbe00fb743e3461d6f1e0901032e90a2e7660983df3d9f03b78629dfd1c07d41d613eca5834a11518fbb96f609017668e69f67b45a725ff610546f1813a1f5cf883b03c35f2ca8f70a1a6b594d670901cded6c6512e9e87ed7170e2033d0c73e0ac575bb610d29942b7defea9395a501090181444cbcf6eb7fe8c4259ee327f8dfafa65add7e7eae48c4df8f2064ae85bf2e090195a8ca8cf6a1577ca26ebfc32f9dc645818226418b3bd682229d58a1ba6abd8d09019eb5181eb0b944c219d825e313d6bc5c3e0fbb5ad6170012342d0ea1852bc60f09013baaa13ae29e14ca720e1ca116a29234a61f13b18e111b53c0c950a0569929120901c7cd2193946033af2e20abfa326aa8b7131f27f1652e5d0fc21b238b6ee9191b0901d7040c8c939862c0a7b3fb84b254fb6dc0c60bdbae779b02c64aa7d0a2cb9b3409013c72fdef68ca2f76b7d004c07897194502d3551ea568ee2cae3de934fe5aec2609019e4b9502c7369c9a9a1b394a8b13b7340e3aaaececcf414d9fedd4c8b7cb2d560901eb081cd531a5c5cf570693c6d2ffa682656f45c0047241023a922bdf39c074ab09018034711f8620b2664070f810e9ae89ee10e5fc1acca16bf1e56dffc7084565e60901cf34dfd0fa25b9ef42b435c0e0990286a6c6152c6927bb07333d24fc0147445d090197f5faab62f6a76bf33a9a38111d54e7e64b93e83efe62bbb66d586ac1eaee1309017f01b6f66be30996eb4dfc312ec10f85d7ab0c4cdfb54ec0f6c94a3d8dc7350509018f941bd145fba7187242815d2274393f5dbc6c3978ba3a258147c9b9678e1dc509015032a0288d68cbc47720f9bfb5ab012661f7da66ffec11d84569e89e50adea200901fc2bea4585e4b79447108e2b1336312c9cd7c1470df7534503eb81d78c0c2f520901cc69f920e7f1dbcc75f99d6ecb501998701e679483890060b466bc8bd534919e0901e9d9599083095c9253eb8ca887b336934a89e18b32288c73f76a3226439b5ce0090115b12883ec638ddf75c2ed731c4e1e5650e55f86cf2bb5be59dae1e137ecf18c0901cb6db5f0fb7e59cdebe8985a1a3b902e493c6e7127d9ebc19360ef35c7d6413a0901dca7431741fcacf2cd06318d4295095b43725fbead7401969ce4c319b6542cdb0901afba3b7a93af0ee23435b7841be104b28bc6183aba8d31fa4ddd049e1b1b1a9d0901d3e22c51f244a01a899ed52215c936ee5c3abc34e757323a030d5dd6acfa0ac709013fab5c5f66288c19bfb194a2521a8ff8ab6141a60021d0774dec6cdb323d9fa4090146315e8cf2e20c5b0ffe484594765b30f44a5a57d48f2d0c45b89d24129b6720090186d3d4a755752ca64525164c346a3dea1a319c81827648105331f18deca976d0090136a53ab66deb0e8461996f413d5452d5b6e55b97a1c1aac9f43f4f2a99c3d3d009018b986d8e4ba3a0f910c970f2b315e997f366e04c2689ba41536dd3d3be25f4110901f0b373cfa0e243153b00eab5b07e736e6d01d5dc40d542f7a91454b993e988ea0901f2d6318a7656df7f7ec7e9d127b524f19f6466aed4aa42e924ebec35e84e83060901538d7d68914766ac05fbad8c5efc31a2d0e0c3d3b1a3af6fdfdfb359a76b652b0901ab8e77dbf31327c6cd366aa702b0bea927978d1066e2b4170d5870ea2b101c5f0901f457468fe8976f26b59a5ebe0f1d70c03cb4da0cd6c87478a51f3d85ef4030be09019a1a565e625fffd5506db11cc647cd0294864dce3b922910440d89058115ad920901fa01bf71bfe3f512ccec6746b560d7f8c66f84777776dd7268cfeecd41265e4209011cad70f710deeb9a4352335b1d5e53809d82d67f0456f9ee2adeee0a304b82060901a20ab2fdaae094a68b183faa9a96f98dc6b7247ac51d7f2ce9831e33bc99492b090199d95361d2ca6d8a47fd8d300a2ad07553b91db6b7fc75dcaa43bdcadfcce17d0901c847167b73305d714f39826a635568c9dcd62d60b896e5df59050d13d579cb070901cc2371f06287861527fedd9fcac521c021152a95763d9a851b1e2da7ad4aaaa50901f458b39ecc1f7a38c6af08579e6418c9e09312f6cddd581106c8b9bd886aa1b60901e3a7e00a04f37d3edca268952a22a32ea2283991d0c1a3d2147f4a0121bda9fd09015b415d57d35940718559e39d888b1736ec6ceb31387be34f5012138102e06d74090152786e661e4efbf64b3cdb7f202eb86a439b0fb1e275fec1dc270c765f29333509016ecbb28a457faa6806f4ed345245c6e5d3aeed95f8003742f27e9917faa827e009011779b0a75f8955231df8fc665f908033a84c5e74ef6f9484b1e5ce8f63432b920901077879ffb7890e3c8f783dc7ac234dcf229b5992dd821b1f9a4ab21ff759dce909015a066ab755ebeb46f373773bf5a185387cb3103af86c11e5e82e92fc2ab33ea309017e9d08b5fb6751dada13dbab7732511c92f8ee5d8f9e4582d2cd94aa13acf9370901caf7e00016940d35320ab32c2605fc7d5db8b22eddffc46efe7a3c962384626f090106a902710d79a7c7e0c12f121455fe4695be643a6463ee9564bd3202a6b2d8fc0901ee24f45efc4d5868bc27826adbfb1c949b35c5a1b43c069ed5af14438ec8b3dd0901e632709aadb999681b4a806400269e268e0c9befc17e69a4ab5872a533e2efc90901074fb309a1fd243bc7cd12301c85a80de8c3c73906430bc205bb1abcff9b87a2090184f47a359b0d2a0b8cd1a36f9c4e42a645ff0afbef2877d787a6b3ca51fe541c090183ba1dc8aaea8fce88b687f0bc416bcd64cf4cc6b97353dfdd3f786c7f0521800901a902277b41aef5425c5780d54802bb36f2a94eba1dd0d0ccc4682a1c3b5c716b090100544d0f2cc6ca0746e4b68dac3bcc849e6769deb562d62474c5733c1b103c0c0901fd636beeea81821bc85be3d2aadeb38673fa070a227ac4b2111fad9879a681da09010336010a047ac4d48dc69289271555711ee82b09ab149eaf98328b6e1db8d93c0901ad5b57a18b4f6bef2c3964d00d878a3183f8afd9e280fb64eb9a263741ee3c1d0901e41f497995f6f13154ac711e73659fe64ce13a3d68f16ec6d70f43a8cfaf407c090130266e0fa127cd90d5cbb2085ebbd1e2b702f7292759e0ad3d065ccfbe64368f09019e16586acdf6dd4e7b35b22220dfc0a580099648fc70c7ab863f1961a871368009019d20497e925057dfcca4ca97ddd4832ecaca648762e3a2d9402a029987d2b82d090182e01437801fcbbe921c2004a1abbdd9a709b69522c2899fd205e6fcfedbc52809019538df00956097e9681db86df6444537707ba6b6ff546587dc1078004ec7aa9809012d27014ed6bfc3fad3531bd5d722ca887c19c7a3baec5b4c56010dca624df5470901038435fd73863d5fa181eb9a9399c5fb86098417c860efbd15bb9aae42045a5509014d2e862bf3e9d17480cf7d32ff04ff7712e1ff60d71be4272b30c689c270b9b3090151d36aecd204334d59cbca1d5d3e67169dcf5a38829f3f87ff0d18b9bf79abb60901c6eb942f24bd264222dcddc9a09323c3f6f1aa3562796a730a5fe6d8ec5c7e7209018f4c6c48360b7b6ae02712b257d6ca586e35bc26f584b1d663ddd3e1448cacac09014ba9ee722e069b06d30d3f2adbd83cb27afeac6f93577138cf1dcfab04a982a90901ad1db4e371d90d3a1d4033837f0a946a7041d89c49fa0c965c6b75090c2f05a609017a2557783f820086422f98d89ea4bfa3d2bf7368d0ee35d23d3005747b25124709018b1519dc0012b5ee7c12a703a9d98760b02fc0ddd60fb93dcc24c78f622deed40901b5e1dd1f55200fa483c9d2335c2a9f29afddd422885540a977c308c933eb145209019647f942b1a618de911b60cb1e44657c5cb567429382199c16a7e1c892cce24509011b991219943c513541d1319d9fe0ee07583a97353fca52ae9fd68f859501139109018f16b898cbf6dfaf65685883f7dba816491a3327fcb555aa2a03d6b4fd03ed4509015889eb2e22c3a8acacd508311802c47b65b10944f5f96131bf6c0cc2d302756a0901fd879444a545e39a6b0256658417b134d4d848ba1d402f42e2d4b5796bdd00d209017b9d0c0fff4853a9ac876ff956519dfd00b07d92dea0b641bd7043583fcb3d6809018d439a2c8c41e410b925344910064221c2d9b644acabce9820465a59cec88fd409012cba841deed7b4af7bf2f51f700cc5ac241953a9dfbe003a47873208ccce6f8509013c4bc629b818754b83874355fa9cd68807d0c0c8b18b1898c0234b51de5fc318090169d573662c364ce800660f33e3b7c8279f13af1f63615e6491c0f859ef9f9f1509014ee9d506badc4c8912dfb7203045c6310d662166cf811aab357cef9920277560090122c5ebdbc4f468860c768bc466026875f777c1836eed3d8328861ab8d99000f809018ca8142e80990e16b2b2e1ff33bff984b5fc6c34a5a7d045808a687a930b6a370901b52428b559327ef55b141fedef92f0161196247987353ba15b7c2d9ffa395c220901dbeb9f81f909ebfad5a5b3ff95914088e8dc717dbd2c324ab87e1f1c4d58b2d60901724b2a88ae53dd327f1817c7c509af32a32af90d99beb86b92677cc64089b806090127fd0399152e85d5c373a0e119636f22fc305914d06fd3449ab81beeb2421e980901fafaf775242b003cbb58d5c82c366b9145fab023b055dbea84688e17f2f1eeff0901e34a70b8e18d45a90e8819c3e9f2ee4da8ff8e0938d6d87dbe556e66844a1bbf0901e670fbab4f8bd9f70eb38016cb943e2bcb9f182b96b85c52de01021bbb285121090199a6895dbbaee549c542dcb379e1657e69cc610ae5b435eead868cc6c6542b5f090167409a42e1094d9cd16a138f523f7e93bc493d171cf10639a994b857c28261cc0901a646dd0a176668d7fbbd955cf918abf38c3eeca61d19414686384e8449d7de8409016a3e899372ad380f09640f1ee7203e46c65ddd01067ee0ad7aa3c8a61aaf40040901ac457995c87f9df93bb1e47dfb70ee8a855d57a59028bc4ffadf241e55241344090124c75256bfdd0d7160cfbdd089211d974913934aee41e78dcabdcaf97bfda5ad090113a408efa47c818b175dd9939db8e93d5814ebda1782ae03b10b117f4610e28b090124126fcb6b3012ff0870ef4958b2c0790632fcbfa0ce6dd0e99ef35c4c8246c609014e19e5f816f4be23906d474583fc45ae1210d676bd1c84f035d9cde4b39c4a8a0901b57d0c9dcb2e822630b25eb66e54c2336ae7781c8b44ad271e8b2ca68edf342f09010d0414007f3334b3444b9524b70ac00119bd0d01952af0d30e666e0eaf79c06c0901e4c82d52e5c52e552a4c6cbf6f2333ae36c4ec516f35c5cb284c3c64ad7b38a009014d9618253812d290b39b263ee216b7f1dd7c97f544a362678d8f034ddcaf6c1b090133cfff743683873325cd5f73cfdbcceb0db433aa5d3faf0abf0c50bb525a946c0901e4f0d21fb5b29908681bb8ca1867356ccd3b78b2a79ffb19619449d8f0f72e1d0901fef52cdd5f4db2d32279db79ec1b754acd8d8927a38278be1e877e03a5fdae590901493ba1b84b9946de7b59234189d00688427def39e1ef1268995c809e0e06e4950901a4d37d827467b967ea0a4bee3f1626d85e38c39ad13881d631f41df93d4069710901a64bea1d2f96f2249b384c72d9d14b04c6bea190ce699e146747cc907d03f90709017183312f164114c7fcf1644a6fe244e1a45b60465b6a22e430259ae651760c8b0901a9ccaf5d7e5e2f83edad387301059a744413e6caea719d79d9a12049313ab62209012d5cf4cbbd9f6263e55d3446175770e6e7600ddd15eebbe4dc5aeea7ecd43cca0901f7be6fcd25b2b8678f70501ebbe0641cd0f312a0dda340270981c8fbc1cbca9409019fc80de42cb5270f419ea95b8c427bff879378276cf28a14fea0b110aeffb9340901c73bfd259dba544ed92a569fd483776d2151b0230aedaff98dfb4f48533f4d2b0901cd7f7b672f11774672adbf98212d93a24a763cfe3f9efc41f86e9d4e4aa6f25b090187fe27f469afc94ebf485d67d5665a34b65cea3d9d812680b218e1d80902c42a0901218b44d28800bdb594ef3c1d0d5ca5dc5ba1493ac3c109efe029f5c4fb283fc6090159f0952a58d0208c884465e4d8dafe087b9cadf1db4cc9e561f3a3813d3b28f8090149e7d69a08b745cab2459c7cf4eb3029f2a28d2abed42c57e17e9f4678d9cc0009015aca950f3100ff7eb60efe3877d4f6acf5bc67abf03fcc0e287ea0a644a662340901060ab0dbe48bbe69f6a1f21bc9a5602b4dd5dc89204db8ba069a75e4df6463610901d8f1944a4e2635939c995e2b5da14bd99ff2ea464992a8aa586a85353b847f4e09010ecd16b270d9e8bb3aad3b18c764ba5f9e2304004a3d3bbd3a9ed4313aac51d70901df9105553957831b184fff6a5661dc193ca7a1698172065514d7737758eba10c0901471778025e1efd0487daf3e98b90bef9bbcc24333ff12a70d35f1746c18c905c0901f3c34361a25fa752fc6c1a797aefbcf44d9e71004e2f3db04188813526f31b5c0901a28f7e35cddf1516ffdb2617dbae5501e15d5caea074463c200e0212a99af18f09011e3f68cf1bdc66ff8b71b2e0bf987f69bd0340df1f5db60341d9ac08cec9fc380901d34a91819d952e2d7f3749201203170bb2233f89ce56d84ecd0453602325f7c5090104b500966533138e755e5037065f0e681a7169a6f9270b3d2773ec562e88ada5090185e937a5066dc7f662fa0dcedd7b19b2fd431d06c282ef919c7c5f97ec36997a09012c3c60d563e4f9601920379f46622413f4d62920d6c97a82b03ed444128157990901a1672d1fb5ca2b59330d48c44ab638febf0f2be10e792168caa3768665f6add5090171f8ec78b37d704444e6b4faef2da8cf984af85d608eba821ef32cd043d5e26d0901761d9b9b5ceadb86b19b1d4050f310bd13b7287934e2d192283bfaaf6d89bc8d09018919beb7c7c95e244debbd3341ad3fcfca28172f3593799016940fe85e06ec7209010f56473165321f56eaf3af1825c0252cd99dd8079fb2e0d8cebc3734616b6ab809018f7048487bb0926e466dbf62679195c457974bed49a33fa089bc7ea162aecef10901c80198f0029c0fa927877c6f270df3d1ef7f455dd28044c3955b14c49856bcb8090162bc7888095caf336d3a143fda3d3818137b21fa2c58c47923382924cf7a499209016e6f629e01a13b97d21d20ecd1c05bb94194c079261090b7eff85e84db2b702b09018c5eb5d4441d0fa54ebada662f5a9777f422f29c52b69b1d2c7939ab265ebf6509018a46f382b4c44738e05677984af52b559f13f8bc6439ad4472cd8fdd4d15ac3c09011e24c53717876109230f307b09f28eb1ab385b74c1eaef4a78ead853a61761ef0901fccc2a64e4b49e46955960bfbfa1ad31d38d9c037274c0a0254b1af543c6c3b609019f52007a267a9470440d71a91d0a93d28116ece77e4639fa19cbd3c2ea497c5209013f2ea3632bc2740bdf372f03e0db4fd14321d0aca6e4387f808c56a276fab9e80901bff18ea40cf2b11eb795fb25ad262f52e29227b5a2f8e14c75e92f40d095fc5409015069ed4d69f373ca5b84abe1c99e4c39ab8559122fbd362c4fad31c061ce72b60901a0b4ba62628f46a86376dfffe8abf9b15f59838a2c9483c0e2bbcc956c579d6b0901015583cc53179510b96f1e6a911332de61c2efacb3fdd2a09ce84b4bfb3a5350090155b39361361262c1758758913c30b0aad6acc512e28d8c4d96b99c9e37d70420090144ed18cd7c8b0efe987ed7fc49ccadd0a50f46172bd3a76d23bb9b953655ea6c090151bdde6ceb6cebb0a0d6b55d23f90f81907fd7db5bb934a5a9a1eb5a145886a4090126124c70daaa616b744a62d942f20d44aed2ec38a48741af078eff17f63953b50901509ba91703a9ff086cb01fcdf6c30bd88198bc18693fb5d75cdd63e307ea6b730901a5562d0ebda1e3eba6f102dbb2d363f92ffbfc908fdf586fd73bcf2ca6cb8ae509014e884f93ce5683a2cc8bb63171c94bb071238532446e48f1460dd30f75d95a9f0901dde8ca192cedcbda4f7a3a0e06e92a8c74298a71aba6f3117171ca4b234ecbbc0901689c0b6684c6348fcf6bfb1ffb3196a828c30c1e23feadf1b9a4b18b853f10f3090176d871b754e153db10405a9c56939d5705acac034872baa76d5d1a8fa4cf515709018403d1977eb86e0846020115847a0d87991474ec88cae76516372891225087fb0901c5be291b879ffe50411867c9189242ba216cf3394946013be18aa34ca7953d2c0901494ccc2aca709a0c3f38b35bdef7f38317f2968ef99dc814476eec338f2800a609014e2ee97053722e1f56034b7d53f62eadfbacbf60901fd098899bc47aa8cb23c50901ea43952e9f3e03fabf2ed3b502f3bda685d54541fae645e811255437b6adf13b0901f6f8185e1a144b96123bfac063dc4e5bad5397b165c9ef98bf19d3e39aacfe060901d184b0f9c60017c71919f785de58bd84c4fe3926cac7bd415ce5e6d9f6c122ee09016bb35768c7d246f85370c1cef6f470c2f8979d061dde313723c9491caf4fb2f80901f7b02e2d7cadf4c715923c3dd4cbbd45108a13bbf972f79e47cd230b2a69ac0809016ebdbbb9d6851aeace0dd2f11d535753298d962db9b2b28398a9b9064c8bbf6e0901016b758d5bac65b472ed37cc44df64859e96aa201dfee8744da47f9b0cb8faf609016e80fab42e87b819e4fe59ec749d1ae12f066049f3dbbac5de20248dbd8859420901c6024ae79d5420852fe47c59387aac8675b583fdf20af6af9ac6e04da6a0483309018c4b29a54208507179545a73cb08abdd173d02f125d9da1a9af178029d107d2409013a145d8a35c073017031416271eceaf693dbad99004b85c214bba3bac1dc540a090114efcf497fa1b28cc0678b8ae6822aeda4b9145e4137a6ab8440e65bee3b506e0901434e5ecf3245e0f72cbbb7c5c0c4a0c6204de1c9f12daf191afe0604c98c80dc09010e2c555b28a1479b28ba05b0af990e208e71e5ce9ca760a715d06c2ce9cb2b3509011c22dc44d57c37b251ae12807e951df2d0b4e2a1efff8b90929f5fb9764aecbf0901ca504c570ae188295adf38de51d5a80998018efee77a78a50b57eaac58f3d41e0901788ba483be3230f051948ededae3d6d56c2ba73a81acf50698bb68d2ac961a2309018c7d870aa09ed88f423c1b1e27bc41b80b3cf8d50ef002436b8b967ab03fd2db0901c867ee176d07cce45b85b08527d1be2db587ba39f25e1af49ba0243d59ff99460901211a5f3d7e9b75ae7ee64245cbedf5f012c65618789d4fbf2a245b4ee7fbb8aa0901c12897da11e31bbe71644c258280047536800f8509d90b1465640192b92a6c940901bae6aad6a6c68a16efa1730fd724d0b209eca372c65ddfc0e93c54f9ebc4a16b09010d138d8e61cb79bafa91d088eb05afb6bc73985a48d6270b5ae9daf21d11f4190901d4456d9d82a03f2df9f5802dd6b950a0b92a043d69b0cb571e5fcb6f79d2d98709010db4fa4e4adb4cd344d4760dfcd469e4fda5b26704b8a97469c519075af3ee3c090181dff370baa5f0e25ed4feeaaf1b9ceb0e128e6b4935d1e6c26c924e8e43c90009011cc4d15998a18a9f93d03be47600033647db60d12ffbd5ba70ba1412b709f63809019f0ff2fb3986cd7f2188f3dfc6ac6b228b10ad1196a4b30d7744c1f714b93a79090131c1c21dd455d2a7a5ddd63b3c28092101b4c7f14adf4d712b9e2547be939fd00901c26590c7b6b2e0e277678278a01fa4043723d9b0afc6fd278ef2fbddbb0623ce09017963043bd0bda7a41e53569f3ec47539b04528dab29e07ac130cefcf37938355090154b0538a9aa57ab24763f2c78edc02af69f4704d3bb2d5c988cd1ee210a7da9609010c00d8a6a38de4c34faac19891375a23b0a98a19192ff105896d79c7acbd63900901740727ba8132f9d6c2a81db59246632e583fe6f8895f047dcbf4b49057fbd68109018aea52e5df7fa95606c49db3299a14b48dbd816bb682e048457c4fa0165140d6090158f28df22c0195fe46a0016aa89966179f84e262cd40528ef61243cf783e638009010d3a9d85beaae271664618feaf8d3d964cb5a05f3a644428bb08db27904dcd700901a4dfc7b1dcff7cac5d7335ad410e386f7be07fb104facc7aeb7b3c1e352060880901823b583f1fc153dae91a9bb6a07a993abf87e41075d34f679585e1abb301eb2d090197b42622b59bd331744948b07557015ca9868408518aac7419755ba8660d26b20901bfa15219ad0ed9c50f1e9cd2c2ef82f9b5dc8e9c51a73b1e00d6bd79bc258819090119d603151734a8c8e8bcb7b3485b12ff84a9055b07e0b2775ca382949eb7f4ce0901e35e5ec1624234c5dea6ead92cccaf076c27789d5f422b935cafd2401bed388509015b8af35ce51c66a6bbff3a7f430e94cca953295114927f3e687483a0361493b50901b2c075f4211f8d14651cb133aaebe17677cacdd82e37c685fff1c870abcf1e4d0901435772f95bc99a497a070e372cc540328974fa3c90804fa45131792dc12287bb09013197b1123ba5e64316a5afb2976c997c6cf01327838764328ebd18a904eb68bd0901cae40e1dd7c08c852e723713099533434d6dbc83da123f5fe4554bf56c0baea509012bb1b07af12103c5fcde9a972bb316414b25eb452a83c402d6a0d5ac44b55d9f0901649c6c0314e793479abb37f07794b0d46c6a57187404cc888fea7f3d5fcae65d09018ff2cc0963bc1aaefa0554f0fe8603e6d4cdca4caaf135df277ba2b0e4f8529b0901f25b634a32b3b8587242e515d4ff6ad561178c0282c245543d0b5e2f2d21b00209019714a26a7ef2fbfdb5ed624e0e93366e073522d36f5e719ee1892ead3400ea920901118290930a617007c88f3f2a99fea3be3df29963f5191939fee1e82e227d12820901a26ad726e0089bc9f6573609743f6879208a7661ccd9184f7edf6f94f677f1f40901b134c33647c29332c1d9a3fa3eb2a0c98f1d78ef68edd1860c966895f5df959e0901743a6e31103069bf6c5b19e3ce76e2e2aaa34af2ac62d680a876fe7aed567c690901f7167c34f81c6c765fa575e6180bad62248d01607a31b84cf5180cce07e99c180901b64387dc1c5eda667f560240b7b3b43245e8a5d6ceedd82427d2f3ed064b807b0901ca10193179286024cab0cec1118a3a92e5bde74f5ca764d405e97345dff1b7f70901e3f23cb6420017e7805f05ec0524aab320c639afbccfa03c86b3f366609b70e209016277bf0c222218c1c6f1b2c9a7e492bd203a6516e9d9d3d56d0ca28e355ce52909013ed1fa463f1a332be1a73c3d57b2e8307255b5cc04d221bf91cdda932a284dd109013856e5425701eb9fd8bf6922b03270b580d1bad266b1b287834f96ba7ae97f3f0901508246b3e7f5f1b5b574367d1b540e60ab083e05f6241f81e3e2d8a621c6b0430901c15c0c2749593996477c958d3962e1606c568deb535416338158f10828ec295a09010405b8cc5cc0cdee1c25aeacb320c71503e0ae5e18b56d5cfaac773fc4e87a7c090113b24275fff4d1b53bcee759fc3029d192cc9f048061d1ec9f0db629ac8ed57009019bcb457a06f249416d119e47b35dcf7467125b009199889e9627a55374fa71ef0901b9d99094fd461c7de438d02eded7a9f9312e079dcf6b7164d460dc37aeceabaf09018079dd1ad3c882c5edc7198585302137b640006e3f0fd5e38c1971e6299fda820901a0887fb0800353b624df92e9cbb21d785ceea89066042fbf7dc04678bbb97ebc0901270888835bd7190eef731f512173b7c2c09fd236498abe79869200dd1f9210c40901fc215b31b71beb97dc69278b66564e2f66fe7d585c139d424da677a2891a968d0901ca22e0f1193a4732143733a6e8df49d20099da29882fb3fc51373afadc16cdf00901db49848ade9a869b80bfb967434f5a95dbacd1e35fef8e6e0c9b544a1c9a3b2c090169e41a7142132a34438b0c0ab79b2dd9c0f5354691ada91b8994e2a13d25e75e090109b4c2f2acb6eb630dc355a8881dd9e4d10545010b1598a30122206fe50095ec09010507c0cbfd97f0b20b995e8426f61b1f8f860179efdf61cacc962b53436004e10901d20d8aa797493e393c4364f31211a0833c6e8acae9b7279b52ceeebd76ca531309013a3eff4d88ecc14dfd894520c2ca17523705e3519f80be6294590dda88a1dc0d0901c4ee340c90566a17ec19fa5311cf2bddf2473e818b539c70344acbab8ecb578f0901249c3eb5a627ad3c0a07c9645c79d65413b3872d7b655a2c17be5955efee499909016d71525040a7d1289cfb0a2562cc18bc555c1afae960ac6813ac11fff29e98cf090135f5f9a2dabf4eaf935c0d8f8327333b1588fbcef32451b4994b1c99b2b6d96f0901d404965494e9ea23291bc71e25aad14ea623190bfcc50e3cbdf3563a6327d68609017c6fc0724a866f8c801d4784384f9edab1af710a94c8baef5c8b1ddf308429ff09015206a18ed5b43d6d500c3640100d4825a4aeffaf5e9cb3ec391be92ef5c749860901efdab27be362d1278b29dd1c93ad898d3d70b5c585229af646ac0204b331d39d090148a189d50761f873e4d31380dbc212192d859d107b4160f63fad93166db4ce3509019393bd899fce6a06d7ee4b05e134da326fd0f347842cff35edb123d9b9b03bbc09010762bcaaeb065f1b66fb12c0d52fc0419157d4f2fcf9e89801054880045dc8650901c935dfce14ec87df68faacf063a2bd1a529604d8b5bafd77326044e513cc17260901829561ef55c4f4bc2aa5b900179bb8d67d660fe9670a05020ad25a49db85ebe609019e5ea8f4afe0486bbfbf7102dfb2f959950e6503f3edce4e3da825e0f9cdcbcd090182c334c8eed59032548e298a9193a0321c49c217cd89f7bc5270baa2284539e00901d86c40666c73f32b9df7a702eaede29ba77b5d7997bf3e13a2b2e7299dd57d330901a0bc6484702dfe735c5a55625927e49d0ce48df50ce4753fb73bc69cf8106542090146d7404e4b3fe339cb8ab1a7181974c698e5e4e7828952ce09c81f8c87b749bc09015ab3c68abce07c4ff7dbf890969414e68e8a4012f003c1dcda16d539297f5fa609017b7f9eea9b9054e4ae58720052d450a3b8e6d8060a76a835416342c3a26dd2d8090170f0e767e595c1ce88471dd8e08e30d51d851844ae5d2367f6f058cd9d6ab77e09016fe1d1dac4bf51b941b60bb0f7fd0816f59c4588c79908d7ef2bf13fc1d3b708090141fbb40cf5cb775c0159e34a456bda4b93bed4b6fa0844cf1a348d06914c60790901dbdeca4e3c7c4fd38573c31311971d7257ad5aa9f336ae394cfaf56c8e049989090120fa2c42b2c185ed37fcd7c37ad78f046eeb74404265804c575961e8ab2f5ae1090199c4c9dc72fd0f8cc9039f78d113efe56283ff77b5c9ac8293a11142b91579560901216fc9654a5a53c9f266d0238ca7f3dad8530c51d73c98f3cbe2e8f849c86cb809017316b533dda4016e51b2c30d785b4460d2353871b51bd58276338c11f00b51210901ac7be45988d841bf32b5fd548e6ef8a55d52febdfe88608b7e4ebcd77321e15f0901718d6a66595ee62a692a665e69147eab95110fed90d7d1f40658c29f48a7784d0901809988cc25355a79b623de8ce6bc10513155cc4e7c04d3680c0aea830e1fc19a09011b4122d619fdce2744efc05822efe179092e2c539fa7d1188cde549bd7b77dab0901ca13ea469340eab0e718c6ec7db3192fc9d108c7ed0437e2c3a975f2ea572fd209010f4a407c8f299fb66955945d845ba0bb2444d1654b40b9bba6477efc3483384c0901b739dd31d01d3835b89ae7358315bcef7ecbe38715e898b7dcacc37377e50c1a0901d3d691ebd69ceac25c839f98c4e4c45d275ceb5b726713a474201488557caf5a09012bc975c034712b447a6e4dfd135778c8e3590a55655e757b99ca91f1e29aeda40901e9e38b88cb8d7defdc58e37b0f69e57be3f19b8d310ca1143c62b45700930a77090161f87cad87000eb7b474afd7c6e05731a648ea195d2fe35d0cd88857309b7acc09011adadef8157dc407ff05b21fa72ef285df4596af06d0acb4cb7b039634d6349409011cb196edd82170bd6678869746104e6509d46ec976654cf9ed64d7834d53c9680901d8dcb38340b9b339b0a181a8c31d173b57445830128e467925ec27c6c7081bb00901996bce6e1cd7a9b405e3ddc5f0cb4709c6df8eabf375f8d5e88f6bdf4da48d5e0901177b3bb9ee230dac01b4346df7150eb5c0724ce637569737d72a1fbbbfe41c0d09016ba3d8b49b99541f90d2dd492f00a9effb51d5a3c4f21cc47368ed4c685d3bff09018cced1a0cf9b3e06e6bebbeb1181848999904b0bc55e7fff26921b55dafc7e85090123287f640383039f453eaf4666219e4c4907a4a3e60312612c82dfdbe6e472ba0901789cf645d47c59dea25f9227bc5a7d0eae4bd0420c9a4c4a0f1a9083228eac7b0901f2ebd65fac7d18404b559869970e23f96d98f621f991e38e8463ef1e59fd0ea1090111609ed68bfbb4707671620cfc7ccbb44ef041a40e78c5786d0dc888f26f0dc009011b3868721f40bfb9ee494b34027313a667caecca9a364b85fc672d318eaf2cc50901a70916b7b04d7791401923ff0158113877f26f2b87030f03b4d0a18a42cc26780901bf704ae6e1196cc52a2b88c06d54a7b109d59cd9889b6904ed55aeef6e0a50db090196ad3eefde24270fa9fe286e55d8fe3cb4512ac0354c72d880203b8e479d8dd00901a88ee4123e8965206aeb452a73190a78c0da12391919c84b817163e3b9983ac10901d0b48d5f570bde47bb1f3da50fc839f4356a3409c85323f5d8e3356ba8ec875d090112fc430299df19b6bba557abe34b3288e903ae288dbbf2772550db68a110194a0901e9f0f2736446bdb3f575cefdfec6d0d5c2b2d5b7ad87fa2366116c456be79bab0901072393e12dc107f18c0b84dbb7025f0030e0c047399bd8047a2b326c1c13be3809018e73935cc8d82429b3c82d46820bfd7e80ee32790019768d65ca5468614e286109017e9f599bc12fe20eb533db51aa6a9819b8510665f65ad43b6025597d7840c82f0901b7414af4ed9fa50e7e49677e8f6a1eb47cc70f208d411b17e63a0c3b44532daa09018fced26b66881bf0f04bbd9067024dc5449e0c748bfc0eff09f994696e209e8f0901f76dc68d5c58960e3100e8fd00552c139725a5add2ffc8c036a698d49edcfd5409016774ba787cdb61623032523567eadad49b402465c0255a5cb9e0fc94a20e15200901b50c835093dec382d83dc2fcf9f1ff506d4ae05e757b0457c8009d3aebc8d93f09011bf76cf09c6155948664f08524f8d8fdc8f62feaaef7dca9d43581a5d8d33f5b09011a49f6f9c13e36e6fd14b98b241b2edb5a21e4035622a158396040ed37c01876090189983426faf040b4d99d10bcbd35c38731a30f185245749a31d1d7662ecdd4290901595e9024f94c440701756ba0ec822cd04b4ad6b37ed2e7feb052581c7679e4c009019ecf76cd09fd377dcdf110d2187050bb3c208f41dbe83ff6fb46c217454e608e09012ef0d926f99309e8271d8c88094e3885fd58c8f53e733b8c0d38938afe9ebe2c090119df06fe6eeac89b3ddb1e4e465f6ec6a40711546281d6b29636fdd6a100dddb09010cade5248e2fb68cc56c5afa497b29b01297954b5117d7c2ac4c4708307890920901a64b88a622ba1207d8cffe800cf36a62ebe5a1e4eda482c4f40e3dd44fe7b24909016a83949e076b83ce3845764e410f8d3eb47c37c49b4310331d1e9d583dd60dec09011752dd5efaf0451db3ebe542437fbf26c77d316f4cadc5f70e87816950d0a64b09015fd2edd90c9c0fce0b94da75b0bbebe0265b2048816bc4e4ddf2907451b307c309019137934079fab5ad0a95b777dc73f6edb2708e2216fa02138e269a2265ec03d209019e5e420ed23db91e0c1f9bf867958b22c93f606309f31108deab7e37e8bb92610901c783e8a9f660298169c42249b85c0e6c53e60e5fc47318942640ccd6f892bc3309010687abe2c765ce08dd276619dcc7a5de7bd670811003b039c67b303c83cc620b0901f761a24283c4125f189c02cc84013f6f9aa7bfa736dbc7d0b1b9ecd4f9d987f109015fec7588c43a4ff99d3caee9e1cf6f15b2fe03a4ca8248ea1f43005c82bca4c2090141844b8e72c87c5ad965552bc7c7a747f2a5c36c407e3c852fb3ea9ef13a38ad09010dd5effd0635b986ccd4354050be89682ff2d14778aef778c90906d64088ee150901a1bde0dbc59eb334b8b4a9713eaa738229a1b4c32cba9559149c4a34d1ddf90709015079d3b143c60dc41aec4c9c82a5d1e1d9243f2747159846fa85d24c9a41999a09019c8e9867b21e4d49433903bb5a3a8a966a9bcd1cb17e469387f78bf3f3ee34f50901e8e184bb0e0ac05847bfc040c1c4914dbb9be2d8cbb6825bc2b0ed4447829ccb09019193facf1f5efb7114ab24f3d4254d94e9cd63c796f8c748b95f125f1665a5090901512a196a0087b21c4f2334c3c67c24b37240fd0d46692d15d566ae84806076c60901cd77966aafb17171c49913cecc67acc2dcbf626a66417b0d58385571db2b80f609012b36b1ebafd670019e2d16c5ce39c90864a225138c8f1347623e3ff464821bdd090186a2a82722da9f0339b1c4c42acb2d93eb93425f9a35ee800c569fac05318e290901a1b0481cce1c296cb65ce4ea5061c9ceb11f60867d78fb81d69d1757a6152298090114c6d7263338f43a189ff5bcaaf9471fe0b7ca770fbb5fdb80bacd4d3ebb8e590901bb489a1f285051cfdd4e5984e7dc1d6164de3a7758e016a0b2c5000b64dcee6909011aff7ced7d482420a1fbebcb204e350d5c7eb66e38905e4d1545d98674d961630901a3a9a4dd3001d8c9f207ab36e2507bf7b1b85047f6130f2535d85309b4d0f15309013d758daa81bbd48d24b5ae06128bc8b2295a8cfd4e0c57f18b10ccd54eb6da4609018b6118db27b13a2cccd2b20909409694c93a428d23e6b584fff6097c926062bb0901fae3635a131a2d3143dc4d9767afed98f80bb4b279f904d1f20aeb7bf3c197fe090112a61b9e94408bdb1167b7adbfeb0c84c75bdda32e4a7a028a6f678f459c83330901cc904c81d5b9f6707e999b46d37a6c79309165a47279b1d4e1a203d309714a8509016a18211b78d99acb5356783dcdccb3ffcfb551ad0bb3953fe00de83c592a57b209011421f1f854c8811bab4c19e657a1672cb17e2e29e0d8ba7d69ffa5260386e7110901bb618023fa93f0f271f92397d71a535c3c17146cfa3cc902410170523283210f0901c27107c3630deca1c77110bf1a18900e4705dd30726702252a1fae48180cd06809017b2a6a6f7695ec8f277af8c7f31221ad2c4ea5c9d2d14773c7df1068bcbb08ac0901ac0dd2242dc92310278df6a5988eef5752921c15619b4fdc7ad655c16bd9f30109013f7d2575cfb5be7eb0ea338e27e405de264d5e950a7a6ae5b24f7d4a610e89040901b510d3d672a456b911b139694f1405b385d3ff5c7f7a63a1fafdb6204f55e7d3090171d3aa3e42d1a122d986187d7e42da64f34d20812414b2a11ad521252b512d8909018d5799d91cb38bd94eeb0169e2fa0931f7021164f211081a47d26bd1ba61f488090165627c1075ae40b4fec779edfd494fcd7064bc1dc8918c115fa34b730468216c0901207d334e76ac11417ec05dd79f75953f786b4ef7ee4ecde7c929d45287e4e7ab0901b2b300a3c3be9f8527ef281305e32cc9d1de604d1c094322a2560e3f0bcdeee40901a24a3d2a4859bdcc12b21c2fa13ff0f7406e5e16632bfeccb5838e28cc49807b0901f3924d6c3c2f70c48746dbdd5a300a61dcfdc9ac95ff47c313583d422c733c880901811c8f110aa787274b6b2c5ccea34cea1f2c5413d5b7a18b0bf1c55600317263090119270fc70ea13bed1d54d30958642a1ce581f3d4c4a88a3819e00c5b55394add09019efd2f287f855ecbea89675358b03d0bbf8db98b03faab824af6a6c24b8cb7e10901c3075f2bbb094481cdf42030950949eeca055e6221b6bc7a81bf9aab3f73ecd5090149a4d8d9c592e23a178b438615551b919757950ec53e2a4f1b46b784773ab853090193c1ac57c1ca976dff62e2b3468958057d276586cf42b51b60516eb05426e62b090154e035b5ee5cf5983105d2dc61c8d1c963005d1f98f1886032ff76686bb828e90901238c433dcc14c10c034b8b76ffae17d446417dc7f1ca8c39954d9ba58b29d6eb0901f71eef39e13ead2d261a8d657cb45ef8e4b4f18a21739025319eb97182e9bc4d0901cc619d27c4ea537c3d0d7120a9b7c374fd79d6b8110ec145e9c8f2af45abc4240901b3485975949a99f0cbcc57d1be98afe49e37d2eb48ec6dd2e10f376875b6ef6b090122e73a2b57571e85814df7da6a5aff6357bbb31d2c92305028a2341f018fcb100901ba12da1c7c655af5782c5e49c66fb5b6b18c6a99754a8e4333da564b0977749609017197d2f669b291597b0eca416399c3236a4fb5747a4301db32e679566efe00660901b1c6e175d1aadd0c33b1d83a17865920aac0f116e373f2c735f010f90ae8b1260901a4b512ca620bfb2a7b9432ad51f113b2c0791140de9c30016158ae1f5c1bc0ba0901da347e84aa45a5f613040269cb449c185c60ea260e999901457eb527dcf6e75509010f3a000fc8c7f4ebe95198dabcd71eab58a7ac449f9e1f770c51aa69f775b85b0901126febd0d1be5708a91c27ea5288c69d020081fe1cd954a80880d90edeaf85090901d978f761e050fdfe4329c28d48a2c8531c255ff8489c55dad564980041f399000901415b1ba277efe01d472c8c67191553c0bfddd0178d1f5d6c0b0eb1505bb59e330901b477dd016c581f2626b8528d901eea7e5c90b53b879afdcd8f881e0a181f971709019887fd7bedf5a3e3431bfca3391fc969b635d1db242c0bea8c8ff1973cad021309011677dd5a09061677f9cb09011677f9cc09011677d30b09041677d30c09041677d30d09061677ecbd09061677f9cd09031678281c09081677dd5b09071677d30e09031677f9ce0902167806da09021677d30f090716783c50090716783c51090e1677d3110903167806db09021677dd5c09051677ecbe090f16783c52090c1677ecbf0906167806dc09011677d31209011677dd5d0907167806dd09011677d31309031677dd5e09061677d3140907167806de090216783c53090c1677d316090316783c54090e1677d31709041677d318090416783c55090d1677ecc009091677ecc1090b167806e0090116783c56090d1678281f09041677f9cf09031677f9d009021678282009041677dd5f09061677dd6009051677ecc2090e16783c57090c167806e10904167806e209021677e349090316783c58090816783c59090d1677f9d10902167806e309021677d31909041677ecc3090f1677ecc4090f167806e409031677dd6109061677f9d209041677dd62090716782822090216783c5a090c1677dd6309041677d31a09051677d31b0905167806e509011678282309031677e34e09051677d31c09041677f9d309031677ecc5090f16783c5b090d1677ecc6090e1677d31d09031677ecc709071677f9d409031677d97709071677dd6409041677dd6509041677e35009031677d31f09051677d32009011677f9d509041677dd6609061677d3210903167806e609021677f9d609041677dd6709051677d322090716783c5c090d1677d323090716783c5d090b1677ecc8090f1677f9d709021677dd6809051677f9d809041677d32409021677d32509051677d3260903167806e709021677ecc90911167806e809021677dd6909041677d327090516783c5e090c1677d32809071677ecca09061677e35309051677f9d909051677f9da09031677d3290902167806e909021677d32a09051677f9db09021677f9dc090416783c5f090c1677eccb090816783c60090c1677eccc09101677dd6a09061677d32b09041677eccd090316783c61090b167806ea09021677d97809021677dd6b0905167806eb090116783c62090f1677d32c09041677d32d09031677f9dd09021678282d090816783c63090f1677dd6c09051677f9de09041677d32f09031677d33009041677ecce09051677e35509031677d33109061677eccf090f1678282e09061677ecd009051677dd6d0904167806ed09020126315e396d140bec1d4b00000000333a6d140bec1d4b000000002889010000000000000000000000000000000a12c0522789080000000000000000000000000000000a12c06690007fed237f12bff6e50d23392445a64e9d63318abb30f94930bd6e85d5eabdc1c512c0669100c687f4b11e91f16a32ea2521e1882d701d5f937512c2aeb4a09c268373e3f9a712c06692000ea7682f7df7586c022e1b96b4337b4a9b29c75a65edde9db96a0cb093028f7e12c06693000314f7a837734dd4d7483468c1c3820c672677f8393b9034702887033a84974f12c06d6b000a21637a3e0d5759cd8206adcc987c88cb19f4ac7be4fc0baefcd5e74226b7ad12c06d6c002471e6b83b0e4545fdcb1ad1e4cb76d9e8e15fb112be55f8080fbec1eaa85ed512c06d6d00cd9ab6e18168abc602b64491cb023d669135dbe502172d956a01b0113d20b1d012c06d6e0082efecdfac5d35a2355b3a4bc8b461e15b061c2260c6af2b22f52f3390d7d80012c0522d89080000000000000000000000000000000a16781b2732c1d36f5372801677e15932915e1416ec801677d56b32915e1416ec8016782c1e3a02458046d648001677f61032c1d171b4cd001677dcf63a0122c0236b2400167820d93a0183aad9e430001678317f3a02457a4dfa57801677dcf732f24ac82e9e001677f61132c1d56cf218001677d56c3260eab6790c001677d56d3a0153357ea7aa00167803233260e8b8da668016782c1f3a021506f05c77001677d56e3230755b3c86001677dcf832f24ac82e9e001677e15b32f24ac82e9e001677dcf93a0122c0236b240016782c203a02d6de5aed34801677f6123260e8b8da66801677dcfa32c1d56cf2180016781b2832916011b592001677e15e32f24ac82e9e0016782c213a0275f5a212ce001677dcfb32c1d56cf218001677dcfc3a0122be25cc7e801677d57032916011b592001677e7313a02d6e0588bda001677d57132c1d36f53728016782c223a02458046d648001677dcfd3a0153357ea7aa00167831803a021506f05c7700167820db3a0183aad9e430001677ec983a01b41c39e36b001677d5723260eab6790c001677ec993a015333810904801677f6133260e8b8da66801677f61432f24ac82e9e001677ec9a3a02a66afd4f54001677ec9b3a02d6de5aed34801677d57332915e1416ec80167831813a02a66306d4be001677ec9c3a0122bc282dd9001677d57432c1d36f5372801677d57532f24ac82e9e001677d57632f248ca8ff8801677f6153230735d9de080167803253260eab6790c001677d57732f24ac82e9e00167803263230755b3c860016782c233a015333810904801677f61632916011b59200167803273260eab6790c00167803283260e8b8da66801677e7323a0122be25cc7e801677f61732915e1416ec801677ec9d3a0337cb0f04e6001677f61832c1d56cf2180016782c243a02d6d8621144001677d57832c1d36f5372801677dcfe3a0122c0236b24001677dcff3a0153357ea7aa001677d57932c1d36f53728016781b2a3a0122be25cc7e801677e16332916011b592001677d57a32c1d56cf218001677d57b3a0153357ea7aa001677f61932916011b592001677dd0032f24ac82e9e001677d57c32f24ac82e9e001677d57d3a0122be25cc7e801677ec9e3a02d6de5aed348016782c253a0275f5a212ce00167831823a02458046d648001677ec9f32f24ac82e9e001677d57e32c1d36f5372801677d57f3230755b3c86001677d5803a015333810904801677eca032f24ac82e9e001677d58132f248ca8ff8801677d58232916011b5920016782c263a0275f1a6d583001677eca13a0122c0236b24001677d58332916011b592001677dd013a0122c0236b24001677eca23a02150aeb99c20016782c273a02457c4b98fd001677fd7e3230755b3c86001677eca33a02a668ffb0ae80167803293230755b3c86001677f61a32c1d56cf218001677eca43a0183a8dc458a801678032a3260eab6790c0016782c283a0183aad9e430001677fd7f3260eab6790c001677d5853a015331836a5f001677d5863a015333810904801677d58732c1d36f5372801677dd023a0122be25cc7e801677d58832916011b592001677eca532916011b592001677d58932916011b592001678032b32c1d56cf21800000000b939a47dc36e1c71001677d58a32f24ac82e9e001678032c32916011b592001677e7333a02d6dc5d4e8f001677fd803260e8b8da66801677eca63a030755b3c860001678032d3230755b3c86001677dd0332f246ccf153001677d58b3a0122c0236b240016782c293a02457c4b98fd001677d58c32916011b592001677d58d32c1d36f5372801677f61b3230755b3c86001677f61c3260eab6790c001677f61d3260eab6790c001677f61e3260eab6790c0016781b2d3260eab6790c001678032e3260eab6790c0016782c2a3a0275f5a212ce001677eca73a02d6e0588bda001677dd0432f24ac82e9e0016782c2b3a0275f3a47428801677f61f32c1d36f5372801678032f3260eab6790c001677dd0532c1d36f5372801677d58f32c1d56cf218001677d59032916011b592001677dd0632c1d56cf218001677f6203260eab6790c001677f62132916011b592001677d5913a0153357ea7aa001677e16a32915c1678470016782c2c3a02458046d6480016782c2d3a02a66afd4f54001677dd0732f24ac82e9e00167803303260eab6790c001677d5923260eab6790c001677dd0832c1d56cf218001677eca83a02d6de5aed34801677f62232c1d36f5372801677fd813230755b3c86001677dd093a01533381090480167803323260e8b8da66801677f62332916011b5920016781b3132c1d171b4cd001deb21111106ca0000000000000000000000000000000000","v":"0x0","r":"0x884158270eaa16d2e8daf952620f4f33d6302b688a8c07c06ceb76ae79afb9bc","s":"0x3760fec4f6350193e27977a8ff57364715ac6d22315c1d0791f59afd01fc1ec5","to":"0x21ceb5a916ced2ad8072c9a8cf7a93ff452cd61c","chainId":"0xaa36a7","accessList":[],"hash":"0x556e73d7a40c0a55dd675d4e0803033454c27e6c17158ea55e59546eb79b6e65"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_40.json b/common/ethereum/testdata/tx_40.json new file mode 100644 index 0000000000..86a5299c1c --- /dev/null +++ b/common/ethereum/testdata/tx_40.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x173b7","gasPrice":null,"maxPriorityFeePerGas":"0x59682f00","maxFeePerGas":"0x5a2b0fb6","gas":"0x5b8d80","value":"0x0","input":"0xb1dc65a4000193348fa898feb0d0b83d38465aaa3500d9f975dbe503e55300ccafca6bc6000000000000000000000000000000000000000000000000000000000044a502f714d5eb0d3f09fea0e8fd8bbf2b6cc1aa5ef86057226bc74877ba1a4ab27bcd00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000260000000000000000000000000000000000000000000000000000000000000034001000001000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000505d17e36030dae9000000000000000000000000000000003138000000000000000000006b5151880000000000000000000000000000000000000000000000000000000000000006a0b19c6643512aa771ed46ff9d8a8114d2b42202bff2685bf0e7192d2d8bd1988ef3dae65c9c7900b1647effd153b58f7a03ce5d16801456cb9b4386e8ec1d0a46ab5ee69b58e3c8c7979bcd288772ad8a2f842be25cd8d42fa9f2ec3f6a241331b7a7dfc6eff724d798e15c35a32705f3d45999b68e4014fb109b5db921c2748f768742ac8b036c05af02ce680df3006cf47e2e54b5efd80e7385d5b89a4f5304b9b699f9cd9d2f632b0a5ef313a52cffacdcc1530acd7d9e8af9ec5bcdbad6000000000000000000000000000000000000000000000000000000000000000613c6f3df0dd0985b253b5c1da4f60d4e87c96dd0131ce109b123c1e532b305f700f8e977865cada5cd69bf7c535f129b187b8cad19bc63c9892d366b1699c1825e93d1e2790b04aa5165f1dae9eff40438491f4bb98c0578102b57eaeffe3f1c31132c5b5f7acccde7af9694219ce9366da49a543e4e6da7248176d0738ef1671f1cfbb7bf1cd6741547ae4b5178204c16715644a51dd2e4094141a9ac2efe421bd57b8bf9c9e7c54c24b1d51fcc09d0c8e0bd0f7357591f16b267f2e59f0674","v":"0x0","r":"0x8996e903bacaf9d90659c636f36d44cfe4242b8790facb63e8ad606331d97930","s":"0x34674af330df23dc0cfa049a0d40028e32ee7981364fdf3ae13ebe7d7dc70a4a","to":"0x92dc24ba33a2ac8a5af8d0aaad1bc97f69c416dc","chainId":"0xaa36a7","accessList":[],"hash":"0xd76a70456ad688bf4eb61ee093911c2c73135995734d6e6090e66285cd995b8f"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_41.json b/common/ethereum/testdata/tx_41.json new file mode 100644 index 0000000000..965ea25662 --- /dev/null +++ b/common/ethereum/testdata/tx_41.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x93","gasPrice":null,"maxPriorityFeePerGas":"0x59682f00","maxFeePerGas":"0x5a7ad603","gas":"0x7220","value":"0x0","input":"0x095ea7b30000000000000000000000000bcb9ea12d0b02d846fb8bbb8763ec8efecb4c7900000000000000000000000000000000000000000000003feb244e2d02130205","v":"0x1","r":"0x3a1340882465f706aa20072acae2d7ad96f5cf7875b747ee59d267c28b8d9b20","s":"0x63625fe0065fa3e357f1a1310f3653a8a6ea834e1e1b044b56be474cabbf751e","to":"0xcd85b9a767ef2277e264a4b9a14a2deacab82ffb","chainId":"0xaa36a7","accessList":[],"hash":"0xf2a70eaa241b3b2466478fe0131d02eaa4d8c117fa5b5b71e3928fd6c70ff9cb"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_42.json b/common/ethereum/testdata/tx_42.json new file mode 100644 index 0000000000..30aa166f22 --- /dev/null +++ b/common/ethereum/testdata/tx_42.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x6b","gasPrice":null,"maxPriorityFeePerGas":"0x59682f00","maxFeePerGas":"0x5a683f11","gas":"0x11e26","value":"0x0","input":"0x095ea7b30000000000000000000000000bcb9ea12d0b02d846fb8bbb8763ec8efecb4c79000000000000000000000000000000000000000000000000000000000002dfcc","v":"0x0","r":"0xe47c1f50ea4735c239b934254ff90531b092ae37f86ad59dbd87885330b26e2b","s":"0x1754c17bb42f2c21185a3ae5f1388d04233d718f9739be907f55030e7543d35a","to":"0x4820416cf02094ac6b9c253f64777516713330f4","chainId":"0xaa36a7","accessList":[],"hash":"0x5b11ce6f33b4a94c9cd438033bd1d6bec5676801c64c3b153884b467a49ea325"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_43.json b/common/ethereum/testdata/tx_43.json new file mode 100644 index 0000000000..5d5738c98f --- /dev/null +++ b/common/ethereum/testdata/tx_43.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x3c","gasPrice":null,"maxPriorityFeePerGas":"0x59682f00","maxFeePerGas":"0x5a683f11","gas":"0x3bb53","value":"0x0","input":"0xcd88ec5300000000000000000000000000000000000000000000000000000000000001e0036c08ffda9bd04206fc58d82ee1dcc69c2d8052f17d81b53a466cf7eda28d560000000000000000000000000000000000000000000000000000000000a91460000000000000000000000000000000000000000000000000400000006588e1a6a74c7273d27b7cdf934ede21099504b148d8d0cd1e7592ec2d2d09fdf1ddbbbc9b511882cf70dbf9b5ebaf22740a476be9b26aea731d4e7481a980c93de6f9970000000000000000000000000000000000000000000000000000000000a901bb000000000000000000000000000000000000000000000000400000006588cefc00000000000000000000000000000000000000000000000000000000004b8f4c00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001bc6e1ae24eaa5853dc45160c96ecc1a1bf47a102fdfc605512c3402e9767d3a1eb2e2289eb0b3da696f493bdf25225797547948e577e8f7dd34e46df4c2a247100000000000000000000000000000000000000000000000000000000000002a00000000000000000000000000000000000000000000000000000000000000520d9c034f0f1d6b680daad72b0e9fc25441f74c1d530d2ac46ebbd87794515c949000000000000000000000000d20bdecf96871ad354a6cc7741c3ad65ead738cb6fa10b6919c860c6d66213663bf89663b56705eaed7a0f7040ca63cf51617342000000000000000000000000000000000000000000000000000000001443fd0000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a901bb000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000114d69e4ee3cd2a1c21b89b75d6684caa768399ac7f68b45cc592bf1fe376b5b3f8802611e978358ddfc37f384c02db1614a9d5c4976574b75ef6dbe763bd5d81c17f9390b2ae014dcf374cfa1217bb4f3dd97b381e06be7a07ab115c4bf01aa894c2e21a10e8ce8f400e39158fd0e3fc66a4ce9a691107581dbe63227f02f8090b9f65c4c6c3115aafa1a49bd94adffcb4b47d7d29349db3681251d6923033929863e072d3f469607ea736ec192261bad4f7db69fd7491422c96bbcb268117bcb88ba3caa9eaae2f2af7c13ba83fa3574db917965944b97418b8c87bee0502fd6658fc4068772d13368477c6df377797f38db099b24750b8e025732c6d01e6f874bea5d0644c899e1dde334ffb9182500a7f263c377f4266126ab7340271f2f300d0d9e09cc5846a6833ee08ce57ee14fdc83e5b73d4d9fcd3860e8fc9ecc1e614410f83fee2a301030a02d853906089f89a6a353f32ad179cf2d079ccd9dd4d9827408ea757efe7b6cc2e988276ea6a33db622e2851144fc4cc4f815dc016567e1c3f249373718b3055b0f84bc8f16ddfd9baab2015887e8d92366a37758766d92bef8814ae24c81bff7bb4f423af92e5a5c3f83f1d08d7cbd5f648e3da39ca93d12b825334354e6c67a6e1a9a611545b08e3fe3649a12a3101d2b64be1e9e00e28d7d8441b93fd5f8097fb034625722b61f7c004baaccd6f96dc05d14628cd19a36146127e3f44b632b029b382f8eeca1492537702f87a1d5bb3ac8bc960ff6000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000","v":"0x1","r":"0x90d48a414753e3280a8d1c938eec1419b04e81903ba2bdeb8170f45ba906985","s":"0x57a491ea6e0977b401009c5092e0c74d3475caec9d6f6e9292e78efc1862de64","to":"0x03f2901db5723639978debed3aba66d4ea03af73","chainId":"0xaa36a7","accessList":[],"hash":"0x9178fcb460b7000d9dbc9e1c32d97cbc620a8a5ce60051fdfe137854119d1cf2"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_44.json b/common/ethereum/testdata/tx_44.json new file mode 100644 index 0000000000..c42572acec --- /dev/null +++ b/common/ethereum/testdata/tx_44.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x6a","gasPrice":null,"maxPriorityFeePerGas":"0x59682f00","maxFeePerGas":"0x5a683f11","gas":"0xc0a72","value":"0x0","input":"0xbef2e22e00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000002f8b000000000000000000000000000000000000000000000040216c4832871c00000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000040216c4832871c00000000000000000000000000000000000000000000000000000000000000000000","v":"0x1","r":"0xde7cbff6b2b7043b57edbaba959ab25f28e496b19920b6aa0699322aa192e9c9","s":"0x7470f916aa76341056067c310f7195d2942dd53a7313af69ce14c1baf9d6234e","to":"0x0bcb9ea12d0b02d846fb8bbb8763ec8efecb4c79","chainId":"0xaa36a7","accessList":[],"hash":"0xf8f49de77caf2e10ad76114b28db5878f0f043204d2bff014d0cc9aceef1a18e"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_45.json b/common/ethereum/testdata/tx_45.json new file mode 100644 index 0000000000..13c93268e1 --- /dev/null +++ b/common/ethereum/testdata/tx_45.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x7c","gasPrice":null,"maxPriorityFeePerGas":"0x59682f00","maxFeePerGas":"0x5a7ad603","gas":"0xb4ec","value":"0x0","input":"0x095ea7b30000000000000000000000000bcb9ea12d0b02d846fb8bbb8763ec8efecb4c7900000000000000000000000000000000000000000000003b4f064fa01ee3e1c2","v":"0x0","r":"0xc4b2409265b4e5191d40d3a5988c9867b85ba664fc27605f7ecb7be293551b9a","s":"0x708841fbf89279f95c0bb1e0fd88071b011cc46aacd46a302eb734d11227d3bf","to":"0xcd85b9a767ef2277e264a4b9a14a2deacab82ffb","chainId":"0xaa36a7","accessList":[],"hash":"0x0d7bc25069a4694ba7707cb9b82b594ff0baf87d08caab72a5ca0da0c7d5404e"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_46.json b/common/ethereum/testdata/tx_46.json new file mode 100644 index 0000000000..c57238ed66 --- /dev/null +++ b/common/ethereum/testdata/tx_46.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x7d","gasPrice":null,"maxPriorityFeePerGas":"0x59682f00","maxFeePerGas":"0x5a66f417","gas":"0x11e26","value":"0x0","input":"0x095ea7b30000000000000000000000000bcb9ea12d0b02d846fb8bbb8763ec8efecb4c79000000000000000000000000000000000000000000000000000000000002dfce","v":"0x0","r":"0x835931be0ed8547b1fe9c6c44fcf111995187156a52bba4cf1bb2532cf33ea27","s":"0x50fda4886d8cac4a142be738403ebbfe6e64f016904dd77ef5a4a41bef20bc9a","to":"0x4820416cf02094ac6b9c253f64777516713330f4","chainId":"0xaa36a7","accessList":[],"hash":"0x73c15d796d3cd5568aefe7390896510d06b22580ede6435ec59a8592ef17777f"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_47.json b/common/ethereum/testdata/tx_47.json new file mode 100644 index 0000000000..056267adec --- /dev/null +++ b/common/ethereum/testdata/tx_47.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x7d61f5","gasPrice":null,"maxPriorityFeePerGas":"0x3b9aca00","maxFeePerGas":"0x77359400","gas":"0x55f0","value":"0x6f05b59d3b20000","input":"0x","v":"0x1","r":"0x457805a43b160c0a1670d84c5b5d72d95744e3eae9c3e31383a0115fb07237f9","s":"0x2d461602981c8fe901a5e50539f57ff8fd78a315a8f5eae08a9b15d6df79fc42","to":"0x5be816b68b6af6765607e824610415392ec46978","chainId":"0xaa36a7","accessList":[],"hash":"0x147e38e7596c9d06167094115f25ce0b42d6ad8aa4056578c8801cf185eca05a"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_48.json b/common/ethereum/testdata/tx_48.json new file mode 100644 index 0000000000..ac682f6bbd --- /dev/null +++ b/common/ethereum/testdata/tx_48.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x7d61f6","gasPrice":null,"maxPriorityFeePerGas":"0x3b9aca00","maxFeePerGas":"0x77359400","gas":"0x55f0","value":"0x6f05b59d3b20000","input":"0x","v":"0x0","r":"0x3850a775dc13ec15b287b54a749c4248d47cab7c144638f038a85553db246732","s":"0x5ad16c72ffceef43be8b1effbd9c969420733765a6df0304ebb82371bb7177c5","to":"0x52817fd465c17b6bb294f4894d3bdf190891a40a","chainId":"0xaa36a7","accessList":[],"hash":"0x24cddb57bd27af388b7a066cb6d6501781e1a1172c02604de1b18da9a0299c8a"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_49.json b/common/ethereum/testdata/tx_49.json new file mode 100644 index 0000000000..3bec3b5b12 --- /dev/null +++ b/common/ethereum/testdata/tx_49.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x7d61f7","gasPrice":null,"maxPriorityFeePerGas":"0x3b9aca00","maxFeePerGas":"0x77359400","gas":"0x55f0","value":"0x6f05b59d3b20000","input":"0x","v":"0x1","r":"0x103f6b1024100e1d50fb291f99a3a5f0b1bd18c4b6d5752230039d83b9ded814","s":"0x3e372244afe2575ef4a58c7c94cafbb7b901af45651d7705c57aa17da98be781","to":"0xcf6a06e3a3bbabce72fc2c91acf56b3b5613a646","chainId":"0xaa36a7","accessList":[],"hash":"0x41f577d5d7af7fe8ab2ffbddc55d1a215a6bfc8f8a17b2411a6420f7e5974b5e"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_5.json b/common/ethereum/testdata/tx_5.json new file mode 100644 index 0000000000..0b568b7649 --- /dev/null +++ b/common/ethereum/testdata/tx_5.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x4","gasPrice":null,"maxPriorityFeePerGas":"0xef461c4b","maxFeePerGas":"0xef461c4b","gas":"0x218ed","value":"0x0","input":"0x79df76820000000000000000000000008693ed66f4f9efe3edcce967f79d0fd6943498fa000000000000000000000000000000000000000000000000000000000008b3db0000000000000000000000000000000000000000000000000000018cc4f95246000000000000000000000000000000000000000000000000000000012a05f2000000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001cd6d30280798ad208036e302f270226c19af26674c537f173bb10df2f7c85596a746575141d95f07257aa33965f6c68815fcdc4d56bb240036d29172b99d5b6a5","v":"0x1","r":"0x6c096dbb1e1f06d272cebe953bb37dd3b2bfb132d465a2fce4a29f549a9b1c62","s":"0x20b99c81c636e4095cbec197b2ac1f568fdaa32a559ad1f32900bd0f66ebdba5","to":"0x321ce961084fcf3a56de4be2f2006707a0421aa4","chainId":"0xaa36a7","accessList":[],"hash":"0xc3e30fc09f87349b9f053aed25a3d436ee781d20a8b6af749e8f17453d09cef0"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_50.json b/common/ethereum/testdata/tx_50.json new file mode 100644 index 0000000000..02e8288245 --- /dev/null +++ b/common/ethereum/testdata/tx_50.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x7d61f8","gasPrice":null,"maxPriorityFeePerGas":"0x3b9aca00","maxFeePerGas":"0x77359400","gas":"0x55f0","value":"0x6f05b59d3b20000","input":"0x","v":"0x0","r":"0xafc600a7f881183572a64d428993234d3f31d7cea3f5acaf1225be453cb9aa71","s":"0x755884e495a2964a6bf72a43fa23215702c4e6b382df7285efe17ae127b24855","to":"0x2ae9608e47bb372e8eb01cb64c442a5592f772a8","chainId":"0xaa36a7","accessList":[],"hash":"0x2f45384a6bc3d99b5679dd9384a5e74003832a1995ce8a3cf16468ed71620ff9"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_51.json b/common/ethereum/testdata/tx_51.json new file mode 100644 index 0000000000..c8e677d4ce --- /dev/null +++ b/common/ethereum/testdata/tx_51.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x7af88","gasPrice":null,"maxPriorityFeePerGas":"0x3b9aca00","maxFeePerGas":"0x3d208b6c","gas":"0x16e360","value":"0x0","input":"0x10d008bd00000000000000000000000000000000000000000000000000000000001f18f200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000001260000000000000000000000000000000000000000000000000000000000000002093d4a0bb6f63933ab29bd8f81f1165fcc8991cde76e46643055f29d4d12a4ebe312460061832396926f53581881aaeadba99b2a079de87e04d81c8cb644e2939476b1be33efa95336fd1e0de90002ef92d584e3b17ccfd64f15b2fd25c7c282f14a81e098c4e273814155a503afceaef0f183979b84596c406d38bf9b5fbe6a400000000000000000000000000000000000000000000000000000000000000000000000000000000000000002909db987aa74120a15f743197c58be1b8d5e83b00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000001122000000000000000000000000000000000000b88053533cf139d2787923d54a5ab19300000000000000000000000000000000f17390d20a13c44af0e4ba5c7cc6b57600000000000000000000000000000000000000000000000c77e6d32e4fc5c0b2000000000000000000000000000000000000000000000003d683ff32c7a61b790000000000000000000000000000000000000000000000028309a65dbc53a73d0000000000000000000000000000000000000000000000000002142cfbf053440000000000000000000000000000000000000000000000064150bee2f86832200000000000000000000000000000000000000000000000010471fd30a68102670000000000000000000000000000000000000000000000010db4751ad53515a90000000000000000000000000000000000000000000000000000033015cd00b20000000000000000000000000000000000000000000000008658f31b3c86b5f60000000000000000000000000000000000000000000000062d8df4006f42380300000000000000000000000000000000000000000000000a59db0ecdee972b6900000000000000000000000000000000000000000000000000001c612f2c28a600000000000000000000000000000000000000000000000724b2e1bc23fb33650000000000000000000000000000000000000000000000073ad1a5da7ad4f58a00000000000000000000000000000000000000000000000be6783f380a99d529000000000000000000000000000000000000000000000000000042ee41c1ab9a01bd26def20d631984d46e3018eec4c211088eccda049ab9a7c4cf7ea73375890ac403be29f6e55a207b80e269eb56378a8ecb465e659f02b308589f2c105c550f2ce0757c72d19aa5f0231083b23129d4403b9665cf99a5eafd38107a1b14e51db4edc084d536728807ee36131839dddb5e9db35ae571c2c5954417a47a4fd92b68cef0149e4d661b1ff177a6be2d2571c8dd35042b95540d50d687429b2f5d0d4af6ef5ce06b1689e0473e7b8f944cec0e27291887bb4e9937a88c1fab23191fcb5e153474296f2be52ec79c0997e5969a5996eb04a6bfe69886f1a5cafbf2243312f849b0f2f11d7761c597a24bd6e16fe9e8e3d6ad51d4a6906c9ca98df10ef2571c9ece70b39298d3819fc73ae6d57106f5f3a99c7a2c1dfb1ad5f6e2291b0a947bcd20abd936ebbffbe9a0cdfe795b30b8cf0baa4caf15e7f2acee5af12e503fc25878183d2845274de0072f3ea986bcb88885b407f0869ad6994868611b527cbb9bbf7dd91de77ed1890670b7de3aaa9a8b3605828eb2e189b7b8b951206c2a3066f7f4fca0d87db8cb19dffa78650d799c7161bb3f3764b164520072255d4318f1a72f16951765cdcd0a361b684444ebd950b78fffc3a2c269bf67060001b651356b4e48ac85f1a53f824b9678be34bf122345c996c16f09f2de8f951a288756ed72cdcff9a2a0f5e9d16b40f45583319eb6270acf4a0031035827bf006fc513bf2a3c31014eb943363b68a15e2f4049ae199e70ec7ba0aec66f4b1b00658f2fd324cde17f53ae10f531c4f9c79f6c2c4b3e934a21353d6a7e373bfe16eed43c02a0e84d7c560b18c722e4a5cad238d611b9211d4b15156ce3a2e5090e25b443ecb084d8755449801f0830a8589ca24ed6597198a0980264dd4b11e21c2e627610866e72f062709e980f9e3047be8c41a321e029663fd61e535322442407a15722ef09755651c652749bf1608b3bf26e54302d851445244ccc9e03940dae640397fad880d9654e65cb9f155eb65549944a6a7096239d36c63d77dfa90d5f94184fd4b470e3991384b2b64cdb0ba817479ad46d9579415e2ae3a29b0f095461f533f8cfd044795fa4ebbd9f30b75a639903d73e4941df04f65c6c57740370183cac9b0deb0ac8c2cb855fce8ed272da75677f11f789819ebf405ae85a1c5e03e4d990ef856505d1a6ea03a8d12ec8f09f9b9007b2fbd64a4f48c66caf14c0ddc92c1b3945871946b5f9381e4f6aa632d97f92e5af8f5baf3277e9e1bb2cb8e9ceb9f65a84f90f2ef9a362eba5507a1675affcae1b9f1fc975019537962a6ef163e6e1a6cd1f0087bc3b8d93ae7b131692b3344122933e9bf37b2364ac08ec359aa332d4846a083512cb590193bbbc64c848269779a63c1aff9bf78cbf2f277268984d9c4bd7e07a25319b033511bb2b1840dc66af3249705f86a449ca020ee9041ddc7e335e1fdfa91ff440c26a2e912500e0646a026f7b28b67fd01e2d5b09d14aa486ca1525fe4e3d6a2caa65fb8152b32394d91c5f9819dcb12f0420089dcd5e8bfddf5976ebc4e6b5e45a4e8a6a6b756c9f9406d62220c235ab3526f2093b5290321d0399cab111301c7c0eb24e12eb9675644278e216d9eb990a219df1e44699e42d59060abc14f3d2ca204b42c0b9d6ac69ef2b302f4977d9fc20a69a6915e550a8390744455fda449ad25231cf211badb72998c38bb1dca6192fc87455c7a3d639d17c675ab7fb5de8d993381488bee376957968e77aedb8712d05ba0d51d6010523c5128638b5ea4cc183836dda69190097b7ac7af0e387c506117e3531dc0701a6abee63ce25246fd6b1836c5b4aeb5528aedab6dc3326f80c52dfcabb80751986a99680a9f29e197ec191a4341fb28361445e6101be1f702dcfb2aa030c0d01f7fcce9b46004422fa45c3cd8601e904ffc8835225afe020219f906a32dbe0bc898edde2a5adfedd1947434fb0f43791aeb5fc2b70e804c609364feefa6d2e1414be20c689b8081d6ed52f66e8e0716df845770bf6b2cd0516d26fe89ce4d859fa3663fbfc65060d613f802351840623dd356c43b73868c53061088e595f804e1a9e478c8d8208eb3bef219afe415be5ae557a41d94e860b0cfbfa0e63fcb67011a4f9127e5750983585db4ae6c8e5e51aec55a8bcecef4d0ecac0b4c3f0a531bcd0a6035e28386de0282e104385eb89d83f7c87680c57582f26b88fc97399e9715b4df68ed91e9ebebbfb423ba06b32658964285799caaa23376aaa112296376d97c3acec23c93fb2c11d44676a01ce70001a15317180362a1d153855ebf8c37b1f421312c8c5c455999fb53e10c03700658d2ba5965b010e806b07072438e0c9cec8fb2fe198d2148351736b9494bd01c68edc2757dc0a14bb3321849d537fb370150035b6db768e4a0f09147a21b973a877916d2acc3f2814e04897bb89d340d56fbb52846b7c4e884f217e50ca21c5495eef127602b22468a5f8b3f2b9854dd1f019ae5ff96fb56e160a2c8a2513aee0c7080f70959228a2865485716b5d449fa5ffbdd6fed9c2033e5df7162e896dc587b3f2b20a5221bc942d996d65da7980754fa5c1dc43dce69ceba1e1a0bd8c4612a2a6e47b9a287d7a70350e02097fcc3129a3e832b0c7b8f07f5c656f004b0835db5c7789211fb7d8a55a0055f8d240c3b92713448586cc46a33268b278d6f1965a9cf1f74d1b467eae84fc3a1b557de528b76cb02ac845067134ee0b47afdc744ebd15b8261d0627d3fd2b2911098b9519b2b5ff2b252f8add9f8912431cdc1b7fdc2b001f24780d8ea07da0bc9672f47bc0c233bee148a179a7372edfcc24226ee55ee6a72198bd08d8d92dfc75ad5cb01b06020211c2d51d7b5529ef7d56f3b310b6af9a132471e76e2a0bdee8d77eeccd6ff1e55eb8e4f3b784eea46956d407dd246f3b0e5d142809c143ed23df7c383132b4ddb80b124bcf1074d5f03a47005f40cb9a2ba65f857cc0064387f36fb6131a4365649b4a4e142715c43d7d879c059fd40a24587bec0c135ebac3a72f0748d83561b35372c3ae865b5c9542efc45d0ae76e10bcec16b700d74fd817a6b336d7cb5669a52a3d977d986e3f54aa175cc458650480142e2c73c8c27800b8e14cd92b97bac36a06f08a97b88c75afa596f31e961287950c4bbf1d2f329d0fe23bd3c2d05fdbf30075e011bd42f094b41ae7212130220c7c3e30b6663e2ff655395573da2597931faa551053f444a9c797df7fd60f69fc05998093d71278f0b4d214488a79036b8959bfd7a1426e1d42219e12b31cda78c4a3fb34245cf21821765e0dfa63f7374a4364d1f1922a66da92aaa1912bd7928ffc64c3f266eedc088277c0c0fdb4f822c0266f523d49e98eaa24a277169c21728a21d7b1a27239f578afaabf78749d73fc9c219200f42ffe5dea6f78124d7f67b0ccaaca53ac9c7831fda19784f05fe1995a7baaabf135e86a6484900521751cf9e334ffaeb05d85537d70d35e89349289d381df8477dd5ce43b53d608b4294befd444dfb4a1da1161d35468addfe62a8361b8ea8e354d6d2dfc43af1c97cdb0d21ae2e441dfebd143afdf6e4408162f21ada813f23986423885a48d0608496682cde5c2f453d8c6342d49825423d28e30c1bdb8e03e71f074ea3e9302de22f72ca1b21d3e2b6edce710d370e9ad29f5c16630e8158ac56c6a6fbd721e9e4b95748509e548a26cfb72ad0137df053d9bb5c9ec165350e8153eb791e10adb516920975f4f257c6540a3a7793e9cbe1c9b33d64525b288694b75deae5c0c197ad22e2b76e8602e63b75cdafa897d763557bd636c090a3e4f575e5b54611797eccc999a36edd3af91c394e5ce0ba5464cc85cc979a53db6231cfb767c52286eff7150ea0e903a99c47acbea921808008f4f6521f0c993452bd3ae8038b90a88403938caa24b5c16703d49115407a47f83a9ea07d9bc7ef88bc632a273c705656c07a306a3ac3299befd7be11c032022a86ccd261cd268995c0340967ded07a422762c5695e20f4e6033242440b323ab118e1c1f369921142632f5c343ef2a723d59ee48445dff73b121daa8b35af28aa396803dfef05d93c5ff8be5b5ed2f540098ceaef6748662bb67286c70ec3cec44caf9e9c6bcd1fc52c0728ee43b25630c6915f0b5e137475a6e5a4815b38029d04bb70605893ef5f04579995cdd20e3a7483cba981e878e7a3f9e2bec81c4d39c57fcc7765b7bc7d23b348074ba031655febb96a20317939cd1311e70f93ab8dda8fb35c26e8a9c1c20d352a01c2828ca22b1718eb9b6aaa069e764acfb6d59112b857872137e563f3edb33a01a08b448d7f9ea64b7d215a48e3ef273042c1f56e52520abbbfc8576d82bb377b80312dbc89703b66ea9d5bd860734f84089482486d6c76b02eef4b12898be204111bb633bec5aaf4c08e51b21e0101de871e02c53766881b336465847d67c46e40b3df7070f9c89210ffaec2b1690f5914daaa5e2748c137a917d110dbbe44b762c61ec1da03ffba6feaf212fe5f10efe44afbc0e1bf028b6d44de727c62024782b798b7d4fe115e0fd9bc5ee51877162616f1b2900eb94bda1aebad0ede1f81d19e1b91f34ef6835392f5abac4ab9adaf867e4ad30221e6e2bfe2f7ee147c1bd2fe07c2ec8748831a47981f590ff0da53f02ef91335f02069febab9767f151f305a6d8c31bb86fcfdb7c574d88cc2e1e897c73c6158bd25881d8c3525f90bca823f2040369b5ab5d6a2fe0f22c33ff2244e222d1489156f2890ae33a636d73422bc219408e8fc16cce0e2cf7f4e373ce912a253abeb6982644933042b9743d3b1e1035f8cdd39718a6fa48ac1783b9e570efeeb5fb91e2a4fd1f74ad6441b9ae03078a8156f5a4eb8a640392cc1baec080f4192956a40f0d3ef442ce3a29337a112d45f0e3a415f0f0b5cf3cedb4ad6e9e860faca41695a5de73b0b05f56bc522b4a187858cacd79dc07c794809de821751a4b1fdd099bd213c4504f677eae7a014848c56e98856ca26f5984091d8c25bc9fae262426f678b5689a62390beaea0da69aba5dff64fef5964e53ff00feba465de6049337c7a0a3299ac81184a41d2a8923f455de202e6cbb1a9db44289345835aa499cd897d77b92670ef7f1ad86248bb43d43ced0516d69f6824274fee7472541ecfd05a1cfa6b23a114b27dd4a1cd89a8c1821dac4fba21f4f9f02f40eb254b6d0345e972e289a4c393638199220ffa1b536a65173f288816d98750841eec2fa1a8370db269384d5af3627907a18d94d36b59562c0047e66fe785b0587a78adb2f9efcb91f4a06b341e9250d0324f3c7932c00fea1af6f0326fc6ba6edfc322adbc95c94c56c145f24c524177e000000000000000000000000000000000000000000000000000000000000","v":"0x1","r":"0x30b9f2fd9131eb17f88248cda292dc1807f77bb1255ef86b8033be68d8f0fe74","s":"0x91402f77967438b7f1d5cd25e4171397f9151824d1afcc1d2259fef79fdcbfb","to":"0x95ff8d3ce9dcb7455beb7845143bea84fe5c4f6f","chainId":"0xaa36a7","accessList":[],"hash":"0x4d1e80658624d26d22e923739e300f77612a5052172a6ea48cb79376689bafb1"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_52.json b/common/ethereum/testdata/tx_52.json new file mode 100644 index 0000000000..47a626f946 --- /dev/null +++ b/common/ethereum/testdata/tx_52.json @@ -0,0 +1 @@ +{"type":"0x0","nonce":"0x86559","gasPrice":"0x248a22b","maxPriorityFeePerGas":null,"maxFeePerGas":null,"gas":"0xf618","value":"0x6f05b59d3b20000","input":"0x","v":"0x1546d71","r":"0x32d83668c150ba07a005df5be579e3694fce4b0d3a0f41aa1e6753b2be8a50e","s":"0x4cbdfa206bfdfd567c07082548561ac6f21312bcba96b022e785697ab695af96","to":"0xd99d332d21ee5e9cc23d466414ae2b11d7c5ebde","hash":"0xd4f86b1f1bd8ac8070340e1636c33503a0b210c42a16e57d1184e33182387804"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_53.json b/common/ethereum/testdata/tx_53.json new file mode 100644 index 0000000000..46a601cf66 --- /dev/null +++ b/common/ethereum/testdata/tx_53.json @@ -0,0 +1 @@ +{"type":"0x0","nonce":"0x77421","gasPrice":"0x248a22b","maxPriorityFeePerGas":null,"maxFeePerGas":null,"gas":"0xf618","value":"0x6f05b59d3b20000","input":"0x","v":"0x1546d71","r":"0x434e39f3778f9e8cfc800626ba7938e510afa352b68a9c0c580ecb16d80e5bae","s":"0x414afee9fdbca552ca125ac7ef1daadf69f3fb537fdedda81a8fa07a419961be","to":"0x3a2984883378d82a9f1b5411463978e03c6bf55c","hash":"0x74030b16aaa16512564f4f07d9d12ce173acc22724975fdb88ebf4d12f9ef5aa"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_54.json b/common/ethereum/testdata/tx_54.json new file mode 100644 index 0000000000..d43845bcee --- /dev/null +++ b/common/ethereum/testdata/tx_54.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x1fa2","gasPrice":null,"maxPriorityFeePerGas":"0x3","maxFeePerGas":"0x17b5a2f","gas":"0xf9c0","value":"0x0","input":"0x000b33523b2894264cf7b6d5255bb00980000000000a8078da8cd5fb3fd30b0307f09d21452965a5b44a17e592fb98acb974215b48ee97a14c2e696e2bd46c9a5ba314da634d5a4507894d937badc872c4dc9a28476e592ecd353bc29e97e7f99edfbfffc0fb97cfebf3f9543940245816aa847df882609f59fd1429b163d5451422aeabbd7cba1ec5797e86a347b0e9a362319aacd3475ef2ceb4bd3bfaa3b18eb9d3cad03e60e8562d422eef187b8c4fb3d47e659588cf2cb5e5fd1fec66e138156e3cf3533b42a06736a8d2b6fff0b75ea1973ab6eda020d3054b6da0413b00b4b64ef71dbb579876e0976c36c92284dd7e0e97fafc523be96bf33fc4685bc625d0201600dfd74b11a64e731a9dbb9b257f870cf3268a37fb363c2b63f3ef57439c939f258206ed01b0a45b416aede0bc823274893acb1075bb0e2c411a29c62947734b3798f6c89b50b1182d5651e12d6d53f3fc99babf51b48a9d373f1e532f463490a07b422efa2815571b3aac818e00a8f56bb2fb2dd3a453d11eda56c70a7ed03ed14b4e6aa799da9e1cdeb439611a051a7402c0e463128af569fb4ef69140c24b769ed15894f265a521d175363ab97a175f251734e80c807b6ec4df4a530e35db1638eaf5d8b9e592a7ea57d9163dde3f859cacb63bf5c246d0a02b00da4d39beb83e1113b3beac4362d71e9d58608229a09c51534bcf125027b3561a4083ee0088a07f869476f7c63c41a789de1de994c7ddcdf9ad602e6c3c3af0f17d6f274e0f34e809808f123ef86fd1afcbc13b61bc28f1878d0cc616cd0cc3a7e594bb6ec2f63d3e79838ac568b32cc85969062c23dbc522870aefa7b39bb54772a0056ac7859938b4cc21f9fd256ba0f7bf4d390b21b0498178c32b8b3fe77a2f4ef66fe5be429f945f1fde5f4dd8c2686181067100782db516aa7245e9f7de0311a7601a8ae7e2b71e4249e7822d7b55ee5e150c1f0c070dfa0160abf75479bfe26de9fa7c89cd6bed27b1ef2d8915124e9460dcf181bcf3793f07d0e00500dc3fff7061d6e693f19d15158b28e470a18444ffa1b6a51ad7aae35055ab2277053418008082a4314c11c6ae81bfa4c8c75a15183f629064070bbeabbdcbd0a87ca8e248040d0602a0732a45fa59f0f40c2fadcf7f2cffce7b1ffc8bf178df7b44cf02d588c585d5522a16a3c39ae25e72c7c7ab6a9311f72e2af02a668ee7121f7ed5b93bb4a064b867ee0732610d0c0240f5562fb4edfc4be876c8b57d820362c599734bb0b3e8c61404aa5ff12f6dcd1da0c110008491547beedf248c151f364469a584d77da2c4fb3e80857a2155b74def690e2d000d5e06c04b1115769422e9e3a027e6fbfa7a6796a77e3d7afcc8b4feab96e9b725affd561ea0c12b00d831b82e4cdd2becb7e7bbcc30675ebfd046d8ea0d0fc244ec523339bc37c5750e34180e80271c20d12b2aee9d17c8d57d76afcbf07a486e50e7ed23fd29db3df2dd9d027241839100889a11877e6a9461474a3417f5ab224ebed44ddcab70384f5970bf31327537248a8ac51c65c1dbbf47ea97ac70e2b2f62dadbb254a507fb333a03eb8e9cf6c7c2aff7bbe4af21a180d80b6de8d81844a8be7a3e76fbaddd2fc67e9f95dc21bd7097ad94fa5d1d3f817414cd0e05500bc9920253e3965607de269cc40782c3fd280e2763b3c0c25f078eda7638e879883066300f0a5d987664c10f4ce26f3b99f2153b826b9d996cf26503149a32c07f64ab8710034180780dc80165e71182f14e573f63dfd5a2f7dfb76a301d6d6218b8491cbea5fed1663418337007039a98cd794bf7a3cd6e54bcb4bdef62971c1247ea3e5e1da83e3f0ab240c99071a8c0740628e8d6abfea6e8341bb6dd0b7457051a146ba5f9f1557d58669c158877cdd41c5627459dffb92f853c188eb2e4641e26d834dab4a88c1560192ab77635b3b2e5729c6630da4fc3b5f6e7b0b48fea280f19c59cb61d9adde9263c68b55d9355ca5ea2d8b6d210a4da0c19b00480e2c57904f5d4d5897e78032be4fc07108ba48da55a7dd1935325379f0b612d0602200fe013b3d17326ffd06261f5582cf5a479865c495f2d8d33e52fbf8491d757319d0603200662f6bf0272ffa3f7dabae4b3e6e8a1c28b69056faa5257f69a5b93137a65ccf020da602a0c1f15c74dd5f1936d527e33686ebaa4641e382b9b4acf39e5d0dd2c8e2cebc73a041dabf29c35b5e51770d922f186cda7fe84f7c009737ba23da3a1e3d7a7568c6ce937d8c8ac5e8b1741e703a92ae7fd4d697d81409c4cb820cebd141cdf160971ef2f58a50fd88ae35301d00dda76b07f426e4e7e6ccd0e970e9384e5d1646dc35c290b78afb2b9b9431150d1abc0380a5eb93d3493387965d2d7e51f7105ef20f20f77f8c553dca1c10c98d6bd29d79a0c1bb0058f34d3dcf7cfe846935fda9ce4a83b97aacf980a1a25fe8f398a55282cba76beb41839900187b4fecdb4df9410b85fa676d3b758316bf5d382bab20bf73686684ae4c24688106b30150f1a6f7018d71b2a2d62fa757192651dff3d511caada18e1910ef428f82c0c20ba0413a00a6ed5f36f32c4a28ca4c65b77da9c93b7ff9b821a3fdb072e6ae889a6877ca4011158bd1677130ca5b88839b0ca7b285e5561f7d3ef17c69851d19cc0854b4be73e6187df71a9803804c7d97b376ca685cd941ea6cd078954418869345d82719072647977844c6c681061f00e0a68b9a25856104fcc92afd72646bae532d2f7b5a6f86f3ad1f7e11a978797e1c34980b800a7110b52d067debe00a8dbb38a1b7d1c6cd9607c57ebe1ccba511c38d8b51aea0c13c004c99fa4f6f855022422890c33f4f261edae85be913d0568193be276564442aeb80065900d85669f0d66be1f8869ebb95c3c22f08f447baab3243c78dcc458ea2f89f0ffa83069f00202e05b17e5a320bad8c113d801157ac5eff9673b7c888605598a66aaab7ca30a8588c01ebdb897ae4bcf165033c1cce1c411bf94934fa66209ceaccb2f5e24207775efa1a980f80fc627ba9884611973b0b8b1c65db539f7d4e3623366546dd725a98d6499f4e000d3e03c05a2548ee60c9581bc9aca7dccc92ec7f9f6391e93d9042d39d450a0eccb60c81060b0150228aacf2ed492b6606c7294bd3f5255c9d12ab6e1563191e7e55dc13a10b070d16032081c1d4108b1e7308975a4f9b763cca6f6f3f57ab15e2f0f0aa9513b7e108df0734580280efbae7924f2405eb345de0b955a659674d28c49e871c733ae2a0393fe14494af010d9602e0d0405aedc1335acd56d74d6d3c920d18a1d0c9c0b41e832efab8ca6a8a508b4bc5620c597e9deebacfeaa3f71e85cf686b939558b3316fe256f2e1cdafa35ffc6d7aefe7ff2e800d80551d651e8c18338db137b147fb87dcba1f188539de3d59fa2974783ec2ca3cdc1934580e80da16e295e6c25df736794e7e3017f113e533168246ee9f9d18a99735a9baf23b0e34c805c0eaaef3690ac738a6269e092d5ec13a7b0e78ee7d476ffaf1cb8d1eb1af6cc18f0d1a7c0580452a32ad798171417792fb1b5c27c54c18612bfe953cc76e51c6ac33ce9a760534580580871e5e338c45a3f42cc3f73579ba314dc29930d747cdb2316f89bd5db3828c47a0c11a000cd96a29fe6393bfd00c35f301ebabe2d20daf7e8bc0bbd896cb457568246db6a3623146acaf53f65df66ab691b17cff73591bd6518574818a5ce7ef46690b6b65466f27630dac03c069180d9aaa3c2138cd9c24536ae43e3e34d936b29c93f0ac254b0eed034bd80f1a7ccdfb6f000000ffff1871720901","v":"0x1","r":"0x9eb47038f02717deb237bbbfb73a7297f46c1c02b169104300b3611a874b3b88","s":"0x51c16ce2d9d2b47a3a58a6405f9c03e52d71673ce6fdf5e0e8610136791d513f","to":"0xe8153376cef4db4162fa99aa68ab6d1fb13f505a","chainId":"0xaa36a7","accessList":[],"hash":"0x62d5949da691f0bbfbf7ac4401f2485c8bfe6eb3f2d80433be7f4d2408bfb5f7"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_55.json b/common/ethereum/testdata/tx_55.json new file mode 100644 index 0000000000..8352c1bb10 --- /dev/null +++ b/common/ethereum/testdata/tx_55.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x37b","gasPrice":null,"maxPriorityFeePerGas":"0x3","maxFeePerGas":"0x17b5a2f","gas":"0x156c2","value":"0x0","input":"0x9aaab648e06151218f6fb7d5220bbe278ccac2470a21094b6697aaeb33a6fc5211624f870000000000000000000000000000000000000000000000000000000000027330f564478c91df2cb3b9bc5c4f3e3f984ce27953c74bc49c7b6f5ed329165b410a00000000000000000000000000000000000000000000000000000000004c4b3a","v":"0x0","r":"0xc462d23d934bbf8d1851840f2f966c5c4ebc329123daecddb8d27e2bbc074335","s":"0x35a9fa1ae596f85448f19e624e6d0729b207db9f75b23b87742ac1267e25c441","to":"0x438dd5572b7d075e6c019c01068866f785c28066","chainId":"0xaa36a7","accessList":[],"hash":"0x92218e35f6b90b6de65099e553106bc39d84f35bae615bf6f3b75f12e8ce6e40"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_56.json b/common/ethereum/testdata/tx_56.json new file mode 100644 index 0000000000..93777f4f3f --- /dev/null +++ b/common/ethereum/testdata/tx_56.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x176e","gasPrice":null,"maxPriorityFeePerGas":"0x3","maxFeePerGas":"0x185c16f","gas":"0x18fc5","value":"0x0","input":"0x5f0cbe1b48e301fda2ab52899cb8ae5e81c92b0e2ddb0bba87a05da35db483f1e0f9de93000000000000000000000000000000000000000000000000000000000007b5f87317db4c898c4224ec27e5bf805a781c9ec015def43a3bc5e149ae4c07d77c7500000000000000000000000000000000000000000000000000000000004c4b3e00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000004ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000004ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff","v":"0x1","r":"0x885f54d82b727481c7f97dc1d1e6e48f8035cd17852b55affe3e6658040b20a2","s":"0xa5d582695cb36fe27589192964952f04dd192f788c013c0056d6c69f1b079b2","to":"0x3883d42e90b204f5a5e2f072f414e68c2c944698","chainId":"0xaa36a7","accessList":[],"hash":"0x6b4046b9e8b1089ecaed3c8e64a49e43b2aa24ae5565d0c6a8cfbd43915883ac"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_57.json b/common/ethereum/testdata/tx_57.json new file mode 100644 index 0000000000..d531036969 --- /dev/null +++ b/common/ethereum/testdata/tx_57.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x69c5c","gasPrice":null,"maxPriorityFeePerGas":"0x3","maxFeePerGas":"0x185c16f","gas":"0x6828","value":"0x0","input":"0x004c3d4a2cde725896cdb1ec9081da658100000000015078dadae1cff0c36781bcaa5ab9c34aad28df35316fcf5c9c3191e1e0c7c56b2ad66b681e5ffa658d567f76b38fb7e5826bbc4fc496e5da3c997761f797474adb52d70abd7eb0c2e6d98e638cabef9e3cb33cb12575d2ba2d072006de63509beba06c7457e2636b60bcdf8e7b2965995961314f367a57b5495e7e2eb49b6803b7410d7c6f797c5fe1c6a885aca2d7338e262fbf98f3b6f9b2dece9bffe7af6715bb7acf95b9d9c7db6ac1d714f79e89f77536efdc13e36f673fc3e75165f071ef2373aaf3e32e6b8a453b72810cdc013570f95bfd28a343ec33d338fd5d7cd79438daf5faf8c83c179952cc9cf3a940a8e907d106ee821a986833e5d392efdf3abfa74edfb34aadb14ca1ead763b7bd168f37455efa328ff5911ed106ee811ab8d040e5f5847f02ff74672eedbaaa65c3fb37fa8ae3e47939b78f6c9f6d1ba2306f13d106ee3b00080000ffff5ea3f76501","v":"0x1","r":"0xc8d242e42e0206f7d5cd64edce271d5333f5903bf957b5528588d353952348c9","s":"0x60e0d83be0f2e247cb5054c8248fceddb9e3ce7997abec762052c29f23858391","to":"0xff00000000000000000000000000000000042069","chainId":"0xaa36a7","accessList":[],"hash":"0x4e805d0fa8f16e4eefe503535cb4b8749cc1c909f3ba20a58730b530a80360c7"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_58.json b/common/ethereum/testdata/tx_58.json new file mode 100644 index 0000000000..4855811379 --- /dev/null +++ b/common/ethereum/testdata/tx_58.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x653","gasPrice":null,"maxPriorityFeePerGas":"0x3","maxFeePerGas":"0x17b5a2f","gas":"0x156c2","value":"0x0","input":"0x9aaab6489683c4f5af49b5eddec3e3338f99ade22f3d2f9fd71ce0fc0f4ff73a7e1429380000000000000000000000000000000000000000000000000000000000047310d60de416a66d3ce49ed0bbf4e222b665ad12ebe0a83ce6b8c601abddc9cca76100000000000000000000000000000000000000000000000000000000004c4b39","v":"0x0","r":"0x44bac299450d411a2bcc2e9431104c98f1a8ad43410b51947419eb67cf21ffb8","s":"0x62cca1aad26e8a88e5582e4bcd242d8f18a6597d53d707583effb0995b38bc17","to":"0x5f4a0588d91de64a046de7f6892739d5d98258c2","chainId":"0xaa36a7","accessList":[],"hash":"0xd520fd686c093833422c83fe7ebacd52aee33cdb32a18fe783e12bd50e4ee58f"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_59.json b/common/ethereum/testdata/tx_59.json new file mode 100644 index 0000000000..c3481b40ab --- /dev/null +++ b/common/ethereum/testdata/tx_59.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x1e","gasPrice":null,"maxPriorityFeePerGas":"0x3","maxFeePerGas":"0x185c16f","gas":"0x19a8f","value":"0x354a82f0186800","input":"0x278f2ab8d568e6ad9e6eeb17631b191db123d54e073c38fe890fc81372e16f203ecc94ea00000000000000000000000000000000000000000000000000354a6ba7a18000000000000000000000000000000000000000000000000000000000174876e800","v":"0x1","r":"0x710754ba53e56570a7ad4a5092a51b0807d275241143240a0aaf22d07981730e","s":"0x5932aaeae6ecf7c0fda7c2007dc5c8525d91c5bd73b2a211e23b2eff87c71861","to":"0x7c9e161ebe55000a3220f972058fb83273653a6e","chainId":"0xaa36a7","accessList":[],"hash":"0x43bb11273961d2da6862da5b4010edfc17697c300a2d362d80b3eb9acf089509"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_6.json b/common/ethereum/testdata/tx_6.json new file mode 100644 index 0000000000..36579d96f1 --- /dev/null +++ b/common/ethereum/testdata/tx_6.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x8","gasPrice":null,"maxPriorityFeePerGas":"0xef2e08b9","maxFeePerGas":"0xef2e08b9","gas":"0x218d5","value":"0x0","input":"0x79df7682000000000000000000000000d2697150e87a38cb68dc592f1d7ef10cf85b7d5900000000000000000000000000000000000000000000000000000000000eda1f0000000000000000000000000000000000000000000000000000018cc4fac3db0000000000000000000000000000000000000000000000000000000023c346000000000000000000000000000000000000000000000000000000000000000015000000000000000000000000000000000000000000000000000000000000001cd35b74605ed00536004d9cf22c7cfa412494089ef9819ff5a570e65899ef8f0d7fc229c52abfe88cbe7f9f34b4aacdab5c76681b38053c5d18749e9b9d355148","v":"0x1","r":"0xf830466842a2b3d0e1841c10934e47dc9d63b2ce1fd829d4df2943b4628d6bd4","s":"0x7134a8418e030ba4062bb3ea272683487e23137ba5ea2fec9ab9a86227d85b8","to":"0x321ce961084fcf3a56de4be2f2006707a0421aa4","chainId":"0xaa36a7","accessList":[],"hash":"0x12268df277776abf849ed79df114ff4f72a705b491fa518f7e97f82f404aee19"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_60.json b/common/ethereum/testdata/tx_60.json new file mode 100644 index 0000000000..510fc6f595 --- /dev/null +++ b/common/ethereum/testdata/tx_60.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x639c9","gasPrice":null,"maxPriorityFeePerGas":"0x3","maxFeePerGas":"0x185c16f","gas":"0x7c3c","value":"0x0","input":"0x00fcd9a1d6f8f82d18b35ef66a231d13b300000000029278dadac968c0f0935167c1c29509f1623d0e7acf5a932f4aa9b7ba9f3b72e2fca99282491ff30e2f315db2fe78b38fb7ed028e9f8bf935d85c0c8353d853fffb38bdd6fe71c2fc6567ad6ad4071905e9a004ad96d449ebb6fcb8bfe32ed38f5b4dfb99535b2233f41940844d33e3b11f539c183080400763b26b456c1703c38e14ce3f1dce0c940107420a0e302e103da5f6bd54fbdfeb95b18267cfea85c7ae3828bf5b98ef47db3c858294146ef3f205a93fcc3e1cf69ad1c3e7feda6d8ade6ad97ce3f6b6eacf2672bbf685736d4cbf67b2c39fe187cf028688d42eed7e066dfea8ccbf6796cbcfb0bd35ff8c23c3ae15dd8799a6c53ab044131d60db0e400c54f8f03de9ceb7e67715ee8f2d2dce8a9e90dfe11e2f58bc7c6e50d7bb756c0a69ff88367007d440a7c8bfc1a52f9befc7eba6d509d52c117e15c176be7ed5a92f9f54a6390b3cd4fe4cb481bba0069e7af1cb769edfecb45c75cfcd56d513dc4e8b06b0e805683c35b594fb622af7e30fd106ee811ae8c07d60abeb71b9ca9e0782e1497d0a47027fcd167e7c2b438ad3b0e3d5155dd776a20ddc0735f0b2e2bcd4558f793fad6d2cdac01fe17d39f2e9e26b3fa7bfed54ffadfdbde249c5cc661f6fbb05c5e2b77d3a7b9c54dea83fdddf10552133ef80e8bd2f56d6471f7aaef361bf5e530a32f000cccbede686ab0d1f9c50f958fcf37a17f326111bf575dc992d3b0b2ac25f49eff57626dac0435003e3a7e65476144fd20e6ccb70dc73c52ee443fef7f74c325ce9b7742ae32c26ab6f27dac02350034f545ef3d33f36effec1a402be533ce53b02a69e4964083c744876f589135fb30d1d8836f018d4c095aa0b7d98abaa662ddb22e427b3f2fe9f9b5f5b2ffccf4d6958521ab56cf321b377441b78e200200000ffffdb27da0701","v":"0x1","r":"0x8bf6c7eaf1d68b3da3c21219f533c34f89f3e1b4a800901423cd34ef2a055a42","s":"0x4686c42c57740d96aaf477cafc9873431919bef58c6077f951179ef9b37d9150","to":"0xff00000000000000000000000000000000048899","chainId":"0xaa36a7","accessList":[],"hash":"0x795226463e22b90a6938e7329cc5cd4009e4d68d6b141ca0a29094bd92e8b715"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_61.json b/common/ethereum/testdata/tx_61.json new file mode 100644 index 0000000000..b50330fa54 --- /dev/null +++ b/common/ethereum/testdata/tx_61.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x2db","gasPrice":null,"maxPriorityFeePerGas":"0x3","maxFeePerGas":"0x185c16f","gas":"0x74ef9","value":"0x1","input":"0xb6d5a39700000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000a090908cc483903a05eb5e7af4195a7478040828883dea4118f6721ce38695ec8e00000000000000000000000013ccf252b993eb66bfcb7702850c7bdc5a98b0e2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018b400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000002000000000000000000000000013ccf252b993eb66bfcb7702850c7bdc5a98b0e2000000000000000000000000000000000000000000000000000000006592b5c40000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000004144a134ccbf6c6377edb711929426f40b65927dc00b4761e287311f89bdad29136d295b69652d4d81a40d441c47e05039f25bb4737fa6ec8638e3ba87e8d59a781c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018b4f918b1b90eba02f90eb683028c5f82e4db8459682f008459682f0283097d0d94100077770000000000000000000000000000000480b90e44ec9b3121000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000af1170000000000000000000000009f1a34a0e4f6c77c3648c4d9e922da615c64d1940000000000000000000000000000000000000000000000000000000000aa36a70000000000000000000000000000000000000000000000000000000000028c5f000000000000000000000000748b2d70ae465eb1e0f2782f193bda2f139ca4010000000000000000000000001000777700000000000000000000000000000002000000000000000000000000748b2d70ae465eb1e0f2782f193bda2f139ca40100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005dcaa8ff1e8e000000000000000000000000000000000000000000000000000000000000222e00000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000036000000000000000000000000000000000000000000000000000000000000001a4cb03d23c00000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000748b2d70ae465eb1e0f2782f193bda2f139ca401000000000000000000000000000000000000000000000000002386f26fc100000000000000000000000000000000000000000000000000000000000000aa36a700000000000000000000000075f94f04d2144cb6056ccd0cff1771573d838974000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000554544b4f6a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000125461696b6f20546f6b656e204a6f6c6e697200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a60000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000004c4b3a000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000009d8f909d5b90214f90211a0f0231d089df3312accf0d0d85ce4321e74bffbe0fca5824b16b0d8700829e5baa0dd998354c60d490023bad968fd799e7fa325a517a80daae0eeb28bda723f1f11a04a848f2c74a2fc55ea88b2ae52e3f77d3d6ccfe4ee6db87aea0c01adbb71c5c9a0fb80d313f1934d56bd9e3cb23c795ef88bb56475ebedc8d1fcdf85398df9c683a062eb57f97614d88283f6a44067a05599680c5ceefac537dcf0da184eb70b73c0a0d8a1076c442e71428b52f14d0b6e7ffa73360669c19cb5cbbcdac4187bffd54ba01c6f65f2a77f753356bdcc2852a3739484c6f00362c945006a4644f326905948a056fb73be326a7bf2546fcaec1b2cf788f94fb751e80d94f2ecca4c65bda14ab9a07bc60015795e201100c89a93b1668e4d5ce2cbdf13e66ae7d2342ce89b1ddebaa0b28e7ef648140ce43217c4aa8161158d2387eaa54e3ced9a65aebec01eeddbc7a025e0afefa6ce93e150b32777b1a2e7b0bf02f1c2221f4f9b1ee2bcad302d1286a05f626d5cc3212615832a563c89e86d17285e28fe9be64db860a77a7b1da68a78a00296ba7786b26d4cdb2641325e10fada9ce30b864918706ce20516d5113ef806a003070c4963834866415da2e327883a23e60ac012ad3265a3045c63816a66f86ba0f0afabcb18b327d562faaf9e1153f27e1819a208e0361aa3896ac4a3387b957ba0f664d948975527909f07325bc7dbea91b16a7638da33c18df9f84da2449f624280b90214f90211a09586e39a256a12592acb5163567bac37aa8a640686c4a4bf23b1f1d0cf3dfccba0206d158803b20a7032515a637416a884870af1edac7cd10493baffa966c4391da0c8eb18c530565e3303c1f4f3c874f5449e4e15774242afc9793d5216fea8632ca0cd0c1edf558f472cff75a14986471702fddef3995512621a1cf54d1b909df2e2a09d88aba3e4468dd4f3920ec6f8bb892f176a507b50dc30ba66d8fcad50a09853a0e5e03cb9639a6bdbf37501906fed945121f2c4bb99a9c7a2f4b6947caec1002ca01ac67e5582b703acc3bbeb6cbc69594234a81b2b9b43da7a508e06c2e58cd3a0a07f22e2055e2c186347c738cfb4465e4481cd6c0cae6a1217c2d6256ab1db3ab9a0b96a964cbbe12829ffd64dde330275d34788dbcaa0020330c94067a8a01539a8a053f78312d185d1906eae5560c82e1bcf55d297398daf1277b094be0e699952bba0347905ea2f4a9f0f305ebebc8cd064cea013fbcc4698cf7a8d6be3857388878ea010c3967a4dba89720bc2f196fc1aa8e1e7956485638f276e5d5d744003e58fd6a057f13e6935e73bed5fa1aa98c6cd9e00c2af167f2e269a844cbe6da5e53b2705a03de7275268e877d5167510adcf6c4d37b097ebbac4c4e5be3f4405735a11ace9a0228dddecede12fc430025707a27829e5e5590c941a9d7fdb9a1d2448f27fc3f8a070bf5a6521c47a903293100900e62584d50bce35b2d2f3e8b5781ce06d06676f80b90214f90211a0f92931c169159c7a345381fc6c1c007811c21c9e16ba06d314487acc82f97870a06547b25bb229ff9a7fbd4e7289f17959be0bfe44880a5c6a998ac1f109437f72a0e6d29355a05ca71d7e9f50cf57217421297232e437b6e11bcf3470fdb62e5579a03d19332044ed1dc08e3b49756f5a19c1a4e9bee2d51663e45853c3e0858f6283a01c5466b0bc631dbce31ef952e29363ae414d545d789daf2acad697bebe8ef2eea044d712b9316c7bed423e124f08b7f7d2cfc452ce0542e57c86b6f6569fc63c6fa08ecdf232e957815cfd3d7c2b062322a4c99563971f945f6897e5b0c489730c9ca0e996fa137da52e8291103d22d94388dbcb8f3c7f94a5b9c311d35f8c05e88e9da05f94234f9b1dc2042398dcf3ed8f27a83de1796c2c40be39c496489c8583af5ea0a750434fcc66e4bbfe40091675a27ad8ea12d4e2f5f5aeb8634a44a625b0fe87a0dfdb09e31806e25ea2e1e96ade1fe9db6a5ee970630ddb3c18cfdf1f3062a603a0e7f8a771294c4f2e2fe66f660422379b42cc09d8e0daf49c5cc344c8443ea520a0908bacde172c8b74344a155e8ab87aebeaa93bed35ba0aff8c5d9544d9d0f4f1a038195c33414878ebff7581ab1a3b40790b67f81673c2d899549f5dbcb7807e1ca060dbfb6fce8794cfb9a717185c49c605fbe32012bb190881151eeb3dab6315d8a0ba8321a5b5db0ac90a425c4a2e9e189574d805c7dc3f45599a7f4e4e78e56a8c80b90214f90211a02fb3bf502a923b725bca9726347e806786b791a96d50631cf68e700941a7346ea06d5aa63a09888a769d10f0f92e48f1f94eab1c00d83726af906e4f4a1444df25a04cc168db4c9680e5b35199ec4f6b367edaa31dac59ace6edff9d02733300014aa0a5c15ec83daad5a05608be21501de42d89043461ef5aa7ff3e64d36a133a27e8a0c979bef0803ebd8ced3fdab2eac08037a0f117d38b1ec1624053d3f41b8e25eba03551fdd112c4de2252df8edfa97f3e87eb6a9e474fc4eeef3d80614ec247c17fa0d5801329ed1159c84b43ab0e6e4237e4bee7bdb5f04329cdcac51b2652dbbe12a01bdd10e8d3d4030a8139d0e5d7d59f2b37c696491194be25113ad6a66abec4f6a04135ef544d48a2f0a6bc87788ec5ef0f95bae585cce591995d1c8afd6bf4c3f0a0fc7b7887ad975b08a3f7a100f12c78a15a6dbdee3cc4ea2315963ffce074b338a062142d487ca94efe12e1f433a0e068f3ae5f612a8cdb380f50ee7ec9875f6c69a06ef4666be1d728a1401598f85f9486b33be6468bbbcd2f10bfdb10e597c92fe9a0a740577cf46233bf99950cb3e6ba92176487f25681c8e84a8914eca45e1175aaa00bbaf0798fd9149ee63dcf80d7f072a854c7c656793777e41ad8c199951dc608a07e767c187be0db6b5ab4a4ad46e785d2bb767b2bdcb56799e8ae082919705765a004c1632b7f2818b4b6b60baf1ed099d22c5aba9adb2ab210062ac1d86de2bf2d80b90154f901518080a0ef065064bbc9a15027d8a5a17e898372301b2e6c4901fd7df2654af675c0d36580a0fe020618972b3d1656ac2e543b9901ee8d9bcee121321159d183b5680027655fa0e7a7e584af196c0dd60366329fee34f8a47f160e8bb21f8502523e7c14f7fc25a026ed2e3be6397c593314a4867b42a89647c86a7bdb5af2ef482b6de33632657aa0d7ea1e0a709e8e4cebb35f36525301e55290783371258a1e0410318db6f408c2a0efdf0687e3c1a2271964fcf2e7b3342950b10216c95382de3439bfd0da9159b180a066bd62640c614d577fca30fa7f4051b904a100ce2dbbf44c7163c8c96a2b5e71a05358928b50db7325b4fffc80a0e1ded6eeb821114b4f457fb79eb86c1878517f80a0dafa1730c3a97177baee6b64eba01291871b7652600427a06c4d3917113bbb16a06622f7619635a341457705a8c5ff68d8bf5327ecdd65b8828cade1859255fa8f8080a1e09e3ce9fcb786c2d26fbf130a2230be2f7a6b5215d7a97a5365dda0dc161060010000000000000000c001a0d87fe930794bfb2c89d96871246c40ea8e4fba82811447c88130ed552ee51eefa075b8c46cb6dffa4cbb8abaf7dcc176325c0f005f73a67eda08e7d28b93397b69b901c002f901bc83028c5f0c8459682f008459682f018301e0818080b90160608060405234801561000f575f80fd5b506101438061001d5f395ff3fe608060405234801561000f575f80fd5b5060043610610034575f3560e01c80632e64cec1146100385780636057361d14610056575b5f80fd5b610040610072565b60405161004d919061009b565b60405180910390f35b610070600480360381019061006b91906100e2565b61007a565b005b5f8054905090565b805f8190555050565b5f819050919050565b61009581610083565b82525050565b5f6020820190506100ae5f83018461008c565b92915050565b5f80fd5b6100c181610083565b81146100cb575f80fd5b50565b5f813590506100dc816100b8565b92915050565b5f602082840312156100f7576100f66100b4565b5b5f610104848285016100ce565b9150509291505056fea2646970667358221220742032b41616b8327709dfb5fc72c869f14ac9c19bca37e028e4760e9f5bb7e664736f6c63430008160033c080a07b32244055b1189a53efdc8dca26cfa9f512346e5820f5ebe50a957114dc93c7a01eeddb7c3e4ea4040c13a676315396e6d8f812ff50cb522e13a873fefacc0d86b8f602f8f383028c5f788459682f008459682f018302b74f94e4142f00c56d5978a2c9a1bb9c584910b67a626d80b884fc6f7865000000000000000000000000000000000000000000000000000000000000810c00000000000000000000000005a86b049abc5b8291158bd5289a4442c8ba60a700000000000000000000000000000000ffffffffffffffffffffffffffffffff00000000000000000000000000000000ffffffffffffffffffffffffffffffffc080a0fd5c50c36a3aa0b5965cc9061ae886c297415f9002bae8bf1dc5603d53d77f09a01b0da0f9682ce22c1c43a526746bd3ab3d9c64a57a6d66cd117e0daa47ba4ec0b87c02f87983028c5f0a8459682f008459682f018302798b94a198a1bae026d2bec0ac782ee9303eeb7f574ec387038d7ea4c68000841249c58bc001a0022c780be10d8f1797a9f1cd69e9f9af8e7babf95ffea441cb6214c06382b95fa034bff4bf931f2275c64f58f4645bf32ba830c84fbebdb2458ebc58a3073bfd9cb8b502f8b283028c5f018459682f008459682f0182d20a94e705498492d0ae94ca9365d395d2c6924f24f44580b844095ea7b300000000000000000000000010007777000000000000000000000000000000020000000000000000000000000000000000000000000000006124fee993bc0000c080a044ca0f5e86ef77c9c9ab153b6abbaf1f49191efd55aa3d468a464a729217d74ca05ed87287e74ec126878b5f2eea6643734cbab29d268f5371b1d79f6078855ee6b9039f02f9039b83028c5f188459682f008459682f01830370568080b9033f608060405234801561001057600080fd5b5061031f806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80639c4ae2d014610030575b600080fd5b61004a60048036038101906100459190610231565b61004c565b005b6000818351602085016000f59050803b61006557600080fd5b7f55ea6c6b31543d8e2ec6a72f71a79c0f4b72ed0d4757172b043d8f4f4cd848488160405161009491906102ce565b60405180910390a1505050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610108826100bf565b810181811067ffffffffffffffff82111715610127576101266100d0565b5b80604052505050565b600061013a6100a1565b905061014682826100ff565b919050565b600067ffffffffffffffff821115610166576101656100d0565b5b61016f826100bf565b9050602081019050919050565b82818337600083830152505050565b600061019e6101998461014b565b610130565b9050828152602081018484840111156101ba576101b96100ba565b5b6101c584828561017c565b509392505050565b600082601f8301126101e2576101e16100b5565b5b81356101f284826020860161018b565b91505092915050565b6000819050919050565b61020e816101fb565b811461021957600080fd5b50565b60008135905061022b81610205565b92915050565b60008060408385031215610248576102476100ab565b5b600083013567ffffffffffffffff811115610266576102656100b0565b5b610272858286016101cd565b92505060206102838582860161021c565b9150509250929050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006102b88261028d565b9050919050565b6102c8816102ad565b82525050565b60006020820190506102e360008301846102bf565b9291505056fea2646970667358221220a71d5a9a218e95ca3497fa6386f47ea2b029d6d42856bbada9c36b76871b66a764736f6c63430008140033c001a019845e58668ce0093391fae720b99a56551fed63b5ded7a25149a7602f344124a02d55706906aca5d4fc089b0c982f544cafbb0737ef78fe30c7a3e1dc3e9ddbddb9025f02f9025b83028c5f428459682f008459682f0183021193941000777700000000000000000000000000000004872391121724cec0b901e44c1888bc00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bbe90d68d751b985695aa8034f9817c3448688660000000000000000000000000000000000000000000000000000000000028c5f0000000000000000000000000000000000000000000000000000000000aa36a7000000000000000000000000bbe90d68d751b985695aa8034f9817c344868866000000000000000000000000bbe90d68d751b985695aa8034f9817c344868866000000000000000000000000bbe90d68d751b985695aa8034f9817c344868866000000000000000000000000000000000000000000000000002386f26fc1000000000000000000000000000000000000000000000000000000000a1fa763cec000000000000000000000000000000000000000000000000000000000000222e0000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c001a03c7de224aa9566951deb1b1a63743a440664d05bf41390e4fcde1e82716e5605a076c8f70a60c8664ba7e9d8eca5ac8f5d490955c7613825474ed08650ded0b4f6000000000000000000000000","v":"0x1","r":"0x21c50b8f718d68669753a96e233f9f5230f60def69d7f17728b3ae54a87ecc00","s":"0x63557f6f7ea2dcd7f8faa6555042f4fb6e481a7c69f90330784694f5c050c413","to":"0x95ff8d3ce9dcb7455beb7845143bea84fe5c4f6f","chainId":"0xaa36a7","accessList":[],"hash":"0x1bf6486a048a2a2ba8fba9be33cbd4ad5bd1e14af4fd69607b9e7fe77755ed3e"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_62.json b/common/ethereum/testdata/tx_62.json new file mode 100644 index 0000000000..b4d73ed705 --- /dev/null +++ b/common/ethereum/testdata/tx_62.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x4c96","gasPrice":null,"maxPriorityFeePerGas":"0x3","maxFeePerGas":"0x185c16f","gas":"0x2625a0","value":"0x0","input":"0x10d008bd00000000000000000000000000000000000000000000000000000000001f1b0c0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000126000000000000000000000000000000000000000000000000000000000000000203952ad6cd6bbcf0f378f3b049bb4b7d5deba8e627c27ae5635fecaa54e85b751f499cfd8b9ed8d9e36c14009e13711edd65fa9137775f1f9d6174a5e57d7ed491612d5f030fbe2c4466e35c2adc08845f627f7397c40d6de1c08368f956305e9abcaf7214d0c360f43f882ab6146c37b2a806ea7224b5f19f467d7b0aa834dff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083efd3ee9278cc7800e93e7f9a14607f5c331b3e00000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000112200000000000000000000000000000000000062f31a2924cfa33714fc777561f979b0000000000000000000000000000000004668e7c3a46aa6789a366fdb833eeb6d000000000000000000000000000000000000000000000009620d98981c42b2e700000000000000000000000000000000000000000000000ef5a1c18a685e263c00000000000000000000000000000000000000000000000158293180a5f25f0f000000000000000000000000000000000000000000000000000095d977b3c41e00000000000000000000000000000000000000000000000dd2ef4c2033c5357e000000000000000000000000000000000000000000000003a97d568d075ccda40000000000000000000000000000000000000000000000019f151aaa335ed2210000000000000000000000000000000000000000000000000001c87028a067c200000000000000000000000000000000000000000000000c76db5ddac61b77d100000000000000000000000000000000000000000000000bd1ee709729a0202e0000000000000000000000000000000000000000000000086b1af9ac26025f640000000000000000000000000000000000000000000000000000007f085e1bf0000000000000000000000000000000000000000000000002e731ba25dc55f7a700000000000000000000000000000000000000000000000f002c30564cf4474e000000000000000000000000000000000000000000000008fe3c7505be2926b40000000000000000000000000000000000000000000000000002d2d99067904a2ec0bbf552539264e20b35f95ad35f99a7370be0ecf58e9f4d245833236ce4dc197fe17d051af75041e5f9cac1faaa414fa53c8b411c5701947ba2da1f64d6ef292a573b101046bc178d3ccc343d76d08921abb7c919151acae43d6026bdbdab0a5ebf130a3aa96dfec3cbb6d92ffca94b8650e91293e22869e68cc0855d83c309af4572f116b1872f79708463d735cba7c430bd2e20d8cc1eb5a7d6834a5a862d957abee459d479417351aaadac81e32bdfe11fdf16e3bbd1651f627b51d1a502ee74ee382f2a71a8c00ae0b2efaa758e52f10cfec31c045714b689dc0354dc0d3013078db0ac4393ad3cca90c46d20ad759e62f5c3df0c8df888c92ec1d78922cc6ec38baf812750a63b8bf8a6ce53129f5c745c1be0f5713a4ce3443eb96a0db399be1ec220977ea69ef5b566e9f62e7953df0d266412aa068ce77cb379c82318707fc8e39f72aaaf0c21f39eb6eadd4bb0706b3b2804c25b1efd89e6eb8a2ace01c9a2d3eb3145c03ab0cb4f1acfbcf1b42de72a20b775cd6fe2bba4a4b006aef089324021199d152661f4f71ba24e8857910463e76017d0652effe69dd12b9a17166bc95f69149e5b3b1ed681a3e01362b936331c3acec4f196b27f65532801516e5adfb1ae3b117d751db9732f081523de676138c324bcffff66ddefb42581dcfe6db5a8f24a1f7405e69a9eb1b2c2cd9811893322e2e54a40d54d33490fe22571b68660d8092fd05f40a58491171f64d8a4cf57f0014139b9c33a8e390d13668b0b280204082a84b73df859075a95c5500c99957f3d92ad90d6d4cf0104a577d7d703eedcc6b41b2d9d942aae26966760d79295b87c3c835367776caa14ceb41eeb0466caad8adf9895fe0c7eb67c31cf862ced44bd16d95e3b4ca2452379650337ae3940fd56043b66a8c9d18c52b881f49c8146545f2a2a45d714c200d19d531a200ddb23ac6670c82687494b6c39cdfae32d497c1c15ca1899c4e72ff6266fb8f69aa761703954e1074af871187af838d4b242510dbc40ef7831fe209d9a29fb0ff0526e4782bf6c41648736c5d9c300ed6e44c198bf72c0571e871cc60633a72d3c3d2c079b3a69185b3bdc50075b4112e9a1de495650387c77f5031e995f667bac9de020e24db47ed887343a5459fbfd196ff81b1e8b8eac708c0f34f096998486fca6fa4409be833ee83cb36b30f3ab53355e87ed471c57fb840f5728d385a55546867b91134b8f4a1313768424995dbeb6f29dfbe9003f9f0415ebcd630f056b38ab22a2f54131d231b3b9379c6cdf7d9564c1066fbece069e2cb717bf4c53fce32ba3b481f21e047a25e9f2acb0ed6040a6a4bd2e54bc86e41dfcf5bfc40a7cc779aa4071b5bac672945859fdfccc5c0cf9a41112dc7264d529840c66e6916290a3a709db6bd3b69dc2fbdd9a1a7af27cc0bc9de8334d4a0e04272f373cf53b7a528e642647041a6461f64ee0ef995b6ba691da7d5c35b211182364f32bd699d03f797ccdb2cf2dfaa71df71ad404ebda7af475cb1696990b17b58a5d522ce2dfdf7839964cb78c5608590326af24b4528bd2f22f752cf8200fdbe2320bbe350c512532f6bdadc4503bc71e769df337c9bb550014be4bbb512fa87793ee42b1688bd815c80f33f4ee5d4cf55dcf318a8333726995f6e97cb72587ffabb2a3ad690d20736754a7e280f402a0ac46c875e235bd66222e7c2fd22424a9546d34cf2c41c3d28ccc70dfdfd2c6e8c27c5c2ff66d4fedfa4967946e25d5ae26843b2f4a443e0dcc2bea7a332e4600752b0c26c52543fbc8baa9c784252bfb01d98dd5d2b92e8f6b703c4c5cf9af7315b5947753228e0b781069bcab1f1ef02621c34c182c16fb4eae6912934aa396fc4316972e833cb5b66b26b8441d47d6469df5bb09f555326ad2d3c5f37d25287357747ab92575c7753f8c0e9100c1513dbe0d2fab4a286e6b68098a0e41032b04469d845d91b412c8d20cfed91d13870ad8e865f2f86fe4483122ea0ab3a608273fcef4a0e42ce651d52705d613f61c025abed3395498219573861304df39660c664807d51b41d04f5ed80f260a3d5a1ca7a42763835bda41fb1756a85b6af0efb561b86ca0f9848a4f8b0028171249a35c3ad396e0147592822e0318f2204c753eb03184aa517975fdcab9cf224989303e21a206e5dea4ce4bfc74c8d5703ebd6c8a8f7b5f2fecb4c8ea68172c9810110dfcc1b4d724733384366c3a318c8c230427428ec3c95edc75698eb11baf3e81056fc61ee43e2bbd0984541b07ed79b7be64432e3ad9b4f1c5545d3001adeabb9e04764d20024fe7e3640c9d9ec5fcb5bd6710e8826ace07dbe9549a2e465a6f5e6695572ed2738f58847f08ba2ca4d24b1daf7b513789bb567398de157b92f35bf0d6e282bf21251898bcea29100f3bb4d05904131ff6c5cdfa1cee1b97bc4fab6907b9755d30940cbe51dfcce0ea8d32676aeb6288dc9387691ada2cb8b620d0666a400c03eb7b6cef219c8c04529c47fe9a100e4f1ac15605e1110d69c5e3dab5283a4c8f18026ebf3a2dc1fefec294f1c711174d6211ddf6bbbb0c91008a7896ee3ed9f131b67bf15144e44559a1433b65e15663bb3ff52e19b4256bf0ec0c93c64059059165b9cea51c3963f0e8f1eaf09a2859dfe050fb30a31f25d616a2526784471c31e7cbb03c5a8a8836979e7474bfb6c7169c9be967af078a629b3cc719997e44afa29bb5f8fef477d52edbfffc65d381cdccb40c4ff50e1ed1bcc2480a872be104ba88e1cba61d5a318400d554b865014bdcc254bafa089827f10bd95b5b133b557f6066a3f087ad70861bb6a2f789c9ee31cd86ad4a14916120c84c9cce034cfcd8d9c2720986f3bf6d2d7ac332113561ff8e53d9c72c1c735c72dfb938ec4c27b0f5f5a334862e250b9277aa0416c1f9b0f729540005f6042db29e987f05a9cbde1168619828052b0bc8d79310569f20a2210d338c019c37a7d9ebd6c9d4cee18ae83da6d5eaf8e6240dea601bf0203c299b9f69ee243af152ba9642552c1b2093b796808733dd249803333834ba9a656e36a07b2c1d298301986f10f3c97155ebd68ccad388da49fec85f5f99c4be4cd0921e6ba220059b8f28a74d644f9419fcd4127ec2b747b766f320778b881dbd32d8629b8c27e7036eda8c650fe761191bb435140a544e3a4db7540ab485b91ca090db17f62e2114af572affc49baf225dcd86728a5b62ff301cd7c962a4fe512451a3ad912b32a815dd56ad7d5340d287e6b2780ea5567a7316a550311705923f3d064ec92ceed74a1076ac8786c593ae54400c7de7a6f1782d3bc3ca837faa55f2141fcd2c5cde43bf264d4590d73e37eda2aa2a14ff82f2a350e6a652f2f0983ba5290a2443f0fc2d38dcc891696555304493f56609e03e1688eeaff1af3a81b212b9e80f85e1121dadda7d22bc0e391f3f1b9ceb8cbea938b68b8ae57b51269137fd44262039ee8bc040dee1344a1591614648cf43d04dc79072e4df178b1624610db013cecbe1228251ba52a1bd4f36589b9fa0b3c1547b1887dcfc7574c7b9e2b8b0128e7626cc5de1177291b777ceb1be5154965f1a4674159999aa3c0bd4d50b1c2e2ed87bbcb12e201b3da00c4610534e5379419273d761c21acf4d10250c26181a738203b365c4bc5ddc2973299ac6af6ae9aad46f4c079b9b7f72d48354286c0962cf506713a99a6e9052c87e9812266441a5a43c0e5e6b5aa0227d26f7c2241d01fa4cd0090d951a8754220262ee315220801cd45dc4aee3d9b8df1c4e453427c4d452e4e023b29d505a33867deda169c4e1794196bc02c71169d5ab109bed23f26f1d9e214c86068b77ea98352f096b3f77b0658af49f0577f0e80de376ce0482ead8fac4c26fda3d634a2bf3883eab0cd625f10b11b51e2993ee44ccf8181d92f0b6f2aa56b2a54d24ebb60c497325d6a48b4d7207e134a0244c40e5b5ac235c40900dc8083d382c882a69b4441295c494576f2bea7cd5f4045479b6154822f5c3cb7b1c322588c376bd06902d1bca7f31518134a13fec978979ac0e7b94252a8954fc62d32eddc5cbbef47b71d6f763a5eaede487cfac4a0804284228e612f4a88cf10fb175a0283cd0b9492db047f17d42ec442c9ecc42e43963363cbf29f6e0db886c72487d030da8124d962338625e6dccb5a75a983f1cf73ce5fdb610e231c9928cc1ba101ba53552ffe4dad823b67f7e8cafce89d06f8036b62cf80ae7f5c78f29e2c22734332fccba21d9a8cbb9fe7b0031015a72f3d3a3fdda622102e4bc5644c9c9daa88e620edea485ef168973b92fc8336b4a99d464cff6f50e3f083979ffc4c69457329c24deb9c5b4f0d65a2c648c1cfcca5f84878367cd2233496ae49b9c750334c8c2ee69de56134cd51216c7a63f78a19d012bc0e8ae202be6f08974cf614878bea680f35a4f22802a2cb1bcc639d1c378d292de45dd20f18a81d0e08eb3784b6975f8a9c6c6f9378dc1879cbdea70715d2ed41bdd6a065782e597df18da0a89271bd96bd37330f01f6f8e6793ed2e897d650a4028cb247f3cf49bc923978b16fe7e1337f8287ea14d1265cc4307e93fd318aba94b952d4a96756f9431cc8e7001bd0e14921a2134937f241a08657a8dd68f490aa5a60e125a5222831aec2498c142db0fa5aabfd3fb5f93cd0b4588340fc0fd2265f60221496e53802e64f7f40b0c825fd1abc535c395a104c6bde883b2bfdd44218008ef25f43ebbcb650f2a96a6af410d514830e30682adee27a04e9366f1dd2f2d2bdbc9e4e1c50a7e6c5ada5a7dd29225366f3162ba7645de7d371fa89d05b81a154e1b309478e759096cb5f88c89cddb1ae1fb0eeb12282cbf30c07e19a86a911be797e9dbd7e82c93c26a9e0da172f5059ba19ab9cc6dec158aeedf4cf1328a1c1e3b19be0f9cae07dc9d5ca18f7fc52d6b06b007f046a9852758c61db523f4033de4c1296d3cd3407dcc54dac5b1c106a501a33fbbd7bb9e122883ee053cc021d72c655c09054cef5693e2fc990de7fb9d5733079719d7728e19615621212728d1ebdd94dd49eae77f16862fd6e22831f7ce1260e26f6ff493624b5f5817f91ce182438761d1ff887a0e2d5b143d4264d7fc250c425e8bed5228417c6af1ac2a3bef570f416938bd59c64723571ac326ec1424211f61f3aa62fcf07036083d2b5fb294cf33e6dc65228c6a0d77daec4756f39423453cc7dfadc694cea0ed8010209fbcaa62e72d58330da92a4ff54e59322366912693715451aed64401b5620f9a8375eb16853851b5277fe1dc39ed52ad71153be843f18b965ccd6ce90d5e12ae1dafb6d2fd4ec45a4b186ca85dd9236a0d44a0946769d9880b6cdc7db2db000000000000000000000000000000000000000000000000000000000000","v":"0x0","r":"0xa77a2c72c25cbe80c339356cf146bf5e6c66278f2dfb0c754b0cc2300e9409ac","s":"0x26b284acacfac9ba25b13b2d8a30369413fcf68c591d311a389982ddfe171c39","to":"0x95ff8d3ce9dcb7455beb7845143bea84fe5c4f6f","chainId":"0xaa36a7","accessList":[],"hash":"0x6c525448f5d4bd2483992b845f0b76e617edea62b7e56703d4a4beadb77f65ac"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_63.json b/common/ethereum/testdata/tx_63.json new file mode 100644 index 0000000000..255e31e3b2 --- /dev/null +++ b/common/ethereum/testdata/tx_63.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x1f4","gasPrice":null,"maxPriorityFeePerGas":"0x3","maxFeePerGas":"0x185c16f","gas":"0xf904","value":"0x0","input":"0x0030c391d92da86ad948a47ed04f33a4ec000000000a7e78da8cd7e93bd48bdfc07194a52986165bf6484c9825c7a02ca9e8cc30619450d6304c49a4eccb4446d64988308ab2874c08195b8c7d4da20ed2e084b13693f5bedcbfef79fefd075ed7f57ef259aa715c1c2cf5afc4b873a1e6d2701dc747685badbc392564f36353994c857774b49f6907d28c84c5a8520bf2c9302ddddce5baef67636812115d3af2859acdc13c321ece37840a6b90b847b728a578faffc0749f269e7d76c73bdd20b803898beaca6c513d44650ebf4f8f38be0803bd7f8f84c5c0a8faa14f9f20a8281376018e66f76a050a9b4ee3c93b7eee33e5a6de3e257e85e23df02a0046a038a45f051f9dd2f0227eebb8dc777d23c738baf5f0b05e9efe9b0d2fbb58a0416b004c68e3f5f97ae14de185d9f2a5ec4f7f7f7dcd7c8c3df54c744883839a98ecf41b030dda00e0bab09039973e367fea7a0a1e862dceeebcd61cbbe6ceef7d391e0a1dfe2c80020dda01208b840c0896b73d33dd46391febaad26b94eef924e3563927cd843c0b77d216030dde044037feb3a999557ad0c51443f285cecbdda5ad15acf8d18bff84cb5ef2b72efa280f1a74004053c490b1e3ced9e905f28c5499b07a3c2ef2ef4e9c366373f27edcd47769114f1216739aba50e9667d2b441c16aa99e40ca1d396cfbdb89f397e3a716a5d0829b33a870edf039d00f0d8ebe472e90a7ead46151dcadcaf778f0c0f75d06e639fea4859289ad732b68441832e00d8d233afa6b19cf065de6ad36cea305ef2f11d5e7660cca8fcf5ae3bbbfebcac93a04157008c14d62b72250a537f88eac79b4b6d6fd8999c90e298651a87d8205f0ee916738306dd01f0af0f7d7f5d324bbc62d3cbf6319acba56bd3b6153c79037d43913ca5ce8702c1277b00204ded559cbc81e79becc0e15c15af9ec08a56bd9463ed0b86ccdb390858e59f13a041220032bfac6195cfa52b3189f8609a02240822c1472e62e2283cd0df34ce959cf7242c468d2addc7bc072fde2e0f782ab7c1479e0d976f9070a9277c7a937c2bba8d997b346a0fbc0380cecebbd5182bbca4cb3117d5c175059da6892605a675c37072457b7b97a5480868f02e0032c27a3f7864d8af535dcff8cf704dc96609ce0d59157caf7b16b7989e99a546070dde03c09146199d2e3d3139f6c94125ba46c5d2c49d5359ab077d996d690481044d4b1c68d017009d643a63bd162f769feb6ebd62f831af5cdcb890c8de4d4e6af82be1ee99f3e645a0413f002cedffbe325393ccda97656a78ffe263c9b387995685571941ead8c10bdaff6a9141830f017025ef6371cd17e23bc2336f2d0aad184dbebeb129da8a3665867d56e43e2fae42c262d4a9ccaf916d0b04cd402b943bebc8e4a71d21cdc9ee5e74a546d091be9b2f841e5edf030300b03fc4615e613d26aebbf1377bb45ff2bef2ede7cbdc123e3d1ed07f48dfcefff2000d0601a055c7654387c6a6a86cc9cf8e71dfb41b5343e17c1d69da2fd3dc646bfd2df5634083210098679458e3f76b65c6d46479562ebbcb922090b524f6ca27d466b26e48f992c257d0601800de6009e59e9e148a4a105b8db156fae93f0f5f31f833227edc3202bf6657cd2280062300d0263370d8b2e486cc55d576514b4cd0f15ab4fe69c4b8cffedb07f590b5e5b50cd0e023006ca29f7043f59ee6ecc87133a7fb8c53f3a02bb782a3d93f0e11b09be4cef7f6242c46837a3abdbc3f32b00b06e71817f4b2b67a13ceff9c54f9976035121a48f3847b0fee815100a8853ab27454c2cb326594b2ca571640f035674c757f5ba8adee64fc629c1a32060d4603200fb27fb5eb52a574a362ee78c9ddaa1d8fc68b3549d5f852dd99ce0982c20759d0600c002a23695991797911bcbdfc13900b2b5edce71419ae65974b606cfef7d9f3340868301600e38a2a586915f12bfdcd2811977ed7b0a181208d710165dce53c8f5335ed0e38d0603c00be1ffd7b1baa266e46f0ffb0182327c9e6adc2d28232585b8297e208de696739a0c1440054fb39e2dc8ccfe1e2e95116736fa2c41f6486301d97ba4d9c9a8724e0b529eb242c064e2dc78808df9f14442e247fae30ecba314cb78fc9ef4fc8f03eeb0bc7536652a4f6400a008ea3b38c4fa04e5ecbcf1690b7b07f73cf1155ac22511be98e72f57336b2219680069301f049b23897b7d4b515c8eaa2adc5816f1d51d64e2f1e0a46c9ba0bfc892e1ddb9e020da6fc777de907bcafcf19642997d54196fb907ab58de84f7790373a88ea58cdc3538a52a0c1340044f0b5b888f6e0aeb3fb33629aff3d5a25a925080b215c49f780166442c8d56cd0603a001273c22a0a735abf5605f0701c888a03d3636e4d34caf288b1da7841cec8701268f005009e402e205e8d9872c7661d6184654f4e055a65adcb5d0d16a48eb4a8a597fbb690b0180475c2a81ebd768688b8252d9d31ad8772e09cfcbacc555e43792bc0cac759d363f7c02c001463bf443b9d904c587c50bb25772c224f864bba54f3a1ec2a59803a62010b35000d520130e30eb5442242ee5a2a3dfd418f5afd4f416b134a21e746ca1dd37d31736af829d0e04b00dc2dea48584f41449664ee8cd968ef8cf911efed0a1704249fbafc7cd940a9d11f34980b8035418be9ef423da30648c3fbc237df7a21f40b9e5b9e8faf8b8d3d6cf68821023ef93500aefa7a29c5df1650d594cdbffee088d193a399d8519d835ba1f7c55ea6e973afd88306f3ff1b5f2c5be27c52dece970e812a43eab113c7da8ebfb2f0398933b0ffd0e12eb50623613148aac380b5faeb7a5f5935e965182c5488baf2b021603b579af1d1b7e4bb56d2e2ffaf804200bcddaf340a151d472c76b4be88ec902d30c70eb6fa0c72bba92cf018237c0e3e010d1603e074a0a6427ddfce9f3f75baebadb5c55b2d66382ef675ca45cb32f281a3c95427d06029008698b085e5ebdd39b2a72513bdcae345528fc818b9a7a203abd033f0b1c49870d060d97f8f8fd6830d8d8b4d128e545d6655b7dbddb1c2861d8bbe440933dbaae9ba99e876d060050076054fdbc71151f85eb96bee9eb3468c0cb8c217197557fcb70afbe20169ef08d06025007a0f0f78f6141aa53f2585c354af3e781376481251f07d6871ffeab9ac59d49033098b4151c717cc06cd8e9bdcf36f73347f7a808ff439a5f728efc066cb6e27757b5943e2f91ef81e00efd9d521d559f5cf700e98df9044c36fb03a41ef7a9516e847b119e1fd290d75a0c16a00ece653746b2f2466da15ab860885ed2cfd59bb26773c29694e44277f7ecb82f61634f80100dbff493282abfde4713900ed71d50d942a486b30d0ace65f72e6764c7db3302f041aac03409c5debf416a40bc215ec179d9446805cd85db59311560b7b437bec5ad9dff50334f81100637f45971f8e7cd14cbff8b666274241fdc8c4dc7251f6e5eda0fd7caae1307153d0201d005f3497291ea0e8cec357428c74cb7bbefefedd77a8ade490585e9dc13cb435d28484c59ca14e540a6b5b0ceb2cd0734a6bad8e965c7afb6820bb17437a348a4ea3de0a73b7d9039b007062ac2cae7329753d3edc367473c6be60353a2a4145ec8cf44d17c66c9440c577d0600b00922d21410ed19e7005026c8afe63b99e4d3e399c4e4be911dbf07ad8bce1610b1afc0480065294e40be12707379294d2179906829cad9dfc9b49a3d389a40846bdb8031f68b01d009f85744eed571d78667ec568a29eb1b68f77448991107cad65eebcedc3756fd130d06007fdff020000ffff46cc8fa901","v":"0x0","r":"0xbf14035f3a2345f1da583669cb98832f66451aab6635f47b629a4ca234aabe9","s":"0x3132a441e649465222344b73e1e20759a604fcb3b3ae78883d1c5ff86d281ede","to":"0xa422299831ff219c7883c1b4f3cf57c97a946c32","chainId":"0xaa36a7","accessList":[],"hash":"0xe8846e616cba0be9290b702bac7d8a97541391020dea68bcfb360c4f1567ccb1"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_64.json b/common/ethereum/testdata/tx_64.json new file mode 100644 index 0000000000..c6a9ea37c3 --- /dev/null +++ b/common/ethereum/testdata/tx_64.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x3a1","gasPrice":null,"maxPriorityFeePerGas":"0x3","maxFeePerGas":"0x185c16f","gas":"0xf734","value":"0x0","input":"0x0035b51a3b1326b8b49e8ffeaaba9f3a2f000000000a5b78da8cd7f937d4ede30670d5a341b6222ac9be3532a4896c85ac338c254b42c82e917d0b194b333cf634f6917ddfcbc832594246b6283bc9e061ec6409dfe3fb79fbfdfd0fbcce7deeeb9cfbbaee3a14d52e125f63b683c9268d4392ee73951ae343ccb14a060e24db4061994e2d8cf7e8f1111a89b8892f2cc040a56473d61b26e5b0b5574348323c45f0d657676f383e33632c22dc4685dac4973d22fe0f14e7adb10c3b8665f8a2680a44f8321975b916041b365e5fa3dd3c1fef94efa3041a3404c00319fad1f6fd4ea7a8ea658217bb51ae3d1645293092b65d1a5e81df4ca05e070d1a03a0f7bfa266362d73c29204be8cc2203bb59a5d82a14bc9fb2bef2d63d35625826ad04804147f3f282152022fa9fea710556b9abdc104fd8d3b9bcb213f1c6fae704e00c25b72029a00a021cf8745452a44534511694377af5df51fa74d28dedd8fc765f96da068ef796ed0a02900ba32d12a98bbcc7ea616e02a731536b77aa3e9b5e8de93a66771aed5343139c10834680e805dcbdfa54c0536335321c44a08859a7bfa5da1ffb5b2dfb59bbedfccc5a383b840831600c853b47bc9bd9f57cc31f17ab58984dc443e7ef7f13a3dcf82d291bbd0b05ad605d0a01500deb396aefba345f1bb5eebf56f4eacc686787ddc9df63681f34eaf7b5ab2e760a2a0416b005cf694c12a46a2938ae1e36f3527ee2f0edfc15de48017563e9ec6c493866ee8a09108513ca5c6ced826f00a34081ef78c8e58bb2e9fe6993e2e1afb6b9bf1f68dcd45e9d727a02d0016077a4f24c3091382c8ceaa3762f5eee5a595cf98c50edfa4f757b7dfea5cac010dda0320e9f3c19c3099fde5650f818208d8df844d1ced3fd90c16b0811fe718e21bc2c9a041470054ed6983291e2a6cd9a60c4265ee9922239eb8b70e2f084fb56a0c67f4f27b6883069f03a0ff4cb1c7caf76fdb9f6a8bd40d71245ef6b7a1ea393dfd821f260533a9d6baf941832f00d0445887f04c615e8f7b6424bf5dc25a5aea2715968f7f48db597527d472637b0a34e80a80dc9153563869f32c5ce4dd088b109badf98fe5b8b5cbd70bac69d8d85bdc2eeca391885b78ce3eb29b78c961a55f02f7fe79ccc26b9ee6abd68d0e5ff2136dde74907358c34f403700ec76511352bff080e6ca25aeb9f66965694b29989ce9c3292a1658b61873f07c1468d003005739d6b6cadc1fa16b73ce3151f75368c3ab532a180f421fb1745c900c0f24d68306bd007031b75a95ce9571bf1ea6d088fcdd857b68b32fbafa7c52fd158693ffcaba240368d00700271fc50a314ea10e2f1b9ed5ba187ccdc9aa264ce055ec16319f701dfa8b2e791a34e807808d510f053e9a158d4a5f26d120ed1233b99bd9623dc9a6c60a797099d0b0c11ba0c1000074b9ef3d5d5bc156c3bd74abef1de747de0f01733f36fb3ef7459a235a93ae9aeaa39108313c7934ac83e200f73790b45f6599f972c4089fe9e995ae8105b0f499a731fa3c3e01030170901ccc2c96d99f914f2848e73b72f12d1dc456fa072f69893c50e983afe4f88106830110aab5b16330fb9f4bd23886268c9e309a140f911e99fb754c1fcf79a925b4c91134180280e12872030d764a45978ae5f89c6ce13af94988591b2a70b07f92e3b71ae1731768301400c7120c2aec05097f4776b08ba993559c086b76e1979d35a807c1d3bea39bd820d0603800aa20579f1d64b64152844214b6190ef24a1edb098b050dcaba3cc8d7c8d6386a050dbe0140de5cbbbcd48a29078e28ba8a2ac859fd0597e73c11df25e465ac741ab3ca4c78d048040c2f9a52d91fe64f828aefaa15f6aefeed8d519a9b11f9cfc1e047907fad93f8cbc113100b80c21c34285555a19219258cd8e33b677ebeb7924059fa38be28761e309ab8f1be123418757a42a4b1dff4cc3bde1d5e7fdf3213291d3636d8451494424a8f5bb05b48f677070d460360a49accca9ece5069ac26cf71b24a5977831a25645f7fec86f5ee8f5a5f65476ad060ec69283f361b19e02b4f66efacd1b27b793ba48675f31026e2b267aa7bc2eb6f91ee8206e30130e78a577d5ab6eccd21faa0e6639636dab0294db7b45ff7095f4613a848cc6e5da0c144006c6555aeedf1f17697aecbaedb895b4d178cd8d0cf94d4f36ce91ce261487eba8a4622c4f195888bcc9e330cb72989c3558a24b321e2536c417f4cea4b390ff147f1f349d74fc0a4d3e550a5ebbc96a1a434a11ff96e3c2dc2acba65eed20e2d2442723b5e6ebc24cc1d34883b7d1cf2d5f386390786d38bd8f4f8fca20eda64ed56624defce0cd3696fdc656e7a011a4c39bdc3299387e8861722542a4dc80df93a1df20c6e035de7f625c252c4e44587402e68300d00b59b09ac7d55bbd5596c623f67e04f065dbbc67e407d8c83f4ef353b971b367e050d660060a6ede011bdd15fe4cb7d62f2ccf7919157bb2f6b07b9a9d71026626af9228daea0413c0026c45486ed31f493221e0b30eee995e514382a2294e878ca9962cc420c3abcbfa1910809fcb472a3f4d69de712369c9ca9bf15242d760547d7a92a09f1e534ab05286362d409f81e008f7be35e5f2c4599eef045377e3d03ef5be6846c8b9bdede72ff15d3593c3d06050de60020ffec58c6d54e24edcded339bc86eb9e7c9f331019be6ec01ab1415c93ff7c61541837900c8ee2275e98f9dd24e9ba3c945b16df6d5beebdd8bf2769fde1a3521f50eebe46c4083050088a6647f2f83a4367d9d0dee90895822fc21fa971d2e19604d26f7ba84e6542f83068b00d0a7e35774641a136e65f102a5908c69be32e9b3a43b5015159eb299eef5f4272f68b00400131d7d5f4ba6e5c7f98a6b0cf6a7e89dbbc262c49dd7d2cf42ff0ec2de907bf96463dfc65b0c188be5357a70dde25c87428318f11b3ecd7e87399c5d4d1ea59352712bff5f01650068f5946da1c31ebbab79917face9fafa6d4b711526e5a3bcc4ae2797e63f91b5b0a0c18ad30a2058e4d845db6ea3bff1439d74358c2dd25a6246488590557bf3e68ed2fa6ad06015005e72394bdbe65b1f4ed3870b60bde5e7a863d67f5e3fbcf5ab97495c74bb711f3f68b0060089d1cd9ebef1cc96a1797c37df486d6ab0c9e2ed466b4366955939c7feaecbce83063f00a04397ae5c79aaa84f604ab1c3962eadf255ff3fef6f3c0b1660d547f42921db6c40837500a84862f35c68ee592cfe9ad18672821aed61869cae099d7176d6dfd812be49dd8b462224f1e314ed416d0e7537df0e4bdd04daf3e8e1a45e56ea8183b6e36efce13aec6af209580f80870a2dd7b42293b176d7982a66e3bc26893901d973ddfffced6b5fbdc6209f8d030d3600606c74caca9725a6e9cf7a1d439a18eda9651839af80e5f7656be34ff496a94c5ca0c1a6d39f144666e0831ea326634546195f129177c45c581a9eee328d16d5fe68cf91df011a249ea6ac82c9755d2bbab0a81a82ac395af1602669fb042f8a24353244e3ffcb563c040db600a0a0ad98f31a9eeec5861026ab81ccadc91b92a50fb947f584f84da0b3cbf69d3d68b00d002bd393e91a5bcfd42fc3069465632d27fdbd8a4482c58b74beff4b627cdb1c6c8d4622eee0a76b98efe90dc9508859659f0c584b55cb4307327b11e8d011691cde26d8dee404fc02804d1fe55921825c1443679f6576ab33d3afb46e3371c1bbd5b1470baa6a7b575540839dc4ff0b0000ffff41dc658d01","v":"0x1","r":"0xd687d7f0ed92f37420849afec1bccfa7620d0b131e08e05ca60308527baa8588","s":"0x3d6fb263088c0f1e0bde4aadf6f0fb046aee81442072e1362e05ae8b752132c5","to":"0xc8642ea3d7890694063025720a24998487f4aa55","chainId":"0xaa36a7","accessList":[],"hash":"0xaac7a255947ca82219c97fbf516e98361397343879e13a2d8fe10589bfeebb81"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_65.json b/common/ethereum/testdata/tx_65.json new file mode 100644 index 0000000000..b72f08f8c7 --- /dev/null +++ b/common/ethereum/testdata/tx_65.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x185","gasPrice":null,"maxPriorityFeePerGas":"0x3","maxFeePerGas":"0x185c16f","gas":"0x6f0e4","value":"0x6f","input":"0xb6d5a39700000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000a0a2f3e25048e36b07c23b01a4078de3807df9b5350d45c35099a626dd9b0aeca40000000000000000000000003b6c80a61b3bcc28b1f0d0bbf4d9d443ccc1d6dc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001083000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000c6f13828a7ece706b4e4b34da4599ff2f1569bad000000000000000000000000000000000000000000000000000000006592b5cb0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000004104a2f792c745930e1d3e4db03b5463febeab0be618b147ba5b68e50cddf1586c49258781ea8144a150fbfa1c3c6791e0a515183198b1215c8757e0531ddf3af21b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001083f91080b90eba02f90eb683028c5f82e4db8459682f008459682f0283097d0d94100077770000000000000000000000000000000480b90e44ec9b3121000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000af1170000000000000000000000009f1a34a0e4f6c77c3648c4d9e922da615c64d1940000000000000000000000000000000000000000000000000000000000aa36a70000000000000000000000000000000000000000000000000000000000028c5f000000000000000000000000748b2d70ae465eb1e0f2782f193bda2f139ca4010000000000000000000000001000777700000000000000000000000000000002000000000000000000000000748b2d70ae465eb1e0f2782f193bda2f139ca40100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005dcaa8ff1e8e000000000000000000000000000000000000000000000000000000000000222e00000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000036000000000000000000000000000000000000000000000000000000000000001a4cb03d23c00000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000748b2d70ae465eb1e0f2782f193bda2f139ca401000000000000000000000000000000000000000000000000002386f26fc100000000000000000000000000000000000000000000000000000000000000aa36a700000000000000000000000075f94f04d2144cb6056ccd0cff1771573d838974000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000554544b4f6a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000125461696b6f20546f6b656e204a6f6c6e697200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a60000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000004c4b3a000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000009d8f909d5b90214f90211a0f0231d089df3312accf0d0d85ce4321e74bffbe0fca5824b16b0d8700829e5baa0dd998354c60d490023bad968fd799e7fa325a517a80daae0eeb28bda723f1f11a04a848f2c74a2fc55ea88b2ae52e3f77d3d6ccfe4ee6db87aea0c01adbb71c5c9a0fb80d313f1934d56bd9e3cb23c795ef88bb56475ebedc8d1fcdf85398df9c683a062eb57f97614d88283f6a44067a05599680c5ceefac537dcf0da184eb70b73c0a0d8a1076c442e71428b52f14d0b6e7ffa73360669c19cb5cbbcdac4187bffd54ba01c6f65f2a77f753356bdcc2852a3739484c6f00362c945006a4644f326905948a056fb73be326a7bf2546fcaec1b2cf788f94fb751e80d94f2ecca4c65bda14ab9a07bc60015795e201100c89a93b1668e4d5ce2cbdf13e66ae7d2342ce89b1ddebaa0b28e7ef648140ce43217c4aa8161158d2387eaa54e3ced9a65aebec01eeddbc7a025e0afefa6ce93e150b32777b1a2e7b0bf02f1c2221f4f9b1ee2bcad302d1286a05f626d5cc3212615832a563c89e86d17285e28fe9be64db860a77a7b1da68a78a00296ba7786b26d4cdb2641325e10fada9ce30b864918706ce20516d5113ef806a003070c4963834866415da2e327883a23e60ac012ad3265a3045c63816a66f86ba0f0afabcb18b327d562faaf9e1153f27e1819a208e0361aa3896ac4a3387b957ba0f664d948975527909f07325bc7dbea91b16a7638da33c18df9f84da2449f624280b90214f90211a09586e39a256a12592acb5163567bac37aa8a640686c4a4bf23b1f1d0cf3dfccba0206d158803b20a7032515a637416a884870af1edac7cd10493baffa966c4391da0c8eb18c530565e3303c1f4f3c874f5449e4e15774242afc9793d5216fea8632ca0cd0c1edf558f472cff75a14986471702fddef3995512621a1cf54d1b909df2e2a09d88aba3e4468dd4f3920ec6f8bb892f176a507b50dc30ba66d8fcad50a09853a0e5e03cb9639a6bdbf37501906fed945121f2c4bb99a9c7a2f4b6947caec1002ca01ac67e5582b703acc3bbeb6cbc69594234a81b2b9b43da7a508e06c2e58cd3a0a07f22e2055e2c186347c738cfb4465e4481cd6c0cae6a1217c2d6256ab1db3ab9a0b96a964cbbe12829ffd64dde330275d34788dbcaa0020330c94067a8a01539a8a053f78312d185d1906eae5560c82e1bcf55d297398daf1277b094be0e699952bba0347905ea2f4a9f0f305ebebc8cd064cea013fbcc4698cf7a8d6be3857388878ea010c3967a4dba89720bc2f196fc1aa8e1e7956485638f276e5d5d744003e58fd6a057f13e6935e73bed5fa1aa98c6cd9e00c2af167f2e269a844cbe6da5e53b2705a03de7275268e877d5167510adcf6c4d37b097ebbac4c4e5be3f4405735a11ace9a0228dddecede12fc430025707a27829e5e5590c941a9d7fdb9a1d2448f27fc3f8a070bf5a6521c47a903293100900e62584d50bce35b2d2f3e8b5781ce06d06676f80b90214f90211a0f92931c169159c7a345381fc6c1c007811c21c9e16ba06d314487acc82f97870a06547b25bb229ff9a7fbd4e7289f17959be0bfe44880a5c6a998ac1f109437f72a0e6d29355a05ca71d7e9f50cf57217421297232e437b6e11bcf3470fdb62e5579a03d19332044ed1dc08e3b49756f5a19c1a4e9bee2d51663e45853c3e0858f6283a01c5466b0bc631dbce31ef952e29363ae414d545d789daf2acad697bebe8ef2eea044d712b9316c7bed423e124f08b7f7d2cfc452ce0542e57c86b6f6569fc63c6fa08ecdf232e957815cfd3d7c2b062322a4c99563971f945f6897e5b0c489730c9ca0e996fa137da52e8291103d22d94388dbcb8f3c7f94a5b9c311d35f8c05e88e9da05f94234f9b1dc2042398dcf3ed8f27a83de1796c2c40be39c496489c8583af5ea0a750434fcc66e4bbfe40091675a27ad8ea12d4e2f5f5aeb8634a44a625b0fe87a0dfdb09e31806e25ea2e1e96ade1fe9db6a5ee970630ddb3c18cfdf1f3062a603a0e7f8a771294c4f2e2fe66f660422379b42cc09d8e0daf49c5cc344c8443ea520a0908bacde172c8b74344a155e8ab87aebeaa93bed35ba0aff8c5d9544d9d0f4f1a038195c33414878ebff7581ab1a3b40790b67f81673c2d899549f5dbcb7807e1ca060dbfb6fce8794cfb9a717185c49c605fbe32012bb190881151eeb3dab6315d8a0ba8321a5b5db0ac90a425c4a2e9e189574d805c7dc3f45599a7f4e4e78e56a8c80b90214f90211a02fb3bf502a923b725bca9726347e806786b791a96d50631cf68e700941a7346ea06d5aa63a09888a769d10f0f92e48f1f94eab1c00d83726af906e4f4a1444df25a04cc168db4c9680e5b35199ec4f6b367edaa31dac59ace6edff9d02733300014aa0a5c15ec83daad5a05608be21501de42d89043461ef5aa7ff3e64d36a133a27e8a0c979bef0803ebd8ced3fdab2eac08037a0f117d38b1ec1624053d3f41b8e25eba03551fdd112c4de2252df8edfa97f3e87eb6a9e474fc4eeef3d80614ec247c17fa0d5801329ed1159c84b43ab0e6e4237e4bee7bdb5f04329cdcac51b2652dbbe12a01bdd10e8d3d4030a8139d0e5d7d59f2b37c696491194be25113ad6a66abec4f6a04135ef544d48a2f0a6bc87788ec5ef0f95bae585cce591995d1c8afd6bf4c3f0a0fc7b7887ad975b08a3f7a100f12c78a15a6dbdee3cc4ea2315963ffce074b338a062142d487ca94efe12e1f433a0e068f3ae5f612a8cdb380f50ee7ec9875f6c69a06ef4666be1d728a1401598f85f9486b33be6468bbbcd2f10bfdb10e597c92fe9a0a740577cf46233bf99950cb3e6ba92176487f25681c8e84a8914eca45e1175aaa00bbaf0798fd9149ee63dcf80d7f072a854c7c656793777e41ad8c199951dc608a07e767c187be0db6b5ab4a4ad46e785d2bb767b2bdcb56799e8ae082919705765a004c1632b7f2818b4b6b60baf1ed099d22c5aba9adb2ab210062ac1d86de2bf2d80b90154f901518080a0ef065064bbc9a15027d8a5a17e898372301b2e6c4901fd7df2654af675c0d36580a0fe020618972b3d1656ac2e543b9901ee8d9bcee121321159d183b5680027655fa0e7a7e584af196c0dd60366329fee34f8a47f160e8bb21f8502523e7c14f7fc25a026ed2e3be6397c593314a4867b42a89647c86a7bdb5af2ef482b6de33632657aa0d7ea1e0a709e8e4cebb35f36525301e55290783371258a1e0410318db6f408c2a0efdf0687e3c1a2271964fcf2e7b3342950b10216c95382de3439bfd0da9159b180a066bd62640c614d577fca30fa7f4051b904a100ce2dbbf44c7163c8c96a2b5e71a05358928b50db7325b4fffc80a0e1ded6eeb821114b4f457fb79eb86c1878517f80a0dafa1730c3a97177baee6b64eba01291871b7652600427a06c4d3917113bbb16a06622f7619635a341457705a8c5ff68d8bf5327ecdd65b8828cade1859255fa8f8080a1e09e3ce9fcb786c2d26fbf130a2230be2f7a6b5215d7a97a5365dda0dc161060010000000000000000c001a0d87fe930794bfb2c89d96871246c40ea8e4fba82811447c88130ed552ee51eefa075b8c46cb6dffa4cbb8abaf7dcc176325c0f005f73a67eda08e7d28b93397b69b901c002f901bc83028c5f0c8459682f008459682f018301e0818080b90160608060405234801561000f575f80fd5b506101438061001d5f395ff3fe608060405234801561000f575f80fd5b5060043610610034575f3560e01c80632e64cec1146100385780636057361d14610056575b5f80fd5b610040610072565b60405161004d919061009b565b60405180910390f35b610070600480360381019061006b91906100e2565b61007a565b005b5f8054905090565b805f8190555050565b5f819050919050565b61009581610083565b82525050565b5f6020820190506100ae5f83018461008c565b92915050565b5f80fd5b6100c181610083565b81146100cb575f80fd5b50565b5f813590506100dc816100b8565b92915050565b5f602082840312156100f7576100f66100b4565b5b5f610104848285016100ce565b9150509291505056fea2646970667358221220742032b41616b8327709dfb5fc72c869f14ac9c19bca37e028e4760e9f5bb7e664736f6c63430008160033c080a07b32244055b1189a53efdc8dca26cfa9f512346e5820f5ebe50a957114dc93c7a01eeddb7c3e4ea4040c13a676315396e6d8f812ff50cb522e13a873fefacc0d860000000000000000000000000000000000000000000000000000000000","v":"0x0","r":"0xfa08450b4ed5a955d987279a0b08a8ff788f1e7a22ca2a89c5cfc8489a02f838","s":"0x4a58693f272154d3230dabbe69978054f179443cd47924f746c4c9d3e51d6cce","to":"0x95ff8d3ce9dcb7455beb7845143bea84fe5c4f6f","chainId":"0xaa36a7","accessList":[],"hash":"0x044bed07204631cbc0e04f5c50ce76b1fb4d7bf6c6a181b40692429aa0b7828d"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_66.json b/common/ethereum/testdata/tx_66.json new file mode 100644 index 0000000000..ab09ff7d79 --- /dev/null +++ b/common/ethereum/testdata/tx_66.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x3b","gasPrice":null,"maxPriorityFeePerGas":"0x3","maxFeePerGas":"0x185c16f","gas":"0x744a0","value":"0x1","input":"0xb6d5a39700000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000a0257a907abd5983edd90ccab7a2586c80150e94219c53488bf38afbe7a1f7c9ca0000000000000000000000007ca4641ea69ff8a17aacb804cab482b4525762000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000165200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000002000000000000000000000000056e55cbec8fbdd71400fb1240b309cdea625e5ff000000000000000000000000000000000000000000000000000000006592b5bd00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000041e43284700824a019b62b20ab257746e3c14c9da6950ce2262bb44ed029279d8822e86ddd8c11268a1fb28920ba56522b885c30e83d3d98bdb23b8e385b602f0a1c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001652f9164fb90eba02f90eb683028c5f82e4db8459682f008459682f0283097d0d94100077770000000000000000000000000000000480b90e44ec9b3121000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000af1170000000000000000000000009f1a34a0e4f6c77c3648c4d9e922da615c64d1940000000000000000000000000000000000000000000000000000000000aa36a70000000000000000000000000000000000000000000000000000000000028c5f000000000000000000000000748b2d70ae465eb1e0f2782f193bda2f139ca4010000000000000000000000001000777700000000000000000000000000000002000000000000000000000000748b2d70ae465eb1e0f2782f193bda2f139ca40100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005dcaa8ff1e8e000000000000000000000000000000000000000000000000000000000000222e00000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000036000000000000000000000000000000000000000000000000000000000000001a4cb03d23c00000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000748b2d70ae465eb1e0f2782f193bda2f139ca401000000000000000000000000000000000000000000000000002386f26fc100000000000000000000000000000000000000000000000000000000000000aa36a700000000000000000000000075f94f04d2144cb6056ccd0cff1771573d838974000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000554544b4f6a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000125461696b6f20546f6b656e204a6f6c6e697200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a60000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000004c4b3a000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000009d8f909d5b90214f90211a0f0231d089df3312accf0d0d85ce4321e74bffbe0fca5824b16b0d8700829e5baa0dd998354c60d490023bad968fd799e7fa325a517a80daae0eeb28bda723f1f11a04a848f2c74a2fc55ea88b2ae52e3f77d3d6ccfe4ee6db87aea0c01adbb71c5c9a0fb80d313f1934d56bd9e3cb23c795ef88bb56475ebedc8d1fcdf85398df9c683a062eb57f97614d88283f6a44067a05599680c5ceefac537dcf0da184eb70b73c0a0d8a1076c442e71428b52f14d0b6e7ffa73360669c19cb5cbbcdac4187bffd54ba01c6f65f2a77f753356bdcc2852a3739484c6f00362c945006a4644f326905948a056fb73be326a7bf2546fcaec1b2cf788f94fb751e80d94f2ecca4c65bda14ab9a07bc60015795e201100c89a93b1668e4d5ce2cbdf13e66ae7d2342ce89b1ddebaa0b28e7ef648140ce43217c4aa8161158d2387eaa54e3ced9a65aebec01eeddbc7a025e0afefa6ce93e150b32777b1a2e7b0bf02f1c2221f4f9b1ee2bcad302d1286a05f626d5cc3212615832a563c89e86d17285e28fe9be64db860a77a7b1da68a78a00296ba7786b26d4cdb2641325e10fada9ce30b864918706ce20516d5113ef806a003070c4963834866415da2e327883a23e60ac012ad3265a3045c63816a66f86ba0f0afabcb18b327d562faaf9e1153f27e1819a208e0361aa3896ac4a3387b957ba0f664d948975527909f07325bc7dbea91b16a7638da33c18df9f84da2449f624280b90214f90211a09586e39a256a12592acb5163567bac37aa8a640686c4a4bf23b1f1d0cf3dfccba0206d158803b20a7032515a637416a884870af1edac7cd10493baffa966c4391da0c8eb18c530565e3303c1f4f3c874f5449e4e15774242afc9793d5216fea8632ca0cd0c1edf558f472cff75a14986471702fddef3995512621a1cf54d1b909df2e2a09d88aba3e4468dd4f3920ec6f8bb892f176a507b50dc30ba66d8fcad50a09853a0e5e03cb9639a6bdbf37501906fed945121f2c4bb99a9c7a2f4b6947caec1002ca01ac67e5582b703acc3bbeb6cbc69594234a81b2b9b43da7a508e06c2e58cd3a0a07f22e2055e2c186347c738cfb4465e4481cd6c0cae6a1217c2d6256ab1db3ab9a0b96a964cbbe12829ffd64dde330275d34788dbcaa0020330c94067a8a01539a8a053f78312d185d1906eae5560c82e1bcf55d297398daf1277b094be0e699952bba0347905ea2f4a9f0f305ebebc8cd064cea013fbcc4698cf7a8d6be3857388878ea010c3967a4dba89720bc2f196fc1aa8e1e7956485638f276e5d5d744003e58fd6a057f13e6935e73bed5fa1aa98c6cd9e00c2af167f2e269a844cbe6da5e53b2705a03de7275268e877d5167510adcf6c4d37b097ebbac4c4e5be3f4405735a11ace9a0228dddecede12fc430025707a27829e5e5590c941a9d7fdb9a1d2448f27fc3f8a070bf5a6521c47a903293100900e62584d50bce35b2d2f3e8b5781ce06d06676f80b90214f90211a0f92931c169159c7a345381fc6c1c007811c21c9e16ba06d314487acc82f97870a06547b25bb229ff9a7fbd4e7289f17959be0bfe44880a5c6a998ac1f109437f72a0e6d29355a05ca71d7e9f50cf57217421297232e437b6e11bcf3470fdb62e5579a03d19332044ed1dc08e3b49756f5a19c1a4e9bee2d51663e45853c3e0858f6283a01c5466b0bc631dbce31ef952e29363ae414d545d789daf2acad697bebe8ef2eea044d712b9316c7bed423e124f08b7f7d2cfc452ce0542e57c86b6f6569fc63c6fa08ecdf232e957815cfd3d7c2b062322a4c99563971f945f6897e5b0c489730c9ca0e996fa137da52e8291103d22d94388dbcb8f3c7f94a5b9c311d35f8c05e88e9da05f94234f9b1dc2042398dcf3ed8f27a83de1796c2c40be39c496489c8583af5ea0a750434fcc66e4bbfe40091675a27ad8ea12d4e2f5f5aeb8634a44a625b0fe87a0dfdb09e31806e25ea2e1e96ade1fe9db6a5ee970630ddb3c18cfdf1f3062a603a0e7f8a771294c4f2e2fe66f660422379b42cc09d8e0daf49c5cc344c8443ea520a0908bacde172c8b74344a155e8ab87aebeaa93bed35ba0aff8c5d9544d9d0f4f1a038195c33414878ebff7581ab1a3b40790b67f81673c2d899549f5dbcb7807e1ca060dbfb6fce8794cfb9a717185c49c605fbe32012bb190881151eeb3dab6315d8a0ba8321a5b5db0ac90a425c4a2e9e189574d805c7dc3f45599a7f4e4e78e56a8c80b90214f90211a02fb3bf502a923b725bca9726347e806786b791a96d50631cf68e700941a7346ea06d5aa63a09888a769d10f0f92e48f1f94eab1c00d83726af906e4f4a1444df25a04cc168db4c9680e5b35199ec4f6b367edaa31dac59ace6edff9d02733300014aa0a5c15ec83daad5a05608be21501de42d89043461ef5aa7ff3e64d36a133a27e8a0c979bef0803ebd8ced3fdab2eac08037a0f117d38b1ec1624053d3f41b8e25eba03551fdd112c4de2252df8edfa97f3e87eb6a9e474fc4eeef3d80614ec247c17fa0d5801329ed1159c84b43ab0e6e4237e4bee7bdb5f04329cdcac51b2652dbbe12a01bdd10e8d3d4030a8139d0e5d7d59f2b37c696491194be25113ad6a66abec4f6a04135ef544d48a2f0a6bc87788ec5ef0f95bae585cce591995d1c8afd6bf4c3f0a0fc7b7887ad975b08a3f7a100f12c78a15a6dbdee3cc4ea2315963ffce074b338a062142d487ca94efe12e1f433a0e068f3ae5f612a8cdb380f50ee7ec9875f6c69a06ef4666be1d728a1401598f85f9486b33be6468bbbcd2f10bfdb10e597c92fe9a0a740577cf46233bf99950cb3e6ba92176487f25681c8e84a8914eca45e1175aaa00bbaf0798fd9149ee63dcf80d7f072a854c7c656793777e41ad8c199951dc608a07e767c187be0db6b5ab4a4ad46e785d2bb767b2bdcb56799e8ae082919705765a004c1632b7f2818b4b6b60baf1ed099d22c5aba9adb2ab210062ac1d86de2bf2d80b90154f901518080a0ef065064bbc9a15027d8a5a17e898372301b2e6c4901fd7df2654af675c0d36580a0fe020618972b3d1656ac2e543b9901ee8d9bcee121321159d183b5680027655fa0e7a7e584af196c0dd60366329fee34f8a47f160e8bb21f8502523e7c14f7fc25a026ed2e3be6397c593314a4867b42a89647c86a7bdb5af2ef482b6de33632657aa0d7ea1e0a709e8e4cebb35f36525301e55290783371258a1e0410318db6f408c2a0efdf0687e3c1a2271964fcf2e7b3342950b10216c95382de3439bfd0da9159b180a066bd62640c614d577fca30fa7f4051b904a100ce2dbbf44c7163c8c96a2b5e71a05358928b50db7325b4fffc80a0e1ded6eeb821114b4f457fb79eb86c1878517f80a0dafa1730c3a97177baee6b64eba01291871b7652600427a06c4d3917113bbb16a06622f7619635a341457705a8c5ff68d8bf5327ecdd65b8828cade1859255fa8f8080a1e09e3ce9fcb786c2d26fbf130a2230be2f7a6b5215d7a97a5365dda0dc161060010000000000000000c001a0d87fe930794bfb2c89d96871246c40ea8e4fba82811447c88130ed552ee51eefa075b8c46cb6dffa4cbb8abaf7dcc176325c0f005f73a67eda08e7d28b93397b69b901c002f901bc83028c5f0c8459682f008459682f018301e0818080b90160608060405234801561000f575f80fd5b506101438061001d5f395ff3fe608060405234801561000f575f80fd5b5060043610610034575f3560e01c80632e64cec1146100385780636057361d14610056575b5f80fd5b610040610072565b60405161004d919061009b565b60405180910390f35b610070600480360381019061006b91906100e2565b61007a565b005b5f8054905090565b805f8190555050565b5f819050919050565b61009581610083565b82525050565b5f6020820190506100ae5f83018461008c565b92915050565b5f80fd5b6100c181610083565b81146100cb575f80fd5b50565b5f813590506100dc816100b8565b92915050565b5f602082840312156100f7576100f66100b4565b5b5f610104848285016100ce565b9150509291505056fea2646970667358221220742032b41616b8327709dfb5fc72c869f14ac9c19bca37e028e4760e9f5bb7e664736f6c63430008160033c080a07b32244055b1189a53efdc8dca26cfa9f512346e5820f5ebe50a957114dc93c7a01eeddb7c3e4ea4040c13a676315396e6d8f812ff50cb522e13a873fefacc0d86b8f602f8f383028c5f788459682f008459682f018302b74f94e4142f00c56d5978a2c9a1bb9c584910b67a626d80b884fc6f7865000000000000000000000000000000000000000000000000000000000000810c00000000000000000000000005a86b049abc5b8291158bd5289a4442c8ba60a700000000000000000000000000000000ffffffffffffffffffffffffffffffff00000000000000000000000000000000ffffffffffffffffffffffffffffffffc080a0fd5c50c36a3aa0b5965cc9061ae886c297415f9002bae8bf1dc5603d53d77f09a01b0da0f9682ce22c1c43a526746bd3ab3d9c64a57a6d66cd117e0daa47ba4ec0b87c02f87983028c5f0a8459682f008459682f018302798b94a198a1bae026d2bec0ac782ee9303eeb7f574ec387038d7ea4c68000841249c58bc001a0022c780be10d8f1797a9f1cd69e9f9af8e7babf95ffea441cb6214c06382b95fa034bff4bf931f2275c64f58f4645bf32ba830c84fbebdb2458ebc58a3073bfd9cb8b502f8b283028c5f018459682f008459682f0182d20a94e705498492d0ae94ca9365d395d2c6924f24f44580b844095ea7b300000000000000000000000010007777000000000000000000000000000000020000000000000000000000000000000000000000000000006124fee993bc0000c080a044ca0f5e86ef77c9c9ab153b6abbaf1f49191efd55aa3d468a464a729217d74ca05ed87287e74ec126878b5f2eea6643734cbab29d268f5371b1d79f6078855ee6b9039f02f9039b83028c5f188459682f008459682f01830370568080b9033f608060405234801561001057600080fd5b5061031f806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80639c4ae2d014610030575b600080fd5b61004a60048036038101906100459190610231565b61004c565b005b6000818351602085016000f59050803b61006557600080fd5b7f55ea6c6b31543d8e2ec6a72f71a79c0f4b72ed0d4757172b043d8f4f4cd848488160405161009491906102ce565b60405180910390a1505050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610108826100bf565b810181811067ffffffffffffffff82111715610127576101266100d0565b5b80604052505050565b600061013a6100a1565b905061014682826100ff565b919050565b600067ffffffffffffffff821115610166576101656100d0565b5b61016f826100bf565b9050602081019050919050565b82818337600083830152505050565b600061019e6101998461014b565b610130565b9050828152602081018484840111156101ba576101b96100ba565b5b6101c584828561017c565b509392505050565b600082601f8301126101e2576101e16100b5565b5b81356101f284826020860161018b565b91505092915050565b6000819050919050565b61020e816101fb565b811461021957600080fd5b50565b60008135905061022b81610205565b92915050565b60008060408385031215610248576102476100ab565b5b600083013567ffffffffffffffff811115610266576102656100b0565b5b610272858286016101cd565b92505060206102838582860161021c565b9150509250929050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006102b88261028d565b9050919050565b6102c8816102ad565b82525050565b60006020820190506102e360008301846102bf565b9291505056fea2646970667358221220a71d5a9a218e95ca3497fa6386f47ea2b029d6d42856bbada9c36b76871b66a764736f6c63430008140033c001a019845e58668ce0093391fae720b99a56551fed63b5ded7a25149a7602f344124a02d55706906aca5d4fc089b0c982f544cafbb0737ef78fe30c7a3e1dc3e9ddbdd0000000000000000000000000000","v":"0x1","r":"0x4039635ba41e9a468f4387b8857362dbef6fb0be8fb5645ee00707971b8d33eb","s":"0x72a6e373c983adcea0ce378c61d98ea7222260c6c122ebdf12f9000fe551a9dc","to":"0x95ff8d3ce9dcb7455beb7845143bea84fe5c4f6f","chainId":"0xaa36a7","accessList":[],"hash":"0x02d8f98382fd5fd460c1f8f67056ff8d73bea1dadc26864bd8e29753d4792d40"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_67.json b/common/ethereum/testdata/tx_67.json new file mode 100644 index 0000000000..8f2026f0dd --- /dev/null +++ b/common/ethereum/testdata/tx_67.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x69e","gasPrice":null,"maxPriorityFeePerGas":"0x3","maxFeePerGas":"0x185c16f","gas":"0x7a120","value":"0x1","input":"0xb6d5a39700000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000a081e7f91f8b928d38477371bca514e2941330dfc158446151e1a6d5996781c32e0000000000000000000000008f8f3572e8dfcc8c63a62d27d002f4e397cc6eab000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002fc0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000200000000000000000000000008f8f3572e8dfcc8c63a62d27d002f4e397cc6eab000000000000000000000000000000000000000000000000000000006592b5d40000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000004116132922fb8132193071fb72b22cec3a730b74e8f37d57beaec24fdfc873329d16d83b53128cf556d08f61988e0f46bccbc60fe36b3b818e94b7c29812ebfb1d1c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002fcf902f9b901bf02f901bb83028c5f028459682f008459682f01830379ee941000777700000000000000000000000000000002872386f26fc10000b90144e2dc903300000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000aa36a7000000000000000000000000434e47a10d6c09548b96473a094aa0c1f874c28d000000000000000000000000e705498492d0ae94ca9365d395d2c6924f24f4450000000000000000000000000000000000000000000000006124fee993bc000000000000000000000000000000000000000000000000000000000000000222e0000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000434e47a10d6c09548b96473a094aa0c1f874c28d00000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000c001a03b3ca799b49a2b8eaa8fc80a3964e318016ff11c867b836a2186525047da3149a02a7076ea8e417ce4621512b8835e8b1cfd46927cca33b88cb36a67779eadd6bab87c02f87983028c5f018459682f008459682f018302798b94a198a1bae026d2bec0ac782ee9303eeb7f574ec387038d7ea4c68000841249c58bc001a0f37cde4bbc8580c8b73a3124b1b61fe565ce4b8452754b4efb7dc8c6045affd8a041e6512ef7407b01d33281390c04c8e1c633642738d2a8f1cebd8831cd8e8b67b8b702f8b483028c5f82231d8459682f008459682f0282cbf8942ebd5498c189a0fa74c6784dbac67dcb9978eb4080b844a9059cbb000000000000000000000000bbb73925752cddb1e82134cfc77a8671582974820000000000000000000000000000000000000000000000056bc75e2d63100000c001a02a94cfd29965f36201b46871979e7e815762a51add37146fd1e05064a20b8c7ea0718e6697657f0050772efa0e6e3f42ef79fc599b1348f426fc119ee60626a6dc00000000","v":"0x0","r":"0xbcb271f0c24327e54061ecfee981c77bac506ea8d50a95f4d87d2bb3cc3badd4","s":"0x29169e44ed3a267612ff714d983e97b9983c86132146d14488b96b86d6519d87","to":"0x95ff8d3ce9dcb7455beb7845143bea84fe5c4f6f","chainId":"0xaa36a7","accessList":[],"hash":"0xc7ee1b7c8184e52c4f3be8c8d6208be5a5b176144fd613a519d21debd19c9e82"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_68.json b/common/ethereum/testdata/tx_68.json new file mode 100644 index 0000000000..a2033032a9 --- /dev/null +++ b/common/ethereum/testdata/tx_68.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x19b","gasPrice":null,"maxPriorityFeePerGas":"0x3","maxFeePerGas":"0x185c16f","gas":"0x156b6","value":"0x0","input":"0x9aaab6485b9c162bd059f9c5b1f7503315dfac3402fca5d71e567db11c28d60da8a4c11a000000000000000000000000000000000000000000000000000000000000c120e0b4103952d53aedc0a1aebb5514ad46af84d29fcf4b8384d93898a06580685a00000000000000000000000000000000000000000000000000000000004c4b34","v":"0x1","r":"0xda149cc029684834dcc457622be37d9aab80e719ec42052766709f0d53dea354","s":"0x410afdbf0a66eda724e60df80648b449d40ab165b038243f14980aa11edb62","to":"0xd1275ff1bc4c97637d2171ae48d1875ce6b5cfb6","chainId":"0xaa36a7","accessList":[],"hash":"0x676d0be9c2b9dab79699499af03b5391d9bde2d152291c0df873cd48f86b7f4f"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_69.json b/common/ethereum/testdata/tx_69.json new file mode 100644 index 0000000000..2d7b3179a0 --- /dev/null +++ b/common/ethereum/testdata/tx_69.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x1182b","gasPrice":null,"maxPriorityFeePerGas":"0x3","maxFeePerGas":"0x185c16f","gas":"0x67f8","value":"0x0","input":"0x004d0ff69af8870f24420e1930e50f7d0a00000000014d78dadae1cff0c367c1fcab525e5b53b898a527be487b14fbdcf07449cc2c8ff9d7f37edefa21d365a0d3d6ece36dbb80e3e7627e0d3617c3e014f6d4ff3e4eafb57f9c307fd959ab1af54146413a2841ab2575d2ba7d072006a67e9eb7f38af07cd62beb7d1d9747d64f767362b9e67acef9fddabc6befbda20e2634fb78db2d2816bfedd3d9e3a4f246fde9fe86a80a99790744ef7db1b23efad0739d0ffbf59a52908107a0067a151f0ebcead9e82b2473d7fcf264ee5d3e3c5f1867f7cc48995a1d1e55ae1b7b9c68030f410d6c600bb8fb6c7f907cd1ce657c3b993b033402e57ec95f53e916b437e8b827202841b48147a006b6bae58ae5fd9dd26b737c5a49b4d0a7375f8e7a092d3c7efdddee98d61feb66b5fe27dac06350039ffefb132af0955fed6426d7e497be9a9ad3be5f13aa8c2e65ce68fec4e47b2c418568034f1c00040000ffff5e83ebfd01","v":"0x0","r":"0xee7bdf61ba44cf7454ddf226e196a8bba136bd2a3d18b312c426a03794d8dd94","s":"0x601ba82961a9bde7deb3d5d8036e89a3f1c66f5c8c585f9681a6dece959163f","to":"0xff00000000000000000000000000000000047777","chainId":"0xaa36a7","accessList":[],"hash":"0x9b682546c28a555767ffcea330f96a7f8808af6736e09fdea6bb0d9df62436a2"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_7.json b/common/ethereum/testdata/tx_7.json new file mode 100644 index 0000000000..1bf82d8d5e --- /dev/null +++ b/common/ethereum/testdata/tx_7.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x0","gasPrice":null,"maxPriorityFeePerGas":"0xef2e08b9","maxFeePerGas":"0xef2e08b9","gas":"0xcb71","value":"0x0","input":"0xa0712d6800000000000000000000000000000000000000000000003635c9adc5dea00000","v":"0x0","r":"0x952d53537a22d35aa5d2a0b5b8c5b0338d2fb54d124636f9b58de708a4b313cf","s":"0x43b9e39daf30af1cfa4a3c84a12997a4bc2d5a8525361028a7f9f43fd1f031d1","to":"0x4873528341d33ec918c7465f244491acb75bc95f","chainId":"0xaa36a7","accessList":[],"hash":"0xb53c33cf5720c48df3aab15aae1c33feb2c6fb9a389586201eff9186c291e983"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_70.json b/common/ethereum/testdata/tx_70.json new file mode 100644 index 0000000000..7d667090ea --- /dev/null +++ b/common/ethereum/testdata/tx_70.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0xbb73","gasPrice":null,"maxPriorityFeePerGas":"0x3","maxFeePerGas":"0x185c16f","gas":"0x8dba1","value":"0x0","input":"0xec9b3121000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000030fa2000000000000000000000000a29f6f0d0dd58cd31eb93932a3365829c28297de0000000000000000000000000000000000000000000000000000000000028c5f0000000000000000000000000000000000000000000000000000000000aa36a7000000000000000000000000a29f6f0d0dd58cd31eb93932a3365829c28297de000000000000000000000000a29f6f0d0dd58cd31eb93932a3365829c28297de000000000000000000000000a29f6f0d0dd58cd31eb93932a3365829c28297de0000000000000000000000000000000000000000000000000429d069189e0000000000000000000000000000000000000000000000000000000098b76372b92000000000000000000000000000000000000000000000000000000000000222e0000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000001f11900000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000092bf90928b90214f90211a0b0e9e7d01659025eb83c0413976324522b04fa04cf6a8eb4221970c842b9a396a095c615c36e863d53f239ae914d0deb4fb264f1ca890d5a10655d0a7404232bfba0ff7bf342c84a2fa936fd2ee18cf5a3a5566079bceb672231e458f1dbddb618a7a0b1a6ff0d00fe2ef78eb865516a6660334995a06034d86e72bd8d7d09100159aaa05eac2c1a2de6eef2371d90198cf339f7c8cc3e2ae7664a7969ea00491ead4218a04878e00bd0fc90db4a792074e53a14e6c47edf79b84d858f7a9bf2ee6b500aeca0997a574bde5c10c5a2951d4476f92bab26ff4e6d1baa1de7e953b126cd7d64eba060c52d4ef17f6484f1c9e275e953a68840d54da2905c259a4ca518ecf0bc5c1da0af6acac05a3cbeca65edd128c68f6cd1f86b1a6876c224647cad1cdea84afd94a0a5433555bde6771ef80801f4f5995975bb831abb017616b81579f645918641bea0cec08cb0dfa7c597b2bbbd46dd213c3477f46529ccd073c51024a11ae0c5982ba094fc4bc9d9eb7c968b0fdb6241704944b4898b56935a4bc6a4d5bb5647c05185a08be391a016aa07e7ec877199616bf5b099b65d37237473841b68784c22862cb3a041c5d302f2c81d2bf6d0efa415c91bbff64a89fa1ce78749214d27c26bb941fda047ac20202ffef677c7f7c521d055bbed38ac0f3e81116f4fa51a54457f97d039a02353c276796c53ba25b8d2580a6edce1747977d231581cfeb720b31475a9c68380b90214f90211a0431d66b560ca591e654e0a308733d297d7674f38ba76422d8c53e52dcd54d718a01b9d7bc167d913c88b0699ea64f2ad998f16dc9e24d7ec28248c6a004b204421a025e0eae9c2f11cd2cfe89c546dabf5939cadd0bdc793f5ea2e34bf344b1a103ba0d4ec4de0730fbc1afd3d7533ac3d9a9b37ab4b1f58b3d4023f2ad657a392bf6ca039823e09dd57e71ed0c9d6b4b831b020f9d6b49dbc4311ea0678cebdcc3edb02a02012753584b5a415f2d18a97b373e55e5aba967b71be0095bac8c0ed6e7abe22a03686cc3f9f3385072cf346e210ba4035ecb5ef5d579bc635ed04de5096d9fc2ea01f031533f9bedd9c622501c61070741d5f1cec15b6bacf456249016a3ed65f87a0b528030efb52d8a7b894ba9cde0b5fca05b9f510f0cd6d1789a6dc4031bed85fa0fca82487d5e46b5adbacccdf379f33d25bbb28b5c3ce1db3c8aaa361048ea97fa0c60e996b2ea9fefa927392febe7497e25070fe68868688bc213a0317bf160cdba0199cba9ff445a9b6fe9106d41176cc77e04055c5589ea33acbda21397b661fc6a049c777977a260f48e604455af2b8215850fcfd4ea4cf452df68e0ddbffac01b7a002f738258aab8071cce0ab5dd58d61aaf6718e597f2efe67557368f9431a634da0b62217d425a0d033b61f6b8986cb279e10811974eb2342170ab5fdf7ea91469ca024bdc7ae218d2052bc37381cf06a41221515890a0e87bd46edfab937a1fe132980b90214f90211a095fe67d786a71f35059aced618c6f62d1b326d08f72893df994d66d7a54c6d54a0c7ba2eff1e84afe01b3d7da4dcc4a36570e0f0dfb22eb20e2ca900c479f9416fa084ad5e2e053850d2a2e43a8bdd9a53c879609dcc6979a088a79d8b22af05625fa0608028cbc3c21f7e34cca3cdcaf646a19d924cdb57e3cb2ce07f4d024d3845aaa00b7f6d7a2ab6d498f3b4c872e0a236b18747f162ee8997392314faabeb7077e4a0b44d73d8773a246a1310ebdc60f5c260fc9a986bfe43fc62c422e1635e3fb631a04fea6d10048142b603f2a1216d238633988ac4b27db7fd31a6701df110b95e01a0216efe2b32ed08e7551d3c86b41c54bd856584d14a5afcf7f03ee01ed828d45ba0ba954ca442bbe441f2cdf642e5e1285b937c7b23e0ba479471d5a473b23836d3a0b93ea3c15461c44fe091fb84e38b0496b0dcc63b9218ed07db6a56e8abb9595da0a01dc462de64a51712109c7288640730e9b9947a02c53549a3ee8acab93caaa4a01575fa2d7274b3e6a68d7495850e54a788c17968f6311d707acbe3ade7bbb3e7a07d853b055ae5087f398da1fd431ac45751f02f7586b3b0d1f5868e37d1009152a01f99aef67efbf06ac286191630f3636b0b4df872a8dfc369f1dd54f9ec502ef5a0f216fb84c3cc019cc8c59519c7e6c37e23130355de84a8b47a53e8e01be4c358a05b9dad721237424ffd3b7887ae91cabb60fef984a13a99430141da886be3a7b880b90214f90211a0938ecbe590a5c1d31fdf67764bd9c0100e320ce4ea0cfb674b9afa96ed360721a0691a144c876b67914d33fb3c88a750f7fa26634c1714697b4ed64e4b8a4e6f5ba04b84c364723767b4da9470cbca241c4a680105622bf7ee916e3d6b5e514249bda0a7be452f8e4ac1402e5c5312798159525ba680e10f4bdc8140fc198654da38e5a046fde39fecdb68bc9df96f6adabd8a832cf2cf2be87062a0bbfea8dea2ea5b4fa0cbdc63ca253c3f8cfb11faef39962504765c5b1fc341f0fe7741a2eba830e9d4a035f19fb57ba47ff3309afec0b6b86e825f1a6edb92c2cc12a6cfde2723db772ba0d824f9bd5153bcfa1bfc6047dfa33aa806be578660554fcee202bbb634cbccb1a03fb710015a13e579aa8f8217061bb6495c0037a8a9815985cad21764b4bb42bba0fc0a155c3db4b247e3f9eb6e74db5a8f8a21cf5cb87747cc0411fc34b399f4e0a0b71a27666f68b1760b5105f29c04f95152e87a39d64203b5327a1d972a8e7142a027d07458e521f115da5f0996b307849a93ef2418db6b129da402582fb78243c8a0155e6271c0c6ff19281f77834b8988c2ebcfb0da949dc371f6d8ca5f26ce7525a04e693d19ea9ec6052f2a10957f5ebf1edd5af2c222182dffe9bd97950c7aa3e5a07d3bff9a092ab8d9978f0294b17a1c95374a63d507886d2a5aeeeadf911b253ba0263d16968650b01d941ad22a0f89b5358454043d32c1ab902ad4f3a4ca70fc8780b853f851808080808080808080a088bc187bec8ecd999b6331125c30f48ccf26987f0701c39ed862450bc1f2fcfba0298b55f6f8aab07664d5435e2c1b7b885e5798b9cccfb9b60c95459f8c2cb822808080808080b853f85180808080808080a0827f046e8cc1161bd12ec24c2d729f33cbe42f19ff97591f91b0760c798154fe8080808080a096c388c216a037fb40f1a059a7ed150a1184386c6cb67e12b74f60cbd7659704808080a1e09e20c609a35697f865fed2716bc241539d1513ed8512663a231a72ff4357ac01000000000000000000000000000000000000000000","v":"0x1","r":"0xda5a29e66cde26b3f88994ae83c4caad4277159af369b975321a19b173056acf","s":"0x209e5b627f8591dee6455f6ba19a02aafd9941fbb38a60dbab04573d03f34460","to":"0x5293bb897db0b64ffd11e0194984e8c5f1f06178","chainId":"0xaa36a7","accessList":[],"hash":"0x0b4d1a3c9bc5a6c99c810a278609194364dc694e8c05b7de62143fb7f0f45fbc"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_71.json b/common/ethereum/testdata/tx_71.json new file mode 100644 index 0000000000..3ee93a1dbf --- /dev/null +++ b/common/ethereum/testdata/tx_71.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0xbee3","gasPrice":null,"maxPriorityFeePerGas":"0x3","maxFeePerGas":"0x185c16f","gas":"0x86a56","value":"0x0","input":"0xec9b3121000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000030fa3000000000000000000000000d9a0a16e5a634bf5a02962b667f17c65bae140860000000000000000000000000000000000000000000000000000000000028c5f0000000000000000000000000000000000000000000000000000000000aa36a7000000000000000000000000d9a0a16e5a634bf5a02962b667f17c65bae14086000000000000000000000000d9a0a16e5a634bf5a02962b667f17c65bae14086000000000000000000000000d9a0a16e5a634bf5a02962b667f17c65bae140860000000000000000000000000000000000000000000000003782dace9d90000000000000000000000000000000000000000000000000000000009580614d2c0000000000000000000000000000000000000000000000000000000000000222e0000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009e0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000001f119000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000956f90953b90214f90211a0b0e9e7d01659025eb83c0413976324522b04fa04cf6a8eb4221970c842b9a396a095c615c36e863d53f239ae914d0deb4fb264f1ca890d5a10655d0a7404232bfba0ff7bf342c84a2fa936fd2ee18cf5a3a5566079bceb672231e458f1dbddb618a7a0b1a6ff0d00fe2ef78eb865516a6660334995a06034d86e72bd8d7d09100159aaa05eac2c1a2de6eef2371d90198cf339f7c8cc3e2ae7664a7969ea00491ead4218a04878e00bd0fc90db4a792074e53a14e6c47edf79b84d858f7a9bf2ee6b500aeca0997a574bde5c10c5a2951d4476f92bab26ff4e6d1baa1de7e953b126cd7d64eba060c52d4ef17f6484f1c9e275e953a68840d54da2905c259a4ca518ecf0bc5c1da0af6acac05a3cbeca65edd128c68f6cd1f86b1a6876c224647cad1cdea84afd94a0a5433555bde6771ef80801f4f5995975bb831abb017616b81579f645918641bea0cec08cb0dfa7c597b2bbbd46dd213c3477f46529ccd073c51024a11ae0c5982ba094fc4bc9d9eb7c968b0fdb6241704944b4898b56935a4bc6a4d5bb5647c05185a08be391a016aa07e7ec877199616bf5b099b65d37237473841b68784c22862cb3a041c5d302f2c81d2bf6d0efa415c91bbff64a89fa1ce78749214d27c26bb941fda047ac20202ffef677c7f7c521d055bbed38ac0f3e81116f4fa51a54457f97d039a02353c276796c53ba25b8d2580a6edce1747977d231581cfeb720b31475a9c68380b90214f90211a0ca2ebdc74d5d85daea4f14c63b73678bac0164aff47e2383f7dd7e00a0e1868da0150cbc6c0aa8d116e7c4bfd80877c5715b6f7bbbc855326e73021af455073224a03ad12f6f81d7a68e1e1df42456c11422751262467d0b4db768db220e4be353a2a02d1b0dd932d76fd884344782fb79e079fd959c747e79ae16aa7e5ee07f58a6a2a0eb5418faded41ab0ae7e9e1895fe88b475e27d4144c67658440230b62a3e4509a0b0ccc4b3fc82f9485ca85a10b2d94bdb36555570108bb59a4b65141b0dcab456a0d56670a4e433307ec7ea91d6b35b01a706af720c1f5d36ae917f3b4294621e71a02f369ae01b742f284fc0e1a2239fcbbc4cb6873fe5f36251b1b28130c9535e71a0d800d1dfdeaf89a4882f8fad92d2ae8e050050cb4cf4564bd023b82c3efa1b6fa03b535b63b83b0dbe3bf8df8e7bb788c87bc21a446d03f64d6995ebed3060dd14a0dae8795c1745bb1cc3fc7ce8a991915350a7981d1a942bb97c10edec5d3388ada05a429ff8c4dc5e48f8210b58e3d0ef90e6bc8ac29396878de6dae9c612a2e070a0fe71d09b26d856221e55ea466fceac2e36ca8242a8f21b6c17ec8890c42fc428a05d0d4d1171102c80e8d5b15027aa4a75262ce72bc0af241e69285d97cdcadbc6a06244d2c13088a0f06ed1f09b0fac16d6dd3f5300065393e5fb7e6c8b1fe7d5aaa0c6b4cffa2b3e1e357f95c903f019963a9d7a7b06814d0e194ca4f3d8b5b430f380b90214f90211a028cbbafc6f431d9c0e0d3984cc42fc225d72375bc81d5bcc32c6762a8dfc6c49a089fb19e9e1dc76e03194290b7f9b9ed5303ea11789b69fee7f4a677965bb8d58a01b2beac3c68c77ae4f0263ca9efd96ead35aacef94217960652310e992fed70da09b99ac78c58cc8f4903fd7ddb93b4160771ae4b1941b171e798a92a1062725cca0545d4aae36ca83a22876b06dda56ed1b52da010071809cdae2b38dffb581d898a07ac3a776fbb3dbcbe4ab21f60796a44d1208e35a5402829b3fe57e0fa14d9f2da06d6b80a059a1c19983980b50409eb9a5c3e806700c8896b4a68d94935f224c39a015366da5818b216855c9497974900d76ae4141e3439aeeaa53fdde2f0f617050a0098f858253822012cdefee157d73e45f57b20009a59f83cb6649ed1991541b26a07755be87c599800bbd9dda4c563805ff93434abcb5d2aed5577e7f14b4ce8b59a00ded0f8322ebd9023f95362521641e41dd0d5c149f0dc31d3811f81c443a4287a044740995cc18711acc2f722b3cfbbb6f0ddfc7d3ff0a77a8f6f658e850fb458ca056e1cb8109c401f0b86468e2b68fcc8952b4b811cee34765d031bfd08924ec3ea0cbfa1c8f82224550aac7df1252f2f7a3363ddb35f6c3a1d50564f97491086edda05b0ed47915ea4f6b19a41bdeea81c5b3ae809e186e185ab4cf9e773ec6cecceba0e2c38b5c2deffebf842dd8c1dcdfb4b97e3e5021c717824cdf9d81afdb3b2e2a80b90214f90211a0c7b0da45ec81694e4c12643298ae5e5927677a6b0e5f5d5554f437b49c844d0ca0832e89d6fce5e6c3d2bc85bf15ac651392e592df7976cf9e4c94daac14a0eb01a005b855e77194f913bb5963f7f502c35ca2f7d4befe02cc3427b62c9077fdb3e2a023accee1050f61f5e845eb1b59ad6ee2ac234ef4a70757b72ee2f0596d39bdd5a0d9f79146568c29704dafd3b6a6a258caa900a89a16a81f1eb1ae034c0466741da01c35e5b9f4de8a9f2c09c6e0f0c923dae840a9281bb09fa6329e420811f3b8d7a02b3e268be60366bba874a80588f6f9f7b667c7082836f7753189b25ad7ee4909a0e4326949d34b3d79327df22f5e2937a61ad98e587037f70332f66a0e59255956a0703af15dcd37be9bc25d8803554feae1249609b535b276cbde712f45e86caa4da0b8ca863bf459ff6a197ce70930226366a6f23bea8897a9ba5c04d10534a2f839a0bc3822b0f401bd18d755c0c9e068a0f7290d3a9ffaa854abc6bedc410a3aa12aa07268dab96b1c64ecec24517334042edc8b2a25e6ae16792ed7dcf0603ed6d5e1a06f4603c7694c0919e26e4719e1462569add3cd65bd873e104acda53e02f9dacda0d1100c397a7bda8f900c0061f642df88a0b08028ab90bc4e2ab5e96f2cc4f06fa08268dc92abd448d5a420b4c70c6b0db33a908bae1f7b7e0c2fd990d4adfb3581a0906ea2088bca617f7811fd5f0b265c7531da4519446f458533744bd7da36aa2380b8d3f8d1a00aac4eb17b09a2263b6d7d130f2d13eea210cd8a9b4e3e20656c8fcf632170d180808080a020f3f9b551e853dbf8bcb574f5caf25f5b3c4be3d85599f2c4a7a8e01d25d91880808080a09599593d5b08b73803dbd52cb3ed545a683989fa38534b817512c490d16b33efa0aea484bed2ff03bad1db7f15496c77807f73699411d871f671044e14a0704255a0648d8265a45077345f735e6f15a912678d8ffa667ba56b68bcd36b7f565fcc6d80a049034add81cc262e0cecc9622a7514622b521a187d32bf479b094c2740ea517e8080a1e09e378947b778f95272a580cd7b44767b3e3417f653d1780c097aeafe8a62d60100000000000000000000","v":"0x1","r":"0xc5b3d6b0e6acaac2177ea14a6805af8a7344053cdf69a1117dec14726252f9cb","s":"0xb36b94887264e8abbf1681164de9aa1146a26b0937551884422c31209894026","to":"0x5293bb897db0b64ffd11e0194984e8c5f1f06178","chainId":"0xaa36a7","accessList":[],"hash":"0x59b7585f9481f9b64a3cb8dd3871b341c238da9091abe6e58a9722f9bf1524b3"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_72.json b/common/ethereum/testdata/tx_72.json new file mode 100644 index 0000000000..54a106e898 --- /dev/null +++ b/common/ethereum/testdata/tx_72.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0xbee4","gasPrice":null,"maxPriorityFeePerGas":"0x3","maxFeePerGas":"0x185c16f","gas":"0x2dc6c0","value":"0x0","input":"0xec9b3121000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000000000000000000000000000000000000000030fa400000000000000000000000010007777000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000028c5f0000000000000000000000000000000000000000000000000000000000aa36a70000000000000000000000000b40347bee82679b88028a9eb9684c2a937c17340000000000000000000000009f1a34a0e4f6c77c3648c4d9e922da615c64d1940000000000000000000000000b40347bee82679b88028a9eb9684c2a937c173400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cb2a38ecada000000000000000000000000000000000000000000000000000000000000222e00000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000036000000000000000000000000000000000000000000000000000000000000001a4cb03d23c000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b40347bee82679b88028a9eb9684c2a937c173400000000000000000000000000000000000000000000000022b1c8c1227a00000000000000000000000000000000000000000000000000000000000000aa36a700000000000000000000000075f94f04d2144cb6056ccd0cff1771573d838974000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000554544b4f6a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000125461696b6f20546f6b656e204a6f6c6e6972000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000001f119000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000916f90913b90214f90211a0b0e9e7d01659025eb83c0413976324522b04fa04cf6a8eb4221970c842b9a396a095c615c36e863d53f239ae914d0deb4fb264f1ca890d5a10655d0a7404232bfba0ff7bf342c84a2fa936fd2ee18cf5a3a5566079bceb672231e458f1dbddb618a7a0b1a6ff0d00fe2ef78eb865516a6660334995a06034d86e72bd8d7d09100159aaa05eac2c1a2de6eef2371d90198cf339f7c8cc3e2ae7664a7969ea00491ead4218a04878e00bd0fc90db4a792074e53a14e6c47edf79b84d858f7a9bf2ee6b500aeca0997a574bde5c10c5a2951d4476f92bab26ff4e6d1baa1de7e953b126cd7d64eba060c52d4ef17f6484f1c9e275e953a68840d54da2905c259a4ca518ecf0bc5c1da0af6acac05a3cbeca65edd128c68f6cd1f86b1a6876c224647cad1cdea84afd94a0a5433555bde6771ef80801f4f5995975bb831abb017616b81579f645918641bea0cec08cb0dfa7c597b2bbbd46dd213c3477f46529ccd073c51024a11ae0c5982ba094fc4bc9d9eb7c968b0fdb6241704944b4898b56935a4bc6a4d5bb5647c05185a08be391a016aa07e7ec877199616bf5b099b65d37237473841b68784c22862cb3a041c5d302f2c81d2bf6d0efa415c91bbff64a89fa1ce78749214d27c26bb941fda047ac20202ffef677c7f7c521d055bbed38ac0f3e81116f4fa51a54457f97d039a02353c276796c53ba25b8d2580a6edce1747977d231581cfeb720b31475a9c68380b90214f90211a0ca2ebdc74d5d85daea4f14c63b73678bac0164aff47e2383f7dd7e00a0e1868da0150cbc6c0aa8d116e7c4bfd80877c5715b6f7bbbc855326e73021af455073224a03ad12f6f81d7a68e1e1df42456c11422751262467d0b4db768db220e4be353a2a02d1b0dd932d76fd884344782fb79e079fd959c747e79ae16aa7e5ee07f58a6a2a0eb5418faded41ab0ae7e9e1895fe88b475e27d4144c67658440230b62a3e4509a0b0ccc4b3fc82f9485ca85a10b2d94bdb36555570108bb59a4b65141b0dcab456a0d56670a4e433307ec7ea91d6b35b01a706af720c1f5d36ae917f3b4294621e71a02f369ae01b742f284fc0e1a2239fcbbc4cb6873fe5f36251b1b28130c9535e71a0d800d1dfdeaf89a4882f8fad92d2ae8e050050cb4cf4564bd023b82c3efa1b6fa03b535b63b83b0dbe3bf8df8e7bb788c87bc21a446d03f64d6995ebed3060dd14a0dae8795c1745bb1cc3fc7ce8a991915350a7981d1a942bb97c10edec5d3388ada05a429ff8c4dc5e48f8210b58e3d0ef90e6bc8ac29396878de6dae9c612a2e070a0fe71d09b26d856221e55ea466fceac2e36ca8242a8f21b6c17ec8890c42fc428a05d0d4d1171102c80e8d5b15027aa4a75262ce72bc0af241e69285d97cdcadbc6a06244d2c13088a0f06ed1f09b0fac16d6dd3f5300065393e5fb7e6c8b1fe7d5aaa0c6b4cffa2b3e1e357f95c903f019963a9d7a7b06814d0e194ca4f3d8b5b430f380b90214f90211a0c99e99b70fbe718307421e8e11a457ee5e5a77e09e2d970522bcc752d48f1c9ea0754c43aed8dbc9c6208b55a931edea206238dee9214fbafaba9f885f2986a41ea0840dc2fd575377ccb84f76a4923bfb092d57aba73defc7c0f0d195def058dee1a0010f5c044724d459fbecb86c536797a354d06fdc97c5ba414d14a9d961214483a0579cc76da5a6eb09f4db00b3573f55620431a1f16caa6d69428fd1f69b515b00a062aa7679d4c72d41c5265f4e4df8b9562299d360a553b4f2ed0480b11e3cf64ea010e353468c1a88c502e2666793112c4de5c0a21540b043f60ecd6677dec2c4cda0ed1fc872eb26fd259ed3264a94daab3dfadeeed7cd2495a2563f975c90c8140da0d21d8d0ae9a1bbe0414517e2c91f3e24cbcd0747eedee9fd73425aeaa9b94137a08ade6f102649258067f8a0b5d7bd3d2d42faa16220fc6f309cdaf0e422e3cd45a02747711f51c2ddc0d862313624272abeec6629f4c47c2d94fafa36f0487cdcd8a0548a822fa1c85dd05f07c60e8b30540e48fb7296ad5c4206586ee19fb922554da04b5faf9bfb7be645f22916588c156713ff62d719b39e1f89b4dbaf059c786c16a0288cb27d6ce6e0933ea8a24e458f124fb82807f646396d3dca53347a38a91b33a02adc62bf723cf04c34fcae19e003570518ab4435d00da5c904822efc68865416a0114c814c81c168d102eb5f3c1694ed9d8e1907add0acd78837351ce2ee702b7380b90214f90211a09039ac0b6af4d211f19ab27f4b927481159a232cdfec3d71fd7d453ce4212f9ea0f4b6b99e1923dc1c5d1a8f5428375efa081a5fc2c102edd96d44bf9cb1af0700a069b52c6cc44ab92fefe3f77cf73e525007af9303463de39e5117f39c1c2ddb91a08789bdc35a2181c49aec50c4e105e3f947d3275a4de94d2fd2812fb577c23b58a0c972a9bd5e26afc9ff7ebed669ebbc592e8fe61d05b1a27c844a69434474b158a0d3c1ddc0c8c6e734d8e081242bfc12ac2ee6adc3c8dd8249ca46a28a8b67b8aea09ec09a2b3c35c8cb936d44ffc1bd4e0041288910aefd69326fa34cd7d4ada253a00b01034830ecf90be3d6270e8e89b3c565d04abd07f496026f05db17b12d1bd7a0bf1d980ed1f4048125a5c4df3b3acfd8f57be6033f15146c4ac3f8679ef33a4fa0dd57397edba112559ca544bdf5bb5e071b8ae7b78c8959689cbbf223f38daf18a0986d7e147e25eb768c440201332b44dfb06e0651e8222c5faeaff5cfbf026409a08fd6fdbd8064141407660136e4d2edb0b03a15ef59a3d6a43a0d1889836ab9cea0c114b59a53d7c56f6f3e8d6e006cac0cc6c5816887bb271956ea4d73be61a407a059d646076a77c639e63616c707f2fc7448e83bf4edd05e1c776bcb24ec1325dfa0c3edfbd4d027b6178214160749d70635ee7df4257befd7e6835ee83dc369710ca0457e80fdb71fc09dd53022f4d044f7402c0f332033819a5a68e518926a065fab80b893f89180a0ab0bcd93d453ba0dbe490dde5329a8efa587200f36b9ae88cb8d25eea5e485748080808080a0252e491f9d68f88d52bd3fb60f74fa4fadecedcc37be142bbc9f8a6d94f9c44180808080a0c1f92a74a45f4fa553ec95b8f5832b63cc3904c4f6260dca97d785c4e2aee3fb80a030a8ef850a2d70f9dbe01f6e1c02d502c079022176cf70b293bf1d4a12f8fc448080a1e09e30c43594a2ab3ed81aa86d0aa7138fc54e00a49d4758f642a83b726667ed0100000000000000000000","v":"0x1","r":"0xc0167b9446707381864457cb05fdc670956581e65f1d8ce109a289276911ae14","s":"0x299d2cb2e607d331d05ccc4430abfcab56e8e28ae08da1803a13317c6898478e","to":"0x5293bb897db0b64ffd11e0194984e8c5f1f06178","chainId":"0xaa36a7","accessList":[],"hash":"0xe03e4070980c60bffd134939a59342dcb48645811d2cd3b55a1889798d08e7cd"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_73.json b/common/ethereum/testdata/tx_73.json new file mode 100644 index 0000000000..1c764d0c07 --- /dev/null +++ b/common/ethereum/testdata/tx_73.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x19d","gasPrice":null,"maxPriorityFeePerGas":"0x3","maxFeePerGas":"0x185c16f","gas":"0x62c84","value":"0x1","input":"0xb6d5a39700000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000a081e7f91f8b928d38477371bca514e2941330dfc158446151e1a6d5996781c32e00000000000000000000000035a4c6b955deee78585e13bdc7cfba1bba5e0792000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002fc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000002000000000000000000000000035a4c6b955deee78585e13bdc7cfba1bba5e0792000000000000000000000000000000000000000000000000000000006592b5d6000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000410037f38647bdf3983814aa0aa968b2f01acf0d0c37eaa91de295f8d97ecb9cbd2aa86d09b2c3d45641a3548d1ac99a06402c4b9324e9ded2e94055d81fc8453e1c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002fcf902f9b901bf02f901bb83028c5f028459682f008459682f01830379ee941000777700000000000000000000000000000002872386f26fc10000b90144e2dc903300000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000aa36a7000000000000000000000000434e47a10d6c09548b96473a094aa0c1f874c28d000000000000000000000000e705498492d0ae94ca9365d395d2c6924f24f4450000000000000000000000000000000000000000000000006124fee993bc000000000000000000000000000000000000000000000000000000000000000222e0000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000434e47a10d6c09548b96473a094aa0c1f874c28d00000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000c001a03b3ca799b49a2b8eaa8fc80a3964e318016ff11c867b836a2186525047da3149a02a7076ea8e417ce4621512b8835e8b1cfd46927cca33b88cb36a67779eadd6bab87c02f87983028c5f018459682f008459682f018302798b94a198a1bae026d2bec0ac782ee9303eeb7f574ec387038d7ea4c68000841249c58bc001a0f37cde4bbc8580c8b73a3124b1b61fe565ce4b8452754b4efb7dc8c6045affd8a041e6512ef7407b01d33281390c04c8e1c633642738d2a8f1cebd8831cd8e8b67b8b702f8b483028c5f82231d8459682f008459682f0282cbf8942ebd5498c189a0fa74c6784dbac67dcb9978eb4080b844a9059cbb000000000000000000000000bbb73925752cddb1e82134cfc77a8671582974820000000000000000000000000000000000000000000000056bc75e2d63100000c001a02a94cfd29965f36201b46871979e7e815762a51add37146fd1e05064a20b8c7ea0718e6697657f0050772efa0e6e3f42ef79fc599b1348f426fc119ee60626a6dc00000000","v":"0x1","r":"0x9322658daec57f0d7fcd3a9eb387494535593e729f036382739e950494db33da","s":"0x356b53c7f91c7b9c7a8a42ac9b207022c4d12582e14d7209f4a69764536ad8e8","to":"0x95ff8d3ce9dcb7455beb7845143bea84fe5c4f6f","chainId":"0xaa36a7","accessList":[],"hash":"0x65dbe42a0b7f404a7f018e83937c3994f1562ba47e51c8ba3d14f0c6c2ae27b6"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_74.json b/common/ethereum/testdata/tx_74.json new file mode 100644 index 0000000000..04ef57df53 --- /dev/null +++ b/common/ethereum/testdata/tx_74.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x719d","gasPrice":null,"maxPriorityFeePerGas":"0x3","maxFeePerGas":"0x185c16f","gas":"0x5e2c","value":"0x0","input":"0x000cfb882a4934d1f0cae49804849506a90000000000b178dadae1cff0c36741ddf66ae618cfbf1e52a15fe37ad7079a1b7ede2f7efc47f75fb947dfdb84f433c59b7dbc2d16fcda3f6fc1cd6de9e74437fceee0abe9eb6fe95392369a39f5f5e1936d3f7e71eefed1923a69dda1031003e715c836cd9cd6e22590a49b6b1af9e077d4d204fe4d5f1b049ed546d673f6597f68f6f1b65c708df789d8b25c9b27f32eecfef248695bea5aa1d70f56d83cdb718c71f5dd93679627820c3c7100100000ffff857555c301","v":"0x1","r":"0x3ed766f6c018e9fb7d52b0e857ea38e3198533d90d88fe51984c57357d46e632","s":"0x7e17e2df9326104b0fa18691306499b503c2883f32ff1b28e66a0b4c5a8d7292","to":"0xff00000000000000000000000000000000042069","chainId":"0xaa36a7","accessList":[],"hash":"0x65dfe40af92c848183ec0dbf2aee80081793ed739add50605dddafe2e8b66431"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_75.json b/common/ethereum/testdata/tx_75.json new file mode 100644 index 0000000000..1b37ae04c7 --- /dev/null +++ b/common/ethereum/testdata/tx_75.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x16f","gasPrice":null,"maxPriorityFeePerGas":"0x3","maxFeePerGas":"0x185c16f","gas":"0xf4c8","value":"0x0","input":"0x005f7fb14c36e426f34c9e26217f158658000000000a3278da8cd6e937d48dffc7714393ad2632961631146586061135a1109a619090ec8cac591232a26930d9225c6aaca390b59808d965bd907d09d1d8d75ca4d2c4f81dbfefc7fdcf3ff038e77dde379eaf0a3cdb168ef6646c3e727c948fb06c1fe555ba39a42b7dc78bced151e1777c3ae1494c582b2f198795a1e5e546202f5ece5aaf9ec044961d7bd2790991aff4e911fb2957072b587ea5023e9410ffd6a4fe7fa058bf13d9f2fc3f5ddc5513174d7de00d780ab4984a187130799d32f11f75a41e34680a80b2026777cf5867252dddc826fd6eb9f17599dc4c560ad9d013bc9beb72ad05061e3407406a10c2dbdeb5a6d5730ca356e792d3aaf23e449b58186d4bfe9eeefee7bfaf99a0410b0094278db6b5520f3fe8542747566286e4ed34093197b3572a2cfddbae3e0bdfbc041ab404405eca72b217db36cb845e2ec17a762a307370ae15fd6ed3db428fbfc3579243958cc32269ea210951f23445dddf79f832cbd71b4790332fd9b34f5c198ab756e338c32951b8075a03605198a3d3f4bcd83559364c829a40e112bc9e29b059d42ea1b72beaa231ced8010dda02a03da133a4e871544f7af5d3a8e9b08e8e701dd75487ebe8c5190c9f7a805a480268d01e00b10d391503d87b2ba6f647743ca2aa09e29637dbcfbaf39cbf78d5ce1cbe508d040d3a02e081b6577fab4f3373531b62f2af6f8d6229b9c67f74f91318335650371f79250268d0090045130e538777772ea2b6e795e7074d5452a4a5e705f5f4076b17be2affe2566e030d3a03e0a3b73ed2b135d721be4e0f6d55fb996b5a8ffe29f0713b3a0f35952ce2c5386d937158146db5f4ae3921580419a2f4dc81a7be6cfd4aea83b47154dcd44f98c2a91f8b2aa43dd01500171ca48e68101f7efe92272d61a87c741caa8b3abcd8fac0a0e4b33f522c3c631734e80e808c9887d8d3ffae684ce4ff15d76c6a7fcee7a5cc3c945e7847af27f150cd568e2c68f01e0092f9b18737311b3f3d67bd53e383f5189b21b1dd57062828c55f7763fb4812bda0412f001c0cc8b39efad054bac52439d5b6151f4fef3e0f31146045f5fd58093f64a2950f1af401c0d42d6daea2f0035eca9db25cc7fc60acc8cacce4012d5b0e75c9da9e93559a33a0415f00e41199cad9997d2d31537e303c339a2b2a32aadb654d5bf378758e8c078fc3c997641c569626da33e7832edc29094c10671e8c582021ea8e39d6b8b4bc49243c6d9dcb8287ef817e00f8b11711da6a36b668cc61c9858095dc95550ad9bd30642c2318b6f32fa43a2b1b34180080eb66fcf3b89c81c52ab23efc595e9a51ed470bbd0e47a2857a3452542828921b34180880a545d39dc3c94be718ae3c3d71461bf48ace5089c8bb666d719f8e7e780bf18c030d0601a0144a27cbcae3d7a5a7afadfad9692f618bc43231116e61b3c906fbd068dccd10d0603000fe229db40ee7e448e6ec121477478b56a848491bddb08b689b5d83367fa1527a40838f01f0dc4fb75927ca8c82de6338d4743b086e9a7f73db762855354d25f7c12aa94d918cc3cad1e646c35a575d9488b7149dd704182d2c9812a3ab5ba5f47c90408f752a2ce0f61ef80400a1419cc1ab572fcba975d1ebaa20e893d89e9a7486b1f746ee6e1d81b5719d1b34180a8086a6783769ffc92fd1f767562b875d4bf33d5afacffebbfaa968eb5dc9ad9b1c74d060380086691fa723778ac5267c0b6e7fcbf99c2939bd5c0c553a13a924dccd932d986f081a7c0a80871de636dcece512447f675c2df8032570f2b38f71f7fd36fbd658122cb07d3b0334180980d63a564158316e8c82f28769688c89a454b6db4f1e946c66bde212a5c3a9581634180d80b9d825091ba1aa5f86768d0665efc7367b6736e4e42129c88eaf82993871cf51320e7b9e864a2ee90d237622d15b3a79dd6bdbddb1d76619e7965c6e0d8710cbdcd0defd7be0330074830d4bcadc69b74508cb05cd695d1cb1e8fac21f93e4584fcf41efe42104c9a0c138005ce1a0f88ea09dc5781ba258d0d3977da5e5b05db1230396cfbba77987ef39b34083f10048542285ca58d1f924597cc6c79f1f46208c46be6cdcbfb4f9788bd113e2e2d2091a4cdcaf5e105e71e300878c7a705bd3b638265a5e1ce1758bcd6ae204957f59f285fe15d06012000af1e70706f0b4bcef9d4041781c0f4daa52b87bde5f9678e1c1e5f328c0dcd01134f81200abac6daf7fd5e186c85872dfb4eb8d98cc86a8161dca92ac420a3ef921eb56c345c661d1b4122c3fdf03c66185d5c421fad54eabc17a9bc8dcded8146f8c2fda247e3ee9e41e98bcdf148febcd97fafa11a5357edbf371cb36c4b4296b66c696d93882e33bc78dc050d0602a009eb6319f67dde968644e46530846b2de9de754ffccf862d69d0bb5c4e3700afca0c17400c47c0cd0f369ddaa23521a0c904cb474848e30bb35f7bdf6f422a505de2b23f1a0411a00aaa28bf475208c723fd2d14f7ea3628b3b501da370c35f7a7c8970fac29b6324d0e0abfd9399e2e212717fbc641985c3aa8e5e7f73e2320649f745d45cc95316fa65c829d06016002ecd27d6beca1a786aacaa7c4d59c8ef42c2934678a21f8f75f70b722255cd5b8b8cc3cad3be69d6a86c5e709727888aa6cca829da6e498daeb39554c6bfe35acbc59bd747ef813900e899a9f56339598e2549bc741b1fd795d03656dcef51ff6d24aca6bb22ef8df2366830773fa349a5cd2c7fd417d3ea2a672f7cba84ae5cb0e624ff4d3bad6f4a7708285e47d0603e00b21b4fcc8edd4a395240cdd043b971d522df7f22554b6b6ab3dfee483cf7e60c0f68b010005f9dbce7e1ebaa145918942122f8c6736d50fe2ec241571763b3cb09f3185b09040dbe0540ddb16b0e19cfa485b6fdcb57a12ce70b0bbc8127de7ede38fdfa3bdd1c3a56be021a2cdeff728c4efd0ba3e6acf79e2a3e780dbd796cd629db6782a887f27f842b3cf0cb02641c568166db672e9753e32b262bba8e4486c0681b0175813b59a2edb5be4513179f7fffff04d001b099293db19141bba6de5b496e38f0092f9ea5b942154219887751832b03b3c64083a500a86169811d3a4749cb405427e90ff5a518da6a041741d98287bbd69dd387b460a0c10f00f85d6ae0e0d14c5d38dc388e88d7e3c3173fa2cffe247e75af830867f664669041831500f88e237fa0260c87ae89b8406fff703c9b78444193c3bfe0bf1509ea1c45d5461434f8110023d21c5f10fa2fcba506bcac1e6f9d2d108d6f72f1c6dcff692c62591eabccb4020d56ef7f19a9dc380cb53fba8ae576dd4478947bf1e92ed54ea3393ba7fd3b864cea96c938ac226d7cd5a0dfe084aecfc3563ba304ee83e4a1a46e38b4ef6fd36e076d67fdfc31ea1e58bbbf6d2cf3e1c2dbf6a51086f8eaa8bbf19d52b1a7285bcff95bbc0776df2da26798a0c1fafdf55536e311973b390581419a161b5317b6490da853835edd8dfa8b6ceafd764741838d0058701671bbe25bb4b688b3d06805854d5f5aea8351681b3d9a8893712d0fd9e1040d3601a0361cc6bc6066d664da0723b4aeadc185975dcba0236f644ddbbdfe2ed9f05480065b00f0c444f1bdf2e620761f7f4a69fc4cda14abc000f7dbe08ae4e7d068a62895a9011a6cabffbf000000ffff566d49a201","v":"0x1","r":"0xadf9046069721009f2935f427f5db868a07ba0181cdaad78394c8910a4567934","s":"0x19f1a5c271173fde14aba42b54292985711f62d32050941914958d4282b9350","to":"0x1bac2f2b1f095cd4b85a65630b0626534ed0665c","chainId":"0xaa36a7","accessList":[],"hash":"0x0c5af703290a5be4b4eaef9bbf9078536155af65ccbc75d17511c92b7ad79e3c"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_76.json b/common/ethereum/testdata/tx_76.json new file mode 100644 index 0000000000..537e4d3411 --- /dev/null +++ b/common/ethereum/testdata/tx_76.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0xbca8","gasPrice":null,"maxPriorityFeePerGas":"0x3","maxFeePerGas":"0x185c16f","gas":"0x5914","value":"0x0","input":"0x00d64f44833e72ca39ac8baffc8bc2846300000000006178da005100aeffb84f00f84ca07472d10b669bf8aa6d82cfe667c31fd18462320a7b7be11d650efd09817d3652834c32d7a0e36ad8809415e4a21260ce7b16ad8d45b6a0124479da3f0c09e35f51489b07c0846592aecec0010000ffff5376270701","v":"0x1","r":"0x603ffe4bd24d6738d8b01fec40339a629d1e7f6a5a2d323bea3e7eae0fc60986","s":"0x3d93944c6f58616e356ed39d2e31ad1a278e6d2e28b4f61e6543862818a6dc19","to":"0xff00000000000000000000000000000000042069","chainId":"0xaa36a7","accessList":[],"hash":"0xeea766c55f74bd6d6ac66c3805890cde402fa3d9dda369a096e42d519a950c6d"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_77.json b/common/ethereum/testdata/tx_77.json new file mode 100644 index 0000000000..4d81fa74ee --- /dev/null +++ b/common/ethereum/testdata/tx_77.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x744bc","gasPrice":null,"maxPriorityFeePerGas":"0x3","maxFeePerGas":"0x185c16f","gas":"0x67fc","value":"0x0","input":"0x005ee1c3885cc39528cedef0d7247aaaba00000000014e78dadae1cff0c36741e6a69989953beb845c9698567e129ddd6bd2bbb1eccaa39556cc86735f29ba75a534fb78db2ee0f8b9985f83cdc53038853df5bf8fd36bed1f27cc5f76d6aa467d9051900e4ad06a499db46edf0188815e5fe4bf3f16e0ae3cf57bc589a3859f2676972e9d57fde750947a4ae402e9a0f4d0661f6fbb05c5e2b77d3a7b9c54dea83fdddf10552133ef80e8bd2f56d6471f7aaef361bf5e530a32f000d4400669a62f4f2c6ef91766b25d8dd8c0717bbb62f2da3d5c2e933cb4d2ef8a4ddd274fb48187a0062eaa3ef3445b2a6dd1f79ceb47e3e49b0e6f3c71dae43b5ffcf42d61db2c17e41735106de011a8810f4fcfec770f79a1b9f7599fc71fc9ed874c82ce3d49556e72d588e6bd7f3cee6939d1061e831a68bf31afdb3ce509dbfcffb76fac3956b1fdedd3af7bf2177dbceb35a74d4b3fcdc59a68034f1c00040000ffff4a15f1a001","v":"0x0","r":"0xea6618b6f272fcfeaad787b4a6fa1924c2b5a5e2e13d06d7cd2a73460781ee1f","s":"0x70220131f57e3061e3a16186a6b2d184a78b56f4585ba7b489e65643b707d1db","to":"0xff00000000000000000000000000000000048888","chainId":"0xaa36a7","accessList":[],"hash":"0xdd127227ec9beb79d1b2aba445e942d8274a0c58f7b73ee0e76233a632581ef4"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_78.json b/common/ethereum/testdata/tx_78.json new file mode 100644 index 0000000000..af39a33e07 --- /dev/null +++ b/common/ethereum/testdata/tx_78.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x200","gasPrice":null,"maxPriorityFeePerGas":"0x3","maxFeePerGas":"0x185c16f","gas":"0x98967f","value":"0x0","input":"0x10d008bd00000000000000000000000000000000000000000000000000000000001f15a70000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000126000000000000000000000000000000000000000000000000000000000000000209a25f5523fd048658899a403bd24f1b6a7a03ce37206fb29de9374e0a2724c463d95d4df946be6afb58557f813d52a3e1bf5b5a1086a4f2e2676827e4f5a8dde15c7565fe9ac1f9a7ebf0e75f335aeaafe0d6889c17a30ca416c1e540b968e2be921fc6a3a30c71fb75e9682ca050339bcf965f1e41b95d22a2552b625632b0e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000055ae9699a3d7b776bde60a58e44e798e2c78566300000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000011220000000000000000000000000000000000007eba7eecef49928f7c3f95e361e7f12a000000000000000000000000000000002959007eee0339dcf20e8492029a7d33000000000000000000000000000000000000000000000005b6adcbc7cab49a2300000000000000000000000000000000000000000000000ea689d3b978b520bb000000000000000000000000000000000000000000000003a908d4b9f6b769e60000000000000000000000000000000000000000000000000001ee028ff3e22c00000000000000000000000000000000000000000000000d9843b4aa27622da700000000000000000000000000000000000000000000000400216762dcb2650400000000000000000000000000000000000000000000000cbb615b31a26881e80000000000000000000000000000000000000000000000000002c84bdd36abb6000000000000000000000000000000000000000000000008e87c52f1027c3cca000000000000000000000000000000000000000000000009f2ef01063ec2a4f600000000000000000000000000000000000000000000000053fd88d01143c2c7000000000000000000000000000000000000000000000000000054685f35c8bc0000000000000000000000000000000000000000000000059a91a677125a32f90000000000000000000000000000000000000000000000013f9d73f893e9487f00000000000000000000000000000000000000000000000c5c411b8c72189d330000000000000000000000000000000000000000000000000002063ca12aae6429a1e4708d5f957ef6841b5f5ce8ca1d65683d2241a5be4f0fd441088dcf15112a77df2753b3b5910456ed419fe27ba9cb407b0c801febe98784b0062f35539c2c7271ea4b4f8981328b46c54b44eb6b4536a6d6b37e9a2f6602cc4b848b0ce01f62f1ec2bbde824813369cbe876e8fe761f7ffa087979f39d8dc62071e51453102f47c7793a20e937482c4df62081531c6b56926011569ddf6f450ebe927292209f0f845c92cdcdf85fd9da8d096a01bb729fdb5cd4b144f94299a6ffe8ff882572c9c1fa43d9c9fff38e5134ff54ad1e565a119d049be3477af80362d5f17e14ef9693a80af1c000a0d4118e6db9f2ea88be7b14b2fb67392450c9d64cf1801eb65a9ae0b01cd8fdbb863b9dae4babf6575791e06c7719c16d774cd3a41484105af58136d679d448ff8de3b0d222b9a9b3677d1c50f00d250bebd10a1193ce15a15ac5e90281097f67d522d270d097f1348ecae96cbbce4a53e7601adac93c21aafee1f1f53f1cb28c720e6a58b2a24e178e0fc2b42fb6c31ddc7b4a57661f045f43304a7da4372f1398d8465be4eff017fb10a20110449b3c4137ddb8d68f1c7d07365f36b56c79bf100df6e7b14654ef0d432eeaf09253e89cf41b7e020611384401e8fbafd001153f7ec6ee09e40d0e554fdb2b8f3d267a1a3f7cdba01c1e476b54e3ae0a8b9bfcf5adc43f18182456da93048d526f677d8e54cf85dd1c0bb4c8976eaa0a5fb299e55aa8d3e76c217bccae1bc8e5bf8f53919990c6616a0106aee3fdbbf290e8fddccf5872d5227d9c4c8c9e4d637c18e4b4791c72b0b92ad7ff37665133f43e22fe169aea4eb70fee69961a999e29602d92241487fa6b1bacb5c0c2947fce1e31a619db2a454a41020a90728a73129b15e5b8318787f72b7b930aa6af877a9f1ce3f05fdbd2b115000d48f802a7e6ff86d3ac01959f6c189caced225098a0c10e0ee9452306faedf7f2cbd6c76af4179389e063756e97183c31ff4564193acbce6c7bbb5f22e0e215c115089489958b534df3752b04362302c410fde5fd23b2f3bd705c08b00fe69bb48c8cdb790d386f81dd5dcfac75255e199540fde7fad6231767911072289b68a2f2414f51625bc511fce945b7f2138638a998b11f8642ced787914a494e24bce0e1e18b9e9028c7dc4919d755321bb7d8a7afe22ad8fe333d57570368122adc1caf9573753afb60b19b88a48c172d9a4d2d07829134a5d995d926a806e2c96d201e86c1a31b028ccea67b4eb2e625d0452c93659d5c867847ae1562312c2b6269bd9cd3abc69f29a57c055ec6502e5e5873ff31c3e45fbe1ade5e6eb32fb63f3f3844faac77eb6bf2fcf707172606ddf2ebe45cc501eec16507f78b0bfc89ff106eeb4aeb0b4418e3056311518d231207d1f7ecc894f9b33afe4e9e512b602b21ea7bbd1efd932081ce9bc979722dd0dc16ded515e8c97c619a8be236cd8712ac2ffc424853647fa35239a25c12199d3d91f3cf2a3a6c33c0e7250fba0bebc38d3748b00925b5a937712142eefa0da2d6609f6bf2ffa456099ddaa779bd6ef4aa91c8b526b78f20259de488eb7d1e5900a29ac9977e0f7cdc501d21bfcae48f7bbd96d4130c42dbaa6d2fae935425833fe478849cca6c2c1c4ff749629429e8c22b2f8fd39d579147b08017525113651903a6a63bf61c8147f35ee78428097c70f3b297a2e63176b36137b4ac1915edcde6986089519ec026e4b34cd347f3b3497b9d2b67be0040896f204cdfb00637a0003c05b4aea9f7b3fb0af340c520930f60f1aaa65aa0b136ddeb368e97168934d0c9c3f9a229c0b00a9ebba70f445f36f2ec8709bf474d1eb45a9cac692157ff145f4605b0d7b8ed0cdbee934bc5b0288391593bb95937038f1ed9ab4d269dd4f9993d637b19746748ed2036931072ef3fb3b82b1839b3e6fd09f7e4531f8a1235593acd2585b38cc8b026eeac7edad3ff625b11f269dc3bf0a616a8591b52cb94a78a7f8d8c3c7837153be2465b09dc25683e8028b3ab51a69e12a63e08edfbba6ebc826fdc1ff97952981724c987ae8bc4daa95ecf52ab8ce8899eff04155615e04c70d2c98aad2e920e37425586f7d87fff90ad92a714da95edbc5a0ef5d3161d673b406a6a57978088eb3a8095eeadbb3f81d79561cd8ad311afaa225398f32ff384a330717c3c95142eff59ad247ab2bf49da9c0b1691eea731c80ea7c130cf3d790773b1af733797ad5f8950c07c979aef7e6b1256744d00410413426dea964ba3d030e56311e695b57facd786a921f9d756ff508a2d7d9800c40a7175706cd182cd34a5a407715c2d57305e8e06a31a08a0f5563ad931242b072baed122e43ec7daa1866c1625cf04c6ee52ad29dd9924bb0dcdbd6b2a2c8e361cc17a1286361d7865cf7c1296256614c589f94bc3f43c3569d6767ada3cdb0b1502ac020ae0fd8cb6182c2aeb3e03f4b838087ebc1024b241cc2deba71075ac1c03409a62b35c1093130089f3a1e036e6bce2b4bb9af47d72587f70fb2f385d0f2a97ce68e17995b147280d259ff02f2d76ba08ca8d234043a5674075d271da0610eab0f47737d99592e9a0e0cdb017ebae707cc53d11d60d93ca82eb01610a21dfd2de44e891633de9673539966d06d98696cabc89bbebda24765f23c50c78274e3e73dd8a81e68f67988ef1066fd8d53191113ca40da327e1b9f7b33d393421dce405a3d4f37fc8ed96b55b8f02c976560f220d128f3d0730f009f7d102cb22b5a75b2c063755333b7264d575e2595ae4adc54146037b080b6796ab99b47e097956ef86cb30e3ffe711c1d9d033dd0312d9c17327be6dacf72727a8919c2306bdd1e04a7708dbb19aa9143c73bfb48be9f28f0b75a46b887dfc531b8e583421cd3737b14824775ec58d2ac7a953eb4b044ca1477c7ff3761ff65cd8272d511dfc8ab7201546ac5934f920e69d1c3290cf30554d00439b7f56c73d403cabc311098b43f5724682787060c046c71f1618db64efae046c1346936cebf521569b0bea0cb28b4adbcb76f4256db9d3ba397824762d2dae0c7cb8644bcae16411552682ac591205ce34c7764c823445933489233a942bacaf86b9a61da86858ee8d2deff562133b7da093642485b30f4b89c4dfa7f5fd5921afeb95b3a9fb0d4ad111b025feb90ab2d8bf5e8784a051dbab06b0a2f55200cf782039b6b2bcaf078b1b90dff7826809c43228ca505009e5ca6b651b9fed37c76eb36498a894b29a5b10ea96aa21ebd95b47b8b865ff6a0f351039a56144af016763c1409b645d515002f67e1c98a32defb783f846d62b6df7892680e93df64e292a4f18cd0aa7561605837be667c2c309eaea838ae6d50fae73b8d4c4b6c864795f84e40f53ea02f70675777b5dd9d8ff76811572c86cc89b5a231c8dc4b799a0f62579320dc146b5009e2f05b78eda7489b9a9590de3affcc9ec5453af4b7392eaca6b515fd28b370f2d62c2f28b254e778e462053666d90dfd06d71fbbc72512b5624b0c1e45733190190d670e4b31d87e502d83c0f9251f2e93da4f8a2478e416d44ffecbd81082e665f9891fec4453beb682154f91adecdcd2f4c7accdb2fb5cce84ad3ef826a1285647e78bc4e80d8aea8d536b08cbdc773fe3d8b167fbb1f82d85b08a56cf91fc2067ccae4f3fa2df86bf8214e0eba3e598ab64d18fc67a500137a2fee0f270fa0d509654ddf97ce7ef846710dd415960599f67284b7c86600b47fb387bd2d28e5e6a9bfbc44805b2b4117055447b4cfd1006db944cd8d450d5bd781af098c177bc391676a0077df8ff69c5e1e499ef246e1d5633ebfabd6ce770f508839bb2c9a6545aca0bde9aa8a7bf4fb34f1dc46ac081b3ef52713a9cbe5d3f56d830e1ef68b76134ad69f10b39f33ac1ab86322c4e81a5f6d901d09f64ce3babcdf97121f6bed7b74bb7d7d167577a4bd9954405c8d864e8d43d30cb2ca8239682c9b29005192fc3c653e1a9fac0ebabdb19d87ed432d65a78bd77be25865c348c357151bea175816e0b9028971ec51f68a6f38a5aa5c14fd252639c81ecdaef5210a17a24a4fc3f6ab209d7fa99d440d2604133df0a7b333a71f7be6fb04e8ca6a7f112bde052e100d5f4f82708a3ec106f23a61e294cf7504c2fb35bcd205dd584501f85477bc0e7f905a3f2ecc7813966c628c3f0ef085d3896b669a37686070f02d3a694db07ef7b99816aec12491f685db7ec7388934767eb14099fe463679d904a0ea03c26b9c5b149a0890ca8c87ec4a9a4bbb598d6b9a0301bd35cf3c5d6516b1c9cf088986f04e0c6bdda9bf418948353c20f3223c9c7bb9035ab7d6653900ee5b8a4c4580571e147b4b637bbf77ab1df9488e38756075fe3b0ac2403c6f17e088b03d7c9f401942ce25588fe034841f46a236436971949ab748f73419730e6d2b455eb57dc90391f66c301e75960ba58a964a85190766ba6f59d1665d761390bcc525c8fe81902cfaae3377697d8a94d20797349eff62d393d59dc3bc280ce4cce4cc77d97903ebb464a3b15544945ff73fa8f0bbb8e8e07600af53a1bf146480154f112d70f9772ed3ecf8bc8f9f1eff837b4e33b4546a873ef642eb9f25043cca391c28bcdaf766c2d9027dc3a593477d0cec53be02cd387e2ea46fb1171b0f9a4b55710f2cfbceb0d1bcaf4bc09861e9e1a9ea14f27ab12614fd56aa2c7cf30e4bfc458ecf7f958eba63ef14c0e5aa9f87c6841b36fcbc2d6c78f4f314e370d94da562d2e49238d744f10dbb8d1d230646937477ab889694c4ef1b991bb8eba1590477bca8b0334da56c4477b384f986743d861aa43fae573f44e3ab29179a958e190ee6d1bd36cd347ec8b5862578abccfc499ce56b8040189ed62e2c8a34b6473279de8850f65d1b24aae1e47c659a9f9f76376a362de019e1e14814029d09add9a6c564b7d9b99c6e1081c6cb032fdad2d859089a8307d056dcec0eedd4c38a7fc21ff3a51151a064f7e27e8a93a7318f69d06ac2dffe3ac9ed8726e1f8563bfd3189ec9c8937d54ea9d3036301fbfb58e1757a960dbafb7479f41cf84245653e217acbb6d425f87cd2d2db9309eedc08836a6abc1cb70e3cbf961eca7d614a68329a9b26c90399ea52b9f07308029460aa3c4f9214f6603f10531aa690ca178bd265563fb9b60f883b77d8f9a3517a562ac895d7839826637be124e899c4b15bbe9d5cb88171163898d392df91834152dc6760adffafb959dd9317edbed588b7f662be5a6dd1c29172fd63b75cca02b309ff347efde6f517b5df2fcf84fb41fcebaef490411a1208b3a7f27728f42f44472c9f87315173c559520c5fc6cc1ca328aac39486582e9f4c34beb44283fb9e2a27a4fc09474268849f000000000000000000000000000000000000000000000000000000000000","v":"0x1","r":"0xa7293ce17bbb109b509982c8334e24dc5322562d55f1e80cae27d725431a0e92","s":"0x559cf089ed0b3fb96ea196341f07963164be048eddb97c70d98a752f439dd8d7","to":"0x95ff8d3ce9dcb7455beb7845143bea84fe5c4f6f","chainId":"0xaa36a7","accessList":[],"hash":"0x4cf1577b40f7214e6abb765810c14b989a025b89d984516f8de5216a75579786"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_79.json b/common/ethereum/testdata/tx_79.json new file mode 100644 index 0000000000..0e193a4499 --- /dev/null +++ b/common/ethereum/testdata/tx_79.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x5","gasPrice":null,"maxPriorityFeePerGas":"0x3","maxFeePerGas":"0x185c16f","gas":"0x632d3","value":"0x1","input":"0xb6d5a39700000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000a081e7f91f8b928d38477371bca514e2941330dfc158446151e1a6d5996781c32e000000000000000000000000bbe91c322c449e9a6d2fcac62015bbad07a9b1d8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002fc000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000bbe91c322c449e9a6d2fcac62015bbad07a9b1d8000000000000000000000000000000000000000000000000000000006592b5d7000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000417e2c97092d8ce2934cd4132f47ada558ef4a1d4783d62b81e16acad9f18995231742f9989f5fce80110b071864713c0c5ad0826b6f7fad72433a1b4f55a754651c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002fcf902f9b901bf02f901bb83028c5f028459682f008459682f01830379ee941000777700000000000000000000000000000002872386f26fc10000b90144e2dc903300000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000aa36a7000000000000000000000000434e47a10d6c09548b96473a094aa0c1f874c28d000000000000000000000000e705498492d0ae94ca9365d395d2c6924f24f4450000000000000000000000000000000000000000000000006124fee993bc000000000000000000000000000000000000000000000000000000000000000222e0000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000434e47a10d6c09548b96473a094aa0c1f874c28d00000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000c001a03b3ca799b49a2b8eaa8fc80a3964e318016ff11c867b836a2186525047da3149a02a7076ea8e417ce4621512b8835e8b1cfd46927cca33b88cb36a67779eadd6bab87c02f87983028c5f018459682f008459682f018302798b94a198a1bae026d2bec0ac782ee9303eeb7f574ec387038d7ea4c68000841249c58bc001a0f37cde4bbc8580c8b73a3124b1b61fe565ce4b8452754b4efb7dc8c6045affd8a041e6512ef7407b01d33281390c04c8e1c633642738d2a8f1cebd8831cd8e8b67b8b702f8b483028c5f82231d8459682f008459682f0282cbf8942ebd5498c189a0fa74c6784dbac67dcb9978eb4080b844a9059cbb000000000000000000000000bbb73925752cddb1e82134cfc77a8671582974820000000000000000000000000000000000000000000000056bc75e2d63100000c001a02a94cfd29965f36201b46871979e7e815762a51add37146fd1e05064a20b8c7ea0718e6697657f0050772efa0e6e3f42ef79fc599b1348f426fc119ee60626a6dc00000000","v":"0x1","r":"0x37c476bed73aa0218569816a90ae094d4207f57563e246c6bc5609b624ac733b","s":"0x1501b0cd8005c672c50fb02989c2d6c758a5d3d2ce6655b3a1e491e60dd08e1a","to":"0x95ff8d3ce9dcb7455beb7845143bea84fe5c4f6f","chainId":"0xaa36a7","accessList":[],"hash":"0x2814077d8a964ee17856564df2c9902523697f82d1aca79a4ed296186b3c8bc6"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_8.json b/common/ethereum/testdata/tx_8.json new file mode 100644 index 0000000000..ba909fcde4 --- /dev/null +++ b/common/ethereum/testdata/tx_8.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x11","gasPrice":null,"maxPriorityFeePerGas":"0xef2e08b9","maxFeePerGas":"0xef2e08b9","gas":"0x680ac","value":"0x0","input":"0xbcfaa79d00000000000000000000000098158dbd4dc0fb8c2d0aa47505e212db016a471f","v":"0x1","r":"0xa1ff1d0fec4c9da9631c2cefbd5ff0904dfdce9d42b5a38cb639ae3fe352c4ca","s":"0x37b4234f16f8b6c9e3f3eabb29a77789ba9a75b373dcf0e386e6e07a7e2262ce","to":"0x837ad475f0177bcb6cf426a725d5d52dfb577ee7","chainId":"0xaa36a7","accessList":[],"hash":"0xe12ca21ecb93c5de1b9223427fc1d1a6673da8f4014fd944df8b311d411b4ad9"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_80.json b/common/ethereum/testdata/tx_80.json new file mode 100644 index 0000000000..6155a7ad55 --- /dev/null +++ b/common/ethereum/testdata/tx_80.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x49609","gasPrice":null,"maxPriorityFeePerGas":"0x3","maxFeePerGas":"0x185c16f","gas":"0x681c","value":"0x0","input":"0x0006c56eed921185d5a1ff2458a6e94ef700000000015078dadae1cff0c367c192cf8f97eae45eede1327a7067facdf727dbd9750bfd8f4f0abd75b2cd389e75a352b38fb7c5825ffbe72db8b92dfd9ce886df1d7c357dfd2d7d4ad24633a7be3e7cb2edc72fcedd3f5a5227ad3b700062a08a87c6ef7b73391d1ee427cfe1ee7ec45370e7defab28e2f61163cfaddc1a7b2dc8936f010d440d5fd0ba6cd5fb99df5e0a639731dbacee4fc5c11626b907ef3c6a4b5c7d56d54f3928936f008d4c0821d7666a5578f2e93b5ce5e25659ab9e8c5afd7f3932ad9dfbcbfadb5b7324ab99b68038f410d643936f762d7b4bcd29e1c0db9888abd057a3ec23ab3fd12a75dfa5f5ba83da749bfd9c7db72c135de2762cb726d9eccbbb0fbcb23a56da96b855e3f5861f36cc731c6d5774f9e599e0832f004d4c0f3563fe4b258af48f4091f3e36f3d0960f67e7f6a587c5ebdd15e1d9539ab777f957a20d3c7500100000ffff909f063c01","v":"0x0","r":"0x366ccf35882406f4cf4c3fd5d81c102bbeb3e4e680256ff3071b79957255273","s":"0x71871d5ddda31765741c8dde1bdd573d0075467cd20e8a9b4a97a11c61fbc850","to":"0x1342f979e476ce420b5cb74d2ef57eb4f65116ce","chainId":"0xaa36a7","accessList":[],"hash":"0x542fd6cb8f1465444481ae4673add119e7643e58713d3315e2ac12fc5b4bed55"} \ No newline at end of file diff --git a/common/ethereum/testdata/tx_9.json b/common/ethereum/testdata/tx_9.json new file mode 100644 index 0000000000..ecd0b94a63 --- /dev/null +++ b/common/ethereum/testdata/tx_9.json @@ -0,0 +1 @@ +{"type":"0x2","nonce":"0x1","gasPrice":null,"maxPriorityFeePerGas":"0xef2e08b9","maxFeePerGas":"0xef2e08b9","gas":"0x680ac","value":"0x0","input":"0xbcfaa79d000000000000000000000000bf43c5a5da6c1e6212f4ee2c3176838f1c873e82","v":"0x0","r":"0x9424a7c1bd1ec243af1429c3173c1f353fa99941b550a569a0a1185ecf7981ec","s":"0x4acb02eb70b98a2966e251b89d4a0f5ff65b757c96394aa167b4d092658033b1","to":"0x837ad475f0177bcb6cf426a725d5d52dfb577ee7","chainId":"0xaa36a7","accessList":[],"hash":"0xe0715c59ad3003efdf41dba93eb350db4f20a5e6ccbddc311b61f598cdf2d58b"} \ No newline at end of file diff --git a/common/proof_test.go b/common/proof_test.go index b6b2173444..2976c073c6 100644 --- a/common/proof_test.go +++ b/common/proof_test.go @@ -10,9 +10,12 @@ import ( "encoding/json" "fmt" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/rlp" "github.com/stretchr/testify/require" "github.com/zeta-chain/zetacore/common" "github.com/zeta-chain/zetacore/common/bitcoin" + "github.com/zeta-chain/zetacore/common/ethereum" "github.com/zeta-chain/zetacore/x/crosschain/keeper" crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" @@ -22,7 +25,13 @@ import ( "github.com/btcsuite/btcutil" ) -const numBlocksToTest = 100 +const ( + headerPath = "./ethereum/testdata/header.json" + txPrefixPath = "./ethereum/testdata/tx_" + receiptPrefixPath = "./ethereum/testdata/receipt_" + txCount = 81 + numBlocksToTest = 100 +) type Block struct { TssAddress string `json:"tssAddress"` @@ -53,7 +62,10 @@ func LoadTestBlocks(t *testing.T) Blocks { func Test_IsErrorInvalidProof(t *testing.T) { require.False(t, common.IsErrorInvalidProof(nil)) require.False(t, common.IsErrorInvalidProof(errors.New("foo"))) - require.True(t, common.IsErrorInvalidProof(common.NewErrInvalidProof(errors.New("foo")))) + invalidProofErr := errors.New("foo") + invalidProof := common.NewErrInvalidProof(invalidProofErr) + require.True(t, common.IsErrorInvalidProof(invalidProof)) + require.Equal(t, invalidProofErr.Error(), invalidProof.Error()) } func TestBitcoinMerkleProof(t *testing.T) { @@ -77,6 +89,62 @@ func TestBitcoinMerkleProof(t *testing.T) { } } +func TestEthereumMerkleProof(t *testing.T) { + header, err := readHeader() + require.NoError(t, err) + b, err := rlp.EncodeToBytes(&header) + require.NoError(t, err) + + headerData := common.NewEthereumHeader(b) + t.Run("should verify tx proof", func(t *testing.T) { + var txs types.Transactions + for i := 0; i < txCount; i++ { + tx, err := readTx(i) + require.NoError(t, err) + txs = append(txs, &tx) + } + + // generate a trie from the txs and compare the root hash with the one in the header + txsTree := ethereum.NewTrie(txs) + require.EqualValues(t, header.TxHash.Hex(), txsTree.Trie.Hash().Hex()) + + for i := range txs { + // generate a proof for each tx and verify it + proof, err := txsTree.GenerateProof(i) + require.NoError(t, err) + + ethProof := common.NewEthereumProof(proof) + + _, err = ethProof.Verify(headerData, i) + require.NoError(t, err) + } + }) + + t.Run("should fail to verify receipts proof", func(t *testing.T) { + var receipts types.Receipts + for i := 0; i < txCount; i++ { + receipt, err := readReceipt(i) + require.NoError(t, err) + receipts = append(receipts, &receipt) + } + + // generate a trie from the receipts and compare the root hash with the one in the header + txsTree := ethereum.NewTrie(receipts) + require.EqualValues(t, header.ReceiptHash.Hex(), txsTree.Trie.Hash().Hex()) + + for i := range receipts { + // generate a proof for each receipt and verify it + proof, err := txsTree.GenerateProof(i) + require.NoError(t, err) + + ethProof := common.NewEthereumProof(proof) + + _, err = ethProof.Verify(headerData, i) + require.Error(t, err) + } + }) +} + func BitcoinMerkleProofLiveTest(t *testing.T) { client := createBTCClient(t) bn, err := client.GetBlockCount() @@ -149,3 +217,52 @@ func validateBitcoinBlock(t *testing.T, _ *wire.BlockHeader, headerBytes []byte, require.Nil(t, txBytes) } } + +// readHeader reads a header from a file. +// TODO: centralize test data +// https://github.com/zeta-chain/node/issues/1874 +func readHeader() (header types.Header, err error) { + file, err := os.Open(headerPath) + if err != nil { + return header, err + } + defer file.Close() + + decoder := json.NewDecoder(file) + err = decoder.Decode(&header) + return header, err +} + +// readTx reads a tx from a file. +// TODO: centralize test data +// https://github.com/zeta-chain/node/issues/1874 +func readTx(index int) (tx types.Transaction, err error) { + filePath := fmt.Sprintf("%s%d.json", txPrefixPath, index) + + file, err := os.Open(filePath) + if err != nil { + return tx, err + } + defer file.Close() + + decoder := json.NewDecoder(file) + err = decoder.Decode(&tx) + return tx, err +} + +// readReceipt reads a receipt from a file. +// TODO: centralize test data +// https://github.com/zeta-chain/node/issues/1874 +func readReceipt(index int) (receipt types.Receipt, err error) { + filePath := fmt.Sprintf("%s%d.json", receiptPrefixPath, index) + + file, err := os.Open(filePath) + if err != nil { + return receipt, err + } + defer file.Close() + + decoder := json.NewDecoder(file) + err = decoder.Decode(&receipt) + return receipt, err +} From cce926d96719a24b2110ecb69a42956899475010 Mon Sep 17 00:00:00 2001 From: skosito Date: Mon, 18 Mar 2024 21:50:28 +0100 Subject: [PATCH 20/41] Add bitcoin proof test --- common/bitcoin/proof_test.go | 96 ++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/common/bitcoin/proof_test.go b/common/bitcoin/proof_test.go index 7e3ae1ff51..f5a4326d82 100644 --- a/common/bitcoin/proof_test.go +++ b/common/bitcoin/proof_test.go @@ -1 +1,97 @@ package bitcoin_test + +import ( + "bytes" + "encoding/base64" + "encoding/hex" + "encoding/json" + "os" + "testing" + + "github.com/btcsuite/btcd/btcjson" + "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcutil" + "github.com/stretchr/testify/require" + "github.com/zeta-chain/zetacore/common/bitcoin" +) + +type Block struct { + TssAddress string `json:"tssAddress"` + Height int `json:"height"` + Nonce uint64 `json:"nonce"` + OutTxid string `json:"outTxid"` + HeaderBase64 string `json:"headerBase64"` + BlockBase64 string `json:"blockBase64"` +} + +type Blocks struct { + Blocks []Block `json:"blocks"` +} + +func TestBitcoinMerkleProof(t *testing.T) { + blocks := LoadTestBlocks(t) + + for _, b := range blocks.Blocks { + // Deserialize the header bytes from base64 + headerBytes, err := base64.StdEncoding.DecodeString(b.HeaderBase64) + require.NoError(t, err) + header := unmarshalHeader(t, headerBytes) + + // Deserialize the block bytes from base64 + blockBytes, err := base64.StdEncoding.DecodeString(b.BlockBase64) + require.NoError(t, err) + blockVerbose := &btcjson.GetBlockVerboseTxResult{} + err = json.Unmarshal(blockBytes, blockVerbose) + require.NoError(t, err) + + // Validate block + validateBitcoinBlock(t, header, headerBytes, blockVerbose, b.OutTxid, b.TssAddress, b.Nonce) + } +} +func LoadTestBlocks(t *testing.T) Blocks { + file, err := os.Open("../testdata/test_blocks.json") + require.NoError(t, err) + defer file.Close() + + // Decode the JSON into the data struct + var blocks Blocks + err = json.NewDecoder(file).Decode(&blocks) + require.NoError(t, err) + + return blocks +} + +func unmarshalHeader(t *testing.T, headerBytes []byte) *wire.BlockHeader { + var header wire.BlockHeader + err := header.Deserialize(bytes.NewReader(headerBytes)) + require.NoError(t, err) + return &header +} + +func validateBitcoinBlock(t *testing.T, header *wire.BlockHeader, headerBytes []byte, blockVerbose *btcjson.GetBlockVerboseTxResult, outTxid string, tssAddress string, nonce uint64) { + // Deserialization should work for each transaction in the block + txns := []*btcutil.Tx{} + for _, res := range blockVerbose.Tx { + txBytes, err := hex.DecodeString(res.Hex) + require.NoError(t, err) + tx, err := btcutil.NewTxFromBytes(txBytes) + require.NoError(t, err) + txns = append(txns, tx) + } + + // Build a Merkle tree from the transaction hashes and verify each transaction + mk := bitcoin.NewMerkle(txns) + for i, tx := range txns { + path, index, err := mk.BuildMerkleProof(i) + require.NoError(t, err) + + // True proof should verify + pass := bitcoin.Prove(*tx.Hash(), header.MerkleRoot, path, index) + require.True(t, pass) + + // Fake proof should not verify + fakeIndex := index ^ 0xffffffff // flip all bits + pass = bitcoin.Prove(*tx.Hash(), header.MerkleRoot, path, fakeIndex) + require.False(t, pass) + } +} From cff5322e11f6b0ae43f526bd76d62ca24452dae2 Mon Sep 17 00:00:00 2001 From: skosito Date: Mon, 18 Mar 2024 22:32:09 +0100 Subject: [PATCH 21/41] Add more bitcoin proof tests --- common/bitcoin/bitcoin_spv_test.go | 50 +++++++++++++++ common/bitcoin/proof_test.go | 97 +++++++++++++++++++----------- 2 files changed, 113 insertions(+), 34 deletions(-) create mode 100644 common/bitcoin/bitcoin_spv_test.go diff --git a/common/bitcoin/bitcoin_spv_test.go b/common/bitcoin/bitcoin_spv_test.go new file mode 100644 index 0000000000..2ef9825e03 --- /dev/null +++ b/common/bitcoin/bitcoin_spv_test.go @@ -0,0 +1,50 @@ +package bitcoin + +import ( + "testing" + + "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/stretchr/testify/require" +) + +func TestProve(t *testing.T) { + t.Run("returns true", func(t *testing.T) { + result := Prove(chainhash.Hash{}, chainhash.Hash{}, []byte{}, 0) + require.True(t, result) + }) +} + +func TestVerifyHash256Merkle(t *testing.T) { + tests := []struct { + name string + proof []byte + index uint + want bool + }{ + { + name: "valid length but invalid index and content", + proof: make([]byte, 32), + index: 0, + want: true, + }, + { + name: "invalid length not multiple of 32", + proof: make([]byte, 34), + index: 0, + want: false, + }, + { + name: "invalid length equal to 64", + proof: make([]byte, 64), + index: 0, + want: false, + }, + } + + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + result := VerifyHash256Merkle(tc.proof, tc.index) + require.Equal(t, tc.want, result) + }) + } +} diff --git a/common/bitcoin/proof_test.go b/common/bitcoin/proof_test.go index f5a4326d82..625e020c38 100644 --- a/common/bitcoin/proof_test.go +++ b/common/bitcoin/proof_test.go @@ -1,4 +1,4 @@ -package bitcoin_test +package bitcoin import ( "bytes" @@ -9,10 +9,10 @@ import ( "testing" "github.com/btcsuite/btcd/btcjson" + "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcutil" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common/bitcoin" ) type Block struct { @@ -31,23 +31,68 @@ type Blocks struct { func TestBitcoinMerkleProof(t *testing.T) { blocks := LoadTestBlocks(t) - for _, b := range blocks.Blocks { - // Deserialize the header bytes from base64 - headerBytes, err := base64.StdEncoding.DecodeString(b.HeaderBase64) - require.NoError(t, err) - header := unmarshalHeader(t, headerBytes) + t.Run("it should verify merkle proof", func(t *testing.T) { + for _, b := range blocks.Blocks { + // Deserialize the header bytes from base64 + headerBytes, err := base64.StdEncoding.DecodeString(b.HeaderBase64) + require.NoError(t, err) + header := unmarshalHeader(t, headerBytes) - // Deserialize the block bytes from base64 - blockBytes, err := base64.StdEncoding.DecodeString(b.BlockBase64) - require.NoError(t, err) - blockVerbose := &btcjson.GetBlockVerboseTxResult{} - err = json.Unmarshal(blockBytes, blockVerbose) - require.NoError(t, err) + // Deserialize the block bytes from base64 + blockBytes, err := base64.StdEncoding.DecodeString(b.BlockBase64) + require.NoError(t, err) + blockVerbose := &btcjson.GetBlockVerboseTxResult{} + err = json.Unmarshal(blockBytes, blockVerbose) + require.NoError(t, err) - // Validate block - validateBitcoinBlock(t, header, headerBytes, blockVerbose, b.OutTxid, b.TssAddress, b.Nonce) - } + txns := getBlockTxs(t, blockVerbose) + + // Build a Merkle tree from the transaction hashes and verify each transaction + mk := NewMerkle(txns) + for i, tx := range txns { + path, index, err := mk.BuildMerkleProof(i) + require.NoError(t, err) + + // True proof should verify + pass := Prove(*tx.Hash(), header.MerkleRoot, path, index) + require.True(t, pass) + + // Fake proof should not verify + fakeIndex := index ^ 0xffffffff // flip all bits + pass = Prove(*tx.Hash(), header.MerkleRoot, path, fakeIndex) + require.False(t, pass) + } + } + }) + + t.Run("it should fail if tree is empty", func(t *testing.T) { + mt := Merkle{ + tree: []*chainhash.Hash{}, + } + + _, _, err := mt.BuildMerkleProof(0) + require.Error(t, err) + }) + + t.Run("it should fail if tree len + 1 is not power of 2", func(t *testing.T) { + mt := Merkle{ + tree: []*chainhash.Hash{{}, {}}, + } + + _, _, err := mt.BuildMerkleProof(0) + require.Error(t, err) + }) + + t.Run("it should fail if txIndex out of range", func(t *testing.T) { + mt := Merkle{ + tree: []*chainhash.Hash{{}}, + } + + _, _, err := mt.BuildMerkleProof(2) + require.Error(t, err) + }) } + func LoadTestBlocks(t *testing.T) Blocks { file, err := os.Open("../testdata/test_blocks.json") require.NoError(t, err) @@ -68,8 +113,7 @@ func unmarshalHeader(t *testing.T, headerBytes []byte) *wire.BlockHeader { return &header } -func validateBitcoinBlock(t *testing.T, header *wire.BlockHeader, headerBytes []byte, blockVerbose *btcjson.GetBlockVerboseTxResult, outTxid string, tssAddress string, nonce uint64) { - // Deserialization should work for each transaction in the block +func getBlockTxs(t *testing.T, blockVerbose *btcjson.GetBlockVerboseTxResult) []*btcutil.Tx { txns := []*btcutil.Tx{} for _, res := range blockVerbose.Tx { txBytes, err := hex.DecodeString(res.Hex) @@ -78,20 +122,5 @@ func validateBitcoinBlock(t *testing.T, header *wire.BlockHeader, headerBytes [] require.NoError(t, err) txns = append(txns, tx) } - - // Build a Merkle tree from the transaction hashes and verify each transaction - mk := bitcoin.NewMerkle(txns) - for i, tx := range txns { - path, index, err := mk.BuildMerkleProof(i) - require.NoError(t, err) - - // True proof should verify - pass := bitcoin.Prove(*tx.Hash(), header.MerkleRoot, path, index) - require.True(t, pass) - - // Fake proof should not verify - fakeIndex := index ^ 0xffffffff // flip all bits - pass = bitcoin.Prove(*tx.Hash(), header.MerkleRoot, path, fakeIndex) - require.False(t, pass) - } + return txns } From 9293b726057cda132c39a8b18e0937043a6e774d Mon Sep 17 00:00:00 2001 From: skosito Date: Mon, 18 Mar 2024 22:37:48 +0100 Subject: [PATCH 22/41] Add case for put key --- common/ethereum/proof_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/ethereum/proof_test.go b/common/ethereum/proof_test.go index 41efe7c733..7ee0df65a9 100644 --- a/common/ethereum/proof_test.go +++ b/common/ethereum/proof_test.go @@ -87,6 +87,9 @@ func TestProofGeneration(t *testing.T) { require.NoError(t, err) require.True(t, has) + err = proof.Put(key, proof.Values[0]) + require.NoError(t, err) + key2 := proof2.Keys[2] has, err = proof.Has(key2) require.NoError(t, err) From 0e2189f80472e95986492cfc6b2b92490dfdc9fd Mon Sep 17 00:00:00 2001 From: skosito Date: Mon, 18 Mar 2024 22:45:03 +0100 Subject: [PATCH 23/41] Add witness program chain tests --- common/chain_test.go | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/common/chain_test.go b/common/chain_test.go index 987d27567d..f694439d8c 100644 --- a/common/chain_test.go +++ b/common/chain_test.go @@ -1,9 +1,12 @@ package common import ( + "encoding/hex" "testing" + "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcutil" ethcommon "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" ) @@ -280,6 +283,47 @@ func TestChain_IsEmpty(t *testing.T) { require.False(t, ZetaChainMainnet().IsEmpty()) } +func TestChain_WitnessProgram(t *testing.T) { + // Ordinarily the private key would come from whatever storage mechanism + // is being used, but for this example just hard code it. + privKeyBytes, err := hex.DecodeString("22a47fa09a223f2aa079edf85a7c2" + + "d4f8720ee63e502ee2869afab7de234b80c") + require.NoError(t, err) + + t.Run("should return btc address", func(t *testing.T) { + _, pubKey := btcec.PrivKeyFromBytes(btcec.S256(), privKeyBytes) + pubKeyHash := btcutil.Hash160(pubKey.SerializeCompressed()) + addr, err := btcutil.NewAddressWitnessPubKeyHash(pubKeyHash, &chaincfg.RegressionNetParams) + require.NoError(t, err) + + chain := BtcTestNetChain() + _, err = chain.BTCAddressFromWitnessProgram(addr.WitnessProgram()) + require.NoError(t, err) + }) + + t.Run("should fail for wrong chain id", func(t *testing.T) { + _, pubKey := btcec.PrivKeyFromBytes(btcec.S256(), privKeyBytes) + pubKeyHash := btcutil.Hash160(pubKey.SerializeCompressed()) + addr, err := btcutil.NewAddressWitnessPubKeyHash(pubKeyHash, &chaincfg.RegressionNetParams) + require.NoError(t, err) + + chain := GoerliChain() + _, err = chain.BTCAddressFromWitnessProgram(addr.WitnessProgram()) + require.Error(t, err) + }) + + t.Run("should fail for wrong witness program", func(t *testing.T) { + _, pubKey := btcec.PrivKeyFromBytes(btcec.S256(), privKeyBytes) + pubKeyHash := btcutil.Hash160(pubKey.SerializeCompressed()) + addr, err := btcutil.NewAddressWitnessPubKeyHash(pubKeyHash, &chaincfg.RegressionNetParams) + require.NoError(t, err) + + chain := BtcTestNetChain() + _, err = chain.BTCAddressFromWitnessProgram(addr.WitnessProgram()[0:19]) + require.Error(t, err) + }) +} + func TestChains_Has(t *testing.T) { chains := Chains{ZetaChainMainnet(), ZetaTestnetChain()} require.True(t, chains.Has(ZetaChainMainnet())) From 26b22c8d0ef803e37d09a35dd5cc441148d7643b Mon Sep 17 00:00:00 2001 From: skosito Date: Mon, 18 Mar 2024 23:15:00 +0100 Subject: [PATCH 24/41] Cleanup --- changelog.md | 1 + common/bitcoin/bitcoin_spv_test.go | 2 +- common/bitcoin/proof_test.go | 2 ++ common/gas_limits_test.go | 4 ++-- common/proof_test.go | 2 ++ 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/changelog.md b/changelog.md index 9a5a68c0ee..6c8af96543 100644 --- a/changelog.md +++ b/changelog.md @@ -40,6 +40,7 @@ * [1805](https://github.com/zeta-chain/node/pull/1805) - add admin and performance test and fix upgrade test * [1879](https://github.com/zeta-chain/node/pull/1879) - full coverage for messages in types packages * [1899](https://github.com/zeta-chain/node/pull/1899) - add empty test files so packages are included in coverage +* [1903](https://github.com/zeta-chain/node/pull/1903) - common package tests ### Fixes diff --git a/common/bitcoin/bitcoin_spv_test.go b/common/bitcoin/bitcoin_spv_test.go index 2ef9825e03..c675e74bf9 100644 --- a/common/bitcoin/bitcoin_spv_test.go +++ b/common/bitcoin/bitcoin_spv_test.go @@ -8,7 +8,7 @@ import ( ) func TestProve(t *testing.T) { - t.Run("returns true", func(t *testing.T) { + t.Run("returns true if empty block", func(t *testing.T) { result := Prove(chainhash.Hash{}, chainhash.Hash{}, []byte{}, 0) require.True(t, result) }) diff --git a/common/bitcoin/proof_test.go b/common/bitcoin/proof_test.go index 625e020c38..58028f427c 100644 --- a/common/bitcoin/proof_test.go +++ b/common/bitcoin/proof_test.go @@ -93,6 +93,8 @@ func TestBitcoinMerkleProof(t *testing.T) { }) } +// TODO: centralize test data +// https://github.com/zeta-chain/node/issues/1874 func LoadTestBlocks(t *testing.T) Blocks { file, err := os.Open("../testdata/test_blocks.json") require.NoError(t, err) diff --git a/common/gas_limits_test.go b/common/gas_limits_test.go index ce8b1d4663..0277e48c61 100644 --- a/common/gas_limits_test.go +++ b/common/gas_limits_test.go @@ -10,9 +10,9 @@ import ( func TestMultiplyGasPrice(t *testing.T) { testCases := []struct { name string - medianGasPrice string // Using string to facilitate easy creation of sdkmath.Uint + medianGasPrice string multiplierString string - expectedGasPrice string // Expected result also as string for easy comparison + expectedGasPrice string wantErr bool }{ { diff --git a/common/proof_test.go b/common/proof_test.go index 2976c073c6..e272e78b2d 100644 --- a/common/proof_test.go +++ b/common/proof_test.go @@ -46,6 +46,8 @@ type Blocks struct { Blocks []Block `json:"blocks"` } +// TODO: centralize test data +// https://github.com/zeta-chain/node/issues/1874 func LoadTestBlocks(t *testing.T) Blocks { file, err := os.Open("./testdata/test_blocks.json") require.NoError(t, err) From 220cf279dbf76a3e6a98f8796b10eba33e3807ac Mon Sep 17 00:00:00 2001 From: skosito Date: Mon, 18 Mar 2024 23:40:32 +0100 Subject: [PATCH 25/41] Cleanup test data a bit --- common/bitcoin/proof_test.go | 32 +----- common/ethereum/proof_test.go | 48 +-------- common/headers_test.go | 5 +- common/proof_test.go | 97 ++--------------- .../ethereum}/header.json | 0 .../ethereum}/receipt_0.json | 0 .../ethereum}/receipt_1.json | 0 .../ethereum}/receipt_10.json | 0 .../ethereum}/receipt_11.json | 0 .../ethereum}/receipt_12.json | 0 .../ethereum}/receipt_13.json | 0 .../ethereum}/receipt_14.json | 0 .../ethereum}/receipt_15.json | 0 .../ethereum}/receipt_16.json | 0 .../ethereum}/receipt_17.json | 0 .../ethereum}/receipt_18.json | 0 .../ethereum}/receipt_19.json | 0 .../ethereum}/receipt_2.json | 0 .../ethereum}/receipt_20.json | 0 .../ethereum}/receipt_21.json | 0 .../ethereum}/receipt_22.json | 0 .../ethereum}/receipt_23.json | 0 .../ethereum}/receipt_24.json | 0 .../ethereum}/receipt_25.json | 0 .../ethereum}/receipt_26.json | 0 .../ethereum}/receipt_27.json | 0 .../ethereum}/receipt_28.json | 0 .../ethereum}/receipt_29.json | 0 .../ethereum}/receipt_3.json | 0 .../ethereum}/receipt_30.json | 0 .../ethereum}/receipt_31.json | 0 .../ethereum}/receipt_32.json | 0 .../ethereum}/receipt_33.json | 0 .../ethereum}/receipt_34.json | 0 .../ethereum}/receipt_35.json | 0 .../ethereum}/receipt_36.json | 0 .../ethereum}/receipt_37.json | 0 .../ethereum}/receipt_38.json | 0 .../ethereum}/receipt_39.json | 0 .../ethereum}/receipt_4.json | 0 .../ethereum}/receipt_40.json | 0 .../ethereum}/receipt_41.json | 0 .../ethereum}/receipt_42.json | 0 .../ethereum}/receipt_43.json | 0 .../ethereum}/receipt_44.json | 0 .../ethereum}/receipt_45.json | 0 .../ethereum}/receipt_46.json | 0 .../ethereum}/receipt_47.json | 0 .../ethereum}/receipt_48.json | 0 .../ethereum}/receipt_49.json | 0 .../ethereum}/receipt_5.json | 0 .../ethereum}/receipt_50.json | 0 .../ethereum}/receipt_51.json | 0 .../ethereum}/receipt_52.json | 0 .../ethereum}/receipt_53.json | 0 .../ethereum}/receipt_54.json | 0 .../ethereum}/receipt_55.json | 0 .../ethereum}/receipt_56.json | 0 .../ethereum}/receipt_57.json | 0 .../ethereum}/receipt_58.json | 0 .../ethereum}/receipt_59.json | 0 .../ethereum}/receipt_6.json | 0 .../ethereum}/receipt_60.json | 0 .../ethereum}/receipt_61.json | 0 .../ethereum}/receipt_62.json | 0 .../ethereum}/receipt_63.json | 0 .../ethereum}/receipt_64.json | 0 .../ethereum}/receipt_65.json | 0 .../ethereum}/receipt_66.json | 0 .../ethereum}/receipt_67.json | 0 .../ethereum}/receipt_68.json | 0 .../ethereum}/receipt_69.json | 0 .../ethereum}/receipt_7.json | 0 .../ethereum}/receipt_70.json | 0 .../ethereum}/receipt_71.json | 0 .../ethereum}/receipt_72.json | 0 .../ethereum}/receipt_73.json | 0 .../ethereum}/receipt_74.json | 0 .../ethereum}/receipt_75.json | 0 .../ethereum}/receipt_76.json | 0 .../ethereum}/receipt_77.json | 0 .../ethereum}/receipt_78.json | 0 .../ethereum}/receipt_79.json | 0 .../ethereum}/receipt_8.json | 0 .../ethereum}/receipt_80.json | 0 .../ethereum}/receipt_9.json | 0 .../testdata => testdata/ethereum}/tx_0.json | 0 .../testdata => testdata/ethereum}/tx_1.json | 0 .../testdata => testdata/ethereum}/tx_10.json | 0 .../testdata => testdata/ethereum}/tx_11.json | 0 .../testdata => testdata/ethereum}/tx_12.json | 0 .../testdata => testdata/ethereum}/tx_13.json | 0 .../testdata => testdata/ethereum}/tx_14.json | 0 .../testdata => testdata/ethereum}/tx_15.json | 0 .../testdata => testdata/ethereum}/tx_16.json | 0 .../testdata => testdata/ethereum}/tx_17.json | 0 .../testdata => testdata/ethereum}/tx_18.json | 0 .../testdata => testdata/ethereum}/tx_19.json | 0 .../testdata => testdata/ethereum}/tx_2.json | 0 .../testdata => testdata/ethereum}/tx_20.json | 0 .../testdata => testdata/ethereum}/tx_21.json | 0 .../testdata => testdata/ethereum}/tx_22.json | 0 .../testdata => testdata/ethereum}/tx_23.json | 0 .../testdata => testdata/ethereum}/tx_24.json | 0 .../testdata => testdata/ethereum}/tx_25.json | 0 .../testdata => testdata/ethereum}/tx_26.json | 0 .../testdata => testdata/ethereum}/tx_27.json | 0 .../testdata => testdata/ethereum}/tx_28.json | 0 .../testdata => testdata/ethereum}/tx_29.json | 0 .../testdata => testdata/ethereum}/tx_3.json | 0 .../testdata => testdata/ethereum}/tx_30.json | 0 .../testdata => testdata/ethereum}/tx_31.json | 0 .../testdata => testdata/ethereum}/tx_32.json | 0 .../testdata => testdata/ethereum}/tx_33.json | 0 .../testdata => testdata/ethereum}/tx_34.json | 0 .../testdata => testdata/ethereum}/tx_35.json | 0 .../testdata => testdata/ethereum}/tx_36.json | 0 .../testdata => testdata/ethereum}/tx_37.json | 0 .../testdata => testdata/ethereum}/tx_38.json | 0 .../testdata => testdata/ethereum}/tx_39.json | 0 .../testdata => testdata/ethereum}/tx_4.json | 0 .../testdata => testdata/ethereum}/tx_40.json | 0 .../testdata => testdata/ethereum}/tx_41.json | 0 .../testdata => testdata/ethereum}/tx_42.json | 0 .../testdata => testdata/ethereum}/tx_43.json | 0 .../testdata => testdata/ethereum}/tx_44.json | 0 .../testdata => testdata/ethereum}/tx_45.json | 0 .../testdata => testdata/ethereum}/tx_46.json | 0 .../testdata => testdata/ethereum}/tx_47.json | 0 .../testdata => testdata/ethereum}/tx_48.json | 0 .../testdata => testdata/ethereum}/tx_49.json | 0 .../testdata => testdata/ethereum}/tx_5.json | 0 .../testdata => testdata/ethereum}/tx_50.json | 0 .../testdata => testdata/ethereum}/tx_51.json | 0 .../testdata => testdata/ethereum}/tx_52.json | 0 .../testdata => testdata/ethereum}/tx_53.json | 0 .../testdata => testdata/ethereum}/tx_54.json | 0 .../testdata => testdata/ethereum}/tx_55.json | 0 .../testdata => testdata/ethereum}/tx_56.json | 0 .../testdata => testdata/ethereum}/tx_57.json | 0 .../testdata => testdata/ethereum}/tx_58.json | 0 .../testdata => testdata/ethereum}/tx_59.json | 0 .../testdata => testdata/ethereum}/tx_6.json | 0 .../testdata => testdata/ethereum}/tx_60.json | 0 .../testdata => testdata/ethereum}/tx_61.json | 0 .../testdata => testdata/ethereum}/tx_62.json | 0 .../testdata => testdata/ethereum}/tx_63.json | 0 .../testdata => testdata/ethereum}/tx_64.json | 0 .../testdata => testdata/ethereum}/tx_65.json | 0 .../testdata => testdata/ethereum}/tx_66.json | 0 .../testdata => testdata/ethereum}/tx_67.json | 0 .../testdata => testdata/ethereum}/tx_68.json | 0 .../testdata => testdata/ethereum}/tx_69.json | 0 .../testdata => testdata/ethereum}/tx_7.json | 0 .../testdata => testdata/ethereum}/tx_70.json | 0 .../testdata => testdata/ethereum}/tx_71.json | 0 .../testdata => testdata/ethereum}/tx_72.json | 0 .../testdata => testdata/ethereum}/tx_73.json | 0 .../testdata => testdata/ethereum}/tx_74.json | 0 .../testdata => testdata/ethereum}/tx_75.json | 0 .../testdata => testdata/ethereum}/tx_76.json | 0 .../testdata => testdata/ethereum}/tx_77.json | 0 .../testdata => testdata/ethereum}/tx_78.json | 0 .../testdata => testdata/ethereum}/tx_79.json | 0 .../testdata => testdata/ethereum}/tx_8.json | 0 .../testdata => testdata/ethereum}/tx_80.json | 0 .../testdata => testdata/ethereum}/tx_9.json | 0 common/testdata/testdata.go | 101 ++++++++++++++++++ 168 files changed, 118 insertions(+), 165 deletions(-) rename common/{ethereum/testdata => testdata/ethereum}/header.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_0.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_1.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_10.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_11.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_12.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_13.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_14.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_15.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_16.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_17.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_18.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_19.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_2.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_20.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_21.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_22.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_23.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_24.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_25.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_26.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_27.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_28.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_29.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_3.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_30.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_31.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_32.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_33.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_34.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_35.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_36.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_37.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_38.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_39.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_4.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_40.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_41.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_42.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_43.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_44.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_45.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_46.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_47.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_48.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_49.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_5.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_50.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_51.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_52.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_53.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_54.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_55.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_56.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_57.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_58.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_59.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_6.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_60.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_61.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_62.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_63.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_64.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_65.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_66.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_67.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_68.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_69.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_7.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_70.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_71.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_72.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_73.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_74.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_75.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_76.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_77.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_78.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_79.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_8.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_80.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/receipt_9.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_0.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_1.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_10.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_11.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_12.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_13.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_14.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_15.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_16.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_17.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_18.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_19.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_2.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_20.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_21.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_22.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_23.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_24.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_25.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_26.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_27.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_28.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_29.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_3.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_30.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_31.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_32.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_33.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_34.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_35.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_36.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_37.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_38.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_39.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_4.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_40.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_41.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_42.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_43.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_44.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_45.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_46.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_47.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_48.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_49.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_5.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_50.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_51.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_52.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_53.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_54.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_55.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_56.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_57.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_58.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_59.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_6.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_60.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_61.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_62.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_63.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_64.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_65.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_66.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_67.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_68.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_69.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_7.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_70.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_71.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_72.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_73.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_74.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_75.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_76.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_77.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_78.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_79.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_8.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_80.json (100%) rename common/{ethereum/testdata => testdata/ethereum}/tx_9.json (100%) create mode 100644 common/testdata/testdata.go diff --git a/common/bitcoin/proof_test.go b/common/bitcoin/proof_test.go index 58028f427c..0f521c4934 100644 --- a/common/bitcoin/proof_test.go +++ b/common/bitcoin/proof_test.go @@ -5,7 +5,6 @@ import ( "encoding/base64" "encoding/hex" "encoding/json" - "os" "testing" "github.com/btcsuite/btcd/btcjson" @@ -13,23 +12,11 @@ import ( "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcutil" "github.com/stretchr/testify/require" + "github.com/zeta-chain/zetacore/common/testdata" ) -type Block struct { - TssAddress string `json:"tssAddress"` - Height int `json:"height"` - Nonce uint64 `json:"nonce"` - OutTxid string `json:"outTxid"` - HeaderBase64 string `json:"headerBase64"` - BlockBase64 string `json:"blockBase64"` -} - -type Blocks struct { - Blocks []Block `json:"blocks"` -} - func TestBitcoinMerkleProof(t *testing.T) { - blocks := LoadTestBlocks(t) + blocks := testdata.LoadTestBlocks(t) t.Run("it should verify merkle proof", func(t *testing.T) { for _, b := range blocks.Blocks { @@ -93,21 +80,6 @@ func TestBitcoinMerkleProof(t *testing.T) { }) } -// TODO: centralize test data -// https://github.com/zeta-chain/node/issues/1874 -func LoadTestBlocks(t *testing.T) Blocks { - file, err := os.Open("../testdata/test_blocks.json") - require.NoError(t, err) - defer file.Close() - - // Decode the JSON into the data struct - var blocks Blocks - err = json.NewDecoder(file).Decode(&blocks) - require.NoError(t, err) - - return blocks -} - func unmarshalHeader(t *testing.T, headerBytes []byte) *wire.BlockHeader { var header wire.BlockHeader err := header.Deserialize(bytes.NewReader(headerBytes)) diff --git a/common/ethereum/proof_test.go b/common/ethereum/proof_test.go index 7ee0df65a9..da0a60e463 100644 --- a/common/ethereum/proof_test.go +++ b/common/ethereum/proof_test.go @@ -1,28 +1,20 @@ package ethereum import ( - "encoding/json" - "fmt" - "os" "testing" "github.com/ethereum/go-ethereum/core/types" "github.com/stretchr/testify/require" -) - -const ( - headerPath = "./testdata/header.json" - receiptPrefixPath = "./testdata/receipt_" - receiptCount = 81 + "github.com/zeta-chain/zetacore/common/testdata" ) func TestProofGeneration(t *testing.T) { - header, err := readHeader() + header, err := testdata.ReadEthHeader() require.NoError(t, err) var receipts types.Receipts - for i := 0; i < receiptCount; i++ { - receipt, err := readReceipt(i) + for i := 0; i < testdata.TxsCount; i++ { + receipt, err := testdata.ReadEthReceipt(i) require.NoError(t, err) receipts = append(receipts, &receipt) } @@ -135,35 +127,3 @@ func TestProofGeneration(t *testing.T) { require.Error(t, err) }) } - -// readHeader reads a header from a file. -// TODO: centralize test data -// https://github.com/zeta-chain/node/issues/1874 -func readHeader() (header types.Header, err error) { - file, err := os.Open(headerPath) - if err != nil { - return header, err - } - defer file.Close() - - decoder := json.NewDecoder(file) - err = decoder.Decode(&header) - return header, err -} - -// readReceipt reads a receipt from a file. -// TODO: centralize test data -// https://github.com/zeta-chain/node/issues/1874 -func readReceipt(index int) (receipt types.Receipt, err error) { - filePath := fmt.Sprintf("%s%d.json", receiptPrefixPath, index) - - file, err := os.Open(filePath) - if err != nil { - return receipt, err - } - defer file.Close() - - decoder := json.NewDecoder(file) - err = decoder.Decode(&receipt) - return receipt, err -} diff --git a/common/headers_test.go b/common/headers_test.go index 49e14dea29..e427763866 100644 --- a/common/headers_test.go +++ b/common/headers_test.go @@ -19,6 +19,7 @@ import ( "github.com/ethereum/go-ethereum/ethclient" "github.com/stretchr/testify/require" "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/common/testdata" ) const numHeadersToTest = 100 @@ -83,7 +84,7 @@ func TestFalseEthereumHeader(t *testing.T) { } func TestTrueBitcoinHeader(t *testing.T) { - blocks := LoadTestBlocks(t) + blocks := testdata.LoadTestBlocks(t) for _, b := range blocks.Blocks { // Deserialize the header bytes from base64 @@ -97,7 +98,7 @@ func TestTrueBitcoinHeader(t *testing.T) { } func TestFakeBitcoinHeader(t *testing.T) { - blocks := LoadTestBlocks(t) + blocks := testdata.LoadTestBlocks(t) for _, b := range blocks.Blocks { // Deserialize the header bytes from base64 diff --git a/common/proof_test.go b/common/proof_test.go index e272e78b2d..3b26b5c0a3 100644 --- a/common/proof_test.go +++ b/common/proof_test.go @@ -2,7 +2,6 @@ package common_test import ( "errors" - "os" "testing" "encoding/base64" @@ -16,6 +15,7 @@ import ( "github.com/zeta-chain/zetacore/common" "github.com/zeta-chain/zetacore/common/bitcoin" "github.com/zeta-chain/zetacore/common/ethereum" + "github.com/zeta-chain/zetacore/common/testdata" "github.com/zeta-chain/zetacore/x/crosschain/keeper" crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" @@ -26,41 +26,9 @@ import ( ) const ( - headerPath = "./ethereum/testdata/header.json" - txPrefixPath = "./ethereum/testdata/tx_" - receiptPrefixPath = "./ethereum/testdata/receipt_" - txCount = 81 - numBlocksToTest = 100 + numBlocksToTest = 100 ) -type Block struct { - TssAddress string `json:"tssAddress"` - Height int `json:"height"` - Nonce uint64 `json:"nonce"` - OutTxid string `json:"outTxid"` - HeaderBase64 string `json:"headerBase64"` - BlockBase64 string `json:"blockBase64"` -} - -type Blocks struct { - Blocks []Block `json:"blocks"` -} - -// TODO: centralize test data -// https://github.com/zeta-chain/node/issues/1874 -func LoadTestBlocks(t *testing.T) Blocks { - file, err := os.Open("./testdata/test_blocks.json") - require.NoError(t, err) - defer file.Close() - - // Decode the JSON into the data struct - var blocks Blocks - err = json.NewDecoder(file).Decode(&blocks) - require.NoError(t, err) - - return blocks -} - func Test_IsErrorInvalidProof(t *testing.T) { require.False(t, common.IsErrorInvalidProof(nil)) require.False(t, common.IsErrorInvalidProof(errors.New("foo"))) @@ -71,7 +39,7 @@ func Test_IsErrorInvalidProof(t *testing.T) { } func TestBitcoinMerkleProof(t *testing.T) { - blocks := LoadTestBlocks(t) + blocks := testdata.LoadTestBlocks(t) for _, b := range blocks.Blocks { // Deserialize the header bytes from base64 @@ -92,7 +60,7 @@ func TestBitcoinMerkleProof(t *testing.T) { } func TestEthereumMerkleProof(t *testing.T) { - header, err := readHeader() + header, err := testdata.ReadEthHeader() require.NoError(t, err) b, err := rlp.EncodeToBytes(&header) require.NoError(t, err) @@ -100,8 +68,8 @@ func TestEthereumMerkleProof(t *testing.T) { headerData := common.NewEthereumHeader(b) t.Run("should verify tx proof", func(t *testing.T) { var txs types.Transactions - for i := 0; i < txCount; i++ { - tx, err := readTx(i) + for i := 0; i < testdata.TxsCount; i++ { + tx, err := testdata.ReadEthTx(i) require.NoError(t, err) txs = append(txs, &tx) } @@ -124,8 +92,8 @@ func TestEthereumMerkleProof(t *testing.T) { t.Run("should fail to verify receipts proof", func(t *testing.T) { var receipts types.Receipts - for i := 0; i < txCount; i++ { - receipt, err := readReceipt(i) + for i := 0; i < testdata.TxsCount; i++ { + receipt, err := testdata.ReadEthReceipt(i) require.NoError(t, err) receipts = append(receipts, &receipt) } @@ -219,52 +187,3 @@ func validateBitcoinBlock(t *testing.T, _ *wire.BlockHeader, headerBytes []byte, require.Nil(t, txBytes) } } - -// readHeader reads a header from a file. -// TODO: centralize test data -// https://github.com/zeta-chain/node/issues/1874 -func readHeader() (header types.Header, err error) { - file, err := os.Open(headerPath) - if err != nil { - return header, err - } - defer file.Close() - - decoder := json.NewDecoder(file) - err = decoder.Decode(&header) - return header, err -} - -// readTx reads a tx from a file. -// TODO: centralize test data -// https://github.com/zeta-chain/node/issues/1874 -func readTx(index int) (tx types.Transaction, err error) { - filePath := fmt.Sprintf("%s%d.json", txPrefixPath, index) - - file, err := os.Open(filePath) - if err != nil { - return tx, err - } - defer file.Close() - - decoder := json.NewDecoder(file) - err = decoder.Decode(&tx) - return tx, err -} - -// readReceipt reads a receipt from a file. -// TODO: centralize test data -// https://github.com/zeta-chain/node/issues/1874 -func readReceipt(index int) (receipt types.Receipt, err error) { - filePath := fmt.Sprintf("%s%d.json", receiptPrefixPath, index) - - file, err := os.Open(filePath) - if err != nil { - return receipt, err - } - defer file.Close() - - decoder := json.NewDecoder(file) - err = decoder.Decode(&receipt) - return receipt, err -} diff --git a/common/ethereum/testdata/header.json b/common/testdata/ethereum/header.json similarity index 100% rename from common/ethereum/testdata/header.json rename to common/testdata/ethereum/header.json diff --git a/common/ethereum/testdata/receipt_0.json b/common/testdata/ethereum/receipt_0.json similarity index 100% rename from common/ethereum/testdata/receipt_0.json rename to common/testdata/ethereum/receipt_0.json diff --git a/common/ethereum/testdata/receipt_1.json b/common/testdata/ethereum/receipt_1.json similarity index 100% rename from common/ethereum/testdata/receipt_1.json rename to common/testdata/ethereum/receipt_1.json diff --git a/common/ethereum/testdata/receipt_10.json b/common/testdata/ethereum/receipt_10.json similarity index 100% rename from common/ethereum/testdata/receipt_10.json rename to common/testdata/ethereum/receipt_10.json diff --git a/common/ethereum/testdata/receipt_11.json b/common/testdata/ethereum/receipt_11.json similarity index 100% rename from common/ethereum/testdata/receipt_11.json rename to common/testdata/ethereum/receipt_11.json diff --git a/common/ethereum/testdata/receipt_12.json b/common/testdata/ethereum/receipt_12.json similarity index 100% rename from common/ethereum/testdata/receipt_12.json rename to common/testdata/ethereum/receipt_12.json diff --git a/common/ethereum/testdata/receipt_13.json b/common/testdata/ethereum/receipt_13.json similarity index 100% rename from common/ethereum/testdata/receipt_13.json rename to common/testdata/ethereum/receipt_13.json diff --git a/common/ethereum/testdata/receipt_14.json b/common/testdata/ethereum/receipt_14.json similarity index 100% rename from common/ethereum/testdata/receipt_14.json rename to common/testdata/ethereum/receipt_14.json diff --git a/common/ethereum/testdata/receipt_15.json b/common/testdata/ethereum/receipt_15.json similarity index 100% rename from common/ethereum/testdata/receipt_15.json rename to common/testdata/ethereum/receipt_15.json diff --git a/common/ethereum/testdata/receipt_16.json b/common/testdata/ethereum/receipt_16.json similarity index 100% rename from common/ethereum/testdata/receipt_16.json rename to common/testdata/ethereum/receipt_16.json diff --git a/common/ethereum/testdata/receipt_17.json b/common/testdata/ethereum/receipt_17.json similarity index 100% rename from common/ethereum/testdata/receipt_17.json rename to common/testdata/ethereum/receipt_17.json diff --git a/common/ethereum/testdata/receipt_18.json b/common/testdata/ethereum/receipt_18.json similarity index 100% rename from common/ethereum/testdata/receipt_18.json rename to common/testdata/ethereum/receipt_18.json diff --git a/common/ethereum/testdata/receipt_19.json b/common/testdata/ethereum/receipt_19.json similarity index 100% rename from common/ethereum/testdata/receipt_19.json rename to common/testdata/ethereum/receipt_19.json diff --git a/common/ethereum/testdata/receipt_2.json b/common/testdata/ethereum/receipt_2.json similarity index 100% rename from common/ethereum/testdata/receipt_2.json rename to common/testdata/ethereum/receipt_2.json diff --git a/common/ethereum/testdata/receipt_20.json b/common/testdata/ethereum/receipt_20.json similarity index 100% rename from common/ethereum/testdata/receipt_20.json rename to common/testdata/ethereum/receipt_20.json diff --git a/common/ethereum/testdata/receipt_21.json b/common/testdata/ethereum/receipt_21.json similarity index 100% rename from common/ethereum/testdata/receipt_21.json rename to common/testdata/ethereum/receipt_21.json diff --git a/common/ethereum/testdata/receipt_22.json b/common/testdata/ethereum/receipt_22.json similarity index 100% rename from common/ethereum/testdata/receipt_22.json rename to common/testdata/ethereum/receipt_22.json diff --git a/common/ethereum/testdata/receipt_23.json b/common/testdata/ethereum/receipt_23.json similarity index 100% rename from common/ethereum/testdata/receipt_23.json rename to common/testdata/ethereum/receipt_23.json diff --git a/common/ethereum/testdata/receipt_24.json b/common/testdata/ethereum/receipt_24.json similarity index 100% rename from common/ethereum/testdata/receipt_24.json rename to common/testdata/ethereum/receipt_24.json diff --git a/common/ethereum/testdata/receipt_25.json b/common/testdata/ethereum/receipt_25.json similarity index 100% rename from common/ethereum/testdata/receipt_25.json rename to common/testdata/ethereum/receipt_25.json diff --git a/common/ethereum/testdata/receipt_26.json b/common/testdata/ethereum/receipt_26.json similarity index 100% rename from common/ethereum/testdata/receipt_26.json rename to common/testdata/ethereum/receipt_26.json diff --git a/common/ethereum/testdata/receipt_27.json b/common/testdata/ethereum/receipt_27.json similarity index 100% rename from common/ethereum/testdata/receipt_27.json rename to common/testdata/ethereum/receipt_27.json diff --git a/common/ethereum/testdata/receipt_28.json b/common/testdata/ethereum/receipt_28.json similarity index 100% rename from common/ethereum/testdata/receipt_28.json rename to common/testdata/ethereum/receipt_28.json diff --git a/common/ethereum/testdata/receipt_29.json b/common/testdata/ethereum/receipt_29.json similarity index 100% rename from common/ethereum/testdata/receipt_29.json rename to common/testdata/ethereum/receipt_29.json diff --git a/common/ethereum/testdata/receipt_3.json b/common/testdata/ethereum/receipt_3.json similarity index 100% rename from common/ethereum/testdata/receipt_3.json rename to common/testdata/ethereum/receipt_3.json diff --git a/common/ethereum/testdata/receipt_30.json b/common/testdata/ethereum/receipt_30.json similarity index 100% rename from common/ethereum/testdata/receipt_30.json rename to common/testdata/ethereum/receipt_30.json diff --git a/common/ethereum/testdata/receipt_31.json b/common/testdata/ethereum/receipt_31.json similarity index 100% rename from common/ethereum/testdata/receipt_31.json rename to common/testdata/ethereum/receipt_31.json diff --git a/common/ethereum/testdata/receipt_32.json b/common/testdata/ethereum/receipt_32.json similarity index 100% rename from common/ethereum/testdata/receipt_32.json rename to common/testdata/ethereum/receipt_32.json diff --git a/common/ethereum/testdata/receipt_33.json b/common/testdata/ethereum/receipt_33.json similarity index 100% rename from common/ethereum/testdata/receipt_33.json rename to common/testdata/ethereum/receipt_33.json diff --git a/common/ethereum/testdata/receipt_34.json b/common/testdata/ethereum/receipt_34.json similarity index 100% rename from common/ethereum/testdata/receipt_34.json rename to common/testdata/ethereum/receipt_34.json diff --git a/common/ethereum/testdata/receipt_35.json b/common/testdata/ethereum/receipt_35.json similarity index 100% rename from common/ethereum/testdata/receipt_35.json rename to common/testdata/ethereum/receipt_35.json diff --git a/common/ethereum/testdata/receipt_36.json b/common/testdata/ethereum/receipt_36.json similarity index 100% rename from common/ethereum/testdata/receipt_36.json rename to common/testdata/ethereum/receipt_36.json diff --git a/common/ethereum/testdata/receipt_37.json b/common/testdata/ethereum/receipt_37.json similarity index 100% rename from common/ethereum/testdata/receipt_37.json rename to common/testdata/ethereum/receipt_37.json diff --git a/common/ethereum/testdata/receipt_38.json b/common/testdata/ethereum/receipt_38.json similarity index 100% rename from common/ethereum/testdata/receipt_38.json rename to common/testdata/ethereum/receipt_38.json diff --git a/common/ethereum/testdata/receipt_39.json b/common/testdata/ethereum/receipt_39.json similarity index 100% rename from common/ethereum/testdata/receipt_39.json rename to common/testdata/ethereum/receipt_39.json diff --git a/common/ethereum/testdata/receipt_4.json b/common/testdata/ethereum/receipt_4.json similarity index 100% rename from common/ethereum/testdata/receipt_4.json rename to common/testdata/ethereum/receipt_4.json diff --git a/common/ethereum/testdata/receipt_40.json b/common/testdata/ethereum/receipt_40.json similarity index 100% rename from common/ethereum/testdata/receipt_40.json rename to common/testdata/ethereum/receipt_40.json diff --git a/common/ethereum/testdata/receipt_41.json b/common/testdata/ethereum/receipt_41.json similarity index 100% rename from common/ethereum/testdata/receipt_41.json rename to common/testdata/ethereum/receipt_41.json diff --git a/common/ethereum/testdata/receipt_42.json b/common/testdata/ethereum/receipt_42.json similarity index 100% rename from common/ethereum/testdata/receipt_42.json rename to common/testdata/ethereum/receipt_42.json diff --git a/common/ethereum/testdata/receipt_43.json b/common/testdata/ethereum/receipt_43.json similarity index 100% rename from common/ethereum/testdata/receipt_43.json rename to common/testdata/ethereum/receipt_43.json diff --git a/common/ethereum/testdata/receipt_44.json b/common/testdata/ethereum/receipt_44.json similarity index 100% rename from common/ethereum/testdata/receipt_44.json rename to common/testdata/ethereum/receipt_44.json diff --git a/common/ethereum/testdata/receipt_45.json b/common/testdata/ethereum/receipt_45.json similarity index 100% rename from common/ethereum/testdata/receipt_45.json rename to common/testdata/ethereum/receipt_45.json diff --git a/common/ethereum/testdata/receipt_46.json b/common/testdata/ethereum/receipt_46.json similarity index 100% rename from common/ethereum/testdata/receipt_46.json rename to common/testdata/ethereum/receipt_46.json diff --git a/common/ethereum/testdata/receipt_47.json b/common/testdata/ethereum/receipt_47.json similarity index 100% rename from common/ethereum/testdata/receipt_47.json rename to common/testdata/ethereum/receipt_47.json diff --git a/common/ethereum/testdata/receipt_48.json b/common/testdata/ethereum/receipt_48.json similarity index 100% rename from common/ethereum/testdata/receipt_48.json rename to common/testdata/ethereum/receipt_48.json diff --git a/common/ethereum/testdata/receipt_49.json b/common/testdata/ethereum/receipt_49.json similarity index 100% rename from common/ethereum/testdata/receipt_49.json rename to common/testdata/ethereum/receipt_49.json diff --git a/common/ethereum/testdata/receipt_5.json b/common/testdata/ethereum/receipt_5.json similarity index 100% rename from common/ethereum/testdata/receipt_5.json rename to common/testdata/ethereum/receipt_5.json diff --git a/common/ethereum/testdata/receipt_50.json b/common/testdata/ethereum/receipt_50.json similarity index 100% rename from common/ethereum/testdata/receipt_50.json rename to common/testdata/ethereum/receipt_50.json diff --git a/common/ethereum/testdata/receipt_51.json b/common/testdata/ethereum/receipt_51.json similarity index 100% rename from common/ethereum/testdata/receipt_51.json rename to common/testdata/ethereum/receipt_51.json diff --git a/common/ethereum/testdata/receipt_52.json b/common/testdata/ethereum/receipt_52.json similarity index 100% rename from common/ethereum/testdata/receipt_52.json rename to common/testdata/ethereum/receipt_52.json diff --git a/common/ethereum/testdata/receipt_53.json b/common/testdata/ethereum/receipt_53.json similarity index 100% rename from common/ethereum/testdata/receipt_53.json rename to common/testdata/ethereum/receipt_53.json diff --git a/common/ethereum/testdata/receipt_54.json b/common/testdata/ethereum/receipt_54.json similarity index 100% rename from common/ethereum/testdata/receipt_54.json rename to common/testdata/ethereum/receipt_54.json diff --git a/common/ethereum/testdata/receipt_55.json b/common/testdata/ethereum/receipt_55.json similarity index 100% rename from common/ethereum/testdata/receipt_55.json rename to common/testdata/ethereum/receipt_55.json diff --git a/common/ethereum/testdata/receipt_56.json b/common/testdata/ethereum/receipt_56.json similarity index 100% rename from common/ethereum/testdata/receipt_56.json rename to common/testdata/ethereum/receipt_56.json diff --git a/common/ethereum/testdata/receipt_57.json b/common/testdata/ethereum/receipt_57.json similarity index 100% rename from common/ethereum/testdata/receipt_57.json rename to common/testdata/ethereum/receipt_57.json diff --git a/common/ethereum/testdata/receipt_58.json b/common/testdata/ethereum/receipt_58.json similarity index 100% rename from common/ethereum/testdata/receipt_58.json rename to common/testdata/ethereum/receipt_58.json diff --git a/common/ethereum/testdata/receipt_59.json b/common/testdata/ethereum/receipt_59.json similarity index 100% rename from common/ethereum/testdata/receipt_59.json rename to common/testdata/ethereum/receipt_59.json diff --git a/common/ethereum/testdata/receipt_6.json b/common/testdata/ethereum/receipt_6.json similarity index 100% rename from common/ethereum/testdata/receipt_6.json rename to common/testdata/ethereum/receipt_6.json diff --git a/common/ethereum/testdata/receipt_60.json b/common/testdata/ethereum/receipt_60.json similarity index 100% rename from common/ethereum/testdata/receipt_60.json rename to common/testdata/ethereum/receipt_60.json diff --git a/common/ethereum/testdata/receipt_61.json b/common/testdata/ethereum/receipt_61.json similarity index 100% rename from common/ethereum/testdata/receipt_61.json rename to common/testdata/ethereum/receipt_61.json diff --git a/common/ethereum/testdata/receipt_62.json b/common/testdata/ethereum/receipt_62.json similarity index 100% rename from common/ethereum/testdata/receipt_62.json rename to common/testdata/ethereum/receipt_62.json diff --git a/common/ethereum/testdata/receipt_63.json b/common/testdata/ethereum/receipt_63.json similarity index 100% rename from common/ethereum/testdata/receipt_63.json rename to common/testdata/ethereum/receipt_63.json diff --git a/common/ethereum/testdata/receipt_64.json b/common/testdata/ethereum/receipt_64.json similarity index 100% rename from common/ethereum/testdata/receipt_64.json rename to common/testdata/ethereum/receipt_64.json diff --git a/common/ethereum/testdata/receipt_65.json b/common/testdata/ethereum/receipt_65.json similarity index 100% rename from common/ethereum/testdata/receipt_65.json rename to common/testdata/ethereum/receipt_65.json diff --git a/common/ethereum/testdata/receipt_66.json b/common/testdata/ethereum/receipt_66.json similarity index 100% rename from common/ethereum/testdata/receipt_66.json rename to common/testdata/ethereum/receipt_66.json diff --git a/common/ethereum/testdata/receipt_67.json b/common/testdata/ethereum/receipt_67.json similarity index 100% rename from common/ethereum/testdata/receipt_67.json rename to common/testdata/ethereum/receipt_67.json diff --git a/common/ethereum/testdata/receipt_68.json b/common/testdata/ethereum/receipt_68.json similarity index 100% rename from common/ethereum/testdata/receipt_68.json rename to common/testdata/ethereum/receipt_68.json diff --git a/common/ethereum/testdata/receipt_69.json b/common/testdata/ethereum/receipt_69.json similarity index 100% rename from common/ethereum/testdata/receipt_69.json rename to common/testdata/ethereum/receipt_69.json diff --git a/common/ethereum/testdata/receipt_7.json b/common/testdata/ethereum/receipt_7.json similarity index 100% rename from common/ethereum/testdata/receipt_7.json rename to common/testdata/ethereum/receipt_7.json diff --git a/common/ethereum/testdata/receipt_70.json b/common/testdata/ethereum/receipt_70.json similarity index 100% rename from common/ethereum/testdata/receipt_70.json rename to common/testdata/ethereum/receipt_70.json diff --git a/common/ethereum/testdata/receipt_71.json b/common/testdata/ethereum/receipt_71.json similarity index 100% rename from common/ethereum/testdata/receipt_71.json rename to common/testdata/ethereum/receipt_71.json diff --git a/common/ethereum/testdata/receipt_72.json b/common/testdata/ethereum/receipt_72.json similarity index 100% rename from common/ethereum/testdata/receipt_72.json rename to common/testdata/ethereum/receipt_72.json diff --git a/common/ethereum/testdata/receipt_73.json b/common/testdata/ethereum/receipt_73.json similarity index 100% rename from common/ethereum/testdata/receipt_73.json rename to common/testdata/ethereum/receipt_73.json diff --git a/common/ethereum/testdata/receipt_74.json b/common/testdata/ethereum/receipt_74.json similarity index 100% rename from common/ethereum/testdata/receipt_74.json rename to common/testdata/ethereum/receipt_74.json diff --git a/common/ethereum/testdata/receipt_75.json b/common/testdata/ethereum/receipt_75.json similarity index 100% rename from common/ethereum/testdata/receipt_75.json rename to common/testdata/ethereum/receipt_75.json diff --git a/common/ethereum/testdata/receipt_76.json b/common/testdata/ethereum/receipt_76.json similarity index 100% rename from common/ethereum/testdata/receipt_76.json rename to common/testdata/ethereum/receipt_76.json diff --git a/common/ethereum/testdata/receipt_77.json b/common/testdata/ethereum/receipt_77.json similarity index 100% rename from common/ethereum/testdata/receipt_77.json rename to common/testdata/ethereum/receipt_77.json diff --git a/common/ethereum/testdata/receipt_78.json b/common/testdata/ethereum/receipt_78.json similarity index 100% rename from common/ethereum/testdata/receipt_78.json rename to common/testdata/ethereum/receipt_78.json diff --git a/common/ethereum/testdata/receipt_79.json b/common/testdata/ethereum/receipt_79.json similarity index 100% rename from common/ethereum/testdata/receipt_79.json rename to common/testdata/ethereum/receipt_79.json diff --git a/common/ethereum/testdata/receipt_8.json b/common/testdata/ethereum/receipt_8.json similarity index 100% rename from common/ethereum/testdata/receipt_8.json rename to common/testdata/ethereum/receipt_8.json diff --git a/common/ethereum/testdata/receipt_80.json b/common/testdata/ethereum/receipt_80.json similarity index 100% rename from common/ethereum/testdata/receipt_80.json rename to common/testdata/ethereum/receipt_80.json diff --git a/common/ethereum/testdata/receipt_9.json b/common/testdata/ethereum/receipt_9.json similarity index 100% rename from common/ethereum/testdata/receipt_9.json rename to common/testdata/ethereum/receipt_9.json diff --git a/common/ethereum/testdata/tx_0.json b/common/testdata/ethereum/tx_0.json similarity index 100% rename from common/ethereum/testdata/tx_0.json rename to common/testdata/ethereum/tx_0.json diff --git a/common/ethereum/testdata/tx_1.json b/common/testdata/ethereum/tx_1.json similarity index 100% rename from common/ethereum/testdata/tx_1.json rename to common/testdata/ethereum/tx_1.json diff --git a/common/ethereum/testdata/tx_10.json b/common/testdata/ethereum/tx_10.json similarity index 100% rename from common/ethereum/testdata/tx_10.json rename to common/testdata/ethereum/tx_10.json diff --git a/common/ethereum/testdata/tx_11.json b/common/testdata/ethereum/tx_11.json similarity index 100% rename from common/ethereum/testdata/tx_11.json rename to common/testdata/ethereum/tx_11.json diff --git a/common/ethereum/testdata/tx_12.json b/common/testdata/ethereum/tx_12.json similarity index 100% rename from common/ethereum/testdata/tx_12.json rename to common/testdata/ethereum/tx_12.json diff --git a/common/ethereum/testdata/tx_13.json b/common/testdata/ethereum/tx_13.json similarity index 100% rename from common/ethereum/testdata/tx_13.json rename to common/testdata/ethereum/tx_13.json diff --git a/common/ethereum/testdata/tx_14.json b/common/testdata/ethereum/tx_14.json similarity index 100% rename from common/ethereum/testdata/tx_14.json rename to common/testdata/ethereum/tx_14.json diff --git a/common/ethereum/testdata/tx_15.json b/common/testdata/ethereum/tx_15.json similarity index 100% rename from common/ethereum/testdata/tx_15.json rename to common/testdata/ethereum/tx_15.json diff --git a/common/ethereum/testdata/tx_16.json b/common/testdata/ethereum/tx_16.json similarity index 100% rename from common/ethereum/testdata/tx_16.json rename to common/testdata/ethereum/tx_16.json diff --git a/common/ethereum/testdata/tx_17.json b/common/testdata/ethereum/tx_17.json similarity index 100% rename from common/ethereum/testdata/tx_17.json rename to common/testdata/ethereum/tx_17.json diff --git a/common/ethereum/testdata/tx_18.json b/common/testdata/ethereum/tx_18.json similarity index 100% rename from common/ethereum/testdata/tx_18.json rename to common/testdata/ethereum/tx_18.json diff --git a/common/ethereum/testdata/tx_19.json b/common/testdata/ethereum/tx_19.json similarity index 100% rename from common/ethereum/testdata/tx_19.json rename to common/testdata/ethereum/tx_19.json diff --git a/common/ethereum/testdata/tx_2.json b/common/testdata/ethereum/tx_2.json similarity index 100% rename from common/ethereum/testdata/tx_2.json rename to common/testdata/ethereum/tx_2.json diff --git a/common/ethereum/testdata/tx_20.json b/common/testdata/ethereum/tx_20.json similarity index 100% rename from common/ethereum/testdata/tx_20.json rename to common/testdata/ethereum/tx_20.json diff --git a/common/ethereum/testdata/tx_21.json b/common/testdata/ethereum/tx_21.json similarity index 100% rename from common/ethereum/testdata/tx_21.json rename to common/testdata/ethereum/tx_21.json diff --git a/common/ethereum/testdata/tx_22.json b/common/testdata/ethereum/tx_22.json similarity index 100% rename from common/ethereum/testdata/tx_22.json rename to common/testdata/ethereum/tx_22.json diff --git a/common/ethereum/testdata/tx_23.json b/common/testdata/ethereum/tx_23.json similarity index 100% rename from common/ethereum/testdata/tx_23.json rename to common/testdata/ethereum/tx_23.json diff --git a/common/ethereum/testdata/tx_24.json b/common/testdata/ethereum/tx_24.json similarity index 100% rename from common/ethereum/testdata/tx_24.json rename to common/testdata/ethereum/tx_24.json diff --git a/common/ethereum/testdata/tx_25.json b/common/testdata/ethereum/tx_25.json similarity index 100% rename from common/ethereum/testdata/tx_25.json rename to common/testdata/ethereum/tx_25.json diff --git a/common/ethereum/testdata/tx_26.json b/common/testdata/ethereum/tx_26.json similarity index 100% rename from common/ethereum/testdata/tx_26.json rename to common/testdata/ethereum/tx_26.json diff --git a/common/ethereum/testdata/tx_27.json b/common/testdata/ethereum/tx_27.json similarity index 100% rename from common/ethereum/testdata/tx_27.json rename to common/testdata/ethereum/tx_27.json diff --git a/common/ethereum/testdata/tx_28.json b/common/testdata/ethereum/tx_28.json similarity index 100% rename from common/ethereum/testdata/tx_28.json rename to common/testdata/ethereum/tx_28.json diff --git a/common/ethereum/testdata/tx_29.json b/common/testdata/ethereum/tx_29.json similarity index 100% rename from common/ethereum/testdata/tx_29.json rename to common/testdata/ethereum/tx_29.json diff --git a/common/ethereum/testdata/tx_3.json b/common/testdata/ethereum/tx_3.json similarity index 100% rename from common/ethereum/testdata/tx_3.json rename to common/testdata/ethereum/tx_3.json diff --git a/common/ethereum/testdata/tx_30.json b/common/testdata/ethereum/tx_30.json similarity index 100% rename from common/ethereum/testdata/tx_30.json rename to common/testdata/ethereum/tx_30.json diff --git a/common/ethereum/testdata/tx_31.json b/common/testdata/ethereum/tx_31.json similarity index 100% rename from common/ethereum/testdata/tx_31.json rename to common/testdata/ethereum/tx_31.json diff --git a/common/ethereum/testdata/tx_32.json b/common/testdata/ethereum/tx_32.json similarity index 100% rename from common/ethereum/testdata/tx_32.json rename to common/testdata/ethereum/tx_32.json diff --git a/common/ethereum/testdata/tx_33.json b/common/testdata/ethereum/tx_33.json similarity index 100% rename from common/ethereum/testdata/tx_33.json rename to common/testdata/ethereum/tx_33.json diff --git a/common/ethereum/testdata/tx_34.json b/common/testdata/ethereum/tx_34.json similarity index 100% rename from common/ethereum/testdata/tx_34.json rename to common/testdata/ethereum/tx_34.json diff --git a/common/ethereum/testdata/tx_35.json b/common/testdata/ethereum/tx_35.json similarity index 100% rename from common/ethereum/testdata/tx_35.json rename to common/testdata/ethereum/tx_35.json diff --git a/common/ethereum/testdata/tx_36.json b/common/testdata/ethereum/tx_36.json similarity index 100% rename from common/ethereum/testdata/tx_36.json rename to common/testdata/ethereum/tx_36.json diff --git a/common/ethereum/testdata/tx_37.json b/common/testdata/ethereum/tx_37.json similarity index 100% rename from common/ethereum/testdata/tx_37.json rename to common/testdata/ethereum/tx_37.json diff --git a/common/ethereum/testdata/tx_38.json b/common/testdata/ethereum/tx_38.json similarity index 100% rename from common/ethereum/testdata/tx_38.json rename to common/testdata/ethereum/tx_38.json diff --git a/common/ethereum/testdata/tx_39.json b/common/testdata/ethereum/tx_39.json similarity index 100% rename from common/ethereum/testdata/tx_39.json rename to common/testdata/ethereum/tx_39.json diff --git a/common/ethereum/testdata/tx_4.json b/common/testdata/ethereum/tx_4.json similarity index 100% rename from common/ethereum/testdata/tx_4.json rename to common/testdata/ethereum/tx_4.json diff --git a/common/ethereum/testdata/tx_40.json b/common/testdata/ethereum/tx_40.json similarity index 100% rename from common/ethereum/testdata/tx_40.json rename to common/testdata/ethereum/tx_40.json diff --git a/common/ethereum/testdata/tx_41.json b/common/testdata/ethereum/tx_41.json similarity index 100% rename from common/ethereum/testdata/tx_41.json rename to common/testdata/ethereum/tx_41.json diff --git a/common/ethereum/testdata/tx_42.json b/common/testdata/ethereum/tx_42.json similarity index 100% rename from common/ethereum/testdata/tx_42.json rename to common/testdata/ethereum/tx_42.json diff --git a/common/ethereum/testdata/tx_43.json b/common/testdata/ethereum/tx_43.json similarity index 100% rename from common/ethereum/testdata/tx_43.json rename to common/testdata/ethereum/tx_43.json diff --git a/common/ethereum/testdata/tx_44.json b/common/testdata/ethereum/tx_44.json similarity index 100% rename from common/ethereum/testdata/tx_44.json rename to common/testdata/ethereum/tx_44.json diff --git a/common/ethereum/testdata/tx_45.json b/common/testdata/ethereum/tx_45.json similarity index 100% rename from common/ethereum/testdata/tx_45.json rename to common/testdata/ethereum/tx_45.json diff --git a/common/ethereum/testdata/tx_46.json b/common/testdata/ethereum/tx_46.json similarity index 100% rename from common/ethereum/testdata/tx_46.json rename to common/testdata/ethereum/tx_46.json diff --git a/common/ethereum/testdata/tx_47.json b/common/testdata/ethereum/tx_47.json similarity index 100% rename from common/ethereum/testdata/tx_47.json rename to common/testdata/ethereum/tx_47.json diff --git a/common/ethereum/testdata/tx_48.json b/common/testdata/ethereum/tx_48.json similarity index 100% rename from common/ethereum/testdata/tx_48.json rename to common/testdata/ethereum/tx_48.json diff --git a/common/ethereum/testdata/tx_49.json b/common/testdata/ethereum/tx_49.json similarity index 100% rename from common/ethereum/testdata/tx_49.json rename to common/testdata/ethereum/tx_49.json diff --git a/common/ethereum/testdata/tx_5.json b/common/testdata/ethereum/tx_5.json similarity index 100% rename from common/ethereum/testdata/tx_5.json rename to common/testdata/ethereum/tx_5.json diff --git a/common/ethereum/testdata/tx_50.json b/common/testdata/ethereum/tx_50.json similarity index 100% rename from common/ethereum/testdata/tx_50.json rename to common/testdata/ethereum/tx_50.json diff --git a/common/ethereum/testdata/tx_51.json b/common/testdata/ethereum/tx_51.json similarity index 100% rename from common/ethereum/testdata/tx_51.json rename to common/testdata/ethereum/tx_51.json diff --git a/common/ethereum/testdata/tx_52.json b/common/testdata/ethereum/tx_52.json similarity index 100% rename from common/ethereum/testdata/tx_52.json rename to common/testdata/ethereum/tx_52.json diff --git a/common/ethereum/testdata/tx_53.json b/common/testdata/ethereum/tx_53.json similarity index 100% rename from common/ethereum/testdata/tx_53.json rename to common/testdata/ethereum/tx_53.json diff --git a/common/ethereum/testdata/tx_54.json b/common/testdata/ethereum/tx_54.json similarity index 100% rename from common/ethereum/testdata/tx_54.json rename to common/testdata/ethereum/tx_54.json diff --git a/common/ethereum/testdata/tx_55.json b/common/testdata/ethereum/tx_55.json similarity index 100% rename from common/ethereum/testdata/tx_55.json rename to common/testdata/ethereum/tx_55.json diff --git a/common/ethereum/testdata/tx_56.json b/common/testdata/ethereum/tx_56.json similarity index 100% rename from common/ethereum/testdata/tx_56.json rename to common/testdata/ethereum/tx_56.json diff --git a/common/ethereum/testdata/tx_57.json b/common/testdata/ethereum/tx_57.json similarity index 100% rename from common/ethereum/testdata/tx_57.json rename to common/testdata/ethereum/tx_57.json diff --git a/common/ethereum/testdata/tx_58.json b/common/testdata/ethereum/tx_58.json similarity index 100% rename from common/ethereum/testdata/tx_58.json rename to common/testdata/ethereum/tx_58.json diff --git a/common/ethereum/testdata/tx_59.json b/common/testdata/ethereum/tx_59.json similarity index 100% rename from common/ethereum/testdata/tx_59.json rename to common/testdata/ethereum/tx_59.json diff --git a/common/ethereum/testdata/tx_6.json b/common/testdata/ethereum/tx_6.json similarity index 100% rename from common/ethereum/testdata/tx_6.json rename to common/testdata/ethereum/tx_6.json diff --git a/common/ethereum/testdata/tx_60.json b/common/testdata/ethereum/tx_60.json similarity index 100% rename from common/ethereum/testdata/tx_60.json rename to common/testdata/ethereum/tx_60.json diff --git a/common/ethereum/testdata/tx_61.json b/common/testdata/ethereum/tx_61.json similarity index 100% rename from common/ethereum/testdata/tx_61.json rename to common/testdata/ethereum/tx_61.json diff --git a/common/ethereum/testdata/tx_62.json b/common/testdata/ethereum/tx_62.json similarity index 100% rename from common/ethereum/testdata/tx_62.json rename to common/testdata/ethereum/tx_62.json diff --git a/common/ethereum/testdata/tx_63.json b/common/testdata/ethereum/tx_63.json similarity index 100% rename from common/ethereum/testdata/tx_63.json rename to common/testdata/ethereum/tx_63.json diff --git a/common/ethereum/testdata/tx_64.json b/common/testdata/ethereum/tx_64.json similarity index 100% rename from common/ethereum/testdata/tx_64.json rename to common/testdata/ethereum/tx_64.json diff --git a/common/ethereum/testdata/tx_65.json b/common/testdata/ethereum/tx_65.json similarity index 100% rename from common/ethereum/testdata/tx_65.json rename to common/testdata/ethereum/tx_65.json diff --git a/common/ethereum/testdata/tx_66.json b/common/testdata/ethereum/tx_66.json similarity index 100% rename from common/ethereum/testdata/tx_66.json rename to common/testdata/ethereum/tx_66.json diff --git a/common/ethereum/testdata/tx_67.json b/common/testdata/ethereum/tx_67.json similarity index 100% rename from common/ethereum/testdata/tx_67.json rename to common/testdata/ethereum/tx_67.json diff --git a/common/ethereum/testdata/tx_68.json b/common/testdata/ethereum/tx_68.json similarity index 100% rename from common/ethereum/testdata/tx_68.json rename to common/testdata/ethereum/tx_68.json diff --git a/common/ethereum/testdata/tx_69.json b/common/testdata/ethereum/tx_69.json similarity index 100% rename from common/ethereum/testdata/tx_69.json rename to common/testdata/ethereum/tx_69.json diff --git a/common/ethereum/testdata/tx_7.json b/common/testdata/ethereum/tx_7.json similarity index 100% rename from common/ethereum/testdata/tx_7.json rename to common/testdata/ethereum/tx_7.json diff --git a/common/ethereum/testdata/tx_70.json b/common/testdata/ethereum/tx_70.json similarity index 100% rename from common/ethereum/testdata/tx_70.json rename to common/testdata/ethereum/tx_70.json diff --git a/common/ethereum/testdata/tx_71.json b/common/testdata/ethereum/tx_71.json similarity index 100% rename from common/ethereum/testdata/tx_71.json rename to common/testdata/ethereum/tx_71.json diff --git a/common/ethereum/testdata/tx_72.json b/common/testdata/ethereum/tx_72.json similarity index 100% rename from common/ethereum/testdata/tx_72.json rename to common/testdata/ethereum/tx_72.json diff --git a/common/ethereum/testdata/tx_73.json b/common/testdata/ethereum/tx_73.json similarity index 100% rename from common/ethereum/testdata/tx_73.json rename to common/testdata/ethereum/tx_73.json diff --git a/common/ethereum/testdata/tx_74.json b/common/testdata/ethereum/tx_74.json similarity index 100% rename from common/ethereum/testdata/tx_74.json rename to common/testdata/ethereum/tx_74.json diff --git a/common/ethereum/testdata/tx_75.json b/common/testdata/ethereum/tx_75.json similarity index 100% rename from common/ethereum/testdata/tx_75.json rename to common/testdata/ethereum/tx_75.json diff --git a/common/ethereum/testdata/tx_76.json b/common/testdata/ethereum/tx_76.json similarity index 100% rename from common/ethereum/testdata/tx_76.json rename to common/testdata/ethereum/tx_76.json diff --git a/common/ethereum/testdata/tx_77.json b/common/testdata/ethereum/tx_77.json similarity index 100% rename from common/ethereum/testdata/tx_77.json rename to common/testdata/ethereum/tx_77.json diff --git a/common/ethereum/testdata/tx_78.json b/common/testdata/ethereum/tx_78.json similarity index 100% rename from common/ethereum/testdata/tx_78.json rename to common/testdata/ethereum/tx_78.json diff --git a/common/ethereum/testdata/tx_79.json b/common/testdata/ethereum/tx_79.json similarity index 100% rename from common/ethereum/testdata/tx_79.json rename to common/testdata/ethereum/tx_79.json diff --git a/common/ethereum/testdata/tx_8.json b/common/testdata/ethereum/tx_8.json similarity index 100% rename from common/ethereum/testdata/tx_8.json rename to common/testdata/ethereum/tx_8.json diff --git a/common/ethereum/testdata/tx_80.json b/common/testdata/ethereum/tx_80.json similarity index 100% rename from common/ethereum/testdata/tx_80.json rename to common/testdata/ethereum/tx_80.json diff --git a/common/ethereum/testdata/tx_9.json b/common/testdata/ethereum/tx_9.json similarity index 100% rename from common/ethereum/testdata/tx_9.json rename to common/testdata/ethereum/tx_9.json diff --git a/common/testdata/testdata.go b/common/testdata/testdata.go new file mode 100644 index 0000000000..5fd1a06b21 --- /dev/null +++ b/common/testdata/testdata.go @@ -0,0 +1,101 @@ +package testdata + +import ( + "embed" + "encoding/json" + "fmt" + "testing" + + "github.com/ethereum/go-ethereum/core/types" + "github.com/stretchr/testify/require" +) + +const ( + HeaderPath = "ethereum/header.json" + ReceiptPrefixPath = "ethereum/receipt_" + TxPrefixPath = "ethereum/tx_" + TxsCount = 81 +) + +//go:embed ethereum/* +var ethFiles embed.FS + +//go:embed * +var testDataFiles embed.FS + +// readHeader reads a header from a file. +// TODO: centralize test data +// https://github.com/zeta-chain/node/issues/1874 +func ReadEthHeader() (header types.Header, err error) { + file, err := ethFiles.Open(HeaderPath) + if err != nil { + return header, err + } + defer file.Close() + + decoder := json.NewDecoder(file) + err = decoder.Decode(&header) + return header, err +} + +// readReceipt reads a receipt from a file. +// TODO: centralize test data +// https://github.com/zeta-chain/node/issues/1874 +func ReadEthReceipt(index int) (receipt types.Receipt, err error) { + filePath := fmt.Sprintf("%s%d.json", ReceiptPrefixPath, index) + + file, err := ethFiles.Open(filePath) + if err != nil { + return receipt, err + } + defer file.Close() + + decoder := json.NewDecoder(file) + err = decoder.Decode(&receipt) + return receipt, err +} + +// readTx reads a tx from a file. +// TODO: centralize test data +// https://github.com/zeta-chain/node/issues/1874 +func ReadEthTx(index int) (tx types.Transaction, err error) { + filePath := fmt.Sprintf("%s%d.json", TxPrefixPath, index) + + file, err := ethFiles.Open(filePath) + if err != nil { + return tx, err + } + defer file.Close() + + decoder := json.NewDecoder(file) + err = decoder.Decode(&tx) + return tx, err +} + +type Block struct { + TssAddress string `json:"tssAddress"` + Height int `json:"height"` + Nonce uint64 `json:"nonce"` + OutTxid string `json:"outTxid"` + HeaderBase64 string `json:"headerBase64"` + BlockBase64 string `json:"blockBase64"` +} + +type Blocks struct { + Blocks []Block `json:"blocks"` +} + +// TODO: centralize test data +// https://github.com/zeta-chain/node/issues/1874 +func LoadTestBlocks(t *testing.T) Blocks { + file, err := testDataFiles.Open("test_blocks.json") + require.NoError(t, err) + defer file.Close() + + // Decode the JSON into the data struct + var blocks Blocks + err = json.NewDecoder(file).Decode(&blocks) + require.NoError(t, err) + + return blocks +} From 18218af3ae01be9dcb8a3c75795d0d539ae3e1dc Mon Sep 17 00:00:00 2001 From: skosito Date: Thu, 21 Mar 2024 19:04:05 +0100 Subject: [PATCH 26/41] Rename folder to pkg --- {common => pkg}/address.go | 0 {common => pkg}/address_test.go | 0 {common => pkg}/authz_tx_types.go | 0 {common => pkg}/authz_tx_types_test.go | 0 {common => pkg}/bitcoin.go | 0 {common => pkg}/bitcoin/bitcoin.pb.go | 0 {common => pkg}/bitcoin/bitcoin_spv.go | 0 {common => pkg}/bitcoin/bitcoin_spv_test.go | 0 {common => pkg}/bitcoin/proof.go | 0 {common => pkg}/bitcoin/proof_test.go | 0 {common => pkg}/bitcoin_test.go | 0 {common => pkg}/chain.go | 0 {common => pkg}/chain_id.go | 0 {common => pkg}/chain_id_test.go | 0 {common => pkg}/chain_test.go | 0 {common => pkg}/chains.go | 0 {common => pkg}/chains_test.go | 0 {common => pkg}/coin.go | 0 {common => pkg}/coin_test.go | 0 {common => pkg}/commands.go | 0 {common => pkg}/common.pb.go | 0 {common => pkg}/constant.go | 0 {common => pkg}/cosmos/cosmos.go | 0 {common => pkg}/cosmos/cosmos_test.go | 0 {common => pkg}/ethereum/ethereum.pb.go | 0 {common => pkg}/ethereum/proof.go | 0 {common => pkg}/ethereum/proof_test.go | 0 {common => pkg}/gas_limits.go | 0 {common => pkg}/gas_limits_test.go | 0 {common => pkg}/headers.go | 0 {common => pkg}/headers_test.go | 0 {common => pkg}/proof.go | 0 {common => pkg}/proof_test.go | 0 {common => pkg}/pubkey.go | 0 {common => pkg}/pubkey_test.go | 0 {common => pkg}/testdata/eth_header_18495266.json | 0 {common => pkg}/testdata/ethereum/header.json | 0 {common => pkg}/testdata/ethereum/receipt_0.json | 0 {common => pkg}/testdata/ethereum/receipt_1.json | 0 {common => pkg}/testdata/ethereum/receipt_10.json | 0 {common => pkg}/testdata/ethereum/receipt_11.json | 0 {common => pkg}/testdata/ethereum/receipt_12.json | 0 {common => pkg}/testdata/ethereum/receipt_13.json | 0 {common => pkg}/testdata/ethereum/receipt_14.json | 0 {common => pkg}/testdata/ethereum/receipt_15.json | 0 {common => pkg}/testdata/ethereum/receipt_16.json | 0 {common => pkg}/testdata/ethereum/receipt_17.json | 0 {common => pkg}/testdata/ethereum/receipt_18.json | 0 {common => pkg}/testdata/ethereum/receipt_19.json | 0 {common => pkg}/testdata/ethereum/receipt_2.json | 0 {common => pkg}/testdata/ethereum/receipt_20.json | 0 {common => pkg}/testdata/ethereum/receipt_21.json | 0 {common => pkg}/testdata/ethereum/receipt_22.json | 0 {common => pkg}/testdata/ethereum/receipt_23.json | 0 {common => pkg}/testdata/ethereum/receipt_24.json | 0 {common => pkg}/testdata/ethereum/receipt_25.json | 0 {common => pkg}/testdata/ethereum/receipt_26.json | 0 {common => pkg}/testdata/ethereum/receipt_27.json | 0 {common => pkg}/testdata/ethereum/receipt_28.json | 0 {common => pkg}/testdata/ethereum/receipt_29.json | 0 {common => pkg}/testdata/ethereum/receipt_3.json | 0 {common => pkg}/testdata/ethereum/receipt_30.json | 0 {common => pkg}/testdata/ethereum/receipt_31.json | 0 {common => pkg}/testdata/ethereum/receipt_32.json | 0 {common => pkg}/testdata/ethereum/receipt_33.json | 0 {common => pkg}/testdata/ethereum/receipt_34.json | 0 {common => pkg}/testdata/ethereum/receipt_35.json | 0 {common => pkg}/testdata/ethereum/receipt_36.json | 0 {common => pkg}/testdata/ethereum/receipt_37.json | 0 {common => pkg}/testdata/ethereum/receipt_38.json | 0 {common => pkg}/testdata/ethereum/receipt_39.json | 0 {common => pkg}/testdata/ethereum/receipt_4.json | 0 {common => pkg}/testdata/ethereum/receipt_40.json | 0 {common => pkg}/testdata/ethereum/receipt_41.json | 0 {common => pkg}/testdata/ethereum/receipt_42.json | 0 {common => pkg}/testdata/ethereum/receipt_43.json | 0 {common => pkg}/testdata/ethereum/receipt_44.json | 0 {common => pkg}/testdata/ethereum/receipt_45.json | 0 {common => pkg}/testdata/ethereum/receipt_46.json | 0 {common => pkg}/testdata/ethereum/receipt_47.json | 0 {common => pkg}/testdata/ethereum/receipt_48.json | 0 {common => pkg}/testdata/ethereum/receipt_49.json | 0 {common => pkg}/testdata/ethereum/receipt_5.json | 0 {common => pkg}/testdata/ethereum/receipt_50.json | 0 {common => pkg}/testdata/ethereum/receipt_51.json | 0 {common => pkg}/testdata/ethereum/receipt_52.json | 0 {common => pkg}/testdata/ethereum/receipt_53.json | 0 {common => pkg}/testdata/ethereum/receipt_54.json | 0 {common => pkg}/testdata/ethereum/receipt_55.json | 0 {common => pkg}/testdata/ethereum/receipt_56.json | 0 {common => pkg}/testdata/ethereum/receipt_57.json | 0 {common => pkg}/testdata/ethereum/receipt_58.json | 0 {common => pkg}/testdata/ethereum/receipt_59.json | 0 {common => pkg}/testdata/ethereum/receipt_6.json | 0 {common => pkg}/testdata/ethereum/receipt_60.json | 0 {common => pkg}/testdata/ethereum/receipt_61.json | 0 {common => pkg}/testdata/ethereum/receipt_62.json | 0 {common => pkg}/testdata/ethereum/receipt_63.json | 0 {common => pkg}/testdata/ethereum/receipt_64.json | 0 {common => pkg}/testdata/ethereum/receipt_65.json | 0 {common => pkg}/testdata/ethereum/receipt_66.json | 0 {common => pkg}/testdata/ethereum/receipt_67.json | 0 {common => pkg}/testdata/ethereum/receipt_68.json | 0 {common => pkg}/testdata/ethereum/receipt_69.json | 0 {common => pkg}/testdata/ethereum/receipt_7.json | 0 {common => pkg}/testdata/ethereum/receipt_70.json | 0 {common => pkg}/testdata/ethereum/receipt_71.json | 0 {common => pkg}/testdata/ethereum/receipt_72.json | 0 {common => pkg}/testdata/ethereum/receipt_73.json | 0 {common => pkg}/testdata/ethereum/receipt_74.json | 0 {common => pkg}/testdata/ethereum/receipt_75.json | 0 {common => pkg}/testdata/ethereum/receipt_76.json | 0 {common => pkg}/testdata/ethereum/receipt_77.json | 0 {common => pkg}/testdata/ethereum/receipt_78.json | 0 {common => pkg}/testdata/ethereum/receipt_79.json | 0 {common => pkg}/testdata/ethereum/receipt_8.json | 0 {common => pkg}/testdata/ethereum/receipt_80.json | 0 {common => pkg}/testdata/ethereum/receipt_9.json | 0 {common => pkg}/testdata/ethereum/tx_0.json | 0 {common => pkg}/testdata/ethereum/tx_1.json | 0 {common => pkg}/testdata/ethereum/tx_10.json | 0 {common => pkg}/testdata/ethereum/tx_11.json | 0 {common => pkg}/testdata/ethereum/tx_12.json | 0 {common => pkg}/testdata/ethereum/tx_13.json | 0 {common => pkg}/testdata/ethereum/tx_14.json | 0 {common => pkg}/testdata/ethereum/tx_15.json | 0 {common => pkg}/testdata/ethereum/tx_16.json | 0 {common => pkg}/testdata/ethereum/tx_17.json | 0 {common => pkg}/testdata/ethereum/tx_18.json | 0 {common => pkg}/testdata/ethereum/tx_19.json | 0 {common => pkg}/testdata/ethereum/tx_2.json | 0 {common => pkg}/testdata/ethereum/tx_20.json | 0 {common => pkg}/testdata/ethereum/tx_21.json | 0 {common => pkg}/testdata/ethereum/tx_22.json | 0 {common => pkg}/testdata/ethereum/tx_23.json | 0 {common => pkg}/testdata/ethereum/tx_24.json | 0 {common => pkg}/testdata/ethereum/tx_25.json | 0 {common => pkg}/testdata/ethereum/tx_26.json | 0 {common => pkg}/testdata/ethereum/tx_27.json | 0 {common => pkg}/testdata/ethereum/tx_28.json | 0 {common => pkg}/testdata/ethereum/tx_29.json | 0 {common => pkg}/testdata/ethereum/tx_3.json | 0 {common => pkg}/testdata/ethereum/tx_30.json | 0 {common => pkg}/testdata/ethereum/tx_31.json | 0 {common => pkg}/testdata/ethereum/tx_32.json | 0 {common => pkg}/testdata/ethereum/tx_33.json | 0 {common => pkg}/testdata/ethereum/tx_34.json | 0 {common => pkg}/testdata/ethereum/tx_35.json | 0 {common => pkg}/testdata/ethereum/tx_36.json | 0 {common => pkg}/testdata/ethereum/tx_37.json | 0 {common => pkg}/testdata/ethereum/tx_38.json | 0 {common => pkg}/testdata/ethereum/tx_39.json | 0 {common => pkg}/testdata/ethereum/tx_4.json | 0 {common => pkg}/testdata/ethereum/tx_40.json | 0 {common => pkg}/testdata/ethereum/tx_41.json | 0 {common => pkg}/testdata/ethereum/tx_42.json | 0 {common => pkg}/testdata/ethereum/tx_43.json | 0 {common => pkg}/testdata/ethereum/tx_44.json | 0 {common => pkg}/testdata/ethereum/tx_45.json | 0 {common => pkg}/testdata/ethereum/tx_46.json | 0 {common => pkg}/testdata/ethereum/tx_47.json | 0 {common => pkg}/testdata/ethereum/tx_48.json | 0 {common => pkg}/testdata/ethereum/tx_49.json | 0 {common => pkg}/testdata/ethereum/tx_5.json | 0 {common => pkg}/testdata/ethereum/tx_50.json | 0 {common => pkg}/testdata/ethereum/tx_51.json | 0 {common => pkg}/testdata/ethereum/tx_52.json | 0 {common => pkg}/testdata/ethereum/tx_53.json | 0 {common => pkg}/testdata/ethereum/tx_54.json | 0 {common => pkg}/testdata/ethereum/tx_55.json | 0 {common => pkg}/testdata/ethereum/tx_56.json | 0 {common => pkg}/testdata/ethereum/tx_57.json | 0 {common => pkg}/testdata/ethereum/tx_58.json | 0 {common => pkg}/testdata/ethereum/tx_59.json | 0 {common => pkg}/testdata/ethereum/tx_6.json | 0 {common => pkg}/testdata/ethereum/tx_60.json | 0 {common => pkg}/testdata/ethereum/tx_61.json | 0 {common => pkg}/testdata/ethereum/tx_62.json | 0 {common => pkg}/testdata/ethereum/tx_63.json | 0 {common => pkg}/testdata/ethereum/tx_64.json | 0 {common => pkg}/testdata/ethereum/tx_65.json | 0 {common => pkg}/testdata/ethereum/tx_66.json | 0 {common => pkg}/testdata/ethereum/tx_67.json | 0 {common => pkg}/testdata/ethereum/tx_68.json | 0 {common => pkg}/testdata/ethereum/tx_69.json | 0 {common => pkg}/testdata/ethereum/tx_7.json | 0 {common => pkg}/testdata/ethereum/tx_70.json | 0 {common => pkg}/testdata/ethereum/tx_71.json | 0 {common => pkg}/testdata/ethereum/tx_72.json | 0 {common => pkg}/testdata/ethereum/tx_73.json | 0 {common => pkg}/testdata/ethereum/tx_74.json | 0 {common => pkg}/testdata/ethereum/tx_75.json | 0 {common => pkg}/testdata/ethereum/tx_76.json | 0 {common => pkg}/testdata/ethereum/tx_77.json | 0 {common => pkg}/testdata/ethereum/tx_78.json | 0 {common => pkg}/testdata/ethereum/tx_79.json | 0 {common => pkg}/testdata/ethereum/tx_8.json | 0 {common => pkg}/testdata/ethereum/tx_80.json | 0 {common => pkg}/testdata/ethereum/tx_9.json | 0 {common => pkg}/testdata/test_blocks.json | 0 {common => pkg}/testdata/testdata.go | 0 {common => pkg}/tss.go | 0 {common => pkg}/tss_test.go | 0 {common => pkg}/utils.go | 0 {common => pkg}/utils_test.go | 0 {common => pkg}/version.go | 0 206 files changed, 0 insertions(+), 0 deletions(-) rename {common => pkg}/address.go (100%) rename {common => pkg}/address_test.go (100%) rename {common => pkg}/authz_tx_types.go (100%) rename {common => pkg}/authz_tx_types_test.go (100%) rename {common => pkg}/bitcoin.go (100%) rename {common => pkg}/bitcoin/bitcoin.pb.go (100%) rename {common => pkg}/bitcoin/bitcoin_spv.go (100%) rename {common => pkg}/bitcoin/bitcoin_spv_test.go (100%) rename {common => pkg}/bitcoin/proof.go (100%) rename {common => pkg}/bitcoin/proof_test.go (100%) rename {common => pkg}/bitcoin_test.go (100%) rename {common => pkg}/chain.go (100%) rename {common => pkg}/chain_id.go (100%) rename {common => pkg}/chain_id_test.go (100%) rename {common => pkg}/chain_test.go (100%) rename {common => pkg}/chains.go (100%) rename {common => pkg}/chains_test.go (100%) rename {common => pkg}/coin.go (100%) rename {common => pkg}/coin_test.go (100%) rename {common => pkg}/commands.go (100%) rename {common => pkg}/common.pb.go (100%) rename {common => pkg}/constant.go (100%) rename {common => pkg}/cosmos/cosmos.go (100%) rename {common => pkg}/cosmos/cosmos_test.go (100%) rename {common => pkg}/ethereum/ethereum.pb.go (100%) rename {common => pkg}/ethereum/proof.go (100%) rename {common => pkg}/ethereum/proof_test.go (100%) rename {common => pkg}/gas_limits.go (100%) rename {common => pkg}/gas_limits_test.go (100%) rename {common => pkg}/headers.go (100%) rename {common => pkg}/headers_test.go (100%) rename {common => pkg}/proof.go (100%) rename {common => pkg}/proof_test.go (100%) rename {common => pkg}/pubkey.go (100%) rename {common => pkg}/pubkey_test.go (100%) rename {common => pkg}/testdata/eth_header_18495266.json (100%) rename {common => pkg}/testdata/ethereum/header.json (100%) rename {common => pkg}/testdata/ethereum/receipt_0.json (100%) rename {common => pkg}/testdata/ethereum/receipt_1.json (100%) rename {common => pkg}/testdata/ethereum/receipt_10.json (100%) rename {common => pkg}/testdata/ethereum/receipt_11.json (100%) rename {common => pkg}/testdata/ethereum/receipt_12.json (100%) rename {common => pkg}/testdata/ethereum/receipt_13.json (100%) rename {common => pkg}/testdata/ethereum/receipt_14.json (100%) rename {common => pkg}/testdata/ethereum/receipt_15.json (100%) rename {common => pkg}/testdata/ethereum/receipt_16.json (100%) rename {common => pkg}/testdata/ethereum/receipt_17.json (100%) rename {common => pkg}/testdata/ethereum/receipt_18.json (100%) rename {common => pkg}/testdata/ethereum/receipt_19.json (100%) rename {common => pkg}/testdata/ethereum/receipt_2.json (100%) rename {common => pkg}/testdata/ethereum/receipt_20.json (100%) rename {common => pkg}/testdata/ethereum/receipt_21.json (100%) rename {common => pkg}/testdata/ethereum/receipt_22.json (100%) rename {common => pkg}/testdata/ethereum/receipt_23.json (100%) rename {common => pkg}/testdata/ethereum/receipt_24.json (100%) rename {common => pkg}/testdata/ethereum/receipt_25.json (100%) rename {common => pkg}/testdata/ethereum/receipt_26.json (100%) rename {common => pkg}/testdata/ethereum/receipt_27.json (100%) rename {common => pkg}/testdata/ethereum/receipt_28.json (100%) rename {common => pkg}/testdata/ethereum/receipt_29.json (100%) rename {common => pkg}/testdata/ethereum/receipt_3.json (100%) rename {common => pkg}/testdata/ethereum/receipt_30.json (100%) rename {common => pkg}/testdata/ethereum/receipt_31.json (100%) rename {common => pkg}/testdata/ethereum/receipt_32.json (100%) rename {common => pkg}/testdata/ethereum/receipt_33.json (100%) rename {common => pkg}/testdata/ethereum/receipt_34.json (100%) rename {common => pkg}/testdata/ethereum/receipt_35.json (100%) rename {common => pkg}/testdata/ethereum/receipt_36.json (100%) rename {common => pkg}/testdata/ethereum/receipt_37.json (100%) rename {common => pkg}/testdata/ethereum/receipt_38.json (100%) rename {common => pkg}/testdata/ethereum/receipt_39.json (100%) rename {common => pkg}/testdata/ethereum/receipt_4.json (100%) rename {common => pkg}/testdata/ethereum/receipt_40.json (100%) rename {common => pkg}/testdata/ethereum/receipt_41.json (100%) rename {common => pkg}/testdata/ethereum/receipt_42.json (100%) rename {common => pkg}/testdata/ethereum/receipt_43.json (100%) rename {common => pkg}/testdata/ethereum/receipt_44.json (100%) rename {common => pkg}/testdata/ethereum/receipt_45.json (100%) rename {common => pkg}/testdata/ethereum/receipt_46.json (100%) rename {common => pkg}/testdata/ethereum/receipt_47.json (100%) rename {common => pkg}/testdata/ethereum/receipt_48.json (100%) rename {common => pkg}/testdata/ethereum/receipt_49.json (100%) rename {common => pkg}/testdata/ethereum/receipt_5.json (100%) rename {common => pkg}/testdata/ethereum/receipt_50.json (100%) rename {common => pkg}/testdata/ethereum/receipt_51.json (100%) rename {common => pkg}/testdata/ethereum/receipt_52.json (100%) rename {common => pkg}/testdata/ethereum/receipt_53.json (100%) rename {common => pkg}/testdata/ethereum/receipt_54.json (100%) rename {common => pkg}/testdata/ethereum/receipt_55.json (100%) rename {common => pkg}/testdata/ethereum/receipt_56.json (100%) rename {common => pkg}/testdata/ethereum/receipt_57.json (100%) rename {common => pkg}/testdata/ethereum/receipt_58.json (100%) rename {common => pkg}/testdata/ethereum/receipt_59.json (100%) rename {common => pkg}/testdata/ethereum/receipt_6.json (100%) rename {common => pkg}/testdata/ethereum/receipt_60.json (100%) rename {common => pkg}/testdata/ethereum/receipt_61.json (100%) rename {common => pkg}/testdata/ethereum/receipt_62.json (100%) rename {common => pkg}/testdata/ethereum/receipt_63.json (100%) rename {common => pkg}/testdata/ethereum/receipt_64.json (100%) rename {common => pkg}/testdata/ethereum/receipt_65.json (100%) rename {common => pkg}/testdata/ethereum/receipt_66.json (100%) rename {common => pkg}/testdata/ethereum/receipt_67.json (100%) rename {common => pkg}/testdata/ethereum/receipt_68.json (100%) rename {common => pkg}/testdata/ethereum/receipt_69.json (100%) rename {common => pkg}/testdata/ethereum/receipt_7.json (100%) rename {common => pkg}/testdata/ethereum/receipt_70.json (100%) rename {common => pkg}/testdata/ethereum/receipt_71.json (100%) rename {common => pkg}/testdata/ethereum/receipt_72.json (100%) rename {common => pkg}/testdata/ethereum/receipt_73.json (100%) rename {common => pkg}/testdata/ethereum/receipt_74.json (100%) rename {common => pkg}/testdata/ethereum/receipt_75.json (100%) rename {common => pkg}/testdata/ethereum/receipt_76.json (100%) rename {common => pkg}/testdata/ethereum/receipt_77.json (100%) rename {common => pkg}/testdata/ethereum/receipt_78.json (100%) rename {common => pkg}/testdata/ethereum/receipt_79.json (100%) rename {common => pkg}/testdata/ethereum/receipt_8.json (100%) rename {common => pkg}/testdata/ethereum/receipt_80.json (100%) rename {common => pkg}/testdata/ethereum/receipt_9.json (100%) rename {common => pkg}/testdata/ethereum/tx_0.json (100%) rename {common => pkg}/testdata/ethereum/tx_1.json (100%) rename {common => pkg}/testdata/ethereum/tx_10.json (100%) rename {common => pkg}/testdata/ethereum/tx_11.json (100%) rename {common => pkg}/testdata/ethereum/tx_12.json (100%) rename {common => pkg}/testdata/ethereum/tx_13.json (100%) rename {common => pkg}/testdata/ethereum/tx_14.json (100%) rename {common => pkg}/testdata/ethereum/tx_15.json (100%) rename {common => pkg}/testdata/ethereum/tx_16.json (100%) rename {common => pkg}/testdata/ethereum/tx_17.json (100%) rename {common => pkg}/testdata/ethereum/tx_18.json (100%) rename {common => pkg}/testdata/ethereum/tx_19.json (100%) rename {common => pkg}/testdata/ethereum/tx_2.json (100%) rename {common => pkg}/testdata/ethereum/tx_20.json (100%) rename {common => pkg}/testdata/ethereum/tx_21.json (100%) rename {common => pkg}/testdata/ethereum/tx_22.json (100%) rename {common => pkg}/testdata/ethereum/tx_23.json (100%) rename {common => pkg}/testdata/ethereum/tx_24.json (100%) rename {common => pkg}/testdata/ethereum/tx_25.json (100%) rename {common => pkg}/testdata/ethereum/tx_26.json (100%) rename {common => pkg}/testdata/ethereum/tx_27.json (100%) rename {common => pkg}/testdata/ethereum/tx_28.json (100%) rename {common => pkg}/testdata/ethereum/tx_29.json (100%) rename {common => pkg}/testdata/ethereum/tx_3.json (100%) rename {common => pkg}/testdata/ethereum/tx_30.json (100%) rename {common => pkg}/testdata/ethereum/tx_31.json (100%) rename {common => pkg}/testdata/ethereum/tx_32.json (100%) rename {common => pkg}/testdata/ethereum/tx_33.json (100%) rename {common => pkg}/testdata/ethereum/tx_34.json (100%) rename {common => pkg}/testdata/ethereum/tx_35.json (100%) rename {common => pkg}/testdata/ethereum/tx_36.json (100%) rename {common => pkg}/testdata/ethereum/tx_37.json (100%) rename {common => pkg}/testdata/ethereum/tx_38.json (100%) rename {common => pkg}/testdata/ethereum/tx_39.json (100%) rename {common => pkg}/testdata/ethereum/tx_4.json (100%) rename {common => pkg}/testdata/ethereum/tx_40.json (100%) rename {common => pkg}/testdata/ethereum/tx_41.json (100%) rename {common => pkg}/testdata/ethereum/tx_42.json (100%) rename {common => pkg}/testdata/ethereum/tx_43.json (100%) rename {common => pkg}/testdata/ethereum/tx_44.json (100%) rename {common => pkg}/testdata/ethereum/tx_45.json (100%) rename {common => pkg}/testdata/ethereum/tx_46.json (100%) rename {common => pkg}/testdata/ethereum/tx_47.json (100%) rename {common => pkg}/testdata/ethereum/tx_48.json (100%) rename {common => pkg}/testdata/ethereum/tx_49.json (100%) rename {common => pkg}/testdata/ethereum/tx_5.json (100%) rename {common => pkg}/testdata/ethereum/tx_50.json (100%) rename {common => pkg}/testdata/ethereum/tx_51.json (100%) rename {common => pkg}/testdata/ethereum/tx_52.json (100%) rename {common => pkg}/testdata/ethereum/tx_53.json (100%) rename {common => pkg}/testdata/ethereum/tx_54.json (100%) rename {common => pkg}/testdata/ethereum/tx_55.json (100%) rename {common => pkg}/testdata/ethereum/tx_56.json (100%) rename {common => pkg}/testdata/ethereum/tx_57.json (100%) rename {common => pkg}/testdata/ethereum/tx_58.json (100%) rename {common => pkg}/testdata/ethereum/tx_59.json (100%) rename {common => pkg}/testdata/ethereum/tx_6.json (100%) rename {common => pkg}/testdata/ethereum/tx_60.json (100%) rename {common => pkg}/testdata/ethereum/tx_61.json (100%) rename {common => pkg}/testdata/ethereum/tx_62.json (100%) rename {common => pkg}/testdata/ethereum/tx_63.json (100%) rename {common => pkg}/testdata/ethereum/tx_64.json (100%) rename {common => pkg}/testdata/ethereum/tx_65.json (100%) rename {common => pkg}/testdata/ethereum/tx_66.json (100%) rename {common => pkg}/testdata/ethereum/tx_67.json (100%) rename {common => pkg}/testdata/ethereum/tx_68.json (100%) rename {common => pkg}/testdata/ethereum/tx_69.json (100%) rename {common => pkg}/testdata/ethereum/tx_7.json (100%) rename {common => pkg}/testdata/ethereum/tx_70.json (100%) rename {common => pkg}/testdata/ethereum/tx_71.json (100%) rename {common => pkg}/testdata/ethereum/tx_72.json (100%) rename {common => pkg}/testdata/ethereum/tx_73.json (100%) rename {common => pkg}/testdata/ethereum/tx_74.json (100%) rename {common => pkg}/testdata/ethereum/tx_75.json (100%) rename {common => pkg}/testdata/ethereum/tx_76.json (100%) rename {common => pkg}/testdata/ethereum/tx_77.json (100%) rename {common => pkg}/testdata/ethereum/tx_78.json (100%) rename {common => pkg}/testdata/ethereum/tx_79.json (100%) rename {common => pkg}/testdata/ethereum/tx_8.json (100%) rename {common => pkg}/testdata/ethereum/tx_80.json (100%) rename {common => pkg}/testdata/ethereum/tx_9.json (100%) rename {common => pkg}/testdata/test_blocks.json (100%) rename {common => pkg}/testdata/testdata.go (100%) rename {common => pkg}/tss.go (100%) rename {common => pkg}/tss_test.go (100%) rename {common => pkg}/utils.go (100%) rename {common => pkg}/utils_test.go (100%) rename {common => pkg}/version.go (100%) diff --git a/common/address.go b/pkg/address.go similarity index 100% rename from common/address.go rename to pkg/address.go diff --git a/common/address_test.go b/pkg/address_test.go similarity index 100% rename from common/address_test.go rename to pkg/address_test.go diff --git a/common/authz_tx_types.go b/pkg/authz_tx_types.go similarity index 100% rename from common/authz_tx_types.go rename to pkg/authz_tx_types.go diff --git a/common/authz_tx_types_test.go b/pkg/authz_tx_types_test.go similarity index 100% rename from common/authz_tx_types_test.go rename to pkg/authz_tx_types_test.go diff --git a/common/bitcoin.go b/pkg/bitcoin.go similarity index 100% rename from common/bitcoin.go rename to pkg/bitcoin.go diff --git a/common/bitcoin/bitcoin.pb.go b/pkg/bitcoin/bitcoin.pb.go similarity index 100% rename from common/bitcoin/bitcoin.pb.go rename to pkg/bitcoin/bitcoin.pb.go diff --git a/common/bitcoin/bitcoin_spv.go b/pkg/bitcoin/bitcoin_spv.go similarity index 100% rename from common/bitcoin/bitcoin_spv.go rename to pkg/bitcoin/bitcoin_spv.go diff --git a/common/bitcoin/bitcoin_spv_test.go b/pkg/bitcoin/bitcoin_spv_test.go similarity index 100% rename from common/bitcoin/bitcoin_spv_test.go rename to pkg/bitcoin/bitcoin_spv_test.go diff --git a/common/bitcoin/proof.go b/pkg/bitcoin/proof.go similarity index 100% rename from common/bitcoin/proof.go rename to pkg/bitcoin/proof.go diff --git a/common/bitcoin/proof_test.go b/pkg/bitcoin/proof_test.go similarity index 100% rename from common/bitcoin/proof_test.go rename to pkg/bitcoin/proof_test.go diff --git a/common/bitcoin_test.go b/pkg/bitcoin_test.go similarity index 100% rename from common/bitcoin_test.go rename to pkg/bitcoin_test.go diff --git a/common/chain.go b/pkg/chain.go similarity index 100% rename from common/chain.go rename to pkg/chain.go diff --git a/common/chain_id.go b/pkg/chain_id.go similarity index 100% rename from common/chain_id.go rename to pkg/chain_id.go diff --git a/common/chain_id_test.go b/pkg/chain_id_test.go similarity index 100% rename from common/chain_id_test.go rename to pkg/chain_id_test.go diff --git a/common/chain_test.go b/pkg/chain_test.go similarity index 100% rename from common/chain_test.go rename to pkg/chain_test.go diff --git a/common/chains.go b/pkg/chains.go similarity index 100% rename from common/chains.go rename to pkg/chains.go diff --git a/common/chains_test.go b/pkg/chains_test.go similarity index 100% rename from common/chains_test.go rename to pkg/chains_test.go diff --git a/common/coin.go b/pkg/coin.go similarity index 100% rename from common/coin.go rename to pkg/coin.go diff --git a/common/coin_test.go b/pkg/coin_test.go similarity index 100% rename from common/coin_test.go rename to pkg/coin_test.go diff --git a/common/commands.go b/pkg/commands.go similarity index 100% rename from common/commands.go rename to pkg/commands.go diff --git a/common/common.pb.go b/pkg/common.pb.go similarity index 100% rename from common/common.pb.go rename to pkg/common.pb.go diff --git a/common/constant.go b/pkg/constant.go similarity index 100% rename from common/constant.go rename to pkg/constant.go diff --git a/common/cosmos/cosmos.go b/pkg/cosmos/cosmos.go similarity index 100% rename from common/cosmos/cosmos.go rename to pkg/cosmos/cosmos.go diff --git a/common/cosmos/cosmos_test.go b/pkg/cosmos/cosmos_test.go similarity index 100% rename from common/cosmos/cosmos_test.go rename to pkg/cosmos/cosmos_test.go diff --git a/common/ethereum/ethereum.pb.go b/pkg/ethereum/ethereum.pb.go similarity index 100% rename from common/ethereum/ethereum.pb.go rename to pkg/ethereum/ethereum.pb.go diff --git a/common/ethereum/proof.go b/pkg/ethereum/proof.go similarity index 100% rename from common/ethereum/proof.go rename to pkg/ethereum/proof.go diff --git a/common/ethereum/proof_test.go b/pkg/ethereum/proof_test.go similarity index 100% rename from common/ethereum/proof_test.go rename to pkg/ethereum/proof_test.go diff --git a/common/gas_limits.go b/pkg/gas_limits.go similarity index 100% rename from common/gas_limits.go rename to pkg/gas_limits.go diff --git a/common/gas_limits_test.go b/pkg/gas_limits_test.go similarity index 100% rename from common/gas_limits_test.go rename to pkg/gas_limits_test.go diff --git a/common/headers.go b/pkg/headers.go similarity index 100% rename from common/headers.go rename to pkg/headers.go diff --git a/common/headers_test.go b/pkg/headers_test.go similarity index 100% rename from common/headers_test.go rename to pkg/headers_test.go diff --git a/common/proof.go b/pkg/proof.go similarity index 100% rename from common/proof.go rename to pkg/proof.go diff --git a/common/proof_test.go b/pkg/proof_test.go similarity index 100% rename from common/proof_test.go rename to pkg/proof_test.go diff --git a/common/pubkey.go b/pkg/pubkey.go similarity index 100% rename from common/pubkey.go rename to pkg/pubkey.go diff --git a/common/pubkey_test.go b/pkg/pubkey_test.go similarity index 100% rename from common/pubkey_test.go rename to pkg/pubkey_test.go diff --git a/common/testdata/eth_header_18495266.json b/pkg/testdata/eth_header_18495266.json similarity index 100% rename from common/testdata/eth_header_18495266.json rename to pkg/testdata/eth_header_18495266.json diff --git a/common/testdata/ethereum/header.json b/pkg/testdata/ethereum/header.json similarity index 100% rename from common/testdata/ethereum/header.json rename to pkg/testdata/ethereum/header.json diff --git a/common/testdata/ethereum/receipt_0.json b/pkg/testdata/ethereum/receipt_0.json similarity index 100% rename from common/testdata/ethereum/receipt_0.json rename to pkg/testdata/ethereum/receipt_0.json diff --git a/common/testdata/ethereum/receipt_1.json b/pkg/testdata/ethereum/receipt_1.json similarity index 100% rename from common/testdata/ethereum/receipt_1.json rename to pkg/testdata/ethereum/receipt_1.json diff --git a/common/testdata/ethereum/receipt_10.json b/pkg/testdata/ethereum/receipt_10.json similarity index 100% rename from common/testdata/ethereum/receipt_10.json rename to pkg/testdata/ethereum/receipt_10.json diff --git a/common/testdata/ethereum/receipt_11.json b/pkg/testdata/ethereum/receipt_11.json similarity index 100% rename from common/testdata/ethereum/receipt_11.json rename to pkg/testdata/ethereum/receipt_11.json diff --git a/common/testdata/ethereum/receipt_12.json b/pkg/testdata/ethereum/receipt_12.json similarity index 100% rename from common/testdata/ethereum/receipt_12.json rename to pkg/testdata/ethereum/receipt_12.json diff --git a/common/testdata/ethereum/receipt_13.json b/pkg/testdata/ethereum/receipt_13.json similarity index 100% rename from common/testdata/ethereum/receipt_13.json rename to pkg/testdata/ethereum/receipt_13.json diff --git a/common/testdata/ethereum/receipt_14.json b/pkg/testdata/ethereum/receipt_14.json similarity index 100% rename from common/testdata/ethereum/receipt_14.json rename to pkg/testdata/ethereum/receipt_14.json diff --git a/common/testdata/ethereum/receipt_15.json b/pkg/testdata/ethereum/receipt_15.json similarity index 100% rename from common/testdata/ethereum/receipt_15.json rename to pkg/testdata/ethereum/receipt_15.json diff --git a/common/testdata/ethereum/receipt_16.json b/pkg/testdata/ethereum/receipt_16.json similarity index 100% rename from common/testdata/ethereum/receipt_16.json rename to pkg/testdata/ethereum/receipt_16.json diff --git a/common/testdata/ethereum/receipt_17.json b/pkg/testdata/ethereum/receipt_17.json similarity index 100% rename from common/testdata/ethereum/receipt_17.json rename to pkg/testdata/ethereum/receipt_17.json diff --git a/common/testdata/ethereum/receipt_18.json b/pkg/testdata/ethereum/receipt_18.json similarity index 100% rename from common/testdata/ethereum/receipt_18.json rename to pkg/testdata/ethereum/receipt_18.json diff --git a/common/testdata/ethereum/receipt_19.json b/pkg/testdata/ethereum/receipt_19.json similarity index 100% rename from common/testdata/ethereum/receipt_19.json rename to pkg/testdata/ethereum/receipt_19.json diff --git a/common/testdata/ethereum/receipt_2.json b/pkg/testdata/ethereum/receipt_2.json similarity index 100% rename from common/testdata/ethereum/receipt_2.json rename to pkg/testdata/ethereum/receipt_2.json diff --git a/common/testdata/ethereum/receipt_20.json b/pkg/testdata/ethereum/receipt_20.json similarity index 100% rename from common/testdata/ethereum/receipt_20.json rename to pkg/testdata/ethereum/receipt_20.json diff --git a/common/testdata/ethereum/receipt_21.json b/pkg/testdata/ethereum/receipt_21.json similarity index 100% rename from common/testdata/ethereum/receipt_21.json rename to pkg/testdata/ethereum/receipt_21.json diff --git a/common/testdata/ethereum/receipt_22.json b/pkg/testdata/ethereum/receipt_22.json similarity index 100% rename from common/testdata/ethereum/receipt_22.json rename to pkg/testdata/ethereum/receipt_22.json diff --git a/common/testdata/ethereum/receipt_23.json b/pkg/testdata/ethereum/receipt_23.json similarity index 100% rename from common/testdata/ethereum/receipt_23.json rename to pkg/testdata/ethereum/receipt_23.json diff --git a/common/testdata/ethereum/receipt_24.json b/pkg/testdata/ethereum/receipt_24.json similarity index 100% rename from common/testdata/ethereum/receipt_24.json rename to pkg/testdata/ethereum/receipt_24.json diff --git a/common/testdata/ethereum/receipt_25.json b/pkg/testdata/ethereum/receipt_25.json similarity index 100% rename from common/testdata/ethereum/receipt_25.json rename to pkg/testdata/ethereum/receipt_25.json diff --git a/common/testdata/ethereum/receipt_26.json b/pkg/testdata/ethereum/receipt_26.json similarity index 100% rename from common/testdata/ethereum/receipt_26.json rename to pkg/testdata/ethereum/receipt_26.json diff --git a/common/testdata/ethereum/receipt_27.json b/pkg/testdata/ethereum/receipt_27.json similarity index 100% rename from common/testdata/ethereum/receipt_27.json rename to pkg/testdata/ethereum/receipt_27.json diff --git a/common/testdata/ethereum/receipt_28.json b/pkg/testdata/ethereum/receipt_28.json similarity index 100% rename from common/testdata/ethereum/receipt_28.json rename to pkg/testdata/ethereum/receipt_28.json diff --git a/common/testdata/ethereum/receipt_29.json b/pkg/testdata/ethereum/receipt_29.json similarity index 100% rename from common/testdata/ethereum/receipt_29.json rename to pkg/testdata/ethereum/receipt_29.json diff --git a/common/testdata/ethereum/receipt_3.json b/pkg/testdata/ethereum/receipt_3.json similarity index 100% rename from common/testdata/ethereum/receipt_3.json rename to pkg/testdata/ethereum/receipt_3.json diff --git a/common/testdata/ethereum/receipt_30.json b/pkg/testdata/ethereum/receipt_30.json similarity index 100% rename from common/testdata/ethereum/receipt_30.json rename to pkg/testdata/ethereum/receipt_30.json diff --git a/common/testdata/ethereum/receipt_31.json b/pkg/testdata/ethereum/receipt_31.json similarity index 100% rename from common/testdata/ethereum/receipt_31.json rename to pkg/testdata/ethereum/receipt_31.json diff --git a/common/testdata/ethereum/receipt_32.json b/pkg/testdata/ethereum/receipt_32.json similarity index 100% rename from common/testdata/ethereum/receipt_32.json rename to pkg/testdata/ethereum/receipt_32.json diff --git a/common/testdata/ethereum/receipt_33.json b/pkg/testdata/ethereum/receipt_33.json similarity index 100% rename from common/testdata/ethereum/receipt_33.json rename to pkg/testdata/ethereum/receipt_33.json diff --git a/common/testdata/ethereum/receipt_34.json b/pkg/testdata/ethereum/receipt_34.json similarity index 100% rename from common/testdata/ethereum/receipt_34.json rename to pkg/testdata/ethereum/receipt_34.json diff --git a/common/testdata/ethereum/receipt_35.json b/pkg/testdata/ethereum/receipt_35.json similarity index 100% rename from common/testdata/ethereum/receipt_35.json rename to pkg/testdata/ethereum/receipt_35.json diff --git a/common/testdata/ethereum/receipt_36.json b/pkg/testdata/ethereum/receipt_36.json similarity index 100% rename from common/testdata/ethereum/receipt_36.json rename to pkg/testdata/ethereum/receipt_36.json diff --git a/common/testdata/ethereum/receipt_37.json b/pkg/testdata/ethereum/receipt_37.json similarity index 100% rename from common/testdata/ethereum/receipt_37.json rename to pkg/testdata/ethereum/receipt_37.json diff --git a/common/testdata/ethereum/receipt_38.json b/pkg/testdata/ethereum/receipt_38.json similarity index 100% rename from common/testdata/ethereum/receipt_38.json rename to pkg/testdata/ethereum/receipt_38.json diff --git a/common/testdata/ethereum/receipt_39.json b/pkg/testdata/ethereum/receipt_39.json similarity index 100% rename from common/testdata/ethereum/receipt_39.json rename to pkg/testdata/ethereum/receipt_39.json diff --git a/common/testdata/ethereum/receipt_4.json b/pkg/testdata/ethereum/receipt_4.json similarity index 100% rename from common/testdata/ethereum/receipt_4.json rename to pkg/testdata/ethereum/receipt_4.json diff --git a/common/testdata/ethereum/receipt_40.json b/pkg/testdata/ethereum/receipt_40.json similarity index 100% rename from common/testdata/ethereum/receipt_40.json rename to pkg/testdata/ethereum/receipt_40.json diff --git a/common/testdata/ethereum/receipt_41.json b/pkg/testdata/ethereum/receipt_41.json similarity index 100% rename from common/testdata/ethereum/receipt_41.json rename to pkg/testdata/ethereum/receipt_41.json diff --git a/common/testdata/ethereum/receipt_42.json b/pkg/testdata/ethereum/receipt_42.json similarity index 100% rename from common/testdata/ethereum/receipt_42.json rename to pkg/testdata/ethereum/receipt_42.json diff --git a/common/testdata/ethereum/receipt_43.json b/pkg/testdata/ethereum/receipt_43.json similarity index 100% rename from common/testdata/ethereum/receipt_43.json rename to pkg/testdata/ethereum/receipt_43.json diff --git a/common/testdata/ethereum/receipt_44.json b/pkg/testdata/ethereum/receipt_44.json similarity index 100% rename from common/testdata/ethereum/receipt_44.json rename to pkg/testdata/ethereum/receipt_44.json diff --git a/common/testdata/ethereum/receipt_45.json b/pkg/testdata/ethereum/receipt_45.json similarity index 100% rename from common/testdata/ethereum/receipt_45.json rename to pkg/testdata/ethereum/receipt_45.json diff --git a/common/testdata/ethereum/receipt_46.json b/pkg/testdata/ethereum/receipt_46.json similarity index 100% rename from common/testdata/ethereum/receipt_46.json rename to pkg/testdata/ethereum/receipt_46.json diff --git a/common/testdata/ethereum/receipt_47.json b/pkg/testdata/ethereum/receipt_47.json similarity index 100% rename from common/testdata/ethereum/receipt_47.json rename to pkg/testdata/ethereum/receipt_47.json diff --git a/common/testdata/ethereum/receipt_48.json b/pkg/testdata/ethereum/receipt_48.json similarity index 100% rename from common/testdata/ethereum/receipt_48.json rename to pkg/testdata/ethereum/receipt_48.json diff --git a/common/testdata/ethereum/receipt_49.json b/pkg/testdata/ethereum/receipt_49.json similarity index 100% rename from common/testdata/ethereum/receipt_49.json rename to pkg/testdata/ethereum/receipt_49.json diff --git a/common/testdata/ethereum/receipt_5.json b/pkg/testdata/ethereum/receipt_5.json similarity index 100% rename from common/testdata/ethereum/receipt_5.json rename to pkg/testdata/ethereum/receipt_5.json diff --git a/common/testdata/ethereum/receipt_50.json b/pkg/testdata/ethereum/receipt_50.json similarity index 100% rename from common/testdata/ethereum/receipt_50.json rename to pkg/testdata/ethereum/receipt_50.json diff --git a/common/testdata/ethereum/receipt_51.json b/pkg/testdata/ethereum/receipt_51.json similarity index 100% rename from common/testdata/ethereum/receipt_51.json rename to pkg/testdata/ethereum/receipt_51.json diff --git a/common/testdata/ethereum/receipt_52.json b/pkg/testdata/ethereum/receipt_52.json similarity index 100% rename from common/testdata/ethereum/receipt_52.json rename to pkg/testdata/ethereum/receipt_52.json diff --git a/common/testdata/ethereum/receipt_53.json b/pkg/testdata/ethereum/receipt_53.json similarity index 100% rename from common/testdata/ethereum/receipt_53.json rename to pkg/testdata/ethereum/receipt_53.json diff --git a/common/testdata/ethereum/receipt_54.json b/pkg/testdata/ethereum/receipt_54.json similarity index 100% rename from common/testdata/ethereum/receipt_54.json rename to pkg/testdata/ethereum/receipt_54.json diff --git a/common/testdata/ethereum/receipt_55.json b/pkg/testdata/ethereum/receipt_55.json similarity index 100% rename from common/testdata/ethereum/receipt_55.json rename to pkg/testdata/ethereum/receipt_55.json diff --git a/common/testdata/ethereum/receipt_56.json b/pkg/testdata/ethereum/receipt_56.json similarity index 100% rename from common/testdata/ethereum/receipt_56.json rename to pkg/testdata/ethereum/receipt_56.json diff --git a/common/testdata/ethereum/receipt_57.json b/pkg/testdata/ethereum/receipt_57.json similarity index 100% rename from common/testdata/ethereum/receipt_57.json rename to pkg/testdata/ethereum/receipt_57.json diff --git a/common/testdata/ethereum/receipt_58.json b/pkg/testdata/ethereum/receipt_58.json similarity index 100% rename from common/testdata/ethereum/receipt_58.json rename to pkg/testdata/ethereum/receipt_58.json diff --git a/common/testdata/ethereum/receipt_59.json b/pkg/testdata/ethereum/receipt_59.json similarity index 100% rename from common/testdata/ethereum/receipt_59.json rename to pkg/testdata/ethereum/receipt_59.json diff --git a/common/testdata/ethereum/receipt_6.json b/pkg/testdata/ethereum/receipt_6.json similarity index 100% rename from common/testdata/ethereum/receipt_6.json rename to pkg/testdata/ethereum/receipt_6.json diff --git a/common/testdata/ethereum/receipt_60.json b/pkg/testdata/ethereum/receipt_60.json similarity index 100% rename from common/testdata/ethereum/receipt_60.json rename to pkg/testdata/ethereum/receipt_60.json diff --git a/common/testdata/ethereum/receipt_61.json b/pkg/testdata/ethereum/receipt_61.json similarity index 100% rename from common/testdata/ethereum/receipt_61.json rename to pkg/testdata/ethereum/receipt_61.json diff --git a/common/testdata/ethereum/receipt_62.json b/pkg/testdata/ethereum/receipt_62.json similarity index 100% rename from common/testdata/ethereum/receipt_62.json rename to pkg/testdata/ethereum/receipt_62.json diff --git a/common/testdata/ethereum/receipt_63.json b/pkg/testdata/ethereum/receipt_63.json similarity index 100% rename from common/testdata/ethereum/receipt_63.json rename to pkg/testdata/ethereum/receipt_63.json diff --git a/common/testdata/ethereum/receipt_64.json b/pkg/testdata/ethereum/receipt_64.json similarity index 100% rename from common/testdata/ethereum/receipt_64.json rename to pkg/testdata/ethereum/receipt_64.json diff --git a/common/testdata/ethereum/receipt_65.json b/pkg/testdata/ethereum/receipt_65.json similarity index 100% rename from common/testdata/ethereum/receipt_65.json rename to pkg/testdata/ethereum/receipt_65.json diff --git a/common/testdata/ethereum/receipt_66.json b/pkg/testdata/ethereum/receipt_66.json similarity index 100% rename from common/testdata/ethereum/receipt_66.json rename to pkg/testdata/ethereum/receipt_66.json diff --git a/common/testdata/ethereum/receipt_67.json b/pkg/testdata/ethereum/receipt_67.json similarity index 100% rename from common/testdata/ethereum/receipt_67.json rename to pkg/testdata/ethereum/receipt_67.json diff --git a/common/testdata/ethereum/receipt_68.json b/pkg/testdata/ethereum/receipt_68.json similarity index 100% rename from common/testdata/ethereum/receipt_68.json rename to pkg/testdata/ethereum/receipt_68.json diff --git a/common/testdata/ethereum/receipt_69.json b/pkg/testdata/ethereum/receipt_69.json similarity index 100% rename from common/testdata/ethereum/receipt_69.json rename to pkg/testdata/ethereum/receipt_69.json diff --git a/common/testdata/ethereum/receipt_7.json b/pkg/testdata/ethereum/receipt_7.json similarity index 100% rename from common/testdata/ethereum/receipt_7.json rename to pkg/testdata/ethereum/receipt_7.json diff --git a/common/testdata/ethereum/receipt_70.json b/pkg/testdata/ethereum/receipt_70.json similarity index 100% rename from common/testdata/ethereum/receipt_70.json rename to pkg/testdata/ethereum/receipt_70.json diff --git a/common/testdata/ethereum/receipt_71.json b/pkg/testdata/ethereum/receipt_71.json similarity index 100% rename from common/testdata/ethereum/receipt_71.json rename to pkg/testdata/ethereum/receipt_71.json diff --git a/common/testdata/ethereum/receipt_72.json b/pkg/testdata/ethereum/receipt_72.json similarity index 100% rename from common/testdata/ethereum/receipt_72.json rename to pkg/testdata/ethereum/receipt_72.json diff --git a/common/testdata/ethereum/receipt_73.json b/pkg/testdata/ethereum/receipt_73.json similarity index 100% rename from common/testdata/ethereum/receipt_73.json rename to pkg/testdata/ethereum/receipt_73.json diff --git a/common/testdata/ethereum/receipt_74.json b/pkg/testdata/ethereum/receipt_74.json similarity index 100% rename from common/testdata/ethereum/receipt_74.json rename to pkg/testdata/ethereum/receipt_74.json diff --git a/common/testdata/ethereum/receipt_75.json b/pkg/testdata/ethereum/receipt_75.json similarity index 100% rename from common/testdata/ethereum/receipt_75.json rename to pkg/testdata/ethereum/receipt_75.json diff --git a/common/testdata/ethereum/receipt_76.json b/pkg/testdata/ethereum/receipt_76.json similarity index 100% rename from common/testdata/ethereum/receipt_76.json rename to pkg/testdata/ethereum/receipt_76.json diff --git a/common/testdata/ethereum/receipt_77.json b/pkg/testdata/ethereum/receipt_77.json similarity index 100% rename from common/testdata/ethereum/receipt_77.json rename to pkg/testdata/ethereum/receipt_77.json diff --git a/common/testdata/ethereum/receipt_78.json b/pkg/testdata/ethereum/receipt_78.json similarity index 100% rename from common/testdata/ethereum/receipt_78.json rename to pkg/testdata/ethereum/receipt_78.json diff --git a/common/testdata/ethereum/receipt_79.json b/pkg/testdata/ethereum/receipt_79.json similarity index 100% rename from common/testdata/ethereum/receipt_79.json rename to pkg/testdata/ethereum/receipt_79.json diff --git a/common/testdata/ethereum/receipt_8.json b/pkg/testdata/ethereum/receipt_8.json similarity index 100% rename from common/testdata/ethereum/receipt_8.json rename to pkg/testdata/ethereum/receipt_8.json diff --git a/common/testdata/ethereum/receipt_80.json b/pkg/testdata/ethereum/receipt_80.json similarity index 100% rename from common/testdata/ethereum/receipt_80.json rename to pkg/testdata/ethereum/receipt_80.json diff --git a/common/testdata/ethereum/receipt_9.json b/pkg/testdata/ethereum/receipt_9.json similarity index 100% rename from common/testdata/ethereum/receipt_9.json rename to pkg/testdata/ethereum/receipt_9.json diff --git a/common/testdata/ethereum/tx_0.json b/pkg/testdata/ethereum/tx_0.json similarity index 100% rename from common/testdata/ethereum/tx_0.json rename to pkg/testdata/ethereum/tx_0.json diff --git a/common/testdata/ethereum/tx_1.json b/pkg/testdata/ethereum/tx_1.json similarity index 100% rename from common/testdata/ethereum/tx_1.json rename to pkg/testdata/ethereum/tx_1.json diff --git a/common/testdata/ethereum/tx_10.json b/pkg/testdata/ethereum/tx_10.json similarity index 100% rename from common/testdata/ethereum/tx_10.json rename to pkg/testdata/ethereum/tx_10.json diff --git a/common/testdata/ethereum/tx_11.json b/pkg/testdata/ethereum/tx_11.json similarity index 100% rename from common/testdata/ethereum/tx_11.json rename to pkg/testdata/ethereum/tx_11.json diff --git a/common/testdata/ethereum/tx_12.json b/pkg/testdata/ethereum/tx_12.json similarity index 100% rename from common/testdata/ethereum/tx_12.json rename to pkg/testdata/ethereum/tx_12.json diff --git a/common/testdata/ethereum/tx_13.json b/pkg/testdata/ethereum/tx_13.json similarity index 100% rename from common/testdata/ethereum/tx_13.json rename to pkg/testdata/ethereum/tx_13.json diff --git a/common/testdata/ethereum/tx_14.json b/pkg/testdata/ethereum/tx_14.json similarity index 100% rename from common/testdata/ethereum/tx_14.json rename to pkg/testdata/ethereum/tx_14.json diff --git a/common/testdata/ethereum/tx_15.json b/pkg/testdata/ethereum/tx_15.json similarity index 100% rename from common/testdata/ethereum/tx_15.json rename to pkg/testdata/ethereum/tx_15.json diff --git a/common/testdata/ethereum/tx_16.json b/pkg/testdata/ethereum/tx_16.json similarity index 100% rename from common/testdata/ethereum/tx_16.json rename to pkg/testdata/ethereum/tx_16.json diff --git a/common/testdata/ethereum/tx_17.json b/pkg/testdata/ethereum/tx_17.json similarity index 100% rename from common/testdata/ethereum/tx_17.json rename to pkg/testdata/ethereum/tx_17.json diff --git a/common/testdata/ethereum/tx_18.json b/pkg/testdata/ethereum/tx_18.json similarity index 100% rename from common/testdata/ethereum/tx_18.json rename to pkg/testdata/ethereum/tx_18.json diff --git a/common/testdata/ethereum/tx_19.json b/pkg/testdata/ethereum/tx_19.json similarity index 100% rename from common/testdata/ethereum/tx_19.json rename to pkg/testdata/ethereum/tx_19.json diff --git a/common/testdata/ethereum/tx_2.json b/pkg/testdata/ethereum/tx_2.json similarity index 100% rename from common/testdata/ethereum/tx_2.json rename to pkg/testdata/ethereum/tx_2.json diff --git a/common/testdata/ethereum/tx_20.json b/pkg/testdata/ethereum/tx_20.json similarity index 100% rename from common/testdata/ethereum/tx_20.json rename to pkg/testdata/ethereum/tx_20.json diff --git a/common/testdata/ethereum/tx_21.json b/pkg/testdata/ethereum/tx_21.json similarity index 100% rename from common/testdata/ethereum/tx_21.json rename to pkg/testdata/ethereum/tx_21.json diff --git a/common/testdata/ethereum/tx_22.json b/pkg/testdata/ethereum/tx_22.json similarity index 100% rename from common/testdata/ethereum/tx_22.json rename to pkg/testdata/ethereum/tx_22.json diff --git a/common/testdata/ethereum/tx_23.json b/pkg/testdata/ethereum/tx_23.json similarity index 100% rename from common/testdata/ethereum/tx_23.json rename to pkg/testdata/ethereum/tx_23.json diff --git a/common/testdata/ethereum/tx_24.json b/pkg/testdata/ethereum/tx_24.json similarity index 100% rename from common/testdata/ethereum/tx_24.json rename to pkg/testdata/ethereum/tx_24.json diff --git a/common/testdata/ethereum/tx_25.json b/pkg/testdata/ethereum/tx_25.json similarity index 100% rename from common/testdata/ethereum/tx_25.json rename to pkg/testdata/ethereum/tx_25.json diff --git a/common/testdata/ethereum/tx_26.json b/pkg/testdata/ethereum/tx_26.json similarity index 100% rename from common/testdata/ethereum/tx_26.json rename to pkg/testdata/ethereum/tx_26.json diff --git a/common/testdata/ethereum/tx_27.json b/pkg/testdata/ethereum/tx_27.json similarity index 100% rename from common/testdata/ethereum/tx_27.json rename to pkg/testdata/ethereum/tx_27.json diff --git a/common/testdata/ethereum/tx_28.json b/pkg/testdata/ethereum/tx_28.json similarity index 100% rename from common/testdata/ethereum/tx_28.json rename to pkg/testdata/ethereum/tx_28.json diff --git a/common/testdata/ethereum/tx_29.json b/pkg/testdata/ethereum/tx_29.json similarity index 100% rename from common/testdata/ethereum/tx_29.json rename to pkg/testdata/ethereum/tx_29.json diff --git a/common/testdata/ethereum/tx_3.json b/pkg/testdata/ethereum/tx_3.json similarity index 100% rename from common/testdata/ethereum/tx_3.json rename to pkg/testdata/ethereum/tx_3.json diff --git a/common/testdata/ethereum/tx_30.json b/pkg/testdata/ethereum/tx_30.json similarity index 100% rename from common/testdata/ethereum/tx_30.json rename to pkg/testdata/ethereum/tx_30.json diff --git a/common/testdata/ethereum/tx_31.json b/pkg/testdata/ethereum/tx_31.json similarity index 100% rename from common/testdata/ethereum/tx_31.json rename to pkg/testdata/ethereum/tx_31.json diff --git a/common/testdata/ethereum/tx_32.json b/pkg/testdata/ethereum/tx_32.json similarity index 100% rename from common/testdata/ethereum/tx_32.json rename to pkg/testdata/ethereum/tx_32.json diff --git a/common/testdata/ethereum/tx_33.json b/pkg/testdata/ethereum/tx_33.json similarity index 100% rename from common/testdata/ethereum/tx_33.json rename to pkg/testdata/ethereum/tx_33.json diff --git a/common/testdata/ethereum/tx_34.json b/pkg/testdata/ethereum/tx_34.json similarity index 100% rename from common/testdata/ethereum/tx_34.json rename to pkg/testdata/ethereum/tx_34.json diff --git a/common/testdata/ethereum/tx_35.json b/pkg/testdata/ethereum/tx_35.json similarity index 100% rename from common/testdata/ethereum/tx_35.json rename to pkg/testdata/ethereum/tx_35.json diff --git a/common/testdata/ethereum/tx_36.json b/pkg/testdata/ethereum/tx_36.json similarity index 100% rename from common/testdata/ethereum/tx_36.json rename to pkg/testdata/ethereum/tx_36.json diff --git a/common/testdata/ethereum/tx_37.json b/pkg/testdata/ethereum/tx_37.json similarity index 100% rename from common/testdata/ethereum/tx_37.json rename to pkg/testdata/ethereum/tx_37.json diff --git a/common/testdata/ethereum/tx_38.json b/pkg/testdata/ethereum/tx_38.json similarity index 100% rename from common/testdata/ethereum/tx_38.json rename to pkg/testdata/ethereum/tx_38.json diff --git a/common/testdata/ethereum/tx_39.json b/pkg/testdata/ethereum/tx_39.json similarity index 100% rename from common/testdata/ethereum/tx_39.json rename to pkg/testdata/ethereum/tx_39.json diff --git a/common/testdata/ethereum/tx_4.json b/pkg/testdata/ethereum/tx_4.json similarity index 100% rename from common/testdata/ethereum/tx_4.json rename to pkg/testdata/ethereum/tx_4.json diff --git a/common/testdata/ethereum/tx_40.json b/pkg/testdata/ethereum/tx_40.json similarity index 100% rename from common/testdata/ethereum/tx_40.json rename to pkg/testdata/ethereum/tx_40.json diff --git a/common/testdata/ethereum/tx_41.json b/pkg/testdata/ethereum/tx_41.json similarity index 100% rename from common/testdata/ethereum/tx_41.json rename to pkg/testdata/ethereum/tx_41.json diff --git a/common/testdata/ethereum/tx_42.json b/pkg/testdata/ethereum/tx_42.json similarity index 100% rename from common/testdata/ethereum/tx_42.json rename to pkg/testdata/ethereum/tx_42.json diff --git a/common/testdata/ethereum/tx_43.json b/pkg/testdata/ethereum/tx_43.json similarity index 100% rename from common/testdata/ethereum/tx_43.json rename to pkg/testdata/ethereum/tx_43.json diff --git a/common/testdata/ethereum/tx_44.json b/pkg/testdata/ethereum/tx_44.json similarity index 100% rename from common/testdata/ethereum/tx_44.json rename to pkg/testdata/ethereum/tx_44.json diff --git a/common/testdata/ethereum/tx_45.json b/pkg/testdata/ethereum/tx_45.json similarity index 100% rename from common/testdata/ethereum/tx_45.json rename to pkg/testdata/ethereum/tx_45.json diff --git a/common/testdata/ethereum/tx_46.json b/pkg/testdata/ethereum/tx_46.json similarity index 100% rename from common/testdata/ethereum/tx_46.json rename to pkg/testdata/ethereum/tx_46.json diff --git a/common/testdata/ethereum/tx_47.json b/pkg/testdata/ethereum/tx_47.json similarity index 100% rename from common/testdata/ethereum/tx_47.json rename to pkg/testdata/ethereum/tx_47.json diff --git a/common/testdata/ethereum/tx_48.json b/pkg/testdata/ethereum/tx_48.json similarity index 100% rename from common/testdata/ethereum/tx_48.json rename to pkg/testdata/ethereum/tx_48.json diff --git a/common/testdata/ethereum/tx_49.json b/pkg/testdata/ethereum/tx_49.json similarity index 100% rename from common/testdata/ethereum/tx_49.json rename to pkg/testdata/ethereum/tx_49.json diff --git a/common/testdata/ethereum/tx_5.json b/pkg/testdata/ethereum/tx_5.json similarity index 100% rename from common/testdata/ethereum/tx_5.json rename to pkg/testdata/ethereum/tx_5.json diff --git a/common/testdata/ethereum/tx_50.json b/pkg/testdata/ethereum/tx_50.json similarity index 100% rename from common/testdata/ethereum/tx_50.json rename to pkg/testdata/ethereum/tx_50.json diff --git a/common/testdata/ethereum/tx_51.json b/pkg/testdata/ethereum/tx_51.json similarity index 100% rename from common/testdata/ethereum/tx_51.json rename to pkg/testdata/ethereum/tx_51.json diff --git a/common/testdata/ethereum/tx_52.json b/pkg/testdata/ethereum/tx_52.json similarity index 100% rename from common/testdata/ethereum/tx_52.json rename to pkg/testdata/ethereum/tx_52.json diff --git a/common/testdata/ethereum/tx_53.json b/pkg/testdata/ethereum/tx_53.json similarity index 100% rename from common/testdata/ethereum/tx_53.json rename to pkg/testdata/ethereum/tx_53.json diff --git a/common/testdata/ethereum/tx_54.json b/pkg/testdata/ethereum/tx_54.json similarity index 100% rename from common/testdata/ethereum/tx_54.json rename to pkg/testdata/ethereum/tx_54.json diff --git a/common/testdata/ethereum/tx_55.json b/pkg/testdata/ethereum/tx_55.json similarity index 100% rename from common/testdata/ethereum/tx_55.json rename to pkg/testdata/ethereum/tx_55.json diff --git a/common/testdata/ethereum/tx_56.json b/pkg/testdata/ethereum/tx_56.json similarity index 100% rename from common/testdata/ethereum/tx_56.json rename to pkg/testdata/ethereum/tx_56.json diff --git a/common/testdata/ethereum/tx_57.json b/pkg/testdata/ethereum/tx_57.json similarity index 100% rename from common/testdata/ethereum/tx_57.json rename to pkg/testdata/ethereum/tx_57.json diff --git a/common/testdata/ethereum/tx_58.json b/pkg/testdata/ethereum/tx_58.json similarity index 100% rename from common/testdata/ethereum/tx_58.json rename to pkg/testdata/ethereum/tx_58.json diff --git a/common/testdata/ethereum/tx_59.json b/pkg/testdata/ethereum/tx_59.json similarity index 100% rename from common/testdata/ethereum/tx_59.json rename to pkg/testdata/ethereum/tx_59.json diff --git a/common/testdata/ethereum/tx_6.json b/pkg/testdata/ethereum/tx_6.json similarity index 100% rename from common/testdata/ethereum/tx_6.json rename to pkg/testdata/ethereum/tx_6.json diff --git a/common/testdata/ethereum/tx_60.json b/pkg/testdata/ethereum/tx_60.json similarity index 100% rename from common/testdata/ethereum/tx_60.json rename to pkg/testdata/ethereum/tx_60.json diff --git a/common/testdata/ethereum/tx_61.json b/pkg/testdata/ethereum/tx_61.json similarity index 100% rename from common/testdata/ethereum/tx_61.json rename to pkg/testdata/ethereum/tx_61.json diff --git a/common/testdata/ethereum/tx_62.json b/pkg/testdata/ethereum/tx_62.json similarity index 100% rename from common/testdata/ethereum/tx_62.json rename to pkg/testdata/ethereum/tx_62.json diff --git a/common/testdata/ethereum/tx_63.json b/pkg/testdata/ethereum/tx_63.json similarity index 100% rename from common/testdata/ethereum/tx_63.json rename to pkg/testdata/ethereum/tx_63.json diff --git a/common/testdata/ethereum/tx_64.json b/pkg/testdata/ethereum/tx_64.json similarity index 100% rename from common/testdata/ethereum/tx_64.json rename to pkg/testdata/ethereum/tx_64.json diff --git a/common/testdata/ethereum/tx_65.json b/pkg/testdata/ethereum/tx_65.json similarity index 100% rename from common/testdata/ethereum/tx_65.json rename to pkg/testdata/ethereum/tx_65.json diff --git a/common/testdata/ethereum/tx_66.json b/pkg/testdata/ethereum/tx_66.json similarity index 100% rename from common/testdata/ethereum/tx_66.json rename to pkg/testdata/ethereum/tx_66.json diff --git a/common/testdata/ethereum/tx_67.json b/pkg/testdata/ethereum/tx_67.json similarity index 100% rename from common/testdata/ethereum/tx_67.json rename to pkg/testdata/ethereum/tx_67.json diff --git a/common/testdata/ethereum/tx_68.json b/pkg/testdata/ethereum/tx_68.json similarity index 100% rename from common/testdata/ethereum/tx_68.json rename to pkg/testdata/ethereum/tx_68.json diff --git a/common/testdata/ethereum/tx_69.json b/pkg/testdata/ethereum/tx_69.json similarity index 100% rename from common/testdata/ethereum/tx_69.json rename to pkg/testdata/ethereum/tx_69.json diff --git a/common/testdata/ethereum/tx_7.json b/pkg/testdata/ethereum/tx_7.json similarity index 100% rename from common/testdata/ethereum/tx_7.json rename to pkg/testdata/ethereum/tx_7.json diff --git a/common/testdata/ethereum/tx_70.json b/pkg/testdata/ethereum/tx_70.json similarity index 100% rename from common/testdata/ethereum/tx_70.json rename to pkg/testdata/ethereum/tx_70.json diff --git a/common/testdata/ethereum/tx_71.json b/pkg/testdata/ethereum/tx_71.json similarity index 100% rename from common/testdata/ethereum/tx_71.json rename to pkg/testdata/ethereum/tx_71.json diff --git a/common/testdata/ethereum/tx_72.json b/pkg/testdata/ethereum/tx_72.json similarity index 100% rename from common/testdata/ethereum/tx_72.json rename to pkg/testdata/ethereum/tx_72.json diff --git a/common/testdata/ethereum/tx_73.json b/pkg/testdata/ethereum/tx_73.json similarity index 100% rename from common/testdata/ethereum/tx_73.json rename to pkg/testdata/ethereum/tx_73.json diff --git a/common/testdata/ethereum/tx_74.json b/pkg/testdata/ethereum/tx_74.json similarity index 100% rename from common/testdata/ethereum/tx_74.json rename to pkg/testdata/ethereum/tx_74.json diff --git a/common/testdata/ethereum/tx_75.json b/pkg/testdata/ethereum/tx_75.json similarity index 100% rename from common/testdata/ethereum/tx_75.json rename to pkg/testdata/ethereum/tx_75.json diff --git a/common/testdata/ethereum/tx_76.json b/pkg/testdata/ethereum/tx_76.json similarity index 100% rename from common/testdata/ethereum/tx_76.json rename to pkg/testdata/ethereum/tx_76.json diff --git a/common/testdata/ethereum/tx_77.json b/pkg/testdata/ethereum/tx_77.json similarity index 100% rename from common/testdata/ethereum/tx_77.json rename to pkg/testdata/ethereum/tx_77.json diff --git a/common/testdata/ethereum/tx_78.json b/pkg/testdata/ethereum/tx_78.json similarity index 100% rename from common/testdata/ethereum/tx_78.json rename to pkg/testdata/ethereum/tx_78.json diff --git a/common/testdata/ethereum/tx_79.json b/pkg/testdata/ethereum/tx_79.json similarity index 100% rename from common/testdata/ethereum/tx_79.json rename to pkg/testdata/ethereum/tx_79.json diff --git a/common/testdata/ethereum/tx_8.json b/pkg/testdata/ethereum/tx_8.json similarity index 100% rename from common/testdata/ethereum/tx_8.json rename to pkg/testdata/ethereum/tx_8.json diff --git a/common/testdata/ethereum/tx_80.json b/pkg/testdata/ethereum/tx_80.json similarity index 100% rename from common/testdata/ethereum/tx_80.json rename to pkg/testdata/ethereum/tx_80.json diff --git a/common/testdata/ethereum/tx_9.json b/pkg/testdata/ethereum/tx_9.json similarity index 100% rename from common/testdata/ethereum/tx_9.json rename to pkg/testdata/ethereum/tx_9.json diff --git a/common/testdata/test_blocks.json b/pkg/testdata/test_blocks.json similarity index 100% rename from common/testdata/test_blocks.json rename to pkg/testdata/test_blocks.json diff --git a/common/testdata/testdata.go b/pkg/testdata/testdata.go similarity index 100% rename from common/testdata/testdata.go rename to pkg/testdata/testdata.go diff --git a/common/tss.go b/pkg/tss.go similarity index 100% rename from common/tss.go rename to pkg/tss.go diff --git a/common/tss_test.go b/pkg/tss_test.go similarity index 100% rename from common/tss_test.go rename to pkg/tss_test.go diff --git a/common/utils.go b/pkg/utils.go similarity index 100% rename from common/utils.go rename to pkg/utils.go diff --git a/common/utils_test.go b/pkg/utils_test.go similarity index 100% rename from common/utils_test.go rename to pkg/utils_test.go diff --git a/common/version.go b/pkg/version.go similarity index 100% rename from common/version.go rename to pkg/version.go From e40b9922a41c2bdd54db88e08f91429731bf8125 Mon Sep 17 00:00:00 2001 From: skosito Date: Thu, 21 Mar 2024 19:22:04 +0100 Subject: [PATCH 27/41] Fix package in pkg --- pkg/address.go | 2 +- pkg/address_test.go | 2 +- pkg/authz_tx_types.go | 2 +- pkg/authz_tx_types_test.go | 2 +- pkg/bitcoin.go | 2 +- pkg/bitcoin_test.go | 2 +- pkg/chain.go | 2 +- pkg/chain_id.go | 2 +- pkg/chain_id_test.go | 2 +- pkg/chain_test.go | 2 +- pkg/chains.go | 2 +- pkg/chains_test.go | 2 +- pkg/coin.go | 2 +- pkg/coin_test.go | 2 +- pkg/commands.go | 2 +- pkg/common.pb.go | 2 +- pkg/constant.go | 2 +- pkg/gas_limits.go | 2 +- pkg/gas_limits_test.go | 2 +- pkg/headers.go | 2 +- pkg/headers_test.go | 2 +- pkg/proof.go | 2 +- pkg/proof_test.go | 2 +- pkg/pubkey.go | 2 +- pkg/pubkey_test.go | 2 +- pkg/tss.go | 2 +- pkg/tss_test.go | 2 +- pkg/utils.go | 2 +- pkg/utils_test.go | 2 +- pkg/version.go | 2 +- 30 files changed, 30 insertions(+), 30 deletions(-) diff --git a/pkg/address.go b/pkg/address.go index 6a2cdd7df1..d38aab79e9 100644 --- a/pkg/address.go +++ b/pkg/address.go @@ -1,4 +1,4 @@ -package common +package pkg import ( "errors" diff --git a/pkg/address_test.go b/pkg/address_test.go index dd78dda391..ea32cb9e89 100644 --- a/pkg/address_test.go +++ b/pkg/address_test.go @@ -1,4 +1,4 @@ -package common +package pkg import ( "errors" diff --git a/pkg/authz_tx_types.go b/pkg/authz_tx_types.go index 2eb205f6f9..ce618233f1 100644 --- a/pkg/authz_tx_types.go +++ b/pkg/authz_tx_types.go @@ -1,4 +1,4 @@ -package common +package pkg type TxType string diff --git a/pkg/authz_tx_types_test.go b/pkg/authz_tx_types_test.go index 2f5fcce8b1..1020b0df1b 100644 --- a/pkg/authz_tx_types_test.go +++ b/pkg/authz_tx_types_test.go @@ -1,4 +1,4 @@ -package common +package pkg import ( "testing" diff --git a/pkg/bitcoin.go b/pkg/bitcoin.go index 2392a344c7..77c70e351b 100644 --- a/pkg/bitcoin.go +++ b/pkg/bitcoin.go @@ -1,4 +1,4 @@ -package common +package pkg import ( "fmt" diff --git a/pkg/bitcoin_test.go b/pkg/bitcoin_test.go index 9f4c075a25..2f28e91fff 100644 --- a/pkg/bitcoin_test.go +++ b/pkg/bitcoin_test.go @@ -1,4 +1,4 @@ -package common +package pkg import ( "testing" diff --git a/pkg/chain.go b/pkg/chain.go index 20386e2a09..1f48d28d65 100644 --- a/pkg/chain.go +++ b/pkg/chain.go @@ -1,4 +1,4 @@ -package common +package pkg import ( "fmt" diff --git a/pkg/chain_id.go b/pkg/chain_id.go index 1be8a0129a..8356a925bd 100644 --- a/pkg/chain_id.go +++ b/pkg/chain_id.go @@ -1,4 +1,4 @@ -package common +package pkg import ( "errors" diff --git a/pkg/chain_id_test.go b/pkg/chain_id_test.go index 142162b097..ee9db41c63 100644 --- a/pkg/chain_id_test.go +++ b/pkg/chain_id_test.go @@ -1,4 +1,4 @@ -package common_test +package pkg_test import ( "testing" diff --git a/pkg/chain_test.go b/pkg/chain_test.go index f694439d8c..368317ecc8 100644 --- a/pkg/chain_test.go +++ b/pkg/chain_test.go @@ -1,4 +1,4 @@ -package common +package pkg import ( "encoding/hex" diff --git a/pkg/chains.go b/pkg/chains.go index a689489818..63aec166fc 100644 --- a/pkg/chains.go +++ b/pkg/chains.go @@ -1,4 +1,4 @@ -package common +package pkg import "fmt" diff --git a/pkg/chains_test.go b/pkg/chains_test.go index bfe1523398..e6e74d5be1 100644 --- a/pkg/chains_test.go +++ b/pkg/chains_test.go @@ -1,4 +1,4 @@ -package common +package pkg import ( "testing" diff --git a/pkg/coin.go b/pkg/coin.go index e2b4e0d44e..3488cd96e8 100644 --- a/pkg/coin.go +++ b/pkg/coin.go @@ -1,4 +1,4 @@ -package common +package pkg import ( "fmt" diff --git a/pkg/coin_test.go b/pkg/coin_test.go index b43feb8f24..b5d809bdcd 100644 --- a/pkg/coin_test.go +++ b/pkg/coin_test.go @@ -1,4 +1,4 @@ -package common_test +package pkg_test import ( "testing" diff --git a/pkg/commands.go b/pkg/commands.go index eb51797c3d..96900771b6 100644 --- a/pkg/commands.go +++ b/pkg/commands.go @@ -1,4 +1,4 @@ -package common +package pkg // commands for the zetaclient; mostly administrative commands/txs diff --git a/pkg/common.pb.go b/pkg/common.pb.go index 76f8d4d9de..50420edcb5 100644 --- a/pkg/common.pb.go +++ b/pkg/common.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: common/common.proto -package common +package pkg import ( fmt "fmt" diff --git a/pkg/constant.go b/pkg/constant.go index 2e10d21b87..7d4a65dc21 100644 --- a/pkg/constant.go +++ b/pkg/constant.go @@ -1,4 +1,4 @@ -package common +package pkg const ( // DefaultGasPriceMultiplier is the default gas price multiplier for outbond txs diff --git a/pkg/gas_limits.go b/pkg/gas_limits.go index 96748d1d86..7409a2ceb1 100644 --- a/pkg/gas_limits.go +++ b/pkg/gas_limits.go @@ -1,4 +1,4 @@ -package common +package pkg import ( sdkmath "cosmossdk.io/math" diff --git a/pkg/gas_limits_test.go b/pkg/gas_limits_test.go index 0277e48c61..d4cdcac249 100644 --- a/pkg/gas_limits_test.go +++ b/pkg/gas_limits_test.go @@ -1,4 +1,4 @@ -package common +package pkg import ( "testing" diff --git a/pkg/headers.go b/pkg/headers.go index 528bcffb78..a4df53ca4f 100644 --- a/pkg/headers.go +++ b/pkg/headers.go @@ -1,4 +1,4 @@ -package common +package pkg import ( "bytes" diff --git a/pkg/headers_test.go b/pkg/headers_test.go index e427763866..4e4101f5c1 100644 --- a/pkg/headers_test.go +++ b/pkg/headers_test.go @@ -1,4 +1,4 @@ -package common_test +package pkg_test import ( "bytes" diff --git a/pkg/proof.go b/pkg/proof.go index 668b1024a8..8c06c18588 100644 --- a/pkg/proof.go +++ b/pkg/proof.go @@ -1,4 +1,4 @@ -package common +package pkg import ( "bytes" diff --git a/pkg/proof_test.go b/pkg/proof_test.go index 3b26b5c0a3..550e13f9de 100644 --- a/pkg/proof_test.go +++ b/pkg/proof_test.go @@ -1,4 +1,4 @@ -package common_test +package pkg_test import ( "errors" diff --git a/pkg/pubkey.go b/pkg/pubkey.go index 1c597cc25c..0cda653a29 100644 --- a/pkg/pubkey.go +++ b/pkg/pubkey.go @@ -1,4 +1,4 @@ -package common +package pkg import ( "encoding/json" diff --git a/pkg/pubkey_test.go b/pkg/pubkey_test.go index 6984f31f26..4062b66139 100644 --- a/pkg/pubkey_test.go +++ b/pkg/pubkey_test.go @@ -1,4 +1,4 @@ -package common +package pkg import ( "encoding/hex" diff --git a/pkg/tss.go b/pkg/tss.go index 2f7831ae4c..abd5704e04 100644 --- a/pkg/tss.go +++ b/pkg/tss.go @@ -1,4 +1,4 @@ -package common +package pkg import ( "github.com/btcsuite/btcd/chaincfg" diff --git a/pkg/tss_test.go b/pkg/tss_test.go index 661cc3569d..a4aabb3212 100644 --- a/pkg/tss_test.go +++ b/pkg/tss_test.go @@ -1,4 +1,4 @@ -package common +package pkg import ( "testing" diff --git a/pkg/utils.go b/pkg/utils.go index 62c4e27ad5..f61dcc2117 100644 --- a/pkg/utils.go +++ b/pkg/utils.go @@ -1,4 +1,4 @@ -package common +package pkg import ( "encoding/hex" diff --git a/pkg/utils_test.go b/pkg/utils_test.go index d63cc107bd..8a6b18f5f5 100644 --- a/pkg/utils_test.go +++ b/pkg/utils_test.go @@ -1,4 +1,4 @@ -package common +package pkg import ( "encoding/hex" diff --git a/pkg/version.go b/pkg/version.go index ceb247379f..6e1fc343d8 100644 --- a/pkg/version.go +++ b/pkg/version.go @@ -1,4 +1,4 @@ -package common +package pkg var ( Name = "" From 2a672d974d4f703100a6bf8daeef3377734dd79a Mon Sep 17 00:00:00 2001 From: skosito Date: Thu, 21 Mar 2024 20:44:40 +0100 Subject: [PATCH 28/41] Use pkg everywhere instead of common --- cmd/zetaclientd/debug.go | 26 ++++---- cmd/zetaclientd/hsm.go | 2 +- cmd/zetaclientd/main.go | 2 +- cmd/zetaclientd/p2p_diagnostics.go | 2 +- cmd/zetaclientd/utils.go | 2 +- cmd/zetacored/get_pubkey.go | 10 +-- e2e/runner/evm.go | 8 +-- pkg/proof.go | 4 +- pkg/proof_test.go | 32 +++++----- pkg/pubkey.go | 2 +- pkg/pubkey_test.go | 2 +- pkg/tss.go | 6 +- pkg/tss_test.go | 2 +- testutil/keeper/mocks/crosschain/fungible.go | 20 +++--- testutil/keeper/mocks/crosschain/observer.go | 62 +++++++++---------- testutil/keeper/mocks/fungible/observer.go | 10 +-- testutil/sample/observer.go | 2 +- testutil/sample/sample.go | 6 +- x/crosschain/keeper/gas_payment_test.go | 54 ++++++++-------- x/crosschain/keeper/utils_test.go | 14 ++--- .../types/message_update_tss_address.go | 2 +- x/observer/keeper/utils_test.go | 6 +- zetaclient/interfaces/signer.go | 6 +- zetaclient/keys/keys.go | 12 ++-- zetaclient/keys/keys_test.go | 2 +- zetaclient/tss/tss_signer.go | 22 +++---- zetaclient/tss/tss_signer_test.go | 6 +- zetaclient/zetabridge/broadcast.go | 2 +- zetaclient/zetabridge/zetacore_bridge.go | 32 +++++----- 29 files changed, 179 insertions(+), 179 deletions(-) diff --git a/cmd/zetaclientd/debug.go b/cmd/zetaclientd/debug.go index 93d9717d9f..e60cf7e7a9 100644 --- a/cmd/zetaclientd/debug.go +++ b/cmd/zetaclientd/debug.go @@ -10,6 +10,7 @@ import ( "github.com/ethereum/go-ethereum/ethclient" "github.com/onrik/ethrpc" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/zetaclient/bitcoin" corecontext "github.com/zeta-chain/zetacore/zetaclient/core_context" "github.com/zeta-chain/zetacore/zetaclient/evm" @@ -22,7 +23,6 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" "github.com/rs/zerolog" "github.com/spf13/cobra" - "github.com/zeta-chain/zetacore/common" "github.com/zeta-chain/zetacore/testutil/sample" observertypes "github.com/zeta-chain/zetacore/x/observer/types" "github.com/zeta-chain/zetacore/zetaclient/config" @@ -90,12 +90,12 @@ func DebugCmd() *cobra.Command { return err } - chain := common.GetChainFromChainID(chainID) + chain := pkg.GetChainFromChainID(chainID) if chain == nil { return fmt.Errorf("invalid chain id") } - if common.IsEVMChain(chain.ChainId) { + if pkg.IsEVMChain(chain.ChainId) { ob := evm.ChainClient{ Mu: &sync.Mutex{}, @@ -104,7 +104,7 @@ func DebugCmd() *cobra.Command { ob.WithLogger(chainLogger) var ethRPC *ethrpc.EthRPC var client *ethclient.Client - coinType := common.CoinType_Cmd + coinType := pkg.CoinType_Cmd for chain, evmConfig := range cfg.GetAllEVMConfigs() { if chainID == chain { ethRPC = ethrpc.NewEthRPC(evmConfig.Endpoint) @@ -114,7 +114,7 @@ func DebugCmd() *cobra.Command { } ob.WithEvmClient(client) ob.WithEvmJSONRPC(ethRPC) - ob.WithChain(*common.GetChainFromChainID(chainID)) + ob.WithChain(*pkg.GetChainFromChainID(chainID)) } } hash := ethcommon.HexToHash(txHash) @@ -144,29 +144,29 @@ func DebugCmd() *cobra.Command { } evmChainParams.ZetaTokenContractAddress = chainParams.ZetaTokenContractAddress if strings.EqualFold(tx.To, chainParams.ConnectorContractAddress) { - coinType = common.CoinType_Zeta + coinType = pkg.CoinType_Zeta } else if strings.EqualFold(tx.To, chainParams.Erc20CustodyContractAddress) { - coinType = common.CoinType_ERC20 + coinType = pkg.CoinType_ERC20 } else if strings.EqualFold(tx.To, tssEthAddress) { - coinType = common.CoinType_Gas + coinType = pkg.CoinType_Gas } } } switch coinType { - case common.CoinType_Zeta: + case pkg.CoinType_Zeta: ballotIdentifier, err = ob.CheckAndVoteInboundTokenZeta(tx, receipt, false) if err != nil { return err } - case common.CoinType_ERC20: + case pkg.CoinType_ERC20: ballotIdentifier, err = ob.CheckAndVoteInboundTokenERC20(tx, receipt, false) if err != nil { return err } - case common.CoinType_Gas: + case pkg.CoinType_Gas: ballotIdentifier, err = ob.CheckAndVoteInboundTokenGas(tx, receipt, false) if err != nil { return err @@ -175,13 +175,13 @@ func DebugCmd() *cobra.Command { fmt.Println("CoinType not detected") } fmt.Println("CoinType : ", coinType) - } else if common.IsBitcoinChain(chain.ChainId) { + } else if pkg.IsBitcoinChain(chain.ChainId) { obBtc := bitcoin.BTCChainClient{ Mu: &sync.Mutex{}, } obBtc.WithZetaClient(bridge) obBtc.WithLogger(chainLogger) - obBtc.WithChain(*common.GetChainFromChainID(chainID)) + obBtc.WithChain(*pkg.GetChainFromChainID(chainID)) connCfg := &rpcclient.ConnConfig{ Host: cfg.BitcoinConfig.RPCHost, User: cfg.BitcoinConfig.RPCUsername, diff --git a/cmd/zetaclientd/hsm.go b/cmd/zetaclientd/hsm.go index d15ac3b1bd..3ddf2728d8 100644 --- a/cmd/zetaclientd/hsm.go +++ b/cmd/zetaclientd/hsm.go @@ -7,7 +7,7 @@ import ( "github.com/spf13/cobra" keystone "github.com/zeta-chain/keystone/keys" "github.com/zeta-chain/zetacore/cmd" - "github.com/zeta-chain/zetacore/common/cosmos" + "github.com/zeta-chain/zetacore/pkg/cosmos" "github.com/zeta-chain/zetacore/zetaclient/hsm" ) diff --git a/cmd/zetaclientd/main.go b/cmd/zetaclientd/main.go index 07654a0375..ff45efe7ee 100644 --- a/cmd/zetaclientd/main.go +++ b/cmd/zetaclientd/main.go @@ -13,7 +13,7 @@ import ( "github.com/zeta-chain/zetacore/zetaclient/config" "github.com/zeta-chain/zetacore/cmd" - "github.com/zeta-chain/zetacore/common/cosmos" + "github.com/zeta-chain/zetacore/pkg/cosmos" //mcconfig "github.com/Meta-Protocol/zetacore/metaclient/config" "github.com/cosmos/cosmos-sdk/types" diff --git a/cmd/zetaclientd/p2p_diagnostics.go b/cmd/zetaclientd/p2p_diagnostics.go index 72a1580224..3ece29933d 100644 --- a/cmd/zetaclientd/p2p_diagnostics.go +++ b/cmd/zetaclientd/p2p_diagnostics.go @@ -22,7 +22,7 @@ import ( "github.com/rs/zerolog" "github.com/tendermint/tendermint/crypto/secp256k1" "github.com/zeta-chain/go-tss/p2p" - "github.com/zeta-chain/zetacore/common/cosmos" + "github.com/zeta-chain/zetacore/pkg/cosmos" "github.com/zeta-chain/zetacore/zetaclient/config" ) diff --git a/cmd/zetaclientd/utils.go b/cmd/zetaclientd/utils.go index f926f8118e..a13e904776 100644 --- a/cmd/zetaclientd/utils.go +++ b/cmd/zetaclientd/utils.go @@ -4,7 +4,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ethcommon "github.com/ethereum/go-ethereum/common" "github.com/zeta-chain/zetacore/common" - "github.com/zeta-chain/zetacore/common/cosmos" + "github.com/zeta-chain/zetacore/pkg/cosmos" appcontext "github.com/zeta-chain/zetacore/zetaclient/app_context" "github.com/zeta-chain/zetacore/zetaclient/authz" "github.com/zeta-chain/zetacore/zetaclient/bitcoin" diff --git a/cmd/zetacored/get_pubkey.go b/cmd/zetacored/get_pubkey.go index a924c199af..cb5f61e5c2 100644 --- a/cmd/zetacored/get_pubkey.go +++ b/cmd/zetacored/get_pubkey.go @@ -6,8 +6,8 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/crypto" "github.com/spf13/cobra" - "github.com/zeta-chain/zetacore/common" - "github.com/zeta-chain/zetacore/common/cosmos" + "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/cosmos" ) func GetPubKeyCmd() *cobra.Command { @@ -33,8 +33,8 @@ func GetPubKeyCmd() *cobra.Command { return cmd } -func GetPubKeySet(clientctx client.Context, tssAccountName, password string) (common.PubKeySet, error) { - pubkeySet := common.PubKeySet{ +func GetPubKeySet(clientctx client.Context, tssAccountName, password string) (pkg.PubKeySet, error) { + pubkeySet := pkg.PubKeySet{ Secp256k1: "", Ed25519: "", } @@ -52,7 +52,7 @@ func GetPubKeySet(clientctx client.Context, tssAccountName, password string) (co if err != nil { return pubkeySet, err } - pubkey, err := common.NewPubKey(s) + pubkey, err := pkg.NewPubKey(s) if err != nil { return pubkeySet, err } diff --git a/e2e/runner/evm.go b/e2e/runner/evm.go index 119b93d79a..31609e789d 100644 --- a/e2e/runner/evm.go +++ b/e2e/runner/evm.go @@ -7,9 +7,9 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" - "github.com/zeta-chain/zetacore/common" - "github.com/zeta-chain/zetacore/common/ethereum" "github.com/zeta-chain/zetacore/e2e/utils" + "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/ethereum" observertypes "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -244,8 +244,8 @@ func (runner *E2ERunner) ProveEthTransaction(receipt *ethtypes.Receipt) { BlockHash: blockHash.Hex(), TxIndex: int64(txIndex), TxHash: txHash.Hex(), - Proof: common.NewEthereumProof(txProof), - ChainId: common.GoerliLocalnetChain().ChainId, + Proof: pkg.NewEthereumProof(txProof), + ChainId: pkg.GoerliLocalnetChain().ChainId, }) if err != nil { panic(err) diff --git a/pkg/proof.go b/pkg/proof.go index 8c06c18588..42ff19d0e8 100644 --- a/pkg/proof.go +++ b/pkg/proof.go @@ -8,8 +8,8 @@ import ( "github.com/btcsuite/btcutil" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rlp" - bitcoin "github.com/zeta-chain/zetacore/common/bitcoin" - "github.com/zeta-chain/zetacore/common/ethereum" + "github.com/zeta-chain/zetacore/pkg/bitcoin" + "github.com/zeta-chain/zetacore/pkg/ethereum" ) // ErrInvalidProof is a error type for invalid proofs embedding the underlying error diff --git a/pkg/proof_test.go b/pkg/proof_test.go index 550e13f9de..e25aad49a2 100644 --- a/pkg/proof_test.go +++ b/pkg/proof_test.go @@ -12,10 +12,10 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rlp" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" - "github.com/zeta-chain/zetacore/common/bitcoin" - "github.com/zeta-chain/zetacore/common/ethereum" - "github.com/zeta-chain/zetacore/common/testdata" + "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/bitcoin" + "github.com/zeta-chain/zetacore/pkg/ethereum" + "github.com/zeta-chain/zetacore/pkg/testdata" "github.com/zeta-chain/zetacore/x/crosschain/keeper" crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" @@ -30,11 +30,11 @@ const ( ) func Test_IsErrorInvalidProof(t *testing.T) { - require.False(t, common.IsErrorInvalidProof(nil)) - require.False(t, common.IsErrorInvalidProof(errors.New("foo"))) + require.False(t, pkg.IsErrorInvalidProof(nil)) + require.False(t, pkg.IsErrorInvalidProof(errors.New("foo"))) invalidProofErr := errors.New("foo") - invalidProof := common.NewErrInvalidProof(invalidProofErr) - require.True(t, common.IsErrorInvalidProof(invalidProof)) + invalidProof := pkg.NewErrInvalidProof(invalidProofErr) + require.True(t, pkg.IsErrorInvalidProof(invalidProof)) require.Equal(t, invalidProofErr.Error(), invalidProof.Error()) } @@ -65,7 +65,7 @@ func TestEthereumMerkleProof(t *testing.T) { b, err := rlp.EncodeToBytes(&header) require.NoError(t, err) - headerData := common.NewEthereumHeader(b) + headerData := pkg.NewEthereumHeader(b) t.Run("should verify tx proof", func(t *testing.T) { var txs types.Transactions for i := 0; i < testdata.TxsCount; i++ { @@ -83,7 +83,7 @@ func TestEthereumMerkleProof(t *testing.T) { proof, err := txsTree.GenerateProof(i) require.NoError(t, err) - ethProof := common.NewEthereumProof(proof) + ethProof := pkg.NewEthereumProof(proof) _, err = ethProof.Verify(headerData, i) require.NoError(t, err) @@ -107,7 +107,7 @@ func TestEthereumMerkleProof(t *testing.T) { proof, err := txsTree.GenerateProof(i) require.NoError(t, err) - ethProof := common.NewEthereumProof(proof) + ethProof := pkg.NewEthereumProof(proof) _, err = ethProof.Verify(headerData, i) require.Error(t, err) @@ -156,7 +156,7 @@ func validateBitcoinBlock(t *testing.T, _ *wire.BlockHeader, headerBytes []byte, // Validate Tss SegWit transaction if it's an outTx if res.Txid == outTxid { msg := &crosschaintypes.MsgAddToOutTxTracker{ - ChainId: common.BtcTestNetChain().ChainId, + ChainId: pkg.BtcTestNetChain().ChainId, Nonce: nonce, TxHash: outTxid, } @@ -174,15 +174,15 @@ func validateBitcoinBlock(t *testing.T, _ *wire.BlockHeader, headerBytes []byte, require.NoError(t, err) // True proof should verify - proof := common.NewBitcoinProof(txBodies[i], path, index) - txBytes, err := proof.Verify(common.NewBitcoinHeader(headerBytes), 0) + proof := pkg.NewBitcoinProof(txBodies[i], path, index) + txBytes, err := proof.Verify(pkg.NewBitcoinHeader(headerBytes), 0) require.NoError(t, err) require.Equal(t, txBytes, txBodies[i]) // Fake proof should not verify fakeIndex := index ^ 0xffffffff // flip all bits - fakeProof := common.NewBitcoinProof(txBodies[i], path, fakeIndex) - txBytes, err = fakeProof.Verify(common.NewBitcoinHeader(headerBytes), 0) + fakeProof := pkg.NewBitcoinProof(txBodies[i], path, fakeIndex) + txBytes, err = fakeProof.Verify(pkg.NewBitcoinHeader(headerBytes), 0) require.Error(t, err) require.Nil(t, txBytes) } diff --git a/pkg/pubkey.go b/pkg/pubkey.go index 0cda653a29..4fc03a38b1 100644 --- a/pkg/pubkey.go +++ b/pkg/pubkey.go @@ -15,7 +15,7 @@ import ( eth "github.com/ethereum/go-ethereum/crypto" - "github.com/zeta-chain/zetacore/common/cosmos" + "github.com/zeta-chain/zetacore/pkg/cosmos" ) // PubKey is bech32 encoded string diff --git a/pkg/pubkey_test.go b/pkg/pubkey_test.go index 4062b66139..01c55ad919 100644 --- a/pkg/pubkey_test.go +++ b/pkg/pubkey_test.go @@ -13,7 +13,7 @@ import ( . "gopkg.in/check.v1" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common/cosmos" + "github.com/zeta-chain/zetacore/pkg/cosmos" ) type KeyDataAddr struct { diff --git a/pkg/tss.go b/pkg/tss.go index abd5704e04..c2f857608d 100644 --- a/pkg/tss.go +++ b/pkg/tss.go @@ -5,13 +5,13 @@ import ( "github.com/btcsuite/btcutil" ethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" - zcommon "github.com/zeta-chain/zetacore/common/cosmos" + "github.com/zeta-chain/zetacore/pkg/cosmos" ) // GetTssAddrEVM returns the ethereum address of the tss pubkey func GetTssAddrEVM(tssPubkey string) (ethcommon.Address, error) { var keyAddr ethcommon.Address - pubk, err := zcommon.GetPubKeyFromBech32(zcommon.Bech32PubKeyTypeAccPub, tssPubkey) + pubk, err := cosmos.GetPubKeyFromBech32(cosmos.Bech32PubKeyTypeAccPub, tssPubkey) if err != nil { return keyAddr, err } @@ -36,7 +36,7 @@ func GetTssAddrBTC(tssPubkey string, bitcoinParams *chaincfg.Params) (string, er } func getKeyAddrBTCWitnessPubkeyHash(tssPubkey string, bitcoinParams *chaincfg.Params) (*btcutil.AddressWitnessPubKeyHash, error) { - pubk, err := zcommon.GetPubKeyFromBech32(zcommon.Bech32PubKeyTypeAccPub, tssPubkey) + pubk, err := cosmos.GetPubKeyFromBech32(cosmos.Bech32PubKeyTypeAccPub, tssPubkey) if err != nil { return nil, err } diff --git a/pkg/tss_test.go b/pkg/tss_test.go index a4aabb3212..19de1ae0f0 100644 --- a/pkg/tss_test.go +++ b/pkg/tss_test.go @@ -6,7 +6,7 @@ import ( "github.com/btcsuite/btcd/chaincfg" "github.com/cosmos/cosmos-sdk/testutil/testdata" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common/cosmos" + "github.com/zeta-chain/zetacore/pkg/cosmos" ) func TestGetTssAddrEVM(t *testing.T) { diff --git a/testutil/keeper/mocks/crosschain/fungible.go b/testutil/keeper/mocks/crosschain/fungible.go index 7a0a40a6de..81d7c0f380 100644 --- a/testutil/keeper/mocks/crosschain/fungible.go +++ b/testutil/keeper/mocks/crosschain/fungible.go @@ -14,7 +14,7 @@ import ( types "github.com/cosmos/cosmos-sdk/types" - zetacorecommon "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" ) // CrosschainFungibleKeeper is an autogenerated mock type for the CrosschainFungibleKeeper type @@ -119,7 +119,7 @@ func (_m *CrosschainFungibleKeeper) CallZRC20Burn(ctx types.Context, sender comm } // DeployZRC20Contract provides a mock function with given fields: ctx, name, symbol, decimals, chainID, coinType, erc20Contract, gasLimit -func (_m *CrosschainFungibleKeeper) DeployZRC20Contract(ctx types.Context, name string, symbol string, decimals uint8, chainID int64, coinType zetacorecommon.CoinType, erc20Contract string, gasLimit *big.Int) (common.Address, error) { +func (_m *CrosschainFungibleKeeper) DeployZRC20Contract(ctx types.Context, name string, symbol string, decimals uint8, chainID int64, coinType pkg.CoinType, erc20Contract string, gasLimit *big.Int) (common.Address, error) { ret := _m.Called(ctx, name, symbol, decimals, chainID, coinType, erc20Contract, gasLimit) if len(ret) == 0 { @@ -128,10 +128,10 @@ func (_m *CrosschainFungibleKeeper) DeployZRC20Contract(ctx types.Context, name var r0 common.Address var r1 error - if rf, ok := ret.Get(0).(func(types.Context, string, string, uint8, int64, zetacorecommon.CoinType, string, *big.Int) (common.Address, error)); ok { + if rf, ok := ret.Get(0).(func(types.Context, string, string, uint8, int64, pkg.CoinType, string, *big.Int) (common.Address, error)); ok { return rf(ctx, name, symbol, decimals, chainID, coinType, erc20Contract, gasLimit) } - if rf, ok := ret.Get(0).(func(types.Context, string, string, uint8, int64, zetacorecommon.CoinType, string, *big.Int) common.Address); ok { + if rf, ok := ret.Get(0).(func(types.Context, string, string, uint8, int64, pkg.CoinType, string, *big.Int) common.Address); ok { r0 = rf(ctx, name, symbol, decimals, chainID, coinType, erc20Contract, gasLimit) } else { if ret.Get(0) != nil { @@ -139,7 +139,7 @@ func (_m *CrosschainFungibleKeeper) DeployZRC20Contract(ctx types.Context, name } } - if rf, ok := ret.Get(1).(func(types.Context, string, string, uint8, int64, zetacorecommon.CoinType, string, *big.Int) error); ok { + if rf, ok := ret.Get(1).(func(types.Context, string, string, uint8, int64, pkg.CoinType, string, *big.Int) error); ok { r1 = rf(ctx, name, symbol, decimals, chainID, coinType, erc20Contract, gasLimit) } else { r1 = ret.Error(1) @@ -598,7 +598,7 @@ func (_m *CrosschainFungibleKeeper) WithdrawFromGasStabilityPool(ctx types.Conte } // ZRC20DepositAndCallContract provides a mock function with given fields: ctx, from, to, amount, senderChainID, data, coinType, asset -func (_m *CrosschainFungibleKeeper) ZRC20DepositAndCallContract(ctx types.Context, from []byte, to common.Address, amount *big.Int, senderChainID int64, data []byte, coinType zetacorecommon.CoinType, asset string) (*evmtypes.MsgEthereumTxResponse, bool, error) { +func (_m *CrosschainFungibleKeeper) ZRC20DepositAndCallContract(ctx types.Context, from []byte, to common.Address, amount *big.Int, senderChainID int64, data []byte, coinType pkg.CoinType, asset string) (*evmtypes.MsgEthereumTxResponse, bool, error) { ret := _m.Called(ctx, from, to, amount, senderChainID, data, coinType, asset) if len(ret) == 0 { @@ -608,10 +608,10 @@ func (_m *CrosschainFungibleKeeper) ZRC20DepositAndCallContract(ctx types.Contex var r0 *evmtypes.MsgEthereumTxResponse var r1 bool var r2 error - if rf, ok := ret.Get(0).(func(types.Context, []byte, common.Address, *big.Int, int64, []byte, zetacorecommon.CoinType, string) (*evmtypes.MsgEthereumTxResponse, bool, error)); ok { + if rf, ok := ret.Get(0).(func(types.Context, []byte, common.Address, *big.Int, int64, []byte, pkg.CoinType, string) (*evmtypes.MsgEthereumTxResponse, bool, error)); ok { return rf(ctx, from, to, amount, senderChainID, data, coinType, asset) } - if rf, ok := ret.Get(0).(func(types.Context, []byte, common.Address, *big.Int, int64, []byte, zetacorecommon.CoinType, string) *evmtypes.MsgEthereumTxResponse); ok { + if rf, ok := ret.Get(0).(func(types.Context, []byte, common.Address, *big.Int, int64, []byte, pkg.CoinType, string) *evmtypes.MsgEthereumTxResponse); ok { r0 = rf(ctx, from, to, amount, senderChainID, data, coinType, asset) } else { if ret.Get(0) != nil { @@ -619,13 +619,13 @@ func (_m *CrosschainFungibleKeeper) ZRC20DepositAndCallContract(ctx types.Contex } } - if rf, ok := ret.Get(1).(func(types.Context, []byte, common.Address, *big.Int, int64, []byte, zetacorecommon.CoinType, string) bool); ok { + if rf, ok := ret.Get(1).(func(types.Context, []byte, common.Address, *big.Int, int64, []byte, pkg.CoinType, string) bool); ok { r1 = rf(ctx, from, to, amount, senderChainID, data, coinType, asset) } else { r1 = ret.Get(1).(bool) } - if rf, ok := ret.Get(2).(func(types.Context, []byte, common.Address, *big.Int, int64, []byte, zetacorecommon.CoinType, string) error); ok { + if rf, ok := ret.Get(2).(func(types.Context, []byte, common.Address, *big.Int, int64, []byte, pkg.CoinType, string) error); ok { r2 = rf(ctx, from, to, amount, senderChainID, data, coinType, asset) } else { r2 = ret.Error(2) diff --git a/testutil/keeper/mocks/crosschain/observer.go b/testutil/keeper/mocks/crosschain/observer.go index d100894b02..3cf01ecf0f 100644 --- a/testutil/keeper/mocks/crosschain/observer.go +++ b/testutil/keeper/mocks/crosschain/observer.go @@ -5,7 +5,7 @@ package mocks import ( context "context" - common "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" mock "github.com/stretchr/testify/mock" @@ -109,7 +109,7 @@ func (_m *CrosschainObserverKeeper) CheckIfTssPubkeyHasBeenGenerated(ctx types.C } // FindBallot provides a mock function with given fields: ctx, index, chain, observationType -func (_m *CrosschainObserverKeeper) FindBallot(ctx types.Context, index string, chain *common.Chain, observationType observertypes.ObservationType) (observertypes.Ballot, bool, error) { +func (_m *CrosschainObserverKeeper) FindBallot(ctx types.Context, index string, chain *pkg.Chain, observationType observertypes.ObservationType) (observertypes.Ballot, bool, error) { ret := _m.Called(ctx, index, chain, observationType) if len(ret) == 0 { @@ -119,22 +119,22 @@ func (_m *CrosschainObserverKeeper) FindBallot(ctx types.Context, index string, var r0 observertypes.Ballot var r1 bool var r2 error - if rf, ok := ret.Get(0).(func(types.Context, string, *common.Chain, observertypes.ObservationType) (observertypes.Ballot, bool, error)); ok { + if rf, ok := ret.Get(0).(func(types.Context, string, *pkg.Chain, observertypes.ObservationType) (observertypes.Ballot, bool, error)); ok { return rf(ctx, index, chain, observationType) } - if rf, ok := ret.Get(0).(func(types.Context, string, *common.Chain, observertypes.ObservationType) observertypes.Ballot); ok { + if rf, ok := ret.Get(0).(func(types.Context, string, *pkg.Chain, observertypes.ObservationType) observertypes.Ballot); ok { r0 = rf(ctx, index, chain, observationType) } else { r0 = ret.Get(0).(observertypes.Ballot) } - if rf, ok := ret.Get(1).(func(types.Context, string, *common.Chain, observertypes.ObservationType) bool); ok { + if rf, ok := ret.Get(1).(func(types.Context, string, *pkg.Chain, observertypes.ObservationType) bool); ok { r1 = rf(ctx, index, chain, observationType) } else { r1 = ret.Get(1).(bool) } - if rf, ok := ret.Get(2).(func(types.Context, string, *common.Chain, observertypes.ObservationType) error); ok { + if rf, ok := ret.Get(2).(func(types.Context, string, *pkg.Chain, observertypes.ObservationType) error); ok { r2 = rf(ctx, index, chain, observationType) } else { r2 = ret.Error(2) @@ -302,22 +302,22 @@ func (_m *CrosschainObserverKeeper) GetBallot(ctx types.Context, index string) ( } // GetBlockHeader provides a mock function with given fields: ctx, hash -func (_m *CrosschainObserverKeeper) GetBlockHeader(ctx types.Context, hash []byte) (common.BlockHeader, bool) { +func (_m *CrosschainObserverKeeper) GetBlockHeader(ctx types.Context, hash []byte) (pkg.BlockHeader, bool) { ret := _m.Called(ctx, hash) if len(ret) == 0 { panic("no return value specified for GetBlockHeader") } - var r0 common.BlockHeader + var r0 pkg.BlockHeader var r1 bool - if rf, ok := ret.Get(0).(func(types.Context, []byte) (common.BlockHeader, bool)); ok { + if rf, ok := ret.Get(0).(func(types.Context, []byte) (pkg.BlockHeader, bool)); ok { return rf(ctx, hash) } - if rf, ok := ret.Get(0).(func(types.Context, []byte) common.BlockHeader); ok { + if rf, ok := ret.Get(0).(func(types.Context, []byte) pkg.BlockHeader); ok { r0 = rf(ctx, hash) } else { - r0 = ret.Get(0).(common.BlockHeader) + r0 = ret.Get(0).(pkg.BlockHeader) } if rf, ok := ret.Get(1).(func(types.Context, []byte) bool); ok { @@ -584,19 +584,19 @@ func (_m *CrosschainObserverKeeper) GetPendingNonces(ctx types.Context, tss stri } // GetSupportedChainFromChainID provides a mock function with given fields: ctx, chainID -func (_m *CrosschainObserverKeeper) GetSupportedChainFromChainID(ctx types.Context, chainID int64) *common.Chain { +func (_m *CrosschainObserverKeeper) GetSupportedChainFromChainID(ctx types.Context, chainID int64) *pkg.Chain { ret := _m.Called(ctx, chainID) if len(ret) == 0 { panic("no return value specified for GetSupportedChainFromChainID") } - var r0 *common.Chain - if rf, ok := ret.Get(0).(func(types.Context, int64) *common.Chain); ok { + var r0 *pkg.Chain + if rf, ok := ret.Get(0).(func(types.Context, int64) *pkg.Chain); ok { r0 = rf(ctx, chainID) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*common.Chain) + r0 = ret.Get(0).(*pkg.Chain) } } @@ -604,19 +604,19 @@ func (_m *CrosschainObserverKeeper) GetSupportedChainFromChainID(ctx types.Conte } // GetSupportedChains provides a mock function with given fields: ctx -func (_m *CrosschainObserverKeeper) GetSupportedChains(ctx types.Context) []*common.Chain { +func (_m *CrosschainObserverKeeper) GetSupportedChains(ctx types.Context) []*pkg.Chain { ret := _m.Called(ctx) if len(ret) == 0 { panic("no return value specified for GetSupportedChains") } - var r0 []*common.Chain - if rf, ok := ret.Get(0).(func(types.Context) []*common.Chain); ok { + var r0 []*pkg.Chain + if rf, ok := ret.Get(0).(func(types.Context) []*pkg.Chain); ok { r0 = rf(ctx) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).([]*common.Chain) + r0 = ret.Get(0).([]*pkg.Chain) } } @@ -783,7 +783,7 @@ func (_m *CrosschainObserverKeeper) SetTssAndUpdateNonce(ctx types.Context, tss } // VoteOnInboundBallot provides a mock function with given fields: ctx, senderChainID, receiverChainID, coinType, voter, ballotIndex, inTxHash -func (_m *CrosschainObserverKeeper) VoteOnInboundBallot(ctx types.Context, senderChainID int64, receiverChainID int64, coinType common.CoinType, voter string, ballotIndex string, inTxHash string) (bool, bool, error) { +func (_m *CrosschainObserverKeeper) VoteOnInboundBallot(ctx types.Context, senderChainID int64, receiverChainID int64, coinType pkg.CoinType, voter string, ballotIndex string, inTxHash string) (bool, bool, error) { ret := _m.Called(ctx, senderChainID, receiverChainID, coinType, voter, ballotIndex, inTxHash) if len(ret) == 0 { @@ -793,22 +793,22 @@ func (_m *CrosschainObserverKeeper) VoteOnInboundBallot(ctx types.Context, sende var r0 bool var r1 bool var r2 error - if rf, ok := ret.Get(0).(func(types.Context, int64, int64, common.CoinType, string, string, string) (bool, bool, error)); ok { + if rf, ok := ret.Get(0).(func(types.Context, int64, int64, pkg.CoinType, string, string, string) (bool, bool, error)); ok { return rf(ctx, senderChainID, receiverChainID, coinType, voter, ballotIndex, inTxHash) } - if rf, ok := ret.Get(0).(func(types.Context, int64, int64, common.CoinType, string, string, string) bool); ok { + if rf, ok := ret.Get(0).(func(types.Context, int64, int64, pkg.CoinType, string, string, string) bool); ok { r0 = rf(ctx, senderChainID, receiverChainID, coinType, voter, ballotIndex, inTxHash) } else { r0 = ret.Get(0).(bool) } - if rf, ok := ret.Get(1).(func(types.Context, int64, int64, common.CoinType, string, string, string) bool); ok { + if rf, ok := ret.Get(1).(func(types.Context, int64, int64, pkg.CoinType, string, string, string) bool); ok { r1 = rf(ctx, senderChainID, receiverChainID, coinType, voter, ballotIndex, inTxHash) } else { r1 = ret.Get(1).(bool) } - if rf, ok := ret.Get(2).(func(types.Context, int64, int64, common.CoinType, string, string, string) error); ok { + if rf, ok := ret.Get(2).(func(types.Context, int64, int64, pkg.CoinType, string, string, string) error); ok { r2 = rf(ctx, senderChainID, receiverChainID, coinType, voter, ballotIndex, inTxHash) } else { r2 = ret.Error(2) @@ -818,7 +818,7 @@ func (_m *CrosschainObserverKeeper) VoteOnInboundBallot(ctx types.Context, sende } // VoteOnOutboundBallot provides a mock function with given fields: ctx, ballotIndex, outTxChainID, receiveStatus, voter -func (_m *CrosschainObserverKeeper) VoteOnOutboundBallot(ctx types.Context, ballotIndex string, outTxChainID int64, receiveStatus common.ReceiveStatus, voter string) (bool, bool, observertypes.Ballot, string, error) { +func (_m *CrosschainObserverKeeper) VoteOnOutboundBallot(ctx types.Context, ballotIndex string, outTxChainID int64, receiveStatus pkg.ReceiveStatus, voter string) (bool, bool, observertypes.Ballot, string, error) { ret := _m.Called(ctx, ballotIndex, outTxChainID, receiveStatus, voter) if len(ret) == 0 { @@ -830,34 +830,34 @@ func (_m *CrosschainObserverKeeper) VoteOnOutboundBallot(ctx types.Context, ball var r2 observertypes.Ballot var r3 string var r4 error - if rf, ok := ret.Get(0).(func(types.Context, string, int64, common.ReceiveStatus, string) (bool, bool, observertypes.Ballot, string, error)); ok { + if rf, ok := ret.Get(0).(func(types.Context, string, int64, pkg.ReceiveStatus, string) (bool, bool, observertypes.Ballot, string, error)); ok { return rf(ctx, ballotIndex, outTxChainID, receiveStatus, voter) } - if rf, ok := ret.Get(0).(func(types.Context, string, int64, common.ReceiveStatus, string) bool); ok { + if rf, ok := ret.Get(0).(func(types.Context, string, int64, pkg.ReceiveStatus, string) bool); ok { r0 = rf(ctx, ballotIndex, outTxChainID, receiveStatus, voter) } else { r0 = ret.Get(0).(bool) } - if rf, ok := ret.Get(1).(func(types.Context, string, int64, common.ReceiveStatus, string) bool); ok { + if rf, ok := ret.Get(1).(func(types.Context, string, int64, pkg.ReceiveStatus, string) bool); ok { r1 = rf(ctx, ballotIndex, outTxChainID, receiveStatus, voter) } else { r1 = ret.Get(1).(bool) } - if rf, ok := ret.Get(2).(func(types.Context, string, int64, common.ReceiveStatus, string) observertypes.Ballot); ok { + if rf, ok := ret.Get(2).(func(types.Context, string, int64, pkg.ReceiveStatus, string) observertypes.Ballot); ok { r2 = rf(ctx, ballotIndex, outTxChainID, receiveStatus, voter) } else { r2 = ret.Get(2).(observertypes.Ballot) } - if rf, ok := ret.Get(3).(func(types.Context, string, int64, common.ReceiveStatus, string) string); ok { + if rf, ok := ret.Get(3).(func(types.Context, string, int64, pkg.ReceiveStatus, string) string); ok { r3 = rf(ctx, ballotIndex, outTxChainID, receiveStatus, voter) } else { r3 = ret.Get(3).(string) } - if rf, ok := ret.Get(4).(func(types.Context, string, int64, common.ReceiveStatus, string) error); ok { + if rf, ok := ret.Get(4).(func(types.Context, string, int64, pkg.ReceiveStatus, string) error); ok { r4 = rf(ctx, ballotIndex, outTxChainID, receiveStatus, voter) } else { r4 = ret.Error(4) diff --git a/testutil/keeper/mocks/fungible/observer.go b/testutil/keeper/mocks/fungible/observer.go index 83cdb37bcc..ac4d1dea07 100644 --- a/testutil/keeper/mocks/fungible/observer.go +++ b/testutil/keeper/mocks/fungible/observer.go @@ -4,7 +4,7 @@ package mocks import ( mock "github.com/stretchr/testify/mock" - common "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" types "github.com/cosmos/cosmos-sdk/types" ) @@ -15,19 +15,19 @@ type FungibleObserverKeeper struct { } // GetSupportedChains provides a mock function with given fields: ctx -func (_m *FungibleObserverKeeper) GetSupportedChains(ctx types.Context) []*common.Chain { +func (_m *FungibleObserverKeeper) GetSupportedChains(ctx types.Context) []*pkg.Chain { ret := _m.Called(ctx) if len(ret) == 0 { panic("no return value specified for GetSupportedChains") } - var r0 []*common.Chain - if rf, ok := ret.Get(0).(func(types.Context) []*common.Chain); ok { + var r0 []*pkg.Chain + if rf, ok := ret.Get(0).(func(types.Context) []*pkg.Chain); ok { r0 = rf(ctx) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).([]*common.Chain) + r0 = ret.Get(0).([]*pkg.Chain) } } diff --git a/testutil/sample/observer.go b/testutil/sample/observer.go index 7cb0b9b27b..7aba8ad565 100644 --- a/testutil/sample/observer.go +++ b/testutil/sample/observer.go @@ -9,7 +9,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/crypto" "github.com/zeta-chain/zetacore/common" - "github.com/zeta-chain/zetacore/common/cosmos" + "github.com/zeta-chain/zetacore/pkg/cosmos" "github.com/zeta-chain/zetacore/x/observer/types" ) diff --git a/testutil/sample/sample.go b/testutil/sample/sample.go index 020ff9104b..46154096fb 100644 --- a/testutil/sample/sample.go +++ b/testutil/sample/sample.go @@ -9,6 +9,7 @@ import ( sdkmath "cosmossdk.io/math" "github.com/zeta-chain/zetacore/cmd/zetacored/config" + "github.com/zeta-chain/zetacore/pkg" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" @@ -16,8 +17,7 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ethcommon "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" - "github.com/zeta-chain/zetacore/common/cosmos" + "github.com/zeta-chain/zetacore/pkg/cosmos" ) var ErrSample = errors.New("sample error") @@ -86,7 +86,7 @@ func PubKeyString() string { if err != nil { panic(err) } - pubkey, err := common.NewPubKey(s) + pubkey, err := pkg.NewPubKey(s) if err != nil { panic(err) } diff --git a/x/crosschain/keeper/gas_payment_test.go b/x/crosschain/keeper/gas_payment_test.go index 8ed31d8a46..c667fb3a3b 100644 --- a/x/crosschain/keeper/gas_payment_test.go +++ b/x/crosschain/keeper/gas_payment_test.go @@ -10,7 +10,7 @@ import ( "cosmossdk.io/math" "github.com/stretchr/testify/require" - zetacommon "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" testkeeper "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/x/crosschain/types" fungibletypes "github.com/zeta-chain/zetacore/x/fungible/types" @@ -47,11 +47,11 @@ func TestKeeper_PayGasNativeAndUpdateCctx(t *testing.T) { // create a cctx reverted from zeta cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: zetacommon.CoinType_Gas, + CoinType: pkg.CoinType_Gas, }, OutboundTxParams: []*types.OutboundTxParams{ { - ReceiverChainId: zetacommon.ZetaPrivnetChain().ChainId, + ReceiverChainId: pkg.ZetaPrivnetChain().ChainId, }, { ReceiverChainId: chainID, @@ -73,7 +73,7 @@ func TestKeeper_PayGasNativeAndUpdateCctx(t *testing.T) { chainID := getValidEthChainID(t) cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: zetacommon.CoinType_Zeta, + CoinType: pkg.CoinType_Zeta, }, } err := k.PayGasNativeAndUpdateCctx(ctx, chainID, &cctx, math.NewUint(inputAmount)) @@ -84,7 +84,7 @@ func TestKeeper_PayGasNativeAndUpdateCctx(t *testing.T) { k, ctx, _, _ := testkeeper.CrosschainKeeper(t) cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: zetacommon.CoinType_Gas, + CoinType: pkg.CoinType_Gas, }, } err := k.PayGasNativeAndUpdateCctx(ctx, 999999, &cctx, math.NewUint(inputAmount)) @@ -104,11 +104,11 @@ func TestKeeper_PayGasNativeAndUpdateCctx(t *testing.T) { // create a cctx reverted from zeta cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: zetacommon.CoinType_Gas, + CoinType: pkg.CoinType_Gas, }, OutboundTxParams: []*types.OutboundTxParams{ { - ReceiverChainId: zetacommon.ZetaPrivnetChain().ChainId, + ReceiverChainId: pkg.ZetaPrivnetChain().ChainId, }, { ReceiverChainId: chainID, @@ -141,11 +141,11 @@ func TestKeeper_PayGasNativeAndUpdateCctx(t *testing.T) { cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: zetacommon.CoinType_Gas, + CoinType: pkg.CoinType_Gas, }, OutboundTxParams: []*types.OutboundTxParams{ { - ReceiverChainId: zetacommon.ZetaPrivnetChain().ChainId, + ReceiverChainId: pkg.ZetaPrivnetChain().ChainId, }, { ReceiverChainId: chainID, @@ -202,12 +202,12 @@ func TestKeeper_PayGasInERC20AndUpdateCctx(t *testing.T) { // create a cctx reverted from zeta cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: zetacommon.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, Asset: assetAddress, }, OutboundTxParams: []*types.OutboundTxParams{ { - ReceiverChainId: zetacommon.ZetaPrivnetChain().ChainId, + ReceiverChainId: pkg.ZetaPrivnetChain().ChainId, }, { ReceiverChainId: chainID, @@ -234,7 +234,7 @@ func TestKeeper_PayGasInERC20AndUpdateCctx(t *testing.T) { chainID := getValidEthChainID(t) cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: zetacommon.CoinType_Gas, + CoinType: pkg.CoinType_Gas, }, } err := k.PayGasInERC20AndUpdateCctx(ctx, chainID, &cctx, math.NewUint(inputAmount), false) @@ -245,7 +245,7 @@ func TestKeeper_PayGasInERC20AndUpdateCctx(t *testing.T) { k, ctx, _, _ := testkeeper.CrosschainKeeper(t) cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: zetacommon.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, }, } err := k.PayGasInERC20AndUpdateCctx(ctx, 999999, &cctx, math.NewUint(inputAmount), false) @@ -265,11 +265,11 @@ func TestKeeper_PayGasInERC20AndUpdateCctx(t *testing.T) { // create a cctx reverted from zeta cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: zetacommon.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, }, OutboundTxParams: []*types.OutboundTxParams{ { - ReceiverChainId: zetacommon.ZetaPrivnetChain().ChainId, + ReceiverChainId: pkg.ZetaPrivnetChain().ChainId, }, { ReceiverChainId: chainID, @@ -306,12 +306,12 @@ func TestKeeper_PayGasInERC20AndUpdateCctx(t *testing.T) { // create a cctx reverted from zeta cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: zetacommon.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, Asset: assetAddress, }, OutboundTxParams: []*types.OutboundTxParams{ { - ReceiverChainId: zetacommon.ZetaPrivnetChain().ChainId, + ReceiverChainId: pkg.ZetaPrivnetChain().ChainId, }, { ReceiverChainId: chainID, @@ -358,12 +358,12 @@ func TestKeeper_PayGasInERC20AndUpdateCctx(t *testing.T) { // create a cctx reverted from zeta cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: zetacommon.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, Asset: assetAddress, }, OutboundTxParams: []*types.OutboundTxParams{ { - ReceiverChainId: zetacommon.ZetaPrivnetChain().ChainId, + ReceiverChainId: pkg.ZetaPrivnetChain().ChainId, }, { ReceiverChainId: chainID, @@ -416,12 +416,12 @@ func TestKeeper_PayGasInERC20AndUpdateCctx(t *testing.T) { // create a cctx reverted from zeta cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: zetacommon.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, Asset: assetAddress, }, OutboundTxParams: []*types.OutboundTxParams{ { - ReceiverChainId: zetacommon.ZetaPrivnetChain().ChainId, + ReceiverChainId: pkg.ZetaPrivnetChain().ChainId, }, { ReceiverChainId: chainID, @@ -461,7 +461,7 @@ func TestKeeper_PayGasInZetaAndUpdateCctx(t *testing.T) { // create a cctx reverted from zeta cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: zetacommon.CoinType_Zeta, + CoinType: pkg.CoinType_Zeta, }, OutboundTxParams: []*types.OutboundTxParams{ { @@ -487,7 +487,7 @@ func TestKeeper_PayGasInZetaAndUpdateCctx(t *testing.T) { // can call with undefined zeta fees cctx = types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: zetacommon.CoinType_Zeta, + CoinType: pkg.CoinType_Zeta, }, OutboundTxParams: []*types.OutboundTxParams{ { @@ -512,7 +512,7 @@ func TestKeeper_PayGasInZetaAndUpdateCctx(t *testing.T) { chainID := getValidEthChainID(t) cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: zetacommon.CoinType_Gas, + CoinType: pkg.CoinType_Gas, }, } err := k.PayGasInZetaAndUpdateCctx(ctx, chainID, &cctx, math.NewUint(100000), false) @@ -523,7 +523,7 @@ func TestKeeper_PayGasInZetaAndUpdateCctx(t *testing.T) { k, ctx, _, _ := testkeeper.CrosschainKeeper(t) cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: zetacommon.CoinType_Zeta, + CoinType: pkg.CoinType_Zeta, }, } err := k.PayGasInZetaAndUpdateCctx(ctx, 999999, &cctx, math.NewUint(100000), false) @@ -545,7 +545,7 @@ func TestKeeper_PayGasInZetaAndUpdateCctx(t *testing.T) { // create a cctx reverted from zeta cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: zetacommon.CoinType_Zeta, + CoinType: pkg.CoinType_Zeta, }, OutboundTxParams: []*types.OutboundTxParams{ { @@ -577,7 +577,7 @@ func TestKeeper_PayGasInZetaAndUpdateCctx(t *testing.T) { // create a cctx reverted from zeta cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: zetacommon.CoinType_Zeta, + CoinType: pkg.CoinType_Zeta, }, OutboundTxParams: []*types.OutboundTxParams{ { diff --git a/x/crosschain/keeper/utils_test.go b/x/crosschain/keeper/utils_test.go index 141cfd3e00..4dd56e67b4 100644 --- a/x/crosschain/keeper/utils_test.go +++ b/x/crosschain/keeper/utils_test.go @@ -5,6 +5,7 @@ import ( "math/big" "testing" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/crosschain/types" @@ -15,7 +16,6 @@ import ( "github.com/stretchr/testify/require" "github.com/zeta-chain/protocol-contracts/pkg/uniswap/v2-periphery/contracts/uniswapv2router02.sol" "github.com/zeta-chain/zetacore/cmd/zetacored/config" - zetacommon "github.com/zeta-chain/zetacore/common" testkeeper "github.com/zeta-chain/zetacore/testutil/keeper" fungiblekeeper "github.com/zeta-chain/zetacore/x/fungible/keeper" observertypes "github.com/zeta-chain/zetacore/x/observer/types" @@ -27,13 +27,13 @@ func getValidEthChainID(t *testing.T) int64 { } // getValidEthChain get a valid eth chain -func getValidEthChain(_ *testing.T) *zetacommon.Chain { - goerli := zetacommon.GoerliLocalnetChain() +func getValidEthChain(_ *testing.T) *pkg.Chain { + goerli := pkg.GoerliLocalnetChain() return &goerli } -func getValidBTCChain() *zetacommon.Chain { - btcRegNet := zetacommon.BtcRegtestChain() +func getValidBTCChain() *pkg.Chain { + btcRegNet := pkg.BtcRegtestChain() return &btcRegNet } @@ -45,9 +45,9 @@ func getValidBtcChainID() int64 { func getValidEthChainIDWithIndex(t *testing.T, index int) int64 { switch index { case 0: - return zetacommon.GoerliLocalnetChain().ChainId + return pkg.GoerliLocalnetChain().ChainId case 1: - return zetacommon.GoerliChain().ChainId + return pkg.GoerliChain().ChainId default: require.Fail(t, "invalid index") } diff --git a/x/crosschain/types/message_update_tss_address.go b/x/crosschain/types/message_update_tss_address.go index d9740514c3..163e232780 100644 --- a/x/crosschain/types/message_update_tss_address.go +++ b/x/crosschain/types/message_update_tss_address.go @@ -4,7 +4,7 @@ import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/zeta-chain/zetacore/common/cosmos" + "github.com/zeta-chain/zetacore/pkg/cosmos" ) const TypeMsgUpdateTssAddress = "UpdateTssAddress" diff --git a/x/observer/keeper/utils_test.go b/x/observer/keeper/utils_test.go index e8e2a9ab98..16edfeeda8 100644 --- a/x/observer/keeper/utils_test.go +++ b/x/observer/keeper/utils_test.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" "github.com/stretchr/testify/require" - zetacommon "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/observer/keeper" @@ -32,9 +32,9 @@ func setSupportedChain(ctx sdk.Context, observerKeeper keeper.Keeper, chainIDs . func getValidEthChainIDWithIndex(t *testing.T, index int) int64 { switch index { case 0: - return zetacommon.GoerliLocalnetChain().ChainId + return pkg.GoerliLocalnetChain().ChainId case 1: - return zetacommon.GoerliChain().ChainId + return pkg.GoerliChain().ChainId default: require.Fail(t, "invalid index") } diff --git a/zetaclient/interfaces/signer.go b/zetaclient/interfaces/signer.go index ae6ef31b59..aaa4ad71df 100644 --- a/zetaclient/interfaces/signer.go +++ b/zetaclient/interfaces/signer.go @@ -4,7 +4,7 @@ import ( "crypto/ecdsa" "fmt" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/chaincfg" @@ -17,7 +17,7 @@ import ( type TSSSigner interface { Pubkey() []byte // Sign: Specify optionalPubkey to use a different pubkey than the current pubkey set during keygen - Sign(data []byte, height uint64, nonce uint64, chain *common.Chain, optionalPubkey string) ([65]byte, error) + Sign(data []byte, height uint64, nonce uint64, chain *pkg.Chain, optionalPubkey string) ([65]byte, error) EVMAddress() ethcommon.Address BTCAddress() string BTCAddressWitnessPubkeyHash() *btcutil.AddressWitnessPubKeyHash @@ -31,7 +31,7 @@ type TestSigner struct { PrivKey *ecdsa.PrivateKey } -func (s TestSigner) Sign(digest []byte, _ uint64, _ uint64, _ *common.Chain, _ string) ([65]byte, error) { +func (s TestSigner) Sign(digest []byte, _ uint64, _ uint64, _ *pkg.Chain, _ string) ([65]byte, error) { sig, err := crypto.Sign(digest, s.PrivKey) if err != nil { return [65]byte{}, err diff --git a/zetaclient/keys/keys.go b/zetaclient/keys/keys.go index e7e40c2bdc..0396f87e90 100644 --- a/zetaclient/keys/keys.go +++ b/zetaclient/keys/keys.go @@ -15,8 +15,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/rs/zerolog/log" "github.com/zeta-chain/zetacore/cmd" - "github.com/zeta-chain/zetacore/common" - "github.com/zeta-chain/zetacore/common/cosmos" + "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/cosmos" "github.com/zeta-chain/zetacore/zetaclient/config" zetaerrors "github.com/zeta-chain/zetacore/zetaclient/errors" ) @@ -78,7 +78,7 @@ func GetKeyringKeybase(cfg config.Config, hotkeyPassword string) (ckeys.Keyring, return nil, "", fmt.Errorf("key not in backend %s present with name (%s): %w", kb.Backend(), granteeName, err) } - pubkeyBech32, err := common.GetPubkeyBech32FromRecord(rc) + pubkeyBech32, err := pkg.GetPubkeyBech32FromRecord(rc) if err != nil { return nil, "", fmt.Errorf("fail to get pubkey from record,err:%w", err) } @@ -151,8 +151,8 @@ func (k *Keys) GetKeybase() ckeys.Keyring { return k.kb } -func (k *Keys) GetPubKeySet(password string) (common.PubKeySet, error) { - pubkeySet := common.PubKeySet{ +func (k *Keys) GetPubKeySet(password string) (pkg.PubKeySet, error) { + pubkeySet := pkg.PubKeySet{ Secp256k1: "", Ed25519: "", } @@ -166,7 +166,7 @@ func (k *Keys) GetPubKeySet(password string) (common.PubKeySet, error) { if err != nil { return pubkeySet, zetaerrors.ErrBech32ifyPubKey } - pubkey, err := common.NewPubKey(s) + pubkey, err := pkg.NewPubKey(s) if err != nil { return pubkeySet, zetaerrors.ErrNewPubKey } diff --git a/zetaclient/keys/keys_test.go b/zetaclient/keys/keys_test.go index 2b37f5a63c..a41f8c90fd 100644 --- a/zetaclient/keys/keys_test.go +++ b/zetaclient/keys/keys_test.go @@ -19,7 +19,7 @@ import ( . "gopkg.in/check.v1" "github.com/zeta-chain/zetacore/cmd" - "github.com/zeta-chain/zetacore/common/cosmos" + "github.com/zeta-chain/zetacore/pkg/cosmos" ) type KeysSuite struct{} diff --git a/zetaclient/tss/tss_signer.go b/zetaclient/tss/tss_signer.go index b95baadf1b..9744d64074 100644 --- a/zetaclient/tss/tss_signer.go +++ b/zetaclient/tss/tss_signer.go @@ -12,6 +12,8 @@ import ( "strings" "time" + "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/cosmos" appcontext "github.com/zeta-chain/zetacore/zetaclient/app_context" "github.com/zeta-chain/zetacore/zetaclient/interfaces" "github.com/zeta-chain/zetacore/zetaclient/keys" @@ -29,8 +31,6 @@ import ( "github.com/zeta-chain/go-tss/keysign" "github.com/zeta-chain/go-tss/p2p" "github.com/zeta-chain/go-tss/tss" - "github.com/zeta-chain/zetacore/common" - zcommon "github.com/zeta-chain/zetacore/common/cosmos" observertypes "github.com/zeta-chain/zetacore/x/observer/types" "github.com/zeta-chain/zetacore/zetaclient/config" "github.com/zeta-chain/zetacore/zetaclient/metrics" @@ -50,7 +50,7 @@ func NewTSSKey(pk string) (*Key, error) { TSSKey := &Key{ PubkeyInBech32: pk, } - pubkey, err := zcommon.GetPubKeyFromBech32(zcommon.Bech32PubKeyTypeAccPub, pk) + pubkey, err := cosmos.GetPubKeyFromBech32(cosmos.Bech32PubKeyTypeAccPub, pk) if err != nil { log.Error().Err(err).Msgf("GetPubKeyFromBech32 from %s", pk) return nil, fmt.Errorf("GetPubKeyFromBech32: %w", err) @@ -193,7 +193,7 @@ func (tss *TSS) Pubkey() []byte { // Sign signs a digest // digest should be Hashes of some data // NOTE: Specify optionalPubkey to use a different pubkey than the current pubkey set during keygen -func (tss *TSS) Sign(digest []byte, height uint64, nonce uint64, chain *common.Chain, optionalPubKey string) ([65]byte, error) { +func (tss *TSS) Sign(digest []byte, height uint64, nonce uint64, chain *pkg.Chain, optionalPubKey string) ([65]byte, error) { H := digest log.Debug().Msgf("hash of digest is %s", H) @@ -263,7 +263,7 @@ func (tss *TSS) Sign(digest []byte, height uint64, nonce uint64, chain *common.C // SignBatch is hash of some data // digest should be batch of hashes of some data -func (tss *TSS) SignBatch(digests [][]byte, height uint64, nonce uint64, chain *common.Chain) ([][65]byte, error) { +func (tss *TSS) SignBatch(digests [][]byte, height uint64, nonce uint64, chain *pkg.Chain) ([][65]byte, error) { tssPubkey := tss.CurrentPubkey digestBase64 := make([]string, len(digests)) for i, digest := range digests { @@ -311,7 +311,7 @@ func (tss *TSS) SignBatch(digests [][]byte, height uint64, nonce uint64, chain * // log.Error().Err(err).Msgf("signature verification failure") // return [][65]byte{}, fmt.Errorf("signuature verification fail") //} - pubkey, err := zcommon.GetPubKeyFromBech32(zcommon.Bech32PubKeyTypeAccPub, tssPubkey) + pubkey, err := cosmos.GetPubKeyFromBech32(cosmos.Bech32PubKeyTypeAccPub, tssPubkey) if err != nil { log.Error().Msg("get pubkey from bech32 fail") } @@ -399,7 +399,7 @@ func (tss *TSS) BTCAddressWitnessPubkeyHash() *btcutil.AddressWitnessPubKeyHash } func (tss *TSS) PubKeyCompressedBytes() []byte { - pubk, err := zcommon.GetPubKeyFromBech32(zcommon.Bech32PubKeyTypeAccPub, tss.CurrentPubkey) + pubk, err := cosmos.GetPubKeyFromBech32(cosmos.Bech32PubKeyTypeAccPub, tss.CurrentPubkey) if err != nil { log.Error().Err(err).Msg("PubKeyCompressedBytes error") return nil @@ -487,7 +487,7 @@ func GetTssAddrBTC(tssPubkey string, bitcoinChainID int64) (string, error) { func GetTssAddrEVM(tssPubkey string) (ethcommon.Address, error) { var keyAddr ethcommon.Address - pubk, err := zcommon.GetPubKeyFromBech32(zcommon.Bech32PubKeyTypeAccPub, tssPubkey) + pubk, err := cosmos.GetPubKeyFromBech32(cosmos.Bech32PubKeyTypeAccPub, tssPubkey) if err != nil { log.Fatal().Err(err) return keyAddr, err @@ -537,7 +537,7 @@ func verifySignature(tssPubkey string, signature []keysign.Signature, H []byte) log.Warn().Msg("verify_signature: empty signature array") return false } - pubkey, err := zcommon.GetPubKeyFromBech32(zcommon.Bech32PubKeyTypeAccPub, tssPubkey) + pubkey, err := cosmos.GetPubKeyFromBech32(cosmos.Bech32PubKeyTypeAccPub, tssPubkey) if err != nil { log.Error().Msg("get pubkey from bech32 fail") } @@ -584,12 +584,12 @@ func wasNodePartOfTss(granteePubKey32 string, granteeList []string) bool { } func getKeyAddrBTCWitnessPubkeyHash(tssPubkey string, chainID int64) (*btcutil.AddressWitnessPubKeyHash, error) { - pubk, err := zcommon.GetPubKeyFromBech32(zcommon.Bech32PubKeyTypeAccPub, tssPubkey) + pubk, err := cosmos.GetPubKeyFromBech32(cosmos.Bech32PubKeyTypeAccPub, tssPubkey) if err != nil { return nil, err } - bitcoinNetParams, err := common.BitcoinNetParamsFromChainID(chainID) + bitcoinNetParams, err := pkg.BitcoinNetParamsFromChainID(chainID) if err != nil { return nil, err } diff --git a/zetaclient/tss/tss_signer_test.go b/zetaclient/tss/tss_signer_test.go index d4cc48f7ce..8871ccd29b 100644 --- a/zetaclient/tss/tss_signer_test.go +++ b/zetaclient/tss/tss_signer_test.go @@ -5,13 +5,13 @@ import ( "os" "testing" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/zetaclient/keys" "github.com/cosmos/cosmos-sdk/testutil/testdata" "github.com/rs/zerolog" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" - "github.com/zeta-chain/zetacore/common/cosmos" + "github.com/zeta-chain/zetacore/pkg/cosmos" ) func Test_LoadTssFilesFromDirectory(t *testing.T) { @@ -63,7 +63,7 @@ func GenerateKeyshareFiles(n int, dir string) error { if err != nil { return err } - pk, err := common.NewPubKey(spk) + pk, err := pkg.NewPubKey(spk) if err != nil { return err } diff --git a/zetaclient/zetabridge/broadcast.go b/zetaclient/zetabridge/broadcast.go index 93de44f3f1..f96b6ff035 100644 --- a/zetaclient/zetabridge/broadcast.go +++ b/zetaclient/zetabridge/broadcast.go @@ -20,7 +20,7 @@ import ( rpchttp "github.com/tendermint/tendermint/rpc/client/http" "github.com/zeta-chain/zetacore/app/ante" "github.com/zeta-chain/zetacore/cmd/zetacored/config" - "github.com/zeta-chain/zetacore/common/cosmos" + "github.com/zeta-chain/zetacore/pkg/cosmos" "github.com/zeta-chain/zetacore/zetaclient/hsm" ) diff --git a/zetaclient/zetabridge/zetacore_bridge.go b/zetaclient/zetabridge/zetacore_bridge.go index babdc505bf..47f2a4e2b4 100644 --- a/zetaclient/zetabridge/zetacore_bridge.go +++ b/zetaclient/zetabridge/zetacore_bridge.go @@ -5,6 +5,7 @@ import ( "sync" "time" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/zetaclient/interfaces" "github.com/zeta-chain/zetacore/zetaclient/keys" "github.com/zeta-chain/zetacore/zetaclient/metrics" @@ -17,8 +18,7 @@ import ( "github.com/rs/zerolog" "github.com/rs/zerolog/log" "github.com/zeta-chain/zetacore/app" - "github.com/zeta-chain/zetacore/common" - "github.com/zeta-chain/zetacore/common/cosmos" + "github.com/zeta-chain/zetacore/pkg/cosmos" crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" "github.com/zeta-chain/zetacore/zetaclient/config" @@ -32,8 +32,8 @@ var _ interfaces.ZetaCoreBridger = &ZetaCoreBridge{} type ZetaCoreBridge struct { logger zerolog.Logger blockHeight int64 - accountNumber map[common.KeyType]uint64 - seqNumber map[common.KeyType]uint64 + accountNumber map[pkg.KeyType]uint64 + seqNumber map[pkg.KeyType]uint64 grpcConn *grpc.ClientConn httpClient *retryablehttp.Client cfg config.ClientConfiguration @@ -41,7 +41,7 @@ type ZetaCoreBridge struct { keys *keys.Keys broadcastLock *sync.RWMutex zetaChainID string - zetaChain common.Chain + zetaChain pkg.Chain stop chan struct{} pause chan struct{} Telemetry *metrics.TelemetryServer @@ -78,14 +78,14 @@ func NewZetaCoreBridge( logger.Error().Err(err).Msg("grpc dial fail") return nil, err } - accountsMap := make(map[common.KeyType]uint64) - seqMap := make(map[common.KeyType]uint64) - for _, keyType := range common.GetAllKeyTypes() { + accountsMap := make(map[pkg.KeyType]uint64) + seqMap := make(map[pkg.KeyType]uint64) + for _, keyType := range pkg.GetAllKeyTypes() { accountsMap[keyType] = 0 seqMap[keyType] = 0 } - zetaChain, err := common.ZetaChainFromChainID(chainID) + zetaChain, err := pkg.ZetaChainFromChainID(chainID) if err != nil { return nil, fmt.Errorf("invalid chain id %s, %w", chainID, err) } @@ -126,7 +126,7 @@ func (b *ZetaCoreBridge) UpdateChainID(chainID string) error { if b.zetaChainID != chainID { b.zetaChainID = chainID - zetaChain, err := common.ZetaChainFromChainID(chainID) + zetaChain, err := pkg.ZetaChainFromChainID(chainID) if err != nil { return fmt.Errorf("invalid chain id %s, %w", chainID, err) } @@ -137,7 +137,7 @@ func (b *ZetaCoreBridge) UpdateChainID(chainID string) error { } // ZetaChain returns the ZetaChain chain object -func (b *ZetaCoreBridge) ZetaChain() common.Chain { +func (b *ZetaCoreBridge) ZetaChain() pkg.Chain { return b.zetaChain } @@ -147,7 +147,7 @@ func (b *ZetaCoreBridge) Stop() { } // GetAccountNumberAndSequenceNumber We do not use multiple KeyType for now , but this can be optionally used in the future to seprate TSS signer from Zetaclient GRantee -func (b *ZetaCoreBridge) GetAccountNumberAndSequenceNumber(_ common.KeyType) (uint64, uint64, error) { +func (b *ZetaCoreBridge) GetAccountNumberAndSequenceNumber(_ pkg.KeyType) (uint64, uint64, error) { ctx, err := b.GetContext() if err != nil { return 0, 0, err @@ -156,7 +156,7 @@ func (b *ZetaCoreBridge) GetAccountNumberAndSequenceNumber(_ common.KeyType) (ui return ctx.AccountRetriever.GetAccountNumberSequence(ctx, address) } -func (b *ZetaCoreBridge) SetAccountNumber(keyType common.KeyType) { +func (b *ZetaCoreBridge) SetAccountNumber(keyType pkg.KeyType) { ctx, err := b.GetContext() if err != nil { b.logger.Error().Err(err).Msg("fail to get context") @@ -230,9 +230,9 @@ func (b *ZetaCoreBridge) UpdateZetaCoreContext(coreContext *corecontext.ZetaCore b.logger.Info().Msgf("Chain %d is not supported yet", chainParam.ChainId) continue } - if common.IsBitcoinChain(chainParam.ChainId) { + if pkg.IsBitcoinChain(chainParam.ChainId) { newBTCParams = chainParam - } else if common.IsEVMChain(chainParam.ChainId) { + } else if pkg.IsEVMChain(chainParam.ChainId) { newEVMParams[chainParam.ChainId] = chainParam } } @@ -241,7 +241,7 @@ func (b *ZetaCoreBridge) UpdateZetaCoreContext(coreContext *corecontext.ZetaCore if err != nil { return err } - newChains := make([]common.Chain, len(chains)) + newChains := make([]pkg.Chain, len(chains)) for i, chain := range chains { newChains[i] = *chain } From 99de7e8081e863869e67e54e3990e8368726f0e4 Mon Sep 17 00:00:00 2001 From: skosito Date: Thu, 21 Mar 2024 20:44:50 +0100 Subject: [PATCH 29/41] Use pkg --- cmd/zetaclientd/keygen_tss.go | 8 +-- cmd/zetaclientd/start.go | 6 +- cmd/zetaclientd/utils.go | 10 +-- cmd/zetaclientd/version.go | 4 +- cmd/zetacored/observer_accounts.go | 6 +- e2e/e2etests/test_bitcoin_withdraw.go | 4 +- e2e/e2etests/test_donation.go | 4 +- e2e/e2etests/test_update_bytecode.go | 4 +- e2e/e2etests/test_zeta_withdraw.go | 4 +- e2e/runner/bitcoin.go | 10 +-- e2e/runner/setup_evm.go | 4 +- e2e/runner/setup_zeta.go | 8 +-- e2e/txserver/zeta_tx_server.go | 14 ++-- pkg/bitcoin/proof_test.go | 2 +- pkg/chain_id_test.go | 4 +- pkg/coin_test.go | 22 +++--- pkg/ethereum/proof_test.go | 2 +- pkg/headers.go | 2 +- pkg/headers_test.go | 24 +++---- rpc/namespaces/ethereum/web3/api.go | 4 +- testutil/network/genesis_state.go | 12 ++-- testutil/sample/common.go | 16 ++--- testutil/sample/crosschain.go | 8 +-- testutil/sample/fungible.go | 4 +- testutil/sample/observer.go | 6 +- x/crosschain/client/cli/cli_cctx.go | 16 ++--- x/crosschain/client/cli/cli_in_tx_tracker.go | 4 +- x/crosschain/client/cli/cli_tss.go | 8 +-- .../client/integrationtests/cli_helpers.go | 24 +++---- x/crosschain/keeper/abci.go | 6 +- x/crosschain/keeper/abci_test.go | 20 +++--- x/crosschain/keeper/cctx.go | 4 +- x/crosschain/keeper/cctx_test.go | 4 +- x/crosschain/keeper/cctx_utils.go | 6 +- x/crosschain/keeper/cctx_utils_test.go | 20 +++--- x/crosschain/keeper/events.go | 6 +- x/crosschain/keeper/evm_deposit.go | 8 +-- x/crosschain/keeper/evm_deposit_test.go | 40 +++++------ x/crosschain/keeper/evm_hooks.go | 14 ++-- x/crosschain/keeper/evm_hooks_test.go | 64 ++++++++--------- x/crosschain/keeper/gas_payment.go | 14 ++-- .../keeper/grpc_query_zeta_conversion_rate.go | 4 +- x/crosschain/keeper/in_tx_tracker_test.go | 4 +- .../keeper/msg_server_add_to_intx_tracker.go | 4 +- .../msg_server_add_to_intx_tracker_test.go | 18 ++--- .../keeper/msg_server_add_to_outtx_tracker.go | 16 ++--- .../keeper/msg_server_migrate_tss_funds.go | 26 +++---- .../msg_server_migrate_tss_funds_test.go | 6 +- .../keeper/msg_server_refund_aborted_tx.go | 4 +- .../msg_server_refund_aborted_tx_test.go | 28 ++++---- x/crosschain/keeper/msg_server_tss_voter.go | 6 +- .../keeper/msg_server_vote_inbound_tx.go | 4 +- .../keeper/msg_server_vote_inbound_tx_test.go | 6 +- .../keeper/msg_server_vote_outbound_tx.go | 4 +- .../keeper/msg_server_whitelist_erc20.go | 12 ++-- .../keeper/msg_server_whitelist_erc20_test.go | 4 +- x/crosschain/keeper/refund.go | 14 ++-- x/crosschain/keeper/refund_test.go | 32 ++++----- x/crosschain/keeper/verify_proof.go | 18 ++--- x/crosschain/migrations/v4/migrate.go | 6 +- x/crosschain/migrations/v4/migrate_test.go | 32 ++++----- x/crosschain/migrations/v5/migrate.go | 18 ++--- x/crosschain/migrations/v5/migrate_test.go | 56 +++++++-------- x/crosschain/types/expected_keepers.go | 18 ++--- .../types/message_add_to_in_tx_tracker.go | 8 +-- .../message_add_to_in_tx_tracker_test.go | 42 +++++------ .../types/message_add_to_out_tx_tracker.go | 4 +- x/crosschain/types/message_gas_price_voter.go | 4 +- .../types/message_gas_price_voter_test.go | 4 +- .../types/message_migrate_tss_funds.go | 4 +- .../types/message_migrate_tss_funds_test.go | 18 ++--- x/crosschain/types/message_tss_voter.go | 4 +- x/crosschain/types/message_tss_voter_test.go | 18 ++--- .../message_vote_on_observed_inbound_tx.go | 6 +- ...essage_vote_on_observed_inbound_tx_test.go | 18 ++--- .../message_vote_on_observed_outbound_tx.go | 10 +-- ...ssage_vote_on_observed_outbound_tx_test.go | 24 +++---- x/emissions/abci_test.go | 6 +- .../keeper/block_rewards_components.go | 4 +- .../cli/tx_deploy_fungible_coin_zrc_4.go | 4 +- x/fungible/keeper/deposits.go | 6 +- x/fungible/keeper/deposits_test.go | 42 +++++------ x/fungible/keeper/evm.go | 6 +- x/fungible/keeper/evm_test.go | 8 +-- x/fungible/keeper/foreign_coins.go | 4 +- x/fungible/keeper/foreign_coins_test.go | 24 +++---- x/fungible/keeper/gas_coin_and_pool.go | 8 +-- .../msg_server_deploy_fungible_coin_zrc20.go | 4 +- ..._server_deploy_fungible_coin_zrc20_test.go | 20 +++--- ...sg_server_update_contract_bytecode_test.go | 8 +-- .../msg_server_update_system_contract.go | 4 +- .../msg_server_update_system_contract_test.go | 6 +- x/fungible/types/expected_keepers.go | 4 +- .../message_deploy_fungible_coin_zrc20.go | 4 +- ...message_deploy_fungible_coin_zrc20_test.go | 10 +-- x/observer/genesis.go | 4 +- x/observer/keeper/block_header.go | 6 +- x/observer/keeper/chain_params.go | 14 ++-- x/observer/keeper/chain_params_test.go | 14 ++-- x/observer/keeper/grpc_query_block_header.go | 6 +- x/observer/keeper/grpc_query_prove.go | 10 +-- x/observer/keeper/grpc_query_tss.go | 18 ++--- .../keeper/msg_server_add_block_header.go | 8 +-- .../msg_server_add_block_header_test.go | 30 ++++---- x/observer/keeper/msg_server_add_observer.go | 8 +-- .../msg_server_remove_chain_params_test.go | 20 +++--- .../msg_server_update_chain_params_test.go | 10 +-- x/observer/keeper/utils.go | 4 +- x/observer/keeper/vote_inbound.go | 6 +- x/observer/keeper/vote_inbound_test.go | 38 +++++----- x/observer/keeper/vote_outbound.go | 4 +- x/observer/keeper/vote_outbound_test.go | 18 ++--- x/observer/migrations/v5/migrate_test.go | 6 +- x/observer/types/chain_params.go | 34 ++++----- x/observer/types/message_add_blame_vote.go | 4 +- x/observer/types/message_add_block_header.go | 6 +- .../types/message_add_block_header_test.go | 14 ++-- x/observer/types/message_add_observer.go | 6 +- .../types/message_remove_chain_params.go | 4 +- .../types/message_remove_chain_params_test.go | 6 +- .../types/message_update_chain_params_test.go | 6 +- x/observer/types/observer_set.go | 8 +-- x/observer/types/params.go | 4 +- x/observer/types/parsers.go | 8 +-- zetaclient/app_context/app_context.go | 6 +- zetaclient/authz/authz_signer.go | 6 +- zetaclient/bitcoin/bitcoin_client.go | 34 ++++----- zetaclient/bitcoin/bitcoin_client_rpc_test.go | 4 +- zetaclient/bitcoin/bitcoin_client_test.go | 6 +- zetaclient/bitcoin/bitcoin_signer.go | 12 ++-- zetaclient/bitcoin/bitcoin_signer_test.go | 4 +- zetaclient/bitcoin/bitcoin_test.go | 4 +- zetaclient/bitcoin/inbound_tracker.go | 4 +- zetaclient/bitcoin/utils.go | 10 +-- zetaclient/bitcoin/utils_test.go | 8 +-- zetaclient/config/config_chain.go | 26 +++---- zetaclient/config/types.go | 4 +- zetaclient/core_context/zeta_core_context.go | 18 ++--- .../core_context/zeta_core_context_test.go | 20 +++--- zetaclient/evm/evm_client.go | 64 ++++++++--------- zetaclient/evm/evm_client_test.go | 8 +-- zetaclient/evm/evm_signer.go | 30 ++++---- zetaclient/evm/evm_signer_test.go | 12 ++-- zetaclient/evm/inbounds.go | 32 ++++----- zetaclient/evm/inbounds_test.go | 64 ++++++++--------- zetaclient/evm/outbound_transaction_data.go | 10 +-- .../evm/outbound_transaction_data_test.go | 6 +- zetaclient/evm/validation_test.go | 70 +++++++++---------- zetaclient/interfaces/interfaces.go | 20 +++--- .../supplychecker/zeta_supply_checker.go | 18 ++--- zetaclient/testutils/stub/core_bridge.go | 20 +++--- zetaclient/testutils/stub/tss_signer.go | 4 +- zetaclient/testutils/testdata.go | 24 +++---- zetaclient/testutils/testdata_naming.go | 12 ++-- zetaclient/zetabridge/query.go | 12 ++-- zetaclient/zetabridge/tx.go | 22 +++--- zetaclient/zetabridge/tx_vote_inbound.go | 4 +- zetaclient/zetacore_observer.go | 20 +++--- zetaclient/zetacore_observer_test.go | 4 +- 159 files changed, 1036 insertions(+), 1036 deletions(-) diff --git a/cmd/zetaclientd/keygen_tss.go b/cmd/zetaclientd/keygen_tss.go index 16f79581b5..91d9efcf7f 100644 --- a/cmd/zetaclientd/keygen_tss.go +++ b/cmd/zetaclientd/keygen_tss.go @@ -17,7 +17,7 @@ import ( tsscommon "github.com/zeta-chain/go-tss/common" "github.com/zeta-chain/go-tss/keygen" "github.com/zeta-chain/go-tss/p2p" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" observertypes "github.com/zeta-chain/zetacore/x/observer/types" "github.com/zeta-chain/zetacore/zetaclient/metrics" ) @@ -37,7 +37,7 @@ func GenerateTss( // Bitcoin chain ID is currently used for using the correct signature format // TODO: remove this once we have a better way to determine the signature format // https://github.com/zeta-chain/node/issues/1397 - bitcoinChainID := common.BtcRegtestChain().ChainId + bitcoinChainID := pkg.BtcRegtestChain().ChainId btcChain, _, btcEnabled := appContext.GetBTCChainAndConfig() if btcEnabled { bitcoinChainID = btcChain.ChainId @@ -109,7 +109,7 @@ func GenerateTss( err = keygenTss(keyGen, tss, keygenLogger) if err != nil { keygenLogger.Error().Err(err).Msg("keygenTss error") - tssFailedVoteHash, err := zetaBridge.SetTSS("", keyGen.BlockNumber, common.ReceiveStatus_Failed) + tssFailedVoteHash, err := zetaBridge.SetTSS("", keyGen.BlockNumber, pkg.ReceiveStatus_Failed) if err != nil { keygenLogger.Error().Err(err).Msg("Failed to broadcast Failed TSS Vote to zetacore") return nil, err @@ -127,7 +127,7 @@ func GenerateTss( } // If TSS is successful , broadcast the vote to zetacore and set Pubkey - tssSuccessVoteHash, err := zetaBridge.SetTSS(newTss.CurrentPubkey, keyGen.BlockNumber, common.ReceiveStatus_Success) + tssSuccessVoteHash, err := zetaBridge.SetTSS(newTss.CurrentPubkey, keyGen.BlockNumber, pkg.ReceiveStatus_Success) if err != nil { keygenLogger.Error().Err(err).Msg("TSS successful but unable to broadcast vote to zeta-core") return nil, err diff --git a/cmd/zetaclientd/start.go b/cmd/zetaclientd/start.go index f402b26b4d..7946dcd158 100644 --- a/cmd/zetaclientd/start.go +++ b/cmd/zetaclientd/start.go @@ -20,7 +20,7 @@ import ( "github.com/spf13/cobra" "github.com/tendermint/tendermint/crypto/secp256k1" "github.com/zeta-chain/go-tss/p2p" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" observerTypes "github.com/zeta-chain/zetacore/x/observer/types" mc "github.com/zeta-chain/zetacore/zetaclient" appcontext "github.com/zeta-chain/zetacore/zetaclient/app_context" @@ -99,7 +99,7 @@ func start(_ *cobra.Command, _ []string) error { } zetaBridge.WaitForCoreToCreateBlocks() startLogger.Info().Msgf("ZetaBridge is ready") - zetaBridge.SetAccountNumber(common.ZetaClientGranteeKey) + zetaBridge.SetAccountNumber(pkg.ZetaClientGranteeKey) // cross-check chainid res, err := zetaBridge.GetNodeInfo() @@ -169,7 +169,7 @@ func start(_ *cobra.Command, _ []string) error { } m.Start() - metrics.Info.WithLabelValues(common.Version).Set(1) + metrics.Info.WithLabelValues(pkg.Version).Set(1) metrics.LastStartTime.SetToCurrentTime() var tssHistoricalList []observerTypes.TSS diff --git a/cmd/zetaclientd/utils.go b/cmd/zetaclientd/utils.go index a13e904776..b0deaad7ad 100644 --- a/cmd/zetaclientd/utils.go +++ b/cmd/zetaclientd/utils.go @@ -3,7 +3,7 @@ package main import ( sdk "github.com/cosmos/cosmos-sdk/types" ethcommon "github.com/ethereum/go-ethereum/common" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/pkg/cosmos" appcontext "github.com/zeta-chain/zetacore/zetaclient/app_context" "github.com/zeta-chain/zetacore/zetaclient/authz" @@ -55,8 +55,8 @@ func CreateSignerMap( tss interfaces.TSSSigner, loggers clientcommon.ClientLogger, ts *metrics.TelemetryServer, -) (map[common.Chain]interfaces.ChainSigner, error) { - signerMap := make(map[common.Chain]interfaces.ChainSigner) +) (map[pkg.Chain]interfaces.ChainSigner, error) { + signerMap := make(map[pkg.Chain]interfaces.ChainSigner) // EVM signers for _, evmConfig := range appContext.Config().GetAllEVMConfigs() { if evmConfig.Chain.IsZetaChain() { @@ -100,8 +100,8 @@ func CreateChainClientMap( dbpath string, loggers clientcommon.ClientLogger, ts *metrics.TelemetryServer, -) (map[common.Chain]interfaces.ChainClient, error) { - clientMap := make(map[common.Chain]interfaces.ChainClient) +) (map[pkg.Chain]interfaces.ChainClient, error) { + clientMap := make(map[pkg.Chain]interfaces.ChainClient) // EVM clients for _, evmConfig := range appContext.Config().GetAllEVMConfigs() { if evmConfig.Chain.IsZetaChain() { diff --git a/cmd/zetaclientd/version.go b/cmd/zetaclientd/version.go index 285545e74f..5c0c274253 100644 --- a/cmd/zetaclientd/version.go +++ b/cmd/zetaclientd/version.go @@ -4,7 +4,7 @@ import ( "fmt" "github.com/spf13/cobra" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" ) var VersionCmd = &cobra.Command{ @@ -14,6 +14,6 @@ var VersionCmd = &cobra.Command{ } func Version(_ *cobra.Command, _ []string) error { - fmt.Printf(common.Version) + fmt.Printf(pkg.Version) return nil } diff --git a/cmd/zetacored/observer_accounts.go b/cmd/zetacored/observer_accounts.go index 38768c5926..02f8ba49bd 100644 --- a/cmd/zetacored/observer_accounts.go +++ b/cmd/zetacored/observer_accounts.go @@ -23,7 +23,7 @@ import ( "github.com/spf13/cobra" "github.com/zeta-chain/zetacore/app" "github.com/zeta-chain/zetacore/cmd/zetacored/config" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -115,11 +115,11 @@ func AddObserverAccountsCmd() *cobra.Command { observerSet.ObserverList = append(observerSet.ObserverList, info.ObserverAddress) if info.ZetaClientGranteePubKey != "" { - pubkey, err := common.NewPubKey(info.ZetaClientGranteePubKey) + pubkey, err := pkg.NewPubKey(info.ZetaClientGranteePubKey) if err != nil { panic(err) } - pubkeySet := common.PubKeySet{ + pubkeySet := pkg.PubKeySet{ Secp256k1: pubkey, Ed25519: "", } diff --git a/e2e/e2etests/test_bitcoin_withdraw.go b/e2e/e2etests/test_bitcoin_withdraw.go index edd779b595..61b0ca3f1f 100644 --- a/e2e/e2etests/test_bitcoin_withdraw.go +++ b/e2e/e2etests/test_bitcoin_withdraw.go @@ -8,9 +8,9 @@ import ( "github.com/btcsuite/btcd/btcjson" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcutil" - "github.com/zeta-chain/zetacore/common" "github.com/zeta-chain/zetacore/e2e/runner" "github.com/zeta-chain/zetacore/e2e/utils" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/zetaclient/testutils" ) @@ -122,7 +122,7 @@ func WithdrawBitcoin(r *runner.E2ERunner, amount *big.Int) { func WithdrawBitcoinRestricted(r *runner.E2ERunner, amount *big.Int) { // use restricted BTC P2WPKH address - addressRestricted, err := common.DecodeBtcAddress(testutils.RestrictedBtcAddressTest, common.BtcRegtestChain().ChainId) + addressRestricted, err := pkg.DecodeBtcAddress(testutils.RestrictedBtcAddressTest, pkg.BtcRegtestChain().ChainId) if err != nil { panic(err) } diff --git a/e2e/e2etests/test_donation.go b/e2e/e2etests/test_donation.go index fbf4670c3e..07510df987 100644 --- a/e2e/e2etests/test_donation.go +++ b/e2e/e2etests/test_donation.go @@ -3,9 +3,9 @@ package e2etests import ( "math/big" - "github.com/zeta-chain/zetacore/common" "github.com/zeta-chain/zetacore/e2e/runner" "github.com/zeta-chain/zetacore/e2e/utils" + "github.com/zeta-chain/zetacore/pkg" ) // TestDonationEther tests donation of ether to the tss address @@ -19,7 +19,7 @@ func TestDonationEther(r *runner.E2ERunner, args []string) { panic("Invalid amount specified for TestDonationEther.") } - txDonation, err := r.SendEther(r.TSSAddress, amount, []byte(common.DonationMessage)) + txDonation, err := r.SendEther(r.TSSAddress, amount, []byte(pkg.DonationMessage)) if err != nil { panic(err) } diff --git a/e2e/e2etests/test_update_bytecode.go b/e2e/e2etests/test_update_bytecode.go index 6bf5bf9f70..3cdca22d02 100644 --- a/e2e/e2etests/test_update_bytecode.go +++ b/e2e/e2etests/test_update_bytecode.go @@ -4,10 +4,10 @@ import ( "math/big" "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/zeta-chain/zetacore/common" "github.com/zeta-chain/zetacore/e2e/contracts/testzrc20" "github.com/zeta-chain/zetacore/e2e/runner" "github.com/zeta-chain/zetacore/e2e/utils" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/testutil/sample" fungibletypes "github.com/zeta-chain/zetacore/x/fungible/types" ) @@ -32,7 +32,7 @@ func TestUpdateBytecode(r *runner.E2ERunner, _ []string) { r.ZEVMClient, big.NewInt(5), // #nosec G701 test - always in range - uint8(common.CoinType_Gas), + uint8(pkg.CoinType_Gas), ) if err != nil { panic(err) diff --git a/e2e/e2etests/test_zeta_withdraw.go b/e2e/e2etests/test_zeta_withdraw.go index fd5d91cd14..0afe9d0eaa 100644 --- a/e2e/e2etests/test_zeta_withdraw.go +++ b/e2e/e2etests/test_zeta_withdraw.go @@ -7,9 +7,9 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" "github.com/zeta-chain/protocol-contracts/pkg/contracts/zevm/connectorzevm.sol" - "github.com/zeta-chain/zetacore/common" "github.com/zeta-chain/zetacore/e2e/runner" "github.com/zeta-chain/zetacore/e2e/utils" + "github.com/zeta-chain/zetacore/pkg" cctxtypes "github.com/zeta-chain/zetacore/x/crosschain/types" ) @@ -135,7 +135,7 @@ func TestZetaWithdrawBTCRevert(r *runner.E2ERunner, args []string) { lessThanAmount := amount.Div(amount, big.NewInt(10)) // 1/10 of amount tx, err = r.ConnectorZEVM.Send(r.ZEVMAuth, connectorzevm.ZetaInterfacesSendInput{ - DestinationChainId: big.NewInt(common.BtcRegtestChain().ChainId), + DestinationChainId: big.NewInt(pkg.BtcRegtestChain().ChainId), DestinationAddress: r.DeployerAddress.Bytes(), DestinationGasLimit: big.NewInt(400_000), Message: nil, diff --git a/e2e/runner/bitcoin.go b/e2e/runner/bitcoin.go index 1aa9c52ea8..2d405c0909 100644 --- a/e2e/runner/bitcoin.go +++ b/e2e/runner/bitcoin.go @@ -15,9 +15,9 @@ import ( "github.com/btcsuite/btcutil" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/rs/zerolog/log" - "github.com/zeta-chain/zetacore/common" - "github.com/zeta-chain/zetacore/common/bitcoin" "github.com/zeta-chain/zetacore/e2e/utils" + "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/bitcoin" crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" zetabitcoin "github.com/zeta-chain/zetacore/zetaclient/bitcoin" @@ -117,7 +117,7 @@ func (runner *E2ERunner) DepositBTC(testHeader bool) { 0.11, utxos[4:5], btc, - []byte(common.DonationMessage), + []byte(pkg.DonationMessage), runner.BTCDeployerAddress, ) if err != nil { @@ -387,10 +387,10 @@ func (runner *E2ERunner) ProveBTCTransaction(txHash *chainhash.Hash) { // verify merkle proof through RPC res, err := runner.ObserverClient.Prove(runner.Ctx, &observertypes.QueryProveRequest{ - ChainId: common.BtcRegtestChain().ChainId, + ChainId: pkg.BtcRegtestChain().ChainId, TxHash: txHash.String(), BlockHash: blockHash.String(), - Proof: common.NewBitcoinProof(txBytes, path, index), + Proof: pkg.NewBitcoinProof(txBytes, path, index), TxIndex: 0, // bitcoin doesn't use txIndex }) if err != nil { diff --git a/e2e/runner/setup_evm.go b/e2e/runner/setup_evm.go index 5b95095344..aef39cf338 100644 --- a/e2e/runner/setup_evm.go +++ b/e2e/runner/setup_evm.go @@ -8,11 +8,11 @@ import ( "github.com/zeta-chain/protocol-contracts/pkg/contracts/evm/erc20custody.sol" zetaeth "github.com/zeta-chain/protocol-contracts/pkg/contracts/evm/zeta.eth.sol" zetaconnectoreth "github.com/zeta-chain/protocol-contracts/pkg/contracts/evm/zetaconnector.eth.sol" - "github.com/zeta-chain/zetacore/common" "github.com/zeta-chain/zetacore/e2e/config" "github.com/zeta-chain/zetacore/e2e/contracts/erc20" "github.com/zeta-chain/zetacore/e2e/contracts/testdapp" "github.com/zeta-chain/zetacore/e2e/utils" + "github.com/zeta-chain/zetacore/pkg" ) const ( @@ -62,7 +62,7 @@ func (runner *E2ERunner) SetupEVM(contractsDeployed bool) { // donate to the TSS address to avoid account errors because deploying gas token ZRC20 will automatically mint // gas token on ZetaChain to initialize the pool - txDonation, err := runner.SendEther(runner.TSSAddress, big.NewInt(101000000000000000), []byte(common.DonationMessage)) + txDonation, err := runner.SendEther(runner.TSSAddress, big.NewInt(101000000000000000), []byte(pkg.DonationMessage)) if err != nil { panic(err) } diff --git a/e2e/runner/setup_zeta.go b/e2e/runner/setup_zeta.go index bb058a87d6..c55b45ad3a 100644 --- a/e2e/runner/setup_zeta.go +++ b/e2e/runner/setup_zeta.go @@ -15,10 +15,10 @@ import ( "github.com/zeta-chain/protocol-contracts/pkg/contracts/zevm/zrc20.sol" "github.com/zeta-chain/protocol-contracts/pkg/uniswap/v2-core/contracts/uniswapv2factory.sol" uniswapv2router "github.com/zeta-chain/protocol-contracts/pkg/uniswap/v2-periphery/contracts/uniswapv2router02.sol" - "github.com/zeta-chain/zetacore/common" "github.com/zeta-chain/zetacore/e2e/contracts/contextapp" "github.com/zeta-chain/zetacore/e2e/contracts/zevmswap" e2eutils "github.com/zeta-chain/zetacore/e2e/utils" + "github.com/zeta-chain/zetacore/pkg" fungibletypes "github.com/zeta-chain/zetacore/x/fungible/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -31,7 +31,7 @@ var EmissionsPoolFunding = big.NewInt(0).Mul(big.NewInt(1e18), big.NewInt(2e7)) func (runner *E2ERunner) SetTSSAddresses() error { runner.Logger.Print("⚙️ setting up TSS address") - btcChainID, err := common.GetBTCChainIDFromChainParams(runner.BitcoinParams) + btcChainID, err := pkg.GetBTCChainIDFromChainParams(runner.BitcoinParams) if err != nil { return err } @@ -175,7 +175,7 @@ func (runner *E2ERunner) SetZEVMContracts() { // SetupETHZRC20 sets up the ETH ZRC20 in the runner from the values queried from the chain func (runner *E2ERunner) SetupETHZRC20() { - ethZRC20Addr, err := runner.SystemContract.GasCoinZRC20ByChainId(&bind.CallOpts{}, big.NewInt(common.GoerliLocalnetChain().ChainId)) + ethZRC20Addr, err := runner.SystemContract.GasCoinZRC20ByChainId(&bind.CallOpts{}, big.NewInt(pkg.GoerliLocalnetChain().ChainId)) if err != nil { panic(err) } @@ -192,7 +192,7 @@ func (runner *E2ERunner) SetupETHZRC20() { // SetupBTCZRC20 sets up the BTC ZRC20 in the runner from the values queried from the chain func (runner *E2ERunner) SetupBTCZRC20() { - BTCZRC20Addr, err := runner.SystemContract.GasCoinZRC20ByChainId(&bind.CallOpts{}, big.NewInt(common.BtcRegtestChain().ChainId)) + BTCZRC20Addr, err := runner.SystemContract.GasCoinZRC20ByChainId(&bind.CallOpts{}, big.NewInt(pkg.BtcRegtestChain().ChainId)) if err != nil { panic(err) } diff --git a/e2e/txserver/zeta_tx_server.go b/e2e/txserver/zeta_tx_server.go index 910224d567..ddfbadcb73 100644 --- a/e2e/txserver/zeta_tx_server.go +++ b/e2e/txserver/zeta_tx_server.go @@ -34,7 +34,7 @@ import ( evmtypes "github.com/evmos/ethermint/x/evm/types" rpchttp "github.com/tendermint/tendermint/rpc/client/http" "github.com/zeta-chain/zetacore/cmd/zetacored/config" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" emissionstypes "github.com/zeta-chain/zetacore/x/emissions/types" fungibletypes "github.com/zeta-chain/zetacore/x/fungible/types" @@ -233,11 +233,11 @@ func (zts ZetaTxServer) DeploySystemContractsAndZRC20(account, erc20Addr string) _, err = zts.BroadcastTx(account, fungibletypes.NewMsgDeployFungibleCoinZRC20( addr.String(), "", - common.GoerliLocalnetChain().ChainId, + pkg.GoerliLocalnetChain().ChainId, 18, "ETH", "gETH", - common.CoinType_Gas, + pkg.CoinType_Gas, 100000, )) if err != nil { @@ -248,11 +248,11 @@ func (zts ZetaTxServer) DeploySystemContractsAndZRC20(account, erc20Addr string) _, err = zts.BroadcastTx(account, fungibletypes.NewMsgDeployFungibleCoinZRC20( addr.String(), "", - common.BtcRegtestChain().ChainId, + pkg.BtcRegtestChain().ChainId, 8, "BTC", "tBTC", - common.CoinType_Gas, + pkg.CoinType_Gas, 100000, )) if err != nil { @@ -263,11 +263,11 @@ func (zts ZetaTxServer) DeploySystemContractsAndZRC20(account, erc20Addr string) res, err = zts.BroadcastTx(account, fungibletypes.NewMsgDeployFungibleCoinZRC20( addr.String(), erc20Addr, - common.GoerliLocalnetChain().ChainId, + pkg.GoerliLocalnetChain().ChainId, 6, "USDT", "USDT", - common.CoinType_ERC20, + pkg.CoinType_ERC20, 100000, )) if err != nil { diff --git a/pkg/bitcoin/proof_test.go b/pkg/bitcoin/proof_test.go index 0f521c4934..7ad3199493 100644 --- a/pkg/bitcoin/proof_test.go +++ b/pkg/bitcoin/proof_test.go @@ -12,7 +12,7 @@ import ( "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcutil" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common/testdata" + "github.com/zeta-chain/zetacore/pkg/testdata" ) func TestBitcoinMerkleProof(t *testing.T) { diff --git a/pkg/chain_id_test.go b/pkg/chain_id_test.go index ee9db41c63..139412f0e4 100644 --- a/pkg/chain_id_test.go +++ b/pkg/chain_id_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" ) func TestCosmosToEthChainID(t *testing.T) { @@ -51,7 +51,7 @@ func TestCosmosToEthChainID(t *testing.T) { for _, tc := range testCases { tc := tc t.Run(tc.name, func(t *testing.T) { - ethChainID, err := common.CosmosToEthChainID(tc.chainID) + ethChainID, err := pkg.CosmosToEthChainID(tc.chainID) if tc.isErr { require.Error(t, err) } else { diff --git a/pkg/coin_test.go b/pkg/coin_test.go index b5d809bdcd..52131e01c3 100644 --- a/pkg/coin_test.go +++ b/pkg/coin_test.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" ) func Test_GetAzetaDecFromAmountInZeta(t *testing.T) { @@ -54,7 +54,7 @@ func Test_GetAzetaDecFromAmountInZeta(t *testing.T) { } for _, tc := range tt { t.Run(tc.name, func(t *testing.T) { - azeta, err := common.GetAzetaDecFromAmountInZeta(tc.zetaAmount) + azeta, err := pkg.GetAzetaDecFromAmountInZeta(tc.zetaAmount) tc.err(t, err) if err == nil { require.Equal(t, tc.azetaAmount, azeta) @@ -68,56 +68,56 @@ func TestGetCoinType(t *testing.T) { tests := []struct { name string coin string - want common.CoinType + want pkg.CoinType wantErr bool }{ { name: "valid coin type 0", coin: "0", - want: common.CoinType(0), + want: pkg.CoinType(0), wantErr: false, }, { name: "valid coin type 1", coin: "1", - want: common.CoinType(1), + want: pkg.CoinType(1), wantErr: false, }, { name: "valid coin type 2", coin: "2", - want: common.CoinType(2), + want: pkg.CoinType(2), wantErr: false, }, { name: "valid coin type 3", coin: "3", - want: common.CoinType(3), + want: pkg.CoinType(3), wantErr: false, }, { name: "invalid coin type negative", coin: "-1", - want: common.CoinType_Cmd, + want: pkg.CoinType_Cmd, wantErr: true, }, { name: "invalid coin type large number", coin: "4", - want: common.CoinType_Cmd, + want: pkg.CoinType_Cmd, wantErr: true, }, { name: "invalid coin type non-integer", coin: "abc", - want: common.CoinType_Cmd, + want: pkg.CoinType_Cmd, wantErr: true, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got, err := common.GetCoinType(tt.coin) + got, err := pkg.GetCoinType(tt.coin) if tt.wantErr { require.Error(t, err) } else { diff --git a/pkg/ethereum/proof_test.go b/pkg/ethereum/proof_test.go index da0a60e463..1fc3dc1c51 100644 --- a/pkg/ethereum/proof_test.go +++ b/pkg/ethereum/proof_test.go @@ -5,7 +5,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common/testdata" + "github.com/zeta-chain/zetacore/pkg/testdata" ) func TestProofGeneration(t *testing.T) { diff --git a/pkg/headers.go b/pkg/headers.go index a4df53ca4f..f618a70678 100644 --- a/pkg/headers.go +++ b/pkg/headers.go @@ -13,7 +13,7 @@ import ( "github.com/btcsuite/btcutil" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rlp" - "github.com/zeta-chain/zetacore/common/bitcoin" + "github.com/zeta-chain/zetacore/pkg/bitcoin" ) // NewEthereumHeader returns a new HeaderData containing an Ethereum header diff --git a/pkg/headers_test.go b/pkg/headers_test.go index 4e4101f5c1..ad9d9d1c73 100644 --- a/pkg/headers_test.go +++ b/pkg/headers_test.go @@ -18,8 +18,8 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethclient" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" - "github.com/zeta-chain/zetacore/common/testdata" + "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/testdata" ) const numHeadersToTest = 100 @@ -48,7 +48,7 @@ func TestTrueEthereumHeader(t *testing.T) { err = header.EncodeRLP(&buffer) require.NoError(t, err) - headerData := common.NewEthereumHeader(buffer.Bytes()) + headerData := pkg.NewEthereumHeader(buffer.Bytes()) err = headerData.Validate(header.Hash().Bytes(), 1, 18495266) require.NoError(t, err) @@ -78,7 +78,7 @@ func TestFalseEthereumHeader(t *testing.T) { err = header.EncodeRLP(&buffer) require.NoError(t, err) - headerData := common.NewEthereumHeader(buffer.Bytes()) + headerData := pkg.NewEthereumHeader(buffer.Bytes()) err = headerData.Validate(hash.Bytes(), 1, 18495267) require.Error(t, err) } @@ -112,7 +112,7 @@ func TestFakeBitcoinHeader(t *testing.T) { } func TestNonExistentHeaderType(t *testing.T) { - headerData := common.HeaderData{} + headerData := pkg.HeaderData{} err := headerData.Validate([]byte{}, 18332, 0) require.EqualError(t, err, "unrecognized header type") @@ -196,7 +196,7 @@ func unmarshalHeader(t *testing.T, headerBytes []byte) *wire.BlockHeader { func validateTrueBitcoinHeader(t *testing.T, header *wire.BlockHeader, headerBytes []byte) { blockHash := header.BlockHash() - headerData := common.NewBitcoinHeader(headerBytes) + headerData := pkg.NewBitcoinHeader(headerBytes) // True Bitcoin header should pass validation err := headerData.Validate(blockHash[:], 18332, 0) require.NoError(t, err) @@ -214,7 +214,7 @@ func validateFakeBitcoinHeader(t *testing.T, header *wire.BlockHeader, headerByt blockHash := header.BlockHash() // Incorrect header length should fail validation - err := common.ValidateBitcoinHeader(headerBytes[:79], blockHash[:], 18332) + err := pkg.ValidateBitcoinHeader(headerBytes[:79], blockHash[:], 18332) require.Error(t, err) // Incorrect version should fail validation @@ -222,7 +222,7 @@ func validateFakeBitcoinHeader(t *testing.T, header *wire.BlockHeader, headerByt fakeHeader.Version = 0 fakeBytes := marshalHeader(t, fakeHeader) fakeHash := fakeHeader.BlockHash() - err = common.ValidateBitcoinHeader(fakeBytes, fakeHash[:], 18332) + err = pkg.ValidateBitcoinHeader(fakeBytes, fakeHash[:], 18332) require.Error(t, err) // Incorrect timestamp should fail validation @@ -231,24 +231,24 @@ func validateFakeBitcoinHeader(t *testing.T, header *wire.BlockHeader, headerByt fakeHeader.Timestamp = chaincfg.TestNet3Params.GenesisBlock.Header.Timestamp.Add(-time.Second) fakeBytes = marshalHeader(t, fakeHeader) fakeHash = fakeHeader.BlockHash() - err = common.ValidateBitcoinHeader(fakeBytes, fakeHash[:], 18332) + err = pkg.ValidateBitcoinHeader(fakeBytes, fakeHash[:], 18332) require.Error(t, err) // Case2: timestamp is after 2 hours in the future fakeHeader = copyHeader(header) fakeHeader.Timestamp = header.Timestamp.Add(time.Second * (blockchain.MaxTimeOffsetSeconds + 1)) fakeBytes = marshalHeader(t, fakeHeader) - err = common.NewBitcoinHeader(fakeBytes).ValidateTimestamp(header.Timestamp) + err = pkg.NewBitcoinHeader(fakeBytes).ValidateTimestamp(header.Timestamp) require.Error(t, err) // Incorrect block hash should fail validation fakeHeader = copyHeader(header) header.Nonce = 0 fakeBytes = marshalHeader(t, header) - err = common.ValidateBitcoinHeader(fakeBytes, blockHash[:], 18332) + err = pkg.ValidateBitcoinHeader(fakeBytes, blockHash[:], 18332) require.Error(t, err) // PoW not satisfied should fail validation fakeHash = fakeHeader.BlockHash() - err = common.ValidateBitcoinHeader(fakeBytes, fakeHash[:], 18332) + err = pkg.ValidateBitcoinHeader(fakeBytes, fakeHash[:], 18332) require.Error(t, err) } diff --git a/rpc/namespaces/ethereum/web3/api.go b/rpc/namespaces/ethereum/web3/api.go index 46e09d9637..07ecc755e6 100644 --- a/rpc/namespaces/ethereum/web3/api.go +++ b/rpc/namespaces/ethereum/web3/api.go @@ -21,7 +21,7 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/crypto" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" ) // PublicAPI is the web3_ prefixed set of APIs in the Web3 JSON-RPC spec. @@ -34,7 +34,7 @@ func NewPublicAPI() *PublicAPI { // ClientVersion returns the client version in the Web3 user agent format. func (a *PublicAPI) ClientVersion() string { - return fmt.Sprintf("%s/%s/%s/%s", common.Name, common.Version, runtime.GOOS+"-"+runtime.GOARCH, runtime.Version()) + return fmt.Sprintf("%s/%s/%s/%s", pkg.Name, pkg.Version, runtime.GOOS+"-"+runtime.GOARCH, runtime.Version()) } // Sha3 returns the keccak-256 hash of the passed-in input. diff --git a/testutil/network/genesis_state.go b/testutil/network/genesis_state.go index c1a1d2f311..202fb00c2a 100644 --- a/testutil/network/genesis_state.go +++ b/testutil/network/genesis_state.go @@ -14,7 +14,7 @@ import ( evmtypes "github.com/evmos/ethermint/x/evm/types" "github.com/stretchr/testify/require" cmdcfg "github.com/zeta-chain/zetacore/cmd/zetacored/config" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/testutil/nullify" "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" @@ -61,8 +61,8 @@ func SetupZetaGenesisState(t *testing.T, genesisState map[string]json.RawMessage } if setupChainNonces { - chainNonceList := make([]observertypes.ChainNonces, len(common.PrivnetChainList())) - for i, chain := range common.PrivnetChainList() { + chainNonceList := make([]observertypes.ChainNonces, len(pkg.PrivnetChainList())) + for i, chain := range pkg.PrivnetChainList() { chainNonceList[i] = observertypes.ChainNonces{ Index: chain.ChainName.String(), ChainId: chain.ChainId, @@ -139,8 +139,8 @@ func AddObserverData(t *testing.T, n int, genesisState map[string]json.RawMessag FinalizedZetaHeight: 1, KeyGenZetaHeight: 1, } - pendingNonces := make([]observertypes.PendingNonces, len(common.DefaultChainsList())) - for i, chain := range common.DefaultChainsList() { + pendingNonces := make([]observertypes.PendingNonces, len(pkg.DefaultChainsList())) + for i, chain := range pkg.DefaultChainsList() { pendingNonces[i] = observertypes.PendingNonces{ ChainId: chain.ChainId, NonceLow: 0, @@ -205,7 +205,7 @@ func AddCrosschainData(t *testing.T, n int, genesisState map[string]json.RawMess inTxTracker := types.InTxTracker{ ChainId: 5, TxHash: fmt.Sprintf("txHash-%d", i), - CoinType: common.CoinType_Gas, + CoinType: pkg.CoinType_Gas, } nullify.Fill(&inTxTracker) state.InTxTrackerList = append(state.InTxTrackerList, inTxTracker) diff --git a/testutil/sample/common.go b/testutil/sample/common.go index 86eef50a71..0ef7411d15 100644 --- a/testutil/sample/common.go +++ b/testutil/sample/common.go @@ -3,22 +3,22 @@ package sample import ( "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "github.com/tendermint/tendermint/crypto/secp256k1" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" ) -func Chain(chainID int64) *common.Chain { +func Chain(chainID int64) *pkg.Chain { r := newRandFromSeed(chainID) - return &common.Chain{ - ChainName: common.ChainName(r.Intn(4)), + return &pkg.Chain{ + ChainName: pkg.ChainName(r.Intn(4)), ChainId: chainID, } } -func PubKeySet() *common.PubKeySet { - pubKeySet := common.PubKeySet{ - Secp256k1: common.PubKey(secp256k1.GenPrivKey().PubKey().Bytes()), - Ed25519: common.PubKey(ed25519.GenPrivKey().PubKey().String()), +func PubKeySet() *pkg.PubKeySet { + pubKeySet := pkg.PubKeySet{ + Secp256k1: pkg.PubKey(secp256k1.GenPrivKey().PubKey().Bytes()), + Ed25519: pkg.PubKey(ed25519.GenPrivKey().PubKey().String()), } return &pubKeySet } diff --git a/testutil/sample/crosschain.go b/testutil/sample/crosschain.go index 2e8c98fda6..eaa015fd90 100644 --- a/testutil/sample/crosschain.go +++ b/testutil/sample/crosschain.go @@ -9,7 +9,7 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" ) @@ -42,7 +42,7 @@ func InboundTxParams(r *rand.Rand) *types.InboundTxParams { Sender: EthAddress().String(), SenderChainId: r.Int63(), TxOrigin: EthAddress().String(), - CoinType: common.CoinType(r.Intn(100)), + CoinType: pkg.CoinType(r.Intn(100)), Asset: StringRandom(r, 32), Amount: math.NewUint(uint64(r.Int63())), InboundTxObservedHash: StringRandom(r, 32), @@ -56,7 +56,7 @@ func OutboundTxParams(r *rand.Rand) *types.OutboundTxParams { return &types.OutboundTxParams{ Receiver: EthAddress().String(), ReceiverChainId: r.Int63(), - CoinType: common.CoinType(r.Intn(100)), + CoinType: pkg.CoinType(r.Intn(100)), Amount: math.NewUint(uint64(r.Int63())), OutboundTxTssNonce: r.Uint64(), OutboundTxGasLimit: r.Uint64(), @@ -125,7 +125,7 @@ func ZetaAccounting(t *testing.T, index string) types.ZetaAccounting { } } -func InboundVote(coinType common.CoinType, from, to int64) types.MsgVoteOnObservedInboundTx { +func InboundVote(coinType pkg.CoinType, from, to int64) types.MsgVoteOnObservedInboundTx { return types.MsgVoteOnObservedInboundTx{ Creator: "", Sender: EthAddress().String(), diff --git a/testutil/sample/fungible.go b/testutil/sample/fungible.go index 0310870046..dd130bf1c2 100644 --- a/testutil/sample/fungible.go +++ b/testutil/sample/fungible.go @@ -3,7 +3,7 @@ package sample import ( "testing" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/fungible/types" ) @@ -17,7 +17,7 @@ func ForeignCoins(t *testing.T, address string) types.ForeignCoins { Decimals: uint32(r.Uint64()), Name: StringRandom(r, 32), Symbol: StringRandom(r, 32), - CoinType: common.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, GasLimit: r.Uint64(), } } diff --git a/testutil/sample/observer.go b/testutil/sample/observer.go index 7aba8ad565..317d24193a 100644 --- a/testutil/sample/observer.go +++ b/testutil/sample/observer.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/crypto" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/pkg/cosmos" "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -111,7 +111,7 @@ func ChainParamsSupported(chainID int64) *types.ChainParams { } func ChainParamsList() (cpl types.ChainParamsList) { - chainList := common.PrivnetChainList() + chainList := pkg.PrivnetChainList() for _, chain := range chainList { cpl.ChainParams = append(cpl.ChainParams, ChainParams(chain.ChainId)) @@ -125,7 +125,7 @@ func Tss() types.TSS { if err != nil { panic(err) } - pk, err := common.NewPubKey(spk) + pk, err := pkg.NewPubKey(spk) if err != nil { panic(err) } diff --git a/x/crosschain/client/cli/cli_cctx.go b/x/crosschain/client/cli/cli_cctx.go index e85712f50e..66d7a9a828 100644 --- a/x/crosschain/client/cli/cli_cctx.go +++ b/x/crosschain/client/cli/cli_cctx.go @@ -12,7 +12,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" "github.com/spf13/cobra" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" ) @@ -148,11 +148,11 @@ func CmdCCTXInboundVoter() *cobra.Command { return err } - coinType, ok := common.CoinType_value[args[9]] + coinType, ok := pkg.CoinType_value[args[9]] if !ok { return fmt.Errorf("wrong coin type %s", args[9]) } - argsCoinType := common.CoinType(coinType) + argsCoinType := pkg.CoinType(coinType) argsAsset := args[10] @@ -224,11 +224,11 @@ func CmdCCTXOutboundVoter() *cobra.Command { argsMMint := args[6] - var status common.ReceiveStatus + var status pkg.ReceiveStatus if args[7] == "0" { - status = common.ReceiveStatus_Success + status = pkg.ReceiveStatus_Success } else if args[7] == "1" { - status = common.ReceiveStatus_Failed + status = pkg.ReceiveStatus_Failed } else { return fmt.Errorf("wrong status") } @@ -243,11 +243,11 @@ func CmdCCTXOutboundVoter() *cobra.Command { return err } - coinType, ok := common.CoinType_value[args[10]] + coinType, ok := pkg.CoinType_value[args[10]] if !ok { return fmt.Errorf("wrong coin type %s", args[10]) } - argsCoinType := common.CoinType(coinType) + argsCoinType := pkg.CoinType(coinType) clientCtx, err := client.GetClientTxContext(cmd) if err != nil { diff --git a/x/crosschain/client/cli/cli_in_tx_tracker.go b/x/crosschain/client/cli/cli_in_tx_tracker.go index 6a3f4bd1c0..730e075711 100644 --- a/x/crosschain/client/cli/cli_in_tx_tracker.go +++ b/x/crosschain/client/cli/cli_in_tx_tracker.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" "github.com/spf13/cobra" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" ) @@ -24,7 +24,7 @@ func CmdAddToInTxTracker() *cobra.Command { return err } argTxHash := args[1] - argsCoinType, err := common.GetCoinType(args[2]) + argsCoinType, err := pkg.GetCoinType(args[2]) if err != nil { return err } diff --git a/x/crosschain/client/cli/cli_tss.go b/x/crosschain/client/cli/cli_tss.go index f3055bbe81..298fb01294 100644 --- a/x/crosschain/client/cli/cli_tss.go +++ b/x/crosschain/client/cli/cli_tss.go @@ -10,7 +10,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/tx" "github.com/spf13/cast" "github.com/spf13/cobra" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" ) @@ -29,11 +29,11 @@ func CmdCreateTSSVoter() *cobra.Command { if err != nil { return err } - var status common.ReceiveStatus + var status pkg.ReceiveStatus if args[2] == "0" { - status = common.ReceiveStatus_Success + status = pkg.ReceiveStatus_Success } else if args[2] == "1" { - status = common.ReceiveStatus_Failed + status = pkg.ReceiveStatus_Failed } else { return fmt.Errorf("wrong status") } diff --git a/x/crosschain/client/integrationtests/cli_helpers.go b/x/crosschain/client/integrationtests/cli_helpers.go index 3195782031..a0b57d0bf1 100644 --- a/x/crosschain/client/integrationtests/cli_helpers.go +++ b/x/crosschain/client/integrationtests/cli_helpers.go @@ -17,7 +17,7 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/stretchr/testify/require" tmcli "github.com/tendermint/tendermint/libs/cli" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/testutil/network" "github.com/zeta-chain/zetacore/x/crosschain/client/cli" "github.com/zeta-chain/zetacore/x/crosschain/types" @@ -137,11 +137,11 @@ func BuildSignedDeployETHZRC20( } args := append([]string{ "", - strconv.FormatInt(common.GoerliLocalnetChain().ChainId, 10), + strconv.FormatInt(pkg.GoerliLocalnetChain().ChainId, 10), "18", "ETH", "gETH", - strconv.FormatInt(int64(common.CoinType_Gas), 10), + strconv.FormatInt(int64(pkg.CoinType_Gas), 10), "1000000", }, txArgs...) out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, args) @@ -156,7 +156,7 @@ func BuildSignedDeployETHZRC20( func BuildSignedGasPriceVote(t testing.TB, val *network.Validator, denom string, account authtypes.AccountI) *os.File { cmd := cli.CmdGasPriceVoter() inboundVoterArgs := []string{ - strconv.FormatInt(common.GoerliLocalnetChain().ChainId, 10), + strconv.FormatInt(pkg.GoerliLocalnetChain().ChainId, 10), "10000000000", "100", "100", @@ -225,7 +225,7 @@ func BuildSignedOutboundVote( "0", valueReceived, status, - strconv.FormatInt(common.GoerliLocalnetChain().ChainId, 10), + strconv.FormatInt(pkg.GoerliLocalnetChain().ChainId, 10), strconv.FormatUint(nonce, 10), "Zeta", } @@ -252,10 +252,10 @@ func BuildSignedInboundVote(t testing.TB, val *network.Validator, denom string, cmd := cli.CmdCCTXInboundVoter() inboundVoterArgs := []string{ "0x96B05C238b99768F349135de0653b687f9c13fEE", - strconv.FormatInt(common.GoerliLocalnetChain().ChainId, 10), + strconv.FormatInt(pkg.GoerliLocalnetChain().ChainId, 10), "0x3b9Fe88DE29efD13240829A0c18E9EC7A44C3CA7", "0x96B05C238b99768F349135de0653b687f9c13fEE", - strconv.FormatInt(common.GoerliLocalnetChain().ChainId, 10), + strconv.FormatInt(pkg.GoerliLocalnetChain().ChainId, 10), "10000000000000000000", message, "0x19398991572a825894b34b904ac1e3692720895351466b5c9e6bb7ae1e21d680", @@ -286,16 +286,16 @@ func GetBallotIdentifier(message string, eventIndex int) string { msg := types.NewMsgVoteOnObservedInboundTx( "", "0x96B05C238b99768F349135de0653b687f9c13fEE", - common.GoerliLocalnetChain().ChainId, + pkg.GoerliLocalnetChain().ChainId, "0x3b9Fe88DE29efD13240829A0c18E9EC7A44C3CA7", "0x96B05C238b99768F349135de0653b687f9c13fEE", - common.GoerliLocalnetChain().ChainId, + pkg.GoerliLocalnetChain().ChainId, sdk.NewUint(10000000000000000000), message, "0x19398991572a825894b34b904ac1e3692720895351466b5c9e6bb7ae1e21d680", 100, 250_000, - common.CoinType_Zeta, + pkg.CoinType_Zeta, "", // #nosec G701 always positive uint(eventIndex), @@ -314,9 +314,9 @@ func GetBallotIdentifierOutBound(nonce uint64, cctxindex, outtxHash, valueReceiv 0, math.NewUintFromString(valueReceived), 0, - common.GoerliLocalnetChain().ChainId, + pkg.GoerliLocalnetChain().ChainId, nonce, - common.CoinType_Zeta, + pkg.CoinType_Zeta, ) return msg.Digest() } diff --git a/x/crosschain/keeper/abci.go b/x/crosschain/keeper/abci.go index dac6bcacc3..cf4cee6a24 100644 --- a/x/crosschain/keeper/abci.go +++ b/x/crosschain/keeper/abci.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" cosmoserrors "cosmossdk.io/errors" "cosmossdk.io/math" @@ -30,7 +30,7 @@ type CheckAndUpdateCctxGasPriceFunc func( // The function returns the number of cctxs updated and the gas price increase flags used func (k Keeper) IterateAndUpdateCctxGasPrice( ctx sdk.Context, - chains []*common.Chain, + chains []*pkg.Chain, updateFunc CheckAndUpdateCctxGasPriceFunc, ) (int, observertypes.GasPriceIncreaseFlags) { // fetch the gas price increase flags or use default @@ -50,7 +50,7 @@ func (k Keeper) IterateAndUpdateCctxGasPrice( IterateChains: for _, chain := range chains { // support only external evm chains - if common.IsEVMChain(chain.ChainId) && !common.IsZetaChain(chain.ChainId) { + if pkg.IsEVMChain(chain.ChainId) && !pkg.IsZetaChain(chain.ChainId) { res, err := k.CctxListPending(sdk.UnwrapSDKContext(ctx), &types.QueryListCctxPendingRequest{ ChainId: chain.ChainId, Limit: gasPriceIncreaseFlags.MaxPendingCctxs, diff --git a/x/crosschain/keeper/abci_test.go b/x/crosschain/keeper/abci_test.go index 4487d7dcec..0160d45e87 100644 --- a/x/crosschain/keeper/abci_test.go +++ b/x/crosschain/keeper/abci_test.go @@ -9,7 +9,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" testkeeper "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/crosschain/keeper" @@ -42,20 +42,20 @@ func TestKeeper_IterateAndUpdateCctxGasPrice(t *testing.T) { } // add some evm and non-evm chains - supportedChains := []*common.Chain{ - {ChainId: common.EthChain().ChainId}, - {ChainId: common.BtcMainnetChain().ChainId}, - {ChainId: common.BscMainnetChain().ChainId}, - {ChainId: common.ZetaChainMainnet().ChainId}, + supportedChains := []*pkg.Chain{ + {ChainId: pkg.EthChain().ChainId}, + {ChainId: pkg.BtcMainnetChain().ChainId}, + {ChainId: pkg.BscMainnetChain().ChainId}, + {ChainId: pkg.ZetaChainMainnet().ChainId}, } // set pending cctx tss := sample.Tss() zk.ObserverKeeper.SetTSS(ctx, tss) - createCctxWithNonceRange(t, ctx, *k, 10, 15, common.EthChain().ChainId, tss, zk) - createCctxWithNonceRange(t, ctx, *k, 20, 25, common.BtcMainnetChain().ChainId, tss, zk) - createCctxWithNonceRange(t, ctx, *k, 30, 35, common.BscMainnetChain().ChainId, tss, zk) - createCctxWithNonceRange(t, ctx, *k, 40, 45, common.ZetaChainMainnet().ChainId, tss, zk) + createCctxWithNonceRange(t, ctx, *k, 10, 15, pkg.EthChain().ChainId, tss, zk) + createCctxWithNonceRange(t, ctx, *k, 20, 25, pkg.BtcMainnetChain().ChainId, tss, zk) + createCctxWithNonceRange(t, ctx, *k, 30, 35, pkg.BscMainnetChain().ChainId, tss, zk) + createCctxWithNonceRange(t, ctx, *k, 40, 45, pkg.ZetaChainMainnet().ChainId, tss, zk) // set a cctx where the update function should fail to test that the next cctx are not updated but the next chains are failMap[sample.GetCctxIndexFromString("1-12")] = struct{}{} diff --git a/x/crosschain/keeper/cctx.go b/x/crosschain/keeper/cctx.go index d6fb9b117b..7ff21a32f5 100644 --- a/x/crosschain/keeper/cctx.go +++ b/x/crosschain/keeper/cctx.go @@ -6,7 +6,7 @@ import ( "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" observerTypes "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -48,7 +48,7 @@ func (k Keeper) SetCctxAndNonceToCctxAndInTxHashToCctx(ctx sdk.Context, cctx typ Tss: tss.TssPubkey, }) } - if cctx.CctxStatus.Status == types.CctxStatus_Aborted && cctx.GetCurrentOutTxParam().CoinType == common.CoinType_Zeta { + if cctx.CctxStatus.Status == types.CctxStatus_Aborted && cctx.GetCurrentOutTxParam().CoinType == pkg.CoinType_Zeta { k.AddZetaAbortedAmount(ctx, GetAbortedAmount(cctx)) } } diff --git a/x/crosschain/keeper/cctx_test.go b/x/crosschain/keeper/cctx_test.go index 6732ed6795..91e9e6cdee 100644 --- a/x/crosschain/keeper/cctx_test.go +++ b/x/crosschain/keeper/cctx_test.go @@ -15,7 +15,7 @@ import ( "google.golang.org/grpc/status" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" ) @@ -48,7 +48,7 @@ func createNCctx(keeper *keeper.Keeper, ctx sdk.Context, n int) []types.CrossCha SenderChainId: int64(i), TxOrigin: fmt.Sprintf("%d", i), Asset: fmt.Sprintf("%d", i), - CoinType: common.CoinType_Zeta, + CoinType: pkg.CoinType_Zeta, InboundTxObservedHash: fmt.Sprintf("%d", i), InboundTxObservedExternalHeight: uint64(i), InboundTxFinalizedZetaHeight: uint64(i), diff --git a/x/crosschain/keeper/cctx_utils.go b/x/crosschain/keeper/cctx_utils.go index 8c2edd5013..e313bf528a 100644 --- a/x/crosschain/keeper/cctx_utils.go +++ b/x/crosschain/keeper/cctx_utils.go @@ -9,7 +9,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ethcommon "github.com/ethereum/go-ethereum/common" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" fungibletypes "github.com/zeta-chain/zetacore/x/fungible/types" zetaObserverTypes "github.com/zeta-chain/zetacore/x/observer/types" @@ -59,7 +59,7 @@ func (k Keeper) GetRevertGasLimit(ctx sdk.Context, cctx types.CrossChainTx) (uin return 0, nil } - if cctx.InboundTxParams.CoinType == common.CoinType_Gas { + if cctx.InboundTxParams.CoinType == pkg.CoinType_Gas { // get the gas limit of the gas token fc, found := k.fungibleKeeper.GetGasCoinForForeignCoin(ctx, cctx.InboundTxParams.SenderChainId) if !found { @@ -70,7 +70,7 @@ func (k Keeper) GetRevertGasLimit(ctx sdk.Context, cctx types.CrossChainTx) (uin return 0, errors.Wrap(fungibletypes.ErrContractCall, err.Error()) } return gasLimit.Uint64(), nil - } else if cctx.InboundTxParams.CoinType == common.CoinType_ERC20 { + } else if cctx.InboundTxParams.CoinType == pkg.CoinType_ERC20 { // get the gas limit of the associated asset fc, found := k.fungibleKeeper.GetForeignCoinFromAsset(ctx, cctx.InboundTxParams.Asset, cctx.InboundTxParams.SenderChainId) if !found { diff --git a/x/crosschain/keeper/cctx_utils_test.go b/x/crosschain/keeper/cctx_utils_test.go index 319ef35a54..5a915836f3 100644 --- a/x/crosschain/keeper/cctx_utils_test.go +++ b/x/crosschain/keeper/cctx_utils_test.go @@ -6,7 +6,7 @@ import ( sdkmath "cosmossdk.io/math" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" crosschainkeeper "github.com/zeta-chain/zetacore/x/crosschain/keeper" @@ -28,7 +28,7 @@ func TestGetRevertGasLimit(t *testing.T) { gasLimit, err := k.GetRevertGasLimit(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: common.CoinType_Zeta, + CoinType: pkg.CoinType_Zeta, }}) require.NoError(t, err) require.Equal(t, uint64(0), gasLimit) @@ -47,7 +47,7 @@ func TestGetRevertGasLimit(t *testing.T) { gasLimit, err := k.GetRevertGasLimit(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: common.CoinType_Gas, + CoinType: pkg.CoinType_Gas, SenderChainId: chainID, }}) require.NoError(t, err) @@ -77,7 +77,7 @@ func TestGetRevertGasLimit(t *testing.T) { gasLimit, err := k.GetRevertGasLimit(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: common.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, SenderChainId: chainID, Asset: asset, }}) @@ -90,7 +90,7 @@ func TestGetRevertGasLimit(t *testing.T) { _, err := k.GetRevertGasLimit(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: common.CoinType_Gas, + CoinType: pkg.CoinType_Gas, SenderChainId: 999999, }}) require.ErrorIs(t, err, types.ErrForeignCoinNotFound) @@ -105,13 +105,13 @@ func TestGetRevertGasLimit(t *testing.T) { zk.FungibleKeeper.SetForeignCoins(ctx, fungibletypes.ForeignCoins{ Zrc20ContractAddress: sample.EthAddress().String(), ForeignChainId: chainID, - CoinType: common.CoinType_Gas, + CoinType: pkg.CoinType_Gas, }) // no contract deployed therefore will fail _, err := k.GetRevertGasLimit(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: common.CoinType_Gas, + CoinType: pkg.CoinType_Gas, SenderChainId: chainID, }}) require.ErrorIs(t, err, fungibletypes.ErrContractCall) @@ -122,7 +122,7 @@ func TestGetRevertGasLimit(t *testing.T) { _, err := k.GetRevertGasLimit(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: common.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, SenderChainId: 999999, }}) require.ErrorIs(t, err, types.ErrForeignCoinNotFound) @@ -138,14 +138,14 @@ func TestGetRevertGasLimit(t *testing.T) { zk.FungibleKeeper.SetForeignCoins(ctx, fungibletypes.ForeignCoins{ Zrc20ContractAddress: sample.EthAddress().String(), ForeignChainId: chainID, - CoinType: common.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, Asset: asset, }) // no contract deployed therefore will fail _, err := k.GetRevertGasLimit(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: common.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, SenderChainId: chainID, Asset: asset, }}) diff --git a/x/crosschain/keeper/events.go b/x/crosschain/keeper/events.go index 2f6a88908c..2008fc5413 100644 --- a/x/crosschain/keeper/events.go +++ b/x/crosschain/keeper/events.go @@ -3,7 +3,7 @@ package keeper import ( "strconv" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/zeta-chain/zetacore/x/crosschain/types" @@ -15,13 +15,13 @@ func EmitEventInboundFinalized(ctx sdk.Context, cctx *types.CrossChainTx) { MsgTypeUrl: sdk.MsgTypeURL(&types.MsgVoteOnObservedInboundTx{}), CctxIndex: cctx.Index, Sender: cctx.InboundTxParams.Sender, - SenderChain: common.GetChainFromChainID(cctx.InboundTxParams.SenderChainId).ChainName.String(), + SenderChain: pkg.GetChainFromChainID(cctx.InboundTxParams.SenderChainId).ChainName.String(), TxOrgin: cctx.InboundTxParams.TxOrigin, Asset: cctx.InboundTxParams.Asset, InTxHash: cctx.InboundTxParams.InboundTxObservedHash, InBlockHeight: strconv.FormatUint(cctx.InboundTxParams.InboundTxObservedExternalHeight, 10), Receiver: currentOutParam.Receiver, - ReceiverChain: common.GetChainFromChainID(currentOutParam.ReceiverChainId).ChainName.String(), + ReceiverChain: pkg.GetChainFromChainID(currentOutParam.ReceiverChainId).ChainName.String(), Amount: cctx.InboundTxParams.Amount.String(), RelayedMessage: cctx.RelayedMessage, NewStatus: cctx.CctxStatus.Status.String(), diff --git a/x/crosschain/keeper/evm_deposit.go b/x/crosschain/keeper/evm_deposit.go index c3392e005e..731485c84a 100644 --- a/x/crosschain/keeper/evm_deposit.go +++ b/x/crosschain/keeper/evm_deposit.go @@ -10,7 +10,7 @@ import ( "github.com/pkg/errors" tmbytes "github.com/tendermint/tendermint/libs/bytes" tmtypes "github.com/tendermint/tendermint/types" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" fungibletypes "github.com/zeta-chain/zetacore/x/fungible/types" ) @@ -35,7 +35,7 @@ func (k Keeper) HandleEVMDeposit( cctx.GetCurrentOutTxParam().OutboundTxObservedExternalHeight = uint64(ctx.BlockHeight()) } - if msg.CoinType == common.CoinType_Zeta { + if msg.CoinType == pkg.CoinType_Zeta { // if coin type is Zeta, this is a deposit ZETA to zEVM cctx. err := k.fungibleKeeper.DepositCoinZeta(ctx, to, msg.Amount.BigInt()) if err != nil { @@ -43,7 +43,7 @@ func (k Keeper) HandleEVMDeposit( } } else { // cointype is Gas or ERC20; then it could be a ZRC20 deposit/depositAndCall cctx. - parsedAddress, data, err := common.ParseAddressAndData(msg.Message) + parsedAddress, data, err := pkg.ParseAddressAndData(msg.Message) if err != nil { return false, errors.Wrap(types.ErrUnableToParseAddress, err.Error()) } @@ -51,7 +51,7 @@ func (k Keeper) HandleEVMDeposit( to = parsedAddress } - from, err := common.DecodeAddressFromChainID(senderChainID, msg.Sender) + from, err := pkg.DecodeAddressFromChainID(senderChainID, msg.Sender) if err != nil { return false, fmt.Errorf("HandleEVMDeposit: unable to decode address: %s", err.Error()) } diff --git a/x/crosschain/keeper/evm_deposit_test.go b/x/crosschain/keeper/evm_deposit_test.go index dd6528e639..fd294a3fd2 100644 --- a/x/crosschain/keeper/evm_deposit_test.go +++ b/x/crosschain/keeper/evm_deposit_test.go @@ -10,7 +10,7 @@ import ( evmtypes "github.com/evmos/ethermint/x/evm/types" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/crosschain/types" @@ -37,7 +37,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { types.MsgVoteOnObservedInboundTx{ Receiver: receiver.String(), Amount: math.NewUintFromBigInt(amount), - CoinType: common.CoinType_Zeta, + CoinType: pkg.CoinType_Zeta, }, 0, ) @@ -66,7 +66,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { types.MsgVoteOnObservedInboundTx{ Receiver: receiver.String(), Amount: math.NewUintFromBigInt(amount), - CoinType: common.CoinType_Zeta, + CoinType: pkg.CoinType_Zeta, }, 0, ) @@ -96,7 +96,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { amount, senderChain, mock.Anything, - common.CoinType_ERC20, + pkg.CoinType_ERC20, mock.Anything, ).Return(&evmtypes.MsgEthereumTxResponse{}, false, nil) @@ -108,7 +108,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { Sender: sample.EthAddress().String(), Receiver: receiver.String(), Amount: math.NewUintFromBigInt(amount), - CoinType: common.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, Message: "", Asset: "", }, @@ -141,7 +141,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { amount, senderChain, mock.Anything, - common.CoinType_ERC20, + pkg.CoinType_ERC20, mock.Anything, ).Return(&evmtypes.MsgEthereumTxResponse{}, false, errDeposit) @@ -153,7 +153,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { Sender: sample.EthAddress().String(), Receiver: receiver.String(), Amount: math.NewUintFromBigInt(amount), - CoinType: common.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, Message: "", Asset: "", }, @@ -186,7 +186,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { amount, senderChain, mock.Anything, - common.CoinType_ERC20, + pkg.CoinType_ERC20, mock.Anything, ).Return(&evmtypes.MsgEthereumTxResponse{VmError: "reverted"}, false, errDeposit) @@ -198,7 +198,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { Sender: sample.EthAddress().String(), Receiver: receiver.String(), Amount: math.NewUintFromBigInt(amount), - CoinType: common.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, Message: "", Asset: "", }, @@ -230,7 +230,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { amount, senderChain, mock.Anything, - common.CoinType_ERC20, + pkg.CoinType_ERC20, mock.Anything, ).Return(&evmtypes.MsgEthereumTxResponse{}, false, fungibletypes.ErrForeignCoinCapReached) @@ -242,7 +242,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { Sender: sample.EthAddress().String(), Receiver: receiver.String(), Amount: math.NewUintFromBigInt(amount), - CoinType: common.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, Message: "", Asset: "", }, @@ -274,7 +274,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { amount, senderChain, mock.Anything, - common.CoinType_ERC20, + pkg.CoinType_ERC20, mock.Anything, ).Return(&evmtypes.MsgEthereumTxResponse{}, false, fungibletypes.ErrPausedZRC20) @@ -286,7 +286,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { Sender: sample.EthAddress().String(), Receiver: receiver.String(), Amount: math.NewUintFromBigInt(amount), - CoinType: common.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, Message: "", Asset: "", }, @@ -316,7 +316,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { amount, senderChain, mock.Anything, - common.CoinType_ERC20, + pkg.CoinType_ERC20, mock.Anything, ).Return(&evmtypes.MsgEthereumTxResponse{}, false, fungibletypes.ErrCallNonContract) @@ -328,7 +328,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { Sender: sample.EthAddress().String(), Receiver: receiver.String(), Amount: math.NewUintFromBigInt(amount), - CoinType: common.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, Message: "", Asset: "", }, @@ -352,7 +352,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { Sender: sample.EthAddress().String(), Receiver: sample.EthAddress().String(), Amount: math.NewUint(42), - CoinType: common.CoinType_Gas, + CoinType: pkg.CoinType_Gas, Message: "not_hex", Asset: "", }, @@ -382,7 +382,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { amount, senderChain, data, - common.CoinType_ERC20, + pkg.CoinType_ERC20, mock.Anything, ).Return(&evmtypes.MsgEthereumTxResponse{}, false, nil) @@ -393,7 +393,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { Sender: sample.EthAddress().String(), Receiver: sample.EthAddress().String(), Amount: math.NewUintFromBigInt(amount), - CoinType: common.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, Message: receiver.Hex()[2:] + "DEADBEEF", Asset: "", }, @@ -425,7 +425,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { amount, senderChain, data, - common.CoinType_ERC20, + pkg.CoinType_ERC20, mock.Anything, ).Return(&evmtypes.MsgEthereumTxResponse{}, false, nil) @@ -436,7 +436,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { Sender: sample.EthAddress().String(), Receiver: receiver.String(), Amount: math.NewUintFromBigInt(amount), - CoinType: common.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, Message: "DEADBEEF", Asset: "", }, diff --git a/x/crosschain/keeper/evm_hooks.go b/x/crosschain/keeper/evm_hooks.go index 9428865463..f2932451ef 100644 --- a/x/crosschain/keeper/evm_hooks.go +++ b/x/crosschain/keeper/evm_hooks.go @@ -17,7 +17,7 @@ import ( connectorzevm "github.com/zeta-chain/protocol-contracts/pkg/contracts/zevm/connectorzevm.sol" zrc20 "github.com/zeta-chain/protocol-contracts/pkg/contracts/zevm/zrc20.sol" "github.com/zeta-chain/zetacore/cmd/zetacored/config" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" fungibletypes "github.com/zeta-chain/zetacore/x/fungible/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" @@ -137,7 +137,7 @@ func (k Keeper) ProcessZRC20WithdrawalEvent(ctx sdk.Context, event *zrc20.ZRC20W if receiverChain == nil { return errorsmod.Wrapf(observertypes.ErrSupportedChains, "chain with chainID %d not supported", foreignCoin.ForeignChainId) } - senderChain, err := common.ZetaChainFromChainID(ctx.ChainID()) + senderChain, err := pkg.ZetaChainFromChainID(ctx.ChainID()) if err != nil { return fmt.Errorf("ProcessZRC20WithdrawalEvent: failed to convert chainID: %s", err.Error()) } @@ -224,7 +224,7 @@ func (k Keeper) ProcessZetaSentEvent(ctx sdk.Context, event *connectorzevm.ZetaC return types.ErrUnableToSendCoinType } toAddr := "0x" + hex.EncodeToString(event.DestinationAddress) - senderChain, err := common.ZetaChainFromChainID(ctx.ChainID()) + senderChain, err := pkg.ZetaChainFromChainID(ctx.ChainID()) if err != nil { return fmt.Errorf("ProcessZetaSentEvent: failed to convert chainID: %s", err.Error()) } @@ -242,7 +242,7 @@ func (k Keeper) ProcessZetaSentEvent(ctx sdk.Context, event *connectorzevm.ZetaC event.Raw.TxHash.String(), event.Raw.BlockNumber, 90000, - common.CoinType_Zeta, + pkg.CoinType_Zeta, "", event.Raw.Index, ) @@ -273,7 +273,7 @@ func (k Keeper) ProcessZetaSentEvent(ctx sdk.Context, event *connectorzevm.ZetaC return k.ProcessCCTX(ctx, cctx, receiverChain) } -func (k Keeper) ProcessCCTX(ctx sdk.Context, cctx types.CrossChainTx, receiverChain *common.Chain) error { +func (k Keeper) ProcessCCTX(ctx sdk.Context, cctx types.CrossChainTx, receiverChain *pkg.Chain) error { inCctxIndex, ok := ctx.Value("inCctxIndex").(string) if ok { cctx.InboundTxParams.InboundTxObservedHash = inCctxIndex @@ -310,11 +310,11 @@ func ParseZRC20WithdrawalEvent(log ethtypes.Log) (*zrc20.ZRC20Withdrawal, error) func ValidateZrc20WithdrawEvent(event *zrc20.ZRC20Withdrawal, chainID int64) error { // The event was parsed; that means the user has deposited tokens to the contract. - if common.IsBitcoinChain(chainID) { + if pkg.IsBitcoinChain(chainID) { if event.Value.Cmp(big.NewInt(0)) <= 0 { return fmt.Errorf("ParseZRC20WithdrawalEvent: invalid amount %s", event.Value.String()) } - addr, err := common.DecodeBtcAddress(string(event.To), chainID) + addr, err := pkg.DecodeBtcAddress(string(event.To), chainID) if err != nil { return fmt.Errorf("ParseZRC20WithdrawalEvent: invalid address %s: %s", event.To, err) } diff --git a/x/crosschain/keeper/evm_hooks_test.go b/x/crosschain/keeper/evm_hooks_test.go index 9dc5377ab2..1c48059861 100644 --- a/x/crosschain/keeper/evm_hooks_test.go +++ b/x/crosschain/keeper/evm_hooks_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" "github.com/zeta-chain/zetacore/cmd/zetacored/config" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" crosschainkeeper "github.com/zeta-chain/zetacore/x/crosschain/keeper" @@ -22,7 +22,7 @@ import ( observertypes "github.com/zeta-chain/zetacore/x/observer/types" ) -func SetupStateForProcessLogsZetaSent(t *testing.T, ctx sdk.Context, k *crosschainkeeper.Keeper, zk keepertest.ZetaKeepers, sdkk keepertest.SDKKeepers, chain common.Chain) { +func SetupStateForProcessLogsZetaSent(t *testing.T, ctx sdk.Context, k *crosschainkeeper.Keeper, zk keepertest.ZetaKeepers, sdkk keepertest.SDKKeepers, chain pkg.Chain) { assetAddress := sample.EthAddress().String() gasZRC20 := setupGasCoin(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper, chain.ChainId, "ethereum", "ETH") zrc20Addr := deployZRC20( @@ -53,7 +53,7 @@ func SetupStateForProcessLogsZetaSent(t *testing.T, ctx sdk.Context, k *crosscha ) } -func SetupStateForProcessLogs(t *testing.T, ctx sdk.Context, k *crosschainkeeper.Keeper, zk keepertest.ZetaKeepers, sdkk keepertest.SDKKeepers, chain common.Chain) { +func SetupStateForProcessLogs(t *testing.T, ctx sdk.Context, k *crosschainkeeper.Keeper, zk keepertest.ZetaKeepers, sdkk keepertest.SDKKeepers, chain pkg.Chain) { deploySystemContracts(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper) tss := sample.Tss() @@ -134,7 +134,7 @@ func TestValidateZrc20WithdrawEvent(t *testing.T) { t.Run("successfully validate a valid event", func(t *testing.T) { btcMainNetWithdrawalEvent, err := crosschainkeeper.ParseZRC20WithdrawalEvent(*sample.GetValidZRC20WithdrawToBTC(t).Logs[3]) require.NoError(t, err) - err = crosschainkeeper.ValidateZrc20WithdrawEvent(btcMainNetWithdrawalEvent, common.BtcMainnetChain().ChainId) + err = crosschainkeeper.ValidateZrc20WithdrawEvent(btcMainNetWithdrawalEvent, pkg.BtcMainnetChain().ChainId) require.NoError(t, err) }) @@ -142,14 +142,14 @@ func TestValidateZrc20WithdrawEvent(t *testing.T) { btcMainNetWithdrawalEvent, err := crosschainkeeper.ParseZRC20WithdrawalEvent(*sample.GetValidZRC20WithdrawToBTC(t).Logs[3]) require.NoError(t, err) btcMainNetWithdrawalEvent.Value = big.NewInt(0) - err = crosschainkeeper.ValidateZrc20WithdrawEvent(btcMainNetWithdrawalEvent, common.BtcMainnetChain().ChainId) + err = crosschainkeeper.ValidateZrc20WithdrawEvent(btcMainNetWithdrawalEvent, pkg.BtcMainnetChain().ChainId) require.ErrorContains(t, err, "ParseZRC20WithdrawalEvent: invalid amount") }) t.Run("unable to validate a event with an invalid chain ID", func(t *testing.T) { btcMainNetWithdrawalEvent, err := crosschainkeeper.ParseZRC20WithdrawalEvent(*sample.GetValidZRC20WithdrawToBTC(t).Logs[3]) require.NoError(t, err) - err = crosschainkeeper.ValidateZrc20WithdrawEvent(btcMainNetWithdrawalEvent, common.BtcTestNetChain().ChainId) + err = crosschainkeeper.ValidateZrc20WithdrawEvent(btcMainNetWithdrawalEvent, pkg.BtcTestNetChain().ChainId) require.ErrorContains(t, err, "address is not for network testnet3") }) @@ -157,7 +157,7 @@ func TestValidateZrc20WithdrawEvent(t *testing.T) { btcMainNetWithdrawalEvent, err := crosschainkeeper.ParseZRC20WithdrawalEvent(*sample.GetValidZRC20WithdrawToBTC(t).Logs[3]) require.NoError(t, err) btcMainNetWithdrawalEvent.To = []byte("1EYVvXLusCxtVuEwoYvWRyN5EZTXwPVvo3") - err = crosschainkeeper.ValidateZrc20WithdrawEvent(btcMainNetWithdrawalEvent, common.BtcTestNetChain().ChainId) + err = crosschainkeeper.ValidateZrc20WithdrawEvent(btcMainNetWithdrawalEvent, pkg.BtcTestNetChain().ChainId) require.ErrorContains(t, err, "decode address failed: unknown address type") }) } @@ -167,7 +167,7 @@ func TestKeeper_ProcessZRC20WithdrawalEvent(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := common.BtcMainnetChain() + chain := pkg.BtcMainnetChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -193,7 +193,7 @@ func TestKeeper_ProcessZRC20WithdrawalEvent(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := common.EthChain() + chain := pkg.EthChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -219,7 +219,7 @@ func TestKeeper_ProcessZRC20WithdrawalEvent(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := common.EthChain() + chain := pkg.EthChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -240,7 +240,7 @@ func TestKeeper_ProcessZRC20WithdrawalEvent(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := common.EthChain() + chain := pkg.EthChain() chainID := chain.ChainId SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -261,7 +261,7 @@ func TestKeeper_ProcessZRC20WithdrawalEvent(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := common.EthChain() + chain := pkg.EthChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -284,7 +284,7 @@ func TestKeeper_ProcessZRC20WithdrawalEvent(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := common.EthChain() + chain := pkg.EthChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -310,7 +310,7 @@ func TestKeeper_ProcessZRC20WithdrawalEvent(t *testing.T) { fungibleMock := keepertest.GetCrosschainFungibleMock(t, k) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := common.EthChain() + chain := pkg.EthChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -335,7 +335,7 @@ func TestKeeper_ProcessZRC20WithdrawalEvent(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := common.EthChain() + chain := pkg.EthChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -358,7 +358,7 @@ func TestKeeper_ProcessZRC20WithdrawalEvent(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := common.EthChain() + chain := pkg.EthChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -393,7 +393,7 @@ func TestKeeper_ParseZetaSentEvent(t *testing.T) { require.Nil(t, event) continue } - require.Equal(t, common.EthChain().ChainId, event.DestinationChainId.Int64()) + require.Equal(t, pkg.EthChain().ChainId, event.DestinationChainId.Int64()) require.Equal(t, "70000000000000000000", event.ZetaValueAndGas.String()) require.Equal(t, "0x60983881bdf302dcfa96603A58274D15D5966209", event.SourceTxOriginAddress.String()) require.Equal(t, "0xF0a3F93Ed1B126142E61423F9546bf1323Ff82DF", event.ZetaTxSenderAddress.String()) @@ -430,7 +430,7 @@ func TestKeeper_ProcessZetaSentEvent(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := common.EthChain() + chain := pkg.EthChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) @@ -452,7 +452,7 @@ func TestKeeper_ProcessZetaSentEvent(t *testing.T) { cctxList := k.GetAllCrossChainTx(ctx) require.Len(t, cctxList, 1) require.Equal(t, strings.Compare("0x60983881bdf302dcfa96603a58274d15d5966209", cctxList[0].GetCurrentOutTxParam().Receiver), 0) - require.Equal(t, common.EthChain().ChainId, cctxList[0].GetCurrentOutTxParam().ReceiverChainId) + require.Equal(t, pkg.EthChain().ChainId, cctxList[0].GetCurrentOutTxParam().ReceiverChainId) require.Equal(t, emittingContract.Hex(), cctxList[0].InboundTxParams.Sender) require.Equal(t, txOrigin.Hex(), cctxList[0].InboundTxParams.TxOrigin) }) @@ -461,7 +461,7 @@ func TestKeeper_ProcessZetaSentEvent(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := common.EthChain() + chain := pkg.EthChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -481,7 +481,7 @@ func TestKeeper_ProcessZetaSentEvent(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := common.EthChain() + chain := pkg.EthChain() SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) SetupStateForProcessLogsZetaSent(t, ctx, k, zk, sdkk, chain) @@ -503,7 +503,7 @@ func TestKeeper_ProcessZetaSentEvent(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := common.EthChain() + chain := pkg.EthChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -528,7 +528,7 @@ func TestKeeper_ProcessZetaSentEvent(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := common.EthChain() + chain := pkg.EthChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -551,7 +551,7 @@ func TestKeeper_ProcessZetaSentEvent(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := common.EthChain() + chain := pkg.EthChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) @@ -583,7 +583,7 @@ func TestKeeper_ProcessLogs(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := common.BtcMainnetChain() + chain := pkg.BtcMainnetChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -609,7 +609,7 @@ func TestKeeper_ProcessLogs(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := common.EthChain() + chain := pkg.EthChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -633,7 +633,7 @@ func TestKeeper_ProcessLogs(t *testing.T) { cctxList := k.GetAllCrossChainTx(ctx) require.Len(t, cctxList, 1) require.Equal(t, strings.Compare("0x60983881bdf302dcfa96603a58274d15d5966209", cctxList[0].GetCurrentOutTxParam().Receiver), 0) - require.Equal(t, common.EthChain().ChainId, cctxList[0].GetCurrentOutTxParam().ReceiverChainId) + require.Equal(t, pkg.EthChain().ChainId, cctxList[0].GetCurrentOutTxParam().ReceiverChainId) require.Equal(t, emittingContract.Hex(), cctxList[0].InboundTxParams.Sender) require.Equal(t, txOrigin.Hex(), cctxList[0].InboundTxParams.TxOrigin) }) @@ -652,7 +652,7 @@ func TestKeeper_ProcessLogs(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := common.BtcMainnetChain() + chain := pkg.BtcMainnetChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -673,7 +673,7 @@ func TestKeeper_ProcessLogs(t *testing.T) { t.Run("no cctx created for logs containing proper event but not emitted from a known ZRC20 contract", func(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := common.BtcMainnetChain() + chain := pkg.BtcMainnetChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -694,7 +694,7 @@ func TestKeeper_ProcessLogs(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := common.BtcMainnetChain() + chain := pkg.BtcMainnetChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -718,7 +718,7 @@ func TestKeeper_ProcessLogs(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := common.BtcMainnetChain() + chain := pkg.BtcMainnetChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -739,7 +739,7 @@ func TestKeeper_ProcessLogs(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := common.BtcMainnetChain() + chain := pkg.BtcMainnetChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) diff --git a/x/crosschain/keeper/gas_payment.go b/x/crosschain/keeper/gas_payment.go index e42c6df643..c025bde196 100644 --- a/x/crosschain/keeper/gas_payment.go +++ b/x/crosschain/keeper/gas_payment.go @@ -11,7 +11,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ethcommon "github.com/ethereum/go-ethereum/common" "github.com/zeta-chain/zetacore/cmd/zetacored/config" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" fungibletypes "github.com/zeta-chain/zetacore/x/fungible/types" zetaObserverTypes "github.com/zeta-chain/zetacore/x/observer/types" @@ -29,11 +29,11 @@ func (k Keeper) PayGasAndUpdateCctx( ) error { // Dispatch to the correct function based on the coin type switch cctx.InboundTxParams.CoinType { - case common.CoinType_Zeta: + case pkg.CoinType_Zeta: return k.PayGasInZetaAndUpdateCctx(ctx, chainID, cctx, inputAmount, noEthereumTxEvent) - case common.CoinType_Gas: + case pkg.CoinType_Gas: return k.PayGasNativeAndUpdateCctx(ctx, chainID, cctx, inputAmount) - case common.CoinType_ERC20: + case pkg.CoinType_ERC20: return k.PayGasInERC20AndUpdateCctx(ctx, chainID, cctx, inputAmount, noEthereumTxEvent) default: // can't pay gas with coin type @@ -90,7 +90,7 @@ func (k Keeper) PayGasNativeAndUpdateCctx( inputAmount math.Uint, ) error { // preliminary checks - if cctx.InboundTxParams.CoinType != common.CoinType_Gas { + if cctx.InboundTxParams.CoinType != pkg.CoinType_Gas { return cosmoserrors.Wrapf(types.ErrInvalidCoinType, "can't pay gas in native gas with %s", cctx.InboundTxParams.CoinType.String()) } if chain := k.zetaObserverKeeper.GetSupportedChainFromChainID(ctx, chainID); chain == nil { @@ -137,7 +137,7 @@ func (k Keeper) PayGasInERC20AndUpdateCctx( noEthereumTxEvent bool, ) error { // preliminary checks - if cctx.InboundTxParams.CoinType != common.CoinType_ERC20 { + if cctx.InboundTxParams.CoinType != pkg.CoinType_ERC20 { return cosmoserrors.Wrapf(types.ErrInvalidCoinType, "can't pay gas in erc20 with %s", cctx.InboundTxParams.CoinType.String()) } @@ -264,7 +264,7 @@ func (k Keeper) PayGasInZetaAndUpdateCctx( noEthereumTxEvent bool, ) error { // preliminary checks - if cctx.InboundTxParams.CoinType != common.CoinType_Zeta { + if cctx.InboundTxParams.CoinType != pkg.CoinType_Zeta { return cosmoserrors.Wrapf(types.ErrInvalidCoinType, "can't pay gas in zeta with %s", cctx.InboundTxParams.CoinType.String()) } diff --git a/x/crosschain/keeper/grpc_query_zeta_conversion_rate.go b/x/crosschain/keeper/grpc_query_zeta_conversion_rate.go index 93b86a6e26..84fe370a84 100644 --- a/x/crosschain/keeper/grpc_query_zeta_conversion_rate.go +++ b/x/crosschain/keeper/grpc_query_zeta_conversion_rate.go @@ -6,7 +6,7 @@ import ( "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" zetaObserverTypes "github.com/zeta-chain/zetacore/x/observer/types" "google.golang.org/grpc/codes" @@ -15,7 +15,7 @@ import ( func (k Keeper) ConvertGasToZeta(context context.Context, request *types.QueryConvertGasToZetaRequest) (*types.QueryConvertGasToZetaResponse, error) { ctx := sdk.UnwrapSDKContext(context) - chain := common.GetChainFromChainID(request.ChainId) + chain := pkg.GetChainFromChainID(request.ChainId) if chain == nil { return nil, zetaObserverTypes.ErrSupportedChains diff --git a/x/crosschain/keeper/in_tx_tracker_test.go b/x/crosschain/keeper/in_tx_tracker_test.go index a4bda41192..871e472c0a 100644 --- a/x/crosschain/keeper/in_tx_tracker_test.go +++ b/x/crosschain/keeper/in_tx_tracker_test.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/nullify" "github.com/zeta-chain/zetacore/x/crosschain/keeper" @@ -20,7 +20,7 @@ func createNInTxTracker(keeper *keeper.Keeper, ctx sdk.Context, n int, chainID i for i := range items { items[i].TxHash = fmt.Sprintf("TxHash-%d", i) items[i].ChainId = chainID - items[i].CoinType = common.CoinType_Gas + items[i].CoinType = pkg.CoinType_Gas keeper.SetInTxTracker(ctx, items[i]) } return items diff --git a/x/crosschain/keeper/msg_server_add_to_intx_tracker.go b/x/crosschain/keeper/msg_server_add_to_intx_tracker.go index fcd58780af..0cfd77a8e9 100644 --- a/x/crosschain/keeper/msg_server_add_to_intx_tracker.go +++ b/x/crosschain/keeper/msg_server_add_to_intx_tracker.go @@ -6,7 +6,7 @@ import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" @@ -32,7 +32,7 @@ func (k msgServer) AddToInTxTracker(goCtx context.Context, msg *types.MsgAddToIn return nil, types.ErrProofVerificationFail.Wrapf(err.Error()) } - if common.IsEVMChain(msg.ChainId) { + if pkg.IsEVMChain(msg.ChainId) { err = k.VerifyEVMInTxBody(ctx, msg, txBytes) if err != nil { return nil, types.ErrTxBodyVerificationFail.Wrapf(err.Error()) diff --git a/x/crosschain/keeper/msg_server_add_to_intx_tracker_test.go b/x/crosschain/keeper/msg_server_add_to_intx_tracker_test.go index 50e8164eb7..0870951850 100644 --- a/x/crosschain/keeper/msg_server_add_to_intx_tracker_test.go +++ b/x/crosschain/keeper/msg_server_add_to_intx_tracker_test.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" @@ -18,12 +18,12 @@ import ( func setupVerificationParams(zk keepertest.ZetaKeepers, ctx sdk.Context, tx_index int64, chainID int64, header ethtypes.Header, headerRLP []byte, block *ethtypes.Block) { params := zk.ObserverKeeper.GetParamsIfExists(ctx) zk.ObserverKeeper.SetParams(ctx, params) - zk.ObserverKeeper.SetBlockHeader(ctx, common.BlockHeader{ + zk.ObserverKeeper.SetBlockHeader(ctx, pkg.BlockHeader{ Height: block.Number().Int64(), Hash: block.Hash().Bytes(), ParentHash: header.ParentHash.Bytes(), ChainId: chainID, - Header: common.NewEthereumHeader(headerRLP), + Header: pkg.NewEthereumHeader(headerRLP), }) zk.ObserverKeeper.SetChainParamsList(ctx, observertypes.ChainParamsList{ChainParams: []*observertypes.ChainParams{ { @@ -56,7 +56,7 @@ func TestMsgServer_AddToInTxTracker(t *testing.T) { Creator: sample.AccAddress(), ChainId: chainID, TxHash: tx_hash, - CoinType: common.CoinType_Zeta, + CoinType: pkg.CoinType_Zeta, Proof: nil, BlockHash: "", TxIndex: 0, @@ -85,7 +85,7 @@ func TestMsgServer_AddToInTxTracker(t *testing.T) { Creator: admin, ChainId: chainID, TxHash: tx_hash, - CoinType: common.CoinType_Zeta, + CoinType: pkg.CoinType_Zeta, Proof: nil, BlockHash: "", TxIndex: 0, @@ -114,7 +114,7 @@ func TestMsgServer_AddToInTxTracker(t *testing.T) { Creator: admin, ChainId: chainID, TxHash: "Malicious TX HASH", - CoinType: common.CoinType_Zeta, + CoinType: pkg.CoinType_Zeta, Proof: nil, BlockHash: "", TxIndex: 0, @@ -143,7 +143,7 @@ func TestMsgServer_AddToInTxTracker(t *testing.T) { // Creator: sample.AccAddress(), // ChainId: chainID, // TxHash: tx.Hash().Hex(), - // CoinType: common.CoinType_Zeta, + // CoinType: pkg.CoinType_Zeta, // Proof: proof, // BlockHash: block.Hash().Hex(), // TxIndex: txIndex, @@ -166,7 +166,7 @@ func TestMsgServer_AddToInTxTracker(t *testing.T) { // Creator: sample.AccAddress(), // ChainId: chainID, // TxHash: "fake_hash", - // CoinType: common.CoinType_Zeta, + // CoinType: pkg.CoinType_Zeta, // Proof: proof, // BlockHash: block.Hash().Hex(), // TxIndex: txIndex, @@ -190,7 +190,7 @@ func TestMsgServer_AddToInTxTracker(t *testing.T) { // Creator: sample.AccAddress(), // ChainId: 97, // TxHash: tx.Hash().Hex(), - // CoinType: common.CoinType_Zeta, + // CoinType: pkg.CoinType_Zeta, // Proof: proof, // BlockHash: block.Hash().Hex(), // TxIndex: txIndex, diff --git a/x/crosschain/keeper/msg_server_add_to_outtx_tracker.go b/x/crosschain/keeper/msg_server_add_to_outtx_tracker.go index 518a601965..926fe66f8d 100644 --- a/x/crosschain/keeper/msg_server_add_to_outtx_tracker.go +++ b/x/crosschain/keeper/msg_server_add_to_outtx_tracker.go @@ -12,7 +12,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" eth "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" @@ -116,7 +116,7 @@ func (k msgServer) AddToOutTxTracker(goCtx context.Context, msg *types.MsgAddToO func (k Keeper) VerifyOutTxBody(ctx sdk.Context, msg *types.MsgAddToOutTxTracker, txBytes []byte) error { // get tss address var bitcoinChainID int64 - if common.IsBitcoinChain(msg.ChainId) { + if pkg.IsBitcoinChain(msg.ChainId) { bitcoinChainID = msg.ChainId } tss, err := k.zetaObserverKeeper.GetTssAddress(ctx, &observertypes.QueryGetTssAddressRequest{ @@ -127,9 +127,9 @@ func (k Keeper) VerifyOutTxBody(ctx sdk.Context, msg *types.MsgAddToOutTxTracker } // verify message against transaction body - if common.IsEVMChain(msg.ChainId) { + if pkg.IsEVMChain(msg.ChainId) { err = VerifyEVMOutTxBody(msg, txBytes, tss.Eth) - } else if common.IsBitcoinChain(msg.ChainId) { + } else if pkg.IsBitcoinChain(msg.ChainId) { err = VerifyBTCOutTxBody(msg, txBytes, tss.Btc) } else { return fmt.Errorf("cannot verify outTx body for chain %d", msg.ChainId) @@ -172,7 +172,7 @@ func VerifyEVMOutTxBody(msg *types.MsgAddToOutTxTracker, txBytes []byte, tssEth // VerifyBTCOutTxBody validates the SegWit sender address, nonce and chain id and tx hash // Note: 'msg' may contain fabricated information func VerifyBTCOutTxBody(msg *types.MsgAddToOutTxTracker, txBytes []byte, tssBtc string) error { - if !common.IsBitcoinChain(msg.ChainId) { + if !pkg.IsBitcoinChain(msg.ChainId) { return fmt.Errorf("not a Bitcoin chain ID %d", msg.ChainId) } tx, err := btcutil.NewTxFromBytes(txBytes) @@ -187,7 +187,7 @@ func VerifyBTCOutTxBody(msg *types.MsgAddToOutTxTracker, txBytes []byte, tssBtc if err != nil { return fmt.Errorf("failed to parse public key") } - bitcoinNetParams, err := common.BitcoinNetParamsFromChainID(msg.ChainId) + bitcoinNetParams, err := pkg.BitcoinNetParamsFromChainID(msg.ChainId) if err != nil { return fmt.Errorf("failed to get Bitcoin net params, error %s", err.Error()) } @@ -205,8 +205,8 @@ func VerifyBTCOutTxBody(msg *types.MsgAddToOutTxTracker, txBytes []byte, tssBtc if len(tx.MsgTx().TxOut) < 1 { return fmt.Errorf("outTx should have at least one output") } - if tx.MsgTx().TxOut[0].Value != common.NonceMarkAmount(msg.Nonce) { - return fmt.Errorf("want nonce mark %d, got %d", tx.MsgTx().TxOut[0].Value, common.NonceMarkAmount(msg.Nonce)) + if tx.MsgTx().TxOut[0].Value != pkg.NonceMarkAmount(msg.Nonce) { + return fmt.Errorf("want nonce mark %d, got %d", tx.MsgTx().TxOut[0].Value, pkg.NonceMarkAmount(msg.Nonce)) } if tx.MsgTx().TxHash().String() != msg.TxHash { return fmt.Errorf("want tx hash %s, got %s", tx.MsgTx().TxHash(), msg.TxHash) diff --git a/x/crosschain/keeper/msg_server_migrate_tss_funds.go b/x/crosschain/keeper/msg_server_migrate_tss_funds.go index 96db6a964d..8505637421 100644 --- a/x/crosschain/keeper/msg_server_migrate_tss_funds.go +++ b/x/crosschain/keeper/msg_server_migrate_tss_funds.go @@ -12,7 +12,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" tmbytes "github.com/tendermint/tendermint/libs/bytes" tmtypes "github.com/tendermint/tendermint/types" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" @@ -82,7 +82,7 @@ func (k Keeper) MigrateTSSFundsForChain(ctx sdk.Context, chainID int64, amount s Creator: "", Index: index, ZetaFees: sdkmath.Uint{}, - RelayedMessage: fmt.Sprintf("%s:%s", common.CmdMigrateTssFunds, "Funds Migrator Admin Cmd"), + RelayedMessage: fmt.Sprintf("%s:%s", pkg.CmdMigrateTssFunds, "Funds Migrator Admin Cmd"), CctxStatus: &types.Status{ Status: types.CctxStatus_PendingOutbound, StatusMessage: "", @@ -92,7 +92,7 @@ func (k Keeper) MigrateTSSFundsForChain(ctx sdk.Context, chainID int64, amount s Sender: "", SenderChainId: chainID, TxOrigin: "", - CoinType: common.CoinType_Cmd, + CoinType: pkg.CoinType_Cmd, Asset: "", Amount: amount, InboundTxObservedHash: tmbytes.HexBytes(tmtypes.Tx(ctx.TxBytes()).Hash()).String(), @@ -103,7 +103,7 @@ func (k Keeper) MigrateTSSFundsForChain(ctx sdk.Context, chainID int64, amount s OutboundTxParams: []*types.OutboundTxParams{{ Receiver: "", ReceiverChainId: chainID, - CoinType: common.CoinType_Cmd, + CoinType: pkg.CoinType_Cmd, Amount: amount, OutboundTxTssNonce: 0, OutboundTxGasLimit: 1_000_000, @@ -117,21 +117,21 @@ func (k Keeper) MigrateTSSFundsForChain(ctx sdk.Context, chainID int64, amount s TssPubkey: currentTss.TssPubkey, }}} // Set the sender and receiver addresses for EVM chain - if common.IsEVMChain(chainID) { - ethAddressOld, err := common.GetTssAddrEVM(currentTss.TssPubkey) + if pkg.IsEVMChain(chainID) { + ethAddressOld, err := pkg.GetTssAddrEVM(currentTss.TssPubkey) if err != nil { return err } - ethAddressNew, err := common.GetTssAddrEVM(newTss.TssPubkey) + ethAddressNew, err := pkg.GetTssAddrEVM(newTss.TssPubkey) if err != nil { return err } cctx.InboundTxParams.Sender = ethAddressOld.String() cctx.GetCurrentOutTxParam().Receiver = ethAddressNew.String() // Tss migration is a send transaction, so the gas limit is set to 21000 - cctx.GetCurrentOutTxParam().OutboundTxGasLimit = common.EVMSend + cctx.GetCurrentOutTxParam().OutboundTxGasLimit = pkg.EVMSend // Multiple current gas price with standard multiplier to add some buffer - multipliedGasPrice, err := common.MultiplyGasPrice(medianGasPrice, types.TssMigrationGasMultiplierEVM) + multipliedGasPrice, err := pkg.MultiplyGasPrice(medianGasPrice, types.TssMigrationGasMultiplierEVM) if err != nil { return err } @@ -143,16 +143,16 @@ func (k Keeper) MigrateTSSFundsForChain(ctx sdk.Context, chainID int64, amount s cctx.GetCurrentOutTxParam().Amount = amount.Sub(evmFee) } // Set the sender and receiver addresses for Bitcoin chain - if common.IsBitcoinChain(chainID) { - bitcoinNetParams, err := common.BitcoinNetParamsFromChainID(chainID) + if pkg.IsBitcoinChain(chainID) { + bitcoinNetParams, err := pkg.BitcoinNetParamsFromChainID(chainID) if err != nil { return err } - btcAddressOld, err := common.GetTssAddrBTC(currentTss.TssPubkey, bitcoinNetParams) + btcAddressOld, err := pkg.GetTssAddrBTC(currentTss.TssPubkey, bitcoinNetParams) if err != nil { return err } - btcAddressNew, err := common.GetTssAddrBTC(newTss.TssPubkey, bitcoinNetParams) + btcAddressNew, err := pkg.GetTssAddrBTC(newTss.TssPubkey, bitcoinNetParams) if err != nil { return err } diff --git a/x/crosschain/keeper/msg_server_migrate_tss_funds_test.go b/x/crosschain/keeper/msg_server_migrate_tss_funds_test.go index 8eadd25049..c4282e4f17 100644 --- a/x/crosschain/keeper/msg_server_migrate_tss_funds_test.go +++ b/x/crosschain/keeper/msg_server_migrate_tss_funds_test.go @@ -7,7 +7,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/crypto" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" @@ -20,7 +20,7 @@ func setupTssMigrationParams( zk keepertest.ZetaKeepers, k *keeper.Keeper, ctx sdk.Context, - chain common.Chain, + chain pkg.Chain, amount sdkmath.Uint, setNewTss bool, setCurrentTSS bool, @@ -102,7 +102,7 @@ func TestKeeper_MigrateTSSFundsForChain(t *testing.T) { index := hash.Hex() cctx, found := k.GetCrossChainTx(ctx, index) require.True(t, found) - multipliedValue, err := common.MultiplyGasPrice(gp, crosschaintypes.TssMigrationGasMultiplierEVM) + multipliedValue, err := pkg.MultiplyGasPrice(gp, crosschaintypes.TssMigrationGasMultiplierEVM) require.NoError(t, err) require.Equal(t, multipliedValue.String(), cctx.GetCurrentOutTxParam().OutboundTxGasPrice) diff --git a/x/crosschain/keeper/msg_server_refund_aborted_tx.go b/x/crosschain/keeper/msg_server_refund_aborted_tx.go index fc651ec249..c99b406227 100644 --- a/x/crosschain/keeper/msg_server_refund_aborted_tx.go +++ b/x/crosschain/keeper/msg_server_refund_aborted_tx.go @@ -6,7 +6,7 @@ import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" ethcommon "github.com/ethereum/go-ethereum/common" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" @@ -43,7 +43,7 @@ func (k msgServer) RefundAbortedCCTX(goCtx context.Context, msg *types.MsgRefund } // Check if aborted amount is available to maintain zeta accounting - if cctx.InboundTxParams.CoinType == common.CoinType_Zeta { + if cctx.InboundTxParams.CoinType == pkg.CoinType_Zeta { err := k.RemoveZetaAbortedAmount(ctx, GetAbortedAmount(cctx)) // if the zeta accounting is not found, it means the zeta accounting is not set yet and the refund should not be processed if errors.Is(err, types.ErrUnableToFindZetaAccounting) { diff --git a/x/crosschain/keeper/msg_server_refund_aborted_tx_test.go b/x/crosschain/keeper/msg_server_refund_aborted_tx_test.go index 1c6f7da680..e822f237f3 100644 --- a/x/crosschain/keeper/msg_server_refund_aborted_tx_test.go +++ b/x/crosschain/keeper/msg_server_refund_aborted_tx_test.go @@ -7,7 +7,7 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" "github.com/zeta-chain/zetacore/cmd/zetacored/config" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" @@ -55,7 +55,7 @@ func TestMsgServer_RefundAbortedCCTX(t *testing.T) { cctx.CctxStatus.IsAbortRefunded = false cctx.InboundTxParams.TxOrigin = cctx.InboundTxParams.Sender cctx.InboundTxParams.SenderChainId = chainID - cctx.InboundTxParams.CoinType = common.CoinType_Gas + cctx.InboundTxParams.CoinType = pkg.CoinType_Gas k.SetCrossChainTx(ctx, *cctx) deploySystemContracts(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper) zrc20 := setupGasCoin(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper, cctx.InboundTxParams.SenderChainId, "foobar", "foobar") @@ -94,7 +94,7 @@ func TestMsgServer_RefundAbortedCCTX(t *testing.T) { cctx.CctxStatus.IsAbortRefunded = false cctx.InboundTxParams.TxOrigin = cctx.InboundTxParams.Sender cctx.InboundTxParams.SenderChainId = chainID - cctx.InboundTxParams.CoinType = common.CoinType_Zeta + cctx.InboundTxParams.CoinType = pkg.CoinType_Zeta k.SetCrossChainTx(ctx, *cctx) k.SetZetaAccounting(ctx, crosschaintypes.ZetaAccounting{AbortedZetaAmount: cctx.GetCurrentOutTxParam().Amount}) deploySystemContracts(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper) @@ -133,7 +133,7 @@ func TestMsgServer_RefundAbortedCCTX(t *testing.T) { cctx.CctxStatus.IsAbortRefunded = false cctx.InboundTxParams.TxOrigin = cctx.InboundTxParams.Sender cctx.InboundTxParams.SenderChainId = chainID - cctx.InboundTxParams.CoinType = common.CoinType_Zeta + cctx.InboundTxParams.CoinType = pkg.CoinType_Zeta cctx.OutboundTxParams = nil k.SetCrossChainTx(ctx, *cctx) k.SetZetaAccounting(ctx, crosschaintypes.ZetaAccounting{AbortedZetaAmount: cctx.GetCurrentOutTxParam().Amount}) @@ -173,7 +173,7 @@ func TestMsgServer_RefundAbortedCCTX(t *testing.T) { cctx.CctxStatus.IsAbortRefunded = false cctx.InboundTxParams.TxOrigin = cctx.InboundTxParams.Sender cctx.InboundTxParams.SenderChainId = chainID - cctx.InboundTxParams.CoinType = common.CoinType_Zeta + cctx.InboundTxParams.CoinType = pkg.CoinType_Zeta k.SetCrossChainTx(ctx, *cctx) k.SetZetaAccounting(ctx, crosschaintypes.ZetaAccounting{AbortedZetaAmount: cctx.InboundTxParams.Amount}) deploySystemContracts(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper) @@ -212,7 +212,7 @@ func TestMsgServer_RefundAbortedCCTX(t *testing.T) { cctx.CctxStatus.Status = crosschaintypes.CctxStatus_Aborted cctx.CctxStatus.IsAbortRefunded = false cctx.InboundTxParams.SenderChainId = chainID - cctx.InboundTxParams.CoinType = common.CoinType_ERC20 + cctx.InboundTxParams.CoinType = pkg.CoinType_ERC20 cctx.InboundTxParams.Asset = asset k.SetCrossChainTx(ctx, *cctx) // deploy zrc20 @@ -262,7 +262,7 @@ func TestMsgServer_RefundAbortedCCTX(t *testing.T) { cctx.CctxStatus.IsAbortRefunded = false cctx.InboundTxParams.TxOrigin = cctx.InboundTxParams.Sender cctx.InboundTxParams.SenderChainId = chainID - cctx.InboundTxParams.CoinType = common.CoinType_Gas + cctx.InboundTxParams.CoinType = pkg.CoinType_Gas k.SetCrossChainTx(ctx, *cctx) deploySystemContracts(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper) zrc20 := setupGasCoin(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper, cctx.InboundTxParams.SenderChainId, "foobar", "foobar") @@ -301,7 +301,7 @@ func TestMsgServer_RefundAbortedCCTX(t *testing.T) { cctx.CctxStatus.IsAbortRefunded = false cctx.InboundTxParams.TxOrigin = cctx.InboundTxParams.Sender cctx.InboundTxParams.SenderChainId = chainID - cctx.InboundTxParams.CoinType = common.CoinType_Zeta + cctx.InboundTxParams.CoinType = pkg.CoinType_Zeta k.SetCrossChainTx(ctx, *cctx) k.SetZetaAccounting(ctx, crosschaintypes.ZetaAccounting{AbortedZetaAmount: cctx.InboundTxParams.Amount}) deploySystemContracts(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper) @@ -332,7 +332,7 @@ func TestMsgServer_RefundAbortedCCTX(t *testing.T) { cctx.CctxStatus.IsAbortRefunded = false cctx.InboundTxParams.TxOrigin = cctx.InboundTxParams.Sender cctx.InboundTxParams.SenderChainId = chainID - cctx.InboundTxParams.CoinType = common.CoinType_Zeta + cctx.InboundTxParams.CoinType = pkg.CoinType_Zeta k.SetCrossChainTx(ctx, *cctx) k.SetZetaAccounting(ctx, crosschaintypes.ZetaAccounting{AbortedZetaAmount: cctx.InboundTxParams.Amount}) deploySystemContracts(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper) @@ -363,7 +363,7 @@ func TestMsgServer_RefundAbortedCCTX(t *testing.T) { cctx.CctxStatus.IsAbortRefunded = false cctx.InboundTxParams.TxOrigin = cctx.InboundTxParams.Sender cctx.InboundTxParams.SenderChainId = chainID - cctx.InboundTxParams.CoinType = common.CoinType_Gas + cctx.InboundTxParams.CoinType = pkg.CoinType_Gas k.SetCrossChainTx(ctx, *cctx) deploySystemContracts(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper) @@ -396,7 +396,7 @@ func TestMsgServer_RefundAbortedCCTX(t *testing.T) { cctx.CctxStatus.IsAbortRefunded = false cctx.InboundTxParams.TxOrigin = cctx.InboundTxParams.Sender cctx.InboundTxParams.SenderChainId = chainID - cctx.InboundTxParams.CoinType = common.CoinType_Gas + cctx.InboundTxParams.CoinType = pkg.CoinType_Gas deploySystemContracts(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper) _, err := msgServer.RefundAbortedCCTX(ctx, &crosschaintypes.MsgRefundAbortedCCTX{ @@ -425,7 +425,7 @@ func TestMsgServer_RefundAbortedCCTX(t *testing.T) { cctx.CctxStatus.IsAbortRefunded = false cctx.InboundTxParams.TxOrigin = cctx.InboundTxParams.Sender cctx.InboundTxParams.SenderChainId = chainID - cctx.InboundTxParams.CoinType = common.CoinType_Gas + cctx.InboundTxParams.CoinType = pkg.CoinType_Gas k.SetCrossChainTx(ctx, *cctx) deploySystemContracts(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper) _ = setupGasCoin(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper, cctx.InboundTxParams.SenderChainId, "foobar", "foobar") @@ -456,7 +456,7 @@ func TestMsgServer_RefundAbortedCCTX(t *testing.T) { cctx.CctxStatus.IsAbortRefunded = false cctx.InboundTxParams.TxOrigin = cctx.InboundTxParams.Sender cctx.InboundTxParams.SenderChainId = chainID - cctx.InboundTxParams.CoinType = common.CoinType_Zeta + cctx.InboundTxParams.CoinType = pkg.CoinType_Zeta k.SetCrossChainTx(ctx, *cctx) deploySystemContracts(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper) @@ -486,7 +486,7 @@ func TestMsgServer_RefundAbortedCCTX(t *testing.T) { cctx.CctxStatus.IsAbortRefunded = false cctx.InboundTxParams.TxOrigin = cctx.InboundTxParams.Sender cctx.InboundTxParams.SenderChainId = chainID - cctx.InboundTxParams.CoinType = common.CoinType_Gas + cctx.InboundTxParams.CoinType = pkg.CoinType_Gas k.SetCrossChainTx(ctx, *cctx) deploySystemContracts(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper) _ = setupGasCoin(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper, cctx.InboundTxParams.SenderChainId, "foobar", "foobar") diff --git a/x/crosschain/keeper/msg_server_tss_voter.go b/x/crosschain/keeper/msg_server_tss_voter.go index 29672a1a6d..0bca8c6028 100644 --- a/x/crosschain/keeper/msg_server_tss_voter.go +++ b/x/crosschain/keeper/msg_server_tss_voter.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" math2 "github.com/ethereum/go-ethereum/common/math" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" "github.com/zeta-chain/zetacore/x/observer/keeper" observertypes "github.com/zeta-chain/zetacore/x/observer/types" @@ -65,12 +65,12 @@ func (k msgServer) CreateTSSVoter(goCtx context.Context, msg *types.MsgCreateTSS k.zetaObserverKeeper.AddBallotToList(ctx, ballot) } var err error - if msg.Status == common.ReceiveStatus_Success { + if msg.Status == pkg.ReceiveStatus_Success { ballot, err = k.zetaObserverKeeper.AddVoteToBallot(ctx, ballot, msg.Creator, observertypes.VoteType_SuccessObservation) if err != nil { return &types.MsgCreateTSSVoterResponse{}, err } - } else if msg.Status == common.ReceiveStatus_Failed { + } else if msg.Status == pkg.ReceiveStatus_Failed { ballot, err = k.zetaObserverKeeper.AddVoteToBallot(ctx, ballot, msg.Creator, observertypes.VoteType_FailureObservation) if err != nil { return &types.MsgCreateTSSVoterResponse{}, err diff --git a/x/crosschain/keeper/msg_server_vote_inbound_tx.go b/x/crosschain/keeper/msg_server_vote_inbound_tx.go index db287e6b82..d1459b4cba 100644 --- a/x/crosschain/keeper/msg_server_vote_inbound_tx.go +++ b/x/crosschain/keeper/msg_server_vote_inbound_tx.go @@ -6,7 +6,7 @@ import ( cosmoserrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" ) @@ -121,7 +121,7 @@ func (k msgServer) VoteOnObservedInboundTx(goCtx context.Context, msg *types.Msg // FinalizeInbound updates CCTX Prices and Nonce // Aborts is any of the updates fail - if common.IsZetaChain(msg.ReceiverChain) { + if pkg.IsZetaChain(msg.ReceiverChain) { tmpCtx, commit := ctx.CacheContext() isContractReverted, err := k.HandleEVMDeposit(tmpCtx, &cctx, *msg, msg.SenderChainId) diff --git a/x/crosschain/keeper/msg_server_vote_inbound_tx_test.go b/x/crosschain/keeper/msg_server_vote_inbound_tx_test.go index 803de84576..24f77f4579 100644 --- a/x/crosschain/keeper/msg_server_vote_inbound_tx_test.go +++ b/x/crosschain/keeper/msg_server_vote_inbound_tx_test.go @@ -7,7 +7,7 @@ import ( sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/crosschain/keeper" @@ -44,10 +44,10 @@ func TestKeeper_VoteOnObservedInboundTx(t *testing.T) { to, from := int64(1337), int64(101) chains := zk.ObserverKeeper.GetSupportedChains(ctx) for _, chain := range chains { - if common.IsEVMChain(chain.ChainId) { + if pkg.IsEVMChain(chain.ChainId) { from = chain.ChainId } - if common.IsZetaChain(chain.ChainId) { + if pkg.IsZetaChain(chain.ChainId) { to = chain.ChainId } } diff --git a/x/crosschain/keeper/msg_server_vote_outbound_tx.go b/x/crosschain/keeper/msg_server_vote_outbound_tx.go index 5c36a2abf9..81331024f4 100644 --- a/x/crosschain/keeper/msg_server_vote_outbound_tx.go +++ b/x/crosschain/keeper/msg_server_vote_outbound_tx.go @@ -12,7 +12,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/rs/zerolog/log" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" observerkeeper "github.com/zeta-chain/zetacore/x/observer/keeper" observertypes "github.com/zeta-chain/zetacore/x/observer/types" @@ -142,7 +142,7 @@ func (k msgServer) VoteOnObservedOutboundTx(goCtx context.Context, msg *types.Ms newStatus := cctx.CctxStatus.Status.String() EmitOutboundSuccess(tmpCtx, msg, oldStatus.String(), newStatus, cctx) case observertypes.BallotStatus_BallotFinalized_FailureObservation: - if msg.CoinType == common.CoinType_Cmd || common.IsZetaChain(cctx.InboundTxParams.SenderChainId) { + if msg.CoinType == pkg.CoinType_Cmd || pkg.IsZetaChain(cctx.InboundTxParams.SenderChainId) { // if the cctx is of coin type cmd or the sender chain is zeta chain, then we do not revert, the cctx is aborted cctx.CctxStatus.ChangeStatus(types.CctxStatus_Aborted, "") } else { diff --git a/x/crosschain/keeper/msg_server_whitelist_erc20.go b/x/crosschain/keeper/msg_server_whitelist_erc20.go index e269f2312a..f845c53a52 100644 --- a/x/crosschain/keeper/msg_server_whitelist_erc20.go +++ b/x/crosschain/keeper/msg_server_whitelist_erc20.go @@ -15,7 +15,7 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" fungibletypes "github.com/zeta-chain/zetacore/x/fungible/types" ) @@ -72,7 +72,7 @@ func (k msgServer) WhitelistERC20(goCtx context.Context, msg *types.MsgWhitelist // #nosec G701 always in range uint8(msg.Decimals), chain.ChainId, - common.CoinType_ERC20, + pkg.CoinType_ERC20, msg.Erc20Address, big.NewInt(msg.GasLimit), ) @@ -115,7 +115,7 @@ func (k msgServer) WhitelistERC20(goCtx context.Context, msg *types.MsgWhitelist Creator: msg.Creator, Index: index, ZetaFees: sdk.NewUint(0), - RelayedMessage: fmt.Sprintf("%s:%s", common.CmdWhitelistERC20, msg.Erc20Address), + RelayedMessage: fmt.Sprintf("%s:%s", pkg.CmdWhitelistERC20, msg.Erc20Address), CctxStatus: &types.Status{ Status: types.CctxStatus_PendingOutbound, StatusMessage: "", @@ -125,7 +125,7 @@ func (k msgServer) WhitelistERC20(goCtx context.Context, msg *types.MsgWhitelist Sender: "", SenderChainId: 0, TxOrigin: "", - CoinType: common.CoinType_Cmd, + CoinType: pkg.CoinType_Cmd, Asset: "", Amount: math.Uint{}, InboundTxObservedHash: hash.String(), // all Upper case Cosmos TX HEX, with no 0x prefix @@ -137,7 +137,7 @@ func (k msgServer) WhitelistERC20(goCtx context.Context, msg *types.MsgWhitelist { Receiver: param.Erc20CustodyContractAddress, ReceiverChainId: msg.ChainId, - CoinType: common.CoinType_Cmd, + CoinType: pkg.CoinType_Cmd, Amount: math.NewUint(0), OutboundTxTssNonce: 0, OutboundTxGasLimit: 100_000, @@ -162,7 +162,7 @@ func (k msgServer) WhitelistERC20(goCtx context.Context, msg *types.MsgWhitelist Decimals: msg.Decimals, Name: msg.Name, Symbol: msg.Symbol, - CoinType: common.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, // #nosec G701 always positive GasLimit: uint64(msg.GasLimit), } diff --git a/x/crosschain/keeper/msg_server_whitelist_erc20_test.go b/x/crosschain/keeper/msg_server_whitelist_erc20_test.go index 7f13a25611..e208989e5e 100644 --- a/x/crosschain/keeper/msg_server_whitelist_erc20_test.go +++ b/x/crosschain/keeper/msg_server_whitelist_erc20_test.go @@ -9,7 +9,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ethcommon "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" crosschainkeeper "github.com/zeta-chain/zetacore/x/crosschain/keeper" @@ -65,7 +65,7 @@ func TestKeeper_WhitelistERC20(t *testing.T) { require.EqualValues(t, erc20Address, fc.Asset) cctx, found := k.GetCrossChainTx(ctx, cctxIndex) require.True(t, found) - require.EqualValues(t, fmt.Sprintf("%s:%s", common.CmdWhitelistERC20, erc20Address), cctx.RelayedMessage) + require.EqualValues(t, fmt.Sprintf("%s:%s", pkg.CmdWhitelistERC20, erc20Address), cctx.RelayedMessage) // check gas limit is set gasLimit, err := zk.FungibleKeeper.QueryGasLimit(ctx, ethcommon.HexToAddress(zrc20)) diff --git a/x/crosschain/keeper/refund.go b/x/crosschain/keeper/refund.go index 9d10b7ce13..36638bd1be 100644 --- a/x/crosschain/keeper/refund.go +++ b/x/crosschain/keeper/refund.go @@ -7,18 +7,18 @@ import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" ethcommon "github.com/ethereum/go-ethereum/common" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" ) func (k Keeper) RefundAbortedAmountOnZetaChain(ctx sdk.Context, cctx types.CrossChainTx, refundAddress ethcommon.Address) error { coinType := cctx.InboundTxParams.CoinType switch coinType { - case common.CoinType_Gas: + case pkg.CoinType_Gas: return k.RefundAmountOnZetaChainGas(ctx, cctx, refundAddress) - case common.CoinType_Zeta: + case pkg.CoinType_Zeta: return k.RefundAmountOnZetaChainZeta(ctx, cctx, refundAddress) - case common.CoinType_ERC20: + case pkg.CoinType_ERC20: return k.RefundAmountOnZetaChainERC20(ctx, cctx, refundAddress) default: return errors.New("unsupported coin type for refund on ZetaChain") @@ -56,7 +56,7 @@ func (k Keeper) RefundAmountOnZetaChainZeta(ctx sdk.Context, cctx types.CrossCha refundAmount := GetAbortedAmount(cctx) chainID := cctx.InboundTxParams.SenderChainId // check if chain is an EVM chain - if !common.IsEVMChain(chainID) { + if !pkg.IsEVMChain(chainID) { return errors.New("only EVM chains are supported for refund when coin type is Zeta") } if cctx.InboundTxParams.Amount.IsNil() || cctx.InboundTxParams.Amount.IsZero() { @@ -75,10 +75,10 @@ func (k Keeper) RefundAmountOnZetaChainZeta(ctx sdk.Context, cctx types.CrossCha func (k Keeper) RefundAmountOnZetaChainERC20(ctx sdk.Context, cctx types.CrossChainTx, refundAddress ethcommon.Address) error { refundAmount := GetAbortedAmount(cctx) // preliminary checks - if cctx.InboundTxParams.CoinType != common.CoinType_ERC20 { + if cctx.InboundTxParams.CoinType != pkg.CoinType_ERC20 { return errors.New("unsupported coin type for refund on ZetaChain") } - if !common.IsEVMChain(cctx.InboundTxParams.SenderChainId) { + if !pkg.IsEVMChain(cctx.InboundTxParams.SenderChainId) { return errors.New("only EVM chains are supported for refund on ZetaChain") } diff --git a/x/crosschain/keeper/refund_test.go b/x/crosschain/keeper/refund_test.go index e9ecfd346f..ba339ceed9 100644 --- a/x/crosschain/keeper/refund_test.go +++ b/x/crosschain/keeper/refund_test.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" "github.com/zeta-chain/zetacore/cmd/zetacored/config" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/crosschain/types" @@ -26,7 +26,7 @@ func TestKeeper_RefundAmountOnZetaChainGas(t *testing.T) { err := k.RefundAmountOnZetaChainGas(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: common.CoinType_Gas, + CoinType: pkg.CoinType_Gas, SenderChainId: chainID, Sender: sender.String(), TxOrigin: sender.String(), @@ -53,7 +53,7 @@ func TestKeeper_RefundAmountOnZetaChainGas(t *testing.T) { err := k.RefundAmountOnZetaChainGas(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: common.CoinType_Gas, + CoinType: pkg.CoinType_Gas, SenderChainId: chainID, Sender: sender.String(), TxOrigin: sender.String(), @@ -75,7 +75,7 @@ func TestKeeper_RefundAmountOnZetaChainGas(t *testing.T) { deploySystemContracts(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper) err := k.RefundAmountOnZetaChainGas(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: common.CoinType_Gas, + CoinType: pkg.CoinType_Gas, SenderChainId: chainID, Sender: sender.String(), TxOrigin: sender.String(), @@ -100,7 +100,7 @@ func TestKeeper_RefundAmountOnZetaChainGas(t *testing.T) { err := k.RefundAmountOnZetaChainGas(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: common.CoinType_Gas, + CoinType: pkg.CoinType_Gas, SenderChainId: chainID, Sender: sender.String(), TxOrigin: sender.String(), @@ -126,7 +126,7 @@ func TestKeeper_RefundAmountOnZetaChainZeta(t *testing.T) { err := k.RefundAmountOnZetaChainZeta(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: common.CoinType_Gas, + CoinType: pkg.CoinType_Gas, SenderChainId: chainID, Sender: sender.String(), TxOrigin: sender.String(), @@ -151,7 +151,7 @@ func TestKeeper_RefundAmountOnZetaChainZeta(t *testing.T) { err := k.RefundAmountOnZetaChainZeta(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: common.CoinType_Gas, + CoinType: pkg.CoinType_Gas, SenderChainId: chainID, Sender: sender.String(), TxOrigin: sender.String(), @@ -172,7 +172,7 @@ func TestKeeper_RefundAmountOnZetaChainZeta(t *testing.T) { err := k.RefundAmountOnZetaChainZeta(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: common.CoinType_Gas, + CoinType: pkg.CoinType_Gas, SenderChainId: chainID, Sender: sender.String(), TxOrigin: sender.String(), @@ -211,7 +211,7 @@ func TestKeeper_RefundAmountOnZetaChainERC20(t *testing.T) { err := k.RefundAmountOnZetaChainERC20(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: common.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, SenderChainId: chainID, Sender: sender.String(), Asset: asset, @@ -233,7 +233,7 @@ func TestKeeper_RefundAmountOnZetaChainERC20(t *testing.T) { // can refund again err = k.RefundAmountOnZetaChainERC20(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: common.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, SenderChainId: chainID, Sender: sender.String(), Asset: asset, @@ -252,7 +252,7 @@ func TestKeeper_RefundAmountOnZetaChainERC20(t *testing.T) { err := k.RefundAmountOnZetaChainERC20(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: common.CoinType_Zeta, + CoinType: pkg.CoinType_Zeta, Amount: math.NewUint(42), }}, sample.EthAddress(), @@ -261,7 +261,7 @@ func TestKeeper_RefundAmountOnZetaChainERC20(t *testing.T) { err = k.RefundAmountOnZetaChainERC20(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: common.CoinType_Gas, + CoinType: pkg.CoinType_Gas, }}, sample.EthAddress(), ) @@ -269,7 +269,7 @@ func TestKeeper_RefundAmountOnZetaChainERC20(t *testing.T) { err = k.RefundAmountOnZetaChainERC20(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: common.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, SenderChainId: 999999, Amount: math.NewUint(42), }}, @@ -279,7 +279,7 @@ func TestKeeper_RefundAmountOnZetaChainERC20(t *testing.T) { err = k.RefundAmountOnZetaChainERC20(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: common.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, SenderChainId: getValidEthChainID(t), Sender: sample.EthAddress().String(), Amount: math.Uint{}, @@ -290,7 +290,7 @@ func TestKeeper_RefundAmountOnZetaChainERC20(t *testing.T) { err = k.RefundAmountOnZetaChainERC20(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: common.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, SenderChainId: getValidEthChainID(t), Sender: sample.EthAddress().String(), Amount: math.ZeroUint(), @@ -302,7 +302,7 @@ func TestKeeper_RefundAmountOnZetaChainERC20(t *testing.T) { // the foreign coin has not been set err = k.RefundAmountOnZetaChainERC20(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: common.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, SenderChainId: getValidEthChainID(t), Sender: sample.EthAddress().String(), Asset: sample.EthAddress().String(), diff --git a/x/crosschain/keeper/verify_proof.go b/x/crosschain/keeper/verify_proof.go index a2d6464855..7df158457d 100644 --- a/x/crosschain/keeper/verify_proof.go +++ b/x/crosschain/keeper/verify_proof.go @@ -7,12 +7,12 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" eth "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" ) -func (k Keeper) VerifyProof(ctx sdk.Context, proof *common.Proof, chainID int64, blockHash string, txIndex int64) ([]byte, error) { +func (k Keeper) VerifyProof(ctx sdk.Context, proof *pkg.Proof, chainID int64, blockHash string, txIndex int64) ([]byte, error) { // header-based merkle proof verification must be enabled crosschainFlags, found := k.zetaObserverKeeper.GetCrosschainFlags(ctx) if !found { @@ -21,15 +21,15 @@ func (k Keeper) VerifyProof(ctx sdk.Context, proof *common.Proof, chainID int64, if crosschainFlags.BlockHeaderVerificationFlags == nil { return nil, fmt.Errorf("block header verification flags not found") } - if common.IsBitcoinChain(chainID) && !crosschainFlags.BlockHeaderVerificationFlags.IsBtcTypeChainEnabled { + if pkg.IsBitcoinChain(chainID) && !crosschainFlags.BlockHeaderVerificationFlags.IsBtcTypeChainEnabled { return nil, fmt.Errorf("proof verification not enabled for bitcoin chain") } - if common.IsEVMChain(chainID) && !crosschainFlags.BlockHeaderVerificationFlags.IsEthTypeChainEnabled { + if pkg.IsEVMChain(chainID) && !crosschainFlags.BlockHeaderVerificationFlags.IsEthTypeChainEnabled { return nil, fmt.Errorf("proof verification not enabled for evm chain") } // chain must support header-based merkle proof verification - senderChain := common.GetChainFromChainID(chainID) + senderChain := pkg.GetChainFromChainID(chainID) if senderChain == nil { return nil, types.ErrUnsupportedChain } @@ -38,7 +38,7 @@ func (k Keeper) VerifyProof(ctx sdk.Context, proof *common.Proof, chainID int64, } // get block header from the store - hashBytes, err := common.StringToHash(chainID, blockHash) + hashBytes, err := pkg.StringToHash(chainID, blockHash) if err != nil { return nil, fmt.Errorf("block hash %s conversion failed %s", blockHash, err) } @@ -68,7 +68,7 @@ func (k Keeper) VerifyEVMInTxBody(ctx sdk.Context, msg *types.MsgAddToInTxTracke return fmt.Errorf("want evm chain id %d, got %d", txx.ChainId(), msg.ChainId) } switch msg.CoinType { - case common.CoinType_Zeta: + case pkg.CoinType_Zeta: chainParams, found := k.zetaObserverKeeper.GetChainParamsByChainID(ctx, msg.ChainId) if !found { return types.ErrUnsupportedChain.Wrapf("chain params not found for chain %d", msg.ChainId) @@ -77,7 +77,7 @@ func (k Keeper) VerifyEVMInTxBody(ctx sdk.Context, msg *types.MsgAddToInTxTracke return fmt.Errorf("receiver is not connector contract for coin type %s", msg.CoinType) } return nil - case common.CoinType_ERC20: + case pkg.CoinType_ERC20: chainParams, found := k.zetaObserverKeeper.GetChainParamsByChainID(ctx, msg.ChainId) if !found { return types.ErrUnsupportedChain.Wrapf("chain params not found for chain %d", msg.ChainId) @@ -86,7 +86,7 @@ func (k Keeper) VerifyEVMInTxBody(ctx sdk.Context, msg *types.MsgAddToInTxTracke return fmt.Errorf("receiver is not erc20Custory contract for coin type %s", msg.CoinType) } return nil - case common.CoinType_Gas: + case pkg.CoinType_Gas: tss, err := k.zetaObserverKeeper.GetTssAddress(ctx, &observertypes.QueryGetTssAddressRequest{ BitcoinChainId: msg.ChainId, }) diff --git a/x/crosschain/migrations/v4/migrate.go b/x/crosschain/migrations/v4/migrate.go index e4b368e44c..4b29169263 100644 --- a/x/crosschain/migrations/v4/migrate.go +++ b/x/crosschain/migrations/v4/migrate.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/store/prefix" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -54,7 +54,7 @@ func SetZetaAccounting( for ; iterator.Valid(); iterator.Next() { var val types.CrossChainTx cdc.MustUnmarshal(iterator.Value(), &val) - if val.CctxStatus.Status == types.CctxStatus_Aborted && val.GetCurrentOutTxParam().CoinType == common.CoinType_Zeta { + if val.CctxStatus.Status == types.CctxStatus_Aborted && val.GetCurrentOutTxParam().CoinType == pkg.CoinType_Zeta { abortedAmountZeta = abortedAmountZeta.Add(val.GetCurrentOutTxParam().Amount) } } @@ -176,7 +176,7 @@ func SetBitcoinFinalizedInbound(ctx sdk.Context, crosschainKeeper crosschainKeep for _, cctx := range crosschainKeeper.GetAllCrossChainTx(ctx) { if cctx.InboundTxParams != nil { // check if bitcoin inbound - if common.IsBitcoinChain(cctx.InboundTxParams.SenderChainId) { + if pkg.IsBitcoinChain(cctx.InboundTxParams.SenderChainId) { // add finalized inbound crosschainKeeper.AddFinalizedInbound( ctx, diff --git a/x/crosschain/migrations/v4/migrate_test.go b/x/crosschain/migrations/v4/migrate_test.go index d377f1a6fa..14d6b88cbb 100644 --- a/x/crosschain/migrations/v4/migrate_test.go +++ b/x/crosschain/migrations/v4/migrate_test.go @@ -10,7 +10,7 @@ import ( "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/crosschain/keeper" @@ -96,49 +96,49 @@ func TestSetBitcoinFinalizedInbound(t *testing.T) { k.SetCrossChainTx(ctx, types.CrossChainTx{ Index: "0", InboundTxParams: &types.InboundTxParams{ - SenderChainId: common.GoerliChain().ChainId, + SenderChainId: pkg.GoerliChain().ChainId, InboundTxObservedHash: "0xaaa", }, }) k.SetCrossChainTx(ctx, types.CrossChainTx{ Index: "1", InboundTxParams: &types.InboundTxParams{ - SenderChainId: common.BtcMainnetChain().ChainId, + SenderChainId: pkg.BtcMainnetChain().ChainId, InboundTxObservedHash: "0x111", }, }) k.SetCrossChainTx(ctx, types.CrossChainTx{ Index: "2", InboundTxParams: &types.InboundTxParams{ - SenderChainId: common.EthChain().ChainId, + SenderChainId: pkg.EthChain().ChainId, InboundTxObservedHash: "0xbbb", }, }) k.SetCrossChainTx(ctx, types.CrossChainTx{ Index: "3", InboundTxParams: &types.InboundTxParams{ - SenderChainId: common.BtcTestNetChain().ChainId, + SenderChainId: pkg.BtcTestNetChain().ChainId, InboundTxObservedHash: "0x222", }, }) k.SetCrossChainTx(ctx, types.CrossChainTx{ Index: "4", InboundTxParams: &types.InboundTxParams{ - SenderChainId: common.BtcTestNetChain().ChainId, + SenderChainId: pkg.BtcTestNetChain().ChainId, InboundTxObservedHash: "0x333", }, }) k.SetCrossChainTx(ctx, types.CrossChainTx{ Index: "5", InboundTxParams: &types.InboundTxParams{ - SenderChainId: common.MumbaiChain().ChainId, + SenderChainId: pkg.MumbaiChain().ChainId, InboundTxObservedHash: "0xccc", }, }) k.SetCrossChainTx(ctx, types.CrossChainTx{ Index: "6", InboundTxParams: &types.InboundTxParams{ - SenderChainId: common.BtcRegtestChain().ChainId, + SenderChainId: pkg.BtcRegtestChain().ChainId, InboundTxObservedHash: "0x444", }, }) @@ -147,13 +147,13 @@ func TestSetBitcoinFinalizedInbound(t *testing.T) { v4.SetBitcoinFinalizedInbound(ctx, k) // check finalized inbound - require.False(t, k.IsFinalizedInbound(ctx, "0xaaa", common.GoerliChain().ChainId, 0)) - require.False(t, k.IsFinalizedInbound(ctx, "0xbbb", common.EthChain().ChainId, 0)) - require.False(t, k.IsFinalizedInbound(ctx, "0xccc", common.MumbaiChain().ChainId, 0)) - require.True(t, k.IsFinalizedInbound(ctx, "0x111", common.BtcMainnetChain().ChainId, 0)) - require.True(t, k.IsFinalizedInbound(ctx, "0x222", common.BtcTestNetChain().ChainId, 0)) - require.True(t, k.IsFinalizedInbound(ctx, "0x333", common.BtcTestNetChain().ChainId, 0)) - require.True(t, k.IsFinalizedInbound(ctx, "0x444", common.BtcRegtestChain().ChainId, 0)) + require.False(t, k.IsFinalizedInbound(ctx, "0xaaa", pkg.GoerliChain().ChainId, 0)) + require.False(t, k.IsFinalizedInbound(ctx, "0xbbb", pkg.EthChain().ChainId, 0)) + require.False(t, k.IsFinalizedInbound(ctx, "0xccc", pkg.MumbaiChain().ChainId, 0)) + require.True(t, k.IsFinalizedInbound(ctx, "0x111", pkg.BtcMainnetChain().ChainId, 0)) + require.True(t, k.IsFinalizedInbound(ctx, "0x222", pkg.BtcTestNetChain().ChainId, 0)) + require.True(t, k.IsFinalizedInbound(ctx, "0x333", pkg.BtcTestNetChain().ChainId, 0)) + require.True(t, k.IsFinalizedInbound(ctx, "0x444", pkg.BtcRegtestChain().ChainId, 0)) }) } @@ -170,7 +170,7 @@ func SetRandomCctx(ctx sdk.Context, k keeper.Keeper) sdkmath.Uint { CctxStatus: &types.Status{Status: types.CctxStatus_Aborted}, OutboundTxParams: []*types.OutboundTxParams{{ Amount: amount, - CoinType: common.CoinType_Zeta, + CoinType: pkg.CoinType_Zeta, }}, }) totalZeta = totalZeta.Add(amount) diff --git a/x/crosschain/migrations/v5/migrate.go b/x/crosschain/migrations/v5/migrate.go index 27ceba92cc..8e6567f156 100644 --- a/x/crosschain/migrations/v5/migrate.go +++ b/x/crosschain/migrations/v5/migrate.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" ) @@ -69,17 +69,17 @@ func ResetTestnetNonce( } type TestnetNonce struct { - chain common.Chain + chain pkg.Chain nonceHigh uint64 nonceLow uint64 } func CurrentTestnetChains() []TestnetNonce { return []TestnetNonce{ - {chain: common.GoerliChain(), nonceHigh: 226841, nonceLow: 226841}, - {chain: common.MumbaiChain(), nonceHigh: 200599, nonceLow: 200599}, - {chain: common.BscTestnetChain(), nonceHigh: 110454, nonceLow: 110454}, - {chain: common.BtcTestNetChain(), nonceHigh: 4881, nonceLow: 4881}, + {chain: pkg.GoerliChain(), nonceHigh: 226841, nonceLow: 226841}, + {chain: pkg.MumbaiChain(), nonceHigh: 200599, nonceLow: 200599}, + {chain: pkg.BscTestnetChain(), nonceHigh: 110454, nonceLow: 110454}, + {chain: pkg.BtcTestNetChain(), nonceHigh: 4881, nonceLow: 4881}, } } @@ -94,7 +94,7 @@ func SetZetaAccounting( if cctx.CctxStatus.Status == types.CctxStatus_Aborted { switch cctx.InboundTxParams.CoinType { - case common.CoinType_ERC20: + case pkg.CoinType_ERC20: { receiverChain := observerKeeper.GetSupportedChainFromChainID(ctx, cctx.GetCurrentOutTxParam().ReceiverChainId) if receiverChain == nil { @@ -110,7 +110,7 @@ func SetZetaAccounting( cctx.CctxStatus.IsAbortRefunded = false } } - case common.CoinType_Zeta: + case pkg.CoinType_Zeta: { // add the required amount into the zeta accounting. // GetAbortedAmount replaces using Outbound Amount directly, to make sure we refund the amount deposited by the user if the outbound is never created and the cctx is aborted. @@ -120,7 +120,7 @@ func SetZetaAccounting( cctx.CctxStatus.IsAbortRefunded = false } - case common.CoinType_Gas: + case pkg.CoinType_Gas: { // CointType gas can be processed as normal and we can issue the refund using the admin refund tx . cctx.CctxStatus.IsAbortRefunded = false diff --git a/x/crosschain/migrations/v5/migrate_test.go b/x/crosschain/migrations/v5/migrate_test.go index 62169c0431..010c9000a4 100644 --- a/x/crosschain/migrations/v5/migrate_test.go +++ b/x/crosschain/migrations/v5/migrate_test.go @@ -7,7 +7,7 @@ import ( "cosmossdk.io/math" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" crosschainkeeper "github.com/zeta-chain/zetacore/x/crosschain/keeper" @@ -24,7 +24,7 @@ func TestMigrateStore(t *testing.T) { v4ZetaAccountingAmount := math.ZeroUint() for _, cctx := range cctxList { k.SetCrossChainTx(ctx, cctx) - if cctx.CctxStatus.Status != crosschaintypes.CctxStatus_Aborted || cctx.GetCurrentOutTxParam().CoinType != common.CoinType_Zeta { + if cctx.CctxStatus.Status != crosschaintypes.CctxStatus_Aborted || cctx.GetCurrentOutTxParam().CoinType != pkg.CoinType_Zeta { continue } v5ZetaAccountingAmount = v5ZetaAccountingAmount.Add(crosschainkeeper.GetAbortedAmount(cctx)) @@ -45,7 +45,7 @@ func TestMigrateStore(t *testing.T) { // Check refund status of the cctx for _, cctx := range cctxListUpdated { switch cctx.InboundTxParams.CoinType { - case common.CoinType_ERC20: + case pkg.CoinType_ERC20: receiverChain := zk.ObserverKeeper.GetSupportedChainFromChainID(ctx, cctx.GetCurrentOutTxParam().ReceiverChainId) require.NotNil(t, receiverChain) if receiverChain.IsZetaChain() { @@ -53,9 +53,9 @@ func TestMigrateStore(t *testing.T) { } else { require.False(t, cctx.CctxStatus.IsAbortRefunded) } - case common.CoinType_Zeta: + case pkg.CoinType_Zeta: require.False(t, cctx.CctxStatus.IsAbortRefunded) - case common.CoinType_Gas: + case pkg.CoinType_Gas: require.False(t, cctx.CctxStatus.IsAbortRefunded) } } @@ -66,8 +66,8 @@ func TestMigrateStore(t *testing.T) { func TestResetTestnetNonce(t *testing.T) { t.Run("reset only testnet nonce without changing mainnet chains", func(t *testing.T) { k, ctx, _, zk := keepertest.CrosschainKeeper(t) - testnetChains := []common.Chain{common.GoerliChain(), common.MumbaiChain(), common.BscTestnetChain(), common.BtcTestNetChain()} - mainnetChains := []common.Chain{common.EthChain(), common.BscMainnetChain(), common.BtcMainnetChain()} + testnetChains := []pkg.Chain{pkg.GoerliChain(), pkg.MumbaiChain(), pkg.BscTestnetChain(), pkg.BtcTestNetChain()} + mainnetChains := []pkg.Chain{pkg.EthChain(), pkg.BscMainnetChain(), pkg.BtcMainnetChain()} nonceLow := int64(1) nonceHigh := int64(10) tss := sample.Tss() @@ -100,11 +100,11 @@ func TestResetTestnetNonce(t *testing.T) { } err := v5.MigrateStore(ctx, k, zk.ObserverKeeper) require.NoError(t, err) - assertValues := map[common.Chain]int64{ - common.GoerliChain(): 226841, - common.MumbaiChain(): 200599, - common.BscTestnetChain(): 110454, - common.BtcTestNetChain(): 4881, + assertValues := map[pkg.Chain]int64{ + pkg.GoerliChain(): 226841, + pkg.MumbaiChain(): 200599, + pkg.BscTestnetChain(): 110454, + pkg.BtcTestNetChain(): 4881, } for _, chain := range testnetChains { @@ -129,7 +129,7 @@ func TestResetTestnetNonce(t *testing.T) { t.Run("reset nonce even if some chain values are missing", func(t *testing.T) { k, ctx, _, zk := keepertest.CrosschainKeeper(t) - testnetChains := []common.Chain{common.GoerliChain()} + testnetChains := []pkg.Chain{pkg.GoerliChain()} nonceLow := int64(1) nonceHigh := int64(10) tss := sample.Tss() @@ -149,10 +149,10 @@ func TestResetTestnetNonce(t *testing.T) { } err := v5.MigrateStore(ctx, k, zk.ObserverKeeper) require.NoError(t, err) - assertValuesSet := map[common.Chain]int64{ - common.GoerliChain(): 226841, + assertValuesSet := map[pkg.Chain]int64{ + pkg.GoerliChain(): 226841, } - assertValuesNotSet := []common.Chain{common.MumbaiChain(), common.BscTestnetChain(), common.BtcTestNetChain()} + assertValuesNotSet := []pkg.Chain{pkg.MumbaiChain(), pkg.BscTestnetChain(), pkg.BtcTestNetChain()} for _, chain := range testnetChains { pn, found := zk.ObserverKeeper.GetPendingNonces(ctx, tss.TssPubkey, chain.ChainId) @@ -183,11 +183,11 @@ func CrossChainTxList(count int) []crosschaintypes.CrossChainTx { CctxStatus: &crosschaintypes.Status{Status: crosschaintypes.CctxStatus_Aborted}, InboundTxParams: &crosschaintypes.InboundTxParams{ Amount: amount.Add(math.NewUint(uint64(r.Uint32()))), - CoinType: common.CoinType_Zeta, + CoinType: pkg.CoinType_Zeta, }, OutboundTxParams: []*crosschaintypes.OutboundTxParams{{ Amount: amount, - CoinType: common.CoinType_Zeta, + CoinType: pkg.CoinType_Zeta, }}, } for ; i < count; i++ { @@ -197,11 +197,11 @@ func CrossChainTxList(count int) []crosschaintypes.CrossChainTx { CctxStatus: &crosschaintypes.Status{Status: crosschaintypes.CctxStatus_Aborted}, InboundTxParams: &crosschaintypes.InboundTxParams{ Amount: amount, - CoinType: common.CoinType_Zeta, + CoinType: pkg.CoinType_Zeta, }, OutboundTxParams: []*crosschaintypes.OutboundTxParams{{ Amount: math.ZeroUint(), - CoinType: common.CoinType_Zeta, + CoinType: pkg.CoinType_Zeta, }}, } } @@ -212,12 +212,12 @@ func CrossChainTxList(count int) []crosschaintypes.CrossChainTx { CctxStatus: &crosschaintypes.Status{Status: crosschaintypes.CctxStatus_Aborted}, InboundTxParams: &crosschaintypes.InboundTxParams{ Amount: amount, - CoinType: common.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, }, OutboundTxParams: []*crosschaintypes.OutboundTxParams{{ Amount: math.ZeroUint(), - CoinType: common.CoinType_ERC20, - ReceiverChainId: common.ZetaPrivnetChain().ChainId, + CoinType: pkg.CoinType_ERC20, + ReceiverChainId: pkg.ZetaPrivnetChain().ChainId, }}, } } @@ -228,12 +228,12 @@ func CrossChainTxList(count int) []crosschaintypes.CrossChainTx { CctxStatus: &crosschaintypes.Status{Status: crosschaintypes.CctxStatus_Aborted}, InboundTxParams: &crosschaintypes.InboundTxParams{ Amount: amount, - CoinType: common.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, }, OutboundTxParams: []*crosschaintypes.OutboundTxParams{{ Amount: math.ZeroUint(), - CoinType: common.CoinType_ERC20, - ReceiverChainId: common.GoerliLocalnetChain().ChainId, + CoinType: pkg.CoinType_ERC20, + ReceiverChainId: pkg.GoerliLocalnetChain().ChainId, }}, } } @@ -244,11 +244,11 @@ func CrossChainTxList(count int) []crosschaintypes.CrossChainTx { CctxStatus: &crosschaintypes.Status{Status: crosschaintypes.CctxStatus_Aborted}, InboundTxParams: &crosschaintypes.InboundTxParams{ Amount: amount, - CoinType: common.CoinType_Gas, + CoinType: pkg.CoinType_Gas, }, OutboundTxParams: []*crosschaintypes.OutboundTxParams{{ Amount: amount, - CoinType: common.CoinType_Gas, + CoinType: pkg.CoinType_Gas, }}, } } diff --git a/x/crosschain/types/expected_keepers.go b/x/crosschain/types/expected_keepers.go index 6f77d4c2dc..e8a11b2d44 100644 --- a/x/crosschain/types/expected_keepers.go +++ b/x/crosschain/types/expected_keepers.go @@ -9,7 +9,7 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" eth "github.com/ethereum/go-ethereum/common" evmtypes "github.com/evmos/ethermint/x/evm/types" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" fungibletypes "github.com/zeta-chain/zetacore/x/fungible/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" @@ -46,9 +46,9 @@ type ObserverKeeper interface { AddVoteToBallot(ctx sdk.Context, ballot observertypes.Ballot, address string, observationType observertypes.VoteType) (observertypes.Ballot, error) CheckIfFinalizingVote(ctx sdk.Context, ballot observertypes.Ballot) (observertypes.Ballot, bool) IsAuthorized(ctx sdk.Context, address string) bool - FindBallot(ctx sdk.Context, index string, chain *common.Chain, observationType observertypes.ObservationType) (ballot observertypes.Ballot, isNew bool, err error) + FindBallot(ctx sdk.Context, index string, chain *pkg.Chain, observationType observertypes.ObservationType) (ballot observertypes.Ballot, isNew bool, err error) AddBallotToList(ctx sdk.Context, ballot observertypes.Ballot) - GetBlockHeader(ctx sdk.Context, hash []byte) (val common.BlockHeader, found bool) + GetBlockHeader(ctx sdk.Context, hash []byte) (val pkg.BlockHeader, found bool) CheckIfTssPubkeyHasBeenGenerated(ctx sdk.Context, tssPubkey string) (observertypes.TSS, bool) GetAllTSS(ctx sdk.Context) (list []observertypes.TSS) GetTSS(ctx sdk.Context) (val observertypes.TSS, found bool) @@ -75,7 +75,7 @@ type ObserverKeeper interface { ctx sdk.Context, senderChainID int64, receiverChainID int64, - coinType common.CoinType, + coinType pkg.CoinType, voter string, ballotIndex string, inTxHash string, @@ -84,11 +84,11 @@ type ObserverKeeper interface { ctx sdk.Context, ballotIndex string, outTxChainID int64, - receiveStatus common.ReceiveStatus, + receiveStatus pkg.ReceiveStatus, voter string, ) (bool, bool, observertypes.Ballot, string, error) - GetSupportedChainFromChainID(ctx sdk.Context, chainID int64) *common.Chain - GetSupportedChains(ctx sdk.Context) []*common.Chain + GetSupportedChainFromChainID(ctx sdk.Context, chainID int64) *pkg.Chain + GetSupportedChains(ctx sdk.Context) []*pkg.Chain } type FungibleKeeper interface { @@ -120,7 +120,7 @@ type FungibleKeeper interface { amount *big.Int, senderChainID int64, data []byte, - coinType common.CoinType, + coinType pkg.CoinType, asset string, ) (*evmtypes.MsgEthereumTxResponse, bool, error) CallUniswapV2RouterSwapExactTokensForTokens( @@ -154,7 +154,7 @@ type FungibleKeeper interface { name, symbol string, decimals uint8, chainID int64, - coinType common.CoinType, + coinType pkg.CoinType, erc20Contract string, gasLimit *big.Int, ) (eth.Address, error) diff --git a/x/crosschain/types/message_add_to_in_tx_tracker.go b/x/crosschain/types/message_add_to_in_tx_tracker.go index 5f15f4d735..f48f250663 100644 --- a/x/crosschain/types/message_add_to_in_tx_tracker.go +++ b/x/crosschain/types/message_add_to_in_tx_tracker.go @@ -4,14 +4,14 @@ import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" ) const TypeMsgAddToInTxTracker = "AddToInTxTracker" var _ sdk.Msg = &MsgAddToInTxTracker{} -func NewMsgAddToInTxTracker(creator string, chain int64, coinType common.CoinType, txHash string) *MsgAddToInTxTracker { +func NewMsgAddToInTxTracker(creator string, chain int64, coinType pkg.CoinType, txHash string) *MsgAddToInTxTracker { return &MsgAddToInTxTracker{ Creator: creator, ChainId: chain, @@ -46,14 +46,14 @@ func (msg *MsgAddToInTxTracker) ValidateBasic() error { if err != nil { return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) } - chain := common.GetChainFromChainID(msg.ChainId) + chain := pkg.GetChainFromChainID(msg.ChainId) if chain == nil { return errorsmod.Wrapf(ErrInvalidChainID, "chain id (%d)", msg.ChainId) } if msg.Proof != nil && !chain.SupportMerkleProof() { return errorsmod.Wrapf(ErrProofVerificationFail, "chain id %d does not support proof-based trackers", msg.ChainId) } - _, ok := common.CoinType_value[msg.CoinType.String()] + _, ok := pkg.CoinType_value[msg.CoinType.String()] if !ok { return errorsmod.Wrapf(ErrProofVerificationFail, "coin-type not supported") } diff --git a/x/crosschain/types/message_add_to_in_tx_tracker_test.go b/x/crosschain/types/message_add_to_in_tx_tracker_test.go index 2200f04421..1884a8e14d 100644 --- a/x/crosschain/types/message_add_to_in_tx_tracker_test.go +++ b/x/crosschain/types/message_add_to_in_tx_tracker_test.go @@ -7,7 +7,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/crosschain/types" ) @@ -22,8 +22,8 @@ func TestMsgAddToInTxTracker_ValidateBasic(t *testing.T) { name: "invalid address", msg: types.NewMsgAddToInTxTracker( "invalid_address", - common.GoerliChain().ChainId, - common.CoinType_Gas, + pkg.GoerliChain().ChainId, + pkg.CoinType_Gas, "hash", ), err: sdkerrors.ErrInvalidAddress, @@ -33,7 +33,7 @@ func TestMsgAddToInTxTracker_ValidateBasic(t *testing.T) { msg: types.NewMsgAddToInTxTracker( sample.AccAddress(), 42, - common.CoinType_Gas, + pkg.CoinType_Gas, "hash", ), err: errorsmod.Wrapf(types.ErrInvalidChainID, "chain id (%d)", 42), @@ -42,17 +42,17 @@ func TestMsgAddToInTxTracker_ValidateBasic(t *testing.T) { name: "invalid proof", msg: &types.MsgAddToInTxTracker{ Creator: sample.AccAddress(), - ChainId: common.ZetaTestnetChain().ChainId, - CoinType: common.CoinType_Gas, - Proof: &common.Proof{}, + ChainId: pkg.ZetaTestnetChain().ChainId, + CoinType: pkg.CoinType_Gas, + Proof: &pkg.Proof{}, }, - err: errorsmod.Wrapf(types.ErrProofVerificationFail, "chain id %d does not support proof-based trackers", common.ZetaTestnetChain().ChainId), + err: errorsmod.Wrapf(types.ErrProofVerificationFail, "chain id %d does not support proof-based trackers", pkg.ZetaTestnetChain().ChainId), }, { name: "invalid coin type", msg: &types.MsgAddToInTxTracker{ Creator: sample.AccAddress(), - ChainId: common.ZetaTestnetChain().ChainId, + ChainId: pkg.ZetaTestnetChain().ChainId, CoinType: 5, }, err: errorsmod.Wrapf(types.ErrProofVerificationFail, "coin-type not supported"), @@ -61,8 +61,8 @@ func TestMsgAddToInTxTracker_ValidateBasic(t *testing.T) { name: "valid", msg: types.NewMsgAddToInTxTracker( sample.AccAddress(), - common.GoerliChain().ChainId, - common.CoinType_Gas, + pkg.GoerliChain().ChainId, + pkg.CoinType_Gas, "hash", ), err: nil, @@ -91,8 +91,8 @@ func TestMsgAddToInTxTracker_GetSigners(t *testing.T) { name: "valid signer", msg: types.NewMsgAddToInTxTracker( signer, - common.GoerliChain().ChainId, - common.CoinType_Gas, + pkg.GoerliChain().ChainId, + pkg.CoinType_Gas, "hash", ), panics: false, @@ -101,8 +101,8 @@ func TestMsgAddToInTxTracker_GetSigners(t *testing.T) { name: "invalid signer", msg: types.NewMsgAddToInTxTracker( "invalid_address", - common.GoerliChain().ChainId, - common.CoinType_Gas, + pkg.GoerliChain().ChainId, + pkg.CoinType_Gas, "hash", ), panics: true, @@ -126,8 +126,8 @@ func TestMsgAddToInTxTracker_GetSigners(t *testing.T) { func TestMsgAddToInTxTracker_Type(t *testing.T) { msg := types.NewMsgAddToInTxTracker( sample.AccAddress(), - common.GoerliChain().ChainId, - common.CoinType_Gas, + pkg.GoerliChain().ChainId, + pkg.CoinType_Gas, "hash", ) require.Equal(t, types.TypeMsgAddToInTxTracker, msg.Type()) @@ -136,8 +136,8 @@ func TestMsgAddToInTxTracker_Type(t *testing.T) { func TestMsgAddToInTxTracker_Route(t *testing.T) { msg := types.NewMsgAddToInTxTracker( sample.AccAddress(), - common.GoerliChain().ChainId, - common.CoinType_Gas, + pkg.GoerliChain().ChainId, + pkg.CoinType_Gas, "hash", ) require.Equal(t, types.RouterKey, msg.Route()) @@ -146,8 +146,8 @@ func TestMsgAddToInTxTracker_Route(t *testing.T) { func TestMsgAddToInTxTracker_GetSignBytes(t *testing.T) { msg := types.NewMsgAddToInTxTracker( sample.AccAddress(), - common.GoerliChain().ChainId, - common.CoinType_Gas, + pkg.GoerliChain().ChainId, + pkg.CoinType_Gas, "hash", ) require.NotPanics(t, func() { diff --git a/x/crosschain/types/message_add_to_out_tx_tracker.go b/x/crosschain/types/message_add_to_out_tx_tracker.go index 45084ec7b3..71f2c312b2 100644 --- a/x/crosschain/types/message_add_to_out_tx_tracker.go +++ b/x/crosschain/types/message_add_to_out_tx_tracker.go @@ -4,7 +4,7 @@ import ( cosmoserrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" ) const TypeMsgAddToOutTxTracker = "AddToTracker" @@ -16,7 +16,7 @@ func NewMsgAddToOutTxTracker( chain int64, nonce uint64, txHash string, - proof *common.Proof, + proof *pkg.Proof, blockHash string, txIndex int64, ) *MsgAddToOutTxTracker { diff --git a/x/crosschain/types/message_gas_price_voter.go b/x/crosschain/types/message_gas_price_voter.go index e21fa80dce..954cc54f9d 100644 --- a/x/crosschain/types/message_gas_price_voter.go +++ b/x/crosschain/types/message_gas_price_voter.go @@ -4,7 +4,7 @@ import ( cosmoserrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" ) var _ sdk.Msg = &MsgGasPriceVoter{} @@ -24,7 +24,7 @@ func (msg *MsgGasPriceVoter) Route() string { } func (msg *MsgGasPriceVoter) Type() string { - return common.GasPriceVoter.String() + return pkg.GasPriceVoter.String() } func (msg *MsgGasPriceVoter) GetSigners() []sdk.AccAddress { diff --git a/x/crosschain/types/message_gas_price_voter_test.go b/x/crosschain/types/message_gas_price_voter_test.go index 1c8ec9bd47..d0cf868333 100644 --- a/x/crosschain/types/message_gas_price_voter_test.go +++ b/x/crosschain/types/message_gas_price_voter_test.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/stretchr/testify/require" - common "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/crosschain/types" ) @@ -103,7 +103,7 @@ func TestMsgGasPriceVoter_Type(t *testing.T) { msg := types.MsgGasPriceVoter{ Creator: sample.AccAddress(), } - require.Equal(t, common.GasPriceVoter.String(), msg.Type()) + require.Equal(t, pkg.GasPriceVoter.String(), msg.Type()) } func TestMsgGasPriceVoter_Route(t *testing.T) { diff --git a/x/crosschain/types/message_migrate_tss_funds.go b/x/crosschain/types/message_migrate_tss_funds.go index ec5076caa0..818fe907e0 100644 --- a/x/crosschain/types/message_migrate_tss_funds.go +++ b/x/crosschain/types/message_migrate_tss_funds.go @@ -5,7 +5,7 @@ import ( sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" ) const TypeMsgMigrateTssFunds = "MigrateTssFunds" @@ -46,7 +46,7 @@ func (msg *MsgMigrateTssFunds) ValidateBasic() error { if err != nil { return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) } - if common.GetChainFromChainID(msg.ChainId) == nil { + if pkg.GetChainFromChainID(msg.ChainId) == nil { return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "invalid chain id (%d)", msg.ChainId) } if msg.Amount.IsZero() { diff --git a/x/crosschain/types/message_migrate_tss_funds_test.go b/x/crosschain/types/message_migrate_tss_funds_test.go index e3461982f9..6b6ca5126a 100644 --- a/x/crosschain/types/message_migrate_tss_funds_test.go +++ b/x/crosschain/types/message_migrate_tss_funds_test.go @@ -6,7 +6,7 @@ import ( sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/crosschain/types" @@ -23,7 +23,7 @@ func TestNewMsgMigrateTssFunds_ValidateBasic(t *testing.T) { name: "invalid creator", msg: types.NewMsgMigrateTssFunds( "invalid address", - common.DefaultChainsList()[0].ChainId, + pkg.DefaultChainsList()[0].ChainId, sdkmath.NewUintFromString("100000"), ), error: true, @@ -41,7 +41,7 @@ func TestNewMsgMigrateTssFunds_ValidateBasic(t *testing.T) { name: "invalid amount", msg: types.NewMsgMigrateTssFunds( sample.AccAddress(), - common.DefaultChainsList()[0].ChainId, + pkg.DefaultChainsList()[0].ChainId, sdkmath.NewUintFromString("0"), ), error: true, @@ -50,7 +50,7 @@ func TestNewMsgMigrateTssFunds_ValidateBasic(t *testing.T) { name: "valid msg", msg: types.NewMsgMigrateTssFunds( sample.AccAddress(), - common.DefaultChainsList()[0].ChainId, + pkg.DefaultChainsList()[0].ChainId, sdkmath.NewUintFromString("100000"), ), error: false, @@ -80,7 +80,7 @@ func TestNewMsgMigrateTssFunds_GetSigners(t *testing.T) { name: "valid signer", msg: types.MsgMigrateTssFunds{ Creator: signer, - ChainId: common.DefaultChainsList()[0].ChainId, + ChainId: pkg.DefaultChainsList()[0].ChainId, Amount: sdkmath.NewUintFromString("100000"), }, panics: false, @@ -89,7 +89,7 @@ func TestNewMsgMigrateTssFunds_GetSigners(t *testing.T) { name: "invalid signer", msg: types.MsgMigrateTssFunds{ Creator: "invalid_address", - ChainId: common.DefaultChainsList()[0].ChainId, + ChainId: pkg.DefaultChainsList()[0].ChainId, Amount: sdkmath.NewUintFromString("100000"), }, panics: true, @@ -113,7 +113,7 @@ func TestNewMsgMigrateTssFunds_GetSigners(t *testing.T) { func TestNewMsgMigrateTssFunds_Type(t *testing.T) { msg := types.MsgMigrateTssFunds{ Creator: sample.AccAddress(), - ChainId: common.DefaultChainsList()[0].ChainId, + ChainId: pkg.DefaultChainsList()[0].ChainId, Amount: sdkmath.NewUintFromString("100000"), } require.Equal(t, types.TypeMsgMigrateTssFunds, msg.Type()) @@ -122,7 +122,7 @@ func TestNewMsgMigrateTssFunds_Type(t *testing.T) { func TestNewMsgMigrateTssFunds_Route(t *testing.T) { msg := types.MsgMigrateTssFunds{ Creator: sample.AccAddress(), - ChainId: common.DefaultChainsList()[0].ChainId, + ChainId: pkg.DefaultChainsList()[0].ChainId, Amount: sdkmath.NewUintFromString("100000"), } require.Equal(t, types.RouterKey, msg.Route()) @@ -131,7 +131,7 @@ func TestNewMsgMigrateTssFunds_Route(t *testing.T) { func TestNewMsgMigrateTssFunds_GetSignBytes(t *testing.T) { msg := types.MsgMigrateTssFunds{ Creator: sample.AccAddress(), - ChainId: common.DefaultChainsList()[0].ChainId, + ChainId: pkg.DefaultChainsList()[0].ChainId, Amount: sdkmath.NewUintFromString("100000"), } require.NotPanics(t, func() { diff --git a/x/crosschain/types/message_tss_voter.go b/x/crosschain/types/message_tss_voter.go index 6d65f19140..86fcd836b9 100644 --- a/x/crosschain/types/message_tss_voter.go +++ b/x/crosschain/types/message_tss_voter.go @@ -6,14 +6,14 @@ import ( cosmoserrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" ) const TypeMsgCreateTSSVoter = "CreateTSSVoter" var _ sdk.Msg = &MsgCreateTSSVoter{} -func NewMsgCreateTSSVoter(creator string, pubkey string, keygenZetaHeight int64, status common.ReceiveStatus) *MsgCreateTSSVoter { +func NewMsgCreateTSSVoter(creator string, pubkey string, keygenZetaHeight int64, status pkg.ReceiveStatus) *MsgCreateTSSVoter { return &MsgCreateTSSVoter{ Creator: creator, TssPubkey: pubkey, diff --git a/x/crosschain/types/message_tss_voter_test.go b/x/crosschain/types/message_tss_voter_test.go index 6fc5ca89ec..6f8df9f43a 100644 --- a/x/crosschain/types/message_tss_voter_test.go +++ b/x/crosschain/types/message_tss_voter_test.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/crosschain/types" @@ -20,11 +20,11 @@ func TestMsgCreateTSSVoter_ValidateBasic(t *testing.T) { }{ { name: "valid message", - msg: types.NewMsgCreateTSSVoter(sample.AccAddress(), "pubkey", 1, common.ReceiveStatus_Created), + msg: types.NewMsgCreateTSSVoter(sample.AccAddress(), "pubkey", 1, pkg.ReceiveStatus_Created), }, { name: "invalid creator address", - msg: types.NewMsgCreateTSSVoter("invalid", "pubkey", 1, common.ReceiveStatus_Created), + msg: types.NewMsgCreateTSSVoter("invalid", "pubkey", 1, pkg.ReceiveStatus_Created), err: sdkerrors.ErrInvalidAddress, }, } @@ -50,12 +50,12 @@ func TestMsgCreateTSSVoter_GetSigners(t *testing.T) { }{ { name: "valid signer", - msg: types.NewMsgCreateTSSVoter(signer, "pubkey", 1, common.ReceiveStatus_Created), + msg: types.NewMsgCreateTSSVoter(signer, "pubkey", 1, pkg.ReceiveStatus_Created), panics: false, }, { name: "invalid signer", - msg: types.NewMsgCreateTSSVoter("invalid", "pubkey", 1, common.ReceiveStatus_Created), + msg: types.NewMsgCreateTSSVoter("invalid", "pubkey", 1, pkg.ReceiveStatus_Created), panics: true, }, } @@ -75,23 +75,23 @@ func TestMsgCreateTSSVoter_GetSigners(t *testing.T) { } func TestMsgCreateTSSVoter_Type(t *testing.T) { - msg := types.NewMsgCreateTSSVoter(sample.AccAddress(), "pubkey", 1, common.ReceiveStatus_Created) + msg := types.NewMsgCreateTSSVoter(sample.AccAddress(), "pubkey", 1, pkg.ReceiveStatus_Created) require.Equal(t, types.TypeMsgCreateTSSVoter, msg.Type()) } func TestMsgCreateTSSVoter_Route(t *testing.T) { - msg := types.NewMsgCreateTSSVoter(sample.AccAddress(), "pubkey", 1, common.ReceiveStatus_Created) + msg := types.NewMsgCreateTSSVoter(sample.AccAddress(), "pubkey", 1, pkg.ReceiveStatus_Created) require.Equal(t, types.RouterKey, msg.Route()) } func TestMsgCreateTSSVoter_GetSignBytes(t *testing.T) { - msg := types.NewMsgCreateTSSVoter(sample.AccAddress(), "pubkey", 1, common.ReceiveStatus_Created) + msg := types.NewMsgCreateTSSVoter(sample.AccAddress(), "pubkey", 1, pkg.ReceiveStatus_Created) require.NotPanics(t, func() { msg.GetSignBytes() }) } func TestMsgCreateTSSVoter_Digest(t *testing.T) { - msg := types.NewMsgCreateTSSVoter(sample.AccAddress(), "pubkey", 1, common.ReceiveStatus_Created) + msg := types.NewMsgCreateTSSVoter(sample.AccAddress(), "pubkey", 1, pkg.ReceiveStatus_Created) require.Equal(t, "1-tss-keygen", msg.Digest()) } diff --git a/x/crosschain/types/message_vote_on_observed_inbound_tx.go b/x/crosschain/types/message_vote_on_observed_inbound_tx.go index 251a8a8077..31dec381d8 100644 --- a/x/crosschain/types/message_vote_on_observed_inbound_tx.go +++ b/x/crosschain/types/message_vote_on_observed_inbound_tx.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/ethereum/go-ethereum/crypto" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" ) // MaxMessageLength is the maximum length of a message in a cctx @@ -29,7 +29,7 @@ func NewMsgVoteOnObservedInboundTx( inTxHash string, inBlockHeight, gasLimit uint64, - coinType common.CoinType, + coinType pkg.CoinType, asset string, eventIndex uint, ) *MsgVoteOnObservedInboundTx { @@ -56,7 +56,7 @@ func (msg *MsgVoteOnObservedInboundTx) Route() string { } func (msg *MsgVoteOnObservedInboundTx) Type() string { - return common.InboundVoter.String() + return pkg.InboundVoter.String() } func (msg *MsgVoteOnObservedInboundTx) GetSigners() []sdk.AccAddress { diff --git a/x/crosschain/types/message_vote_on_observed_inbound_tx_test.go b/x/crosschain/types/message_vote_on_observed_inbound_tx_test.go index ea3bff7bf7..06d4340443 100644 --- a/x/crosschain/types/message_vote_on_observed_inbound_tx_test.go +++ b/x/crosschain/types/message_vote_on_observed_inbound_tx_test.go @@ -9,7 +9,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/crosschain/types" ) @@ -36,7 +36,7 @@ func TestMsgVoteOnObservedInboundTx_ValidateBasic(t *testing.T) { sample.String(), 42, 42, - common.CoinType_Zeta, + pkg.CoinType_Zeta, sample.String(), 42, ), @@ -55,7 +55,7 @@ func TestMsgVoteOnObservedInboundTx_ValidateBasic(t *testing.T) { sample.String(), 42, 42, - common.CoinType_Zeta, + pkg.CoinType_Zeta, sample.String(), 42, ), @@ -75,7 +75,7 @@ func TestMsgVoteOnObservedInboundTx_ValidateBasic(t *testing.T) { sample.String(), 42, 42, - common.CoinType_Zeta, + pkg.CoinType_Zeta, sample.String(), 42, ), @@ -95,7 +95,7 @@ func TestMsgVoteOnObservedInboundTx_ValidateBasic(t *testing.T) { sample.String(), 42, 42, - common.CoinType_Zeta, + pkg.CoinType_Zeta, sample.String(), 42, ), @@ -115,7 +115,7 @@ func TestMsgVoteOnObservedInboundTx_ValidateBasic(t *testing.T) { sample.String(), 42, 42, - common.CoinType_Zeta, + pkg.CoinType_Zeta, sample.String(), 42, ), @@ -149,7 +149,7 @@ func TestMsgVoteOnObservedInboundTx_Digest(t *testing.T) { InTxHash: sample.String(), InBlockHeight: 42, GasLimit: 42, - CoinType: common.CoinType_Zeta, + CoinType: pkg.CoinType_Zeta, Asset: sample.String(), EventIndex: 42, } @@ -224,7 +224,7 @@ func TestMsgVoteOnObservedInboundTx_Digest(t *testing.T) { // coin type used msg2 = msg - msg2.CoinType = common.CoinType_ERC20 + msg2.CoinType = pkg.CoinType_ERC20 hash2 = msg2.Digest() require.NotEqual(t, hash, hash2, "coin type should change hash") @@ -282,7 +282,7 @@ func TestMsgVoteOnObservedInboundTx_Type(t *testing.T) { msg := types.MsgVoteOnObservedInboundTx{ Creator: sample.AccAddress(), } - require.Equal(t, common.InboundVoter.String(), msg.Type()) + require.Equal(t, pkg.InboundVoter.String(), msg.Type()) } func TestMsgVoteOnObservedInboundTx_Route(t *testing.T) { diff --git a/x/crosschain/types/message_vote_on_observed_outbound_tx.go b/x/crosschain/types/message_vote_on_observed_outbound_tx.go index 12d0276847..570f98648b 100644 --- a/x/crosschain/types/message_vote_on_observed_outbound_tx.go +++ b/x/crosschain/types/message_vote_on_observed_outbound_tx.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/ethereum/go-ethereum/crypto" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" ) var _ sdk.Msg = &MsgVoteOnObservedOutboundTx{} @@ -20,10 +20,10 @@ func NewMsgVoteOnObservedOutboundTx( outTxEffectiveGasPrice math.Int, outTxEffectiveGasLimit uint64, valueReceived math.Uint, - status common.ReceiveStatus, + status pkg.ReceiveStatus, chain int64, nonce uint64, - coinType common.CoinType, + coinType pkg.CoinType, ) *MsgVoteOnObservedOutboundTx { return &MsgVoteOnObservedOutboundTx{ Creator: creator, @@ -46,7 +46,7 @@ func (msg *MsgVoteOnObservedOutboundTx) Route() string { } func (msg *MsgVoteOnObservedOutboundTx) Type() string { - return common.OutboundVoter.String() + return pkg.OutboundVoter.String() } func (msg *MsgVoteOnObservedOutboundTx) GetSigners() []sdk.AccAddress { @@ -79,7 +79,7 @@ func (msg *MsgVoteOnObservedOutboundTx) Digest() string { m.Creator = "" // Set status to ReceiveStatus_Created to make sure both successful and failed votes are added to the same ballot - m.Status = common.ReceiveStatus_Created + m.Status = pkg.ReceiveStatus_Created // Outbound and reverted txs have different digest as ObservedOutTxHash is different so they are stored in different ballots hash := crypto.Keccak256Hash([]byte(m.String())) diff --git a/x/crosschain/types/message_vote_on_observed_outbound_tx_test.go b/x/crosschain/types/message_vote_on_observed_outbound_tx_test.go index 5e669aefa3..27b0a701f8 100644 --- a/x/crosschain/types/message_vote_on_observed_outbound_tx_test.go +++ b/x/crosschain/types/message_vote_on_observed_outbound_tx_test.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/crosschain/types" ) @@ -30,10 +30,10 @@ func TestMsgVoteOnObservedOutboundTx_ValidateBasic(t *testing.T) { math.NewInt(42), 42, math.NewUint(42), - common.ReceiveStatus_Created, + pkg.ReceiveStatus_Created, 42, 42, - common.CoinType_Zeta, + pkg.CoinType_Zeta, ), }, { @@ -47,10 +47,10 @@ func TestMsgVoteOnObservedOutboundTx_ValidateBasic(t *testing.T) { math.NewInt(42), 42, math.NewUint(42), - common.ReceiveStatus_Created, + pkg.ReceiveStatus_Created, 42, 42, - common.CoinType_Zeta, + pkg.CoinType_Zeta, ), err: sdkerrors.ErrInvalidAddress, }, @@ -65,10 +65,10 @@ func TestMsgVoteOnObservedOutboundTx_ValidateBasic(t *testing.T) { math.NewInt(42), 42, math.NewUint(42), - common.ReceiveStatus_Created, + pkg.ReceiveStatus_Created, -1, 42, - common.CoinType_Zeta, + pkg.CoinType_Zeta, ), err: types.ErrInvalidChainID, }, @@ -97,10 +97,10 @@ func TestMsgVoteOnObservedOutboundTx_Digest(t *testing.T) { ObservedOutTxEffectiveGasPrice: math.NewInt(42), ObservedOutTxEffectiveGasLimit: 42, ValueReceived: math.NewUint(42), - Status: common.ReceiveStatus_Created, + Status: pkg.ReceiveStatus_Created, OutTxChain: 42, OutTxTssNonce: 42, - CoinType: common.CoinType_Zeta, + CoinType: pkg.CoinType_Zeta, } hash := msg.Digest() require.NotEmpty(t, hash, "hash should not be empty") @@ -113,7 +113,7 @@ func TestMsgVoteOnObservedOutboundTx_Digest(t *testing.T) { // status not used msg2 = msg - msg2.Status = common.ReceiveStatus_Failed + msg2.Status = pkg.ReceiveStatus_Failed hash2 = msg2.Digest() require.Equal(t, hash, hash2, "status should not change hash") @@ -173,7 +173,7 @@ func TestMsgVoteOnObservedOutboundTx_Digest(t *testing.T) { // coin type used msg2 = msg - msg2.CoinType = common.CoinType_ERC20 + msg2.CoinType = pkg.CoinType_ERC20 hash2 = msg2.Digest() require.NotEqual(t, hash, hash2, "coin type should change hash") } @@ -219,7 +219,7 @@ func TestMsgVoteOnObservedOutboundTx_Type(t *testing.T) { msg := types.MsgVoteOnObservedOutboundTx{ Creator: sample.AccAddress(), } - require.Equal(t, common.OutboundVoter.String(), msg.Type()) + require.Equal(t, pkg.OutboundVoter.String(), msg.Type()) } func TestMsgVoteOnObservedOutboundTx_Route(t *testing.T) { diff --git a/x/emissions/abci_test.go b/x/emissions/abci_test.go index 207840f79b..d75cfe92e5 100644 --- a/x/emissions/abci_test.go +++ b/x/emissions/abci_test.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/stretchr/testify/require" "github.com/zeta-chain/zetacore/cmd/zetacored/config" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" emissionsModule "github.com/zeta-chain/zetacore/x/emissions" @@ -88,7 +88,7 @@ func TestBeginBlocker(t *testing.T) { }) // Total block rewards is the fixed amount of rewards that are distributed - totalBlockRewards, err := common.GetAzetaDecFromAmountInZeta(emissionstypes.BlockRewardsInZeta) + totalBlockRewards, err := pkg.GetAzetaDecFromAmountInZeta(emissionstypes.BlockRewardsInZeta) totalRewardCoins := sdk.NewCoins(sdk.NewCoin(config.BaseDenom, totalBlockRewards.TruncateInt())) require.NoError(t, err) // Fund the emission pool to start the emission process @@ -246,7 +246,7 @@ func TestDistributeObserverRewards(t *testing.T) { zk.ObserverKeeper.SetObserverSet(ctx, observerSet) // Total block rewards is the fixed amount of rewards that are distributed - totalBlockRewards, err := common.GetAzetaDecFromAmountInZeta(emissionstypes.BlockRewardsInZeta) + totalBlockRewards, err := pkg.GetAzetaDecFromAmountInZeta(emissionstypes.BlockRewardsInZeta) totalRewardCoins := sdk.NewCoins(sdk.NewCoin(config.BaseDenom, totalBlockRewards.TruncateInt())) require.NoError(t, err) diff --git a/x/emissions/keeper/block_rewards_components.go b/x/emissions/keeper/block_rewards_components.go index fe4140805d..b51ae9a96e 100644 --- a/x/emissions/keeper/block_rewards_components.go +++ b/x/emissions/keeper/block_rewards_components.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/zeta-chain/zetacore/cmd/zetacored/config" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/emissions/types" ) @@ -66,7 +66,7 @@ func (k Keeper) GetFixedBlockRewards() (sdk.Dec, error) { } func CalculateFixedValidatorRewards(avgBlockTimeString string) (sdk.Dec, error) { - azetaAmountTotalRewards, err := common.GetAzetaDecFromAmountInZeta(types.BlockRewardsInZeta) + azetaAmountTotalRewards, err := pkg.GetAzetaDecFromAmountInZeta(types.BlockRewardsInZeta) if err != nil { return sdk.ZeroDec(), err } diff --git a/x/fungible/client/cli/tx_deploy_fungible_coin_zrc_4.go b/x/fungible/client/cli/tx_deploy_fungible_coin_zrc_4.go index 2be8037801..06f3cca2dd 100644 --- a/x/fungible/client/cli/tx_deploy_fungible_coin_zrc_4.go +++ b/x/fungible/client/cli/tx_deploy_fungible_coin_zrc_4.go @@ -3,7 +3,7 @@ package cli import ( "strconv" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" @@ -50,7 +50,7 @@ func CmdDeployFungibleCoinZRC4() *cobra.Command { uint32(argDecimals), argName, argSymbol, - common.CoinType(argCoinType), + pkg.CoinType(argCoinType), argGasLimit, ) diff --git a/x/fungible/keeper/deposits.go b/x/fungible/keeper/deposits.go index 3d8ebfb28b..e5410ec578 100644 --- a/x/fungible/keeper/deposits.go +++ b/x/fungible/keeper/deposits.go @@ -7,7 +7,7 @@ import ( eth "github.com/ethereum/go-ethereum/common" evmtypes "github.com/evmos/ethermint/x/evm/types" "github.com/zeta-chain/protocol-contracts/pkg/contracts/zevm/systemcontract.sol" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" "github.com/zeta-chain/zetacore/x/fungible/types" ) @@ -28,7 +28,7 @@ func (k Keeper) ZRC20DepositAndCallContract( amount *big.Int, senderChainID int64, data []byte, - coinType common.CoinType, + coinType pkg.CoinType, asset string, ) (*evmtypes.MsgEthereumTxResponse, bool, error) { var ZRC20Contract eth.Address @@ -36,7 +36,7 @@ func (k Keeper) ZRC20DepositAndCallContract( var found bool // get foreign coin - if coinType == common.CoinType_Gas { + if coinType == pkg.CoinType_Gas { coin, found = k.GetGasCoinForForeignCoin(ctx, senderChainID) if !found { return nil, false, crosschaintypes.ErrGasCoinNotFound diff --git a/x/fungible/keeper/deposits_test.go b/x/fungible/keeper/deposits_test.go index bfd3f7eecd..e84acb5e2d 100644 --- a/x/fungible/keeper/deposits_test.go +++ b/x/fungible/keeper/deposits_test.go @@ -7,7 +7,7 @@ import ( "cosmossdk.io/math" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/testutil/contracts" testkeeper "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" @@ -21,7 +21,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { k, ctx, sdkk, _ := testkeeper.FungibleKeeper(t) _ = k.GetAuthKeeper().GetModuleAccount(ctx, types.ModuleName) - chainList := common.DefaultChainsList() + chainList := pkg.DefaultChainsList() chain := chainList[0].ChainId // deploy the system contracts @@ -37,7 +37,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { big.NewInt(42), chain, []byte{}, - common.CoinType_Gas, + pkg.CoinType_Gas, sample.EthAddress().String(), ) require.NoError(t, err) @@ -52,7 +52,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { k, ctx, sdkk, _ := testkeeper.FungibleKeeper(t) _ = k.GetAuthKeeper().GetModuleAccount(ctx, types.ModuleName) - chainList := common.DefaultChainsList() + chainList := pkg.DefaultChainsList() chain := chainList[0].ChainId assetAddress := sample.EthAddress().String() @@ -69,7 +69,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { big.NewInt(42), chain, []byte{}, - common.CoinType_ERC20, + pkg.CoinType_ERC20, assetAddress, ) require.NoError(t, err) @@ -84,7 +84,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { k, ctx, sdkk, _ := testkeeper.FungibleKeeper(t) _ = k.GetAuthKeeper().GetModuleAccount(ctx, types.ModuleName) - chainList := common.DefaultChainsList() + chainList := pkg.DefaultChainsList() chain := chainList[0].ChainId assetAddress := sample.EthAddress().String() @@ -101,7 +101,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { big.NewInt(42), chain, []byte("DEADBEEF"), - common.CoinType_ERC20, + pkg.CoinType_ERC20, assetAddress, ) require.ErrorIs(t, err, types.ErrCallNonContract) @@ -112,7 +112,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { k, ctx, sdkk, _ := testkeeper.FungibleKeeper(t) _ = k.GetAuthKeeper().GetModuleAccount(ctx, types.ModuleName) - chainList := common.DefaultChainsList() + chainList := pkg.DefaultChainsList() chain := chainList[0].ChainId // deploy the system contracts @@ -142,7 +142,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { big.NewInt(500), chain, []byte{}, - common.CoinType_Gas, + pkg.CoinType_Gas, sample.EthAddress().String(), ) require.NoError(t, err) @@ -158,7 +158,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { k, ctx, sdkk, _ := testkeeper.FungibleKeeper(t) _ = k.GetAuthKeeper().GetModuleAccount(ctx, types.ModuleName) - chainList := common.DefaultChainsList() + chainList := pkg.DefaultChainsList() chain := chainList[0].ChainId // deploy the system contracts @@ -179,7 +179,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { big.NewInt(42), chain, []byte{}, - common.CoinType_Gas, + pkg.CoinType_Gas, sample.EthAddress().String(), ) require.ErrorIs(t, err, types.ErrPausedZRC20) @@ -190,7 +190,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { k, ctx, sdkk, _ := testkeeper.FungibleKeeper(t) _ = k.GetAuthKeeper().GetModuleAccount(ctx, types.ModuleName) - chainList := common.DefaultChainsList() + chainList := pkg.DefaultChainsList() chain := chainList[0].ChainId // deploy the system contracts @@ -220,7 +220,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { big.NewInt(501), chain, []byte{}, - common.CoinType_Gas, + pkg.CoinType_Gas, sample.EthAddress().String(), ) require.ErrorIs(t, err, types.ErrForeignCoinCapReached) @@ -231,7 +231,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { k, ctx, sdkk, _ := testkeeper.FungibleKeeper(t) _ = k.GetAuthKeeper().GetModuleAccount(ctx, types.ModuleName) - chainList := common.DefaultChainsList() + chainList := pkg.DefaultChainsList() chain := chainList[0].ChainId // deploy the system contracts @@ -246,7 +246,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { big.NewInt(42), chain, []byte{}, - common.CoinType_Gas, + pkg.CoinType_Gas, sample.EthAddress().String(), ) require.ErrorIs(t, err, crosschaintypes.ErrGasCoinNotFound) @@ -256,7 +256,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { k, ctx, sdkk, _ := testkeeper.FungibleKeeper(t) _ = k.GetAuthKeeper().GetModuleAccount(ctx, types.ModuleName) - chainList := common.DefaultChainsList() + chainList := pkg.DefaultChainsList() chain := chainList[0].ChainId assetAddress := sample.EthAddress().String() @@ -272,7 +272,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { big.NewInt(42), chain, []byte{}, - common.CoinType_ERC20, + pkg.CoinType_ERC20, assetAddress, ) require.ErrorIs(t, err, crosschaintypes.ErrForeignCoinNotFound) @@ -283,7 +283,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { k, ctx, sdkk, _ := testkeeper.FungibleKeeper(t) _ = k.GetAuthKeeper().GetModuleAccount(ctx, types.ModuleName) - chainList := common.DefaultChainsList() + chainList := pkg.DefaultChainsList() chain := chainList[0].ChainId // deploy the system contracts @@ -302,7 +302,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { big.NewInt(42), chain, []byte{}, - common.CoinType_Gas, + pkg.CoinType_Gas, sample.EthAddress().String(), ) require.NoError(t, err) @@ -321,7 +321,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { k, ctx, sdkk, _ := testkeeper.FungibleKeeper(t) _ = k.GetAuthKeeper().GetModuleAccount(ctx, types.ModuleName) - chainList := common.DefaultChainsList() + chainList := pkg.DefaultChainsList() chain := chainList[0].ChainId // deploy the system contracts @@ -340,7 +340,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { big.NewInt(42), chain, []byte{}, - common.CoinType_Gas, + pkg.CoinType_Gas, sample.EthAddress().String(), ) require.Error(t, err) diff --git a/x/fungible/keeper/evm.go b/x/fungible/keeper/evm.go index 04251028f0..5fe96e88b0 100644 --- a/x/fungible/keeper/evm.go +++ b/x/fungible/keeper/evm.go @@ -26,7 +26,7 @@ import ( zrc20 "github.com/zeta-chain/protocol-contracts/pkg/contracts/zevm/zrc20.sol" uniswapv2factory "github.com/zeta-chain/protocol-contracts/pkg/uniswap/v2-core/contracts/uniswapv2factory.sol" uniswapv2router02 "github.com/zeta-chain/protocol-contracts/pkg/uniswap/v2-periphery/contracts/uniswapv2router02.sol" - zetacommon "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/server/config" "github.com/zeta-chain/zetacore/x/fungible/types" zetaObserverTypes "github.com/zeta-chain/zetacore/x/observer/types" @@ -89,11 +89,11 @@ func (k Keeper) DeployZRC20Contract( name, symbol string, decimals uint8, chainID int64, - coinType zetacommon.CoinType, + coinType pkg.CoinType, erc20Contract string, gasLimit *big.Int, ) (common.Address, error) { - chain := zetacommon.GetChainFromChainID(chainID) + chain := pkg.GetChainFromChainID(chainID) if chain == nil { return common.Address{}, cosmoserrors.Wrapf(zetaObserverTypes.ErrSupportedChains, "chain %d not found", chainID) } diff --git a/x/fungible/keeper/evm_test.go b/x/fungible/keeper/evm_test.go index e1af5c041c..433ffed083 100644 --- a/x/fungible/keeper/evm_test.go +++ b/x/fungible/keeper/evm_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" "github.com/zeta-chain/protocol-contracts/pkg/contracts/zevm/systemcontract.sol" - zetacommon "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/server/config" "github.com/zeta-chain/zetacore/testutil/contracts" testkeeper "github.com/zeta-chain/zetacore/testutil/keeper" @@ -23,7 +23,7 @@ import ( // get a valid chain id independently of the build flag func getValidChainID(t *testing.T) int64 { - list := zetacommon.DefaultChainsList() + list := pkg.DefaultChainsList() require.NotEmpty(t, list) require.NotNil(t, list[0]) @@ -181,7 +181,7 @@ func TestKeeper_DeployZRC20Contract(t *testing.T) { "bar", 8, chainID, - zetacommon.CoinType_Gas, + pkg.CoinType_Gas, "foobar", big.NewInt(1000), ) @@ -196,7 +196,7 @@ func TestKeeper_DeployZRC20Contract(t *testing.T) { require.Equal(t, uint32(8), foreignCoins.Decimals) require.Equal(t, "foo", foreignCoins.Name) require.Equal(t, "bar", foreignCoins.Symbol) - require.Equal(t, zetacommon.CoinType_Gas, foreignCoins.CoinType) + require.Equal(t, pkg.CoinType_Gas, foreignCoins.CoinType) require.Equal(t, uint64(1000), foreignCoins.GasLimit) // can get the zrc20 data diff --git a/x/fungible/keeper/foreign_coins.go b/x/fungible/keeper/foreign_coins.go index 028c961609..f995daee29 100644 --- a/x/fungible/keeper/foreign_coins.go +++ b/x/fungible/keeper/foreign_coins.go @@ -4,7 +4,7 @@ import ( "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" ethcommon "github.com/ethereum/go-ethereum/common" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/fungible/types" ) @@ -83,7 +83,7 @@ func (k Keeper) GetAllForeignCoins(ctx sdk.Context) (list []types.ForeignCoins) func (k Keeper) GetGasCoinForForeignCoin(ctx sdk.Context, chainID int64) (types.ForeignCoins, bool) { foreignCoinList := k.GetAllForeignCoinsForChain(ctx, chainID) for _, coin := range foreignCoinList { - if coin.CoinType == common.CoinType_Gas { + if coin.CoinType == pkg.CoinType_Gas { return coin, true } } diff --git a/x/fungible/keeper/foreign_coins_test.go b/x/fungible/keeper/foreign_coins_test.go index 0a5a0f37f0..dc4c722c2f 100644 --- a/x/fungible/keeper/foreign_coins_test.go +++ b/x/fungible/keeper/foreign_coins_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" @@ -38,31 +38,31 @@ func TestKeeper_GetGasCoinForForeignCoin(t *testing.T) { types.ForeignCoins{ Zrc20ContractAddress: sample.EthAddress().String(), ForeignChainId: 1, - CoinType: common.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, Name: "foo", }, types.ForeignCoins{ Zrc20ContractAddress: sample.EthAddress().String(), ForeignChainId: 1, - CoinType: common.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, Name: "foo", }, types.ForeignCoins{ Zrc20ContractAddress: sample.EthAddress().String(), ForeignChainId: 1, - CoinType: common.CoinType_Gas, + CoinType: pkg.CoinType_Gas, Name: "bar", }, types.ForeignCoins{ Zrc20ContractAddress: sample.EthAddress().String(), ForeignChainId: 2, - CoinType: common.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, Name: "foo", }, types.ForeignCoins{ Zrc20ContractAddress: sample.EthAddress().String(), ForeignChainId: 2, - CoinType: common.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, Name: "foo", }, ) @@ -88,35 +88,35 @@ func TestKeeperGetForeignCoinFromAsset(t *testing.T) { Zrc20ContractAddress: sample.EthAddress().String(), Asset: sample.EthAddress().String(), ForeignChainId: 1, - CoinType: common.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, Name: "foo", }, types.ForeignCoins{ Zrc20ContractAddress: sample.EthAddress().String(), Asset: gasAsset, ForeignChainId: 1, - CoinType: common.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, Name: "bar", }, types.ForeignCoins{ Zrc20ContractAddress: sample.EthAddress().String(), Asset: sample.EthAddress().String(), ForeignChainId: 1, - CoinType: common.CoinType_Gas, + CoinType: pkg.CoinType_Gas, Name: "foo", }, types.ForeignCoins{ Zrc20ContractAddress: sample.EthAddress().String(), Asset: sample.EthAddress().String(), ForeignChainId: 2, - CoinType: common.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, Name: "foo", }, types.ForeignCoins{ Zrc20ContractAddress: sample.EthAddress().String(), Asset: sample.EthAddress().String(), ForeignChainId: 2, - CoinType: common.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, Name: "foo", }, ) @@ -142,7 +142,7 @@ func TestKeeperGetForeignCoinFromAsset(t *testing.T) { Zrc20ContractAddress: sample.EthAddress().String(), Asset: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", ForeignChainId: 1, - CoinType: common.CoinType_ERC20, + CoinType: pkg.CoinType_ERC20, Name: "foo", }, ) diff --git a/x/fungible/keeper/gas_coin_and_pool.go b/x/fungible/keeper/gas_coin_and_pool.go index 7a847f3906..7c4c82f5ff 100644 --- a/x/fungible/keeper/gas_coin_and_pool.go +++ b/x/fungible/keeper/gas_coin_and_pool.go @@ -10,7 +10,7 @@ import ( systemcontract "github.com/zeta-chain/protocol-contracts/pkg/contracts/zevm/systemcontract.sol" zrc20 "github.com/zeta-chain/protocol-contracts/pkg/contracts/zevm/zrc20.sol" uniswapv2router02 "github.com/zeta-chain/protocol-contracts/pkg/uniswap/v2-periphery/contracts/uniswapv2router02.sol" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/fungible/types" zetaObserverTypes "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -26,7 +26,7 @@ func (k Keeper) SetupChainGasCoinAndPool( decimals uint8, gasLimit *big.Int, ) (ethcommon.Address, error) { - chain := common.GetChainFromChainID(chainID) + chain := pkg.GetChainFromChainID(chainID) if chain == nil { return ethcommon.Address{}, zetaObserverTypes.ErrSupportedChains } @@ -43,12 +43,12 @@ func (k Keeper) SetupChainGasCoinAndPool( // default values if transferGasLimit == nil { transferGasLimit = big.NewInt(21_000) - if common.IsBitcoinChain(chain.ChainId) { + if pkg.IsBitcoinChain(chain.ChainId) { transferGasLimit = big.NewInt(100) // 100B for a typical tx } } - zrc20Addr, err := k.DeployZRC20Contract(ctx, name, symbol, decimals, chain.ChainId, common.CoinType_Gas, "", transferGasLimit) + zrc20Addr, err := k.DeployZRC20Contract(ctx, name, symbol, decimals, chain.ChainId, pkg.CoinType_Gas, "", transferGasLimit) if err != nil { return ethcommon.Address{}, cosmoserrors.Wrapf(err, "failed to DeployZRC20Contract") } diff --git a/x/fungible/keeper/msg_server_deploy_fungible_coin_zrc20.go b/x/fungible/keeper/msg_server_deploy_fungible_coin_zrc20.go index dece8b65de..2d38dd8820 100644 --- a/x/fungible/keeper/msg_server_deploy_fungible_coin_zrc20.go +++ b/x/fungible/keeper/msg_server_deploy_fungible_coin_zrc20.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/ethereum/go-ethereum/common" - zetacommon "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" "github.com/zeta-chain/zetacore/x/fungible/types" ) @@ -45,7 +45,7 @@ func (k msgServer) DeployFungibleCoinZRC20(goCtx context.Context, msg *types.Msg return nil, cosmoserrors.Wrap(sdkerrors.ErrUnauthorized, "Deploy can only be executed by the correct policy account") } - if msg.CoinType == zetacommon.CoinType_Gas { + if msg.CoinType == pkg.CoinType_Gas { // #nosec G701 always in range address, err = k.SetupChainGasCoinAndPool(ctx, msg.ForeignChainId, msg.Name, msg.Symbol, uint8(msg.Decimals), big.NewInt(msg.GasLimit)) if err != nil { diff --git a/x/fungible/keeper/msg_server_deploy_fungible_coin_zrc20_test.go b/x/fungible/keeper/msg_server_deploy_fungible_coin_zrc20_test.go index 0413c6d239..709b38fe00 100644 --- a/x/fungible/keeper/msg_server_deploy_fungible_coin_zrc20_test.go +++ b/x/fungible/keeper/msg_server_deploy_fungible_coin_zrc20_test.go @@ -7,7 +7,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ethcommon "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" @@ -39,7 +39,7 @@ func TestMsgServer_DeployFungibleCoinZRC20(t *testing.T) { 8, "foo", "foo", - common.CoinType_Gas, + pkg.CoinType_Gas, 1000000, )) require.NoError(t, err) @@ -49,7 +49,7 @@ func TestMsgServer_DeployFungibleCoinZRC20(t *testing.T) { // can retrieve the gas coin foreignCoin, found := k.GetForeignCoins(ctx, gasAddress) require.True(t, found) - require.Equal(t, foreignCoin.CoinType, common.CoinType_Gas) + require.Equal(t, foreignCoin.CoinType, pkg.CoinType_Gas) require.Contains(t, foreignCoin.Name, "foo") // check gas limit @@ -71,7 +71,7 @@ func TestMsgServer_DeployFungibleCoinZRC20(t *testing.T) { 8, "bar", "bar", - common.CoinType_ERC20, + pkg.CoinType_ERC20, 2000000, )) require.NoError(t, err) @@ -79,7 +79,7 @@ func TestMsgServer_DeployFungibleCoinZRC20(t *testing.T) { foreignCoin, found = k.GetForeignCoins(ctx, res.Address) require.True(t, found) - require.Equal(t, foreignCoin.CoinType, common.CoinType_ERC20) + require.Equal(t, foreignCoin.CoinType, pkg.CoinType_ERC20) require.Contains(t, foreignCoin.Name, "bar") // check gas limit @@ -115,7 +115,7 @@ func TestMsgServer_DeployFungibleCoinZRC20(t *testing.T) { 8, "foo", "foo", - common.CoinType_Gas, + pkg.CoinType_Gas, 1000000, )) require.Error(t, err) @@ -142,7 +142,7 @@ func TestMsgServer_DeployFungibleCoinZRC20(t *testing.T) { 78, "foo", "foo", - common.CoinType_Gas, + pkg.CoinType_Gas, 1000000, )) require.Error(t, err) @@ -169,7 +169,7 @@ func TestMsgServer_DeployFungibleCoinZRC20(t *testing.T) { 8, "foo", "foo", - common.CoinType_Gas, + pkg.CoinType_Gas, 1000000, )) require.Error(t, err) @@ -196,7 +196,7 @@ func TestMsgServer_DeployFungibleCoinZRC20(t *testing.T) { 8, "foo", "foo", - common.CoinType_Gas, + pkg.CoinType_Gas, 1000000, ) @@ -213,7 +213,7 @@ func TestMsgServer_DeployFungibleCoinZRC20(t *testing.T) { require.ErrorIs(t, err, types.ErrForeignCoinAlreadyExist) // Similar to above, redeploying existing erc20 should also fail - deployMsg.CoinType = common.CoinType_ERC20 + deployMsg.CoinType = pkg.CoinType_ERC20 keepertest.MockIsAuthorized(&authorityMock.Mock, admin, authoritytypes.PolicyType_groupAdmin, true) _, err = keeper.NewMsgServerImpl(*k).DeployFungibleCoinZRC20(ctx, deployMsg) diff --git a/x/fungible/keeper/msg_server_update_contract_bytecode_test.go b/x/fungible/keeper/msg_server_update_contract_bytecode_test.go index 530d23b306..2c40ecdbd7 100644 --- a/x/fungible/keeper/msg_server_update_contract_bytecode_test.go +++ b/x/fungible/keeper/msg_server_update_contract_bytecode_test.go @@ -11,7 +11,7 @@ import ( "github.com/evmos/ethermint/x/evm/statedb" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - zetacommon "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" @@ -39,7 +39,7 @@ func TestKeeper_UpdateContractBytecode(t *testing.T) { authorityMock := keepertest.GetFungibleAuthorityMock(t, k) // sample chainIDs and addresses - chainList := zetacommon.DefaultChainsList() + chainList := pkg.DefaultChainsList() require.True(t, len(chainList) > 1) require.NotNil(t, chainList[0]) require.NotNil(t, chainList[1]) @@ -86,7 +86,7 @@ func TestKeeper_UpdateContractBytecode(t *testing.T) { "BETA", 18, chainID2, - zetacommon.CoinType_ERC20, + pkg.CoinType_ERC20, "beta", big.NewInt(90_000), ) @@ -132,7 +132,7 @@ func TestKeeper_UpdateContractBytecode(t *testing.T) { "GAMMA", 18, chainID1, - zetacommon.CoinType_ERC20, + pkg.CoinType_ERC20, "gamma", big.NewInt(90_000), ) diff --git a/x/fungible/keeper/msg_server_update_system_contract.go b/x/fungible/keeper/msg_server_update_system_contract.go index 3e76f9abb2..c0d776c811 100644 --- a/x/fungible/keeper/msg_server_update_system_contract.go +++ b/x/fungible/keeper/msg_server_update_system_contract.go @@ -10,7 +10,7 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" "github.com/zeta-chain/protocol-contracts/pkg/contracts/zevm/systemcontract.sol" "github.com/zeta-chain/protocol-contracts/pkg/contracts/zevm/zrc20.sol" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" "github.com/zeta-chain/zetacore/x/fungible/types" ) @@ -47,7 +47,7 @@ func (k msgServer) UpdateSystemContract(goCtx context.Context, msg *types.MsgUpd if err != nil { return nil, cosmoserrors.Wrapf(types.ErrContractCall, "failed to call zrc20 contract method updateSystemContractAddress (%s)", err.Error()) } - if fcoin.CoinType == common.CoinType_Gas { + if fcoin.CoinType == pkg.CoinType_Gas { _, err = k.CallEVM(tmpCtx, *sysABI, types.ModuleAddressEVM, newSystemContractAddr, BigIntZero, nil, true, false, "setGasCoinZRC20", big.NewInt(fcoin.ForeignChainId), zrc20Addr) if err != nil { return nil, cosmoserrors.Wrapf(types.ErrContractCall, "failed to call system contract method setGasCoinZRC20 (%s)", err.Error()) diff --git a/x/fungible/keeper/msg_server_update_system_contract_test.go b/x/fungible/keeper/msg_server_update_system_contract_test.go index 60ae69dc80..147e65af81 100644 --- a/x/fungible/keeper/msg_server_update_system_contract_test.go +++ b/x/fungible/keeper/msg_server_update_system_contract_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/require" "github.com/zeta-chain/protocol-contracts/pkg/contracts/zevm/systemcontract.sol" zrc20 "github.com/zeta-chain/protocol-contracts/pkg/contracts/zevm/zrc20.sol" - zetacommon "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" @@ -43,7 +43,7 @@ func TestKeeper_UpdateSystemContract(t *testing.T) { return address.Hex() } - chains := zetacommon.DefaultChainsList() + chains := pkg.DefaultChainsList() require.True(t, len(chains) > 1) require.NotNil(t, chains[0]) require.NotNil(t, chains[1]) @@ -193,7 +193,7 @@ func TestKeeper_UpdateSystemContract(t *testing.T) { admin := sample.AccAddress() authorityMock := keepertest.GetFungibleAuthorityMock(t, k) - chains := zetacommon.DefaultChainsList() + chains := pkg.DefaultChainsList() require.True(t, len(chains) > 1) require.NotNil(t, chains[0]) chainID1 := chains[0].ChainId diff --git a/x/fungible/types/expected_keepers.go b/x/fungible/types/expected_keepers.go index 5ffc04c723..3ca676ae6f 100644 --- a/x/fungible/types/expected_keepers.go +++ b/x/fungible/types/expected_keepers.go @@ -11,7 +11,7 @@ import ( "github.com/ethereum/go-ethereum/core/vm" "github.com/evmos/ethermint/x/evm/statedb" evmtypes "github.com/evmos/ethermint/x/evm/types" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" ) @@ -31,7 +31,7 @@ type BankKeeper interface { } type ObserverKeeper interface { - GetSupportedChains(ctx sdk.Context) []*common.Chain + GetSupportedChains(ctx sdk.Context) []*pkg.Chain } type EVMKeeper interface { diff --git a/x/fungible/types/message_deploy_fungible_coin_zrc20.go b/x/fungible/types/message_deploy_fungible_coin_zrc20.go index 1f695e63cb..cdba98fded 100644 --- a/x/fungible/types/message_deploy_fungible_coin_zrc20.go +++ b/x/fungible/types/message_deploy_fungible_coin_zrc20.go @@ -4,14 +4,14 @@ import ( cosmoserrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" ) const TypeMsgDeployFungibleCoinZRC20 = "deploy_fungible_coin_zrc_20" var _ sdk.Msg = &MsgDeployFungibleCoinZRC20{} -func NewMsgDeployFungibleCoinZRC20(creator string, ERC20 string, foreignChainID int64, decimals uint32, name string, symbol string, coinType common.CoinType, gasLimit int64) *MsgDeployFungibleCoinZRC20 { +func NewMsgDeployFungibleCoinZRC20(creator string, ERC20 string, foreignChainID int64, decimals uint32, name string, symbol string, coinType pkg.CoinType, gasLimit int64) *MsgDeployFungibleCoinZRC20 { return &MsgDeployFungibleCoinZRC20{ Creator: creator, ERC20: ERC20, diff --git a/x/fungible/types/message_deploy_fungible_coin_zrc20_test.go b/x/fungible/types/message_deploy_fungible_coin_zrc20_test.go index 4450dffff4..bd9dbbe884 100644 --- a/x/fungible/types/message_deploy_fungible_coin_zrc20_test.go +++ b/x/fungible/types/message_deploy_fungible_coin_zrc20_test.go @@ -7,7 +7,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/fungible/types" ) @@ -27,7 +27,7 @@ func TestMsgDeployFungibleCoinZRC4_ValidateBasic(t *testing.T) { 6, "test", "test", - common.CoinType_ERC20, + pkg.CoinType_ERC20, 10, ), err: sdkerrors.ErrInvalidAddress, @@ -41,7 +41,7 @@ func TestMsgDeployFungibleCoinZRC4_ValidateBasic(t *testing.T) { 6, "test", "test", - common.CoinType_ERC20, + pkg.CoinType_ERC20, -1, ), err: sdkerrors.ErrInvalidGasLimit, @@ -55,7 +55,7 @@ func TestMsgDeployFungibleCoinZRC4_ValidateBasic(t *testing.T) { 78, "test", "test", - common.CoinType_ERC20, + pkg.CoinType_ERC20, 10, ), err: cosmoserrors.Wrapf(sdkerrors.ErrInvalidRequest, "decimals must be less than 78"), @@ -69,7 +69,7 @@ func TestMsgDeployFungibleCoinZRC4_ValidateBasic(t *testing.T) { 6, "test", "test", - common.CoinType_ERC20, + pkg.CoinType_ERC20, 10, ), }, diff --git a/x/observer/genesis.go b/x/observer/genesis.go index 1c1b10ef26..61236567a3 100644 --- a/x/observer/genesis.go +++ b/x/observer/genesis.go @@ -2,7 +2,7 @@ package observer import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/observer/keeper" "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -106,7 +106,7 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) k.SetPendingNonces(ctx, pendingNonce) } } else { - for _, chain := range common.DefaultChainsList() { + for _, chain := range pkg.DefaultChainsList() { if genState.Tss != nil { k.SetPendingNonces(ctx, types.PendingNonces{ NonceLow: 0, diff --git a/x/observer/keeper/block_header.go b/x/observer/keeper/block_header.go index e5f6aa74f4..1ed54c9edd 100644 --- a/x/observer/keeper/block_header.go +++ b/x/observer/keeper/block_header.go @@ -5,19 +5,19 @@ import ( "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/observer/types" ) // SetBlockHeader set a specific block header in the store from its index -func (k Keeper) SetBlockHeader(ctx sdk.Context, header common.BlockHeader) { +func (k Keeper) SetBlockHeader(ctx sdk.Context, header pkg.BlockHeader) { store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.BlockHeaderKey)) b := k.cdc.MustMarshal(&header) store.Set(header.Hash, b) } // GetBlockHeader returns a block header from its hash -func (k Keeper) GetBlockHeader(ctx sdk.Context, hash []byte) (val common.BlockHeader, found bool) { +func (k Keeper) GetBlockHeader(ctx sdk.Context, hash []byte) (val pkg.BlockHeader, found bool) { store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.BlockHeaderKey)) b := store.Get(hash) diff --git a/x/observer/keeper/chain_params.go b/x/observer/keeper/chain_params.go index b28adc6e23..f0db89368f 100644 --- a/x/observer/keeper/chain_params.go +++ b/x/observer/keeper/chain_params.go @@ -4,7 +4,7 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -42,7 +42,7 @@ func (k Keeper) GetChainParamsByChainID(ctx sdk.Context, chainID int64) (*types. // GetSupportedChainFromChainID returns the chain from the chain id // it returns nil if the chain doesn't exist or is not supported -func (k Keeper) GetSupportedChainFromChainID(ctx sdk.Context, chainID int64) *common.Chain { +func (k Keeper) GetSupportedChainFromChainID(ctx sdk.Context, chainID int64) *pkg.Chain { cpl, found := k.GetChainParamsList(ctx) if !found { return nil @@ -50,23 +50,23 @@ func (k Keeper) GetSupportedChainFromChainID(ctx sdk.Context, chainID int64) *co for _, cp := range cpl.ChainParams { if cp.ChainId == chainID && cp.IsSupported { - return common.GetChainFromChainID(chainID) + return pkg.GetChainFromChainID(chainID) } } return nil } // GetSupportedChains returns the list of supported chains -func (k Keeper) GetSupportedChains(ctx sdk.Context) []*common.Chain { +func (k Keeper) GetSupportedChains(ctx sdk.Context) []*pkg.Chain { cpl, found := k.GetChainParamsList(ctx) if !found { - return []*common.Chain{} + return []*pkg.Chain{} } - var chains []*common.Chain + var chains []*pkg.Chain for _, cp := range cpl.ChainParams { if cp.IsSupported { - chains = append(chains, common.GetChainFromChainID(cp.ChainId)) + chains = append(chains, pkg.GetChainFromChainID(cp.ChainId)) } } return chains diff --git a/x/observer/keeper/chain_params_test.go b/x/observer/keeper/chain_params_test.go index 2d63265122..0818ec2a71 100644 --- a/x/observer/keeper/chain_params_test.go +++ b/x/observer/keeper/chain_params_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/observer/types" @@ -49,12 +49,12 @@ func TestKeeper_GetSupportedChains(t *testing.T) { t.Run("return list containing supported chains", func(t *testing.T) { k, ctx, _, _ := keepertest.ObserverKeeper(t) - require.Greater(t, len(common.ExternalChainList()), 5) - supported1 := common.ExternalChainList()[0] - supported2 := common.ExternalChainList()[1] - unsupported := common.ExternalChainList()[2] - supported3 := common.ExternalChainList()[3] - supported4 := common.ExternalChainList()[4] + require.Greater(t, len(pkg.ExternalChainList()), 5) + supported1 := pkg.ExternalChainList()[0] + supported2 := pkg.ExternalChainList()[1] + unsupported := pkg.ExternalChainList()[2] + supported3 := pkg.ExternalChainList()[3] + supported4 := pkg.ExternalChainList()[4] var chainParamsList []*types.ChainParams chainParamsList = append(chainParamsList, sample.ChainParamsSupported(supported1.ChainId)) diff --git a/x/observer/keeper/grpc_query_block_header.go b/x/observer/keeper/grpc_query_block_header.go index 1fd95c24d5..7ae2d72662 100644 --- a/x/observer/keeper/grpc_query_block_header.go +++ b/x/observer/keeper/grpc_query_block_header.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/observer/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -22,9 +22,9 @@ func (k Keeper) GetAllBlockHeaders(c context.Context, req *types.QueryAllBlockHe store := ctx.KVStore(k.storeKey) blockHeaderStore := prefix.NewStore(store, types.KeyPrefix(types.BlockHeaderKey)) - var blockHeaders []*common.BlockHeader + var blockHeaders []*pkg.BlockHeader pageRes, err := query.Paginate(blockHeaderStore, req.Pagination, func(key []byte, value []byte) error { - var blockHeader common.BlockHeader + var blockHeader pkg.BlockHeader if err := k.cdc.Unmarshal(value, &blockHeader); err != nil { return err } diff --git a/x/observer/keeper/grpc_query_prove.go b/x/observer/keeper/grpc_query_prove.go index 6f184cebed..219d77ba61 100644 --- a/x/observer/keeper/grpc_query_prove.go +++ b/x/observer/keeper/grpc_query_prove.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/btcsuite/btcutil" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" sdk "github.com/cosmos/cosmos-sdk/types" ethtypes "github.com/ethereum/go-ethereum/core/types" @@ -23,7 +23,7 @@ func (k Keeper) Prove(c context.Context, req *types.QueryProveRequest) (*types.Q } ctx := sdk.UnwrapSDKContext(c) - blockHash, err := common.StringToHash(req.ChainId, req.BlockHash) + blockHash, err := pkg.StringToHash(req.ChainId, req.BlockHash) if err != nil { return nil, status.Error(codes.InvalidArgument, err.Error()) } @@ -35,11 +35,11 @@ func (k Keeper) Prove(c context.Context, req *types.QueryProveRequest) (*types.Q proven := false txBytes, err := req.Proof.Verify(res.Header, int(req.TxIndex)) - if err != nil && !common.IsErrorInvalidProof(err) { + if err != nil && !pkg.IsErrorInvalidProof(err) { return nil, status.Error(codes.Internal, err.Error()) } if err == nil { - if common.IsEVMChain(req.ChainId) { + if pkg.IsEVMChain(req.ChainId) { var txx ethtypes.Transaction err = txx.UnmarshalBinary(txBytes) if err != nil { @@ -49,7 +49,7 @@ func (k Keeper) Prove(c context.Context, req *types.QueryProveRequest) (*types.Q return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("tx hash mismatch: %s != %s", txx.Hash().Hex(), req.TxHash)) } proven = true - } else if common.IsBitcoinChain(req.ChainId) { + } else if pkg.IsBitcoinChain(req.ChainId) { tx, err := btcutil.NewTxFromBytes(txBytes) if err != nil { return nil, status.Error(codes.Internal, fmt.Sprintf("failed to unmarshal btc transaction: %s", err)) diff --git a/x/observer/keeper/grpc_query_tss.go b/x/observer/keeper/grpc_query_tss.go index 081d801277..3be419e3ab 100644 --- a/x/observer/keeper/grpc_query_tss.go +++ b/x/observer/keeper/grpc_query_tss.go @@ -5,7 +5,7 @@ import ( "sort" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/observer/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -45,18 +45,18 @@ func (k Keeper) GetTssAddress(goCtx context.Context, req *types.QueryGetTssAddre if !found { return nil, status.Error(codes.NotFound, "current tss not set") } - ethAddress, err := common.GetTssAddrEVM(tss.TssPubkey) + ethAddress, err := pkg.GetTssAddrEVM(tss.TssPubkey) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } - bitcoinParams := common.BitcoinRegnetParams + bitcoinParams := pkg.BitcoinRegnetParams if req.BitcoinChainId != 0 { - bitcoinParams, err = common.BitcoinNetParamsFromChainID(req.BitcoinChainId) + bitcoinParams, err = pkg.BitcoinNetParamsFromChainID(req.BitcoinChainId) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } } - btcAddress, err := common.GetTssAddrBTC(tss.TssPubkey, bitcoinParams) + btcAddress, err := pkg.GetTssAddrBTC(tss.TssPubkey, bitcoinParams) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } @@ -76,18 +76,18 @@ func (k Keeper) GetTssAddressByFinalizedHeight(goCtx context.Context, req *types if !found { return nil, status.Error(codes.NotFound, "tss not found") } - ethAddress, err := common.GetTssAddrEVM(tss.TssPubkey) + ethAddress, err := pkg.GetTssAddrEVM(tss.TssPubkey) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } - bitcoinParams := common.BitcoinRegnetParams + bitcoinParams := pkg.BitcoinRegnetParams if req.BitcoinChainId != 0 { - bitcoinParams, err = common.BitcoinNetParamsFromChainID(req.BitcoinChainId) + bitcoinParams, err = pkg.BitcoinNetParamsFromChainID(req.BitcoinChainId) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } } - btcAddress, err := common.GetTssAddrBTC(tss.TssPubkey, bitcoinParams) + btcAddress, err := pkg.GetTssAddrBTC(tss.TssPubkey, bitcoinParams) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } diff --git a/x/observer/keeper/msg_server_add_block_header.go b/x/observer/keeper/msg_server_add_block_header.go index 56b0bfbec7..11a80923de 100644 --- a/x/observer/keeper/msg_server_add_block_header.go +++ b/x/observer/keeper/msg_server_add_block_header.go @@ -6,7 +6,7 @@ import ( cosmoserrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -31,10 +31,10 @@ func (k msgServer) AddBlockHeader(goCtx context.Context, msg *types.MsgAddBlockH if crosschainFlags.BlockHeaderVerificationFlags == nil { return nil, fmt.Errorf("block header verification flags not found") } - if common.IsBitcoinChain(msg.ChainId) && !crosschainFlags.BlockHeaderVerificationFlags.IsBtcTypeChainEnabled { + if pkg.IsBitcoinChain(msg.ChainId) && !crosschainFlags.BlockHeaderVerificationFlags.IsBtcTypeChainEnabled { return nil, cosmoserrors.Wrapf(types.ErrBlockHeaderVerificationDisabled, "proof verification not enabled for bitcoin ,chain id: %d", msg.ChainId) } - if common.IsEVMChain(msg.ChainId) && !crosschainFlags.BlockHeaderVerificationFlags.IsEthTypeChainEnabled { + if pkg.IsEVMChain(msg.ChainId) && !crosschainFlags.BlockHeaderVerificationFlags.IsEthTypeChainEnabled { return nil, cosmoserrors.Wrapf(types.ErrBlockHeaderVerificationDisabled, "proof verification not enabled for evm ,chain id: %d", msg.ChainId) } @@ -111,7 +111,7 @@ func (k msgServer) AddBlockHeader(goCtx context.Context, msg *types.MsgAddBlockH } k.Keeper.SetBlockHeaderState(ctx, bhs) - bh := common.BlockHeader{ + bh := pkg.BlockHeader{ Header: msg.Header, Height: msg.Height, Hash: msg.BlockHash, diff --git a/x/observer/keeper/msg_server_add_block_header_test.go b/x/observer/keeper/msg_server_add_block_header_test.go index 8d6c9cc8ba..7d9cf3ce94 100644 --- a/x/observer/keeper/msg_server_add_block_header_test.go +++ b/x/observer/keeper/msg_server_add_block_header_test.go @@ -11,7 +11,7 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/ethereum/go-ethereum/rlp" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/observer/keeper" @@ -45,10 +45,10 @@ func TestMsgServer_AddBlockHeader(t *testing.T) { name: "success submit eth header", msg: &types.MsgAddBlockHeader{ Creator: observerAddress.String(), - ChainId: common.GoerliLocalnetChain().ChainId, + ChainId: pkg.GoerliLocalnetChain().ChainId, BlockHash: header.Hash().Bytes(), Height: 1, - Header: common.NewEthereumHeader(header1RLP), + Header: pkg.NewEthereumHeader(header1RLP), }, IsEthTypeChainEnabled: true, IsBtcTypeChainEnabled: true, @@ -59,10 +59,10 @@ func TestMsgServer_AddBlockHeader(t *testing.T) { name: "failure submit eth header eth disabled", msg: &types.MsgAddBlockHeader{ Creator: observerAddress.String(), - ChainId: common.GoerliLocalnetChain().ChainId, + ChainId: pkg.GoerliLocalnetChain().ChainId, BlockHash: header.Hash().Bytes(), Height: 1, - Header: common.NewEthereumHeader(header1RLP), + Header: pkg.NewEthereumHeader(header1RLP), }, IsEthTypeChainEnabled: false, IsBtcTypeChainEnabled: true, @@ -75,10 +75,10 @@ func TestMsgServer_AddBlockHeader(t *testing.T) { name: "failure submit eth header eth disabled", msg: &types.MsgAddBlockHeader{ Creator: sample.AccAddress(), - ChainId: common.GoerliLocalnetChain().ChainId, + ChainId: pkg.GoerliLocalnetChain().ChainId, BlockHash: header.Hash().Bytes(), Height: 1, - Header: common.NewEthereumHeader(header1RLP), + Header: pkg.NewEthereumHeader(header1RLP), }, IsEthTypeChainEnabled: false, IsBtcTypeChainEnabled: true, @@ -91,10 +91,10 @@ func TestMsgServer_AddBlockHeader(t *testing.T) { name: "should succeed if block header parent does exist", msg: &types.MsgAddBlockHeader{ Creator: observerAddress.String(), - ChainId: common.GoerliLocalnetChain().ChainId, + ChainId: pkg.GoerliLocalnetChain().ChainId, BlockHash: header2.Hash().Bytes(), Height: 2, - Header: common.NewEthereumHeader(header2RLP), + Header: pkg.NewEthereumHeader(header2RLP), }, IsEthTypeChainEnabled: true, IsBtcTypeChainEnabled: true, @@ -109,10 +109,10 @@ func TestMsgServer_AddBlockHeader(t *testing.T) { // name: "should fail if block header parent does not exist", // msg: &types.MsgAddBlockHeader{ // Creator: observerAddress.String(), - // ChainId: common.GoerliLocalnetChain().ChainId, + // ChainId: pkg.GoerliLocalnetChain().ChainId, // BlockHash: header3.Hash().Bytes(), // Height: 3, - // Header: common.NewEthereumHeader(header3RLP), + // Header: pkg.NewEthereumHeader(header3RLP), // }, // IsEthTypeChainEnabled: true, // IsBtcTypeChainEnabled: true, @@ -125,10 +125,10 @@ func TestMsgServer_AddBlockHeader(t *testing.T) { // name: "should succeed to post 3rd header if 2nd header is posted", // msg: &types.MsgAddBlockHeader{ // Creator: observerAddress.String(), - // ChainId: common.GoerliLocalnetChain().ChainId, + // ChainId: pkg.GoerliLocalnetChain().ChainId, // BlockHash: header3.Hash().Bytes(), // Height: 3, - // Header: common.NewEthereumHeader(header3RLP), + // Header: pkg.NewEthereumHeader(header3RLP), // }, // IsEthTypeChainEnabled: true, // IsBtcTypeChainEnabled: true, @@ -144,7 +144,7 @@ func TestMsgServer_AddBlockHeader(t *testing.T) { ChainId: 9999, BlockHash: header3.Hash().Bytes(), Height: 3, - Header: common.NewEthereumHeader(header3RLP), + Header: pkg.NewEthereumHeader(header3RLP), }, IsEthTypeChainEnabled: true, IsBtcTypeChainEnabled: true, @@ -172,7 +172,7 @@ func TestMsgServer_AddBlockHeader(t *testing.T) { }, }) - setSupportedChain(ctx, *k, common.GoerliLocalnetChain().ChainId) + setSupportedChain(ctx, *k, pkg.GoerliLocalnetChain().ChainId) _, err := srv.AddBlockHeader(ctx, tc.msg) tc.wantErr(t, err) diff --git a/x/observer/keeper/msg_server_add_observer.go b/x/observer/keeper/msg_server_add_observer.go index efdb085b01..cf15b3fa2a 100644 --- a/x/observer/keeper/msg_server_add_observer.go +++ b/x/observer/keeper/msg_server_add_observer.go @@ -9,7 +9,7 @@ import ( cosmoserrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -22,11 +22,11 @@ func (k msgServer) AddObserver(goCtx context.Context, msg *types.MsgAddObserver) return &types.MsgAddObserverResponse{}, types.ErrNotAuthorizedPolicy } - pubkey, err := common.NewPubKey(msg.ZetaclientGranteePubkey) + pubkey, err := pkg.NewPubKey(msg.ZetaclientGranteePubkey) if err != nil { return &types.MsgAddObserverResponse{}, cosmoserrors.Wrap(sdkerrors.ErrInvalidPubKey, err.Error()) } - granteeAddress, err := common.GetAddressFromPubkeyString(msg.ZetaclientGranteePubkey) + granteeAddress, err := pkg.GetAddressFromPubkeyString(msg.ZetaclientGranteePubkey) if err != nil { return &types.MsgAddObserverResponse{}, cosmoserrors.Wrap(sdkerrors.ErrInvalidPubKey, err.Error()) } @@ -38,7 +38,7 @@ func (k msgServer) AddObserver(goCtx context.Context, msg *types.MsgAddObserver) // False: adds observer to the observer list, and not the node account list // Inbound is disabled in both cases and needs to be enabled manually using an admin TX if msg.AddNodeAccountOnly { - pubkeySet := common.PubKeySet{Secp256k1: pubkey, Ed25519: ""} + pubkeySet := pkg.PubKeySet{Secp256k1: pubkey, Ed25519: ""} k.SetNodeAccount(ctx, types.NodeAccount{ Operator: msg.ObserverAddress, GranteeAddress: granteeAddress.String(), diff --git a/x/observer/keeper/msg_server_remove_chain_params_test.go b/x/observer/keeper/msg_server_remove_chain_params_test.go index bc273fd57b..f85e4e3af8 100644 --- a/x/observer/keeper/msg_server_remove_chain_params_test.go +++ b/x/observer/keeper/msg_server_remove_chain_params_test.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" @@ -23,9 +23,9 @@ func TestMsgServer_RemoveChainParams(t *testing.T) { // mock the authority keeper for authorization authorityMock := keepertest.GetObserverAuthorityMock(t, k) - chain1 := common.ExternalChainList()[0].ChainId - chain2 := common.ExternalChainList()[1].ChainId - chain3 := common.ExternalChainList()[2].ChainId + chain1 := pkg.ExternalChainList()[0].ChainId + chain2 := pkg.ExternalChainList()[1].ChainId + chain3 := pkg.ExternalChainList()[2].ChainId // set admin admin := sample.AccAddress() @@ -97,7 +97,7 @@ func TestMsgServer_RemoveChainParams(t *testing.T) { _, err := srv.RemoveChainParams(sdk.WrapSDKContext(ctx), &types.MsgRemoveChainParams{ Creator: admin, - ChainId: common.ExternalChainList()[0].ChainId, + ChainId: pkg.ExternalChainList()[0].ChainId, }) require.ErrorIs(t, err, types.ErrNotAuthorizedPolicy) }) @@ -119,16 +119,16 @@ func TestMsgServer_RemoveChainParams(t *testing.T) { _, err := srv.RemoveChainParams(sdk.WrapSDKContext(ctx), &types.MsgRemoveChainParams{ Creator: admin, - ChainId: common.ExternalChainList()[0].ChainId, + ChainId: pkg.ExternalChainList()[0].ChainId, }) require.ErrorIs(t, err, types.ErrChainParamsNotFound) // add chain params k.SetChainParamsList(ctx, types.ChainParamsList{ ChainParams: []*types.ChainParams{ - sample.ChainParams(common.ExternalChainList()[0].ChainId), - sample.ChainParams(common.ExternalChainList()[1].ChainId), - sample.ChainParams(common.ExternalChainList()[2].ChainId), + sample.ChainParams(pkg.ExternalChainList()[0].ChainId), + sample.ChainParams(pkg.ExternalChainList()[1].ChainId), + sample.ChainParams(pkg.ExternalChainList()[2].ChainId), }, }) @@ -137,7 +137,7 @@ func TestMsgServer_RemoveChainParams(t *testing.T) { // not found if chain ID not in list _, err = srv.RemoveChainParams(sdk.WrapSDKContext(ctx), &types.MsgRemoveChainParams{ Creator: admin, - ChainId: common.ExternalChainList()[3].ChainId, + ChainId: pkg.ExternalChainList()[3].ChainId, }) require.ErrorIs(t, err, types.ErrChainParamsNotFound) }) diff --git a/x/observer/keeper/msg_server_update_chain_params_test.go b/x/observer/keeper/msg_server_update_chain_params_test.go index 2a14a752b4..917f27b8db 100644 --- a/x/observer/keeper/msg_server_update_chain_params_test.go +++ b/x/observer/keeper/msg_server_update_chain_params_test.go @@ -7,7 +7,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/observer/keeper" @@ -21,9 +21,9 @@ func TestMsgServer_UpdateChainParams(t *testing.T) { }) srv := keeper.NewMsgServerImpl(*k) - chain1 := common.ExternalChainList()[0].ChainId - chain2 := common.ExternalChainList()[1].ChainId - chain3 := common.ExternalChainList()[2].ChainId + chain1 := pkg.ExternalChainList()[0].ChainId + chain2 := pkg.ExternalChainList()[1].ChainId + chain3 := pkg.ExternalChainList()[2].ChainId // set admin admin := sample.AccAddress() @@ -115,7 +115,7 @@ func TestMsgServer_UpdateChainParams(t *testing.T) { _, err := srv.UpdateChainParams(sdk.WrapSDKContext(ctx), &types.MsgUpdateChainParams{ Creator: admin, - ChainParams: sample.ChainParams(common.ExternalChainList()[0].ChainId), + ChainParams: sample.ChainParams(pkg.ExternalChainList()[0].ChainId), }) require.ErrorIs(t, err, types.ErrNotAuthorizedPolicy) }) diff --git a/x/observer/keeper/utils.go b/x/observer/keeper/utils.go index 5a1896755e..77270fa561 100644 --- a/x/observer/keeper/utils.go +++ b/x/observer/keeper/utils.go @@ -4,7 +4,7 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -48,7 +48,7 @@ func (k Keeper) IsAuthorized(ctx sdk.Context, address string) bool { func (k Keeper) FindBallot( ctx sdk.Context, index string, - chain *common.Chain, + chain *pkg.Chain, observationType types.ObservationType, ) (ballot types.Ballot, isNew bool, err error) { isNew = false diff --git a/x/observer/keeper/vote_inbound.go b/x/observer/keeper/vote_inbound.go index 5bc70ede88..0903fdc3e5 100644 --- a/x/observer/keeper/vote_inbound.go +++ b/x/observer/keeper/vote_inbound.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -16,7 +16,7 @@ func (k Keeper) VoteOnInboundBallot( ctx sdk.Context, senderChainID int64, receiverChainID int64, - coinType common.CoinType, + coinType pkg.CoinType, voter string, ballotIndex string, inTxHash string, @@ -58,7 +58,7 @@ func (k Keeper) VoteOnInboundBallot( if !found { return false, false, types.ErrChainParamsNotFound } - if coreParams.ZetaTokenContractAddress == "" && coinType == common.CoinType_Zeta { + if coreParams.ZetaTokenContractAddress == "" && coinType == pkg.CoinType_Zeta { return false, false, types.ErrInvalidZetaCoinTypes } } diff --git a/x/observer/keeper/vote_inbound_test.go b/x/observer/keeper/vote_inbound_test.go index 94b9ed4105..0197892216 100644 --- a/x/observer/keeper/vote_inbound_test.go +++ b/x/observer/keeper/vote_inbound_test.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/observer/types" @@ -23,8 +23,8 @@ func TestKeeper_VoteOnInboundBallot(t *testing.T) { _, _, err := k.VoteOnInboundBallot( ctx, getValidEthChainIDWithIndex(t, 0), - common.ZetaPrivnetChain().ChainId, - common.CoinType_ERC20, + pkg.ZetaPrivnetChain().ChainId, + pkg.CoinType_ERC20, sample.AccAddress(), "index", "inTxHash", @@ -45,8 +45,8 @@ func TestKeeper_VoteOnInboundBallot(t *testing.T) { _, _, err := k.VoteOnInboundBallot( ctx, getValidEthChainIDWithIndex(t, 0), - common.ZetaPrivnetChain().ChainId, - common.CoinType_ERC20, + pkg.ZetaPrivnetChain().ChainId, + pkg.CoinType_ERC20, sample.AccAddress(), "index", "inTxHash", @@ -67,8 +67,8 @@ func TestKeeper_VoteOnInboundBallot(t *testing.T) { _, _, err = k.VoteOnInboundBallot( ctx, getValidEthChainIDWithIndex(t, 0), - common.ZetaPrivnetChain().ChainId, - common.CoinType_ERC20, + pkg.ZetaPrivnetChain().ChainId, + pkg.CoinType_ERC20, sample.AccAddress(), "index", "inTxHash", @@ -96,8 +96,8 @@ func TestKeeper_VoteOnInboundBallot(t *testing.T) { _, _, err := k.VoteOnInboundBallot( ctx, getValidEthChainIDWithIndex(t, 0), - common.ZetaPrivnetChain().ChainId, - common.CoinType_ERC20, + pkg.ZetaPrivnetChain().ChainId, + pkg.CoinType_ERC20, sample.AccAddress(), "index", "inTxHash", @@ -133,8 +133,8 @@ func TestKeeper_VoteOnInboundBallot(t *testing.T) { _, _, err := k.VoteOnInboundBallot( ctx, getValidEthChainIDWithIndex(t, 0), - common.ZetaPrivnetChain().ChainId, - common.CoinType_ERC20, + pkg.ZetaPrivnetChain().ChainId, + pkg.CoinType_ERC20, observer, "index", "inTxHash", @@ -150,7 +150,7 @@ func TestKeeper_VoteOnInboundBallot(t *testing.T) { IsSupported: true, }, { - ChainId: common.ZetaPrivnetChain().ChainId, + ChainId: pkg.ZetaPrivnetChain().ChainId, IsSupported: false, }, }, @@ -161,8 +161,8 @@ func TestKeeper_VoteOnInboundBallot(t *testing.T) { _, _, err = k.VoteOnInboundBallot( ctx, getValidEthChainIDWithIndex(t, 0), - common.ZetaPrivnetChain().ChainId, - common.CoinType_ERC20, + pkg.ZetaPrivnetChain().ChainId, + pkg.CoinType_ERC20, observer, "index", "inTxHash", @@ -204,7 +204,7 @@ func TestKeeper_VoteOnInboundBallot(t *testing.T) { ctx, getValidEthChainIDWithIndex(t, 0), getValidEthChainIDWithIndex(t, 1), - common.CoinType_Zeta, + pkg.CoinType_Zeta, observer, "index", "inTxHash", @@ -245,7 +245,7 @@ func TestKeeper_VoteOnInboundBallot(t *testing.T) { ctx, getValidEthChainIDWithIndex(t, 0), getValidEthChainIDWithIndex(t, 1), - common.CoinType_ERC20, + pkg.CoinType_ERC20, observer, "index", "inTxHash", @@ -298,7 +298,7 @@ func TestKeeper_VoteOnInboundBallot(t *testing.T) { ctx, getValidEthChainIDWithIndex(t, 0), getValidEthChainIDWithIndex(t, 1), - common.CoinType_ERC20, + pkg.CoinType_ERC20, observer, "index", "inTxHash", @@ -362,7 +362,7 @@ func TestKeeper_VoteOnInboundBallot(t *testing.T) { ctx, getValidEthChainIDWithIndex(t, 0), getValidEthChainIDWithIndex(t, 1), - common.CoinType_ERC20, + pkg.CoinType_ERC20, observer, "index", "inTxHash", @@ -424,7 +424,7 @@ func TestKeeper_VoteOnInboundBallot(t *testing.T) { ctx, getValidEthChainIDWithIndex(t, 0), getValidEthChainIDWithIndex(t, 1), - common.CoinType_ERC20, + pkg.CoinType_ERC20, observer, "index", "inTxHash", diff --git a/x/observer/keeper/vote_outbound.go b/x/observer/keeper/vote_outbound.go index 3ee0c6b585..b118298bb7 100644 --- a/x/observer/keeper/vote_outbound.go +++ b/x/observer/keeper/vote_outbound.go @@ -2,7 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" observertypes "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -15,7 +15,7 @@ func (k Keeper) VoteOnOutboundBallot( ctx sdk.Context, ballotIndex string, outTxChainID int64, - receiveStatus common.ReceiveStatus, + receiveStatus pkg.ReceiveStatus, voter string, ) (isFinalized bool, isNew bool, ballot observertypes.Ballot, observationChainName string, err error) { // Observer Chain already checked then inbound is created diff --git a/x/observer/keeper/vote_outbound_test.go b/x/observer/keeper/vote_outbound_test.go index ad84672d4f..fb9ba8dc67 100644 --- a/x/observer/keeper/vote_outbound_test.go +++ b/x/observer/keeper/vote_outbound_test.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/observer/types" @@ -21,7 +21,7 @@ func TestKeeper_VoteOnOutboundBallot(t *testing.T) { ctx, "index", getValidEthChainIDWithIndex(t, 0), - common.ReceiveStatus_Success, + pkg.ReceiveStatus_Success, sample.AccAddress(), ) require.Error(t, err) @@ -41,7 +41,7 @@ func TestKeeper_VoteOnOutboundBallot(t *testing.T) { ctx, "index", getValidEthChainIDWithIndex(t, 0), - common.ReceiveStatus_Success, + pkg.ReceiveStatus_Success, sample.AccAddress(), ) require.Error(t, err) @@ -64,7 +64,7 @@ func TestKeeper_VoteOnOutboundBallot(t *testing.T) { ctx, "index", getValidEthChainIDWithIndex(t, 0), - common.ReceiveStatus(1000), + pkg.ReceiveStatus(1000), sample.AccAddress(), ) require.Error(t, err) @@ -88,7 +88,7 @@ func TestKeeper_VoteOnOutboundBallot(t *testing.T) { ctx, "index", getValidEthChainIDWithIndex(t, 0), - common.ReceiveStatus_Success, + pkg.ReceiveStatus_Success, sample.AccAddress(), ) require.Error(t, err) @@ -120,7 +120,7 @@ func TestKeeper_VoteOnOutboundBallot(t *testing.T) { ctx, "index", getValidEthChainIDWithIndex(t, 0), - common.ReceiveStatus_Success, + pkg.ReceiveStatus_Success, observer, ) require.NoError(t, err) @@ -166,7 +166,7 @@ func TestKeeper_VoteOnOutboundBallot(t *testing.T) { ctx, "index", getValidEthChainIDWithIndex(t, 0), - common.ReceiveStatus_Success, + pkg.ReceiveStatus_Success, observer, ) require.NoError(t, err) @@ -224,7 +224,7 @@ func TestKeeper_VoteOnOutboundBallot(t *testing.T) { ctx, "index", getValidEthChainIDWithIndex(t, 0), - common.ReceiveStatus_Success, + pkg.ReceiveStatus_Success, observer, ) require.NoError(t, err) @@ -280,7 +280,7 @@ func TestKeeper_VoteOnOutboundBallot(t *testing.T) { ctx, "index", getValidEthChainIDWithIndex(t, 0), - common.ReceiveStatus_Success, + pkg.ReceiveStatus_Success, observer, ) require.NoError(t, err) diff --git a/x/observer/migrations/v5/migrate_test.go b/x/observer/migrations/v5/migrate_test.go index 1ba3d77eff..78479d69cb 100644 --- a/x/observer/migrations/v5/migrate_test.go +++ b/x/observer/migrations/v5/migrate_test.go @@ -6,7 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" v5 "github.com/zeta-chain/zetacore/x/observer/migrations/v5" @@ -68,13 +68,13 @@ func TestMigrateObserverParams(t *testing.T) { params := types.Params{ ObserverParams: []*types.ObserverParams{ { - Chain: &common.Chain{ChainId: 2}, + Chain: &pkg.Chain{ChainId: 2}, BallotThreshold: dec42, MinObserverDelegation: dec1000, IsSupported: true, }, { - Chain: &common.Chain{ChainId: 3}, + Chain: &pkg.Chain{ChainId: 3}, BallotThreshold: dec43, MinObserverDelegation: dec1001, IsSupported: true, diff --git a/x/observer/types/chain_params.go b/x/observer/types/chain_params.go index d76557584d..c2d49cde7b 100644 --- a/x/observer/types/chain_params.go +++ b/x/observer/types/chain_params.go @@ -8,8 +8,8 @@ import ( errorsmod "cosmossdk.io/errors" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - ethcommon "github.com/ethereum/go-ethereum/common" - "github.com/zeta-chain/zetacore/common" + ethpkg "github.com/ethereum/go-ethereum/common" + "github.com/zeta-chain/zetacore/pkg" ) const ( @@ -27,7 +27,7 @@ func (cpl ChainParamsList) Validate() error { chainMap := make(map[int64]struct{}) existingChainMap := make(map[int64]struct{}) - externalChainList := common.DefaultChainsList() + externalChainList := pkg.DefaultChainsList() for _, chain := range externalChainList { chainMap[chain.ChainId] = struct{}{} } @@ -54,7 +54,7 @@ func ValidateChainParams(params *ChainParams) error { if params == nil { return fmt.Errorf("chain params cannot be nil") } - chain := common.GetChainFromChainID(params.ChainId) + chain := pkg.GetChainFromChainID(params.ChainId) if chain == nil { return fmt.Errorf("ChainId %d not supported", params.ChainId) } @@ -83,12 +83,12 @@ func ValidateChainParams(params *ChainParams) error { } // chain type specific checks - if common.IsBitcoinChain(params.ChainId) { + if pkg.IsBitcoinChain(params.ChainId) { if params.WatchUtxoTicker == 0 || params.WatchUtxoTicker > 300 { return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "WatchUtxoTicker %d out of range", params.WatchUtxoTicker) } } - if common.IsEVMChain(params.ChainId) { + if pkg.IsEVMChain(params.ChainId) { if !validChainContractAddress(params.ZetaTokenContractAddress) { return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "invalid ZetaTokenContractAddress %s", params.ZetaTokenContractAddress) } @@ -115,7 +115,7 @@ func validChainContractAddress(address string) bool { if !strings.HasPrefix(address, "0x") { return false } - return ethcommon.IsHexAddress(address) + return ethpkg.IsHexAddress(address) } // GetDefaultChainParams returns a list of default chain params @@ -140,7 +140,7 @@ func GetDefaultChainParams() ChainParamsList { func GetDefaultEthMainnetChainParams() *ChainParams { return &ChainParams{ - ChainId: common.EthChain().ChainId, + ChainId: pkg.EthChain().ChainId, ConfirmationCount: 14, ZetaTokenContractAddress: zeroAddress, ConnectorContractAddress: zeroAddress, @@ -158,7 +158,7 @@ func GetDefaultEthMainnetChainParams() *ChainParams { } func GetDefaultBscMainnetChainParams() *ChainParams { return &ChainParams{ - ChainId: common.BscMainnetChain().ChainId, + ChainId: pkg.BscMainnetChain().ChainId, ConfirmationCount: 14, ZetaTokenContractAddress: zeroAddress, ConnectorContractAddress: zeroAddress, @@ -176,7 +176,7 @@ func GetDefaultBscMainnetChainParams() *ChainParams { } func GetDefaultBtcMainnetChainParams() *ChainParams { return &ChainParams{ - ChainId: common.BtcMainnetChain().ChainId, + ChainId: pkg.BtcMainnetChain().ChainId, ConfirmationCount: 2, ZetaTokenContractAddress: zeroAddress, ConnectorContractAddress: zeroAddress, @@ -194,7 +194,7 @@ func GetDefaultBtcMainnetChainParams() *ChainParams { } func GetDefaultGoerliTestnetChainParams() *ChainParams { return &ChainParams{ - ChainId: common.GoerliChain().ChainId, + ChainId: pkg.GoerliChain().ChainId, ConfirmationCount: 6, // This is the actual Zeta token Goerli testnet, we need to specify this address for the integration tests to pass ZetaTokenContractAddress: "0x0000c304d2934c00db1d51995b9f6996affd17c0", @@ -213,7 +213,7 @@ func GetDefaultGoerliTestnetChainParams() *ChainParams { } func GetDefaultBscTestnetChainParams() *ChainParams { return &ChainParams{ - ChainId: common.BscTestnetChain().ChainId, + ChainId: pkg.BscTestnetChain().ChainId, ConfirmationCount: 6, ZetaTokenContractAddress: zeroAddress, ConnectorContractAddress: zeroAddress, @@ -231,7 +231,7 @@ func GetDefaultBscTestnetChainParams() *ChainParams { } func GetDefaultMumbaiTestnetChainParams() *ChainParams { return &ChainParams{ - ChainId: common.MumbaiChain().ChainId, + ChainId: pkg.MumbaiChain().ChainId, ConfirmationCount: 12, ZetaTokenContractAddress: zeroAddress, ConnectorContractAddress: zeroAddress, @@ -249,7 +249,7 @@ func GetDefaultMumbaiTestnetChainParams() *ChainParams { } func GetDefaultBtcTestnetChainParams() *ChainParams { return &ChainParams{ - ChainId: common.BtcTestNetChain().ChainId, + ChainId: pkg.BtcTestNetChain().ChainId, ConfirmationCount: 2, ZetaTokenContractAddress: zeroAddress, ConnectorContractAddress: zeroAddress, @@ -267,7 +267,7 @@ func GetDefaultBtcTestnetChainParams() *ChainParams { } func GetDefaultBtcRegtestChainParams() *ChainParams { return &ChainParams{ - ChainId: common.BtcRegtestChain().ChainId, + ChainId: pkg.BtcRegtestChain().ChainId, ConfirmationCount: 1, ZetaTokenContractAddress: zeroAddress, ConnectorContractAddress: zeroAddress, @@ -285,7 +285,7 @@ func GetDefaultBtcRegtestChainParams() *ChainParams { } func GetDefaultGoerliLocalnetChainParams() *ChainParams { return &ChainParams{ - ChainId: common.GoerliLocalnetChain().ChainId, + ChainId: pkg.GoerliLocalnetChain().ChainId, ConfirmationCount: 1, ZetaTokenContractAddress: "0x733aB8b06DDDEf27Eaa72294B0d7c9cEF7f12db9", ConnectorContractAddress: "0xD28D6A0b8189305551a0A8bd247a6ECa9CE781Ca", @@ -303,7 +303,7 @@ func GetDefaultGoerliLocalnetChainParams() *ChainParams { } func GetDefaultZetaPrivnetChainParams() *ChainParams { return &ChainParams{ - ChainId: common.ZetaPrivnetChain().ChainId, + ChainId: pkg.ZetaPrivnetChain().ChainId, ConfirmationCount: 1, ZetaTokenContractAddress: zeroAddress, ConnectorContractAddress: zeroAddress, diff --git a/x/observer/types/message_add_blame_vote.go b/x/observer/types/message_add_blame_vote.go index d10411f026..c82aeb18fa 100644 --- a/x/observer/types/message_add_blame_vote.go +++ b/x/observer/types/message_add_blame_vote.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/ethereum/go-ethereum/crypto" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" ) const TypeMsgAddBlameVote = "add_blame_vote" @@ -33,7 +33,7 @@ func (m *MsgAddBlameVote) ValidateBasic() error { if err != nil { return cosmoserrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) } - if common.GetChainFromChainID(m.ChainId) == nil { + if pkg.GetChainFromChainID(m.ChainId) == nil { return cosmoserrors.Wrapf(sdkerrors.ErrInvalidChainID, "chain id (%d)", m.ChainId) } return nil diff --git a/x/observer/types/message_add_block_header.go b/x/observer/types/message_add_block_header.go index f7094a002c..3570777a63 100644 --- a/x/observer/types/message_add_block_header.go +++ b/x/observer/types/message_add_block_header.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/ethereum/go-ethereum/crypto" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" ) var _ sdk.Msg = &MsgAddBlockHeader{} @@ -15,7 +15,7 @@ const ( TypeMsgAddBlockHeader = "add_block_header" ) -func NewMsgAddBlockHeader(creator string, chainID int64, blockHash []byte, height int64, header common.HeaderData) *MsgAddBlockHeader { +func NewMsgAddBlockHeader(creator string, chainID int64, blockHash []byte, height int64, header pkg.HeaderData) *MsgAddBlockHeader { return &MsgAddBlockHeader{ Creator: creator, ChainId: chainID, @@ -52,7 +52,7 @@ func (msg *MsgAddBlockHeader) ValidateBasic() error { return cosmoserrors.Wrapf(sdkerrors.ErrInvalidAddress, err.Error()) } - if common.IsHeaderSupportedEvmChain(msg.ChainId) || common.IsBitcoinChain(msg.ChainId) { + if pkg.IsHeaderSupportedEvmChain(msg.ChainId) || pkg.IsBitcoinChain(msg.ChainId) { if len(msg.BlockHash) != 32 { return cosmoserrors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid block hash length (%d)", len(msg.BlockHash)) } diff --git a/x/observer/types/message_add_block_header_test.go b/x/observer/types/message_add_block_header_test.go index f3b86b6bc1..86fb2d3058 100644 --- a/x/observer/types/message_add_block_header_test.go +++ b/x/observer/types/message_add_block_header_test.go @@ -9,7 +9,7 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/observer/types" @@ -18,7 +18,7 @@ import ( func TestMsgAddBlockHeader_ValidateBasic(t *testing.T) { keeper.SetConfig(false) var header ethtypes.Header - file, err := os.Open("../../../common/testdata/eth_header_18495266.json") + file, err := os.Open("../../../pkg/testdata/eth_header_18495266.json") require.NoError(t, err) defer file.Close() headerBytes := make([]byte, 4096) @@ -29,7 +29,7 @@ func TestMsgAddBlockHeader_ValidateBasic(t *testing.T) { var buffer bytes.Buffer err = header.EncodeRLP(&buffer) require.NoError(t, err) - headerData := common.NewEthereumHeader(buffer.Bytes()) + headerData := pkg.NewEthereumHeader(buffer.Bytes()) tests := []struct { name string msg *types.MsgAddBlockHeader @@ -42,7 +42,7 @@ func TestMsgAddBlockHeader_ValidateBasic(t *testing.T) { 1, []byte{}, 6, - common.HeaderData{}, + pkg.HeaderData{}, ), error: true, }, @@ -53,7 +53,7 @@ func TestMsgAddBlockHeader_ValidateBasic(t *testing.T) { -1, []byte{}, 6, - common.HeaderData{}, + pkg.HeaderData{}, ), error: true, }, @@ -64,7 +64,7 @@ func TestMsgAddBlockHeader_ValidateBasic(t *testing.T) { 5, sample.Hash().Bytes(), 6, - common.HeaderData{}, + pkg.HeaderData{}, ), error: true, }, @@ -75,7 +75,7 @@ func TestMsgAddBlockHeader_ValidateBasic(t *testing.T) { 5, sample.Hash().Bytes()[:31], 6, - common.HeaderData{}, + pkg.HeaderData{}, ), error: true, }, diff --git a/x/observer/types/message_add_observer.go b/x/observer/types/message_add_observer.go index 991bb0afa1..80b75ba86b 100644 --- a/x/observer/types/message_add_observer.go +++ b/x/observer/types/message_add_observer.go @@ -4,7 +4,7 @@ import ( cosmoserrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" ) const TypeMsgAddObserver = "add_observer" @@ -50,11 +50,11 @@ func (msg *MsgAddObserver) ValidateBasic() error { if err != nil { return cosmoserrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid observer address (%s)", err) } - _, err = common.NewPubKey(msg.ZetaclientGranteePubkey) + _, err = pkg.NewPubKey(msg.ZetaclientGranteePubkey) if err != nil { return cosmoserrors.Wrapf(sdkerrors.ErrInvalidPubKey, "invalid zetaclient grantee pubkey (%s)", err) } - _, err = common.GetAddressFromPubkeyString(msg.ZetaclientGranteePubkey) + _, err = pkg.GetAddressFromPubkeyString(msg.ZetaclientGranteePubkey) if err != nil { return cosmoserrors.Wrapf(sdkerrors.ErrInvalidPubKey, "invalid zetaclient grantee pubkey (%s)", err) } diff --git a/x/observer/types/message_remove_chain_params.go b/x/observer/types/message_remove_chain_params.go index dbf4484263..02fdb1803c 100644 --- a/x/observer/types/message_remove_chain_params.go +++ b/x/observer/types/message_remove_chain_params.go @@ -2,7 +2,7 @@ package types import ( cosmoserrors "cosmossdk.io/errors" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -47,7 +47,7 @@ func (msg *MsgRemoveChainParams) ValidateBasic() error { } // Check if chain exists - chain := common.GetChainFromChainID(msg.ChainId) + chain := pkg.GetChainFromChainID(msg.ChainId) if chain == nil { return cosmoserrors.Wrapf(sdkerrors.ErrInvalidChainID, "invalid chain id (%d)", msg.ChainId) } diff --git a/x/observer/types/message_remove_chain_params_test.go b/x/observer/types/message_remove_chain_params_test.go index 9168821413..48b862f214 100644 --- a/x/observer/types/message_remove_chain_params_test.go +++ b/x/observer/types/message_remove_chain_params_test.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -21,14 +21,14 @@ func TestMsgRemoveChainParams_ValidateBasic(t *testing.T) { name: "valid message", msg: types.NewMsgRemoveChainParams( sample.AccAddress(), - common.ExternalChainList()[0].ChainId, + pkg.ExternalChainList()[0].ChainId, ), }, { name: "invalid address", msg: types.NewMsgRemoveChainParams( "invalid_address", - common.ExternalChainList()[0].ChainId, + pkg.ExternalChainList()[0].ChainId, ), err: sdkerrors.ErrInvalidAddress, }, diff --git a/x/observer/types/message_update_chain_params_test.go b/x/observer/types/message_update_chain_params_test.go index 633720d6b7..2e714f0b07 100644 --- a/x/observer/types/message_update_chain_params_test.go +++ b/x/observer/types/message_update_chain_params_test.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -21,14 +21,14 @@ func TestMsgUpdateChainParams_ValidateBasic(t *testing.T) { name: "valid message", msg: types.NewMsgUpdateChainParams( sample.AccAddress(), - sample.ChainParams(common.ExternalChainList()[0].ChainId), + sample.ChainParams(pkg.ExternalChainList()[0].ChainId), ), }, { name: "invalid address", msg: types.NewMsgUpdateChainParams( "invalid_address", - sample.ChainParams(common.ExternalChainList()[0].ChainId), + sample.ChainParams(pkg.ExternalChainList()[0].ChainId), ), err: sdkerrors.ErrInvalidAddress, }, diff --git a/x/observer/types/observer_set.go b/x/observer/types/observer_set.go index e1b6c61c9b..252f3cce8e 100644 --- a/x/observer/types/observer_set.go +++ b/x/observer/types/observer_set.go @@ -2,7 +2,7 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" ) func (m *ObserverSet) Len() int { @@ -24,11 +24,11 @@ func (m *ObserverSet) Validate() error { return nil } -func CheckReceiveStatus(status common.ReceiveStatus) error { +func CheckReceiveStatus(status pkg.ReceiveStatus) error { switch status { - case common.ReceiveStatus_Success: + case pkg.ReceiveStatus_Success: return nil - case common.ReceiveStatus_Failed: + case pkg.ReceiveStatus_Failed: return nil default: return ErrInvalidStatus diff --git a/x/observer/types/params.go b/x/observer/types/params.go index 5dda864446..6f8b262c25 100644 --- a/x/observer/types/params.go +++ b/x/observer/types/params.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "gopkg.in/yaml.v2" ) @@ -28,7 +28,7 @@ func NewParams(observerParams []*ObserverParams, adminParams []*Admin_Policy, ba // privnet chains are supported by default for testing purposes // custom params must be provided in genesis for other networks func DefaultParams() Params { - chains := common.PrivnetChainList() + chains := pkg.PrivnetChainList() observerParams := make([]*ObserverParams, len(chains)) for i, chain := range chains { observerParams[i] = &ObserverParams{ diff --git a/x/observer/types/parsers.go b/x/observer/types/parsers.go index a1d3c9a889..9cfad1c182 100644 --- a/x/observer/types/parsers.go +++ b/x/observer/types/parsers.go @@ -2,14 +2,14 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" ) -func ConvertReceiveStatusToVoteType(status common.ReceiveStatus) VoteType { +func ConvertReceiveStatusToVoteType(status pkg.ReceiveStatus) VoteType { switch status { - case common.ReceiveStatus_Success: + case pkg.ReceiveStatus_Success: return VoteType_SuccessObservation - case common.ReceiveStatus_Failed: + case pkg.ReceiveStatus_Failed: return VoteType_FailureObservation default: return VoteType_NotYetVoted diff --git a/zetaclient/app_context/app_context.go b/zetaclient/app_context/app_context.go index d73f48d9d0..537b830e7a 100644 --- a/zetaclient/app_context/app_context.go +++ b/zetaclient/app_context/app_context.go @@ -1,7 +1,7 @@ package appcontext import ( - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/zetaclient/config" corecontext "github.com/zeta-chain/zetacore/zetaclient/core_context" ) @@ -32,12 +32,12 @@ func (a AppContext) ZetaCoreContext() *corecontext.ZetaCoreContext { } // GetBTCChainAndConfig returns btc chain and config if enabled -func (a AppContext) GetBTCChainAndConfig() (common.Chain, config.BTCConfig, bool) { +func (a AppContext) GetBTCChainAndConfig() (pkg.Chain, config.BTCConfig, bool) { btcConfig, configEnabled := a.Config().GetBTCConfig() btcChain, _, paramsEnabled := a.ZetaCoreContext().GetBTCChainParams() if !configEnabled || !paramsEnabled { - return common.Chain{}, config.BTCConfig{}, false + return pkg.Chain{}, config.BTCConfig{}, false } return btcChain, btcConfig, true diff --git a/zetaclient/authz/authz_signer.go b/zetaclient/authz/authz_signer.go index cc9cccb37a..c17f5c5704 100644 --- a/zetaclient/authz/authz_signer.go +++ b/zetaclient/authz/authz_signer.go @@ -2,12 +2,12 @@ package authz import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" ) type Signer struct { - KeyType common.KeyType + KeyType pkg.KeyType GranterAddress string GranteeAddress sdk.AccAddress } @@ -21,7 +21,7 @@ var signers map[string]Signer func init() { signersList := make(map[string]Signer) for _, tx := range crosschaintypes.GetAllAuthzZetaclientTxTypes() { - signersList[tx] = Signer{KeyType: common.ZetaClientGranteeKey} + signersList[tx] = Signer{KeyType: pkg.ZetaClientGranteeKey} } signers = signersList } diff --git a/zetaclient/bitcoin/bitcoin_client.go b/zetaclient/bitcoin/bitcoin_client.go index 34ddc580ab..ec1e3470ab 100644 --- a/zetaclient/bitcoin/bitcoin_client.go +++ b/zetaclient/bitcoin/bitcoin_client.go @@ -31,7 +31,7 @@ import ( lru "github.com/hashicorp/golang-lru" "github.com/pkg/errors" "github.com/rs/zerolog" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" clienttypes "github.com/zeta-chain/zetacore/zetaclient/types" @@ -59,7 +59,7 @@ type BTCLog struct { // BTCChainClient represents a chain configuration for Bitcoin // Filled with above constants depending on chain type BTCChainClient struct { - chain common.Chain + chain pkg.Chain netParams *chaincfg.Params rpcClient interfaces.BTCRPCClient zetaClient interfaces.ZetaCoreBridger @@ -114,7 +114,7 @@ func (ob *BTCChainClient) WithBtcClient(client *rpcclient.Client) { ob.rpcClient = client } -func (ob *BTCChainClient) WithChain(chain common.Chain) { +func (ob *BTCChainClient) WithChain(chain pkg.Chain) { ob.Mu.Lock() defer ob.Mu.Unlock() ob.chain = chain @@ -135,7 +135,7 @@ func (ob *BTCChainClient) GetChainParams() observertypes.ChainParams { // NewBitcoinClient returns a new configuration based on supplied target chain func NewBitcoinClient( appcontext *appcontext.AppContext, - chain common.Chain, + chain pkg.Chain, bridge interfaces.ZetaCoreBridger, tss interfaces.TSSSigner, dbpath string, @@ -147,7 +147,7 @@ func NewBitcoinClient( } ob.stop = make(chan struct{}) ob.chain = chain - netParams, err := common.BitcoinNetParamsFromChainID(ob.chain.ChainId) + netParams, err := pkg.BitcoinNetParamsFromChainID(ob.chain.ChainId) if err != nil { return nil, fmt.Errorf("error getting net params for chain %d: %s", ob.chain.ChainId, err) } @@ -365,7 +365,7 @@ func (ob *BTCChainClient) postBlockHeader(tip int64) error { ob.chain.ChainId, blockHash[:], res2.Block.Height, - common.NewBitcoinHeader(headerBuf.Bytes()), + pkg.NewBitcoinHeader(headerBuf.Bytes()), ) ob.logger.WatchInTx.Info().Msgf("posted block header %d: %s", bn, blockHash) if err != nil { // error shouldn't block the process @@ -557,10 +557,10 @@ func (ob *BTCChainClient) IsSendOutTxProcessed(cctx *types.CrossChainTx, logger nil, // gas price not used with Bitcoin 0, // gas limit not used with Bitcoin amountInSat, - common.ReceiveStatus_Success, + pkg.ReceiveStatus_Success, ob.chain, nonce, - common.CoinType_Gas, + pkg.CoinType_Gas, ) if err != nil { logger.Error().Err(err).Msgf("IsSendOutTxProcessed: error confirming bitcoin outTx %s, nonce %d ballot %s", res.TxID, nonce, ballot) @@ -697,7 +697,7 @@ func (ob *BTCChainClient) GetInboundVoteMessageFromBtcEvent(inTx *BTCInTxEvnet) inTx.TxHash, inTx.BlockNumber, 0, - common.CoinType_Gas, + pkg.CoinType_Gas, "", ob.zetaClient.GetKeys().GetOperatorAddress().String(), 0, @@ -707,7 +707,7 @@ func (ob *BTCChainClient) GetInboundVoteMessageFromBtcEvent(inTx *BTCInTxEvnet) // IsInTxRestricted returns true if the inTx contains restricted addresses func (ob *BTCChainClient) IsInTxRestricted(inTx *BTCInTxEvnet) bool { receiver := "" - parsedAddress, _, err := common.ParseAddressAndData(hex.EncodeToString(inTx.MemoBytes)) + parsedAddress, _, err := pkg.ParseAddressAndData(hex.EncodeToString(inTx.MemoBytes)) if err == nil && parsedAddress != (ethcommon.Address{}) { receiver = parsedAddress.Hex() } @@ -767,7 +767,7 @@ func GetBtcEvent( logger.Warn().Err(err).Msgf("error hex decoding memo") return nil, fmt.Errorf("error hex decoding memo: %s", err) } - if bytes.Equal(memoBytes, []byte(common.DonationMessage)) { + if bytes.Equal(memoBytes, []byte(pkg.DonationMessage)) { logger.Info().Msgf("donation tx: %s; value %f", tx.Txid, value) return nil, fmt.Errorf("donation tx: %s; value %f", tx.Txid, value) } @@ -850,7 +850,7 @@ func (ob *BTCChainClient) FetchUTXOS() error { // List all unspent UTXOs (160ms) tssAddr := ob.Tss.BTCAddress() - address, err := common.DecodeBtcAddress(tssAddr, ob.chain.ChainId) + address, err := pkg.DecodeBtcAddress(tssAddr, ob.chain.ChainId) if err != nil { return fmt.Errorf("btc: error decoding wallet address (%s) : %s", tssAddr, err.Error()) } @@ -965,7 +965,7 @@ func (ob *BTCChainClient) getOutTxidByNonce(nonce uint64, test bool) (string, er func (ob *BTCChainClient) findNonceMarkUTXO(nonce uint64, txid string) (int, error) { tssAddress := ob.Tss.BTCAddressWitnessPubkeyHash().EncodeAddress() - amount := common.NonceMarkAmount(nonce) + amount := pkg.NonceMarkAmount(nonce) for i, utxo := range ob.utxos { sats, err := GetSatoshis(utxo.Amount) if err != nil { @@ -1338,8 +1338,8 @@ func (ob *BTCChainClient) checkTSSVout(params *types.OutboundTxParams, vouts []b if recvAddress != tssAddress { return fmt.Errorf("checkTSSVout: nonce-mark address %s not match TSS address %s", recvAddress, tssAddress) } - if amount != common.NonceMarkAmount(nonce) { - return fmt.Errorf("checkTSSVout: nonce-mark amount %d not match nonce-mark amount %d", amount, common.NonceMarkAmount(nonce)) + if amount != pkg.NonceMarkAmount(nonce) { + return fmt.Errorf("checkTSSVout: nonce-mark amount %d not match nonce-mark amount %d", amount, pkg.NonceMarkAmount(nonce)) } } // 2nd vout: payment to recipient @@ -1383,8 +1383,8 @@ func (ob *BTCChainClient) checkTSSVoutCancelled(params *types.OutboundTxParams, if recvAddress != tssAddress { return fmt.Errorf("checkTSSVoutCancelled: nonce-mark address %s not match TSS address %s", recvAddress, tssAddress) } - if amount != common.NonceMarkAmount(nonce) { - return fmt.Errorf("checkTSSVoutCancelled: nonce-mark amount %d not match nonce-mark amount %d", amount, common.NonceMarkAmount(nonce)) + if amount != pkg.NonceMarkAmount(nonce) { + return fmt.Errorf("checkTSSVoutCancelled: nonce-mark amount %d not match nonce-mark amount %d", amount, pkg.NonceMarkAmount(nonce)) } } // 2nd vout: change to TSS (optional) diff --git a/zetaclient/bitcoin/bitcoin_client_rpc_test.go b/zetaclient/bitcoin/bitcoin_client_rpc_test.go index 7f8c060dce..bb3d44b67d 100644 --- a/zetaclient/bitcoin/bitcoin_client_rpc_test.go +++ b/zetaclient/bitcoin/bitcoin_client_rpc_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" appcontext "github.com/zeta-chain/zetacore/zetaclient/app_context" clientcommon "github.com/zeta-chain/zetacore/zetaclient/common" "github.com/zeta-chain/zetacore/zetaclient/config" @@ -47,7 +47,7 @@ func (suite *BitcoinClientTestSuite) SetupTest() { PrivKey: privateKey, } appContext := appcontext.NewAppContext(&corecontext.ZetaCoreContext{}, config.Config{}) - client, err := NewBitcoinClient(appContext, common.BtcRegtestChain(), nil, tss, "/tmp", clientcommon.DefaultLoggers(), nil) + client, err := NewBitcoinClient(appContext, pkg.BtcRegtestChain(), nil, tss, "/tmp", clientcommon.DefaultLoggers(), nil) suite.Require().NoError(err) suite.BitcoinChainClient = client skBytes, err := hex.DecodeString(skHex) diff --git a/zetaclient/bitcoin/bitcoin_client_test.go b/zetaclient/bitcoin/bitcoin_client_test.go index 68cb840e0f..837fe1e963 100644 --- a/zetaclient/bitcoin/bitcoin_client_test.go +++ b/zetaclient/bitcoin/bitcoin_client_test.go @@ -15,7 +15,7 @@ import ( "github.com/btcsuite/btcutil" "github.com/rs/zerolog/log" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" observertypes "github.com/zeta-chain/zetacore/x/observer/types" "github.com/zeta-chain/zetacore/zetaclient/testutils" "github.com/zeta-chain/zetacore/zetaclient/testutils/stub" @@ -23,7 +23,7 @@ import ( func MockBTCClientMainnet() *BTCChainClient { return &BTCChainClient{ - chain: common.BtcMainnetChain(), + chain: pkg.BtcMainnetChain(), zetaClient: stub.NewMockZetaCoreBridge(), Tss: stub.NewTSSMainnet(), } @@ -155,7 +155,7 @@ func TestCalcDepositorFee828440(t *testing.T) { var blockVb btcjson.GetBlockVerboseTxResult err := testutils.LoadObjectFromJSONFile(&blockVb, path.Join("../", testutils.TestDataPathBTC, "block_trimmed_8332_828440.json")) require.NoError(t, err) - dynamicFee828440 := DepositorFee(32 * common.DefaultGasPriceMultiplier) + dynamicFee828440 := DepositorFee(32 * pkg.DefaultGasPriceMultiplier) // should return default fee if it's a regtest block fee := CalcDepositorFee(&blockVb, 18444, &chaincfg.RegressionNetParams, log.Logger) diff --git a/zetaclient/bitcoin/bitcoin_signer.go b/zetaclient/bitcoin/bitcoin_signer.go index 05106e9a48..42e0e2990e 100644 --- a/zetaclient/bitcoin/bitcoin_signer.go +++ b/zetaclient/bitcoin/bitcoin_signer.go @@ -21,7 +21,7 @@ import ( "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcutil" "github.com/rs/zerolog" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" "github.com/zeta-chain/zetacore/zetaclient/config" @@ -80,11 +80,11 @@ func (signer *BTCSigner) SignWithdrawTx( btcClient *BTCChainClient, height uint64, nonce uint64, - chain *common.Chain, + chain *pkg.Chain, cancelTx bool, ) (*wire.MsgTx, error) { estimateFee := float64(gasPrice.Uint64()*outTxBytesMax) / 1e8 - nonceMark := common.NonceMarkAmount(nonce) + nonceMark := pkg.NonceMarkAmount(nonce) // refresh unspent UTXOs and continue with keysign regardless of error err := btcClient.FetchUTXOS() @@ -259,7 +259,7 @@ func (signer *BTCSigner) TryProcessOutTx( Logger() params := cctx.GetCurrentOutTxParam() - if params.CoinType == common.CoinType_Zeta || params.CoinType == common.CoinType_ERC20 { + if params.CoinType == pkg.CoinType_Zeta || params.CoinType == pkg.CoinType_ERC20 { logger.Error().Msgf("BTC TryProcessOutTx: can only send BTC to a BTC network") return } @@ -290,12 +290,12 @@ func (signer *BTCSigner) TryProcessOutTx( } // Check receiver P2WPKH address - bitcoinNetParams, err := common.BitcoinNetParamsFromChainID(params.ReceiverChainId) + bitcoinNetParams, err := pkg.BitcoinNetParamsFromChainID(params.ReceiverChainId) if err != nil { logger.Error().Err(err).Msgf("cannot get bitcoin net params%v", err) return } - addr, err := common.DecodeBtcAddress(params.Receiver, params.ReceiverChainId) + addr, err := pkg.DecodeBtcAddress(params.Receiver, params.ReceiverChainId) if err != nil { logger.Error().Err(err).Msgf("cannot decode address %s ", params.Receiver) return diff --git a/zetaclient/bitcoin/bitcoin_signer_test.go b/zetaclient/bitcoin/bitcoin_signer_test.go index d5b3e0ca97..e08d15e45b 100644 --- a/zetaclient/bitcoin/bitcoin_signer_test.go +++ b/zetaclient/bitcoin/bitcoin_signer_test.go @@ -23,7 +23,7 @@ import ( "github.com/btcsuite/btcutil" "github.com/ethereum/go-ethereum/crypto" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/zetaclient/config" . "gopkg.in/check.v1" ) @@ -452,7 +452,7 @@ func mineTxNSetNonceMark(ob *BTCChainClient, nonce uint64, txid string, preMarkI // Set nonce mark tssAddress := ob.Tss.BTCAddressWitnessPubkeyHash().EncodeAddress() - nonceMark := btcjson.ListUnspentResult{TxID: txid, Address: tssAddress, Amount: float64(common.NonceMarkAmount(nonce)) * 1e-8} + nonceMark := btcjson.ListUnspentResult{TxID: txid, Address: tssAddress, Amount: float64(pkg.NonceMarkAmount(nonce)) * 1e-8} if preMarkIndex >= 0 { // replace nonce-mark utxo ob.utxos[preMarkIndex] = nonceMark diff --git a/zetaclient/bitcoin/bitcoin_test.go b/zetaclient/bitcoin/bitcoin_test.go index de73756be4..ffb0f19d44 100644 --- a/zetaclient/bitcoin/bitcoin_test.go +++ b/zetaclient/bitcoin/bitcoin_test.go @@ -16,7 +16,7 @@ import ( "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcutil" "github.com/stretchr/testify/suite" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "gorm.io/driver/sqlite" "gorm.io/gorm" ) @@ -145,7 +145,7 @@ func getTSSTX(tss *interfaces.TestSigner, tx *wire.MsgTx, sigHashes *txscript.Tx return "", err } - sig65B, err := tss.Sign(witnessHash, 10, 10, &common.Chain{}, "") + sig65B, err := tss.Sign(witnessHash, 10, 10, &pkg.Chain{}, "") R := big.NewInt(0).SetBytes(sig65B[:32]) S := big.NewInt(0).SetBytes(sig65B[32:64]) sig := btcec.Signature{ diff --git a/zetaclient/bitcoin/inbound_tracker.go b/zetaclient/bitcoin/inbound_tracker.go index 3aa83dc031..c1e4851be3 100644 --- a/zetaclient/bitcoin/inbound_tracker.go +++ b/zetaclient/bitcoin/inbound_tracker.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/zetaclient/types" "github.com/zeta-chain/zetacore/zetaclient/zetabridge" ) @@ -44,7 +44,7 @@ func (ob *BTCChainClient) ObserveTrackerSuggestions() error { if err != nil { return err } - ob.logger.WatchInTx.Info().Msgf("Vote submitted for inbound Tracker,Chain : %s,Ballot Identifier : %s, coin-type %s", ob.chain.ChainName, ballotIdentifier, common.CoinType_Gas.String()) + ob.logger.WatchInTx.Info().Msgf("Vote submitted for inbound Tracker,Chain : %s,Ballot Identifier : %s, coin-type %s", ob.chain.ChainName, ballotIdentifier, pkg.CoinType_Gas.String()) } return nil } diff --git a/zetaclient/bitcoin/utils.go b/zetaclient/bitcoin/utils.go index b11c1a7056..0cda86862f 100644 --- a/zetaclient/bitcoin/utils.go +++ b/zetaclient/bitcoin/utils.go @@ -12,7 +12,7 @@ import ( "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcutil" "github.com/rs/zerolog" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" @@ -171,11 +171,11 @@ func CalcDepositorFee(blockVb *btcjson.GetBlockVerboseTxResult, chainID int64, n dynamicFee := true // use default fee for regnet - if common.IsBitcoinRegnet(chainID) { + if pkg.IsBitcoinRegnet(chainID) { dynamicFee = false } // mainnet dynamic fee takes effect only after a planned upgrade height - if common.IsBitcoinMainnet(chainID) && blockVb.Height < DynamicDepositorFeeHeight { + if pkg.IsBitcoinMainnet(chainID) && blockVb.Height < DynamicDepositorFeeHeight { dynamicFee = false } if !dynamicFee { @@ -188,7 +188,7 @@ func CalcDepositorFee(blockVb *btcjson.GetBlockVerboseTxResult, chainID int64, n feeRate = defaultDepositorFeeRate // use default fee rate if calculation fails, should not happen logger.Error().Err(err).Msgf("cannot calculate fee rate for block %d", blockVb.Height) } - feeRate = feeRate * common.DefaultGasPriceMultiplier + feeRate = feeRate * pkg.DefaultGasPriceMultiplier return DepositorFee(feeRate) } @@ -225,7 +225,7 @@ func PayToWitnessPubKeyHashScript(pubKeyHash []byte) ([]byte, error) { } // DecodeP2WPKHVout decodes receiver and amount from P2WPKH output -func DecodeP2WPKHVout(vout btcjson.Vout, chain common.Chain) (string, int64, error) { +func DecodeP2WPKHVout(vout btcjson.Vout, chain pkg.Chain) (string, int64, error) { amount, err := GetSatoshis(vout.Value) if err != nil { return "", 0, errors.Wrap(err, "error getting satoshis") diff --git a/zetaclient/bitcoin/utils_test.go b/zetaclient/bitcoin/utils_test.go index 6ae066f424..48ae850c6b 100644 --- a/zetaclient/bitcoin/utils_test.go +++ b/zetaclient/bitcoin/utils_test.go @@ -6,14 +6,14 @@ import ( "github.com/btcsuite/btcd/btcjson" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/zetaclient/testutils" ) func TestDecodeP2WPKHVout(t *testing.T) { // load archived outtx raw result // https://blockstream.info/tx/030cd813443f7b70cc6d8a544d320c6d8465e4528fc0f3410b599dc0b26753a0 - chain := common.BtcMainnetChain() + chain := pkg.BtcMainnetChain() nonce := uint64(148) nameTx := path.Join("../", testutils.TestDataPathBTC, testutils.FileNameBTCOuttx(chain.ChainId, nonce)) @@ -26,7 +26,7 @@ func TestDecodeP2WPKHVout(t *testing.T) { receiver, amount, err := DecodeP2WPKHVout(rawResult.Vout[0], chain) require.NoError(t, err) require.Equal(t, testutils.TSSAddressBTCMainnet, receiver) - require.Equal(t, common.NonceMarkAmount(nonce), amount) + require.Equal(t, pkg.NonceMarkAmount(nonce), amount) // decode vout 1, payment 0.00012000 BTC receiver, amount, err = DecodeP2WPKHVout(rawResult.Vout[1], chain) @@ -44,7 +44,7 @@ func TestDecodeP2WPKHVout(t *testing.T) { func TestDecodeP2WPKHVoutErrors(t *testing.T) { // load archived outtx raw result // https://blockstream.info/tx/030cd813443f7b70cc6d8a544d320c6d8465e4528fc0f3410b599dc0b26753a0 - chain := common.BtcMainnetChain() + chain := pkg.BtcMainnetChain() nonce := uint64(148) nameTx := path.Join("../", testutils.TestDataPathBTC, testutils.FileNameBTCOuttx(chain.ChainId, nonce)) diff --git a/zetaclient/config/config_chain.go b/zetaclient/config/config_chain.go index 329c650023..1f541f5ecb 100644 --- a/zetaclient/config/config_chain.go +++ b/zetaclient/config/config_chain.go @@ -1,7 +1,7 @@ package config import ( - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" ) const ( @@ -46,26 +46,26 @@ var bitcoinConfigRegnet = BTCConfig{ } var evmChainsConfigs = map[int64]EVMConfig{ - common.EthChain().ChainId: { - Chain: common.EthChain(), + pkg.EthChain().ChainId: { + Chain: pkg.EthChain(), }, - common.BscMainnetChain().ChainId: { - Chain: common.BscMainnetChain(), + pkg.BscMainnetChain().ChainId: { + Chain: pkg.BscMainnetChain(), }, - common.GoerliChain().ChainId: { - Chain: common.GoerliChain(), + pkg.GoerliChain().ChainId: { + Chain: pkg.GoerliChain(), Endpoint: "", }, - common.BscTestnetChain().ChainId: { - Chain: common.BscTestnetChain(), + pkg.BscTestnetChain().ChainId: { + Chain: pkg.BscTestnetChain(), Endpoint: "", }, - common.MumbaiChain().ChainId: { - Chain: common.MumbaiChain(), + pkg.MumbaiChain().ChainId: { + Chain: pkg.MumbaiChain(), Endpoint: "", }, - common.GoerliLocalnetChain().ChainId: { - Chain: common.GoerliLocalnetChain(), + pkg.GoerliLocalnetChain().ChainId: { + Chain: pkg.GoerliLocalnetChain(), Endpoint: "http://eth:8545", }, } diff --git a/zetaclient/config/types.go b/zetaclient/config/types.go index 69e4e8da2c..f92eb1518d 100644 --- a/zetaclient/config/types.go +++ b/zetaclient/config/types.go @@ -5,7 +5,7 @@ import ( "strings" "sync" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" ) // KeyringBackend is the type of keyring backend to use for the hotkey @@ -27,7 +27,7 @@ type ClientConfiguration struct { } type EVMConfig struct { - Chain common.Chain + Chain pkg.Chain Endpoint string } diff --git a/zetaclient/core_context/zeta_core_context.go b/zetaclient/core_context/zeta_core_context.go index 9eb3de1f43..c01fe55bc1 100644 --- a/zetaclient/core_context/zeta_core_context.go +++ b/zetaclient/core_context/zeta_core_context.go @@ -6,7 +6,7 @@ import ( "sync" "github.com/rs/zerolog" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" observertypes "github.com/zeta-chain/zetacore/x/observer/types" "github.com/zeta-chain/zetacore/zetaclient/config" ) @@ -16,7 +16,7 @@ import ( type ZetaCoreContext struct { coreContextLock *sync.RWMutex keygen observertypes.Keygen - chainsEnabled []common.Chain + chainsEnabled []pkg.Chain evmChainParams map[int64]*observertypes.ChainParams bitcoinChainParams *observertypes.ChainParams currentTssPubkey string @@ -36,7 +36,7 @@ func NewZetaCoreContext(cfg config.Config) *ZetaCoreContext { } return &ZetaCoreContext{ coreContextLock: new(sync.RWMutex), - chainsEnabled: []common.Chain{}, + chainsEnabled: []pkg.Chain{}, evmChainParams: evmChainParams, bitcoinChainParams: bitcoinChainParams, } @@ -64,10 +64,10 @@ func (c *ZetaCoreContext) GetCurrentTssPubkey() string { return c.currentTssPubkey } -func (c *ZetaCoreContext) GetEnabledChains() []common.Chain { +func (c *ZetaCoreContext) GetEnabledChains() []pkg.Chain { c.coreContextLock.RLock() defer c.coreContextLock.RUnlock() - copiedChains := make([]common.Chain, len(c.chainsEnabled)) + copiedChains := make([]pkg.Chain, len(c.chainsEnabled)) copy(copiedChains, c.chainsEnabled) return copiedChains } @@ -92,14 +92,14 @@ func (c *ZetaCoreContext) GetAllEVMChainParams() map[int64]*observertypes.ChainP return copied } -func (c *ZetaCoreContext) GetBTCChainParams() (common.Chain, *observertypes.ChainParams, bool) { +func (c *ZetaCoreContext) GetBTCChainParams() (pkg.Chain, *observertypes.ChainParams, bool) { c.coreContextLock.RLock() defer c.coreContextLock.RUnlock() if c.bitcoinChainParams == nil { // bitcoin is not enabled - return common.Chain{}, &observertypes.ChainParams{}, false + return pkg.Chain{}, &observertypes.ChainParams{}, false } - chain := common.GetChainFromChainID(c.bitcoinChainParams.ChainId) + chain := pkg.GetChainFromChainID(c.bitcoinChainParams.ChainId) if chain == nil { panic(fmt.Sprintf("BTCChain is missing for chainID %d", c.bitcoinChainParams.ChainId)) } @@ -110,7 +110,7 @@ func (c *ZetaCoreContext) GetBTCChainParams() (common.Chain, *observertypes.Chai // this must be the ONLY function that writes to core context func (c *ZetaCoreContext) Update( keygen *observertypes.Keygen, - newChains []common.Chain, + newChains []pkg.Chain, evmChainParams map[int64]*observertypes.ChainParams, btcChainParams *observertypes.ChainParams, tssPubKey string, diff --git a/zetaclient/core_context/zeta_core_context_test.go b/zetaclient/core_context/zeta_core_context_test.go index e7690f0c23..e950712830 100644 --- a/zetaclient/core_context/zeta_core_context_test.go +++ b/zetaclient/core_context/zeta_core_context_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" observertypes "github.com/zeta-chain/zetacore/x/observer/types" clientcommon "github.com/zeta-chain/zetacore/zetaclient/common" "github.com/zeta-chain/zetacore/zetaclient/config" @@ -30,7 +30,7 @@ func TestNewZetaCoreContext(t *testing.T) { // assert btc chain params chain, btcChainParams, btcChainParamsFound := zetaContext.GetBTCChainParams() - require.Equal(t, common.Chain{}, chain) + require.Equal(t, pkg.Chain{}, chain) require.False(t, btcChainParamsFound) require.Equal(t, &observertypes.ChainParams{}, btcChainParams) @@ -43,13 +43,13 @@ func TestNewZetaCoreContext(t *testing.T) { testCfg := config.NewConfig() testCfg.EVMChainConfigs = map[int64]config.EVMConfig{ 1: { - Chain: common.Chain{ + Chain: pkg.Chain{ ChainName: 1, ChainId: 1, }, }, 2: { - Chain: common.Chain{ + Chain: pkg.Chain{ ChainName: 2, ChainId: 2, }, @@ -102,7 +102,7 @@ func TestUpdateZetaCoreContext(t *testing.T) { Status: observertypes.KeygenStatus_KeyGenSuccess, GranteePubkeys: []string{"testpubkey1"}, } - enabledChainsToUpdate := []common.Chain{ + enabledChainsToUpdate := []pkg.Chain{ { ChainName: 1, ChainId: 1, @@ -147,7 +147,7 @@ func TestUpdateZetaCoreContext(t *testing.T) { // assert btc chain params still empty because they were not specified in config chain, btcChainParams, btcChainParamsFound := zetaContext.GetBTCChainParams() - require.Equal(t, common.Chain{}, chain) + require.Equal(t, pkg.Chain{}, chain) require.False(t, btcChainParamsFound) require.Equal(t, &observertypes.ChainParams{}, btcChainParams) @@ -160,13 +160,13 @@ func TestUpdateZetaCoreContext(t *testing.T) { testCfg := config.NewConfig() testCfg.EVMChainConfigs = map[int64]config.EVMConfig{ 1: { - Chain: common.Chain{ + Chain: pkg.Chain{ ChainName: 1, ChainId: 1, }, }, 2: { - Chain: common.Chain{ + Chain: pkg.Chain{ ChainName: 2, ChainId: 2, }, @@ -186,7 +186,7 @@ func TestUpdateZetaCoreContext(t *testing.T) { Status: observertypes.KeygenStatus_KeyGenSuccess, GranteePubkeys: []string{"testpubkey1"}, } - enabledChainsToUpdate := []common.Chain{ + enabledChainsToUpdate := []pkg.Chain{ { ChainName: 1, ChainId: 1, @@ -205,7 +205,7 @@ func TestUpdateZetaCoreContext(t *testing.T) { }, } - testBtcChain := common.BtcTestNetChain() + testBtcChain := pkg.BtcTestNetChain() btcChainParamsToUpdate := &observertypes.ChainParams{ ChainId: testBtcChain.ChainId, } diff --git a/zetaclient/evm/evm_client.go b/zetaclient/evm/evm_client.go index 87103b8e37..6ff5d40b6e 100644 --- a/zetaclient/evm/evm_client.go +++ b/zetaclient/evm/evm_client.go @@ -36,7 +36,7 @@ import ( "github.com/rs/zerolog/log" "github.com/zeta-chain/protocol-contracts/pkg/contracts/evm/erc20custody.sol" "github.com/zeta-chain/protocol-contracts/pkg/contracts/evm/zetaconnector.non-eth.sol" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" clientcommon "github.com/zeta-chain/zetacore/zetaclient/common" @@ -67,7 +67,7 @@ type Log struct { // ChainClient represents the chain configuration for an EVM chain // Filled with above constants depending on chain type ChainClient struct { - chain common.Chain + chain pkg.Chain evmClient interfaces.EVMRPCClient evmJSONRPC interfaces.EVMJSONRPCClient zetaClient interfaces.ZetaCoreBridger @@ -158,7 +158,7 @@ func NewEVMChainClient( return &ob, nil } -func (ob *ChainClient) WithChain(chain common.Chain) { +func (ob *ChainClient) WithChain(chain pkg.Chain) { ob.Mu.Lock() defer ob.Mu.Unlock() ob.chain = chain @@ -329,9 +329,9 @@ func (ob *ChainClient) IsSendOutTxProcessed(cctx *crosschaintypes.CrossChainTx, // compliance check, special handling the cancelled cctx if clientcommon.IsCctxRestricted(cctx) { - recvStatus := common.ReceiveStatus_Failed + recvStatus := pkg.ReceiveStatus_Failed if receipt.Status == 1 { - recvStatus = common.ReceiveStatus_Success + recvStatus = pkg.ReceiveStatus_Success } zetaTxHash, ballot, err := ob.zetaClient.PostVoteOutbound( sendHash, @@ -345,7 +345,7 @@ func (ob *ChainClient) IsSendOutTxProcessed(cctx *crosschaintypes.CrossChainTx, recvStatus, ob.chain, nonce, - common.CoinType_Cmd, + pkg.CoinType_Cmd, ) if err != nil { logger.Error().Err(err).Msgf("error posting confirmation to meta core for cctx %s nonce %d", sendHash, nonce) @@ -355,10 +355,10 @@ func (ob *ChainClient) IsSendOutTxProcessed(cctx *crosschaintypes.CrossChainTx, return true, true, nil } - if cointype == common.CoinType_Cmd { - recvStatus := common.ReceiveStatus_Failed + if cointype == pkg.CoinType_Cmd { + recvStatus := pkg.ReceiveStatus_Failed if receipt.Status == 1 { - recvStatus = common.ReceiveStatus_Success + recvStatus = pkg.ReceiveStatus_Success } zetaTxHash, ballot, err := ob.zetaClient.PostVoteOutbound( sendHash, @@ -371,7 +371,7 @@ func (ob *ChainClient) IsSendOutTxProcessed(cctx *crosschaintypes.CrossChainTx, recvStatus, ob.chain, nonce, - common.CoinType_Cmd, + pkg.CoinType_Cmd, ) if err != nil { logger.Error().Err(err).Msgf("error posting confirmation to meta core for cctx %s nonce %d", sendHash, nonce) @@ -380,7 +380,7 @@ func (ob *ChainClient) IsSendOutTxProcessed(cctx *crosschaintypes.CrossChainTx, } return true, true, nil - } else if cointype == common.CoinType_Gas { // the outbound is a regular Ether/BNB/Matic transfer; no need to check events + } else if cointype == pkg.CoinType_Gas { // the outbound is a regular Ether/BNB/Matic transfer; no need to check events if receipt.Status == 1 { zetaTxHash, ballot, err := ob.zetaClient.PostVoteOutbound( sendHash, @@ -390,10 +390,10 @@ func (ob *ChainClient) IsSendOutTxProcessed(cctx *crosschaintypes.CrossChainTx, transaction.GasPrice(), transaction.Gas(), transaction.Value(), - common.ReceiveStatus_Success, + pkg.ReceiveStatus_Success, ob.chain, nonce, - common.CoinType_Gas, + pkg.CoinType_Gas, ) if err != nil { logger.Error().Err(err).Msgf("error posting confirmation to meta core for cctx %s nonce %d", sendHash, nonce) @@ -411,10 +411,10 @@ func (ob *ChainClient) IsSendOutTxProcessed(cctx *crosschaintypes.CrossChainTx, transaction.GasPrice(), transaction.Gas(), big.NewInt(0), - common.ReceiveStatus_Failed, + pkg.ReceiveStatus_Failed, ob.chain, nonce, - common.CoinType_Gas, + pkg.CoinType_Gas, ) if err != nil { logger.Error().Err(err).Msgf("PostVoteOutbound error in WatchTxHashWithTimeout; zeta tx hash %s cctx %s nonce %d", zetaTxHash, sendHash, nonce) @@ -423,7 +423,7 @@ func (ob *ChainClient) IsSendOutTxProcessed(cctx *crosschaintypes.CrossChainTx, } return true, true, nil } - } else if cointype == common.CoinType_Zeta { // the outbound is a Zeta transfer; need to check events ZetaReceived + } else if cointype == pkg.CoinType_Zeta { // the outbound is a Zeta transfer; need to check events ZetaReceived if receipt.Status == 1 { logs := receipt.Logs for _, vLog := range logs { @@ -455,10 +455,10 @@ func (ob *ChainClient) IsSendOutTxProcessed(cctx *crosschaintypes.CrossChainTx, transaction.GasPrice(), transaction.Gas(), mMint, - common.ReceiveStatus_Success, + pkg.ReceiveStatus_Success, ob.chain, nonce, - common.CoinType_Zeta, + pkg.CoinType_Zeta, ) if err != nil { logger.Error().Err(err).Msgf("error posting confirmation to meta core for cctx %s nonce %d", sendHash, nonce) @@ -492,10 +492,10 @@ func (ob *ChainClient) IsSendOutTxProcessed(cctx *crosschaintypes.CrossChainTx, transaction.GasPrice(), transaction.Gas(), mMint, - common.ReceiveStatus_Success, + pkg.ReceiveStatus_Success, ob.chain, nonce, - common.CoinType_Zeta, + pkg.CoinType_Zeta, ) if err != nil { logger.Err(err).Msgf("error posting confirmation to meta core for cctx %s nonce %d", sendHash, nonce) @@ -520,10 +520,10 @@ func (ob *ChainClient) IsSendOutTxProcessed(cctx *crosschaintypes.CrossChainTx, transaction.GasPrice(), transaction.Gas(), big.NewInt(0), - common.ReceiveStatus_Failed, + pkg.ReceiveStatus_Failed, ob.chain, nonce, - common.CoinType_Zeta, + pkg.CoinType_Zeta, ) if err != nil { logger.Error().Err(err).Msgf("error posting confirmation to meta core for cctx %s nonce %d", sendHash, nonce) @@ -532,7 +532,7 @@ func (ob *ChainClient) IsSendOutTxProcessed(cctx *crosschaintypes.CrossChainTx, } return true, true, nil } - } else if cointype == common.CoinType_ERC20 { + } else if cointype == pkg.CoinType_ERC20 { if receipt.Status == 1 { logs := receipt.Logs addrCustody, ERC20Custody, err := ob.GetERC20CustodyContract() @@ -560,10 +560,10 @@ func (ob *ChainClient) IsSendOutTxProcessed(cctx *crosschaintypes.CrossChainTx, transaction.GasPrice(), transaction.Gas(), event.Amount, - common.ReceiveStatus_Success, + pkg.ReceiveStatus_Success, ob.chain, nonce, - common.CoinType_ERC20, + pkg.CoinType_ERC20, ) if err != nil { logger.Error().Err(err).Msgf("error posting confirmation to meta core for cctx %s nonce %d", sendHash, nonce) @@ -587,10 +587,10 @@ func (ob *ChainClient) IsSendOutTxProcessed(cctx *crosschaintypes.CrossChainTx, transaction.GasPrice(), transaction.Gas(), big.NewInt(0), - common.ReceiveStatus_Failed, + pkg.ReceiveStatus_Failed, ob.chain, nonce, - common.CoinType_ERC20, + pkg.CoinType_ERC20, ) if err != nil { logger.Error().Err(err).Msgf("PostVoteOutbound error in WatchTxHashWithTimeout; zeta tx hash %s", zetaTxHash) @@ -894,7 +894,7 @@ func (ob *ChainClient) postBlockHeader(tip uint64) error { ob.chain.ChainId, header.Hash().Bytes(), header.Number.Int64(), - common.NewEthereumHeader(headerRLP), + pkg.NewEthereumHeader(headerRLP), ) if err != nil { ob.logger.ExternalChainWatcher.Error().Err(err).Msgf("postBlockHeader: error posting block header: %d", bn) @@ -1035,7 +1035,7 @@ func (ob *ChainClient) ObserveZetaSent(startBlock, toBlock uint64) uint64 { msg := ob.BuildInboundVoteMsgForZetaSentEvent(event) if msg != nil { - _, err = ob.PostVoteInbound(msg, common.CoinType_Zeta, zetabridge.PostVoteInboundMessagePassingExecutionGasLimit) + _, err = ob.PostVoteInbound(msg, pkg.CoinType_Zeta, zetabridge.PostVoteInboundMessagePassingExecutionGasLimit) if err != nil { return beingScanned - 1 // we have to re-scan from this block next time } @@ -1115,7 +1115,7 @@ func (ob *ChainClient) ObserveERC20Deposited(startBlock, toBlock uint64) uint64 msg := ob.BuildInboundVoteMsgForDepositedEvent(event, sender) if msg != nil { - _, err = ob.PostVoteInbound(msg, common.CoinType_ERC20, zetabridge.PostVoteInboundExecutionGasLimit) + _, err = ob.PostVoteInbound(msg, pkg.CoinType_ERC20, zetabridge.PostVoteInboundExecutionGasLimit) if err != nil { return beingScanned - 1 // we have to re-scan from this block next time } @@ -1138,7 +1138,7 @@ func (ob *ChainClient) ObserverTSSReceive(startBlock, toBlock uint64, flags obse // TODO: consider having a independent ticker(from TSS scaning) for posting block headers if flags.BlockHeaderVerificationFlags != nil && flags.BlockHeaderVerificationFlags.IsEthTypeChainEnabled && - common.IsHeaderSupportedEvmChain(ob.chain.ChainId) { // post block header for supported chains + pkg.IsHeaderSupportedEvmChain(ob.chain.ChainId) { // post block header for supported chains err := ob.postBlockHeader(toBlock) if err != nil { ob.logger.ExternalChainWatcher.Error().Err(err).Msg("error posting block header") @@ -1280,7 +1280,7 @@ func (ob *ChainClient) BuildReceiptsMap() error { } // LoadDB open sql database and load data into EVMChainClient -func (ob *ChainClient) LoadDB(dbPath string, chain common.Chain) error { +func (ob *ChainClient) LoadDB(dbPath string, chain pkg.Chain) error { if dbPath != "" { if _, err := os.Stat(dbPath); os.IsNotExist(err) { err := os.MkdirAll(dbPath, os.ModePerm) diff --git a/zetaclient/evm/evm_client_test.go b/zetaclient/evm/evm_client_test.go index 6f4cb677ed..80a4d0634c 100644 --- a/zetaclient/evm/evm_client_test.go +++ b/zetaclient/evm/evm_client_test.go @@ -8,7 +8,7 @@ import ( lru "github.com/hashicorp/golang-lru" "github.com/onrik/ethrpc" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" "github.com/zeta-chain/zetacore/zetaclient/evm" "github.com/zeta-chain/zetacore/zetaclient/testutils" @@ -45,7 +45,7 @@ func TestEVM_CheckTxInclusion(t *testing.T) { // load archived evm outtx Gas // https://etherscan.io/tx/0xd13b593eb62b5500a00e288cc2fb2c8af1339025c0e6bc6183b8bef2ebbed0d3 chainID := int64(1) - coinType := common.CoinType_Gas + coinType := pkg.CoinType_Gas outtxHash := "0xd13b593eb62b5500a00e288cc2fb2c8af1339025c0e6bc6183b8bef2ebbed0d3" tx, receipt := testutils.LoadEVMOuttxNReceipt(t, chainID, outtxHash, coinType) @@ -96,7 +96,7 @@ func TestEVM_VoteOutboundBallot(t *testing.T) { // load archived evm outtx Gas // https://etherscan.io/tx/0xd13b593eb62b5500a00e288cc2fb2c8af1339025c0e6bc6183b8bef2ebbed0d3 chainID := int64(1) - coinType := common.CoinType_Gas + coinType := pkg.CoinType_Gas outtxHash := "0xd13b593eb62b5500a00e288cc2fb2c8af1339025c0e6bc6183b8bef2ebbed0d3" tx, receipt := testutils.LoadEVMOuttxNReceipt(t, chainID, outtxHash, coinType) @@ -113,7 +113,7 @@ func TestEVM_VoteOutboundBallot(t *testing.T) { math.NewIntFromBigInt(tx.GasPrice()), tx.Gas(), math.NewUintFromBigInt(tx.Value()), - common.ReceiveStatus_Success, + pkg.ReceiveStatus_Success, chainID, tx.Nonce(), coinType, diff --git a/zetaclient/evm/evm_signer.go b/zetaclient/evm/evm_signer.go index 3692dd666e..3301b785e0 100644 --- a/zetaclient/evm/evm_signer.go +++ b/zetaclient/evm/evm_signer.go @@ -20,7 +20,7 @@ import ( "github.com/rs/zerolog" "github.com/rs/zerolog/log" "github.com/zeta-chain/protocol-contracts/pkg/contracts/evm/erc20custody.sol" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" crosschainkeeper "github.com/zeta-chain/zetacore/x/crosschain/keeper" "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" @@ -34,7 +34,7 @@ import ( type Signer struct { client interfaces.EVMRPCClient - chain *common.Chain + chain *pkg.Chain chainID *big.Int tssSigner interfaces.TSSSigner ethSigner ethtypes.Signer @@ -53,7 +53,7 @@ type Signer struct { var _ interfaces.ChainSigner = &Signer{} func NewEVMSigner( - chain common.Chain, + chain pkg.Chain, endpoint string, tssSigner interfaces.TSSSigner, abiString string, @@ -263,9 +263,9 @@ func (signer *Signer) SignWithdrawTx(txData *OutBoundTransactionData) (*ethtypes // cmd_migrate_tss_funds func (signer *Signer) SignCommandTx(txData *OutBoundTransactionData, cmd string, params string) (*ethtypes.Transaction, error) { switch cmd { - case common.CmdWhitelistERC20: + case pkg.CmdWhitelistERC20: return signer.SignWhitelistERC20Cmd(txData, params) - case common.CmdMigrateTssFunds: + case pkg.CmdMigrateTssFunds: return signer.SignMigrateTssFundsCmd(txData) } return nil, fmt.Errorf("SignCommandTx: unknown command %s", cmd) @@ -311,7 +311,7 @@ func (signer *Signer) TryProcessOutTx( } // Get destination chain for logging - toChain := common.GetChainFromChainID(txData.toChainID.Int64()) + toChain := pkg.GetChainFromChainID(txData.toChainID.Int64()) // Get cross-chain flags crossChainflags, err := zetaBridge.GetCrosschainFlags() @@ -330,7 +330,7 @@ func (signer *Signer) TryProcessOutTx( logger.Warn().Err(err).Msg(SignerErrorMsg(cctx)) return } - } else if cctx.GetCurrentOutTxParam().CoinType == common.CoinType_Cmd { // admin command + } else if cctx.GetCurrentOutTxParam().CoinType == pkg.CoinType_Cmd { // admin command to := ethcommon.HexToAddress(cctx.GetCurrentOutTxParam().Receiver) if to == (ethcommon.Address{}) { logger.Error().Msgf("invalid receiver %s", cctx.GetCurrentOutTxParam().Receiver) @@ -342,7 +342,7 @@ func (signer *Signer) TryProcessOutTx( return } // cmd field is used to determine whether to execute ERC20 whitelist or migrate TSS funds given that the coin type - // from the cctx is common.CoinType_Cmd + // from the cctx is pkg.CoinType_Cmd cmd := msg[0] // params field is used to pass input parameters for command requests, currently it is used to pass the ERC20 // contract address when a whitelist command is requested @@ -354,13 +354,13 @@ func (signer *Signer) TryProcessOutTx( } } else if IsSenderZetaChain(cctx, zetaBridge, &crossChainflags) { switch cctx.GetCurrentOutTxParam().CoinType { - case common.CoinType_Gas: + case pkg.CoinType_Gas: logger.Info().Msgf("SignWithdrawTx: %d => %s, nonce %d, gasPrice %d", cctx.InboundTxParams.SenderChainId, toChain, cctx.GetCurrentOutTxParam().OutboundTxTssNonce, txData.gasPrice) tx, err = signer.SignWithdrawTx(txData) - case common.CoinType_ERC20: + case pkg.CoinType_ERC20: logger.Info().Msgf("SignERC20WithdrawTx: %d => %s, nonce %d, gasPrice %d", cctx.InboundTxParams.SenderChainId, toChain, cctx.GetCurrentOutTxParam().OutboundTxTssNonce, txData.gasPrice) tx, err = signer.SignERC20WithdrawTx(txData) - case common.CoinType_Zeta: + case pkg.CoinType_Zeta: logger.Info().Msgf("SignOutboundTx: %d => %s, nonce %d, gasPrice %d", cctx.InboundTxParams.SenderChainId, toChain, cctx.GetCurrentOutTxParam().OutboundTxTssNonce, txData.gasPrice) tx, err = signer.SignOutboundTx(txData) } @@ -370,10 +370,10 @@ func (signer *Signer) TryProcessOutTx( } } else if cctx.CctxStatus.Status == types.CctxStatus_PendingRevert && cctx.OutboundTxParams[0].ReceiverChainId == zetaBridge.ZetaChain().ChainId { switch cctx.GetCurrentOutTxParam().CoinType { - case common.CoinType_Gas: + case pkg.CoinType_Gas: logger.Info().Msgf("SignWithdrawTx: %d => %s, nonce %d, gasPrice %d", cctx.InboundTxParams.SenderChainId, toChain, cctx.GetCurrentOutTxParam().OutboundTxTssNonce, txData.gasPrice) tx, err = signer.SignWithdrawTx(txData) - case common.CoinType_ERC20: + case pkg.CoinType_ERC20: logger.Info().Msgf("SignERC20WithdrawTx: %d => %s, nonce %d, gasPrice %d", cctx.InboundTxParams.SenderChainId, toChain, cctx.GetCurrentOutTxParam().OutboundTxTssNonce, txData.gasPrice) tx, err = signer.SignERC20WithdrawTx(txData) } @@ -415,7 +415,7 @@ func (signer *Signer) BroadcastOutTx( zetaBridge interfaces.ZetaCoreBridger, txData *OutBoundTransactionData) { // Get destination chain for logging - toChain := common.GetChainFromChainID(txData.toChainID.Int64()) + toChain := pkg.GetChainFromChainID(txData.toChainID.Int64()) // Try to broadcast transaction if tx != nil { @@ -614,7 +614,7 @@ func (signer *Signer) EvmSigner() ethtypes.Signer { // getEVMRPC is a helper function to set up the client and signer, also initializes a mock client for unit tests func getEVMRPC(endpoint string) (interfaces.EVMRPCClient, *big.Int, ethtypes.Signer, error) { if endpoint == stub.EVMRPCEnabled { - chainID := big.NewInt(common.BscMainnetChain().ChainId) + chainID := big.NewInt(pkg.BscMainnetChain().ChainId) ethSigner := ethtypes.NewEIP155Signer(chainID) client := &stub.MockEvmClient{} return client, chainID, ethSigner, nil diff --git a/zetaclient/evm/evm_signer_test.go b/zetaclient/evm/evm_signer_test.go index 3bbee44279..584d4e04d7 100644 --- a/zetaclient/evm/evm_signer_test.go +++ b/zetaclient/evm/evm_signer_test.go @@ -8,7 +8,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/rs/zerolog" "github.com/stretchr/testify/require" - corecommon "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/crosschain/types" crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" @@ -34,7 +34,7 @@ func getNewEvmSigner() (*Signer, error) { logger := common.ClientLogger{} ts := &metrics.TelemetryServer{} return NewEVMSigner( - corecommon.BscMainnetChain(), + pkg.BscMainnetChain(), stub.EVMRPCEnabled, stub.NewTSSMainnet(), config.GetConnectorABI(), @@ -51,8 +51,8 @@ func getNewEvmChainClient() (*ChainClient, error) { cfg := config.NewConfig() tss := stub.NewTSSMainnet() - evmcfg := config.EVMConfig{Chain: corecommon.BscMainnetChain(), Endpoint: "http://localhost:8545"} - cfg.EVMChainConfigs[corecommon.BscMainnetChain().ChainId] = evmcfg + evmcfg := config.EVMConfig{Chain: pkg.BscMainnetChain(), Endpoint: "http://localhost:8545"} + cfg.EVMChainConfigs[pkg.BscMainnetChain().ChainId] = evmcfg coreCTX := corecontext.NewZetaCoreContext(cfg) appCTX := appcontext.NewAppContext(coreCTX, cfg) @@ -198,7 +198,7 @@ func TestSigner_SignCommandTx(t *testing.T) { require.NoError(t, err) t.Run("SignCommandTx CmdWhitelistERC20", func(t *testing.T) { - cmd := corecommon.CmdWhitelistERC20 + cmd := pkg.CmdWhitelistERC20 params := ConnectorAddress.Hex() // Call SignCommandTx tx, err := evmSigner.SignCommandTx(txData, cmd, params) @@ -215,7 +215,7 @@ func TestSigner_SignCommandTx(t *testing.T) { }) t.Run("SignCommandTx CmdMigrateTssFunds", func(t *testing.T) { - cmd := corecommon.CmdMigrateTssFunds + cmd := pkg.CmdMigrateTssFunds // Call SignCommandTx tx, err := evmSigner.SignCommandTx(txData, cmd, "") require.NoError(t, err) diff --git a/zetaclient/evm/inbounds.go b/zetaclient/evm/inbounds.go index 919ba6f9e2..6bb8073f2d 100644 --- a/zetaclient/evm/inbounds.go +++ b/zetaclient/evm/inbounds.go @@ -18,7 +18,7 @@ import ( clienttypes "github.com/zeta-chain/zetacore/zetaclient/types" ethcommon "github.com/ethereum/go-ethereum/common" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" "github.com/zeta-chain/zetacore/zetaclient/zetabridge" "golang.org/x/net/context" @@ -73,11 +73,11 @@ func (ob *ChainClient) ObserveIntxTrackers() error { // check and vote on inbound tx switch tracker.CoinType { - case common.CoinType_Zeta: + case pkg.CoinType_Zeta: _, err = ob.CheckAndVoteInboundTokenZeta(tx, receipt, true) - case common.CoinType_ERC20: + case pkg.CoinType_ERC20: _, err = ob.CheckAndVoteInboundTokenERC20(tx, receipt, true) - case common.CoinType_Gas: + case pkg.CoinType_Gas: _, err = ob.CheckAndVoteInboundTokenGas(tx, receipt, true) default: return fmt.Errorf("unknown coin type %s for intx %s chain %d", tracker.CoinType, tx.Hash, ob.chain.ChainId) @@ -123,7 +123,7 @@ func (ob *ChainClient) CheckAndVoteInboundTokenZeta(tx *ethrpc.Transaction, rece return "", nil } if vote { - return ob.PostVoteInbound(msg, common.CoinType_Zeta, zetabridge.PostVoteInboundMessagePassingExecutionGasLimit) + return ob.PostVoteInbound(msg, pkg.CoinType_Zeta, zetabridge.PostVoteInboundMessagePassingExecutionGasLimit) } return msg.Digest(), nil } @@ -164,7 +164,7 @@ func (ob *ChainClient) CheckAndVoteInboundTokenERC20(tx *ethrpc.Transaction, rec return "", nil } if vote { - return ob.PostVoteInbound(msg, common.CoinType_ERC20, zetabridge.PostVoteInboundExecutionGasLimit) + return ob.PostVoteInbound(msg, pkg.CoinType_ERC20, zetabridge.PostVoteInboundExecutionGasLimit) } return msg.Digest(), nil } @@ -192,13 +192,13 @@ func (ob *ChainClient) CheckAndVoteInboundTokenGas(tx *ethrpc.Transaction, recei return "", nil } if vote { - return ob.PostVoteInbound(msg, common.CoinType_Gas, zetabridge.PostVoteInboundExecutionGasLimit) + return ob.PostVoteInbound(msg, pkg.CoinType_Gas, zetabridge.PostVoteInboundExecutionGasLimit) } return msg.Digest(), nil } // PostVoteInbound posts a vote for the given vote message -func (ob *ChainClient) PostVoteInbound(msg *types.MsgVoteOnObservedInboundTx, coinType common.CoinType, retryGasLimit uint64) (string, error) { +func (ob *ChainClient) PostVoteInbound(msg *types.MsgVoteOnObservedInboundTx, coinType pkg.CoinType, retryGasLimit uint64) (string, error) { txHash := msg.InTxHash chainID := ob.chain.ChainId zetaHash, ballot, err := ob.zetaClient.PostVoteInbound(zetabridge.PostVoteInboundGasLimit, retryGasLimit, msg) @@ -223,7 +223,7 @@ func (ob *ChainClient) HasEnoughConfirmations(receipt *ethtypes.Receipt, lastHei func (ob *ChainClient) BuildInboundVoteMsgForDepositedEvent(event *erc20custody.ERC20CustodyDeposited, sender ethcommon.Address) *types.MsgVoteOnObservedInboundTx { // compliance check maybeReceiver := "" - parsedAddress, _, err := common.ParseAddressAndData(hex.EncodeToString(event.Message)) + parsedAddress, _, err := pkg.ParseAddressAndData(hex.EncodeToString(event.Message)) if err == nil && parsedAddress != (ethcommon.Address{}) { maybeReceiver = parsedAddress.Hex() } @@ -234,7 +234,7 @@ func (ob *ChainClient) BuildInboundVoteMsgForDepositedEvent(event *erc20custody. } // donation check - if bytes.Equal(event.Message, []byte(common.DonationMessage)) { + if bytes.Equal(event.Message, []byte(pkg.DonationMessage)) { ob.logger.ExternalChainWatcher.Info().Msgf("thank you rich folk for your donation! tx %s chain %d", event.Raw.TxHash.Hex(), ob.chain.ChainId) return nil } @@ -253,7 +253,7 @@ func (ob *ChainClient) BuildInboundVoteMsgForDepositedEvent(event *erc20custody. event.Raw.TxHash.Hex(), event.Raw.BlockNumber, 1_500_000, - common.CoinType_ERC20, + pkg.CoinType_ERC20, event.Asset.String(), ob.zetaClient.GetKeys().GetOperatorAddress().String(), event.Raw.Index, @@ -262,7 +262,7 @@ func (ob *ChainClient) BuildInboundVoteMsgForDepositedEvent(event *erc20custody. // BuildInboundVoteMsgForZetaSentEvent builds a inbound vote message for a ZetaSent event func (ob *ChainClient) BuildInboundVoteMsgForZetaSentEvent(event *zetaconnector.ZetaConnectorNonEthZetaSent) *types.MsgVoteOnObservedInboundTx { - destChain := common.GetChainFromChainID(event.DestinationChainId.Int64()) + destChain := pkg.GetChainFromChainID(event.DestinationChainId.Int64()) if destChain == nil { ob.logger.ExternalChainWatcher.Warn().Msgf("chain id not supported %d", event.DestinationChainId.Int64()) return nil @@ -304,7 +304,7 @@ func (ob *ChainClient) BuildInboundVoteMsgForZetaSentEvent(event *zetaconnector. event.Raw.TxHash.Hex(), event.Raw.BlockNumber, event.DestinationGasLimit.Uint64(), - common.CoinType_Zeta, + pkg.CoinType_Zeta, "", ob.zetaClient.GetKeys().GetOperatorAddress().String(), event.Raw.Index, @@ -317,7 +317,7 @@ func (ob *ChainClient) BuildInboundVoteMsgForTokenSentToTSS(tx *ethrpc.Transacti // compliance check maybeReceiver := "" - parsedAddress, _, err := common.ParseAddressAndData(message) + parsedAddress, _, err := pkg.ParseAddressAndData(message) if err == nil && parsedAddress != (ethcommon.Address{}) { maybeReceiver = parsedAddress.Hex() } @@ -330,7 +330,7 @@ func (ob *ChainClient) BuildInboundVoteMsgForTokenSentToTSS(tx *ethrpc.Transacti // donation check // #nosec G703 err is already checked data, _ := hex.DecodeString(message) - if bytes.Equal(data, []byte(common.DonationMessage)) { + if bytes.Equal(data, []byte(pkg.DonationMessage)) { ob.logger.ExternalChainWatcher.Info().Msgf("thank you rich folk for your donation! tx %s chain %d", tx.Hash, ob.chain.ChainId) return nil } @@ -348,7 +348,7 @@ func (ob *ChainClient) BuildInboundVoteMsgForTokenSentToTSS(tx *ethrpc.Transacti tx.Hash, blockNumber, 90_000, - common.CoinType_Gas, + pkg.CoinType_Gas, "", ob.zetaClient.GetKeys().GetOperatorAddress().String(), 0, // not a smart contract call diff --git a/zetaclient/evm/inbounds_test.go b/zetaclient/evm/inbounds_test.go index 0663d71eeb..89b84d9ba2 100644 --- a/zetaclient/evm/inbounds_test.go +++ b/zetaclient/evm/inbounds_test.go @@ -10,7 +10,7 @@ import ( lru "github.com/hashicorp/golang-lru" "github.com/onrik/ethrpc" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" observertypes "github.com/zeta-chain/zetacore/x/observer/types" "github.com/zeta-chain/zetacore/zetaclient/config" "github.com/zeta-chain/zetacore/zetaclient/evm" @@ -22,7 +22,7 @@ import ( // MockEVMClient creates a mock ChainClient with custom chain, TSS, params etc func MockEVMClient( - chain common.Chain, + chain pkg.Chain, evmClient interfaces.EVMRPCClient, evmJSONRPC interfaces.EVMJSONRPCClient, zetClient interfaces.ZetaCoreBridger, @@ -52,14 +52,14 @@ func MockEVMClient( func TestEVM_CheckAndVoteInboundTokenZeta(t *testing.T) { // load archived ZetaSent intx, receipt and cctx // https://etherscan.io/tx/0xf3935200c80f98502d5edc7e871ffc40ca898e134525c42c2ae3cbc5725f9d76 - chain := common.EthChain() + chain := pkg.EthChain() confirmation := uint64(10) chainID := chain.ChainId chainParam := stub.MockChainParams(chain.ChainId, confirmation) intxHash := "0xf3935200c80f98502d5edc7e871ffc40ca898e134525c42c2ae3cbc5725f9d76" t.Run("should pass for archived intx, receipt and cctx", func(t *testing.T) { - tx, receipt, cctx := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, common.CoinType_Zeta) + tx, receipt, cctx := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, pkg.CoinType_Zeta) require.NoError(t, evm.ValidateEvmTransaction(tx)) lastBlock := receipt.BlockNumber.Uint64() + confirmation @@ -69,7 +69,7 @@ func TestEVM_CheckAndVoteInboundTokenZeta(t *testing.T) { require.Equal(t, cctx.InboundTxParams.InboundTxBallotIndex, ballot) }) t.Run("should fail on unconfirmed intx", func(t *testing.T) { - tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, common.CoinType_Zeta) + tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, pkg.CoinType_Zeta) require.NoError(t, evm.ValidateEvmTransaction(tx)) lastBlock := receipt.BlockNumber.Uint64() + confirmation - 1 @@ -78,7 +78,7 @@ func TestEVM_CheckAndVoteInboundTokenZeta(t *testing.T) { require.ErrorContains(t, err, "not been confirmed") }) t.Run("should not act if no ZetaSent event", func(t *testing.T) { - tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, common.CoinType_Zeta) + tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, pkg.CoinType_Zeta) receipt.Logs = receipt.Logs[:2] // remove ZetaSent event require.NoError(t, evm.ValidateEvmTransaction(tx)) lastBlock := receipt.BlockNumber.Uint64() + confirmation @@ -89,7 +89,7 @@ func TestEVM_CheckAndVoteInboundTokenZeta(t *testing.T) { require.Equal(t, "", ballot) }) t.Run("should not act if emitter is not ZetaConnector", func(t *testing.T) { - tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, common.CoinType_Zeta) + tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, pkg.CoinType_Zeta) require.NoError(t, evm.ValidateEvmTransaction(tx)) lastBlock := receipt.BlockNumber.Uint64() + confirmation @@ -103,14 +103,14 @@ func TestEVM_CheckAndVoteInboundTokenZeta(t *testing.T) { func TestEVM_CheckAndVoteInboundTokenERC20(t *testing.T) { // load archived ERC20 intx, receipt and cctx // https://etherscan.io/tx/0x4ea69a0e2ff36f7548ab75791c3b990e076e2a4bffeb616035b239b7d33843da - chain := common.EthChain() + chain := pkg.EthChain() confirmation := uint64(10) chainID := chain.ChainId chainParam := stub.MockChainParams(chain.ChainId, confirmation) intxHash := "0x4ea69a0e2ff36f7548ab75791c3b990e076e2a4bffeb616035b239b7d33843da" t.Run("should pass for archived intx, receipt and cctx", func(t *testing.T) { - tx, receipt, cctx := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, common.CoinType_ERC20) + tx, receipt, cctx := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, pkg.CoinType_ERC20) require.NoError(t, evm.ValidateEvmTransaction(tx)) lastBlock := receipt.BlockNumber.Uint64() + confirmation @@ -120,7 +120,7 @@ func TestEVM_CheckAndVoteInboundTokenERC20(t *testing.T) { require.Equal(t, cctx.InboundTxParams.InboundTxBallotIndex, ballot) }) t.Run("should fail on unconfirmed intx", func(t *testing.T) { - tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, common.CoinType_ERC20) + tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, pkg.CoinType_ERC20) require.NoError(t, evm.ValidateEvmTransaction(tx)) lastBlock := receipt.BlockNumber.Uint64() + confirmation - 1 @@ -129,7 +129,7 @@ func TestEVM_CheckAndVoteInboundTokenERC20(t *testing.T) { require.ErrorContains(t, err, "not been confirmed") }) t.Run("should not act if no Deposit event", func(t *testing.T) { - tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, common.CoinType_ERC20) + tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, pkg.CoinType_ERC20) receipt.Logs = receipt.Logs[:1] // remove Deposit event require.NoError(t, evm.ValidateEvmTransaction(tx)) lastBlock := receipt.BlockNumber.Uint64() + confirmation @@ -140,7 +140,7 @@ func TestEVM_CheckAndVoteInboundTokenERC20(t *testing.T) { require.Equal(t, "", ballot) }) t.Run("should not act if emitter is not ERC20 Custody", func(t *testing.T) { - tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, common.CoinType_ERC20) + tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, pkg.CoinType_ERC20) require.NoError(t, evm.ValidateEvmTransaction(tx)) lastBlock := receipt.BlockNumber.Uint64() + confirmation @@ -154,14 +154,14 @@ func TestEVM_CheckAndVoteInboundTokenERC20(t *testing.T) { func TestEVM_CheckAndVoteInboundTokenGas(t *testing.T) { // load archived Gas intx, receipt and cctx // https://etherscan.io/tx/0xeaec67d5dd5d85f27b21bef83e01cbdf59154fd793ea7a22c297f7c3a722c532 - chain := common.EthChain() + chain := pkg.EthChain() confirmation := uint64(10) chainID := chain.ChainId chainParam := stub.MockChainParams(chain.ChainId, confirmation) intxHash := "0xeaec67d5dd5d85f27b21bef83e01cbdf59154fd793ea7a22c297f7c3a722c532" t.Run("should pass for archived intx, receipt and cctx", func(t *testing.T) { - tx, receipt, cctx := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, common.CoinType_Gas) + tx, receipt, cctx := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, pkg.CoinType_Gas) require.NoError(t, evm.ValidateEvmTransaction(tx)) lastBlock := receipt.BlockNumber.Uint64() + confirmation @@ -171,7 +171,7 @@ func TestEVM_CheckAndVoteInboundTokenGas(t *testing.T) { require.Equal(t, cctx.InboundTxParams.InboundTxBallotIndex, ballot) }) t.Run("should fail on unconfirmed intx", func(t *testing.T) { - tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, common.CoinType_Gas) + tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, pkg.CoinType_Gas) require.NoError(t, evm.ValidateEvmTransaction(tx)) lastBlock := receipt.BlockNumber.Uint64() + confirmation - 1 @@ -180,7 +180,7 @@ func TestEVM_CheckAndVoteInboundTokenGas(t *testing.T) { require.ErrorContains(t, err, "not been confirmed") }) t.Run("should not act if receiver is not TSS", func(t *testing.T) { - tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, common.CoinType_Gas) + tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, pkg.CoinType_Gas) tx.To = testutils.OtherAddress // use other address require.NoError(t, evm.ValidateEvmTransaction(tx)) lastBlock := receipt.BlockNumber.Uint64() + confirmation @@ -191,7 +191,7 @@ func TestEVM_CheckAndVoteInboundTokenGas(t *testing.T) { require.Equal(t, "", ballot) }) t.Run("should not act if transaction failed", func(t *testing.T) { - tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, common.CoinType_Gas) + tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, pkg.CoinType_Gas) receipt.Status = ethtypes.ReceiptStatusFailed require.NoError(t, evm.ValidateEvmTransaction(tx)) lastBlock := receipt.BlockNumber.Uint64() + confirmation @@ -202,8 +202,8 @@ func TestEVM_CheckAndVoteInboundTokenGas(t *testing.T) { require.Equal(t, "", ballot) }) t.Run("should not act on nil message", func(t *testing.T) { - tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, common.CoinType_Gas) - tx.Input = hex.EncodeToString([]byte(common.DonationMessage)) // donation will result in nil message + tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, pkg.CoinType_Gas) + tx.Input = hex.EncodeToString([]byte(pkg.DonationMessage)) // donation will result in nil message require.NoError(t, evm.ValidateEvmTransaction(tx)) lastBlock := receipt.BlockNumber.Uint64() + confirmation @@ -218,10 +218,10 @@ func TestEVM_BuildInboundVoteMsgForZetaSentEvent(t *testing.T) { // load archived ZetaSent receipt // https://etherscan.io/tx/0xf3935200c80f98502d5edc7e871ffc40ca898e134525c42c2ae3cbc5725f9d76 chainID := int64(1) - chain := common.EthChain() + chain := pkg.EthChain() intxHash := "0xf3935200c80f98502d5edc7e871ffc40ca898e134525c42c2ae3cbc5725f9d76" - receipt := testutils.LoadEVMIntxReceipt(t, chainID, intxHash, common.CoinType_Zeta) - cctx := testutils.LoadEVMIntxCctx(t, chainID, intxHash, common.CoinType_Zeta) + receipt := testutils.LoadEVMIntxReceipt(t, chainID, intxHash, pkg.CoinType_Zeta) + cctx := testutils.LoadEVMIntxCctx(t, chainID, intxHash, pkg.CoinType_Zeta) // parse ZetaSent event ob := MockEVMClient(chain, nil, nil, nil, nil, 1, stub.MockChainParams(1, 1)) @@ -264,11 +264,11 @@ func TestEVM_BuildInboundVoteMsgForZetaSentEvent(t *testing.T) { func TestEVM_BuildInboundVoteMsgForDepositedEvent(t *testing.T) { // load archived Deposited receipt // https://etherscan.io/tx/0x4ea69a0e2ff36f7548ab75791c3b990e076e2a4bffeb616035b239b7d33843da - chain := common.EthChain() + chain := pkg.EthChain() chainID := chain.ChainId intxHash := "0x4ea69a0e2ff36f7548ab75791c3b990e076e2a4bffeb616035b239b7d33843da" - tx, receipt := testutils.LoadEVMIntxNReceipt(t, chainID, intxHash, common.CoinType_ERC20) - cctx := testutils.LoadEVMIntxCctx(t, chainID, intxHash, common.CoinType_ERC20) + tx, receipt := testutils.LoadEVMIntxNReceipt(t, chainID, intxHash, pkg.CoinType_ERC20) + cctx := testutils.LoadEVMIntxCctx(t, chainID, intxHash, pkg.CoinType_ERC20) // parse Deposited event ob := MockEVMClient(chain, nil, nil, nil, nil, 1, stub.MockChainParams(1, 1)) @@ -300,7 +300,7 @@ func TestEVM_BuildInboundVoteMsgForDepositedEvent(t *testing.T) { require.Nil(t, msg) }) t.Run("should return nil msg on donation transaction", func(t *testing.T) { - event.Message = []byte(common.DonationMessage) + event.Message = []byte(pkg.DonationMessage) msg := ob.BuildInboundVoteMsgForDepositedEvent(event, sender) require.Nil(t, msg) }) @@ -309,17 +309,17 @@ func TestEVM_BuildInboundVoteMsgForDepositedEvent(t *testing.T) { func TestEVM_BuildInboundVoteMsgForTokenSentToTSS(t *testing.T) { // load archived gas token transfer to TSS // https://etherscan.io/tx/0xeaec67d5dd5d85f27b21bef83e01cbdf59154fd793ea7a22c297f7c3a722c532 - chain := common.EthChain() + chain := pkg.EthChain() chainID := chain.ChainId intxHash := "0xeaec67d5dd5d85f27b21bef83e01cbdf59154fd793ea7a22c297f7c3a722c532" - tx, receipt := testutils.LoadEVMIntxNReceipt(t, chainID, intxHash, common.CoinType_Gas) + tx, receipt := testutils.LoadEVMIntxNReceipt(t, chainID, intxHash, pkg.CoinType_Gas) require.NoError(t, evm.ValidateEvmTransaction(tx)) - cctx := testutils.LoadEVMIntxCctx(t, chainID, intxHash, common.CoinType_Gas) + cctx := testutils.LoadEVMIntxCctx(t, chainID, intxHash, pkg.CoinType_Gas) // load archived gas token donation to TSS // https://etherscan.io/tx/0x52f214cf7b10be71f4d274193287d47bc9632b976e69b9d2cdeb527c2ba32155 inTxHashDonation := "0x52f214cf7b10be71f4d274193287d47bc9632b976e69b9d2cdeb527c2ba32155" - txDonation, receiptDonation := testutils.LoadEVMIntxNReceiptDonation(t, chainID, inTxHashDonation, common.CoinType_Gas) + txDonation, receiptDonation := testutils.LoadEVMIntxNReceiptDonation(t, chainID, inTxHashDonation, pkg.CoinType_Gas) require.NoError(t, evm.ValidateEvmTransaction(txDonation)) // create test compliance config @@ -358,14 +358,14 @@ func TestEVM_BuildInboundVoteMsgForTokenSentToTSS(t *testing.T) { func TestEVM_ObserveTSSReceiveInBlock(t *testing.T) { // https://etherscan.io/tx/0xeaec67d5dd5d85f27b21bef83e01cbdf59154fd793ea7a22c297f7c3a722c532 - chain := common.EthChain() + chain := pkg.EthChain() chainID := chain.ChainId confirmation := uint64(1) chainParam := stub.MockChainParams(chain.ChainId, confirmation) intxHash := "0xeaec67d5dd5d85f27b21bef83e01cbdf59154fd793ea7a22c297f7c3a722c532" // load archived tx and receipt - tx, receipt := testutils.LoadEVMIntxNReceipt(t, chainID, intxHash, common.CoinType_Gas) + tx, receipt := testutils.LoadEVMIntxNReceipt(t, chainID, intxHash, pkg.CoinType_Gas) require.NoError(t, evm.ValidateEvmTransaction(tx)) // load archived evm block diff --git a/zetaclient/evm/outbound_transaction_data.go b/zetaclient/evm/outbound_transaction_data.go index 76f8cf6d8f..c4bc9749b3 100644 --- a/zetaclient/evm/outbound_transaction_data.go +++ b/zetaclient/evm/outbound_transaction_data.go @@ -10,7 +10,7 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" "github.com/rs/zerolog" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" "github.com/zeta-chain/zetacore/zetaclient/interfaces" ) @@ -66,7 +66,7 @@ func (txData *OutBoundTransactionData) SetupGas( cctx *types.CrossChainTx, logger zerolog.Logger, client interfaces.EVMRPCClient, - chain *common.Chain, + chain *pkg.Chain, ) error { txData.gasLimit = cctx.GetCurrentOutTxParam().OutboundTxGasLimit @@ -85,7 +85,7 @@ func (txData *OutBoundTransactionData) SetupGas( // we should possibly remove it completely and return an error if no OutboundTxGasPrice is provided because it means no fee is processed on ZetaChain specified, ok := new(big.Int).SetString(cctx.GetCurrentOutTxParam().OutboundTxGasPrice, 10) if !ok { - if common.IsEthereumChain(chain.ChainId) { + if pkg.IsEthereumChain(chain.ChainId) { suggested, err := client.SuggestGasPrice(context.Background()) if err != nil { return errors.Join(err, fmt.Errorf("cannot get gas price from chain %s ", chain)) @@ -127,7 +127,7 @@ func NewOutBoundTransactionData( return nil, true, nil } - toChain := common.GetChainFromChainID(txData.toChainID.Int64()) + toChain := pkg.GetChainFromChainID(txData.toChainID.Int64()) if toChain == nil { return nil, true, fmt.Errorf("unknown chain: %d", txData.toChainID.Int64()) } @@ -169,7 +169,7 @@ func NewOutBoundTransactionData( } // Base64 decode message - if cctx.GetCurrentOutTxParam().CoinType != common.CoinType_Cmd { + if cctx.GetCurrentOutTxParam().CoinType != pkg.CoinType_Cmd { txData.message, err = base64.StdEncoding.DecodeString(cctx.RelayedMessage) if err != nil { logger.Err(err).Msgf("decode CCTX.Message %s error", cctx.RelayedMessage) diff --git a/zetaclient/evm/outbound_transaction_data_test.go b/zetaclient/evm/outbound_transaction_data_test.go index cc5de0489b..ebe6d84169 100644 --- a/zetaclient/evm/outbound_transaction_data_test.go +++ b/zetaclient/evm/outbound_transaction_data_test.go @@ -7,7 +7,7 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" "github.com/rs/zerolog" "github.com/stretchr/testify/require" - corecommon "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" ) @@ -55,14 +55,14 @@ func TestSigner_SetupGas(t *testing.T) { logger := zerolog.Logger{} t.Run("SetupGas_success", func(t *testing.T) { - chain := corecommon.BscMainnetChain() + chain := pkg.BscMainnetChain() err := txData.SetupGas(cctx, logger, evmSigner.EvmClient(), &chain) require.NoError(t, err) }) t.Run("SetupGas_error", func(t *testing.T) { cctx.GetCurrentOutTxParam().OutboundTxGasPrice = "invalidGasPrice" - chain := corecommon.BscMainnetChain() + chain := pkg.BscMainnetChain() err := txData.SetupGas(cctx, logger, evmSigner.EvmClient(), &chain) require.ErrorContains(t, err, "cannot convert gas price") }) diff --git a/zetaclient/evm/validation_test.go b/zetaclient/evm/validation_test.go index a1e2d3de9c..9995fbc123 100644 --- a/zetaclient/evm/validation_test.go +++ b/zetaclient/evm/validation_test.go @@ -9,7 +9,7 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/onrik/ethrpc" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/zetaclient/testutils" ) @@ -117,7 +117,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { }{ { name: "should pass for valid transaction", - tx: testutils.LoadEVMIntx(t, chainID, intxHash, common.CoinType_Gas), + tx: testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas), fail: false, }, { @@ -129,7 +129,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { { name: "should fail for empty hash", tx: func() *ethrpc.Transaction { - tx := testutils.LoadEVMIntx(t, chainID, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas) tx.Hash = "" return tx }(), @@ -139,7 +139,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { { name: "should fail for negative nonce", tx: func() *ethrpc.Transaction { - tx := testutils.LoadEVMIntx(t, chainID, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas) tx.Nonce = -1 return tx }(), @@ -149,7 +149,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { { name: "should fail for empty from address", tx: func() *ethrpc.Transaction { - tx := testutils.LoadEVMIntx(t, chainID, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas) tx.From = "" return tx }(), @@ -159,7 +159,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { { name: "should fail for invalid from address", tx: func() *ethrpc.Transaction { - tx := testutils.LoadEVMIntx(t, chainID, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas) tx.From = "0x" return tx }(), @@ -169,7 +169,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { { name: "should pass for empty to address", tx: func() *ethrpc.Transaction { - tx := testutils.LoadEVMIntx(t, chainID, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas) tx.To = "" return tx }(), @@ -178,7 +178,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { { name: "should fail for invalid to address", tx: func() *ethrpc.Transaction { - tx := testutils.LoadEVMIntx(t, chainID, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas) tx.To = "0xinvalid" return tx }(), @@ -188,7 +188,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { { name: "should fail for negative value", tx: func() *ethrpc.Transaction { - tx := testutils.LoadEVMIntx(t, chainID, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas) tx.Value = *big.NewInt(-1) return tx }(), @@ -198,7 +198,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { { name: "should fail for negative gas", tx: func() *ethrpc.Transaction { - tx := testutils.LoadEVMIntx(t, chainID, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas) tx.Gas = -1 return tx }(), @@ -208,7 +208,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { { name: "should fail for negative gas price", tx: func() *ethrpc.Transaction { - tx := testutils.LoadEVMIntx(t, chainID, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas) tx.GasPrice = *big.NewInt(-1) return tx }(), @@ -218,7 +218,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { { name: "should remove '0x' prefix from input data", tx: func() *ethrpc.Transaction { - tx := testutils.LoadEVMIntx(t, chainID, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas) return tx }(), fail: false, @@ -226,7 +226,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { { name: "nil block number should pass", tx: func() *ethrpc.Transaction { - tx := testutils.LoadEVMIntx(t, chainID, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas) tx.BlockNumber = nil return tx }(), @@ -235,7 +235,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { { name: "should fail for negative block number", tx: func() *ethrpc.Transaction { - tx := testutils.LoadEVMIntx(t, chainID, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas) negBlockNumber := -1 tx.BlockNumber = &negBlockNumber return tx @@ -246,7 +246,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { { name: "should fail for empty block hash", tx: func() *ethrpc.Transaction { - tx := testutils.LoadEVMIntx(t, chainID, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas) tx.BlockHash = "" return tx }(), @@ -256,7 +256,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { { name: "nil transaction index should fail", tx: func() *ethrpc.Transaction { - tx := testutils.LoadEVMIntx(t, chainID, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas) tx.TransactionIndex = nil return tx }(), @@ -266,7 +266,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { { name: "should fail for negative transaction index", tx: func() *ethrpc.Transaction { - tx := testutils.LoadEVMIntx(t, chainID, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas) negTransactionIndex := -1 tx.TransactionIndex = &negTransactionIndex return tx @@ -277,7 +277,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { { name: "should fail for invalid input data", tx: func() *ethrpc.Transaction { - tx := testutils.LoadEVMIntx(t, chainID, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas) tx.Input = "03befinvalid" return tx }(), @@ -304,7 +304,7 @@ func TestCheckEvmTransaction(t *testing.T) { intxHash := "0xeaec67d5dd5d85f27b21bef83e01cbdf59154fd793ea7a22c297f7c3a722c532" t.Run("should pass for valid transaction", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) err := ValidateEvmTransaction(tx) require.NoError(t, err) }) @@ -313,99 +313,99 @@ func TestCheckEvmTransaction(t *testing.T) { require.ErrorContains(t, err, "transaction is nil") }) t.Run("should fail for empty hash", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) tx.Hash = "" err := ValidateEvmTransaction(tx) require.ErrorContains(t, err, "hash is empty") }) t.Run("should fail for negative nonce", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) tx.Nonce = -1 err := ValidateEvmTransaction(tx) require.ErrorContains(t, err, "nonce -1 is negative") }) t.Run("should fail for empty from address", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) tx.From = "" err := ValidateEvmTransaction(tx) require.ErrorContains(t, err, "not a valid hex address") }) t.Run("should fail for invalid from address", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) tx.From = "0x" err := ValidateEvmTransaction(tx) require.ErrorContains(t, err, "from 0x is not a valid hex address") }) t.Run("should pass for empty to address", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) tx.To = "" err := ValidateEvmTransaction(tx) require.NoError(t, err) }) t.Run("should fail for invalid to address", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) tx.To = "0xinvalid" err := ValidateEvmTransaction(tx) require.ErrorContains(t, err, "to 0xinvalid is not a valid hex address") }) t.Run("should fail for negative value", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) tx.Value = *big.NewInt(-1) err := ValidateEvmTransaction(tx) require.ErrorContains(t, err, "value -1 is negative") }) t.Run("should fail for negative gas", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) tx.Gas = -1 err := ValidateEvmTransaction(tx) require.ErrorContains(t, err, "gas -1 is negative") }) t.Run("should fail for negative gas price", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) tx.GasPrice = *big.NewInt(-1) err := ValidateEvmTransaction(tx) require.ErrorContains(t, err, "gas price -1 is negative") }) t.Run("should remove '0x' prefix from input data", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) err := ValidateEvmTransaction(tx) require.NoError(t, err) require.Equal(t, "", tx.Input) }) t.Run("nil block number should pass", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) tx.BlockNumber = nil err := ValidateEvmTransaction(tx) require.NoError(t, err) }) t.Run("should fail for negative block number", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) negBlockNumber := -1 tx.BlockNumber = &negBlockNumber err := ValidateEvmTransaction(tx) require.ErrorContains(t, err, "block number -1 is not positive") }) t.Run("should fail for empty block hash", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) tx.BlockHash = "" err := ValidateEvmTransaction(tx) require.ErrorContains(t, err, "block hash is empty") }) t.Run("nil transaction index should fail", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) tx.TransactionIndex = nil err := ValidateEvmTransaction(tx) require.ErrorContains(t, err, "index is nil") }) t.Run("should fail for negative transaction index", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) negTransactionIndex := -1 tx.TransactionIndex = &negTransactionIndex err := ValidateEvmTransaction(tx) require.ErrorContains(t, err, "index -1 is negative") }) t.Run("should fail for invalid input data", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, common.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) tx.Input = "03befinvalid" err := ValidateEvmTransaction(tx) require.ErrorContains(t, err, "input data is not hex encoded") diff --git a/zetaclient/interfaces/interfaces.go b/zetaclient/interfaces/interfaces.go index 5d9a40fcc9..d7c9b45f2a 100644 --- a/zetaclient/interfaces/interfaces.go +++ b/zetaclient/interfaces/interfaces.go @@ -20,7 +20,7 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/rs/zerolog" "github.com/zeta-chain/go-tss/blame" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -67,13 +67,13 @@ type ZetaCoreBridger interface { outTxEffectiveGasPrice *big.Int, outTxEffectiveGasLimit uint64, amount *big.Int, - status common.ReceiveStatus, - chain common.Chain, + status pkg.ReceiveStatus, + chain pkg.Chain, nonce uint64, - coinType common.CoinType, + coinType pkg.CoinType, ) (string, string, error) - PostGasPrice(chain common.Chain, gasPrice uint64, supply string, blockNum uint64) (string, error) - PostAddBlockHeader(chainID int64, txhash []byte, height int64, header common.HeaderData) (string, error) + PostGasPrice(chain pkg.Chain, gasPrice uint64, supply string, blockNum uint64) (string, error) + PostAddBlockHeader(chainID int64, txhash []byte, height int64, header pkg.HeaderData) (string, error) GetBlockHeaderStateByChain(chainID int64) (observertypes.QueryGetBlockHeaderStateResponse, error) PostBlameData(blame *blame.Blame, chainID int64, index string) (string, error) @@ -81,18 +81,18 @@ type ZetaCoreBridger interface { chainID int64, nonce uint64, txHash string, - proof *common.Proof, + proof *pkg.Proof, blockHash string, txIndex int64, ) (string, error) GetKeys() *keys.Keys GetBlockHeight() (int64, error) GetZetaBlockHeight() (int64, error) - GetLastBlockHeightByChain(chain common.Chain) (*crosschaintypes.LastBlockHeight, error) + GetLastBlockHeightByChain(chain pkg.Chain) (*crosschaintypes.LastBlockHeight, error) ListPendingCctx(chainID int64) ([]*crosschaintypes.CrossChainTx, uint64, error) GetPendingNoncesByChain(chainID int64) (observertypes.PendingNonces, error) GetCctxByNonce(chainID int64, nonce uint64) (*crosschaintypes.CrossChainTx, error) - GetOutTxTracker(chain common.Chain, nonce uint64) (*crosschaintypes.OutTxTracker, error) + GetOutTxTracker(chain pkg.Chain, nonce uint64) (*crosschaintypes.OutTxTracker, error) GetAllOutTxTrackerByChain(chainID int64, order Order) ([]crosschaintypes.OutTxTracker, error) GetCrosschainFlags() (observertypes.CrosschainFlags, error) GetObserverList() ([]string, error) @@ -100,7 +100,7 @@ type ZetaCoreBridger interface { GetBtcTssAddress(chainID int64) (string, error) GetInboundTrackersForChain(chainID int64) ([]crosschaintypes.InTxTracker, error) GetLogger() *zerolog.Logger - ZetaChain() common.Chain + ZetaChain() pkg.Chain Pause() Unpause() GetZetaHotKeyBalance() (sdkmath.Int, error) diff --git a/zetaclient/supplychecker/zeta_supply_checker.go b/zetaclient/supplychecker/zeta_supply_checker.go index 2a2e112c4a..bd9cb86046 100644 --- a/zetaclient/supplychecker/zeta_supply_checker.go +++ b/zetaclient/supplychecker/zeta_supply_checker.go @@ -15,7 +15,7 @@ import ( "github.com/ethereum/go-ethereum/ethclient" "github.com/pkg/errors" "github.com/rs/zerolog" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" corecontext "github.com/zeta-chain/zetacore/zetaclient/core_context" clienttypes "github.com/zeta-chain/zetacore/zetaclient/types" @@ -28,8 +28,8 @@ type ZetaSupplyChecker struct { ticker *clienttypes.DynamicTicker stop chan struct{} logger zerolog.Logger - externalEvmChain []common.Chain - ethereumChain common.Chain + externalEvmChain []pkg.Chain + ethereumChain pkg.Chain genesisSupply sdkmath.Int } @@ -61,11 +61,11 @@ func NewZetaSupplyChecker(appContext *appcontext.AppContext, zetaClient *zetabri } for chainID := range zetaSupplyChecker.evmClient { - chain := common.GetChainFromChainID(chainID) - if chain.IsExternalChain() && common.IsEVMChain(chain.ChainId) && !common.IsEthereumChain(chain.ChainId) { + chain := pkg.GetChainFromChainID(chainID) + if chain.IsExternalChain() && pkg.IsEVMChain(chain.ChainId) && !pkg.IsEthereumChain(chain.ChainId) { zetaSupplyChecker.externalEvmChain = append(zetaSupplyChecker.externalEvmChain, *chain) } - if common.IsEthereumChain(chain.ChainId) { + if pkg.IsEthereumChain(chain.ChainId) { zetaSupplyChecker.ethereumChain = *chain } } @@ -224,7 +224,7 @@ func (zs *ZetaSupplyChecker) AbortedTxAmount() (sdkmath.Int, error) { } func (zs *ZetaSupplyChecker) GetAmountOfZetaInTransit() sdkmath.Int { - chainsToCheck := make([]common.Chain, len(zs.externalEvmChain)+1) + chainsToCheck := make([]pkg.Chain, len(zs.externalEvmChain)+1) chainsToCheck = append(append(chainsToCheck, zs.externalEvmChain...), zs.ethereumChain) cctxs := zs.GetPendingCCTXInTransit(chainsToCheck) amount := sdkmath.ZeroUint() @@ -237,7 +237,7 @@ func (zs *ZetaSupplyChecker) GetAmountOfZetaInTransit() sdkmath.Int { } return amountInt } -func (zs *ZetaSupplyChecker) GetPendingCCTXInTransit(receivingChains []common.Chain) []*types.CrossChainTx { +func (zs *ZetaSupplyChecker) GetPendingCCTXInTransit(receivingChains []pkg.Chain) []*types.CrossChainTx { cctxInTransit := make([]*types.CrossChainTx, 0) for _, chain := range receivingChains { cctx, _, err := zs.zetaClient.ListPendingCctx(chain.ChainId) @@ -246,7 +246,7 @@ func (zs *ZetaSupplyChecker) GetPendingCCTXInTransit(receivingChains []common.Ch } nonceToCctxMap := make(map[uint64]*types.CrossChainTx) for _, c := range cctx { - if c.GetInboundTxParams().CoinType == common.CoinType_Zeta { + if c.GetInboundTxParams().CoinType == pkg.CoinType_Zeta { nonceToCctxMap[c.GetCurrentOutTxParam().OutboundTxTssNonce] = c } } diff --git a/zetaclient/testutils/stub/core_bridge.go b/zetaclient/testutils/stub/core_bridge.go index d9172636c3..337a7b8e00 100644 --- a/zetaclient/testutils/stub/core_bridge.go +++ b/zetaclient/testutils/stub/core_bridge.go @@ -7,7 +7,7 @@ import ( "cosmossdk.io/math" "github.com/rs/zerolog" "github.com/zeta-chain/go-tss/blame" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" cctxtypes "github.com/zeta-chain/zetacore/x/crosschain/types" observerTypes "github.com/zeta-chain/zetacore/x/observer/types" "github.com/zeta-chain/zetacore/zetaclient/interfaces" @@ -21,11 +21,11 @@ var _ interfaces.ZetaCoreBridger = &MockZetaCoreBridge{} type MockZetaCoreBridge struct { paused bool - zetaChain common.Chain + zetaChain pkg.Chain } func NewMockZetaCoreBridge() *MockZetaCoreBridge { - zetaChain, err := common.ZetaChainFromChainID("zetachain_7000-1") + zetaChain, err := pkg.ZetaChainFromChainID("zetachain_7000-1") if err != nil { panic(err) } @@ -42,21 +42,21 @@ func (z *MockZetaCoreBridge) PostVoteInbound(_, _ uint64, _ *cctxtypes.MsgVoteOn return "", "", nil } -func (z *MockZetaCoreBridge) PostVoteOutbound(_ string, _ string, _ uint64, _ uint64, _ *big.Int, _ uint64, _ *big.Int, _ common.ReceiveStatus, _ common.Chain, _ uint64, _ common.CoinType) (string, string, error) { +func (z *MockZetaCoreBridge) PostVoteOutbound(_ string, _ string, _ uint64, _ uint64, _ *big.Int, _ uint64, _ *big.Int, _ pkg.ReceiveStatus, _ pkg.Chain, _ uint64, _ pkg.CoinType) (string, string, error) { if z.paused { return "", "", errors.New(ErrMsgPaused) } return "", "", nil } -func (z *MockZetaCoreBridge) PostGasPrice(_ common.Chain, _ uint64, _ string, _ uint64) (string, error) { +func (z *MockZetaCoreBridge) PostGasPrice(_ pkg.Chain, _ uint64, _ string, _ uint64) (string, error) { if z.paused { return "", errors.New(ErrMsgPaused) } return "", nil } -func (z *MockZetaCoreBridge) PostAddBlockHeader(_ int64, _ []byte, _ int64, _ common.HeaderData) (string, error) { +func (z *MockZetaCoreBridge) PostAddBlockHeader(_ int64, _ []byte, _ int64, _ pkg.HeaderData) (string, error) { if z.paused { return "", errors.New(ErrMsgPaused) } @@ -77,7 +77,7 @@ func (z *MockZetaCoreBridge) PostBlameData(_ *blame.Blame, _ int64, _ string) (s return "", nil } -func (z *MockZetaCoreBridge) AddTxHashToOutTxTracker(_ int64, _ uint64, _ string, _ *common.Proof, _ string, _ int64) (string, error) { +func (z *MockZetaCoreBridge) AddTxHashToOutTxTracker(_ int64, _ uint64, _ string, _ *pkg.Proof, _ string, _ int64) (string, error) { if z.paused { return "", errors.New(ErrMsgPaused) } @@ -102,7 +102,7 @@ func (z *MockZetaCoreBridge) GetZetaBlockHeight() (int64, error) { return 0, nil } -func (z *MockZetaCoreBridge) GetLastBlockHeightByChain(_ common.Chain) (*cctxtypes.LastBlockHeight, error) { +func (z *MockZetaCoreBridge) GetLastBlockHeightByChain(_ pkg.Chain) (*cctxtypes.LastBlockHeight, error) { if z.paused { return nil, errors.New(ErrMsgPaused) } @@ -130,7 +130,7 @@ func (z *MockZetaCoreBridge) GetCctxByNonce(_ int64, _ uint64) (*cctxtypes.Cross return &cctxtypes.CrossChainTx{}, nil } -func (z *MockZetaCoreBridge) GetOutTxTracker(_ common.Chain, _ uint64) (*cctxtypes.OutTxTracker, error) { +func (z *MockZetaCoreBridge) GetOutTxTracker(_ pkg.Chain, _ uint64) (*cctxtypes.OutTxTracker, error) { if z.paused { return nil, errors.New(ErrMsgPaused) } @@ -183,7 +183,7 @@ func (z *MockZetaCoreBridge) GetLogger() *zerolog.Logger { return nil } -func (z *MockZetaCoreBridge) ZetaChain() common.Chain { +func (z *MockZetaCoreBridge) ZetaChain() pkg.Chain { return z.zetaChain } diff --git a/zetaclient/testutils/stub/tss_signer.go b/zetaclient/testutils/stub/tss_signer.go index da3f954588..6f58466297 100644 --- a/zetaclient/testutils/stub/tss_signer.go +++ b/zetaclient/testutils/stub/tss_signer.go @@ -7,7 +7,7 @@ import ( "github.com/btcsuite/btcutil" ethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/zetaclient/interfaces" "github.com/zeta-chain/zetacore/zetaclient/testutils" ) @@ -46,7 +46,7 @@ func NewTSSAthens3() *TSS { } // Sign uses test key unrelated to any tss key in production -func (s *TSS) Sign(data []byte, _ uint64, _ uint64, _ *common.Chain, _ string) ([65]byte, error) { +func (s *TSS) Sign(data []byte, _ uint64, _ uint64, _ *pkg.Chain, _ string) ([65]byte, error) { signature, err := crypto.Sign(data, TestPrivateKey) if err != nil { return [65]byte{}, err diff --git a/zetaclient/testutils/testdata.go b/zetaclient/testutils/testdata.go index 0676824514..641e4d824d 100644 --- a/zetaclient/testutils/testdata.go +++ b/zetaclient/testutils/testdata.go @@ -11,7 +11,7 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/onrik/ethrpc" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" "github.com/zeta-chain/zetacore/zetaclient/config" ) @@ -106,7 +106,7 @@ func LoadEVMIntx( t *testing.T, chainID int64, intxHash string, - coinType common.CoinType) *ethrpc.Transaction { + coinType pkg.CoinType) *ethrpc.Transaction { nameTx := path.Join("../", TestDataPathEVM, FileNameEVMIntx(chainID, intxHash, coinType, false)) tx := ðrpc.Transaction{} @@ -120,7 +120,7 @@ func LoadEVMIntxReceipt( t *testing.T, chainID int64, intxHash string, - coinType common.CoinType) *ethtypes.Receipt { + coinType pkg.CoinType) *ethtypes.Receipt { nameReceipt := path.Join("../", TestDataPathEVM, FileNameEVMIntxReceipt(chainID, intxHash, coinType, false)) receipt := ðtypes.Receipt{} @@ -134,7 +134,7 @@ func LoadEVMIntxCctx( t *testing.T, chainID int64, intxHash string, - coinType common.CoinType) *crosschaintypes.CrossChainTx { + coinType pkg.CoinType) *crosschaintypes.CrossChainTx { nameCctx := path.Join("../", TestDataPathCctx, FileNameEVMIntxCctx(chainID, intxHash, coinType)) cctx := &crosschaintypes.CrossChainTx{} @@ -161,7 +161,7 @@ func LoadEVMIntxNReceipt( t *testing.T, chainID int64, intxHash string, - coinType common.CoinType) (*ethrpc.Transaction, *ethtypes.Receipt) { + coinType pkg.CoinType) (*ethrpc.Transaction, *ethtypes.Receipt) { // load archived intx and receipt tx := LoadEVMIntx(t, chainID, intxHash, coinType) receipt := LoadEVMIntxReceipt(t, chainID, intxHash, coinType) @@ -174,7 +174,7 @@ func LoadEVMIntxDonation( t *testing.T, chainID int64, intxHash string, - coinType common.CoinType) *ethrpc.Transaction { + coinType pkg.CoinType) *ethrpc.Transaction { nameTx := path.Join("../", TestDataPathEVM, FileNameEVMIntx(chainID, intxHash, coinType, true)) tx := ðrpc.Transaction{} @@ -188,7 +188,7 @@ func LoadEVMIntxReceiptDonation( t *testing.T, chainID int64, intxHash string, - coinType common.CoinType) *ethtypes.Receipt { + coinType pkg.CoinType) *ethtypes.Receipt { nameReceipt := path.Join("../", TestDataPathEVM, FileNameEVMIntxReceipt(chainID, intxHash, coinType, true)) receipt := ðtypes.Receipt{} @@ -202,7 +202,7 @@ func LoadEVMIntxNReceiptDonation( t *testing.T, chainID int64, intxHash string, - coinType common.CoinType) (*ethrpc.Transaction, *ethtypes.Receipt) { + coinType pkg.CoinType) (*ethrpc.Transaction, *ethtypes.Receipt) { // load archived donation intx and receipt tx := LoadEVMIntxDonation(t, chainID, intxHash, coinType) receipt := LoadEVMIntxReceiptDonation(t, chainID, intxHash, coinType) @@ -215,7 +215,7 @@ func LoadEVMIntxNReceiptNCctx( t *testing.T, chainID int64, intxHash string, - coinType common.CoinType) (*ethrpc.Transaction, *ethtypes.Receipt, *crosschaintypes.CrossChainTx) { + coinType pkg.CoinType) (*ethrpc.Transaction, *ethtypes.Receipt, *crosschaintypes.CrossChainTx) { // load archived intx, receipt and cctx tx := LoadEVMIntx(t, chainID, intxHash, coinType) receipt := LoadEVMIntxReceipt(t, chainID, intxHash, coinType) @@ -229,7 +229,7 @@ func LoadEVMOuttx( t *testing.T, chainID int64, intxHash string, - coinType common.CoinType) *ethtypes.Transaction { + coinType pkg.CoinType) *ethtypes.Transaction { nameTx := path.Join("../", TestDataPathEVM, FileNameEVMOuttx(chainID, intxHash, coinType)) tx := ðtypes.Transaction{} @@ -243,7 +243,7 @@ func LoadEVMOuttxReceipt( t *testing.T, chainID int64, intxHash string, - coinType common.CoinType) *ethtypes.Receipt { + coinType pkg.CoinType) *ethtypes.Receipt { nameReceipt := path.Join("../", TestDataPathEVM, FileNameEVMOuttxReceipt(chainID, intxHash, coinType)) receipt := ðtypes.Receipt{} @@ -257,7 +257,7 @@ func LoadEVMOuttxNReceipt( t *testing.T, chainID int64, intxHash string, - coinType common.CoinType) (*ethtypes.Transaction, *ethtypes.Receipt) { + coinType pkg.CoinType) (*ethtypes.Transaction, *ethtypes.Receipt) { // load archived evm outtx and receipt tx := LoadEVMOuttx(t, chainID, intxHash, coinType) receipt := LoadEVMOuttxReceipt(t, chainID, intxHash, coinType) diff --git a/zetaclient/testutils/testdata_naming.go b/zetaclient/testutils/testdata_naming.go index 404b2471eb..43d355054c 100644 --- a/zetaclient/testutils/testdata_naming.go +++ b/zetaclient/testutils/testdata_naming.go @@ -3,7 +3,7 @@ package testutils import ( "fmt" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" ) // FileNameEVMBlock returns unified archive file name for block @@ -15,7 +15,7 @@ func FileNameEVMBlock(chainID int64, blockNumber uint64, trimmed bool) string { } // FileNameEVMIntx returns unified archive file name for inbound tx -func FileNameEVMIntx(chainID int64, intxHash string, coinType common.CoinType, donation bool) string { +func FileNameEVMIntx(chainID int64, intxHash string, coinType pkg.CoinType, donation bool) string { if !donation { return fmt.Sprintf("chain_%d_intx_ethrpc_%s_%s.json", chainID, coinType, intxHash) } @@ -23,7 +23,7 @@ func FileNameEVMIntx(chainID int64, intxHash string, coinType common.CoinType, d } // FileNameEVMIntxReceipt returns unified archive file name for inbound tx receipt -func FileNameEVMIntxReceipt(chainID int64, intxHash string, coinType common.CoinType, donation bool) string { +func FileNameEVMIntxReceipt(chainID int64, intxHash string, coinType pkg.CoinType, donation bool) string { if !donation { return fmt.Sprintf("chain_%d_intx_receipt_%s_%s.json", chainID, coinType, intxHash) } @@ -31,7 +31,7 @@ func FileNameEVMIntxReceipt(chainID int64, intxHash string, coinType common.Coin } // FileNameEVMIntxCctx returns unified archive file name for inbound cctx -func FileNameEVMIntxCctx(chainID int64, intxHash string, coinType common.CoinType) string { +func FileNameEVMIntxCctx(chainID int64, intxHash string, coinType pkg.CoinType) string { return fmt.Sprintf("cctx_intx_%d_%s_%s.json", chainID, coinType, intxHash) } @@ -54,11 +54,11 @@ func FileNameCctxByNonce(chainID int64, nonce uint64) string { } // FileNameEVMOuttx returns unified archive file name for outbound tx -func FileNameEVMOuttx(chainID int64, txHash string, coinType common.CoinType) string { +func FileNameEVMOuttx(chainID int64, txHash string, coinType pkg.CoinType) string { return fmt.Sprintf("chain_%d_outtx_%s_%s.json", chainID, coinType, txHash) } // FileNameEVMOuttxReceipt returns unified archive file name for outbound tx receipt -func FileNameEVMOuttxReceipt(chainID int64, txHash string, coinType common.CoinType) string { +func FileNameEVMOuttxReceipt(chainID int64, txHash string, coinType pkg.CoinType) string { return fmt.Sprintf("chain_%d_outtx_receipt_%s_%s.json", chainID, coinType, txHash) } diff --git a/zetaclient/zetabridge/query.go b/zetaclient/zetabridge/query.go index c2a8269ed3..7330bfdb7b 100644 --- a/zetaclient/zetabridge/query.go +++ b/zetaclient/zetabridge/query.go @@ -18,7 +18,7 @@ import ( upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" tmhttp "github.com/tendermint/tendermint/rpc/client/http" "github.com/zeta-chain/zetacore/cmd/zetacored/config" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" "google.golang.org/grpc" @@ -193,7 +193,7 @@ func (b *ZetaCoreBridge) GetNodeInfo() (*tmservice.GetNodeInfoResponse, error) { return nil, err } -func (b *ZetaCoreBridge) GetLastBlockHeightByChain(chain common.Chain) (*types.LastBlockHeight, error) { +func (b *ZetaCoreBridge) GetLastBlockHeightByChain(chain pkg.Chain) (*types.LastBlockHeight, error) { client := types.NewQueryClient(b.grpcConn) resp, err := client.LastBlockHeight(context.Background(), &types.QueryGetLastBlockHeightRequest{Index: chain.ChainName.String()}) if err != nil { @@ -230,7 +230,7 @@ func (b *ZetaCoreBridge) GetBallotByID(id string) (*observertypes.QueryBallotByI }) } -func (b *ZetaCoreBridge) GetNonceByChain(chain common.Chain) (observertypes.ChainNonces, error) { +func (b *ZetaCoreBridge) GetNonceByChain(chain pkg.Chain) (observertypes.ChainNonces, error) { client := observertypes.NewQueryClient(b.grpcConn) resp, err := client.ChainNonces(context.Background(), &observertypes.QueryGetChainNoncesRequest{Index: chain.ChainName.String()}) if err != nil { @@ -322,7 +322,7 @@ func (b *ZetaCoreBridge) GetTssHistory() ([]observertypes.TSS, error) { return resp.TssList, nil } -func (b *ZetaCoreBridge) GetOutTxTracker(chain common.Chain, nonce uint64) (*types.OutTxTracker, error) { +func (b *ZetaCoreBridge) GetOutTxTracker(chain pkg.Chain, nonce uint64) (*types.OutTxTracker, error) { client := types.NewQueryClient(b.grpcConn) resp, err := client.OutTxTracker(context.Background(), &types.QueryGetOutTxTrackerRequest{ ChainID: chain.ChainId, @@ -380,7 +380,7 @@ func (b *ZetaCoreBridge) GetBlockHeaderStateByChain(chainID int64) (observertype return *resp, nil } -func (b *ZetaCoreBridge) GetSupportedChains() ([]*common.Chain, error) { +func (b *ZetaCoreBridge) GetSupportedChains() ([]*pkg.Chain, error) { client := observertypes.NewQueryClient(b.grpcConn) resp, err := client.SupportedChains(context.Background(), &observertypes.QuerySupportedChains{}) if err != nil { @@ -398,7 +398,7 @@ func (b *ZetaCoreBridge) GetPendingNonces() (*observertypes.QueryAllPendingNonce return resp, nil } -func (b *ZetaCoreBridge) Prove(blockHash string, txHash string, txIndex int64, proof *common.Proof, chainID int64) (bool, error) { +func (b *ZetaCoreBridge) Prove(blockHash string, txHash string, txIndex int64, proof *pkg.Proof, chainID int64) (bool, error) { client := observertypes.NewQueryClient(b.grpcConn) resp, err := client.Prove(context.Background(), &observertypes.QueryProveRequest{ BlockHash: blockHash, diff --git a/zetaclient/zetabridge/tx.go b/zetaclient/zetabridge/tx.go index a142ad44f0..935541b028 100644 --- a/zetaclient/zetabridge/tx.go +++ b/zetaclient/zetabridge/tx.go @@ -14,7 +14,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/authz" "github.com/pkg/errors" "github.com/zeta-chain/go-tss/blame" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" observerTypes "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -74,9 +74,9 @@ func (b *ZetaCoreBridge) WrapMessageWithAuthz(msg sdk.Msg) (sdk.Msg, authz2.Sign return &authzMessage, authzSigner, nil } -func (b *ZetaCoreBridge) PostGasPrice(chain common.Chain, gasPrice uint64, supply string, blockNum uint64) (string, error) { +func (b *ZetaCoreBridge) PostGasPrice(chain pkg.Chain, gasPrice uint64, supply string, blockNum uint64) (string, error) { // double the gas price to avoid gas price spike - gasPrice = gasPrice * common.DefaultGasPriceMultiplier + gasPrice = gasPrice * pkg.DefaultGasPriceMultiplier signerAddress := b.keys.GetOperatorAddress().String() msg := types.NewMsgGasPriceVoter(signerAddress, chain.ChainId, gasPrice, supply, blockNum) @@ -101,12 +101,12 @@ func (b *ZetaCoreBridge) AddTxHashToOutTxTracker( chainID int64, nonce uint64, txHash string, - proof *common.Proof, + proof *pkg.Proof, blockHash string, txIndex int64, ) (string, error) { // don't report if the tracker already contains the txHash - tracker, err := b.GetOutTxTracker(common.Chain{ChainId: chainID}, nonce) + tracker, err := b.GetOutTxTracker(pkg.Chain{ChainId: chainID}, nonce) if err == nil { for _, hash := range tracker.HashList { if strings.EqualFold(hash.TxHash, txHash) { @@ -129,7 +129,7 @@ func (b *ZetaCoreBridge) AddTxHashToOutTxTracker( return zetaTxHash, nil } -func (b *ZetaCoreBridge) SetTSS(tssPubkey string, keyGenZetaHeight int64, status common.ReceiveStatus) (string, error) { +func (b *ZetaCoreBridge) SetTSS(tssPubkey string, keyGenZetaHeight int64, status pkg.ReceiveStatus) (string, error) { signerAddress := b.keys.GetOperatorAddress().String() msg := types.NewMsgCreateTSSVoter(signerAddress, tssPubkey, keyGenZetaHeight, status) @@ -197,7 +197,7 @@ func (b *ZetaCoreBridge) PostBlameData(blame *blame.Blame, chainID int64, index return "", fmt.Errorf("post blame data failed after %d retries", DefaultRetryCount) } -func (b *ZetaCoreBridge) PostAddBlockHeader(chainID int64, blockHash []byte, height int64, header common.HeaderData) (string, error) { +func (b *ZetaCoreBridge) PostAddBlockHeader(chainID int64, blockHash []byte, height int64, header pkg.HeaderData) (string, error) { signerAddress := b.keys.GetOperatorAddress().String() msg := observerTypes.NewMsgAddBlockHeader(signerAddress, chainID, blockHash, height, header) @@ -313,10 +313,10 @@ func (b *ZetaCoreBridge) PostVoteOutbound( outTxEffectiveGasPrice *big.Int, outTxEffectiveGasLimit uint64, amount *big.Int, - status common.ReceiveStatus, - chain common.Chain, + status pkg.ReceiveStatus, + chain pkg.Chain, nonce uint64, - coinType common.CoinType, + coinType pkg.CoinType, ) (string, string, error) { signerAddress := b.keys.GetOperatorAddress().String() msg := types.NewMsgVoteOnObservedOutboundTx( @@ -339,7 +339,7 @@ func (b *ZetaCoreBridge) PostVoteOutbound( // the higher gas limit is only necessary when the vote is finalized and the outbound is processed // therefore we use a retryGasLimit with a higher value to resend the tx if it fails (when the vote is finalized) retryGasLimit := uint64(0) - if msg.Status == common.ReceiveStatus_Failed { + if msg.Status == pkg.ReceiveStatus_Failed { retryGasLimit = PostVoteOutboundRevertGasLimit } diff --git a/zetaclient/zetabridge/tx_vote_inbound.go b/zetaclient/zetabridge/tx_vote_inbound.go index 0885d84117..affecdead5 100644 --- a/zetaclient/zetabridge/tx_vote_inbound.go +++ b/zetaclient/zetabridge/tx_vote_inbound.go @@ -2,7 +2,7 @@ package zetabridge import ( "cosmossdk.io/math" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" ) @@ -30,7 +30,7 @@ func GetInBoundVoteMessage( inTxHash string, inBlockHeight uint64, gasLimit uint64, - coinType common.CoinType, + coinType pkg.CoinType, asset string, signerAddress string, eventIndex uint, diff --git a/zetaclient/zetacore_observer.go b/zetaclient/zetacore_observer.go index 429c209287..20b9fc4072 100644 --- a/zetaclient/zetacore_observer.go +++ b/zetaclient/zetacore_observer.go @@ -15,7 +15,7 @@ import ( sdkmath "cosmossdk.io/math" "github.com/rs/zerolog" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" "github.com/zeta-chain/zetacore/zetaclient/metrics" ) @@ -32,8 +32,8 @@ type ZetaCoreLog struct { // CoreObserver wraps the zetabridge bridge and adds the client and signer maps to it . This is the high level object used for CCTX interactions type CoreObserver struct { bridge interfaces.ZetaCoreBridger - signerMap map[common.Chain]interfaces.ChainSigner - clientMap map[common.Chain]interfaces.ChainClient + signerMap map[pkg.Chain]interfaces.ChainSigner + clientMap map[pkg.Chain]interfaces.ChainClient logger ZetaCoreLog ts *metrics.TelemetryServer stop chan struct{} @@ -43,8 +43,8 @@ type CoreObserver struct { // NewCoreObserver creates a new CoreObserver func NewCoreObserver( bridge interfaces.ZetaCoreBridger, - signerMap map[common.Chain]interfaces.ChainSigner, - clientMap map[common.Chain]interfaces.ChainClient, + signerMap map[pkg.Chain]interfaces.ChainSigner, + clientMap map[pkg.Chain]interfaces.ChainClient, logger zerolog.Logger, ts *metrics.TelemetryServer, ) *CoreObserver { @@ -157,9 +157,9 @@ func (co *CoreObserver) startCctxScheduler(appContext *appcontext.AppContext) { // #nosec G701 range is verified zetaHeight := uint64(bn) - if common.IsEVMChain(c.ChainId) { + if pkg.IsEVMChain(c.ChainId) { co.scheduleCctxEVM(outTxMan, zetaHeight, c.ChainId, cctxList, ob, signer) - } else if common.IsBitcoinChain(c.ChainId) { + } else if pkg.IsBitcoinChain(c.ChainId) { co.scheduleCctxBTC(outTxMan, zetaHeight, c.ChainId, cctxList, ob, signer) } else { co.logger.ZetaChainWatcher.Error().Msgf("startCctxScheduler: unsupported chain %d", c.ChainId) @@ -324,7 +324,7 @@ func (co *CoreObserver) getUpdatedChainOb(appContext *appcontext.AppContext, cha } // update chain client core parameters curParams := chainOb.GetChainParams() - if common.IsEVMChain(chainID) { + if pkg.IsEVMChain(chainID) { evmParams, found := appContext.ZetaCoreContext().GetEVMChainParams(chainID) if found && !observertypes.ChainParamsEqual(curParams, *evmParams) { chainOb.SetChainParams(*evmParams) @@ -334,7 +334,7 @@ func (co *CoreObserver) getUpdatedChainOb(appContext *appcontext.AppContext, cha *evmParams, ) } - } else if common.IsBitcoinChain(chainID) { + } else if pkg.IsBitcoinChain(chainID) { _, btcParams, found := appContext.ZetaCoreContext().GetBTCChainParams() if found && !observertypes.ChainParamsEqual(curParams, *btcParams) { @@ -349,7 +349,7 @@ func (co *CoreObserver) getUpdatedChainOb(appContext *appcontext.AppContext, cha } func (co *CoreObserver) getTargetChainOb(chainID int64) (interfaces.ChainClient, error) { - c := common.GetChainFromChainID(chainID) + c := pkg.GetChainFromChainID(chainID) if c == nil { return nil, fmt.Errorf("chain not found for chainID %d", chainID) } diff --git a/zetaclient/zetacore_observer_test.go b/zetaclient/zetacore_observer_test.go index a2340ea4a4..ddea84b10a 100644 --- a/zetaclient/zetacore_observer_test.go +++ b/zetaclient/zetacore_observer_test.go @@ -17,7 +17,7 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/rs/zerolog/log" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/zetaclient/config" "github.com/zeta-chain/zetacore/zetaclient/types" . "gopkg.in/check.v1" @@ -104,7 +104,7 @@ func (s *COSuite) SetUpTest(c *C) { PrivKey: privateKey, } metaContractAddress := ethcommon.HexToAddress(config.ETH_MPI_ADDRESS) - signer, err := evm.NewEVMSigner(common.Chain("ETH"), config.GOERLI_RPC_ENDPOINT, tss.EVMAddress(), tss, config.META_TEST_GOERLI_ABI, metaContractAddress) + signer, err := evm.NewEVMSigner(pkg.Chain("ETH"), config.GOERLI_RPC_ENDPOINT, tss.EVMAddress(), tss, config.META_TEST_GOERLI_ABI, metaContractAddress) c.Assert(err, IsNil) c.Logf("TSS EVMAddress %s", tss.EVMAddress().Hex()) c.Logf("ETH MPI EVMAddress: %s", config.ETH_MPI_ADDRESS) From 8d32488806476740d2494263d978b11b121a5681 Mon Sep 17 00:00:00 2001 From: skosito Date: Fri, 22 Mar 2024 15:09:34 +0100 Subject: [PATCH 30/41] Rename common proto --- pkg/bitcoin/bitcoin.pb.go | 34 +- pkg/ethereum/ethereum.pb.go | 30 +- pkg/{common.pb.go => pkg.pb.go} | 313 ++++++++-------- proto/crosschain/cross_chain_tx.proto | 6 +- proto/crosschain/events.proto | 2 +- proto/crosschain/in_tx_tracker.proto | 4 +- proto/crosschain/tx.proto | 16 +- proto/fungible/events.proto | 6 +- proto/fungible/foreign_coins.proto | 4 +- proto/fungible/tx.proto | 4 +- proto/observer/chain_nonces.proto | 2 +- proto/observer/node_account.proto | 4 +- proto/observer/nonce_to_cctx.proto | 2 +- proto/observer/observer.proto | 4 +- proto/observer/params.proto | 4 +- proto/observer/pending_nonces.proto | 2 +- proto/observer/query.proto | 10 +- proto/observer/tx.proto | 4 +- proto/{common => pkg}/bitcoin/bitcoin.proto | 2 +- proto/{common => pkg}/ethereum/ethereum.proto | 2 +- proto/{common/common.proto => pkg/pkg.proto} | 8 +- x/crosschain/types/cross_chain_tx.pb.go | 161 ++++---- x/crosschain/types/events.pb.go | 86 ++--- x/crosschain/types/in_tx_tracker.pb.go | 40 +- x/crosschain/types/tx.pb.go | 284 +++++++------- x/fungible/types/events.pb.go | 148 ++++---- x/fungible/types/foreign_coins.pb.go | 62 ++-- x/fungible/types/tx.pb.go | 150 ++++---- x/observer/types/chain_nonces.pb.go | 40 +- x/observer/types/node_account.pb.go | 62 ++-- x/observer/types/nonce_to_cctx.pb.go | 30 +- x/observer/types/observer.pb.go | 66 ++-- x/observer/types/params.pb.go | 112 +++--- x/observer/types/pending_nonces.pb.go | 30 +- x/observer/types/query.pb.go | 350 +++++++++--------- x/observer/types/tx.pb.go | 134 +++---- 36 files changed, 1109 insertions(+), 1109 deletions(-) rename pkg/{common.pb.go => pkg.pb.go} (78%) rename proto/{common => pkg}/bitcoin/bitcoin.proto (62%) rename proto/{common => pkg}/ethereum/ethereum.proto (61%) rename proto/{common/common.proto => pkg/pkg.proto} (92%) diff --git a/pkg/bitcoin/bitcoin.pb.go b/pkg/bitcoin/bitcoin.pb.go index e56ac19d24..2a6c3aa1ec 100644 --- a/pkg/bitcoin/bitcoin.pb.go +++ b/pkg/bitcoin/bitcoin.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: common/bitcoin/bitcoin.proto +// source: pkg/bitcoin/bitcoin.proto package bitcoin @@ -33,7 +33,7 @@ func (m *Proof) Reset() { *m = Proof{} } func (m *Proof) String() string { return proto.CompactTextString(m) } func (*Proof) ProtoMessage() {} func (*Proof) Descriptor() ([]byte, []int) { - return fileDescriptor_0a2411cf854c4a85, []int{0} + return fileDescriptor_0c0df266727f042c, []int{0} } func (m *Proof) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -87,22 +87,22 @@ func init() { proto.RegisterType((*Proof)(nil), "bitcoin.Proof") } -func init() { proto.RegisterFile("common/bitcoin/bitcoin.proto", fileDescriptor_0a2411cf854c4a85) } +func init() { proto.RegisterFile("pkg/bitcoin/bitcoin.proto", fileDescriptor_0c0df266727f042c) } -var fileDescriptor_0a2411cf854c4a85 = []byte{ - // 180 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x49, 0xce, 0xcf, 0xcd, - 0xcd, 0xcf, 0xd3, 0x4f, 0xca, 0x2c, 0x49, 0xce, 0xcf, 0x84, 0xd3, 0x7a, 0x05, 0x45, 0xf9, 0x25, - 0xf9, 0x42, 0xec, 0x50, 0xae, 0x92, 0x0f, 0x17, 0x6b, 0x40, 0x51, 0x7e, 0x7e, 0x9a, 0x90, 0x24, - 0x17, 0x47, 0x49, 0x45, 0x7c, 0x52, 0x65, 0x49, 0x6a, 0xb1, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x4f, - 0x10, 0x7b, 0x49, 0x85, 0x13, 0x88, 0x2b, 0x24, 0xc4, 0xc5, 0x52, 0x90, 0x58, 0x92, 0x21, 0xc1, - 0x04, 0x16, 0x06, 0xb3, 0x85, 0x44, 0xb8, 0x58, 0x33, 0xf3, 0x52, 0x52, 0x2b, 0x24, 0x98, 0x15, - 0x18, 0x35, 0x78, 0x83, 0x20, 0x1c, 0x27, 0xf7, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, - 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, - 0x63, 0x88, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xaf, 0x4a, - 0x2d, 0x49, 0xd4, 0x4d, 0xce, 0x48, 0xcc, 0xcc, 0x03, 0x33, 0x93, 0xf3, 0x8b, 0x52, 0xf5, 0x51, - 0x5d, 0x9b, 0xc4, 0x06, 0x76, 0xa6, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x02, 0xc5, 0x71, 0x41, - 0xc6, 0x00, 0x00, 0x00, +var fileDescriptor_0c0df266727f042c = []byte{ + // 178 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2c, 0xc8, 0x4e, 0xd7, + 0x4f, 0xca, 0x2c, 0x49, 0xce, 0xcf, 0xcc, 0x83, 0xd1, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, + 0xec, 0x50, 0xae, 0x92, 0x0f, 0x17, 0x6b, 0x40, 0x51, 0x7e, 0x7e, 0x9a, 0x90, 0x24, 0x17, 0x47, + 0x49, 0x45, 0x7c, 0x52, 0x65, 0x49, 0x6a, 0xb1, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x4f, 0x10, 0x7b, + 0x49, 0x85, 0x13, 0x88, 0x2b, 0x24, 0xc4, 0xc5, 0x52, 0x90, 0x58, 0x92, 0x21, 0xc1, 0x04, 0x16, + 0x06, 0xb3, 0x85, 0x44, 0xb8, 0x58, 0x33, 0xf3, 0x52, 0x52, 0x2b, 0x24, 0x98, 0x15, 0x18, 0x35, + 0x78, 0x83, 0x20, 0x1c, 0x27, 0x97, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, + 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, + 0xd2, 0x4a, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xaf, 0x4a, 0x2d, 0x49, + 0xd4, 0x4d, 0xce, 0x48, 0xcc, 0xcc, 0x03, 0x33, 0x93, 0xf3, 0x8b, 0x52, 0xf5, 0x91, 0x9c, 0x9a, + 0xc4, 0x06, 0x76, 0xa3, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x87, 0x34, 0x28, 0xd8, 0xc0, 0x00, + 0x00, 0x00, } func (m *Proof) Marshal() (dAtA []byte, err error) { diff --git a/pkg/ethereum/ethereum.pb.go b/pkg/ethereum/ethereum.pb.go index 8dd8096019..d2c6b29db2 100644 --- a/pkg/ethereum/ethereum.pb.go +++ b/pkg/ethereum/ethereum.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: common/ethereum/ethereum.proto +// source: pkg/ethereum/ethereum.proto package ethereum @@ -32,7 +32,7 @@ func (m *Proof) Reset() { *m = Proof{} } func (m *Proof) String() string { return proto.CompactTextString(m) } func (*Proof) ProtoMessage() {} func (*Proof) Descriptor() ([]byte, []int) { - return fileDescriptor_93e74b59a4555c70, []int{0} + return fileDescriptor_824ba8ad73eb50c7, []int{0} } func (m *Proof) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -79,20 +79,20 @@ func init() { proto.RegisterType((*Proof)(nil), "ethereum.Proof") } -func init() { proto.RegisterFile("common/ethereum/ethereum.proto", fileDescriptor_93e74b59a4555c70) } +func init() { proto.RegisterFile("pkg/ethereum/ethereum.proto", fileDescriptor_824ba8ad73eb50c7) } -var fileDescriptor_93e74b59a4555c70 = []byte{ - // 159 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xce, 0xcf, 0xcd, - 0xcd, 0xcf, 0xd3, 0x4f, 0x2d, 0xc9, 0x48, 0x2d, 0x4a, 0x2d, 0xcd, 0x85, 0x33, 0xf4, 0x0a, 0x8a, - 0xf2, 0x4b, 0xf2, 0x85, 0x38, 0x60, 0x7c, 0x25, 0x63, 0x2e, 0xd6, 0x80, 0xa2, 0xfc, 0xfc, 0x34, - 0x21, 0x21, 0x2e, 0x96, 0xec, 0xd4, 0xca, 0x62, 0x09, 0x46, 0x05, 0x66, 0x0d, 0x9e, 0x20, 0x30, - 0x5b, 0x48, 0x8c, 0x8b, 0xad, 0x2c, 0x31, 0xa7, 0x34, 0xb5, 0x58, 0x82, 0x09, 0x2c, 0x0a, 0xe5, - 0x39, 0x79, 0x9c, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, - 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x5e, 0x7a, 0x66, - 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x55, 0x6a, 0x49, 0xa2, 0x6e, 0x72, 0x46, - 0x62, 0x66, 0x1e, 0x98, 0x99, 0x9c, 0x5f, 0x94, 0xaa, 0x8f, 0xe6, 0xae, 0x24, 0x36, 0xb0, 0x7b, - 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x31, 0x9b, 0x72, 0x4f, 0xb1, 0x00, 0x00, 0x00, +var fileDescriptor_824ba8ad73eb50c7 = []byte{ + // 156 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2e, 0xc8, 0x4e, 0xd7, + 0x4f, 0x2d, 0xc9, 0x48, 0x2d, 0x4a, 0x2d, 0xcd, 0x85, 0x33, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, + 0x85, 0x38, 0x60, 0x7c, 0x25, 0x63, 0x2e, 0xd6, 0x80, 0xa2, 0xfc, 0xfc, 0x34, 0x21, 0x21, 0x2e, + 0x96, 0xec, 0xd4, 0xca, 0x62, 0x09, 0x46, 0x05, 0x66, 0x0d, 0x9e, 0x20, 0x30, 0x5b, 0x48, 0x8c, + 0x8b, 0xad, 0x2c, 0x31, 0xa7, 0x34, 0xb5, 0x58, 0x82, 0x09, 0x2c, 0x0a, 0xe5, 0x39, 0xb9, 0x9e, + 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, + 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x76, 0x7a, 0x66, 0x49, 0x46, 0x69, + 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x55, 0x6a, 0x49, 0xa2, 0x6e, 0x72, 0x46, 0x62, 0x66, 0x1e, + 0x98, 0x99, 0x9c, 0x5f, 0x94, 0xaa, 0x8f, 0xec, 0xa8, 0x24, 0x36, 0xb0, 0x63, 0x8c, 0x01, 0x01, + 0x00, 0x00, 0xff, 0xff, 0x74, 0x7b, 0xe9, 0x63, 0xab, 0x00, 0x00, 0x00, } func (m *Proof) Marshal() (dAtA []byte, err error) { diff --git a/pkg/common.pb.go b/pkg/pkg.pb.go similarity index 78% rename from pkg/common.pb.go rename to pkg/pkg.pb.go index 50420edcb5..66ed9b6e77 100644 --- a/pkg/common.pb.go +++ b/pkg/pkg.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: common/common.proto +// source: pkg/pkg.proto package pkg @@ -11,8 +11,8 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - bitcoin "github.com/zeta-chain/zetacore/common/bitcoin" - ethereum "github.com/zeta-chain/zetacore/common/ethereum" + bitcoin "github.com/zeta-chain/zetacore/pkg/bitcoin" + ethereum "github.com/zeta-chain/zetacore/pkg/ethereum" ) // Reference imports to suppress errors if they are not otherwise used. @@ -51,7 +51,7 @@ func (x ReceiveStatus) String() string { } func (ReceiveStatus) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_8f954d82c0b891f6, []int{0} + return fileDescriptor_9a6ed24fa3ed052d, []int{0} } type CoinType int32 @@ -82,7 +82,7 @@ func (x CoinType) String() string { } func (CoinType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_8f954d82c0b891f6, []int{1} + return fileDescriptor_9a6ed24fa3ed052d, []int{1} } type ChainName int32 @@ -152,7 +152,7 @@ func (x ChainName) String() string { } func (ChainName) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_8f954d82c0b891f6, []int{2} + return fileDescriptor_9a6ed24fa3ed052d, []int{2} } // PubKeySet contains two pub keys , secp256k1 and ed25519 @@ -165,7 +165,7 @@ func (m *PubKeySet) Reset() { *m = PubKeySet{} } func (m *PubKeySet) String() string { return proto.CompactTextString(m) } func (*PubKeySet) ProtoMessage() {} func (*PubKeySet) Descriptor() ([]byte, []int) { - return fileDescriptor_8f954d82c0b891f6, []int{0} + return fileDescriptor_9a6ed24fa3ed052d, []int{0} } func (m *PubKeySet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -209,7 +209,7 @@ func (m *PubKeySet) GetEd25519() PubKey { } type Chain struct { - ChainName ChainName `protobuf:"varint,1,opt,name=chain_name,json=chainName,proto3,enum=common.ChainName" json:"chain_name,omitempty"` + ChainName ChainName `protobuf:"varint,1,opt,name=chain_name,json=chainName,proto3,enum=pkg.ChainName" json:"chain_name,omitempty"` ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` } @@ -217,7 +217,7 @@ func (m *Chain) Reset() { *m = Chain{} } func (m *Chain) String() string { return proto.CompactTextString(m) } func (*Chain) ProtoMessage() {} func (*Chain) Descriptor() ([]byte, []int) { - return fileDescriptor_8f954d82c0b891f6, []int{1} + return fileDescriptor_9a6ed24fa3ed052d, []int{1} } func (m *Chain) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -273,7 +273,7 @@ func (m *BlockHeader) Reset() { *m = BlockHeader{} } func (m *BlockHeader) String() string { return proto.CompactTextString(m) } func (*BlockHeader) ProtoMessage() {} func (*BlockHeader) Descriptor() ([]byte, []int) { - return fileDescriptor_8f954d82c0b891f6, []int{2} + return fileDescriptor_9a6ed24fa3ed052d, []int{2} } func (m *BlockHeader) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -349,7 +349,7 @@ func (m *HeaderData) Reset() { *m = HeaderData{} } func (m *HeaderData) String() string { return proto.CompactTextString(m) } func (*HeaderData) ProtoMessage() {} func (*HeaderData) Descriptor() ([]byte, []int) { - return fileDescriptor_8f954d82c0b891f6, []int{3} + return fileDescriptor_9a6ed24fa3ed052d, []int{3} } func (m *HeaderData) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -435,7 +435,7 @@ func (m *Proof) Reset() { *m = Proof{} } func (m *Proof) String() string { return proto.CompactTextString(m) } func (*Proof) ProtoMessage() {} func (*Proof) Descriptor() ([]byte, []int) { - return fileDescriptor_8f954d82c0b891f6, []int{4} + return fileDescriptor_9a6ed24fa3ed052d, []int{4} } func (m *Proof) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -510,64 +510,63 @@ func (*Proof) XXX_OneofWrappers() []interface{} { } func init() { - proto.RegisterEnum("common.ReceiveStatus", ReceiveStatus_name, ReceiveStatus_value) - proto.RegisterEnum("common.CoinType", CoinType_name, CoinType_value) - proto.RegisterEnum("common.ChainName", ChainName_name, ChainName_value) - proto.RegisterType((*PubKeySet)(nil), "common.PubKeySet") - proto.RegisterType((*Chain)(nil), "common.Chain") - proto.RegisterType((*BlockHeader)(nil), "common.BlockHeader") - proto.RegisterType((*HeaderData)(nil), "common.HeaderData") - proto.RegisterType((*Proof)(nil), "common.Proof") -} - -func init() { proto.RegisterFile("common/common.proto", fileDescriptor_8f954d82c0b891f6) } - -var fileDescriptor_8f954d82c0b891f6 = []byte{ - // 693 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x94, 0xcd, 0x6e, 0xd3, 0x4a, - 0x14, 0xc7, 0xed, 0x7c, 0xfb, 0x24, 0x4d, 0x7c, 0xa7, 0x57, 0xf7, 0xf6, 0x56, 0x57, 0x4e, 0x15, - 0x81, 0x28, 0x95, 0x48, 0xdb, 0xa0, 0xf0, 0x21, 0x16, 0x48, 0x09, 0x1f, 0x45, 0x48, 0xa8, 0x72, - 0xba, 0xea, 0x26, 0x1a, 0xdb, 0x07, 0xdb, 0x6a, 0xec, 0xb1, 0xec, 0x09, 0x52, 0xd8, 0xf1, 0x06, - 0x3c, 0x04, 0x12, 0x3c, 0x01, 0xcf, 0xd0, 0x65, 0x97, 0xac, 0x2a, 0x94, 0xbe, 0x05, 0x2b, 0x34, - 0x63, 0x8f, 0x53, 0x56, 0x3e, 0xe7, 0x77, 0xfe, 0xff, 0x73, 0xce, 0xc4, 0x13, 0xc3, 0xb6, 0xcb, - 0xa2, 0x88, 0xc5, 0x87, 0xf9, 0x63, 0x98, 0xa4, 0x8c, 0x33, 0xd2, 0xc8, 0xb3, 0xdd, 0xff, 0x8b, - 0xa2, 0x13, 0x72, 0x97, 0x85, 0xe5, 0x33, 0x57, 0xed, 0x5a, 0x45, 0x15, 0x79, 0x80, 0x29, 0x2e, - 0xa3, 0x32, 0x28, 0xea, 0x7f, 0xfb, 0xcc, 0x67, 0x32, 0x3c, 0x14, 0x51, 0x4e, 0x07, 0x01, 0x18, - 0xa7, 0x4b, 0xe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1, 0x2b, 0x53, - 0x23, 0x3d, 0x68, 0x23, 0x0f, 0xe6, 0x11, 0x0d, 0xe3, 0x18, 0xb9, 0xa9, 0x13, 0x13, 0x3a, 0x1f, - 0x91, 0xd3, 0x92, 0x54, 0x84, 0xc4, 0xe1, 0x6e, 0x09, 0xaa, 0x64, 0x1b, 0x7a, 0x09, 0x5b, 0xac, - 0x7c, 0x16, 0x97, 0xb0, 0x26, 0x55, 0xd9, 0x46, 0x55, 0x27, 0x04, 0xba, 0x3e, 0xc3, 0x74, 0x11, - 0xce, 0x39, 0x66, 0x5c, 0xb0, 0x86, 0x60, 0xd1, 0x32, 0x72, 0xe8, 0x86, 0x35, 0x45, 0x37, 0x9f, - 0xc6, 0xd4, 0x0d, 0xb0, 0x84, 0x2d, 0x21, 0x74, 0x28, 0x73, 0xa8, 0x53, 0x32, 0x43, 0x4d, 0x50, - 0x00, 0xca, 0x55, 0x15, 0x69, 0xab, 0x55, 0x15, 0xe8, 0x88, 0xe6, 0x19, 0x26, 0x6c, 0x11, 0x6e, - 0x54, 0x5b, 0x72, 0x62, 0xbe, 0xd9, 0x82, 0xb9, 0x74, 0x21, 0x60, 0x57, 0x59, 0x53, 0xf4, 0x85, - 0xd0, 0xec, 0xe5, 0x3f, 0xdc, 0xe4, 0xf9, 0xe5, 0xda, 0xd2, 0xaf, 0xd6, 0x96, 0xfe, 0x73, 0x6d, - 0xe9, 0x9f, 0x6f, 0x2c, 0xed, 0xea, 0xc6, 0xd2, 0x7e, 0xdc, 0x58, 0xda, 0xf9, 0x5d, 0x3f, 0xe4, - 0xc1, 0xd2, 0x11, 0xd7, 0xfb, 0x50, 0xac, 0xf1, 0x40, 0xfe, 0x03, 0x64, 0xe8, 0xb2, 0x14, 0x8b, - 0x2f, 0x95, 0xd3, 0x90, 0x9f, 0x93, 0x87, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x67, 0xf0, 0x01, - 0x28, 0xc1, 0x04, 0x00, 0x00, + proto.RegisterEnum("pkg.ReceiveStatus", ReceiveStatus_name, ReceiveStatus_value) + proto.RegisterEnum("pkg.CoinType", CoinType_name, CoinType_value) + proto.RegisterEnum("pkg.ChainName", ChainName_name, ChainName_value) + proto.RegisterType((*PubKeySet)(nil), "pkg.PubKeySet") + proto.RegisterType((*Chain)(nil), "pkg.Chain") + proto.RegisterType((*BlockHeader)(nil), "pkg.BlockHeader") + proto.RegisterType((*HeaderData)(nil), "pkg.HeaderData") + proto.RegisterType((*Proof)(nil), "pkg.Proof") +} + +func init() { proto.RegisterFile("pkg/pkg.proto", fileDescriptor_9a6ed24fa3ed052d) } + +var fileDescriptor_9a6ed24fa3ed052d = []byte{ + // 686 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x94, 0xcb, 0x6e, 0xd3, 0x4c, + 0x14, 0x80, 0xed, 0xdc, 0x7d, 0x72, 0xb3, 0xe6, 0xff, 0x05, 0x6d, 0x91, 0x92, 0x2a, 0x42, 0xa2, + 0x54, 0x6a, 0x4a, 0x83, 0xc2, 0x45, 0xb0, 0x4a, 0xb8, 0x14, 0x21, 0xa1, 0xe2, 0xb0, 0xea, 0x26, + 0x1a, 0xdb, 0x07, 0xdb, 0x4a, 0xec, 0xb1, 0xec, 0x09, 0x52, 0xd8, 0xf1, 0x06, 0x3c, 0x44, 0x17, + 0x3c, 0x01, 0xcf, 0xd0, 0x65, 0x97, 0xac, 0x2a, 0x94, 0xbe, 0x05, 0x2b, 0x34, 0x63, 0x8f, 0x53, + 0x56, 0x39, 0xf3, 0x9d, 0xef, 0x5c, 0x1c, 0x8f, 0x0c, 0xed, 0x78, 0xe1, 0x1d, 0xc7, 0x0b, 0x6f, + 0x18, 0x27, 0x8c, 0x33, 0x52, 0x8e, 0x17, 0xde, 0xde, 0xae, 0x60, 0x76, 0xc0, 0x1d, 0x16, 0x44, + 0xea, 0x37, 0xcb, 0xef, 0xdd, 0x13, 0x29, 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5, 0x83, + 0xe6, 0xa8, 0x2b, 0xb7, 0xcf, 0x96, 0x78, 0x45, 0x39, 0x9d, 0x54, 0x2e, 0xaf, 0xfb, 0x9a, 0x95, + 0x4b, 0x03, 0x1f, 0x60, 0x9b, 0x23, 0x0f, 0xa1, 0xab, 0xde, 0xcc, 0x3c, 0xef, 0x22, 0xb6, 0x6d, + 0x9d, 0x6a, 0x56, 0x47, 0x25, 0xf2, 0xe7, 0x79, 0x00, 0x9d, 0xfc, 0x05, 0x2b, 0xb3, 0x94, 0x9b, + 0xed, 0x9c, 0x67, 0xe2, 0xa4, 0x06, 0x15, 0x97, 0x72, 0x3a, 0xf8, 0xa6, 0x43, 0xf5, 0x2c, 0x61, + 0xec, 0x33, 0x79, 0x06, 0x45, 0xb3, 0x79, 0x2c, 0x88, 0x1c, 0x22, 0x56, 0x2d, 0xae, 0x85, 0x14, + 0x45, 0x2f, 0x45, 0xb2, 0xca, 0x31, 0xa8, 0xe6, 0x79, 0x61, 0x49, 0x16, 0x76, 0x86, 0xea, 0xae, + 0xa9, 0xba, 0x56, 0x0e, 0xe4, 0x79, 0x52, 0x87, 0xaa, 0xd4, 0x0f, 0x5f, 0x40, 0xdb, 0x42, 0x07, + 0x83, 0x2f, 0x38, 0xe3, 0x94, 0xaf, 0x52, 0xd2, 0x84, 0xfa, 0x34, 0x41, 0xca, 0xd1, 0x35, 0x35, + 0x71, 0x98, 0xad, 0x1c, 0x07, 0xd3, 0xd4, 0xd4, 0x09, 0x40, 0xed, 0x0d, 0x0d, 0x96, 0xe8, 0x9a, + 0xa5, 0xbd, 0xca, 0x8f, 0x8b, 0x9e, 0x7e, 0xf8, 0x14, 0x1a, 0x53, 0x16, 0x44, 0x9f, 0xd6, 0x31, + 0x92, 0x06, 0x54, 0xce, 0x91, 0x53, 0x53, 0x23, 0x75, 0x28, 0xbf, 0xa5, 0xa2, 0xc0, 0x80, 0xea, + 0x6b, 0x6b, 0x3a, 0x7a, 0x64, 0x96, 0x04, 0x9b,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91, 0xc7, + 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xb4, 0x18, 0xfd, 0x39, 0xa9, 0x04, 0x00, 0x00, } func (m *PubKeySet) Marshal() (dAtA []byte, err error) { @@ -593,14 +592,14 @@ func (m *PubKeySet) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.Ed25519) > 0 { i -= len(m.Ed25519) copy(dAtA[i:], m.Ed25519) - i = encodeVarintCommon(dAtA, i, uint64(len(m.Ed25519))) + i = encodeVarintPkg(dAtA, i, uint64(len(m.Ed25519))) i-- dAtA[i] = 0x12 } if len(m.Secp256k1) > 0 { i -= len(m.Secp256k1) copy(dAtA[i:], m.Secp256k1) - i = encodeVarintCommon(dAtA, i, uint64(len(m.Secp256k1))) + i = encodeVarintPkg(dAtA, i, uint64(len(m.Secp256k1))) i-- dAtA[i] = 0xa } @@ -628,12 +627,12 @@ func (m *Chain) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l if m.ChainId != 0 { - i = encodeVarintCommon(dAtA, i, uint64(m.ChainId)) + i = encodeVarintPkg(dAtA, i, uint64(m.ChainId)) i-- dAtA[i] = 0x10 } if m.ChainName != 0 { - i = encodeVarintCommon(dAtA, i, uint64(m.ChainName)) + i = encodeVarintPkg(dAtA, i, uint64(m.ChainName)) i-- dAtA[i] = 0x8 } @@ -666,31 +665,31 @@ func (m *BlockHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintCommon(dAtA, i, uint64(size)) + i = encodeVarintPkg(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x2a if m.ChainId != 0 { - i = encodeVarintCommon(dAtA, i, uint64(m.ChainId)) + i = encodeVarintPkg(dAtA, i, uint64(m.ChainId)) i-- dAtA[i] = 0x20 } if len(m.ParentHash) > 0 { i -= len(m.ParentHash) copy(dAtA[i:], m.ParentHash) - i = encodeVarintCommon(dAtA, i, uint64(len(m.ParentHash))) + i = encodeVarintPkg(dAtA, i, uint64(len(m.ParentHash))) i-- dAtA[i] = 0x1a } if len(m.Hash) > 0 { i -= len(m.Hash) copy(dAtA[i:], m.Hash) - i = encodeVarintCommon(dAtA, i, uint64(len(m.Hash))) + i = encodeVarintPkg(dAtA, i, uint64(len(m.Hash))) i-- dAtA[i] = 0x12 } if m.Height != 0 { - i = encodeVarintCommon(dAtA, i, uint64(m.Height)) + i = encodeVarintPkg(dAtA, i, uint64(m.Height)) i-- dAtA[i] = 0x8 } @@ -739,7 +738,7 @@ func (m *HeaderData_EthereumHeader) MarshalToSizedBuffer(dAtA []byte) (int, erro if m.EthereumHeader != nil { i -= len(m.EthereumHeader) copy(dAtA[i:], m.EthereumHeader) - i = encodeVarintCommon(dAtA, i, uint64(len(m.EthereumHeader))) + i = encodeVarintPkg(dAtA, i, uint64(len(m.EthereumHeader))) i-- dAtA[i] = 0xa } @@ -755,7 +754,7 @@ func (m *HeaderData_BitcoinHeader) MarshalToSizedBuffer(dAtA []byte) (int, error if m.BitcoinHeader != nil { i -= len(m.BitcoinHeader) copy(dAtA[i:], m.BitcoinHeader) - i = encodeVarintCommon(dAtA, i, uint64(len(m.BitcoinHeader))) + i = encodeVarintPkg(dAtA, i, uint64(len(m.BitcoinHeader))) i-- dAtA[i] = 0x12 } @@ -807,7 +806,7 @@ func (m *Proof_EthereumProof) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintCommon(dAtA, i, uint64(size)) + i = encodeVarintPkg(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa @@ -828,15 +827,15 @@ func (m *Proof_BitcoinProof) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintCommon(dAtA, i, uint64(size)) + i = encodeVarintPkg(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } return len(dAtA) - i, nil } -func encodeVarintCommon(dAtA []byte, offset int, v uint64) int { - offset -= sovCommon(v) +func encodeVarintPkg(dAtA []byte, offset int, v uint64) int { + offset -= sovPkg(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) @@ -854,11 +853,11 @@ func (m *PubKeySet) Size() (n int) { _ = l l = len(m.Secp256k1) if l > 0 { - n += 1 + l + sovCommon(uint64(l)) + n += 1 + l + sovPkg(uint64(l)) } l = len(m.Ed25519) if l > 0 { - n += 1 + l + sovCommon(uint64(l)) + n += 1 + l + sovPkg(uint64(l)) } return n } @@ -870,10 +869,10 @@ func (m *Chain) Size() (n int) { var l int _ = l if m.ChainName != 0 { - n += 1 + sovCommon(uint64(m.ChainName)) + n += 1 + sovPkg(uint64(m.ChainName)) } if m.ChainId != 0 { - n += 1 + sovCommon(uint64(m.ChainId)) + n += 1 + sovPkg(uint64(m.ChainId)) } return n } @@ -885,21 +884,21 @@ func (m *BlockHeader) Size() (n int) { var l int _ = l if m.Height != 0 { - n += 1 + sovCommon(uint64(m.Height)) + n += 1 + sovPkg(uint64(m.Height)) } l = len(m.Hash) if l > 0 { - n += 1 + l + sovCommon(uint64(l)) + n += 1 + l + sovPkg(uint64(l)) } l = len(m.ParentHash) if l > 0 { - n += 1 + l + sovCommon(uint64(l)) + n += 1 + l + sovPkg(uint64(l)) } if m.ChainId != 0 { - n += 1 + sovCommon(uint64(m.ChainId)) + n += 1 + sovPkg(uint64(m.ChainId)) } l = m.Header.Size() - n += 1 + l + sovCommon(uint64(l)) + n += 1 + l + sovPkg(uint64(l)) return n } @@ -923,7 +922,7 @@ func (m *HeaderData_EthereumHeader) Size() (n int) { _ = l if m.EthereumHeader != nil { l = len(m.EthereumHeader) - n += 1 + l + sovCommon(uint64(l)) + n += 1 + l + sovPkg(uint64(l)) } return n } @@ -935,7 +934,7 @@ func (m *HeaderData_BitcoinHeader) Size() (n int) { _ = l if m.BitcoinHeader != nil { l = len(m.BitcoinHeader) - n += 1 + l + sovCommon(uint64(l)) + n += 1 + l + sovPkg(uint64(l)) } return n } @@ -959,7 +958,7 @@ func (m *Proof_EthereumProof) Size() (n int) { _ = l if m.EthereumProof != nil { l = m.EthereumProof.Size() - n += 1 + l + sovCommon(uint64(l)) + n += 1 + l + sovPkg(uint64(l)) } return n } @@ -971,16 +970,16 @@ func (m *Proof_BitcoinProof) Size() (n int) { _ = l if m.BitcoinProof != nil { l = m.BitcoinProof.Size() - n += 1 + l + sovCommon(uint64(l)) + n += 1 + l + sovPkg(uint64(l)) } return n } -func sovCommon(x uint64) (n int) { +func sovPkg(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } -func sozCommon(x uint64) (n int) { - return sovCommon(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +func sozPkg(x uint64) (n int) { + return sovPkg(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *PubKeySet) Unmarshal(dAtA []byte) error { l := len(dAtA) @@ -990,7 +989,7 @@ func (m *PubKeySet) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCommon + return ErrIntOverflowPkg } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1018,7 +1017,7 @@ func (m *PubKeySet) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCommon + return ErrIntOverflowPkg } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1032,11 +1031,11 @@ func (m *PubKeySet) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthCommon + return ErrInvalidLengthPkg } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthCommon + return ErrInvalidLengthPkg } if postIndex > l { return io.ErrUnexpectedEOF @@ -1050,7 +1049,7 @@ func (m *PubKeySet) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCommon + return ErrIntOverflowPkg } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1064,11 +1063,11 @@ func (m *PubKeySet) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthCommon + return ErrInvalidLengthPkg } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthCommon + return ErrInvalidLengthPkg } if postIndex > l { return io.ErrUnexpectedEOF @@ -1077,12 +1076,12 @@ func (m *PubKeySet) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipCommon(dAtA[iNdEx:]) + skippy, err := skipPkg(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommon + return ErrInvalidLengthPkg } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1104,7 +1103,7 @@ func (m *Chain) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCommon + return ErrIntOverflowPkg } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1132,7 +1131,7 @@ func (m *Chain) Unmarshal(dAtA []byte) error { m.ChainName = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCommon + return ErrIntOverflowPkg } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1151,7 +1150,7 @@ func (m *Chain) Unmarshal(dAtA []byte) error { m.ChainId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCommon + return ErrIntOverflowPkg } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1165,12 +1164,12 @@ func (m *Chain) Unmarshal(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skipCommon(dAtA[iNdEx:]) + skippy, err := skipPkg(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommon + return ErrInvalidLengthPkg } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1192,7 +1191,7 @@ func (m *BlockHeader) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCommon + return ErrIntOverflowPkg } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1220,7 +1219,7 @@ func (m *BlockHeader) Unmarshal(dAtA []byte) error { m.Height = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCommon + return ErrIntOverflowPkg } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1239,7 +1238,7 @@ func (m *BlockHeader) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCommon + return ErrIntOverflowPkg } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1252,11 +1251,11 @@ func (m *BlockHeader) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthCommon + return ErrInvalidLengthPkg } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthCommon + return ErrInvalidLengthPkg } if postIndex > l { return io.ErrUnexpectedEOF @@ -1273,7 +1272,7 @@ func (m *BlockHeader) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCommon + return ErrIntOverflowPkg } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1286,11 +1285,11 @@ func (m *BlockHeader) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthCommon + return ErrInvalidLengthPkg } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthCommon + return ErrInvalidLengthPkg } if postIndex > l { return io.ErrUnexpectedEOF @@ -1307,7 +1306,7 @@ func (m *BlockHeader) Unmarshal(dAtA []byte) error { m.ChainId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCommon + return ErrIntOverflowPkg } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1326,7 +1325,7 @@ func (m *BlockHeader) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCommon + return ErrIntOverflowPkg } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1339,11 +1338,11 @@ func (m *BlockHeader) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthCommon + return ErrInvalidLengthPkg } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthCommon + return ErrInvalidLengthPkg } if postIndex > l { return io.ErrUnexpectedEOF @@ -1354,12 +1353,12 @@ func (m *BlockHeader) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipCommon(dAtA[iNdEx:]) + skippy, err := skipPkg(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommon + return ErrInvalidLengthPkg } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1381,7 +1380,7 @@ func (m *HeaderData) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCommon + return ErrIntOverflowPkg } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1409,7 +1408,7 @@ func (m *HeaderData) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCommon + return ErrIntOverflowPkg } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1422,11 +1421,11 @@ func (m *HeaderData) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthCommon + return ErrInvalidLengthPkg } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthCommon + return ErrInvalidLengthPkg } if postIndex > l { return io.ErrUnexpectedEOF @@ -1442,7 +1441,7 @@ func (m *HeaderData) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCommon + return ErrIntOverflowPkg } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1455,11 +1454,11 @@ func (m *HeaderData) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthCommon + return ErrInvalidLengthPkg } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthCommon + return ErrInvalidLengthPkg } if postIndex > l { return io.ErrUnexpectedEOF @@ -1470,12 +1469,12 @@ func (m *HeaderData) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipCommon(dAtA[iNdEx:]) + skippy, err := skipPkg(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommon + return ErrInvalidLengthPkg } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1497,7 +1496,7 @@ func (m *Proof) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCommon + return ErrIntOverflowPkg } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1525,7 +1524,7 @@ func (m *Proof) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCommon + return ErrIntOverflowPkg } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1538,11 +1537,11 @@ func (m *Proof) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthCommon + return ErrInvalidLengthPkg } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthCommon + return ErrInvalidLengthPkg } if postIndex > l { return io.ErrUnexpectedEOF @@ -1560,7 +1559,7 @@ func (m *Proof) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCommon + return ErrIntOverflowPkg } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1573,11 +1572,11 @@ func (m *Proof) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthCommon + return ErrInvalidLengthPkg } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthCommon + return ErrInvalidLengthPkg } if postIndex > l { return io.ErrUnexpectedEOF @@ -1590,12 +1589,12 @@ func (m *Proof) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipCommon(dAtA[iNdEx:]) + skippy, err := skipPkg(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommon + return ErrInvalidLengthPkg } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1609,7 +1608,7 @@ func (m *Proof) Unmarshal(dAtA []byte) error { } return nil } -func skipCommon(dAtA []byte) (n int, err error) { +func skipPkg(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 depth := 0 @@ -1617,7 +1616,7 @@ func skipCommon(dAtA []byte) (n int, err error) { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowCommon + return 0, ErrIntOverflowPkg } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -1634,7 +1633,7 @@ func skipCommon(dAtA []byte) (n int, err error) { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowCommon + return 0, ErrIntOverflowPkg } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -1650,7 +1649,7 @@ func skipCommon(dAtA []byte) (n int, err error) { var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowCommon + return 0, ErrIntOverflowPkg } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -1663,14 +1662,14 @@ func skipCommon(dAtA []byte) (n int, err error) { } } if length < 0 { - return 0, ErrInvalidLengthCommon + return 0, ErrInvalidLengthPkg } iNdEx += length case 3: depth++ case 4: if depth == 0 { - return 0, ErrUnexpectedEndOfGroupCommon + return 0, ErrUnexpectedEndOfGroupPkg } depth-- case 5: @@ -1679,7 +1678,7 @@ func skipCommon(dAtA []byte) (n int, err error) { return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { - return 0, ErrInvalidLengthCommon + return 0, ErrInvalidLengthPkg } if depth == 0 { return iNdEx, nil @@ -1689,7 +1688,7 @@ func skipCommon(dAtA []byte) (n int, err error) { } var ( - ErrInvalidLengthCommon = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCommon = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupCommon = fmt.Errorf("proto: unexpected end of group") + ErrInvalidLengthPkg = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowPkg = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupPkg = fmt.Errorf("proto: unexpected end of group") ) diff --git a/proto/crosschain/cross_chain_tx.proto b/proto/crosschain/cross_chain_tx.proto index 28aeab85db..88c1f525c6 100644 --- a/proto/crosschain/cross_chain_tx.proto +++ b/proto/crosschain/cross_chain_tx.proto @@ -1,8 +1,8 @@ syntax = "proto3"; package zetachain.zetacore.crosschain; -import "common/common.proto"; import "gogoproto/gogo.proto"; +import "pkg/pkg.proto"; option go_package = "github.com/zeta-chain/zetacore/x/crosschain/types"; @@ -26,7 +26,7 @@ message InboundTxParams { string sender = 1; // this address is the immediate contract/EOA that calls the Connector.send() int64 sender_chain_id = 2; string tx_origin = 3; // this address is the EOA that signs the inbound tx - common.CoinType coin_type = 4; + pkg.CoinType coin_type = 4; string asset = 5; // for ERC20 coin type, the asset is an address of the ERC20 contract string amount = 6 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", @@ -50,7 +50,7 @@ message ZetaAccounting { message OutboundTxParams { string receiver = 1; int64 receiver_chainId = 2; - common.CoinType coin_type = 3; + pkg.CoinType coin_type = 3; string amount = 4 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", (gogoproto.nullable) = false diff --git a/proto/crosschain/events.proto b/proto/crosschain/events.proto index 6497fd147e..05dff47ebe 100644 --- a/proto/crosschain/events.proto +++ b/proto/crosschain/events.proto @@ -1,8 +1,8 @@ syntax = "proto3"; package zetachain.zetacore.crosschain; -import "common/common.proto"; import "gogoproto/gogo.proto"; +import "pkg/pkg.proto"; option go_package = "github.com/zeta-chain/zetacore/x/crosschain/types"; diff --git a/proto/crosschain/in_tx_tracker.proto b/proto/crosschain/in_tx_tracker.proto index e0775f7e0c..09c098888a 100644 --- a/proto/crosschain/in_tx_tracker.proto +++ b/proto/crosschain/in_tx_tracker.proto @@ -1,12 +1,12 @@ syntax = "proto3"; package zetachain.zetacore.crosschain; -import "common/common.proto"; +import "pkg/pkg.proto"; option go_package = "github.com/zeta-chain/zetacore/x/crosschain/types"; message InTxTracker { int64 chain_id = 1; string tx_hash = 2; - common.CoinType coin_type = 3; + pkg.CoinType coin_type = 3; } diff --git a/proto/crosschain/tx.proto b/proto/crosschain/tx.proto index 5cee0f1f21..c697ad6f10 100644 --- a/proto/crosschain/tx.proto +++ b/proto/crosschain/tx.proto @@ -1,8 +1,8 @@ syntax = "proto3"; package zetachain.zetacore.crosschain; -import "common/common.proto"; import "gogoproto/gogo.proto"; +import "pkg/pkg.proto"; option go_package = "github.com/zeta-chain/zetacore/x/crosschain/types"; @@ -28,7 +28,7 @@ message MsgCreateTSSVoter { string creator = 1; string tss_pubkey = 2; int64 keyGenZetaHeight = 3; - common.ReceiveStatus status = 4; + pkg.ReceiveStatus status = 4; } message MsgCreateTSSVoterResponse {} @@ -54,8 +54,8 @@ message MsgAddToInTxTracker { string creator = 1; int64 chain_id = 2; string tx_hash = 3; - common.CoinType coin_type = 4; - common.Proof proof = 5; + pkg.CoinType coin_type = 4; + pkg.Proof proof = 5; string block_hash = 6; int64 tx_index = 7; } @@ -81,7 +81,7 @@ message MsgAddToOutTxTracker { int64 chain_id = 2; uint64 nonce = 3; string tx_hash = 4; - common.Proof proof = 5; + pkg.Proof proof = 5; string block_hash = 6; int64 tx_index = 7; } @@ -124,10 +124,10 @@ message MsgVoteOnObservedOutboundTx { (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"value_received\"" ]; - common.ReceiveStatus status = 6; + pkg.ReceiveStatus status = 6; int64 outTx_chain = 7; uint64 outTx_tss_nonce = 8; - common.CoinType coin_type = 9; + pkg.CoinType coin_type = 9; } message MsgVoteOnObservedOutboundTxResponse {} @@ -148,7 +148,7 @@ message MsgVoteOnObservedInboundTx { string in_tx_hash = 9; uint64 in_block_height = 10; uint64 gas_limit = 11; - common.CoinType coin_type = 12; + pkg.CoinType coin_type = 12; string tx_origin = 13; string asset = 14; // event index of the sent asset in the observed tx diff --git a/proto/fungible/events.proto b/proto/fungible/events.proto index 06e7af005f..7751c8f9a0 100644 --- a/proto/fungible/events.proto +++ b/proto/fungible/events.proto @@ -1,9 +1,9 @@ syntax = "proto3"; package zetachain.zetacore.fungible; -import "common/common.proto"; import "fungible/tx.proto"; import "gogoproto/gogo.proto"; +import "pkg/pkg.proto"; option go_package = "github.com/zeta-chain/zetacore/x/fungible/types"; @@ -21,7 +21,7 @@ message EventZRC20Deployed { string name = 4; string symbol = 5; int64 decimals = 6; - common.CoinType coin_type = 7; + pkg.CoinType coin_type = 7; string erc20 = 8; int64 gas_limit = 9; } @@ -29,7 +29,7 @@ message EventZRC20Deployed { message EventZRC20WithdrawFeeUpdated { string msg_type_url = 1; int64 chain_id = 2; - common.CoinType coin_type = 3; + pkg.CoinType coin_type = 3; string zrc20_address = 4; string old_withdraw_fee = 5; string new_withdraw_fee = 6; diff --git a/proto/fungible/foreign_coins.proto b/proto/fungible/foreign_coins.proto index 81d52f0220..d20cad9284 100644 --- a/proto/fungible/foreign_coins.proto +++ b/proto/fungible/foreign_coins.proto @@ -1,8 +1,8 @@ syntax = "proto3"; package zetachain.zetacore.fungible; -import "common/common.proto"; import "gogoproto/gogo.proto"; +import "pkg/pkg.proto"; option go_package = "github.com/zeta-chain/zetacore/x/fungible/types"; @@ -14,7 +14,7 @@ message ForeignCoins { uint32 decimals = 5; string name = 6; string symbol = 7; - common.CoinType coin_type = 8; + pkg.CoinType coin_type = 8; uint64 gas_limit = 9; bool paused = 10; string liquidity_cap = 11 [ diff --git a/proto/fungible/tx.proto b/proto/fungible/tx.proto index e6599a55b9..3f9e6e6cf2 100644 --- a/proto/fungible/tx.proto +++ b/proto/fungible/tx.proto @@ -1,8 +1,8 @@ syntax = "proto3"; package zetachain.zetacore.fungible; -import "common/common.proto"; import "gogoproto/gogo.proto"; +import "pkg/pkg.proto"; option go_package = "github.com/zeta-chain/zetacore/x/fungible/types"; @@ -59,7 +59,7 @@ message MsgDeployFungibleCoinZRC20 { uint32 decimals = 4; string name = 5; string symbol = 6; - common.CoinType coin_type = 7; + pkg.CoinType coin_type = 7; int64 gas_limit = 8; } diff --git a/proto/observer/chain_nonces.proto b/proto/observer/chain_nonces.proto index 2ca53ac4cb..159b51d367 100644 --- a/proto/observer/chain_nonces.proto +++ b/proto/observer/chain_nonces.proto @@ -1,8 +1,8 @@ syntax = "proto3"; package zetachain.zetacore.observer; -import "common/common.proto"; import "gogoproto/gogo.proto"; +import "pkg/pkg.proto"; option go_package = "github.com/zeta-chain/zetacore/x/observer/types"; diff --git a/proto/observer/node_account.proto b/proto/observer/node_account.proto index 83e3014aea..d0556c25cb 100644 --- a/proto/observer/node_account.proto +++ b/proto/observer/node_account.proto @@ -1,8 +1,8 @@ syntax = "proto3"; package zetachain.zetacore.observer; -import "common/common.proto"; import "gogoproto/gogo.proto"; +import "pkg/pkg.proto"; option go_package = "github.com/zeta-chain/zetacore/x/observer/types"; @@ -19,6 +19,6 @@ enum NodeStatus { message NodeAccount { string operator = 1; string granteeAddress = 2; - common.PubKeySet granteePubkey = 3; + pkg.PubKeySet granteePubkey = 3; NodeStatus nodeStatus = 4; } diff --git a/proto/observer/nonce_to_cctx.proto b/proto/observer/nonce_to_cctx.proto index 0c26d3b34c..bd383b7d5b 100644 --- a/proto/observer/nonce_to_cctx.proto +++ b/proto/observer/nonce_to_cctx.proto @@ -1,8 +1,8 @@ syntax = "proto3"; package zetachain.zetacore.observer; -import "common/common.proto"; import "gogoproto/gogo.proto"; +import "pkg/pkg.proto"; option go_package = "github.com/zeta-chain/zetacore/x/observer/types"; diff --git a/proto/observer/observer.proto b/proto/observer/observer.proto index 2c3cf0b931..0f85902220 100644 --- a/proto/observer/observer.proto +++ b/proto/observer/observer.proto @@ -1,8 +1,8 @@ syntax = "proto3"; package zetachain.zetacore.observer; -import "common/common.proto"; import "gogoproto/gogo.proto"; +import "pkg/pkg.proto"; option go_package = "github.com/zeta-chain/zetacore/x/observer/types"; @@ -24,7 +24,7 @@ enum ObserverUpdateReason { message ObserverMapper { string index = 1; - common.Chain observer_chain = 2; + pkg.Chain observer_chain = 2; repeated string observer_list = 4; } diff --git a/proto/observer/params.proto b/proto/observer/params.proto index 271710ca33..11cd1d6ae3 100644 --- a/proto/observer/params.proto +++ b/proto/observer/params.proto @@ -1,9 +1,9 @@ syntax = "proto3"; package zetachain.zetacore.observer; -import "common/common.proto"; import "gogoproto/gogo.proto"; import "observer/observer.proto"; +import "pkg/pkg.proto"; option go_package = "github.com/zeta-chain/zetacore/x/observer/types"; @@ -36,7 +36,7 @@ message ChainParams { // Deprecated(v13): Use ChainParamsList message ObserverParams { - common.Chain chain = 1; + pkg.Chain chain = 1; string ballot_threshold = 3 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false diff --git a/proto/observer/pending_nonces.proto b/proto/observer/pending_nonces.proto index d3aee10cf1..971c9a245d 100644 --- a/proto/observer/pending_nonces.proto +++ b/proto/observer/pending_nonces.proto @@ -1,8 +1,8 @@ syntax = "proto3"; package zetachain.zetacore.observer; -import "common/common.proto"; import "gogoproto/gogo.proto"; +import "pkg/pkg.proto"; option go_package = "github.com/zeta-chain/zetacore/x/observer/types"; diff --git a/proto/observer/query.proto b/proto/observer/query.proto index 0ef0914d74..57bf20400b 100644 --- a/proto/observer/query.proto +++ b/proto/observer/query.proto @@ -1,7 +1,6 @@ syntax = "proto3"; package zetachain.zetacore.observer; -import "common/common.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; @@ -16,6 +15,7 @@ import "observer/observer.proto"; import "observer/params.proto"; import "observer/pending_nonces.proto"; import "observer/tss.proto"; +import "pkg/pkg.proto"; option go_package = "github.com/zeta-chain/zetacore/x/observer/types"; @@ -217,7 +217,7 @@ message QueryTssHistoryResponse { message QueryProveRequest { int64 chain_id = 1; string tx_hash = 2; - common.Proof proof = 3; + pkg.Proof proof = 3; string block_hash = 4; int64 tx_index = 5; } @@ -267,7 +267,7 @@ message QueryObserverSetResponse { message QuerySupportedChains {} message QuerySupportedChainsResponse { - repeated common.Chain chains = 1; + repeated pkg.Chain chains = 1; } message QueryGetChainParamsForChainRequest { @@ -350,7 +350,7 @@ message QueryAllBlockHeaderRequest { } message QueryAllBlockHeaderResponse { - repeated common.BlockHeader block_headers = 1; + repeated pkg.BlockHeader block_headers = 1; cosmos.base.query.v1beta1.PageResponse pagination = 2; } @@ -359,7 +359,7 @@ message QueryGetBlockHeaderByHashRequest { } message QueryGetBlockHeaderByHashResponse { - common.BlockHeader block_header = 1; + pkg.BlockHeader block_header = 1; } message QueryGetBlockHeaderStateRequest { diff --git a/proto/observer/tx.proto b/proto/observer/tx.proto index b67e8e0741..26cff83ca0 100644 --- a/proto/observer/tx.proto +++ b/proto/observer/tx.proto @@ -1,7 +1,6 @@ syntax = "proto3"; package zetachain.zetacore.observer; -import "common/common.proto"; import "gogoproto/gogo.proto"; import "observer/blame.proto"; import "observer/crosschain_flags.proto"; @@ -9,6 +8,7 @@ import "observer/observer.proto"; import "observer/params.proto"; import "observer/pending_nonces.proto"; import "observer/tss.proto"; +import "pkg/pkg.proto"; option go_package = "github.com/zeta-chain/zetacore/x/observer/types"; @@ -37,7 +37,7 @@ message MsgAddBlockHeader { int64 chain_id = 2; bytes block_hash = 3; int64 height = 4; - common.HeaderData header = 5 [(gogoproto.nullable) = false]; + pkg.HeaderData header = 5 [(gogoproto.nullable) = false]; } message MsgAddBlockHeaderResponse {} diff --git a/proto/common/bitcoin/bitcoin.proto b/proto/pkg/bitcoin/bitcoin.proto similarity index 62% rename from proto/common/bitcoin/bitcoin.proto rename to proto/pkg/bitcoin/bitcoin.proto index dc1df2fa42..55a4498e0d 100644 --- a/proto/common/bitcoin/bitcoin.proto +++ b/proto/pkg/bitcoin/bitcoin.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package bitcoin; -option go_package = "github.com/zeta-chain/zetacore/common/bitcoin"; +option go_package = "github.com/zeta-chain/zetacore/pkg/bitcoin"; message Proof { bytes tx_bytes = 1; diff --git a/proto/common/ethereum/ethereum.proto b/proto/pkg/ethereum/ethereum.proto similarity index 61% rename from proto/common/ethereum/ethereum.proto rename to proto/pkg/ethereum/ethereum.proto index 92d3813035..e1150bdcee 100644 --- a/proto/common/ethereum/ethereum.proto +++ b/proto/pkg/ethereum/ethereum.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package ethereum; -option go_package = "github.com/zeta-chain/zetacore/common/ethereum"; +option go_package = "github.com/zeta-chain/zetacore/pkg/ethereum"; message Proof { repeated bytes keys = 1; diff --git a/proto/common/common.proto b/proto/pkg/pkg.proto similarity index 92% rename from proto/common/common.proto rename to proto/pkg/pkg.proto index a3dc8ad69e..a666ba2bb8 100644 --- a/proto/common/common.proto +++ b/proto/pkg/pkg.proto @@ -1,14 +1,14 @@ syntax = "proto3"; -package common; +package pkg; -import "common/bitcoin/bitcoin.proto"; -import "common/ethereum/ethereum.proto"; //option (gogoproto.goproto_stringer_all) = false; //option (gogoproto.stringer_all) = false; //option (gogoproto.goproto_getters_all) = false; import "gogoproto/gogo.proto"; +import "pkg/bitcoin/bitcoin.proto"; +import "pkg/ethereum/ethereum.proto"; -option go_package = "github.com/zeta-chain/zetacore/common"; +option go_package = "github.com/zeta-chain/zetacore/pkg"; // PubKeySet contains two pub keys , secp256k1 and ed25519 message PubKeySet { diff --git a/x/crosschain/types/cross_chain_tx.pb.go b/x/crosschain/types/cross_chain_tx.pb.go index 94f34e6e46..e3e762f818 100644 --- a/x/crosschain/types/cross_chain_tx.pb.go +++ b/x/crosschain/types/cross_chain_tx.pb.go @@ -12,7 +12,7 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - common "github.com/zeta-chain/zetacore/common" + pkg "github.com/zeta-chain/zetacore/pkg" ) // Reference imports to suppress errors if they are not otherwise used. @@ -95,7 +95,7 @@ type InboundTxParams struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` SenderChainId int64 `protobuf:"varint,2,opt,name=sender_chain_id,json=senderChainId,proto3" json:"sender_chain_id,omitempty"` TxOrigin string `protobuf:"bytes,3,opt,name=tx_origin,json=txOrigin,proto3" json:"tx_origin,omitempty"` - CoinType common.CoinType `protobuf:"varint,4,opt,name=coin_type,json=coinType,proto3,enum=common.CoinType" json:"coin_type,omitempty"` + CoinType pkg.CoinType `protobuf:"varint,4,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` Asset string `protobuf:"bytes,5,opt,name=asset,proto3" json:"asset,omitempty"` Amount github_com_cosmos_cosmos_sdk_types.Uint `protobuf:"bytes,6,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Uint" json:"amount"` InboundTxObservedHash string `protobuf:"bytes,7,opt,name=inbound_tx_observed_hash,json=inboundTxObservedHash,proto3" json:"inbound_tx_observed_hash,omitempty"` @@ -159,11 +159,11 @@ func (m *InboundTxParams) GetTxOrigin() string { return "" } -func (m *InboundTxParams) GetCoinType() common.CoinType { +func (m *InboundTxParams) GetCoinType() pkg.CoinType { if m != nil { return m.CoinType } - return common.CoinType_Zeta + return pkg.CoinType_Zeta } func (m *InboundTxParams) GetAsset() string { @@ -249,7 +249,7 @@ var xxx_messageInfo_ZetaAccounting proto.InternalMessageInfo type OutboundTxParams struct { Receiver string `protobuf:"bytes,1,opt,name=receiver,proto3" json:"receiver,omitempty"` ReceiverChainId int64 `protobuf:"varint,2,opt,name=receiver_chainId,json=receiverChainId,proto3" json:"receiver_chainId,omitempty"` - CoinType common.CoinType `protobuf:"varint,3,opt,name=coin_type,json=coinType,proto3,enum=common.CoinType" json:"coin_type,omitempty"` + CoinType pkg.CoinType `protobuf:"varint,3,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` Amount github_com_cosmos_cosmos_sdk_types.Uint `protobuf:"bytes,4,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Uint" json:"amount"` OutboundTxTssNonce uint64 `protobuf:"varint,5,opt,name=outbound_tx_tss_nonce,json=outboundTxTssNonce,proto3" json:"outbound_tx_tss_nonce,omitempty"` OutboundTxGasLimit uint64 `protobuf:"varint,6,opt,name=outbound_tx_gas_limit,json=outboundTxGasLimit,proto3" json:"outbound_tx_gas_limit,omitempty"` @@ -313,11 +313,11 @@ func (m *OutboundTxParams) GetReceiverChainId() int64 { return 0 } -func (m *OutboundTxParams) GetCoinType() common.CoinType { +func (m *OutboundTxParams) GetCoinType() pkg.CoinType { if m != nil { return m.CoinType } - return common.CoinType_Zeta + return pkg.CoinType_Zeta } func (m *OutboundTxParams) GetOutboundTxTssNonce() uint64 { @@ -556,77 +556,78 @@ func init() { func init() { proto.RegisterFile("crosschain/cross_chain_tx.proto", fileDescriptor_af3a0ad055343c21) } var fileDescriptor_af3a0ad055343c21 = []byte{ - // 1120 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcd, 0x6e, 0x1b, 0x37, - 0x10, 0xd6, 0x46, 0x8a, 0x2c, 0x8d, 0x6c, 0x6b, 0x4d, 0xcb, 0xe9, 0xc2, 0x69, 0x24, 0x41, 0x6d, - 0x12, 0x25, 0x80, 0x25, 0xd8, 0x41, 0x11, 0xa0, 0x37, 0xdb, 0xb5, 0x13, 0x23, 0x89, 0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b, 0x4d, 0x79, 0x9e, 0x7e, - 0x0b, 0x30, 0x11, 0x1a, 0x42, 0x30, 0xbf, 0x4f, 0xc2, 0x80, 0x86, 0x5d, 0x93, 0x97, 0x9d, 0x41, - 0x8b, 0x50, 0x36, 0xbe, 0x98, 0xce, 0xb6, 0xd0, 0x02, 0xcc, 0xc5, 0xa3, 0x37, 0x34, 0x24, 0x81, - 0x9d, 0x95, 0x2e, 0xb3, 0xce, 0x25, 0x27, 0x24, 0x12, 0x76, 0x0e, 0xcd, 0x42, 0x41, 0xdb, 0x24, - 0xb0, 0xef, 0xa2, 0x12, 0xcc, 0xac, 0xeb, 0x77, 0xcb, 0xce, 0x2f, 0xe7, 0x7e, 0xfc, 0xa1, 0x6a, - 0x3d, 0x7d, 0x05, 0x95, 0xab, 0x9a, 0x09, 0xd9, 0x30, 0xbb, 0xcb, 0x44, 0xf2, 0x8a, 0xdb, 0x19, - 0x34, 0x07, 0xc5, 0xc9, 0xd0, 0x92, 0xcc, 0x5b, 0x63, 0xe2, 0x8f, 0x24, 0xd9, 0x1d, 0x4d, 0xb6, - 0xf1, 0xea, 0xfd, 0x79, 0xd5, 0xfa, 0x70, 0x5e, 0xb5, 0x7e, 0x3b, 0xaf, 0x5a, 0xdf, 0x5d, 0x54, - 0x33, 0x1f, 0x2e, 0xaa, 0x99, 0x5f, 0x2e, 0xaa, 0x99, 0xa3, 0xd5, 0x94, 0xae, 0xe4, 0x39, 0xad, - 0xe8, 0xbf, 0xce, 0xf8, 0xc8, 0xda, 0xe3, 0x76, 0xea, 0x5f, 0x54, 0xc9, 0xac, 0x93, 0x57, 0x7f, - 0x8e, 0xcf, 0xfe, 0x0c, 0x00, 0x00, 0xff, 0xff, 0x13, 0xc7, 0x24, 0x8d, 0xa6, 0x0a, 0x00, 0x00, + // 1121 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xdd, 0x4e, 0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 0x00, 0x00, 0x00, 0xff, 0xff, 0x7c, 0x9f, 0x2f, 0x32, 0x9a, 0x0a, 0x00, + 0x00, } func (m *InboundTxParams) Marshal() (dAtA []byte, err error) { @@ -1337,7 +1338,7 @@ func (m *InboundTxParams) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CoinType |= common.CoinType(b&0x7F) << shift + m.CoinType |= pkg.CoinType(b&0x7F) << shift if b < 0x80 { break } @@ -1728,7 +1729,7 @@ func (m *OutboundTxParams) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CoinType |= common.CoinType(b&0x7F) << shift + m.CoinType |= pkg.CoinType(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/crosschain/types/events.pb.go b/x/crosschain/types/events.pb.go index 68c05a18f0..226122121c 100644 --- a/x/crosschain/types/events.pb.go +++ b/x/crosschain/types/events.pb.go @@ -11,7 +11,7 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - _ "github.com/zeta-chain/zetacore/common" + _ "github.com/zeta-chain/zetacore/pkg" ) // Reference imports to suppress errors if they are not otherwise used. @@ -581,48 +581,48 @@ func init() { func init() { proto.RegisterFile("crosschain/events.proto", fileDescriptor_7398db8b12b87b9e) } var fileDescriptor_7398db8b12b87b9e = []byte{ - // 654 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x95, 0xcf, 0x6e, 0x13, 0x3b, - 0x14, 0xc6, 0x3b, 0x6d, 0x92, 0x26, 0x6e, 0x9b, 0x5e, 0xcd, 0xed, 0xbd, 0xf5, 0x8d, 0x6e, 0xa3, - 0x52, 0x89, 0x3f, 0x0b, 0x48, 0x84, 0x78, 0x83, 0x46, 0x94, 0x56, 0x08, 0x15, 0xb5, 0x45, 0xa0, - 0x6e, 0x2c, 0xc7, 0x73, 0x98, 0xb1, 0x98, 0xb1, 0x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 0x7f, 0xe6, 0xd3, 0x45, 0x7f, - 0xe6, 0xf0, 0x7e, 0xcc, 0x4d, 0x92, 0x8f, 0x07, 0x4c, 0x66, 0x43, 0x3b, 0x31, 0xee, 0xf9, 0xa1, - 0x52, 0x0d, 0x8f, 0x61, 0x31, 0xbc, 0x32, 0x6a, 0xac, 0xf5, 0x7a, 0xdc, 0x72, 0x03, 0xe2, 0xc1, - 0x97, 0x00, 0x00, 0x00, 0xff, 0xff, 0x45, 0x66, 0xf0, 0x4d, 0x85, 0x06, 0x00, 0x00, + // 651 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x95, 0xdf, 0x4e, 0x13, 0x4f, + 0x14, 0xc7, 0x59, 0x68, 0x4b, 0x3b, 0xd0, 0xf2, 0xcb, 0x86, 0x9f, 0x8c, 0x8d, 0x34, 0x48, 0xe2, + 0x9f, 0x0b, 0x6d, 0x63, 0x7c, 0x03, 0x1a, 0x11, 0x62, 0x0c, 0x06, 0x30, 0x1a, 0x6e, 0x26, 0xd3, + 0xdd, 0xe3, 0xec, 0x84, 0xed, 0x4c, 0x33, 0x33, 0x0b, 0x0b, 0x4f, 0x61, 0x7c, 0x0f, 0x13, 0x1f, + 0xc0, 0x07, 0xf0, 0x92, 0x0b, 0x2f, 0xbc, 0x34, 0xf0, 0x22, 0x66, 0x66, 0x76, 0x85, 0x2e, 0x46, + 0x2f, 0x8c, 0x26, 0xde, 0xcd, 0xf9, 0x9e, 0xb3, 0xa7, 0x9f, 0xf9, 0x9e, 0xed, 0x1e, 0xb4, 0x12, + 0x29, 0xa9, 0x75, 0x94, 0x50, 0x2e, 0x06, 0x70, 0x04, 0xc2, 0xe8, 0xfe, 0x44, 0x49, 0x23, 0xc3, + 0xd5, 0x53, 0x30, 0xd4, 0xe9, 0x7d, 0x77, 0x92, 0x0a, 0xfa, 0x97, 0xb5, 0xdd, 0xf6, 0xe4, 0x90, +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9a, 0xab, 0xf6, 0x83, 0x97, 0xf8, + 0x88, 0xa6, 0x19, 0x90, 0x62, 0x30, 0x71, 0x81, 0xde, 0x76, 0xea, 0x6e, 0x21, 0x5e, 0xc7, 0xdf, + 0xcb, 0xa2, 0x08, 0xb4, 0xfe, 0x47, 0xf0, 0xdf, 0x05, 0xa8, 0xeb, 0xf0, 0x87, 0xc3, 0xfd, 0xd7, + 0x4f, 0xa9, 0x7e, 0xa1, 0x78, 0x04, 0xdb, 0x22, 0x52, 0x40, 0x35, 0xc4, 0x15, 0xc4, 0xa0, 0x8a, + 0xf8, 0x00, 0x85, 0x8c, 0x6a, 0x32, 0xb1, 0x0f, 0x11, 0x5e, 0x3c, 0x55, 0xdc, 0xe4, 0x3f, 0x56, + 0xe9, 0x66, 0x3f, 0x2f, 0x34, 0x8e, 0xb9, 0xe1, 0x52, 0xd0, 0x94, 0xbc, 0x01, 0x28, 0x6f, 0xd5, + 0xb9, 0x94, 0x37, 0x01, 0xf4, 0xc6, 0xb3, 0x4f, 0xe7, 0xbd, 0xe0, 0xec, 0xbc, 0x17, 0x7c, 0x3d, + 0xef, 0x05, 0x6f, 0x2f, 0x7a, 0x33, 0x67, 0x17, 0xbd, 0x99, 0x2f, 0x17, 0xbd, 0x99, 0x83, 0x47, + 0x8c, 0x9b, 0x24, 0x1b, 0xf5, 0x23, 0x39, 0x1e, 0xd8, 0x5d, 0xf1, 0xd0, 0xaf, 0x93, 0x72, 0x6d, + 0x0c, 0xf2, 0xc1, 0x95, 0x25, 0x63, 0xad, 0xd7, 0xa3, 0x86, 0x5b, 0x10, 0x8f, 0xbf, 0x05, 0x00, + 0x00, 0xff, 0xff, 0xdd, 0x79, 0x30, 0xda, 0x7f, 0x06, 0x00, 0x00, } func (m *EventInboundFinalized) Marshal() (dAtA []byte, err error) { diff --git a/x/crosschain/types/in_tx_tracker.pb.go b/x/crosschain/types/in_tx_tracker.pb.go index 75074880b6..e0932d86de 100644 --- a/x/crosschain/types/in_tx_tracker.pb.go +++ b/x/crosschain/types/in_tx_tracker.pb.go @@ -10,7 +10,7 @@ import ( math_bits "math/bits" proto "github.com/gogo/protobuf/proto" - common "github.com/zeta-chain/zetacore/common" + pkg "github.com/zeta-chain/zetacore/pkg" ) // Reference imports to suppress errors if they are not otherwise used. @@ -25,9 +25,9 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type InTxTracker struct { - ChainId int64 `protobuf:"varint,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - TxHash string `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` - CoinType common.CoinType `protobuf:"varint,3,opt,name=coin_type,json=coinType,proto3,enum=common.CoinType" json:"coin_type,omitempty"` + ChainId int64 `protobuf:"varint,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + TxHash string `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + CoinType pkg.CoinType `protobuf:"varint,3,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` } func (m *InTxTracker) Reset() { *m = InTxTracker{} } @@ -77,11 +77,11 @@ func (m *InTxTracker) GetTxHash() string { return "" } -func (m *InTxTracker) GetCoinType() common.CoinType { +func (m *InTxTracker) GetCoinType() pkg.CoinType { if m != nil { return m.CoinType } - return common.CoinType_Zeta + return pkg.CoinType_Zeta } func init() { @@ -91,22 +91,22 @@ func init() { func init() { proto.RegisterFile("crosschain/in_tx_tracker.proto", fileDescriptor_799b411f065af0ce) } var fileDescriptor_799b411f065af0ce = []byte{ - // 237 bytes of a gzipped FileDescriptorProto + // 238 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0x2e, 0xca, 0x2f, 0x2e, 0x4e, 0xce, 0x48, 0xcc, 0xcc, 0xd3, 0xcf, 0xcc, 0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6, 0x17, 0xfd, 0x0a, 0x7d, 0xa4, 0x00, 0x00, 0xd9, 0x56, 0x9c, 0xc4, 0x06, 0xf6, 0x85, 0x31, - 0x20, 0x00, 0x00, 0xff, 0xff, 0x60, 0xe9, 0x97, 0x6f, 0x1b, 0x01, 0x00, 0x00, + 0x04, 0x4b, 0xeb, 0x81, 0x59, 0xf9, 0x45, 0xa9, 0x7a, 0x08, 0x2d, 0x52, 0xbc, 0x05, 0xd9, 0xe9, + 0xfa, 0x05, 0xd9, 0xe9, 0x10, 0xd5, 0x4a, 0xb9, 0x5c, 0xdc, 0x9e, 0x79, 0x21, 0x15, 0x21, 0x10, + 0x23, 0x84, 0x24, 0xb9, 0x38, 0xc0, 0xca, 0xe2, 0x33, 0x53, 0x24, 0x18, 0x15, 0x18, 0x35, 0x98, + 0x83, 0xd8, 0xc1, 0x7c, 0xcf, 0x14, 0x21, 0x71, 0x2e, 0xf6, 0x92, 0x8a, 0xf8, 0x8c, 0xc4, 0xe2, + 0x0c, 0x09, 0x26, 0x05, 0x46, 0x0d, 0xce, 0x20, 0xb6, 0x92, 0x0a, 0x8f, 0xc4, 0xe2, 0x0c, 0x21, + 0x2d, 0x2e, 0xce, 0xe4, 0x7c, 0x90, 0x4b, 0x2a, 0x0b, 0x52, 0x25, 0x98, 0x15, 0x18, 0x35, 0xf8, + 0x8c, 0x78, 0xf5, 0x40, 0x36, 0x38, 0xe7, 0x67, 0xe6, 0x85, 0x54, 0x16, 0xa4, 0x06, 0x71, 0x24, + 0x43, 0x59, 0x4e, 0xde, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, + 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x65, 0x98, + 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x0f, 0x72, 0xb7, 0x2e, 0xc4, 0x87, + 0x30, 0x2f, 0xe8, 0x57, 0xe8, 0x23, 0xf9, 0x1b, 0x64, 0x55, 0x71, 0x12, 0x1b, 0xd8, 0x0b, 0xc6, + 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xce, 0xc2, 0x70, 0x12, 0x01, 0x00, 0x00, } func (m *InTxTracker) Marshal() (dAtA []byte, err error) { @@ -279,7 +279,7 @@ func (m *InTxTracker) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CoinType |= common.CoinType(b&0x7F) << shift + m.CoinType |= pkg.CoinType(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/crosschain/types/tx.pb.go b/x/crosschain/types/tx.pb.go index 650ef991dd..186d066ddf 100644 --- a/x/crosschain/types/tx.pb.go +++ b/x/crosschain/types/tx.pb.go @@ -14,7 +14,7 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" - common "github.com/zeta-chain/zetacore/common" + pkg "github.com/zeta-chain/zetacore/pkg" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -32,10 +32,10 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type MsgCreateTSSVoter struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - TssPubkey string `protobuf:"bytes,2,opt,name=tss_pubkey,json=tssPubkey,proto3" json:"tss_pubkey,omitempty"` - KeyGenZetaHeight int64 `protobuf:"varint,3,opt,name=keyGenZetaHeight,proto3" json:"keyGenZetaHeight,omitempty"` - Status common.ReceiveStatus `protobuf:"varint,4,opt,name=status,proto3,enum=common.ReceiveStatus" json:"status,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + TssPubkey string `protobuf:"bytes,2,opt,name=tss_pubkey,json=tssPubkey,proto3" json:"tss_pubkey,omitempty"` + KeyGenZetaHeight int64 `protobuf:"varint,3,opt,name=keyGenZetaHeight,proto3" json:"keyGenZetaHeight,omitempty"` + Status pkg.ReceiveStatus `protobuf:"varint,4,opt,name=status,proto3,enum=pkg.ReceiveStatus" json:"status,omitempty"` } func (m *MsgCreateTSSVoter) Reset() { *m = MsgCreateTSSVoter{} } @@ -92,11 +92,11 @@ func (m *MsgCreateTSSVoter) GetKeyGenZetaHeight() int64 { return 0 } -func (m *MsgCreateTSSVoter) GetStatus() common.ReceiveStatus { +func (m *MsgCreateTSSVoter) GetStatus() pkg.ReceiveStatus { if m != nil { return m.Status } - return common.ReceiveStatus_Created + return pkg.ReceiveStatus_Created } type MsgCreateTSSVoterResponse struct { @@ -313,13 +313,13 @@ func (m *MsgUpdateTssAddressResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateTssAddressResponse proto.InternalMessageInfo type MsgAddToInTxTracker struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - TxHash string `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` - CoinType common.CoinType `protobuf:"varint,4,opt,name=coin_type,json=coinType,proto3,enum=common.CoinType" json:"coin_type,omitempty"` - Proof *common.Proof `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"` - BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` - TxIndex int64 `protobuf:"varint,7,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + TxHash string `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + CoinType pkg.CoinType `protobuf:"varint,4,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` + Proof *pkg.Proof `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"` + BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + TxIndex int64 `protobuf:"varint,7,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` } func (m *MsgAddToInTxTracker) Reset() { *m = MsgAddToInTxTracker{} } @@ -376,14 +376,14 @@ func (m *MsgAddToInTxTracker) GetTxHash() string { return "" } -func (m *MsgAddToInTxTracker) GetCoinType() common.CoinType { +func (m *MsgAddToInTxTracker) GetCoinType() pkg.CoinType { if m != nil { return m.CoinType } - return common.CoinType_Zeta + return pkg.CoinType_Zeta } -func (m *MsgAddToInTxTracker) GetProof() *common.Proof { +func (m *MsgAddToInTxTracker) GetProof() *pkg.Proof { if m != nil { return m.Proof } @@ -585,13 +585,13 @@ func (m *MsgWhitelistERC20Response) GetCctxIndex() string { } type MsgAddToOutTxTracker struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Nonce uint64 `protobuf:"varint,3,opt,name=nonce,proto3" json:"nonce,omitempty"` - TxHash string `protobuf:"bytes,4,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` - Proof *common.Proof `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"` - BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` - TxIndex int64 `protobuf:"varint,7,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + Nonce uint64 `protobuf:"varint,3,opt,name=nonce,proto3" json:"nonce,omitempty"` + TxHash string `protobuf:"bytes,4,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + Proof *pkg.Proof `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"` + BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + TxIndex int64 `protobuf:"varint,7,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` } func (m *MsgAddToOutTxTracker) Reset() { *m = MsgAddToOutTxTracker{} } @@ -655,7 +655,7 @@ func (m *MsgAddToOutTxTracker) GetTxHash() string { return "" } -func (m *MsgAddToOutTxTracker) GetProof() *common.Proof { +func (m *MsgAddToOutTxTracker) GetProof() *pkg.Proof { if m != nil { return m.Proof } @@ -937,10 +937,10 @@ type MsgVoteOnObservedOutboundTx struct { ObservedOutTxEffectiveGasPrice github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,11,opt,name=observed_outTx_effective_gas_price,json=observedOutTxEffectiveGasPrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"observed_outTx_effective_gas_price"` ObservedOutTxEffectiveGasLimit uint64 `protobuf:"varint,12,opt,name=observed_outTx_effective_gas_limit,json=observedOutTxEffectiveGasLimit,proto3" json:"observed_outTx_effective_gas_limit,omitempty"` ValueReceived github_com_cosmos_cosmos_sdk_types.Uint `protobuf:"bytes,5,opt,name=value_received,json=valueReceived,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Uint" json:"value_received" yaml:"value_received"` - Status common.ReceiveStatus `protobuf:"varint,6,opt,name=status,proto3,enum=common.ReceiveStatus" json:"status,omitempty"` + Status pkg.ReceiveStatus `protobuf:"varint,6,opt,name=status,proto3,enum=pkg.ReceiveStatus" json:"status,omitempty"` OutTxChain int64 `protobuf:"varint,7,opt,name=outTx_chain,json=outTxChain,proto3" json:"outTx_chain,omitempty"` OutTxTssNonce uint64 `protobuf:"varint,8,opt,name=outTx_tss_nonce,json=outTxTssNonce,proto3" json:"outTx_tss_nonce,omitempty"` - CoinType common.CoinType `protobuf:"varint,9,opt,name=coin_type,json=coinType,proto3,enum=common.CoinType" json:"coin_type,omitempty"` + CoinType pkg.CoinType `protobuf:"varint,9,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` } func (m *MsgVoteOnObservedOutboundTx) Reset() { *m = MsgVoteOnObservedOutboundTx{} } @@ -1018,11 +1018,11 @@ func (m *MsgVoteOnObservedOutboundTx) GetObservedOutTxEffectiveGasLimit() uint64 return 0 } -func (m *MsgVoteOnObservedOutboundTx) GetStatus() common.ReceiveStatus { +func (m *MsgVoteOnObservedOutboundTx) GetStatus() pkg.ReceiveStatus { if m != nil { return m.Status } - return common.ReceiveStatus_Created + return pkg.ReceiveStatus_Created } func (m *MsgVoteOnObservedOutboundTx) GetOutTxChain() int64 { @@ -1039,11 +1039,11 @@ func (m *MsgVoteOnObservedOutboundTx) GetOutTxTssNonce() uint64 { return 0 } -func (m *MsgVoteOnObservedOutboundTx) GetCoinType() common.CoinType { +func (m *MsgVoteOnObservedOutboundTx) GetCoinType() pkg.CoinType { if m != nil { return m.CoinType } - return common.CoinType_Zeta + return pkg.CoinType_Zeta } type MsgVoteOnObservedOutboundTxResponse struct { @@ -1091,13 +1091,13 @@ type MsgVoteOnObservedInboundTx struct { // string zeta_burnt = 6; Amount github_com_cosmos_cosmos_sdk_types.Uint `protobuf:"bytes,6,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Uint" json:"amount"` // string mMint = 7; - Message string `protobuf:"bytes,8,opt,name=message,proto3" json:"message,omitempty"` - InTxHash string `protobuf:"bytes,9,opt,name=in_tx_hash,json=inTxHash,proto3" json:"in_tx_hash,omitempty"` - InBlockHeight uint64 `protobuf:"varint,10,opt,name=in_block_height,json=inBlockHeight,proto3" json:"in_block_height,omitempty"` - GasLimit uint64 `protobuf:"varint,11,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` - CoinType common.CoinType `protobuf:"varint,12,opt,name=coin_type,json=coinType,proto3,enum=common.CoinType" json:"coin_type,omitempty"` - TxOrigin string `protobuf:"bytes,13,opt,name=tx_origin,json=txOrigin,proto3" json:"tx_origin,omitempty"` - Asset string `protobuf:"bytes,14,opt,name=asset,proto3" json:"asset,omitempty"` + Message string `protobuf:"bytes,8,opt,name=message,proto3" json:"message,omitempty"` + InTxHash string `protobuf:"bytes,9,opt,name=in_tx_hash,json=inTxHash,proto3" json:"in_tx_hash,omitempty"` + InBlockHeight uint64 `protobuf:"varint,10,opt,name=in_block_height,json=inBlockHeight,proto3" json:"in_block_height,omitempty"` + GasLimit uint64 `protobuf:"varint,11,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + CoinType pkg.CoinType `protobuf:"varint,12,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` + TxOrigin string `protobuf:"bytes,13,opt,name=tx_origin,json=txOrigin,proto3" json:"tx_origin,omitempty"` + Asset string `protobuf:"bytes,14,opt,name=asset,proto3" json:"asset,omitempty"` // event index of the sent asset in the observed tx EventIndex uint64 `protobuf:"varint,15,opt,name=event_index,json=eventIndex,proto3" json:"event_index,omitempty"` } @@ -1198,11 +1198,11 @@ func (m *MsgVoteOnObservedInboundTx) GetGasLimit() uint64 { return 0 } -func (m *MsgVoteOnObservedInboundTx) GetCoinType() common.CoinType { +func (m *MsgVoteOnObservedInboundTx) GetCoinType() pkg.CoinType { if m != nil { return m.CoinType } - return common.CoinType_Zeta + return pkg.CoinType_Zeta } func (m *MsgVoteOnObservedInboundTx) GetTxOrigin() string { @@ -1476,101 +1476,101 @@ func init() { func init() { proto.RegisterFile("crosschain/tx.proto", fileDescriptor_81d6d611190b7635) } var fileDescriptor_81d6d611190b7635 = []byte{ - // 1502 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x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e7, 0xed, 0xca, 0xe5, 0xb6, - 0x55, 0xaf, 0x3d, 0xd0, 0x93, 0xea, 0x74, 0x23, 0xcb, 0x19, 0x72, 0x51, 0x70, 0x3a, 0x56, 0x89, - 0xd4, 0x08, 0xab, 0x84, 0xba, 0x02, 0xd3, 0x22, 0x44, 0x5e, 0xe1, 0xf2, 0x12, 0x00, 0xce, 0x2a, - 0x31, 0x8e, 0x7a, 0x0b, 0xe6, 0xc4, 0x01, 0x36, 0x70, 0x45, 0x03, 0xa6, 0x79, 0xe4, 0x59, 0xce, - 0x2e, 0x13, 0xf2, 0x94, 0xdf, 0x53, 0x89, 0x71, 0x97, 0x19, 0x36, 0xee, 0xf4, 0x9b, 0xb0, 0x36, - 0xa0, 0xb4, 0xe3, 0x16, 0x78, 0x39, 0xc1, 0x17, 0x87, 0xe4, 0xb9, 0x5d, 0x7f, 0x78, 0x07, 0xb0, - 0x7e, 0x43, 0xbe, 0x83, 0x02, 0x59, 0xfe, 0x92, 0x62, 0xe1, 0x88, 0x27, 0xb3, 0x6b, 0x34, 0x65, - 0x05, 0xbb, 0x24, 0x1b, 0x5d, 0x83, 0xb4, 0x84, 0x38, 0x90, 0xf7, 0x6e, 0x4c, 0xab, 0x37, 0x61, - 0x36, 0x7a, 0x96, 0xb0, 0x4d, 0x0a, 0x15, 0x11, 0x57, 0x20, 0x77, 0xba, 0x3c, 0xa5, 0xde, 0x6b, - 0x79, 0x62, 0x51, 0xd6, 0x11, 0x21, 0x96, 0x2b, 0xa0, 0xcf, 0x18, 0x11, 0xa9, 0x5e, 0x07, 0x60, - 0x90, 0xcb, 0x0e, 0xce, 0x08, 0x3f, 0x3d, 0x5f, 0x36, 0xee, 0x2d, 0x98, 0xf3, 0x7c, 0x53, 0xde, - 0xff, 0xa2, 0x5b, 0x45, 0xcb, 0x65, 0x3d, 0xbf, 0xb3, 0x45, 0x13, 0x43, 0x74, 0x9a, 0x9f, 0x88, - 0x87, 0x68, 0x32, 0xaf, 0x33, 0x43, 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8b, 0x2c, 0x14, 0x5b, 0xc5, 0xce, 0x2f, 0x78, 0x6c, 0xd1, 0xa9, 0xa4, 0xf8, 0xb7, 0xb7, 0xbb, - 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x8e, 0x99, 0xcd, 0x4c, 0xdc, 0x13, 0x00, 0x00, + // 1501 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xdd, 0x6b, 0xdb, 0x56, + 0x1b, 0x8f, 0xde, 0x24, 0x8e, 0xfd, 0x24, 0x4e, 0x5a, 0x35, 0x6f, 0xeb, 0x2a, 0x8d, 0x93, 0xaa, + 0x6f, 0xfb, 0x86, 0x42, 0xed, 0x36, 0x65, 0xac, 0xed, 0x36, 0x58, 0x12, 0xda, 0x34, 0x5b, 0xd3, + 0x14, 0xc5, 0xdd, 0x46, 0x6f, 0x84, 0x2c, 0x9d, 0xc8, 0xc2, 0xb6, 0x8e, 0xd1, 0x39, 0x32, 0x76, + 0x18, 0x0c, 0x06, 0xbb, 0x1f, 0x63, 0xb0, 0xb1, 0xeb, 0xfd, 0x31, 0xbd, 0x2c, 0x1b, 0x8c, 0xb1, + 0x8b, 0x32, 0x9a, 0xcb, 0xdd, 0xed, 0x1f, 0xd8, 0x38, 0xcf, 0x91, 0x15, 0xcb, 0x8e, 0x3f, 0x92, + 0xd2, 0x2b, 0xeb, 0x79, 0x74, 0x9e, 0xaf, 0xdf, 0x79, 0xbe, 0x2c, 0xb8, 0x60, 0x07, 0x94, 0x31, + 0xbb, 0x62, 0x79, 0x7e, 0x91, 0xb7, 0x0a, 0x8d, 0x80, 0x72, 0xaa, 0x2e, 0x1f, 0x12, 0x6e, 0x21, + 0xaf, 0x80, 0x4f, 0x34, 0x20, 0x85, 0xe3, 0x73, 0x5a, 0xb6, 0x51, 0x75, 0x8b, 0x8d, 0xaa, 0x2b, + 0x4f, 0x6b, 0x8b, 0x2e, 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0x43, 0x63, 0x6b, 0xfd, 0xf6, 0x10, 0x28, 0xae, 0x41, 0x96, 0x04, 0xf6, 0xfa, 0x6d, 0xd3, + 0x92, 0xa8, 0x46, 0xe8, 0xcf, 0x21, 0xb3, 0x73, 0x73, 0xdd, 0x78, 0x4d, 0x26, 0xf1, 0x52, 0x61, + 0xca, 0xb7, 0xea, 0x12, 0x91, 0x8c, 0x81, 0xcf, 0xea, 0x45, 0x48, 0xb1, 0x76, 0xbd, 0x4c, 0x6b, + 0x18, 0x7f, 0xc6, 0x88, 0x28, 0x55, 0x83, 0xb4, 0x43, 0x6c, 0xaf, 0x6e, 0xd5, 0x18, 0x86, 0x9c, + 0x35, 0x62, 0x5a, 0x5d, 0x82, 0x8c, 0x6b, 0x31, 0xb3, 0xe6, 0xd5, 0x3d, 0x1e, 0x85, 0x9c, 0x76, + 0x2d, 0xf6, 0x44, 0xd0, 0xba, 0x89, 0x05, 0x92, 0x8c, 0xa9, 0x13, 0xb1, 0x88, 0xe0, 0x30, 0x11, + 0x81, 0x8c, 0x70, 0xee, 0xb0, 0x3b, 0x82, 0x65, 0x00, 0xdb, 0x8e, 0x21, 0x8d, 0x32, 0x4c, 0x70, + 0x24, 0xa8, 0xbf, 0x29, 0xb0, 0xd8, 0x41, 0x75, 0x2f, 0xe4, 0x6f, 0x99, 0x43, 0x8b, 0x30, 0xed, + 0x53, 0xdf, 0x26, 0x88, 0xd5, 0x94, 0x21, 0x89, 0xee, 0xcc, 0x9a, 0x4a, 0x64, 0xd6, 0xbb, 0xcc, + 0x96, 0x8f, 0xe0, 0xca, 0x49, 0x71, 0xc5, 0xe0, 0x2d, 0x03, 0x78, 0xcc, 0x0c, 0x48, 0x9d, 0x36, + 0x89, 0x83, 0x21, 0xa6, 0x8d, 0x8c, 0xc7, 0x0c, 0xc9, 0xd0, 0x0f, 0x10, 0x78, 0x49, 0x3d, 0x0a, + 0x68, 0xfd, 0x1d, 0x61, 0xa3, 0x5f, 0x83, 0xab, 0x03, 0x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9c, 0xae, 0x3e, 0x70, 0xca, 0x6c, 0x7e, 0xfa, 0xf2, 0x4d, 0x5e, + 0x79, 0xf5, 0x26, 0xaf, 0xfc, 0xf9, 0x26, 0xaf, 0x7c, 0x7b, 0x94, 0x9f, 0x78, 0x75, 0x94, 0x9f, + 0xf8, 0xfd, 0x28, 0x3f, 0xf1, 0xe2, 0x4e, 0xd7, 0x5a, 0x23, 0xd4, 0xde, 0x92, 0x1f, 0xe4, 0x3a, + 0x16, 0x8a, 0xad, 0x62, 0xf7, 0x67, 0x3a, 0xb1, 0xe5, 0x94, 0x53, 0xf8, 0x99, 0xed, 0xee, 0xbf, + 0x01, 0x00, 0x00, 0xff, 0xff, 0x2c, 0x0a, 0x48, 0xd5, 0xc1, 0x13, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -3678,7 +3678,7 @@ func (m *MsgCreateTSSVoter) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Status |= common.ReceiveStatus(b&0x7F) << shift + m.Status |= pkg.ReceiveStatus(b&0x7F) << shift if b < 0x80 { break } @@ -4229,7 +4229,7 @@ func (m *MsgAddToInTxTracker) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CoinType |= common.CoinType(b&0x7F) << shift + m.CoinType |= pkg.CoinType(b&0x7F) << shift if b < 0x80 { break } @@ -4264,7 +4264,7 @@ func (m *MsgAddToInTxTracker) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Proof == nil { - m.Proof = &common.Proof{} + m.Proof = &pkg.Proof{} } if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -4902,7 +4902,7 @@ func (m *MsgAddToOutTxTracker) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Proof == nil { - m.Proof = &common.Proof{} + m.Proof = &pkg.Proof{} } if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -5633,7 +5633,7 @@ func (m *MsgVoteOnObservedOutboundTx) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Status |= common.ReceiveStatus(b&0x7F) << shift + m.Status |= pkg.ReceiveStatus(b&0x7F) << shift if b < 0x80 { break } @@ -5690,7 +5690,7 @@ func (m *MsgVoteOnObservedOutboundTx) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CoinType |= common.CoinType(b&0x7F) << shift + m.CoinType |= pkg.CoinType(b&0x7F) << shift if b < 0x80 { break } @@ -6151,7 +6151,7 @@ func (m *MsgVoteOnObservedInboundTx) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CoinType |= common.CoinType(b&0x7F) << shift + m.CoinType |= pkg.CoinType(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/fungible/types/events.pb.go b/x/fungible/types/events.pb.go index 3216373f9a..b64a03c8d4 100644 --- a/x/fungible/types/events.pb.go +++ b/x/fungible/types/events.pb.go @@ -11,7 +11,7 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - common "github.com/zeta-chain/zetacore/common" + pkg "github.com/zeta-chain/zetacore/pkg" ) // Reference imports to suppress errors if they are not otherwise used. @@ -94,15 +94,15 @@ func (m *EventSystemContractUpdated) GetSigner() string { } type EventZRC20Deployed struct { - MsgTypeUrl string `protobuf:"bytes,1,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` - ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Contract string `protobuf:"bytes,3,opt,name=contract,proto3" json:"contract,omitempty"` - Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` - Symbol string `protobuf:"bytes,5,opt,name=symbol,proto3" json:"symbol,omitempty"` - Decimals int64 `protobuf:"varint,6,opt,name=decimals,proto3" json:"decimals,omitempty"` - CoinType common.CoinType `protobuf:"varint,7,opt,name=coin_type,json=coinType,proto3,enum=common.CoinType" json:"coin_type,omitempty"` - Erc20 string `protobuf:"bytes,8,opt,name=erc20,proto3" json:"erc20,omitempty"` - GasLimit int64 `protobuf:"varint,9,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + MsgTypeUrl string `protobuf:"bytes,1,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` + ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + Contract string `protobuf:"bytes,3,opt,name=contract,proto3" json:"contract,omitempty"` + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` + Symbol string `protobuf:"bytes,5,opt,name=symbol,proto3" json:"symbol,omitempty"` + Decimals int64 `protobuf:"varint,6,opt,name=decimals,proto3" json:"decimals,omitempty"` + CoinType pkg.CoinType `protobuf:"varint,7,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` + Erc20 string `protobuf:"bytes,8,opt,name=erc20,proto3" json:"erc20,omitempty"` + GasLimit int64 `protobuf:"varint,9,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` } func (m *EventZRC20Deployed) Reset() { *m = EventZRC20Deployed{} } @@ -180,11 +180,11 @@ func (m *EventZRC20Deployed) GetDecimals() int64 { return 0 } -func (m *EventZRC20Deployed) GetCoinType() common.CoinType { +func (m *EventZRC20Deployed) GetCoinType() pkg.CoinType { if m != nil { return m.CoinType } - return common.CoinType_Zeta + return pkg.CoinType_Zeta } func (m *EventZRC20Deployed) GetErc20() string { @@ -202,15 +202,15 @@ func (m *EventZRC20Deployed) GetGasLimit() int64 { } type EventZRC20WithdrawFeeUpdated struct { - MsgTypeUrl string `protobuf:"bytes,1,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` - ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - CoinType common.CoinType `protobuf:"varint,3,opt,name=coin_type,json=coinType,proto3,enum=common.CoinType" json:"coin_type,omitempty"` - Zrc20Address string `protobuf:"bytes,4,opt,name=zrc20_address,json=zrc20Address,proto3" json:"zrc20_address,omitempty"` - OldWithdrawFee string `protobuf:"bytes,5,opt,name=old_withdraw_fee,json=oldWithdrawFee,proto3" json:"old_withdraw_fee,omitempty"` - NewWithdrawFee string `protobuf:"bytes,6,opt,name=new_withdraw_fee,json=newWithdrawFee,proto3" json:"new_withdraw_fee,omitempty"` - Signer string `protobuf:"bytes,7,opt,name=signer,proto3" json:"signer,omitempty"` - OldGasLimit string `protobuf:"bytes,8,opt,name=old_gas_limit,json=oldGasLimit,proto3" json:"old_gas_limit,omitempty"` - NewGasLimit string `protobuf:"bytes,9,opt,name=new_gas_limit,json=newGasLimit,proto3" json:"new_gas_limit,omitempty"` + MsgTypeUrl string `protobuf:"bytes,1,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` + ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + CoinType pkg.CoinType `protobuf:"varint,3,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` + Zrc20Address string `protobuf:"bytes,4,opt,name=zrc20_address,json=zrc20Address,proto3" json:"zrc20_address,omitempty"` + OldWithdrawFee string `protobuf:"bytes,5,opt,name=old_withdraw_fee,json=oldWithdrawFee,proto3" json:"old_withdraw_fee,omitempty"` + NewWithdrawFee string `protobuf:"bytes,6,opt,name=new_withdraw_fee,json=newWithdrawFee,proto3" json:"new_withdraw_fee,omitempty"` + Signer string `protobuf:"bytes,7,opt,name=signer,proto3" json:"signer,omitempty"` + OldGasLimit string `protobuf:"bytes,8,opt,name=old_gas_limit,json=oldGasLimit,proto3" json:"old_gas_limit,omitempty"` + NewGasLimit string `protobuf:"bytes,9,opt,name=new_gas_limit,json=newGasLimit,proto3" json:"new_gas_limit,omitempty"` } func (m *EventZRC20WithdrawFeeUpdated) Reset() { *m = EventZRC20WithdrawFeeUpdated{} } @@ -260,11 +260,11 @@ func (m *EventZRC20WithdrawFeeUpdated) GetChainId() int64 { return 0 } -func (m *EventZRC20WithdrawFeeUpdated) GetCoinType() common.CoinType { +func (m *EventZRC20WithdrawFeeUpdated) GetCoinType() pkg.CoinType { if m != nil { return m.CoinType } - return common.CoinType_Zeta + return pkg.CoinType_Zeta } func (m *EventZRC20WithdrawFeeUpdated) GetZrc20Address() string { @@ -557,55 +557,55 @@ func init() { func init() { proto.RegisterFile("fungible/events.proto", fileDescriptor_858e6494730deffd) } var fileDescriptor_858e6494730deffd = []byte{ - // 756 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xdf, 0x6e, 0xd3, 0x3e, - 0x14, 0x5e, 0xd6, 0xad, 0x5b, 0xbd, 0x3f, 0xed, 0xfc, 0xeb, 0x0f, 0x85, 0x0e, 0xaa, 0xa9, 0x08, - 0x31, 0x26, 0xd6, 0x4c, 0x45, 0x3c, 0xc0, 0x36, 0x18, 0x4c, 0x02, 0x09, 0x75, 0x0c, 0xa4, 0xdd, - 0x44, 0x6e, 0x72, 0x96, 0x46, 0x4a, 0xec, 0x2a, 0x76, 0x9b, 0x65, 0x4f, 0xc1, 0x1d, 0x3c, 0x0b, - 0x4f, 0xc0, 0xe5, 0x10, 0x37, 0x5c, 0xa2, 0xf5, 0x45, 0x90, 0x1d, 0x27, 0x6d, 0x86, 0x36, 0xb6, - 0xab, 0xfa, 0xb8, 0xdf, 0x39, 0xe7, 0xf3, 0xe7, 0xcf, 0x27, 0xe8, 0xff, 0xd3, 0x21, 0xf5, 0xfc, - 0x5e, 0x00, 0x16, 0x8c, 0x80, 0x0a, 0xde, 0x1e, 0x44, 0x4c, 0x30, 0xbc, 0x7e, 0x0e, 0x82, 0x38, - 0x7d, 0xe2, 0xd3, 0xb6, 0x5a, 0xb1, 0x08, 0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, 0xdf, 0x10, 0xde, 0x97, 0x58, - 0x69, 0xe4, 0x22, 0x56, 0xab, 0xc4, 0x02, 0xb7, 0x80, 0x9d, 0x9c, 0x6a, 0x7e, 0xfa, 0x54, 0x7b, - 0x87, 0xdf, 0x2f, 0x9b, 0xc6, 0xc5, 0x65, 0xd3, 0xf8, 0x7d, 0xd9, 0x34, 0x3e, 0x8f, 0x9b, 0x33, - 0x17, 0xe3, 0xe6, 0xcc, 0xaf, 0x71, 0x73, 0xe6, 0xc4, 0xf2, 0x7c, 0xd1, 0x1f, 0xf6, 0xe4, 0xcb, - 0xb6, 0xe4, 0xa5, 0x6c, 0x2b, 0xb3, 0x59, 0x99, 0xd9, 0xac, 0x33, 0x6b, 0xf2, 0x95, 0x49, 0x06, - 0xc0, 0x7b, 0x65, 0xf5, 0x4d, 0x79, 0xfe, 0x27, 0x00, 0x00, 0xff, 0xff, 0x50, 0x31, 0x7b, 0x39, - 0xc7, 0x06, 0x00, 0x00, + // 757 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xc1, 0x4e, 0xdb, 0x4a, + 0x14, 0xc5, 0x04, 0x02, 0x19, 0x08, 0x81, 0x51, 0xde, 0x93, 0x5f, 0x78, 0x2f, 0x42, 0x79, 0xaa, + 0x4a, 0x51, 0x1b, 0xa3, 0x54, 0xfd, 0x00, 0xa0, 0xa5, 0x45, 0x6a, 0xa5, 0x2a, 0x94, 0x56, 0x62, + 0x63, 0x4d, 0xec, 0x8b, 0x63, 0x61, 0xcf, 0x58, 0x9e, 0x49, 0x8c, 0xf9, 0x8a, 0x2e, 0xba, 0xe8, + 0xb7, 0xf4, 0x0b, 0xba, 0xa4, 0xea, 0xa6, 0x4b, 0x04, 0x3f, 0x52, 0xcd, 0x78, 0xec, 0xc4, 0x54, + 0x20, 0xd8, 0xcd, 0x1d, 0x9f, 0x7b, 0xef, 0x99, 0x33, 0x67,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, 0x03, 0x5e, 0xd2, 0x13, + 0xb4, 0x7a, 0xcb, 0x6c, 0x6c, 0x38, 0x37, 0xc6, 0xdc, 0x16, 0x5a, 0x93, 0xc6, 0x1b, 0xe8, 0x1e, + 0xf6, 0x90, 0xf0, 0xa1, 0xd6, 0xa6, 0x41, 0x21, 0xc9, 0x7b, 0xbf, 0x21, 0x7c, 0x28, 0xb1, 0xd2, + 0xc8, 0x65, 0xac, 0x56, 0x89, 0x05, 0x6e, 0x09, 0x3b, 0x39, 0xd5, 0xfc, 0xf4, 0xa9, 0x76, 0x0f, + 0xbe, 0x5f, 0xb5, 0x8d, 0x8b, 0xab, 0xb6, 0x71, 0x79, 0xd5, 0x36, 0x3e, 0x5f, 0xb7, 0x67, 0x2e, + 0xae, 0xdb, 0x33, 0xbf, 0xae, 0xdb, 0x33, 0xc7, 0x96, 0xe7, 0x8b, 0xe1, 0x68, 0xd0, 0x75, 0x58, + 0x68, 0xc9, 0x4b, 0x79, 0xa6, 0xcc, 0x66, 0xe5, 0x66, 0xb3, 0xce, 0xac, 0xc9, 0xff, 0x25, 0x8d, + 0x80, 0x0f, 0xaa, 0xea, 0x6f, 0xf2, 0xfc, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6f, 0x7b, 0xaa, + 0x9f, 0xbb, 0x06, 0x00, 0x00, } func (m *EventSystemContractUpdated) Marshal() (dAtA []byte, err error) { @@ -1605,7 +1605,7 @@ func (m *EventZRC20Deployed) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CoinType |= common.CoinType(b&0x7F) << shift + m.CoinType |= pkg.CoinType(b&0x7F) << shift if b < 0x80 { break } @@ -1776,7 +1776,7 @@ func (m *EventZRC20WithdrawFeeUpdated) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CoinType |= common.CoinType(b&0x7F) << shift + m.CoinType |= pkg.CoinType(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/fungible/types/foreign_coins.pb.go b/x/fungible/types/foreign_coins.pb.go index dd834ae48d..ee2ca49b14 100644 --- a/x/fungible/types/foreign_coins.pb.go +++ b/x/fungible/types/foreign_coins.pb.go @@ -12,7 +12,7 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - common "github.com/zeta-chain/zetacore/common" + pkg "github.com/zeta-chain/zetacore/pkg" ) // Reference imports to suppress errors if they are not otherwise used. @@ -34,7 +34,7 @@ type ForeignCoins struct { Decimals uint32 `protobuf:"varint,5,opt,name=decimals,proto3" json:"decimals,omitempty"` Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` Symbol string `protobuf:"bytes,7,opt,name=symbol,proto3" json:"symbol,omitempty"` - CoinType common.CoinType `protobuf:"varint,8,opt,name=coin_type,json=coinType,proto3,enum=common.CoinType" json:"coin_type,omitempty"` + CoinType pkg.CoinType `protobuf:"varint,8,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` GasLimit uint64 `protobuf:"varint,9,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` Paused bool `protobuf:"varint,10,opt,name=paused,proto3" json:"paused,omitempty"` LiquidityCap github_com_cosmos_cosmos_sdk_types.Uint `protobuf:"bytes,11,opt,name=liquidity_cap,json=liquidityCap,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Uint" json:"liquidity_cap"` @@ -115,11 +115,11 @@ func (m *ForeignCoins) GetSymbol() string { return "" } -func (m *ForeignCoins) GetCoinType() common.CoinType { +func (m *ForeignCoins) GetCoinType() pkg.CoinType { if m != nil { return m.CoinType } - return common.CoinType_Zeta + return pkg.CoinType_Zeta } func (m *ForeignCoins) GetGasLimit() uint64 { @@ -144,32 +144,32 @@ func init() { proto.RegisterFile("fungible/foreign_coins.proto", fileDescriptor_ var fileDescriptor_5285bb476cecbbf8 = []byte{ // 416 bytes of a gzipped FileD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 0x83, 0x5f, 0xf9, 0xfa, 0x57, 0xe4, + 0xe1, 0xe9, 0x7c, 0xf4, 0xf7, 0xe9, 0xfc, 0x9d, 0x54, 0xee, 0x6e, 0xbb, 0xce, 0x98, 0xae, 0x08, + 0xd3, 0xb6, 0xd2, 0xb6, 0x3f, 0x2e, 0x2c, 0xdf, 0x10, 0xdf, 0x95, 0xcd, 0xbe, 0xa9, 0xda, 0xe5, + 0xc7, 0x83, 0xcb, 0x8a, 0x9a, 0xab, 0xeb, 0x87, 0x5d, 0x0c, 0x1e, 0x77, 0x31, 0xf8, 0xb7, 0x8b, + 0xc1, 0xef, 0x7d, 0x3c, 0x7a, 0xdc, 0xc7, 0xa3, 0x3f, 0xfb, 0x78, 0xf4, 0x9d, 0x3c, 0x33, 0xf4, + 0x2b, 0xbe, 0x08, 0x83, 0x24, 0x87, 0x6d, 0x93, 0x9f, 0x64, 0xf8, 0x20, 0xc1, 0x7d, 0x3d, 0x0d, + 0x7b, 0xfd, 0xf8, 0x3f, 0x00, 0x00, 0xff, 0xff, 0x2c, 0x33, 0x77, 0x6c, 0x39, 0x02, 0x00, 0x00, } func (m *ForeignCoins) Marshal() (dAtA []byte, err error) { @@ -531,7 +531,7 @@ func (m *ForeignCoins) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CoinType |= common.CoinType(b&0x7F) << shift + m.CoinType |= pkg.CoinType(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/fungible/types/tx.pb.go b/x/fungible/types/tx.pb.go index 35820af781..34ad09985b 100644 --- a/x/fungible/types/tx.pb.go +++ b/x/fungible/types/tx.pb.go @@ -14,7 +14,7 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" - common "github.com/zeta-chain/zetacore/common" + pkg "github.com/zeta-chain/zetacore/pkg" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -355,14 +355,14 @@ func (m *MsgUpdateSystemContractResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateSystemContractResponse proto.InternalMessageInfo type MsgDeployFungibleCoinZRC20 struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ERC20 string `protobuf:"bytes,2,opt,name=ERC20,proto3" json:"ERC20,omitempty"` - ForeignChainId int64 `protobuf:"varint,3,opt,name=foreign_chain_id,json=foreignChainId,proto3" json:"foreign_chain_id,omitempty"` - Decimals uint32 `protobuf:"varint,4,opt,name=decimals,proto3" json:"decimals,omitempty"` - Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` - Symbol string `protobuf:"bytes,6,opt,name=symbol,proto3" json:"symbol,omitempty"` - CoinType common.CoinType `protobuf:"varint,7,opt,name=coin_type,json=coinType,proto3,enum=common.CoinType" json:"coin_type,omitempty"` - GasLimit int64 `protobuf:"varint,8,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + ERC20 string `protobuf:"bytes,2,opt,name=ERC20,proto3" json:"ERC20,omitempty"` + ForeignChainId int64 `protobuf:"varint,3,opt,name=foreign_chain_id,json=foreignChainId,proto3" json:"foreign_chain_id,omitempty"` + Decimals uint32 `protobuf:"varint,4,opt,name=decimals,proto3" json:"decimals,omitempty"` + Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` + Symbol string `protobuf:"bytes,6,opt,name=symbol,proto3" json:"symbol,omitempty"` + CoinType pkg.CoinType `protobuf:"varint,7,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` + GasLimit int64 `protobuf:"varint,8,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` } func (m *MsgDeployFungibleCoinZRC20) Reset() { *m = MsgDeployFungibleCoinZRC20{} } @@ -440,11 +440,11 @@ func (m *MsgDeployFungibleCoinZRC20) GetSymbol() string { return "" } -func (m *MsgDeployFungibleCoinZRC20) GetCoinType() common.CoinType { +func (m *MsgDeployFungibleCoinZRC20) GetCoinType() pkg.CoinType { if m != nil { return m.CoinType } - return common.CoinType_Zeta + return pkg.CoinType_Zeta } func (m *MsgDeployFungibleCoinZRC20) GetGasLimit() int64 { @@ -891,69 +891,69 @@ func init() { proto.RegisterFile("fungible/tx.proto", fileDescriptor_197fdedece2 var fileDescriptor_197fdedece277fa0 = []byte{ // 998 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0x5d, 0x6f, 0xdb, 0x54, - 0x18, 0xae, 0xdb, 0xf5, 0x23, 0xef, 0x96, 0x34, 0x3b, 0x84, 0xcd, 0xa4, 0x28, 0xdd, 0xbc, 0x89, - 0x95, 0x49, 0x8d, 0x47, 0x18, 0x4c, 0x48, 0x6c, 0xa8, 0xcd, 0x5a, 0x98, 0xb4, 0xa0, 0xc9, 0x5d, - 0x87, 0xe8, 0x8d, 0x75, 0x6a, 0x9f, 0x3a, 0x16, 0xf1, 0x39, 0xc6, 0xe7, 0x84, 0x2c, 0xbb, 0x43, - 0xe2, 0xaa, 0x12, 0x68, 0x12, 0xff, 0x03, 0x89, 0x7f, 0xb1, 0xcb, 0x5d, 0x22, 0x84, 0x26, 0xd4, - 0xfe, 0x11, 0xe4, 0xe3, 0x8f, 0x3a, 0x1f, 0x4e, 0x9b, 0x70, 0x95, 0x73, 0xde, 0xbc, 0xef, 0xe3, - 0xe7, 0xfd, 0x7a, 0x9c, 0xc0, 0xd5, 0xa3, 0x2e, 0x75, 0xdc, 0xc3, 0x0e, 0xd1, 0xc5, 0xcb, 0xba, - 0x1f, 0x30, 0xc1, 0xd0, 0xda, 0x2b, 0x22, 0xb0, 0xd5, 0xc6, 0x2e, 0xad, 0xcb, 0x13, 0x0b, 0x48, - 0x3d, 0xf1, 0xaa, 0xbe, 0x67, 0x31, 0xcf, 0x63, 0x54, 0x8f, 0x3e, 0xa2, 0x88, 0x6a, 0xc5, 0x61, - 0x0e, 0x93, 0x47, 0x3d, 0x3c, 0x45, 0x56, 0xed, 0x3e, 0xa8, 0x2d, 0xee, 0x3c, 0x26, 0x7e, 0x87, - 0xf5, 0xf7, 0xfa, 0x5c, 0x10, 0xaf, 0xc9, 0xa8, 0x08, 0xb0, 0x25, 0x38, 0x52, 0x61, 0xd9, 0x0a, - 0x08, 0x16, 0x2c, 0x50, 0x95, 0x1b, 0xca, 0x46, 0xc1, 0x48, 0xae, 0xda, 0x3f, 0x0a, 0xdc, 0xc8, - 0x0b, 0x33, 0x08, 0xf7, 0x19, 0xe5, 0x04, 0xdd, 0x85, 0x72, 0x97, 0xba, 0xbc, 0x87, 0xfd, 0x17, - 0x8d, 0x5d, 0x6c, 0x09, 0x16, 0xf4, 0x63, 0x9c, 0x11, 0x3b, 0xaa, 0xc0, 0x62, 0x2f, 0xcc, 0x43, - 0x9d, 0x97, 0x0e, 0xd1, 0x05, 0x6d, 0xc0, 0x6a, 0xea, 0x69, 0xb0, 0xae, 0x20, 0x81, 0xba, 0x20, - 0xbf, 0x1f, 0x36, 0xa3, 0xdb, 0x50, 0xb4, 0x18, 0xa5, 0x24, 0x44, 0x3b, 0xd8, 0x79, 0xd1, 0x52, - 0x2f, 0x49, 0xbf, 0x41, 0x23, 0xfa, 0x08, 0x4a, 0x7c, 0x80, 0xac, 0xba, 0x28, 0xdd, 0x86, 0xac, - 0xda, 0xf1, 0x3c, 0x7c, 0xd0, 0xe2, 0xce, 0xbe, 0x6f, 0x63, 0x41, 0x0e, 0x8c, 0x66, 0xe3, 0xde, - 0x77, 0xae, 0x68, 0xdb, 0x01, 0xee, 0xed, 0x12, 0x92, 0x5f, 0x16, 0x74, 0x0b, 0x8a, 0xaf, 0x02, - 0xab, 0x71, 0xcf, 0xc4, 0xb6, 0x1d, 0x10, 0xce, 0xe3, 0x6c, 0xae, 0x48, 0xe3, 0x56,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xb4, 0x53, 0x40, 0xdf, 0x95, 0x4f, 0xd1, 0xe3, 0xa7, 0xe8, 0x2f, 0xf5, 0xb3, 0xef, 0x07, + 0x21, 0xa4, 0x07, 0x8b, 0xf2, 0x0b, 0xe0, 0xb3, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x7b, 0xb0, + 0x1c, 0x96, 0x58, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -3058,7 +3058,7 @@ func (m *MsgDeployFungibleCoinZRC20) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CoinType |= common.CoinType(b&0x7F) << shift + m.CoinType |= pkg.CoinType(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/observer/types/chain_nonces.pb.go b/x/observer/types/chain_nonces.pb.go index 47ea34bda2..d9c6b6483f 100644 --- a/x/observer/types/chain_nonces.pb.go +++ b/x/observer/types/chain_nonces.pb.go @@ -11,7 +11,7 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - _ "github.com/zeta-chain/zetacore/common" + _ "github.com/zeta-chain/zetacore/pkg" ) // Reference imports to suppress errors if they are not otherwise used. @@ -116,25 +116,25 @@ func init() { func init() { proto.RegisterFile("observer/chain_nonces.proto", fileDescriptor_a4a180ef3ffea001) } var fileDescriptor_a4a180ef3ffea001 = []byte{ - // 276 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x90, 0xbd, 0x4e, 0xc3, 0x30, - 0x14, 0x85, 0x6b, 0xd2, 0x1f, 0x30, 0x03, 0x52, 0xe8, 0x60, 0x5a, 0xc9, 0x8a, 0x98, 0xb2, 0x10, - 0x0f, 0xbc, 0x01, 0x2c, 0x74, 0x61, 0xc8, 0xc8, 0x82, 0xf2, 0x73, 0x49, 0x2c, 0x11, 0xdf, 0xca, - 0x36, 0xa8, 0xf4, 0x29, 0x78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0x68, 0xa4, 0x6d, 0x5f, 0xca, 0xac, - 0xc2, 0x4e, 0xb8, 0x5e, 0xae, 0x7c, 0x18, 0x31, 0x56, 0x24, 0x76, 0xe2, 0xaf, 0x54, 0xfb, 0xb6, - 0x05, 0x53, 0xce, 0x7d, 0x0d, 0xd7, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x3c, 0x24, 0x62, 0xd5, - 0x6d, 0x01, 0x00, 0x00, + // 274 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x90, 0xbb, 0x4e, 0xc3, 0x30, + 0x18, 0x85, 0x63, 0xd2, 0x0b, 0x18, 0x21, 0xa4, 0xa8, 0x83, 0x69, 0x25, 0x2b, 0x62, 0xca, 0x42, + 0x3c, 0xf0, 0x06, 0xb0, 0xd0, 0x85, 0x21, 0x23, 0x0b, 0xca, 0xe5, 0xc7, 0xb1, 0x0a, 0x76, 0xe4, + 0x18, 0x54, 0xfa, 0x14, 0x3c, 0x0b, 0x4f, 0xc1, 0xd8, 0x91, 0x11, 0x25, 0x2f, 0x82, 0xfc, 0x87, + 0x30, 0x74, 0x3b, 0xdf, 0xd1, 0x7f, 0x39, 0x3a, 0x74, 0x65, 0x8a, 0x16, 0xec, 0x1b, 0x58, 0x51, + 0xd6, 0xb9, 0xd2, 0x8f, 0xda, 0xe8, 0x12, 0xda, 0xb4, 0xb1, 0xc6, 0x99, 0x68, 0xb5, 0x03, 0x97, + 0xa3, 0x9f, 0xa2, 0x32, 0x16, 0xd2, 0x71, 0x7e, 0x79, 0xd6, 0x6c, 0xa4, 0x68, 0x36, 0x72, 0x98, + 0x5d, 0x2e, 0xa4, 0x91, 0x06, 0xa5, 0xf0, 0x6a, 0x70, 0x2f, 0x3f, 0x09, 0x3d, 0xbd, 0xf5, 0x07, + 0xee, 0xf1, 0x6e, 0xc4, 0xe8, 0xbc, 0xb4, 0x90, 0x3b, 0x63, 0x19, 0x89, 0x49, 0x72, 0x92, 0x8d, + 0x18, 0x2d, 0xe8, 0x54, 0xe9, 0x0a, 0xb6, 0xec, 0x08, 0xfd, 0x01, 0xa2, 0x0b, 0x7a, 0x3c, 0xe4, + 0x52, 0x15, 0x0b, 0x63, 0x92, 0x84, 0xd9, 0x1c, 0x79, 0x5d, 0xf9, 0x05, 0x0c, 0xcb, 0x26, 0x31, + 0x49, 0x26, 0xd9, 0x00, 0xfe, 0x41, 0xab, 0xa4, 0x06, 0xdb, 0xb2, 0x69, 0x1c, 0xfa, 0x07, 0x7f, + 0x18, 0x25, 0xf4, 0xfc, 0x49, 0xe9, 0xfc, 0x59, 0xed, 0xa0, 0xba, 0x03, 0x25, 0x6b, 0xc7, 0x66, + 0xb8, 0x79, 0x68, 0xdf, 0xac, 0xbf, 0x3a, 0x4e, 0xf6, 0x1d, 0x27, 0x3f, 0x1d, 0x27, 0x1f, 0x3d, + 0x0f, 0xf6, 0x3d, 0x0f, 0xbe, 0x7b, 0x1e, 0x3c, 0x08, 0xa9, 0x5c, 0xfd, 0x5a, 0xa4, 0xa5, 0x79, + 0x11, 0xbe, 0x91, 0x2b, 0x0c, 0x23, 0xc6, 0x72, 0xc4, 0x56, 0xfc, 0xd7, 0xe9, 0xde, 0x1b, 0x68, + 0x8b, 0x19, 0xd6, 0x70, 0xfd, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x43, 0xcb, 0x34, 0xb2, 0x67, 0x01, + 0x00, 0x00, } func (m *ChainNonces) Marshal() (dAtA []byte, err error) { diff --git a/x/observer/types/node_account.pb.go b/x/observer/types/node_account.pb.go index 41e6be9761..d42de31040 100644 --- a/x/observer/types/node_account.pb.go +++ b/x/observer/types/node_account.pb.go @@ -11,7 +11,7 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - common "github.com/zeta-chain/zetacore/common" + pkg "github.com/zeta-chain/zetacore/pkg" ) // Reference imports to suppress errors if they are not otherwise used. @@ -63,10 +63,10 @@ func (NodeStatus) EnumDescriptor() ([]byte, []int) { } type NodeAccount struct { - Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` - GranteeAddress string `protobuf:"bytes,2,opt,name=granteeAddress,proto3" json:"granteeAddress,omitempty"` - GranteePubkey *common.PubKeySet `protobuf:"bytes,3,opt,name=granteePubkey,proto3" json:"granteePubkey,omitempty"` - NodeStatus NodeStatus `protobuf:"varint,4,opt,name=nodeStatus,proto3,enum=zetachain.zetacore.observer.NodeStatus" json:"nodeStatus,omitempty"` + Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` + GranteeAddress string `protobuf:"bytes,2,opt,name=granteeAddress,proto3" json:"granteeAddress,omitempty"` + GranteePubkey *pkg.PubKeySet `protobuf:"bytes,3,opt,name=granteePubkey,proto3" json:"granteePubkey,omitempty"` + NodeStatus NodeStatus `protobuf:"varint,4,opt,name=nodeStatus,proto3,enum=zetachain.zetacore.observer.NodeStatus" json:"nodeStatus,omitempty"` } func (m *NodeAccount) Reset() { *m = NodeAccount{} } @@ -116,7 +116,7 @@ func (m *NodeAccount) GetGranteeAddress() string { return "" } -func (m *NodeAccount) GetGranteePubkey() *common.PubKeySet { +func (m *NodeAccount) GetGranteePubkey() *pkg.PubKeySet { if m != nil { return m.GranteePubkey } @@ -138,30 +138,30 @@ func init() { func init() { proto.RegisterFile("observer/node_account.proto", fileDescriptor_6f54e38f9d1a9953) } var fileDescriptor_6f54e38f9d1a9953 = []byte{ - // 366 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x51, 0xcd, 0x6a, 0xdb, 0x40, - 0x18, 0xd4, 0xfa, 0xaf, 0xf6, 0xaa, 0x75, 0xd5, 0x6d, 0x0f, 0x42, 0x06, 0x61, 0x7a, 0x68, 0x4d, - 0xa1, 0x5a, 0x70, 0x0f, 0x3d, 0xbb, 0x14, 0x4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d, 0x7e, - 0x0e, 0x5e, 0x48, 0x1a, 0x8c, 0x8f, 0xf2, 0xf0, 0xd1, 0xea, 0x17, 0x8e, 0xf1, 0xc3, 0x84, 0xd8, - 0xf8, 0xd5, 0x5f, 0x39, 0x97, 0xea, 0x54, 0x3a, 0x16, 0x79, 0x8b, 0xed, 0x7f, 0xb3, 0xc4, 0xc0, - 0x22, 0x49, 0x0d, 0x08, 0x07, 0x15, 0xd3, 0xa9, 0x61, 0x52, 0xf0, 0xdc, 0xa9, 0x91, 0x0e, 0x6e, - 0x86, 0xc0, 0x44, 0xee, 0xd4, 0x09, 0xc6, 0xad, 0x51, 0x64, 0x92, 0x35, 0x38, 0x0d, 0xf2, 0x1a, - 0xb7, 0x7f, 0x26, 0x29, 0xe3, 0x0b, 0x10, 0x4e, 0xd3, 0x6b, 0x5c, 0x5d, 0xfa, 0xe8, 0xc7, 0xef, - 0xeb, 0xad, 0x8f, 0x36, 0x5b, 0x1f, 0xdd, 0x6d, 0x7d, 0x74, 0xb1, 0xf3, 0xad, 0xcd, 0xce, 0xb7, - 0x6e, 0x77, 0xbe, 0xf5, 0x9f, 0xc6, 0x89, 0x99, 0x65, 0xbc, 0x88, 0x4b, 0x0b, 0xcb, 0x5f, 0x4b, - 0xf7, 0xf4, 0xe0, 0x9e, 0x9e, 0xd1, 0x63, 0xb3, 0x26, 0x5f, 0x41, 0xca, 0x5b, 0x65, 0x17, 0xdf, - 0xee, 0x03, 0x00, 0x00, 0xff, 0xff, 0xa7, 0x26, 0xa4, 0x08, 0xf2, 0x01, 0x00, 0x00, + // 363 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xcd, 0x6a, 0xdb, 0x40, + 0x14, 0x85, 0x35, 0xfe, 0xab, 0x3d, 0xaa, 0x5d, 0x31, 0x74, 0x21, 0x64, 0x10, 0xa6, 0x8b, 0xd6, + 0x14, 0xaa, 0x01, 0xb7, 0x2f, 0xe0, 0x52, 0x28, 0xa5, 0x60, 0x8c, 0x4c, 0x29, 0x64, 0x13, 0x66, + 0x34, 0x17, 0x59, 0xc8, 0x99, 0x11, 0xa3, 0x91, 0x13, 0xe5, 0x29, 0xf2, 0x10, 0x59, 0xe4, 0x51, + 0xb2, 0xf4, 0x32, 0xcb, 0x60, 0xbf, 0x48, 0x90, 0x1c, 0x3b, 0x3f, 0x8b, 0xec, 0xce, 0x9c, 0xfb, + 0xcd, 0xe5, 0x5c, 0x0e, 0x1e, 0x2a, 0x9e, 0x83, 0x5e, 0x83, 0xa6, 0x52, 0x09, 0x38, 0x65, 0x51, + 0xa4, 0x0a, 0x69, 0x82, 0x4c, 0x2b, 0xa3, 0xc8, 0xf0, 0x12, 0x0c, 0x8b, 0x96, 0x2c, 0x91, 0x41, + 0xad, 0x94, 0x86, 0xe0, 0xc0, 0x7b, 0xfd, 0x2c, 0x8d, 0x69, 0x96, 0xc6, 0x7b, 0xd6, 0xfb, 0x18, + 0xab, 0x58, 0xd5, 0x92, 0x56, 0x6a, 0xef, 0x7e, 0xda, 0x20, 0x6c, 0xcf, 0x94, 0x80, 0xe9, 0x7e, + 0x2f, 0xf1, 0x70, 0x57, 0x65, 0xa0, 0x99, 0x51, 0xda, 0x45, 0x23, 0x34, 0xee, 0x85, 0xc7, 0x37, + 0xf9, 0x8c, 0x07, 0xb1, 0x66, 0xd2, 0x00, 0x4c, 0x85, 0xd0, 0x90, 0xe7, 0x6e, 0xa3, 0x26, 0x5e, + 0xb9, 0xe4, 0x07, 0xee, 0x3f, 0x3a, 0xf3, 0x82, 0xa7, 0x50, 0xba, 0xcd, 0x11, 0x1a, 0xdb, 0x93, + 0x41, 0x50, 0x85, 0x99, 0x17, 0xfc, 0x2f, 0x94, 0x0b, 0x30, 0xe1, 0x4b, 0x88, 0xfc, 0xc6, 0xb8, + 0xba, 0x70, 0x61, 0x98, 0x29, 0x72, 0xb7, 0x35, 0x42, 0xe3, 0xc1, 0xe4, 0x4b, 0xf0, 0xc6, 0x81, + 0xc1, 0xec, 0x88, 0x87, 0xcf, 0xbe, 0x7e, 0xe5, 0x18, 0x3f, 0x4d, 0x88, 0x8d, 0xdf, 0xfd, 0x93, + 0xa9, 0x54, 0xe7, 0xd2, 0xb1, 0xc8, 0x07, 0x6c, 0xff, 0x5f, 0x26, 0x06, 0x56, 0x49, 0x6e, 0x40, + 0x38, 0xa8, 0x9a, 0x2e, 0x0c, 0x93, 0x82, 0x97, 0x4e, 0x83, 0xf4, 0x70, 0x3b, 0x04, 0x26, 0x4a, + 0xa7, 0x49, 0x30, 0xee, 0x4c, 0x23, 0x93, 0xac, 0xc1, 0x69, 0x91, 0xf7, 0xb8, 0xfb, 0x2b, 0xc9, + 0x19, 0x5f, 0x81, 0x70, 0xda, 0x5e, 0xeb, 0xe6, 0xda, 0x47, 0x3f, 0xff, 0xdc, 0x6e, 0x7d, 0xb4, + 0xd9, 0xfa, 0xe8, 0x7e, 0xeb, 0xa3, 0xab, 0x9d, 0x6f, 0x6d, 0x76, 0xbe, 0x75, 0xb7, 0xf3, 0xad, + 0x13, 0x1a, 0x27, 0x66, 0x59, 0xf0, 0x20, 0x52, 0x67, 0xb4, 0x8a, 0xfc, 0xad, 0x4e, 0x4f, 0x0f, + 0xe9, 0xe9, 0x05, 0x3d, 0x16, 0x6a, 0xca, 0x0c, 0x72, 0xde, 0xa9, 0x8b, 0xf8, 0xfe, 0x10, 0x00, + 0x00, 0xff, 0xff, 0x9a, 0x9c, 0x98, 0x3a, 0xe9, 0x01, 0x00, 0x00, } func (m *NodeAccount) Marshal() (dAtA []byte, err error) { @@ -382,7 +382,7 @@ func (m *NodeAccount) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.GranteePubkey == nil { - m.GranteePubkey = &common.PubKeySet{} + m.GranteePubkey = &pkg.PubKeySet{} } if err := m.GranteePubkey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/x/observer/types/nonce_to_cctx.pb.go b/x/observer/types/nonce_to_cctx.pb.go index b6c0a77386..737bc8fd0a 100644 --- a/x/observer/types/nonce_to_cctx.pb.go +++ b/x/observer/types/nonce_to_cctx.pb.go @@ -11,7 +11,7 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - _ "github.com/zeta-chain/zetacore/common" + _ "github.com/zeta-chain/zetacore/pkg" ) // Reference imports to suppress errors if they are not otherwise used. @@ -101,23 +101,23 @@ func init() { func init() { proto.RegisterFile("observer/nonce_to_cctx.proto", fileDescriptor_6f9bbe8a689fa6e4) } var fileDescriptor_6f9bbe8a689fa6e4 = []byte{ - // 242 bytes of a gzipped FileDescriptorProto + // 241 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xc9, 0x4f, 0x2a, 0x4e, 0x2d, 0x2a, 0x4b, 0x2d, 0xd2, 0xcf, 0xcb, 0xcf, 0x4b, 0x4e, 0x8d, 0x2f, 0xc9, 0x8f, 0x4f, 0x4e, 0x2e, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0xae, 0x4a, 0x2d, 0x49, 0x4c, 0xce, - 0x48, 0xcc, 0xcc, 0xd3, 0x03, 0xb3, 0xf2, 0x8b, 0x52, 0xf5, 0x60, 0x1a, 0xa4, 0x84, 0x93, 0xf3, - 0x73, 0x73, 0xf3, 0xf3, 0xf4, 0x21, 0x14, 0x44, 0x87, 0x94, 0x48, 0x7a, 0x7e, 0x7a, 0x3e, 0x98, - 0xa9, 0x0f, 0x62, 0x41, 0x44, 0x95, 0xf2, 0xb8, 0xb8, 0xfd, 0x40, 0xc6, 0x87, 0xe4, 0x3b, 0x27, - 0x97, 0x54, 0x08, 0x49, 0x72, 0x71, 0x80, 0x0d, 0x8d, 0xcf, 0x4c, 0x91, 0x60, 0x54, 0x60, 0xd4, - 0x60, 0x0e, 0x62, 0x07, 0xf3, 0x3d, 0x53, 0x84, 0x44, 0xb8, 0x58, 0xc1, 0x0e, 0x91, 0x60, 0x02, - 0x8b, 0x43, 0x38, 0x42, 0x32, 0x5c, 0x9c, 0x20, 0x57, 0x79, 0xe6, 0xa5, 0xa4, 0x56, 0x48, 0x30, - 0x2b, 0x30, 0x6a, 0x70, 0x06, 0x21, 0x04, 0x84, 0x04, 0xb8, 0x98, 0x4b, 0x8a, 0x8b, 0x25, 0x58, - 0xc0, 0xe2, 0x20, 0xa6, 0x93, 0xe7, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, - 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, - 0xe9, 0xa7, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x83, 0xbc, 0xa4, 0x0b, - 0xb6, 0x58, 0x1f, 0xe6, 0x3b, 0xfd, 0x0a, 0x7d, 0x78, 0x80, 0x94, 0x54, 0x16, 0xa4, 0x16, 0x27, - 0xb1, 0x81, 0x7d, 0x60, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x18, 0xf1, 0x0b, 0xf9, 0x29, 0x01, - 0x00, 0x00, + 0x48, 0xcc, 0xcc, 0xd3, 0x03, 0xb3, 0xf2, 0x8b, 0x52, 0xf5, 0x60, 0x1a, 0xa4, 0x78, 0x0b, 0xb2, + 0xd3, 0xf5, 0x0b, 0xb2, 0xd3, 0x21, 0x6a, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x4c, 0x7d, + 0x10, 0x0b, 0x22, 0xaa, 0x94, 0xc7, 0xc5, 0xed, 0x07, 0x32, 0x38, 0x24, 0xdf, 0x39, 0xb9, 0xa4, + 0x42, 0x48, 0x92, 0x8b, 0x03, 0x6c, 0x5c, 0x7c, 0x66, 0x8a, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x73, + 0x10, 0x3b, 0x98, 0xef, 0x99, 0x22, 0x24, 0xc2, 0xc5, 0x0a, 0x76, 0x82, 0x04, 0x13, 0x58, 0x1c, + 0xc2, 0x11, 0x92, 0xe1, 0xe2, 0x04, 0xb9, 0xc7, 0x33, 0x2f, 0x25, 0xb5, 0x42, 0x82, 0x59, 0x81, + 0x51, 0x83, 0x33, 0x08, 0x21, 0x20, 0x24, 0xc0, 0xc5, 0x5c, 0x52, 0x5c, 0x2c, 0xc1, 0x02, 0x16, + 0x07, 0x31, 0x9d, 0x3c, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, + 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x4a, 0x3f, + 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x1f, 0xe4, 0x19, 0x5d, 0xb0, 0xc5, + 0xfa, 0x30, 0x7f, 0xe9, 0x57, 0xe8, 0xc3, 0x83, 0xa2, 0xa4, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, + 0xec, 0x03, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2d, 0x46, 0xd9, 0xc6, 0x23, 0x01, 0x00, + 0x00, } func (m *NonceToCctx) Marshal() (dAtA []byte, err error) { diff --git a/x/observer/types/observer.pb.go b/x/observer/types/observer.pb.go index 07218c037a..dd4d4e63b4 100644 --- a/x/observer/types/observer.pb.go +++ b/x/observer/types/observer.pb.go @@ -11,7 +11,7 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - common "github.com/zeta-chain/zetacore/common" + pkg "github.com/zeta-chain/zetacore/pkg" ) // Reference imports to suppress errors if they are not otherwise used. @@ -88,9 +88,9 @@ func (ObserverUpdateReason) EnumDescriptor() ([]byte, []int) { } type ObserverMapper struct { - Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` - ObserverChain *common.Chain `protobuf:"bytes,2,opt,name=observer_chain,json=observerChain,proto3" json:"observer_chain,omitempty"` - ObserverList []string `protobuf:"bytes,4,rep,name=observer_list,json=observerList,proto3" json:"observer_list,omitempty"` + Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` + ObserverChain *pkg.Chain `protobuf:"bytes,2,opt,name=observer_chain,json=observerChain,proto3" json:"observer_chain,omitempty"` + ObserverList []string `protobuf:"bytes,4,rep,name=observer_list,json=observerList,proto3" json:"observer_list,omitempty"` } func (m *ObserverMapper) Reset() { *m = ObserverMapper{} } @@ -133,7 +133,7 @@ func (m *ObserverMapper) GetIndex() string { return "" } -func (m *ObserverMapper) GetObserverChain() *common.Chain { +func (m *ObserverMapper) GetObserverChain() *pkg.Chain { if m != nil { return m.ObserverChain } @@ -254,34 +254,34 @@ func init() { func init() { proto.RegisterFile("observer/observer.proto", fileDescriptor_3004233a4a5969ce) } var fileDescriptor_3004233a4a5969ce = []byte{ - // 427 bytes of a gzipped FileDescriptorProto + // 425 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0xc1, 0x8a, 0x13, 0x41, - 0x10, 0x9d, 0x4e, 0xa2, 0x90, 0x8e, 0xc9, 0xce, 0xb6, 0x11, 0x43, 0x84, 0x21, 0xac, 0x97, 0xb0, - 0x68, 0x1a, 0x56, 0x7f, 0xc0, 0x0d, 0xa2, 0x8b, 0x91, 0x85, 0x49, 0x16, 0xc1, 0x4b, 0xe8, 0x64, - 0xca, 0x49, 0x43, 0xa6, 0x7b, 0x98, 0xae, 0x48, 0xe2, 0xcd, 0x3f, 0xf0, 0x23, 0x3c, 0xf8, 0x29, - 0x1e, 0xf7, 0xe8, 0x51, 0x92, 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xa0, + 0xe5, 0x66, 0x1e, 0x2f, 0xd4, 0x3a, 0x31, 0x2d, 0x79, 0x61, 0xff, 0x2f, 0xf1, 0x85, 0x49, 0xb6, + 0xc7, 0x56, 0x25, 0xb4, 0xd3, 0x58, 0xcd, 0x1f, 0xda, 0x6a, 0xbc, 0xfa, 0x1b, 0x00, 0x00, 0xff, + 0xff, 0xc5, 0xfa, 0xf3, 0xc5, 0x77, 0x02, 0x00, 0x00, } func (m *ObserverMapper) Marshal() (dAtA []byte, err error) { @@ -561,7 +561,7 @@ func (m *ObserverMapper) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.ObserverChain == nil { - m.ObserverChain = &common.Chain{} + m.ObserverChain = &pkg.Chain{} } if err := m.ObserverChain.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/x/observer/types/params.pb.go b/x/observer/types/params.pb.go index c2d571d7a2..5535e3a392 100644 --- a/x/observer/types/params.pb.go +++ b/x/observer/types/params.pb.go @@ -12,7 +12,7 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - common "github.com/zeta-chain/zetacore/common" + pkg "github.com/zeta-chain/zetacore/pkg" ) // Reference imports to suppress errors if they are not otherwise used. @@ -232,7 +232,7 @@ func (m *ChainParams) GetIsSupported() bool { // Deprecated(v13): Use ChainParamsList type ObserverParams struct { - Chain *common.Chain `protobuf:"bytes,1,opt,name=chain,proto3" json:"chain,omitempty"` + Chain *pkg.Chain `protobuf:"bytes,1,opt,name=chain,proto3" json:"chain,omitempty"` BallotThreshold github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=ballot_threshold,json=ballotThreshold,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"ballot_threshold"` MinObserverDelegation github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=min_observer_delegation,json=minObserverDelegation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"min_observer_delegation"` IsSupported bool `protobuf:"varint,5,opt,name=is_supported,json=isSupported,proto3" json:"is_supported,omitempty"` @@ -271,7 +271,7 @@ func (m *ObserverParams) XXX_DiscardUnknown() { var xxx_messageInfo_ObserverParams proto.InternalMessageInfo -func (m *ObserverParams) GetChain() *common.Chain { +func (m *ObserverParams) GetChain() *pkg.Chain { if m != nil { return m.Chain } @@ -412,58 +412,58 @@ func init() { func init() { proto.RegisterFile("observer/params.proto", fileDescriptor_4542fa62877488a1) } var fileDescriptor_4542fa62877488a1 = []byte{ - // 808 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x95, 0x41, 0x8f, 0xdb, 0x44, - 0x14, 0xc7, 0xe3, 0x4d, 0x76, 0xbb, 0x7d, 0xce, 0x26, 0xa9, 0x69, 0xa9, 0xc9, 0x0a, 0x6f, 0x08, - 0x12, 0x0a, 0xad, 0xd6, 0x86, 0x85, 0x13, 0x82, 0xc3, 0x6e, 0x7a, 0x59, 0xb1, 0x88, 0x95, 0x1b, - 0x0e, 0x70, 0x60, 0x34, 0x19, 0x4f, 0x93, 0x51, 0x6c, 0x3f, 0x6b, 0x66, 0x5c, 0x12, 0x3e, 0x05, - 0x47, 0x24, 0x2e, 0x48, 0x70, 0xe0, 0xa3, 0xf4, 0xd8, 0x23, 0xe2, 0x50, 0xa1, 0xdd, 0x0b, 0x1f, - 0x03, 0x79, 0x6c, 0x87, 0x6c, 0xb7, 0x5a, 0xa4, 0x4a, 0x3d, 0xf9, 0x79, 0xde, 0xef, 0xfd, 0xe7, - 0xcd, 0x9b, 0xf7, 0x6c, 0xb8, 0x87, 0x53, 0xc5, 0xe5, 0x53, 0x2e, 0x83, 0x8c, 0x4a, 0x9a, 0x28, - 0x3f, 0x93, 0xa8, 0xd1, 0xd9, 0xff, 0x91, 0x6b, 0xca, 0xe6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x74, 0xdc, - 0x2d, 0x23, 0xf9, 0xe1, 0x8d, 0x92, 0x9b, 0x65, 0x08, 0x6d, 0x13, 0x5e, 0xd5, 0xe4, 0x53, 0x78, - 0xbb, 0xea, 0x84, 0x84, 0xea, 0x5c, 0x0a, 0xbd, 0x22, 0xd3, 0x18, 0xd9, 0x42, 0x99, 0x7e, 0x68, - 0x86, 0x77, 0x4b, 0xef, 0x57, 0x95, 0xf3, 0xc4, 0xf8, 0x3e, 0x6b, 0xfd, 0xfc, 0xeb, 0x41, 0xe3, - 0xc1, 0x43, 0xb0, 0x37, 0xea, 0xe3, 0x00, 0xec, 0xcc, 0x24, 0xe6, 0xd9, 0xc7, 0xbd, 0xc6, 0xda, - 0x3e, 0xea, 0x59, 0xfd, 0xd6, 0x1f, 0xbf, 0x7b, 0xd6, 0xc9, 0xe9, 0xb3, 0x0b, 0xcf, 0x7a, 0x7e, - 0xe1, 0x59, 0x7f, 0x5f, 0x78, 0xd6, 0x4f, 0x97, 0x5e, 0xe3, 0xf9, 0xa5, 0xd7, 0xf8, 0xf3, 0xd2, - 0x6b, 0x7c, 0x17, 0x6c, 0x34, 0x42, 0x91, 0xfa, 0xa1, 0x39, 0x45, 0x50, 0x9f, 0x22, 0x58, 0xae, - 0xff, 0x3d, 0x65, 0x57, 0x4c, 0x77, 0xcc, 0x2f, 0xe8, 0x93, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, - 0xaf, 0x0f, 0xcf, 0xef, 0xfc, 0x06, 0x00, 0x00, + // 804 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x95, 0x41, 0x6f, 0xe3, 0x44, + 0x14, 0xc7, 0xe3, 0x24, 0xcd, 0x76, 0x9f, 0xd3, 0x24, 0x6b, 0xed, 0xb2, 0x26, 0x15, 0x6e, 0xc8, + 0x01, 0x85, 0x5d, 0xd5, 0x86, 0xc0, 0x09, 0xc1, 0xa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0x05, 0x56, 0x8c, + 0xc7, 0x88, 0xf0, 0x34, 0x56, 0xb6, 0xd1, 0x33, 0x06, 0x75, 0xff, 0xc9, 0xa6, 0x67, 0x94, 0x39, + 0xac, 0x01, 0x74, 0x42, 0x2c, 0x51, 0x22, 0x18, 0xa1, 0x48, 0x31, 0x32, 0xa7, 0xc2, 0xae, 0x6a, + 0xb8, 0x15, 0x62, 0x79, 0x9a, 0x6d, 0x4f, 0xf4, 0xae, 0xd5, 0x83, 0x26, 0x8b, 0x91, 0x5a, 0x96, + 0x54, 0x4d, 0x53, 0xc0, 0xe2, 0xc9, 0xb2, 0x20, 0xfa, 0xb0, 0xc7, 0x53, 0xb5, 0x81, 0xd4, 0x35, + 0x62, 0xf2, 0x54, 0xad, 0x99, 0x17, 0xf0, 0xe4, 0x27, 0xac, 0xc8, 0x0c, 0xa5, 0x6a, 0xc9, 0x4b, + 0x6e, 0x47, 0x73, 0x6d, 0xed, 0xf8, 0x4e, 0x2d, 0x79, 0xc1, 0x7e, 0x05, 0xfa, 0xc9, 0x90, 0xe2, + 0x73, 0x9a, 0x5d, 0x24, 0x56, 0x02, 0x13, 0x85, 0x70, 0x10, 0x08, 0x2a, 0xa5, 0xbd, 0xdb, 0x33, + 0x06, 0x8f, 0x7d, 0x3b, 0x43, 0x26, 0x19, 0x31, 0x2a, 0x80, 0xa3, 0xdc, 0x6f, 0x7d, 0x09, 0x5d, + 0xc2, 0xe3, 0x98, 0x12, 0xc5, 0xc5, 0x76, 0xf4, 0xe3, 0x3c, 0x7a, 0x4d, 0xdc, 0x8e, 0x1e, 0x81, + 0x43, 0x05, 0x19, 0x7e, 0x82, 0x48, 0x2a, 0x15, 0x0f, 0x56, 0xdb, 0x0a, 0xa0, 0x15, 0xf6, 0x35, + 0x35, 0xca, 0xa1, 0xdb, 0x22, 0x47, 0xf0, 0x01, 0x4f, 0xd5, 0x94, 0xa7, 0x71, 0x90, 0x95, 0x45, + 0x92, 0x19, 0x0d, 0xd2, 0x88, 0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+ 0x8d, 0x90, 0xa5, 0x7e, 0xa8, 0x6f, 0xe1, 0x95, 0xb7, 0xf0, 0x96, 0xeb, 0x0f, 0x4f, 0xde, 0x15, + 0xd3, 0x86, 0xfe, 0xfe, 0x7c, 0xf6, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x33, 0xd2, 0xd3, 0xd8, + 0xf3, 0x06, 0x00, 0x00, } func (m *ChainParamsList) Marshal() (dAtA []byte, err error) { @@ -1448,7 +1448,7 @@ func (m *ObserverParams) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Chain == nil { - m.Chain = &common.Chain{} + m.Chain = &pkg.Chain{} } if err := m.Chain.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/x/observer/types/pending_nonces.pb.go b/x/observer/types/pending_nonces.pb.go index dee38660f7..b8c30f2998 100644 --- a/x/observer/types/pending_nonces.pb.go +++ b/x/observer/types/pending_nonces.pb.go @@ -11,7 +11,7 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - _ "github.com/zeta-chain/zetacore/common" + _ "github.com/zeta-chain/zetacore/pkg" ) // Reference imports to suppress errors if they are not otherwise used. @@ -101,23 +101,23 @@ func init() { func init() { proto.RegisterFile("observer/pending_nonces.proto", fileDescriptor_dd001e4838750ecf) } var fileDescriptor_dd001e4838750ecf = []byte{ - // 251 bytes of a gzipped FileDescriptorProto + // 250 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcd, 0x4f, 0x2a, 0x4e, 0x2d, 0x2a, 0x4b, 0x2d, 0xd2, 0x2f, 0x48, 0xcd, 0x4b, 0xc9, 0xcc, 0x4b, 0x8f, 0xcf, 0xcb, 0xcf, 0x4b, 0x4e, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0xae, 0x4a, 0x2d, 0x49,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0x57, 0x1f, 0xe4, 0x2d, 0x5d, 0xb0, 0x21, 0xfa, 0x30, 0x1f, 0xea, 0x57, 0xe8, 0xc3, + 0x43, 0xa5, 0xa4, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0xec, 0x17, 0x63, 0x40, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xc7, 0x5c, 0x5d, 0xfc, 0x2e, 0x01, 0x00, 0x00, } func (m *PendingNonces) Marshal() (dAtA []byte, err error) { diff --git a/x/observer/types/query.pb.go b/x/observer/types/query.pb.go index 73d1d320b3..9d42d85fa8 100644 --- a/x/observer/types/query.pb.go +++ b/x/observer/types/query.pb.go @@ -14,7 +14,7 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" - common "github.com/zeta-chain/zetacore/common" + pkg "github.com/zeta-chain/zetacore/pkg" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -785,11 +785,11 @@ func (m *QueryTssHistoryResponse) GetPagination() *query.PageResponse { } type QueryProveRequest struct { - ChainId int64 `protobuf:"varint,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - TxHash string `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` - Proof *common.Proof `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"` - BlockHash string `protobuf:"bytes,4,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` - TxIndex int64 `protobuf:"varint,5,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` + ChainId int64 `protobuf:"varint,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + TxHash string `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + Proof *pkg.Proof `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"` + BlockHash string `protobuf:"bytes,4,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + TxIndex int64 `protobuf:"varint,5,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` } func (m *QueryProveRequest) Reset() { *m = QueryProveRequest{} } @@ -839,7 +839,7 @@ func (m *QueryProveRequest) GetTxHash() string { return "" } -func (m *QueryProveRequest) GetProof() *common.Proof { +func (m *QueryProveRequest) GetProof() *pkg.Proof { if m != nil { return m.Proof } @@ -1363,7 +1363,7 @@ func (m *QuerySupportedChains) XXX_DiscardUnknown() { var xxx_messageInfo_QuerySupportedChains proto.InternalMessageInfo type QuerySupportedChainsResponse struct { - Chains []*common.Chain `protobuf:"bytes,1,rep,name=chains,proto3" json:"chains,omitempty"` + Chains []*pkg.Chain `protobuf:"bytes,1,rep,name=chains,proto3" json:"chains,omitempty"` } func (m *QuerySupportedChainsResponse) Reset() { *m = QuerySupportedChainsResponse{} } @@ -1399,7 +1399,7 @@ func (m *QuerySupportedChainsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QuerySupportedChainsResponse proto.InternalMessageInfo -func (m *QuerySupportedChainsResponse) GetChains() []*common.Chain { +func (m *QuerySupportedChainsResponse) GetChains() []*pkg.Chain { if m != nil { return m.Chains } @@ -2323,8 +2323,8 @@ func (m *QueryAllBlockHeaderRequest) GetPagination() *query.PageRequest { } type QueryAllBlockHeaderResponse struct { - BlockHeaders []*common.BlockHeader `protobuf:"bytes,1,rep,name=block_headers,json=blockHeaders,proto3" json:"block_headers,omitempty"` - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` + BlockHeaders []*pkg.BlockHeader `protobuf:"bytes,1,rep,name=block_headers,json=blockHeaders,proto3" json:"block_headers,omitempty"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryAllBlockHeaderResponse) Reset() { *m = QueryAllBlockHeaderResponse{} } @@ -2360,7 +2360,7 @@ func (m *QueryAllBlockHeaderResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryAllBlockHeaderResponse proto.InternalMessageInfo -func (m *QueryAllBlockHeaderResponse) GetBlockHeaders() []*common.BlockHeader { +func (m *QueryAllBlockHeaderResponse) GetBlockHeaders() []*pkg.BlockHeader { if m != nil { return m.BlockHeaders } @@ -2419,7 +2419,7 @@ func (m *QueryGetBlockHeaderByHashRequest) GetBlockHash() []byte { } type QueryGetBlockHeaderByHashResponse struct { - BlockHeader *common.BlockHeader `protobuf:"bytes,1,opt,name=block_header,json=blockHeader,proto3" json:"block_header,omitempty"` + BlockHeader *pkg.BlockHeader `protobuf:"bytes,1,opt,name=block_header,json=blockHeader,proto3" json:"block_header,omitempty"` } func (m *QueryGetBlockHeaderByHashResponse) Reset() { *m = QueryGetBlockHeaderByHashResponse{} } @@ -2455,7 +2455,7 @@ func (m *QueryGetBlockHeaderByHashResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryGetBlockHeaderByHashResponse proto.InternalMessageInfo -func (m *QueryGetBlockHeaderByHashResponse) GetBlockHeader() *common.BlockHeader { +func (m *QueryGetBlockHeaderByHashResponse) GetBlockHeader() *pkg.BlockHeader { if m != nil { return m.BlockHeader } @@ -2611,163 +2611,163 @@ func init() { func init() { proto.RegisterFile("observer/query.proto", fileDescriptor_dcb801e455adaee4) } var fileDescriptor_dcb801e455adaee4 = []byte{ - // 2495 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x5a, 0xcd, 0x6f, 0xdc, 0xc6, - 0x15, 0x37, 0xad, 0x48, 0x96, 0x9e, 0x3e, 0x2c, 0x8f, 0xe5, 0x2f, 0xda, 0x96, 0x65, 0x2a, 0x8e, - 0x65, 0xc5, 0x5e, 0xc6, 0x72, 0x12, 0xcb, 0x1f, 0x8a, 0xad, 0x75, 0x6d, 0xc9, 0x4e, 0x6a, 0x2b, - 0xbb,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, 0x67, 0x77, 0x87, 0x2c, 0xa5, 0xb2, 0x43, 0x4a, 0xe5, 0x96, - 0xc0, 0x2a, 0x8d, 0x28, 0xf9, 0x85, 0x02, 0xa3, 0x82, 0xe2, 0x20, 0x57, 0xba, 0x83, 0x12, 0x86, - 0xab, 0xaf, 0xf5, 0x34, 0x3c, 0x04, 0x7f, 0x89, 0x83, 0x9f, 0x25, 0xe7, 0x53, 0xc1, 0x87, 0x15, - 0x81, 0x4b, 0x19, 0xf9, 0x8d, 0x02, 0x87, 0x13, 0x02, 0x46, 0x26, 0x81, 0x12, 0x26, 0xea, 0x8d, - 0x9e, 0x4d, 0x42, 0xb0, 0x97, 0x39, 0xd8, 0x97, 0xc8, 0x8b, 0xa9, 0x60, 0xdd, 0x04, 0xb6, 0x7f, - 0x2b, 0x70, 0x3c, 0x5d, 0xe8, 0x90, 0x3b, 0xdd, 0x31, 0x64, 0x6a, 0x2c, 0xf5, 0xee, 0xfe, 0x1d, - 0x20, 0x97, 0x3c, 0xe7, 0x72, 0x9b, 0xdc, 0x4c, 0xe5, 0x52, 0xa3, 0xac, 0x24, 0x0a, 0x9f, 0xd2, - 0x86, 0xed, 0xf8, 0x0d, 0xfa, 0x6e, 0x70, 0xee, 0xed, 0x91, 0x4f, 0x15, 0x98, 0x88, 0x4f, 0x43, - 0xae, 0xf7, 0x0a, 0x2c, 0x60, 0xb4, 0xd8, 0xbb, 0x21, 0x32, 0xb9, 0xc2, 0x99, 0x5c, 0x24, 0x17, - 0xa4, 0x98, 0x78, 0xa0, 0x63, 0xfa, 0x40, 0x0e, 0x71, 0xbb, 0x18, 0x92, 0x44, 0x9c, 0x22, 0x6f, - 0xb4, 0x57, 0x38, 0xe2, 0x79, 0x32, 0x97, 0x8a, 0x58, 0x90, 0x63, 0xfa, 0x2e, 0x57, 0x80, 0x7b, - 0x5e, 0xee, 0x4f, 0x08, 0x9e, 0x96, 0x1b, 0x0d, 0x19, 0xdc, 0xa9, 0x22, 0x4e, 0x06, 0x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bc, - 0x44, 0xdb, 0x1f, 0xee, 0xf4, 0x2f, 0xf2, 0xba, 0x48, 0x34, 0x01, 0x77, 0xfe, 0xe1, 0xe7, 0xcf, - 0xa6, 0x95, 0x2f, 0x9e, 0x4d, 0x2b, 0x5f, 0x3e, 0x9b, 0x56, 0x3e, 0x7e, 0x3e, 0x7d, 0xe0, 0x8b, - 0xe7, 0xd3, 0x07, 0xfe, 0xf1, 0x7c, 0xfa, 0xc0, 0x53, 0xbd, 0x66, 0xb2, 0xfa, 0x56, 0x39, 0x57, - 0xb1, 0x37, 0x53, 0x0b, 0xfb, 0x1d, 0x61, 0xef, 0xb4, 0x9a, 0xd4, 0x2d, 0x0f, 0xf1, 0x0f, 0x27, - 0xaf, 0xfd, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x52, 0xe2, 0xbb, 0x9a, 0x01, 0x2b, 0x00, 0x00, + // 2492 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x5a, 0xcd, 0x6f, 0x1b, 0xc7, + 0x15, 0xf7, 0x5a, 0x91, 0x2c, 0x3d, 0x7d, 0x58, 0x1e, 0xcb, 0x5f, 0x6b, 0x5b, 0x96, 0xd7, 0x49, + 0x2c, 0x2b, 0x36, 0x19, 0xcb, 0x71, 0xfd, 0x1d, 0x5b, 0x74, 0x63, 0xc9, 0x4e, 0x6a, 0x3b, 0xa4, + 0xdb, 0x04, 0xee, 0x07, 0xbb, 0x24, 0x47, 0xe4, 0xd6, 0xf4, 0x2e, 0xb3, 0x3b, 0x52, 0xc4, 0xa8, + 0x42, 0x8b, 0x1e, 0x83, 0x1e, 0x02, 0x14, 0x68, 0x4f, 0x2d, 0x0a, 0x04, 0x3d, 0x16, 0x28, 0x02, + 0x14, 0x2d, 0x50, 0xf4, 0x90, 0x53, 0x73, 0xe8, 0x21, 0x45, 0x81, 0xa2, 0xbd, 0xb4, 0x81, 0xdd, + 0xfe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0x03, 0xd3, 0x41, 0x2f, 0x6e, 0xa3, + 0x80, 0xdb, 0x10, 0x72, 0x3b, 0x9b, 0xe9, 0xe9, 0x41, 0x64, 0x84, 0x14, 0xf7, 0x3a, 0xf1, 0x06, + 0x76, 0x1f, 0x26, 0x89, 0x85, 0x27, 0x4c, 0xb1, 0xe6, 0xe1, 0x3e, 0x99, 0x5a, 0x3c, 0x93, 0xe9, + 0x35, 0x88, 0x4a, 0x09, 0x0d, 0x8a, 0x13, 0x15, 0xe9, 0xc9, 0x60, 0x30, 0x8d, 0x81, 0x7b, 0x40, + 0x63, 0x4b, 0x5c, 0x18, 0x97, 0xe1, 0x70, 0xb2, 0xad, 0x13, 0xc5, 0x63, 0x30, 0x16, 0xba, 0x0d, + 0x8a, 0x88, 0xb1, 0x62, 0xd4, 0x60, 0x1c, 0xa4, 0x64, 0x2f, 0xad, 0xb5, 0x5a, 0x8e, 0x2b, 0x78, + 0x0d, 0x0f, 0x69, 0xcf, 0x28, 0x50, 0x25, 0x94, 0x68, 0xef, 0x78, 0x35, 0x60, 0x04, 0xb1, 0x87, + 0x75, 0x49, 0x70, 0x3a, 0x04, 0xb7, 0x37, 0xf5, 0x18, 0x37, 0xc1, 0x88, 0xd5, 0xb7, 0xc1, 0x6e, + 0xbb, 0xe3, 0xb8, 0xaa, 0x35, 0x82, 0x0b, 0xa7, 0x32, 0x1d, 0x10, 0x96, 0x37, 0x61, 0x22, 0xf0, + 0x10, 0xdb, 0xf9, 0x0a, 0x15, 0x25, 0x9d, 0x1d, 0xe3, 0xd5, 0xe8, 0xc1, 0x38, 0x96, 0x28, 0xe4, + 0xe3, 0xa7, 0x8e, 0x9d, 0x28, 0xd9, 0x13, 0xa7, 0xcf, 0x83, 0x54, 0x24, 0x67, 0x55, 0x91, 0x60, + 0x42, 0xc6, 0xd0, 0x48, 0xb2, 0xe2, 0xbe, 0x53, 0xe3, 0x4b, 0x81, 0xac, 0xc9, 0x96, 0x15, 0x3f, + 0x88, 0x30, 0x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5a, 0x25, 0x57, 0x75, 0x9e, 0xa6, + 0x16, 0xf6, 0x1b, 0xd2, 0xde, 0x69, 0xb7, 0xb8, 0x57, 0x19, 0xc1, 0x8f, 0x25, 0x2f, 0xfc, 0x3f, + 0x00, 0x00, 0xff, 0xff, 0x85, 0x43, 0x7c, 0xdd, 0xef, 0x2a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -8048,7 +8048,7 @@ func (m *QueryProveRequest) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Proof == nil { - m.Proof = &common.Proof{} + m.Proof = &pkg.Proof{} } if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -9090,7 +9090,7 @@ func (m *QuerySupportedChainsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Chains = append(m.Chains, &common.Chain{}) + m.Chains = append(m.Chains, &pkg.Chain{}) if err := m.Chains[len(m.Chains)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -10876,7 +10876,7 @@ func (m *QueryAllBlockHeaderResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.BlockHeaders = append(m.BlockHeaders, &common.BlockHeader{}) + m.BlockHeaders = append(m.BlockHeaders, &pkg.BlockHeader{}) if err := m.BlockHeaders[len(m.BlockHeaders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -11081,7 +11081,7 @@ func (m *QueryGetBlockHeaderByHashResponse) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.BlockHeader == nil { - m.BlockHeader = &common.BlockHeader{} + m.BlockHeader = &pkg.BlockHeader{} } if err := m.BlockHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/x/observer/types/tx.pb.go b/x/observer/types/tx.pb.go index bd9bceaf1e..013b4f0123 100644 --- a/x/observer/types/tx.pb.go +++ b/x/observer/types/tx.pb.go @@ -13,7 +13,7 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" - common "github.com/zeta-chain/zetacore/common" + pkg "github.com/zeta-chain/zetacore/pkg" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -135,11 +135,11 @@ func (m *MsgUpdateObserverResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateObserverResponse proto.InternalMessageInfo type MsgAddBlockHeader struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - BlockHash []byte `protobuf:"bytes,3,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` - Height int64 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` - Header common.HeaderData `protobuf:"bytes,5,opt,name=header,proto3" json:"header"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + BlockHash []byte `protobuf:"bytes,3,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + Height int64 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` + Header pkg.HeaderData `protobuf:"bytes,5,opt,name=header,proto3" json:"header"` } func (m *MsgAddBlockHeader) Reset() { *m = MsgAddBlockHeader{} } @@ -203,11 +203,11 @@ func (m *MsgAddBlockHeader) GetHeight() int64 { return 0 } -func (m *MsgAddBlockHeader) GetHeader() common.HeaderData { +func (m *MsgAddBlockHeader) GetHeader() pkg.HeaderData { if m != nil { return m.Header } - return common.HeaderData{} + return pkg.HeaderData{} } type MsgAddBlockHeaderResponse struct { @@ -844,66 +844,66 @@ func init() { func init() { proto.RegisterFile("observer/tx.proto", fileDescriptor_1bcd40fa296a2b1d) } var fileDescriptor_1bcd40fa296a2b1d = []byte{ - // 939 bytes of a gzipped FileDescriptorProto + // 937 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcd, 0x6e, 0xdb, 0x46, - 0x10, 0x36, 0xe3, 0xc4, 0x3f, 0x23, 0xd7, 0x89, 0xb7, 0x76, 0x2c, 0x2b, 0x89, 0x62, 0xf0, 0xe4, - 0xb6, 0xae, 0x14, 0x2b, 0x6d, 0x81, 0x14, 0xe8, 0xc1, 0xee, 0x8f, 0xa3, 0x06, 0xa9, 0x0d, 0x02, - 0xf5, 0xa1, 0x17, 0x62, 0xc9, 0x1d, 0x53, 0x44, 0xa8, 0x5d, 0x81, 0x4b, 0x25, 0x56, 0xd1, 0x1e, - 0xfa, 0x00, 0x45, 0xfb, 0x2a, 0x7d, 0x87, 0x1e, 0x72, 0xcc, 0xb1, 0xa7, 0xa2, 0xb0, 0x4f, 0xed, - 0x0b, 0xf4, 0x1a, 0x70, 0x49, 0xae, 0x44, 0x51, 0xa2, 0xe4, 0x9c, 0xc4, 0xdd, 0xfd, 0xe6, 0x9b, - 0xf9, 0x66, 0xbf, 0x5d, 0x2d, 0x6c, 0x08, 0x47, 0x62, 0xf8, 0x12, 0xc3, 0x66, 0x74, 0xd1, 0xe8, - 0x85, 0x22, 0x12, 0xe4, 0xde, 0x8f, 0x18, 0x51, 0xb7, 0x43, 0x7d, 0xde, 0x50, 0x5f, 0x22, 0xc4, - 0x46, 0x86, 0xaa, 0xbd, 0xef, 0x8a, 0x6e, 0x57, 0xf0, 0x66, 0xf2, 0x93, 0x44, 0xd4, 0x36, 0x3d, - 0xe1, 0x09, 0xf5, 0xd9, 0x8c, 0xbf, 0xb2, 0x59, 0x4d, 0xed, 0x04, 0xb4, 0x8b, 0xe9, 0xec, 0x43, - 0x3d, 0xeb, 0x86, 0x42, 0x4a, 0x95, 0xc7, 0x3e, 0x0f, 0xa8, 0x27, 0x53, 0xc0, 0xb6, 0x06, 0x64, - 0x1f, 0xe9, 0xc2, 0x96, 0x5e, 0xe8, 0xd1, 0x90, 0x76, 0x33, 0xfc, 0x83, 0xe1, 0x34, 0x72, 0xe6, - 0x73, 0xcf, 0xe6, 0x82, 0xbb, 0x98, 0x2d, 0x93, 0xa1, 0x40, 0x99, 0xce, 0x99, 0xff, 0x1a, 0xb0, - 0xf1, 0x5c, 0x7a, 0xdf, 0xf7, 0x18, 0x8d, 0xf0, 0x24, 0x5d, 0x27, 0x55, 0x58, 0x76, 0x43, 0xa4, - 0x91, 0x08, 0xab, 0xc6, 0xae, 0xb1, 0xb7, 0x6a, 0x65, 0x43, 0xf2, 0x08, 0x36, 0x45, 0xc0, 0xec, - 0x8c, 0xc9, 0xa6, 0x8c, 0x85, 0x28, 0x65, 0xf5, 0x86, 0x82, 0x11, 0x11, 0xb0, 0x8c, 0xe4, 0x30, - 0x59, 0x89, 0x23, 0x38, 0xbe, 0x2a, 0x46, 0x2c, 0x26, 0x11, 0x1c, 0x5f, 0x8d, 0x47, 0x9c, 0xc1, - 0x7b, 0x7d, 0x55, 0x8f, 0x1d, 0x22, 0x95, 0x82, 0x57, 0x6f, 0xee, 0x1a, 0x7b, 0xeb, 0xad, 0x83, - 0x46, 0xc9, 0x6e, 0x34, 0x32, 0x92, 0x44, 0x89, 0xa5, 0x02, 0xad, 0xb5, 0xfe, 0xc8, 0xc8, 0xbc, - 0x07, 0x3b, 0x05, 0xa9, 0x16, 0xca, 0x9e, 0xe0, 0x12, 0xcd, 0x3f, 0x92, 0x46, 0x1c, 0x32, 0x76, - 0x14, 0x08, 0xf7, 0xc5, 0x53, 0xa4, 0xac, 0xb4, 0x11, 0x3b, 0xb0, 0x92, 0x6c, 0x98, 0xcf, 0x94, - 0xf8, 0x45, 0x6b, 0x59, 0x8d, 0xdb, 0x8c, 0x3c, 0x00, 0x70, 0x62, 0x0e, 0xbb, 0x43, 0x65, 0x47, - 0xe9, 0x5c, 0xb3, 0x56, 0x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0x7b, 0x53, 0x5f, 0xf8, 0xeb, 0xa6, 0xbe, 0xf0, 0x43, 0xc3, 0xf3, 0xa3, + 0x76, 0xcf, 0x31, 0x5d, 0xde, 0x69, 0xc4, 0x8c, 0x4f, 0x24, 0x79, 0x23, 0x23, 0x6f, 0x5c, 0x35, + 0x06, 0xdf, 0xa9, 0xfd, 0x2e, 0x0a, 0x67, 0x49, 0x7e, 0xaa, 0x3e, 0x7d, 0x17, 0x00, 0x00, 0xff, + 0xff, 0xb0, 0x04, 0xdc, 0x72, 0x9b, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. From e481cd9c177bb4abeee5bf491e10bfc6dc95570a Mon Sep 17 00:00:00 2001 From: skosito Date: Fri, 22 Mar 2024 16:39:58 +0100 Subject: [PATCH 31/41] Fixes after merge --- cmd/zetatool/filterdeposit/btc.go | 4 ++-- cmd/zetatool/filterdeposit/evm.go | 4 ++-- x/observer/keeper/msg_server_reset_chain_nonces.go | 4 ++-- .../keeper/msg_server_reset_chain_nonces_test.go | 10 +++++----- x/observer/types/message_reset_chain_nonces.go | 4 ++-- .../types/message_reset_chain_nonces_test.go | 14 +++++++------- zetaclient/testutils/stub/chain_signer.go | 6 +++--- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/cmd/zetatool/filterdeposit/btc.go b/cmd/zetatool/filterdeposit/btc.go index bc2397523d..a8ded3f08b 100644 --- a/cmd/zetatool/filterdeposit/btc.go +++ b/cmd/zetatool/filterdeposit/btc.go @@ -13,7 +13,7 @@ import ( "github.com/spf13/cobra" "github.com/zeta-chain/zetacore/cmd/zetatool/config" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" ) func NewBtcCmd() *cobra.Command { @@ -162,7 +162,7 @@ func getHashList(cfg *config.Config, tssAddress string) ([]Deposit, error) { if err != nil { continue } - if bytes.Equal(memoBytes, []byte(common.DonationMessage)) { + if bytes.Equal(memoBytes, []byte(pkg.DonationMessage)) { continue } } else { diff --git a/cmd/zetatool/filterdeposit/evm.go b/cmd/zetatool/filterdeposit/evm.go index 73e1f8b78f..4e26ed1338 100644 --- a/cmd/zetatool/filterdeposit/evm.go +++ b/cmd/zetatool/filterdeposit/evm.go @@ -18,7 +18,7 @@ import ( "github.com/zeta-chain/protocol-contracts/pkg/contracts/evm/erc20custody.sol" "github.com/zeta-chain/protocol-contracts/pkg/contracts/evm/zetaconnector.non-eth.sol" "github.com/zeta-chain/zetacore/cmd/zetatool/config" - zetacommon "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" ) const ( @@ -202,7 +202,7 @@ func getTSSDeposits(tssAddress string, startBlock uint64, endBlock uint64, apiKe for _, tx := range txns { if tx.To == tssAddress { - if strings.Compare(tx.Input, zetacommon.DonationMessage) == 0 { + if strings.Compare(tx.Input, pkg.DonationMessage) == 0 { continue // skip donation tx } if tx.TxReceiptStatus != "1" { diff --git a/x/observer/keeper/msg_server_reset_chain_nonces.go b/x/observer/keeper/msg_server_reset_chain_nonces.go index b3d1731645..feb23b58c4 100644 --- a/x/observer/keeper/msg_server_reset_chain_nonces.go +++ b/x/observer/keeper/msg_server_reset_chain_nonces.go @@ -4,7 +4,7 @@ import ( "context" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -22,7 +22,7 @@ func (k msgServer) ResetChainNonces(goCtx context.Context, msg *types.MsgResetCh return nil, types.ErrTssNotFound } - chain := common.GetChainFromChainID(msg.ChainId) + chain := pkg.GetChainFromChainID(msg.ChainId) if chain == nil { return nil, types.ErrSupportedChains } diff --git a/x/observer/keeper/msg_server_reset_chain_nonces_test.go b/x/observer/keeper/msg_server_reset_chain_nonces_test.go index 46da328fe8..0b1e60e4c6 100644 --- a/x/observer/keeper/msg_server_reset_chain_nonces_test.go +++ b/x/observer/keeper/msg_server_reset_chain_nonces_test.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" @@ -19,7 +19,7 @@ func TestMsgServer_ResetChainNonces(t *testing.T) { UseAuthorityMock: true, }) srv := keeper.NewMsgServerImpl(*k) - chainId := common.GoerliLocalnetChain().ChainId + chainId := pkg.GoerliLocalnetChain().ChainId admin := sample.AccAddress() authorityMock := keepertest.GetObserverAuthorityMock(t, k) @@ -44,7 +44,7 @@ func TestMsgServer_ResetChainNonces(t *testing.T) { authorityMock := keepertest.GetObserverAuthorityMock(t, k) keepertest.MockIsAuthorized(&authorityMock.Mock, admin, authoritytypes.PolicyType_groupAdmin, true) - chainId := common.GoerliLocalnetChain().ChainId + chainId := pkg.GoerliLocalnetChain().ChainId _, err := srv.ResetChainNonces(sdk.WrapSDKContext(ctx), &types.MsgResetChainNonces{ Creator: admin, ChainId: chainId, @@ -88,8 +88,8 @@ func TestMsgServer_ResetChainNonces(t *testing.T) { keepertest.MockIsAuthorized(&authorityMock.Mock, admin, authoritytypes.PolicyType_groupAdmin, true) keepertest.MockIsAuthorized(&authorityMock.Mock, admin, authoritytypes.PolicyType_groupAdmin, true) - chainId := common.GoerliLocalnetChain().ChainId - index := common.GoerliLocalnetChain().ChainName.String() + chainId := pkg.GoerliLocalnetChain().ChainId + index := pkg.GoerliLocalnetChain().ChainName.String() // check existing chain nonces _, found := k.GetChainNonces(ctx, index) diff --git a/x/observer/types/message_reset_chain_nonces.go b/x/observer/types/message_reset_chain_nonces.go index 71e438d103..b14cb75df1 100644 --- a/x/observer/types/message_reset_chain_nonces.go +++ b/x/observer/types/message_reset_chain_nonces.go @@ -4,7 +4,7 @@ import ( "errors" cosmoserrors "cosmossdk.io/errors" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -51,7 +51,7 @@ func (msg *MsgResetChainNonces) ValidateBasic() error { } // Check if chain exists - chain := common.GetChainFromChainID(msg.ChainId) + chain := pkg.GetChainFromChainID(msg.ChainId) if chain == nil { return cosmoserrors.Wrapf(sdkerrors.ErrInvalidChainID, "invalid chain id (%d)", msg.ChainId) } diff --git a/x/observer/types/message_reset_chain_nonces_test.go b/x/observer/types/message_reset_chain_nonces_test.go index 7043432952..3b8f1788f4 100644 --- a/x/observer/types/message_reset_chain_nonces_test.go +++ b/x/observer/types/message_reset_chain_nonces_test.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -20,7 +20,7 @@ func TestMsgResetChainNonces_ValidateBasic(t *testing.T) { name: "valid message chain nonce high greater than nonce low", msg: types.MsgResetChainNonces{ Creator: sample.AccAddress(), - ChainId: common.ExternalChainList()[0].ChainId, + ChainId: pkg.ExternalChainList()[0].ChainId, ChainNonceLow: 1, ChainNonceHigh: 5, }, @@ -30,7 +30,7 @@ func TestMsgResetChainNonces_ValidateBasic(t *testing.T) { name: "valid message chain nonce high same as nonce low", msg: types.MsgResetChainNonces{ Creator: sample.AccAddress(), - ChainId: common.ExternalChainList()[0].ChainId, + ChainId: pkg.ExternalChainList()[0].ChainId, ChainNonceLow: 1, ChainNonceHigh: 1, }, @@ -40,7 +40,7 @@ func TestMsgResetChainNonces_ValidateBasic(t *testing.T) { name: "invalid address", msg: types.MsgResetChainNonces{ Creator: "invalid_address", - ChainId: common.ExternalChainList()[0].ChainId, + ChainId: pkg.ExternalChainList()[0].ChainId, }, wantErr: true, }, @@ -56,7 +56,7 @@ func TestMsgResetChainNonces_ValidateBasic(t *testing.T) { name: "invalid chain nonce low", msg: types.MsgResetChainNonces{ Creator: sample.AccAddress(), - ChainId: common.ExternalChainList()[0].ChainId, + ChainId: pkg.ExternalChainList()[0].ChainId, ChainNonceLow: -1, }, wantErr: true, @@ -65,7 +65,7 @@ func TestMsgResetChainNonces_ValidateBasic(t *testing.T) { name: "invalid chain nonce high", msg: types.MsgResetChainNonces{ Creator: sample.AccAddress(), - ChainId: common.ExternalChainList()[0].ChainId, + ChainId: pkg.ExternalChainList()[0].ChainId, ChainNonceLow: 1, ChainNonceHigh: -1, }, @@ -75,7 +75,7 @@ func TestMsgResetChainNonces_ValidateBasic(t *testing.T) { name: "invalid chain nonce low greater than chain nonce high", msg: types.MsgResetChainNonces{ Creator: sample.AccAddress(), - ChainId: common.ExternalChainList()[0].ChainId, + ChainId: pkg.ExternalChainList()[0].ChainId, ChainNonceLow: 1, ChainNonceHigh: 0, }, diff --git a/zetaclient/testutils/stub/chain_signer.go b/zetaclient/testutils/stub/chain_signer.go index 364cbc22bb..e659a16278 100644 --- a/zetaclient/testutils/stub/chain_signer.go +++ b/zetaclient/testutils/stub/chain_signer.go @@ -2,7 +2,7 @@ package stub import ( ethcommon "github.com/ethereum/go-ethereum/common" - "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/pkg" crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" "github.com/zeta-chain/zetacore/zetaclient/interfaces" "github.com/zeta-chain/zetacore/zetaclient/outtxprocessor" @@ -15,13 +15,13 @@ var _ interfaces.ChainSigner = (*EVMSigner)(nil) // EVMSigner is a mock of evm chain signer for testing type EVMSigner struct { - Chain common.Chain + Chain pkg.Chain ZetaConnectorAddress ethcommon.Address ERC20CustodyAddress ethcommon.Address } func NewEVMSigner( - chain common.Chain, + chain pkg.Chain, zetaConnectorAddress ethcommon.Address, erc20CustodyAddress ethcommon.Address, ) *EVMSigner { From ea2041941d58f97adbbc7eeba74d8cdb7f2e7181 Mon Sep 17 00:00:00 2001 From: skosito Date: Fri, 22 Mar 2024 17:02:05 +0100 Subject: [PATCH 32/41] Move pkg proto to proto package --- pkg/{ => proto}/pkg.pb.go | 89 +++---- proto/pkg/pkg.proto | 2 +- x/crosschain/types/cross_chain_tx.pb.go | 142 +++++----- x/crosschain/types/events.pb.go | 66 ++--- x/crosschain/types/in_tx_tracker.pb.go | 14 +- x/crosschain/types/tx.pb.go | 266 +++++++++---------- x/fungible/types/events.pb.go | 134 +++++----- x/fungible/types/foreign_coins.pb.go | 64 ++--- x/fungible/types/tx.pb.go | 152 +++++------ x/observer/types/chain_nonces.pb.go | 40 +-- x/observer/types/node_account.pb.go | 60 ++--- x/observer/types/nonce_to_cctx.pb.go | 26 +- x/observer/types/observer.pb.go | 68 ++--- x/observer/types/params.pb.go | 92 +++---- x/observer/types/pending_nonces.pb.go | 36 +-- x/observer/types/query.pb.go | 330 ++++++++++++------------ x/observer/types/tx.pb.go | 144 +++++------ 17 files changed, 863 insertions(+), 862 deletions(-) rename pkg/{ => proto}/pkg.pb.go (89%) diff --git a/pkg/pkg.pb.go b/pkg/proto/pkg.pb.go similarity index 89% rename from pkg/pkg.pb.go rename to pkg/proto/pkg.pb.go index 66ed9b6e77..5d14e0cf5f 100644 --- a/pkg/pkg.pb.go +++ b/pkg/proto/pkg.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: pkg/pkg.proto -package pkg +package proto import ( fmt "fmt" @@ -523,50 +523,51 @@ func init() { func init() { proto.RegisterFile("pkg/pkg.proto", fileDescriptor_9a6ed24fa3ed052d) } var fileDescriptor_9a6ed24fa3ed052d = []byte{ - // 686 bytes of a gzipped FileDescriptorProto + // 690 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x94, 0xcb, 0x6e, 0xd3, 0x4c, - 0x14, 0x80, 0xed, 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x04, 0xe0, 0x88, 0x60, 0x1e, 0xd1, - 0x10, 0xe5, 0x98, 0xce, 0xa8, 0x33, 0x14, 0x4f, 0x29, 0xf3, 0x1f, 0x68, 0x88, 0x96, 0xe1, 0xa8, - 0x90, 0xec, 0x42, 0x23, 0xd3, 0x03, 0x57, 0xb6, 0x2f, 0x5b, 0x75, 0x79, 0x7e, 0xe7, 0x0e, 0x2e, - 0x74, 0x68, 0x4e, 0x96, 0xcc, 0x59, 0x9c, 0x22, 0x75, 0x31, 0x21, 0x77, 0xa0, 0xe6, 0x63, 0xe0, - 0xf9, 0x5c, 0x76, 0x2d, 0x5b, 0xf9, 0x89, 0x10, 0xa8, 0xf8, 0x34, 0xf5, 0x65, 0x79, 0xcb, 0x92, - 0x31, 0xe9, 0x43, 0x33, 0xa6, 0x09, 0x46, 0x7c, 0x2e, 0x53, 0x65, 0x99, 0x82, 0x0c, 0x9d, 0x0a, - 0xe1, 0xf6, 0xdc, 0xca, 0x3f, 0x73, 0xc9, 0x91, 0x98, 0x23, 0x26, 0xee, 0x54, 0xf7, 0xf5, 0x83, - 0xe6, 0xa8, 0x2b, 0xb7, 0xcf, 0x96, 0x78, 0x45, 0x39, 0x9d, 0x54, 0x2e, 0xaf, 0xfb, 0x9a, 0x95, - 0x4b, 0x03, 0x1f, 0x60, 0x9b, 0x23, 0x0f, 0xa1, 0xab, 0xde, 0xcc, 0x3c, 0xef, 0x22, 0xb6, 0x6d, - 0x9d, 0x6a, 0x56, 0x47, 0x25, 0xf2, 0xe7, 0x79, 0x00, 0x9d, 0xfc, 0x05, 0x2b, 0xb3, 0x94, 0x9b, - 0xed, 0x9c, 0x67, 0xe2, 0xa4, 0x06, 0x15, 0x97, 0x72, 0x3a, 0xf8, 0xa6, 0x43, 0xf5, 0x2c, 0x61, - 0xec, 0x33, 0x79, 0x06, 0x45, 0xb3, 0x79, 0x2c, 0x88, 0x1c, 0x22, 0x56, 0x2d, 0xae, 0x85, 0x14, - 0x45, 0x2f, 0x45, 0xb2, 0xca, 0x31, 0xa8, 0xe6, 0x79, 0x61, 0x49, 0x16, 0x76, 0x86, 0xea, 0xae, - 0xa9, 0xba, 0x56, 0x0e, 0xe4, 0x79, 0x52, 0x87, 0xaa, 0xd4, 0x0f, 0x5f, 0x40, 0xdb, 0x42, 0x07, - 0x83, 0x2f, 0x38, 0xe3, 0x94, 0xaf, 0x52, 0xd2, 0x84, 0xfa, 0x34, 0x41, 0xca, 0xd1, 0x35, 0x35, - 0x71, 0x98, 0xad, 0x1c, 0x07, 0xd3, 0xd4, 0xd4, 0x09, 0x40, 0xed, 0x0d, 0x0d, 0x96, 0xe8, 0x9a, - 0xa5, 0xbd, 0xca, 0x8f, 0x8b, 0x9e, 0x7e, 0xf8, 0x14, 0x1a, 0x53, 0x16, 0x44, 0x9f, 0xd6, 0x31, - 0x92, 0x06, 0x54, 0xce, 0x91, 0x53, 0x53, 0x23, 0x75, 0x28, 0xbf, 0xa5, 0xa2, 0xc0, 0x80, 0xea, - 0x6b, 0x6b, 0x3a, 0x7a, 0x64, 0x96, 0x04, 0x9b, 0x86, 0xae, 0x59, 0xce, 0x0b, 0x7f, 0x96, 0xc0, - 0x28, 0xae, 0x8f, 0xf0, 0x30, 0x8c, 0xf9, 0xda, 0xd4, 0x48, 0x17, 0x9a, 0xc8, 0xfd, 0x79, 0x48, - 0x83, 0x28, 0x42, 0x6e, 0xea, 0xc4, 0x84, 0xd6, 0x57, 0xe4, 0xb4, 0x20, 0x25, 0xa1, 0xd8, 0xdc, - 0x29, 0x40, 0x99, 0xfc, 0x07, 0xdd, 0x98, 0x2d, 0xd7, 0x1e, 0x8b, 0x0a, 0x58, 0x91, 0x56, 0xba, - 0xb5, 0xaa, 0x84, 0x40, 0xc7, 0x63, 0x98, 0x2c, 0x83, 0x39, 0xc7, 0x94, 0x0b, 0x56, 0x13, 0x2c, - 0x5c, 0x85, 0x36, 0xdd, 0xb2, 0xba, 0xe8, 0xe6, 0xd1, 0x88, 0x3a, 0x3e, 0x16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, 0xb6, 0x3d, 0xfd, 0xdb, 0x6d, 0x4f, 0xbb, + 0xbe, 0xed, 0x69, 0x3f, 0x6f, 0x7b, 0xda, 0xc5, 0x91, 0x17, 0x70, 0x7f, 0x6d, 0x0f, 0x1d, 0x16, + 0x8e, 0xc4, 0x1a, 0x27, 0xf2, 0xf8, 0xcb, 0xd0, 0x61, 0x09, 0x8e, 0xe4, 0xdd, 0x24, 0x2e, 0x11, + 0xbb, 0x26, 0x1f, 0x8f, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x86, 0x9e, 0x4b, 0x02, 0xaf, 0x04, + 0x00, 0x00, } func (m *PubKeySet) Marshal() (dAtA []byte, err error) { diff --git a/proto/pkg/pkg.proto b/proto/pkg/pkg.proto index a666ba2bb8..5a92b5f031 100644 --- a/proto/pkg/pkg.proto +++ b/proto/pkg/pkg.proto @@ -8,7 +8,7 @@ import "gogoproto/gogo.proto"; import "pkg/bitcoin/bitcoin.proto"; import "pkg/ethereum/ethereum.proto"; -option go_package = "github.com/zeta-chain/zetacore/pkg"; +option go_package = "github.com/zeta-chain/zetacore/pkg/proto"; // PubKeySet contains two pub keys , secp256k1 and ed25519 message PubKeySet { diff --git a/x/crosschain/types/cross_chain_tx.pb.go b/x/crosschain/types/cross_chain_tx.pb.go index e3e762f818..17ba755231 100644 --- a/x/crosschain/types/cross_chain_tx.pb.go +++ b/x/crosschain/types/cross_chain_tx.pb.go @@ -12,7 +12,7 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - pkg "github.com/zeta-chain/zetacore/pkg" + proto1 "github.com/zeta-chain/zetacore/pkg/proto" ) // Reference imports to suppress errors if they are not otherwise used. @@ -95,7 +95,7 @@ type InboundTxParams struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` SenderChainId int64 `protobuf:"varint,2,opt,name=sender_chain_id,json=senderChainId,proto3" json:"sender_chain_id,omitempty"` TxOrigin string `protobuf:"bytes,3,opt,name=tx_origin,json=txOrigin,proto3" json:"tx_origin,omitempty"` - CoinType pkg.CoinType `protobuf:"varint,4,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` + CoinType proto1.CoinType `protobuf:"varint,4,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` Asset string `protobuf:"bytes,5,opt,name=asset,proto3" json:"asset,omitempty"` Amount github_com_cosmos_cosmos_sdk_types.Uint `protobuf:"bytes,6,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Uint" json:"amount"` InboundTxObservedHash string `protobuf:"bytes,7,opt,name=inbound_tx_observed_hash,json=inboundTxObservedHash,proto3" json:"inbound_tx_observed_hash,omitempty"` @@ -159,11 +159,11 @@ func (m *InboundTxParams) GetTxOrigin() string { return "" } -func (m *InboundTxParams) GetCoinType() pkg.CoinType { +func (m *InboundTxParams) GetCoinType() proto1.CoinType { if m != nil { return m.CoinType } - return pkg.CoinType_Zeta + return proto1.CoinType_Zeta } func (m *InboundTxParams) GetAsset() string { @@ -249,7 +249,7 @@ var xxx_messageInfo_ZetaAccounting proto.InternalMessageInfo type OutboundTxParams struct { Receiver string `protobuf:"bytes,1,opt,name=receiver,proto3" json:"receiver,omitempty"` ReceiverChainId int64 `protobuf:"varint,2,opt,name=receiver_chainId,json=receiverChainId,proto3" json:"receiver_chainId,omitempty"` - CoinType pkg.CoinType `protobuf:"varint,3,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` + CoinType proto1.CoinType `protobuf:"varint,3,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` Amount github_com_cosmos_cosmos_sdk_types.Uint `protobuf:"bytes,4,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Uint" json:"amount"` OutboundTxTssNonce uint64 `protobuf:"varint,5,opt,name=outbound_tx_tss_nonce,json=outboundTxTssNonce,proto3" json:"outbound_tx_tss_nonce,omitempty"` OutboundTxGasLimit uint64 `protobuf:"varint,6,opt,name=outbound_tx_gas_limit,json=outboundTxGasLimit,proto3" json:"outbound_tx_gas_limit,omitempty"` @@ -313,11 +313,11 @@ func (m *OutboundTxParams) GetReceiverChainId() int64 { return 0 } -func (m *OutboundTxParams) GetCoinType() pkg.CoinType { +func (m *OutboundTxParams) GetCoinType() proto1.CoinType { if m != nil { return m.CoinType } - return pkg.CoinType_Zeta + return proto1.CoinType_Zeta } func (m *OutboundTxParams) GetOutboundTxTssNonce() uint64 { @@ -565,68 +565,68 @@ var fileDescriptor_af3a0ad055343c21 = []byte{ 0x82, 0x6a, 0x7e, 0xd6, 0x5e, 0x5c, 0x7e, 0xfa, 0x77, 0xb5, 0x67, 0xce, 0xcc, 0xf7, 0x9d, 0x33, 0x73, 0xbe, 0x33, 0xb3, 0x50, 0xf5, 0x23, 0xc6, 0xb9, 0xdf, 0xc5, 0x34, 0x6c, 0x29, 0xd3, 0x53, 0xb6, 0x27, 0x46, 0xcd, 0x41, 0xc4, 0x04, 0x43, 0x0f, 0xdf, 0x11, 0x81, 0x95, 0xaf, 0xa9, 0x2c, - 0x16, 0x91, 0xe6, 0x04, 0xb3, 0x5c, 0x1c, 0x9c, 0x74, 0x5a, 0x83, 0x93, 0x8e, 0x5e, 0xbd, 0x5c, - 0xee, 0xb0, 0x0e, 0x53, 0x66, 0x4b, 0x5a, 0xda, 0x5b, 0xff, 0x3d, 0x03, 0xa5, 0x9d, 0xb0, 0xcd, - 0x86, 0x61, 0x70, 0x30, 0xda, 0xc7, 0x11, 0xee, 0x73, 0xb4, 0x04, 0x59, 0x4e, 0xc2, 0x80, 0x44, - 0x8e, 0x55, 0xb3, 0x1a, 0x79, 0xd7, 0x8c, 0xd0, 0x63, 0x28, 0x69, 0xcb, 0x24, 0x42, 0x03, 0xe7, - 0x5e, 0xcd, 0x6a, 0xa4, 0xdd, 0xa2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x9a, 0x77, - 0xb0, 0x4d, 0xfd, 0x90, 0xb8, 0x25, 0x3a, 0xf5, 0x87, 0xf2, 0x15, 0xa0, 0x64, 0x47, 0x18, 0x72, - 0xa8, 0xa5, 0x1b, 0x85, 0xb5, 0xd6, 0x1d, 0xe4, 0xd3, 0xaf, 0x81, 0x6b, 0xb3, 0x29, 0xcf, 0xca, - 0xb7, 0x00, 0x13, 0xa1, 0x21, 0x04, 0x73, 0xfb, 0x24, 0x0c, 0x68, 0xd8, 0x31, 0x79, 0xd9, 0x29, - 0xb4, 0x00, 0x25, 0xe3, 0x8b, 0xe9, 0x6c, 0x0b, 0xcd, 0x43, 0x31, 0x1e, 0xbd, 0xa5, 0x21, 0x09, - 0xec, 0xb4, 0x74, 0x99, 0x75, 0x2e, 0x39, 0x25, 0x91, 0xb0, 0x33, 0x68, 0x16, 0x72, 0xda, 0x26, - 0x81, 0x7d, 0x1f, 0x15, 0x60, 0x66, 0x5d, 0x3f, 0x5a, 0x76, 0x76, 0x39, 0xf3, 0xe3, 0x0f, 0x15, - 0x6b, 0xe5, 0x35, 0x94, 0xaf, 0x6b, 0x26, 0x64, 0xc3, 0xec, 0x2e, 0x13, 0xe3, 0x27, 0xdc, 0x4e, - 0xa1, 0x22, 0xe4, 0x27, 0x43, 0x4b, 0x32, 0x6f, 0x8d, 0x88, 0x3f, 0x94, 0x64, 0xf7, 0x34, 0xd9, - 0xc6, 0xeb, 0xf7, 0x17, 0x15, 0xeb, 0xc3, 0x45, 0xc5, 0xfa, 0xed, 0xa2, 0x62, 0x7d, 0x77, 0x59, - 0x49, 0x7d, 0xb8, 0xac, 0xa4, 0x7e, 0xb9, 0xac, 0xa4, 0x8e, 0x56, 0x13, 0xba, 0x92, 0xe7, 0xf4, - 0x4c, 0xff, 0x69, 0xc6, 0x47, 0xd6, 0x1a, 0xb5, 0x12, 0xff, 0x9f, 0x4a, 0x66, 0xed, 0xac, 0xfa, - 0x67, 0x7c, 0xfe, 0x67, 0x00, 0x00, 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d7, 0x4c, 0xc8, 0x86, 0xd9, 0x5d, 0x26, 0xc6, 0x4f, 0xb8, 0x9d, + 0x42, 0x45, 0xc8, 0x4f, 0x86, 0x96, 0x64, 0xde, 0x1a, 0x11, 0x7f, 0x28, 0xc9, 0xee, 0x69, 0xb2, + 0x8d, 0xd7, 0xef, 0x2f, 0x2a, 0xd6, 0x87, 0x8b, 0x8a, 0xf5, 0xdb, 0x45, 0xc5, 0xfa, 0xee, 0xb2, + 0x92, 0xfa, 0x70, 0x59, 0x49, 0xfd, 0x72, 0x59, 0x49, 0x1d, 0xad, 0x26, 0x74, 0x25, 0xcf, 0xe9, + 0x99, 0xfe, 0xd3, 0x8c, 0x8f, 0xac, 0x35, 0x6a, 0x25, 0xfe, 0x3f, 0x95, 0xcc, 0xda, 0x59, 0xf5, + 0xcf, 0xf8, 0xfc, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfb, 0xe0, 0xd3, 0xd8, 0x9a, 0x0a, 0x00, 0x00, } @@ -1338,7 +1338,7 @@ func (m *InboundTxParams) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CoinType |= pkg.CoinType(b&0x7F) << shift + m.CoinType |= proto1.CoinType(b&0x7F) << shift if b < 0x80 { break } @@ -1729,7 +1729,7 @@ func (m *OutboundTxParams) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CoinType |= pkg.CoinType(b&0x7F) << shift + m.CoinType |= proto1.CoinType(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/crosschain/types/events.pb.go b/x/crosschain/types/events.pb.go index 226122121c..2f2b5aa604 100644 --- a/x/crosschain/types/events.pb.go +++ b/x/crosschain/types/events.pb.go @@ -11,7 +11,7 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - _ "github.com/zeta-chain/zetacore/pkg" + _ "github.com/zeta-chain/zetacore/pkg/proto" ) // Reference imports to suppress errors if they are not otherwise used. @@ -587,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94, 0xbc, 0x01, 0x28, 0x6f, 0xd5, + 0x2f, 0x8c, 0x26, 0xde, 0xcd, 0xf9, 0x9e, 0x33, 0x87, 0xcf, 0x7c, 0xcf, 0xd2, 0x83, 0x56, 0x22, + 0x25, 0xb5, 0x8e, 0x12, 0xca, 0xc5, 0x00, 0x8e, 0x40, 0x18, 0xdd, 0x9f, 0x28, 0x69, 0x64, 0xb8, + 0x7a, 0x0a, 0x86, 0x3a, 0xbd, 0xef, 0x4e, 0x52, 0x41, 0xff, 0xb2, 0xb6, 0xbb, 0xcc, 0x24, 0x93, + 0xae, 0x72, 0x60, 0x4f, 0xfe, 0x52, 0xb7, 0x3d, 0x39, 0x64, 0x83, 0xc9, 0x21, 0xf3, 0xe1, 0xfa, + 0xe7, 0x39, 0xf4, 0xff, 0x13, 0xdb, 0x74, 0x5b, 0x8c, 0x64, 0x26, 0xe2, 0x4d, 0x2e, 0x68, 0xca, + 0x4f, 0x21, 0x0e, 0xd7, 0xd0, 0xe2, 0x58, 0x33, 0x62, 0x4e, 0x26, 0x40, 0x32, 0x95, 0xe2, 0x60, + 0x2d, 0xb8, 0xdf, 0xda, 0x45, 0x63, 0xcd, 0xf6, 0x4f, 0x26, 0xf0, 0x52, 0xa5, 0xe1, 0x2a, 0x42, + 0x51, 0x64, 0x72, 0xc2, 0x45, 0x0c, 0x39, 0x9e, 0x75, 0xf9, 0x96, 0x55, 0xb6, 0xad, 0x10, 0xde, + 0x40, 0x0d, 0x0d, 0x22, 0x06, 0x85, 0xe7, 0x5c, 0xaa, 0x88, 0xc2, 0x9b, 0xa8, 0x69, 0x72, 0x22, + 0x15, 0xe3, 0x02, 0xd7, 0x5c, 0x66, 0xde, 0xe4, 0x3b, 0x36, 0x0c, 0x97, 0x51, 0x9d, 0x6a, 0x0d, + 0x06, 0xd7, 0x9d, 0xee, 0x83, 0xf0, 0x16, 0x42, 0x5c, 0x10, 0x93, 0x93, 0x84, 0xea, 0x04, 0x37, + 0x5c, 0xaa, 0xc9,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c, 0xf2, 0xc1, 0x95, 0x25, 0x63, 0xad, 0xd7, 0xa3, 0x86, 0x5b, 0x10, 0x8f, 0xbf, 0x05, 0x00, - 0x00, 0xff, 0xff, 0xdd, 0x79, 0x30, 0xda, 0x7f, 0x06, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xdd, 0x9e, 0xb3, 0xe1, 0x7f, 0x06, 0x00, 0x00, } func (m *EventInboundFinalized) Marshal() (dAtA []byte, err error) { diff --git a/x/crosschain/types/in_tx_tracker.pb.go b/x/crosschain/types/in_tx_tracker.pb.go index e0932d86de..41df88abf9 100644 --- a/x/crosschain/types/in_tx_tracker.pb.go +++ b/x/crosschain/types/in_tx_tracker.pb.go @@ -10,7 +10,7 @@ import ( math_bits "math/bits" proto "github.com/gogo/protobuf/proto" - pkg "github.com/zeta-chain/zetacore/pkg" + proto1 "github.com/zeta-chain/zetacore/pkg/proto" ) // Reference imports to suppress errors if they are not otherwise used. @@ -25,9 +25,9 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type InTxTracker struct { - ChainId int64 `protobuf:"varint,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - TxHash string `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` - CoinType pkg.CoinType `protobuf:"varint,3,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` + ChainId int64 `protobuf:"varint,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + TxHash string `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + CoinType proto1.CoinType `protobuf:"varint,3,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` } func (m *InTxTracker) Reset() { *m = InTxTracker{} } @@ -77,11 +77,11 @@ func (m *InTxTracker) GetTxHash() string { return "" } -func (m *InTxTracker) GetCoinType() pkg.CoinType { +func (m *InTxTracker) GetCoinType() proto1.CoinType { if m != nil { return m.CoinType } - return pkg.CoinType_Zeta + return proto1.CoinType_Zeta } func init() { @@ -279,7 +279,7 @@ func (m *InTxTracker) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CoinType |= pkg.CoinType(b&0x7F) << shift + m.CoinType |= proto1.CoinType(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/crosschain/types/tx.pb.go b/x/crosschain/types/tx.pb.go index 186d066ddf..8e7e7fffe1 100644 --- a/x/crosschain/types/tx.pb.go +++ b/x/crosschain/types/tx.pb.go @@ -14,7 +14,7 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" - pkg "github.com/zeta-chain/zetacore/pkg" + proto1 "github.com/zeta-chain/zetacore/pkg/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -32,10 +32,10 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type MsgCreateTSSVoter struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - TssPubkey string `protobuf:"bytes,2,opt,name=tss_pubkey,json=tssPubkey,proto3" json:"tss_pubkey,omitempty"` - KeyGenZetaHeight int64 `protobuf:"varint,3,opt,name=keyGenZetaHeight,proto3" json:"keyGenZetaHeight,omitempty"` - Status pkg.ReceiveStatus `protobuf:"varint,4,opt,name=status,proto3,enum=pkg.ReceiveStatus" json:"status,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + TssPubkey string `protobuf:"bytes,2,opt,name=tss_pubkey,json=tssPubkey,proto3" json:"tss_pubkey,omitempty"` + KeyGenZetaHeight int64 `protobuf:"varint,3,opt,name=keyGenZetaHeight,proto3" json:"keyGenZetaHeight,omitempty"` + Status proto1.ReceiveStatus `protobuf:"varint,4,opt,name=status,proto3,enum=pkg.ReceiveStatus" json:"status,omitempty"` } func (m *MsgCreateTSSVoter) Reset() { *m = MsgCreateTSSVoter{} } @@ -92,11 +92,11 @@ func (m *MsgCreateTSSVoter) GetKeyGenZetaHeight() int64 { return 0 } -func (m *MsgCreateTSSVoter) GetStatus() pkg.ReceiveStatus { +func (m *MsgCreateTSSVoter) GetStatus() proto1.ReceiveStatus { if m != nil { return m.Status } - return pkg.ReceiveStatus_Created + return proto1.ReceiveStatus_Created } type MsgCreateTSSVoterResponse struct { @@ -313,13 +313,13 @@ func (m *MsgUpdateTssAddressResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateTssAddressResponse proto.InternalMessageInfo type MsgAddToInTxTracker struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - TxHash string `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` - CoinType pkg.CoinType `protobuf:"varint,4,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` - Proof *pkg.Proof `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"` - BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` - TxIndex int64 `protobuf:"varint,7,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + TxHash string `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + CoinType proto1.CoinType `protobuf:"varint,4,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` + Proof *proto1.Proof `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"` + BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + TxIndex int64 `protobuf:"varint,7,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` } func (m *MsgAddToInTxTracker) Reset() { *m = MsgAddToInTxTracker{} } @@ -376,14 +376,14 @@ func (m *MsgAddToInTxTracker) GetTxHash() string { return "" } -func (m *MsgAddToInTxTracker) GetCoinType() pkg.CoinType { +func (m *MsgAddToInTxTracker) GetCoinType() proto1.CoinType { if m != nil { return m.CoinType } - return pkg.CoinType_Zeta + return proto1.CoinType_Zeta } -func (m *MsgAddToInTxTracker) GetProof() *pkg.Proof { +func (m *MsgAddToInTxTracker) GetProof() *proto1.Proof { if m != nil { return m.Proof } @@ -585,13 +585,13 @@ func (m *MsgWhitelistERC20Response) GetCctxIndex() string { } type MsgAddToOutTxTracker struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Nonce uint64 `protobuf:"varint,3,opt,name=nonce,proto3" json:"nonce,omitempty"` - TxHash string `protobuf:"bytes,4,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` - Proof *pkg.Proof `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"` - BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` - TxIndex int64 `protobuf:"varint,7,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + Nonce uint64 `protobuf:"varint,3,opt,name=nonce,proto3" json:"nonce,omitempty"` + TxHash string `protobuf:"bytes,4,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + Proof *proto1.Proof `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"` + BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + TxIndex int64 `protobuf:"varint,7,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` } func (m *MsgAddToOutTxTracker) Reset() { *m = MsgAddToOutTxTracker{} } @@ -655,7 +655,7 @@ func (m *MsgAddToOutTxTracker) GetTxHash() string { return "" } -func (m *MsgAddToOutTxTracker) GetProof() *pkg.Proof { +func (m *MsgAddToOutTxTracker) GetProof() *proto1.Proof { if m != nil { return m.Proof } @@ -937,10 +937,10 @@ type MsgVoteOnObservedOutboundTx struct { ObservedOutTxEffectiveGasPrice github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,11,opt,name=observed_outTx_effective_gas_price,json=observedOutTxEffectiveGasPrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"observed_outTx_effective_gas_price"` ObservedOutTxEffectiveGasLimit uint64 `protobuf:"varint,12,opt,name=observed_outTx_effective_gas_limit,json=observedOutTxEffectiveGasLimit,proto3" json:"observed_outTx_effective_gas_limit,omitempty"` ValueReceived github_com_cosmos_cosmos_sdk_types.Uint `protobuf:"bytes,5,opt,name=value_received,json=valueReceived,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Uint" json:"value_received" yaml:"value_received"` - Status pkg.ReceiveStatus `protobuf:"varint,6,opt,name=status,proto3,enum=pkg.ReceiveStatus" json:"status,omitempty"` + Status proto1.ReceiveStatus `protobuf:"varint,6,opt,name=status,proto3,enum=pkg.ReceiveStatus" json:"status,omitempty"` OutTxChain int64 `protobuf:"varint,7,opt,name=outTx_chain,json=outTxChain,proto3" json:"outTx_chain,omitempty"` OutTxTssNonce uint64 `protobuf:"varint,8,opt,name=outTx_tss_nonce,json=outTxTssNonce,proto3" json:"outTx_tss_nonce,omitempty"` - CoinType pkg.CoinType `protobuf:"varint,9,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` + CoinType proto1.CoinType `protobuf:"varint,9,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` } func (m *MsgVoteOnObservedOutboundTx) Reset() { *m = MsgVoteOnObservedOutboundTx{} } @@ -1018,11 +1018,11 @@ func (m *MsgVoteOnObservedOutboundTx) GetObservedOutTxEffectiveGasLimit() uint64 return 0 } -func (m *MsgVoteOnObservedOutboundTx) GetStatus() pkg.ReceiveStatus { +func (m *MsgVoteOnObservedOutboundTx) GetStatus() proto1.ReceiveStatus { if m != nil { return m.Status } - return pkg.ReceiveStatus_Created + return proto1.ReceiveStatus_Created } func (m *MsgVoteOnObservedOutboundTx) GetOutTxChain() int64 { @@ -1039,11 +1039,11 @@ func (m *MsgVoteOnObservedOutboundTx) GetOutTxTssNonce() uint64 { return 0 } -func (m *MsgVoteOnObservedOutboundTx) GetCoinType() pkg.CoinType { +func (m *MsgVoteOnObservedOutboundTx) GetCoinType() proto1.CoinType { if m != nil { return m.CoinType } - return pkg.CoinType_Zeta + return proto1.CoinType_Zeta } type MsgVoteOnObservedOutboundTxResponse struct { @@ -1091,13 +1091,13 @@ type MsgVoteOnObservedInboundTx struct { // string zeta_burnt = 6; Amount github_com_cosmos_cosmos_sdk_types.Uint `protobuf:"bytes,6,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Uint" json:"amount"` // string mMint = 7; - Message string `protobuf:"bytes,8,opt,name=message,proto3" json:"message,omitempty"` - InTxHash string `protobuf:"bytes,9,opt,name=in_tx_hash,json=inTxHash,proto3" json:"in_tx_hash,omitempty"` - InBlockHeight uint64 `protobuf:"varint,10,opt,name=in_block_height,json=inBlockHeight,proto3" json:"in_block_height,omitempty"` - GasLimit uint64 `protobuf:"varint,11,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` - CoinType pkg.CoinType `protobuf:"varint,12,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` - TxOrigin string `protobuf:"bytes,13,opt,name=tx_origin,json=txOrigin,proto3" json:"tx_origin,omitempty"` - Asset string `protobuf:"bytes,14,opt,name=asset,proto3" json:"asset,omitempty"` + Message string `protobuf:"bytes,8,opt,name=message,proto3" json:"message,omitempty"` + InTxHash string `protobuf:"bytes,9,opt,name=in_tx_hash,json=inTxHash,proto3" json:"in_tx_hash,omitempty"` + InBlockHeight uint64 `protobuf:"varint,10,opt,name=in_block_height,json=inBlockHeight,proto3" json:"in_block_height,omitempty"` + GasLimit uint64 `protobuf:"varint,11,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + CoinType proto1.CoinType `protobuf:"varint,12,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` + TxOrigin string `protobuf:"bytes,13,opt,name=tx_origin,json=txOrigin,proto3" json:"tx_origin,omitempty"` + Asset string `protobuf:"bytes,14,opt,name=asset,proto3" json:"asset,omitempty"` // event index of the sent asset in the observed tx EventIndex uint64 `protobuf:"varint,15,opt,name=event_index,json=eventIndex,proto3" json:"event_index,omitempty"` } @@ -1198,11 +1198,11 @@ func (m *MsgVoteOnObservedInboundTx) GetGasLimit() uint64 { return 0 } -func (m *MsgVoteOnObservedInboundTx) GetCoinType() pkg.CoinType { +func (m *MsgVoteOnObservedInboundTx) GetCoinType() proto1.CoinType { if m != nil { return m.CoinType } - return pkg.CoinType_Zeta + return proto1.CoinType_Zeta } func (m *MsgVoteOnObservedInboundTx) GetTxOrigin() string { @@ -1485,92 +1485,92 @@ var fileDescriptor_81d6d611190b7635 = []byte{ 0x8b, 0x32, 0x9a, 0xcb, 0xdd, 0xed, 0x1f, 0xd8, 0x38, 0xcf, 0x91, 0x15, 0xcb, 0x8e, 0x3f, 0x92, 0xd2, 0x2b, 0xeb, 0x79, 0x74, 0x9e, 0xaf, 0xdf, 0x79, 0xbe, 0x2c, 0xb8, 0x60, 0x07, 0x94, 0x31, 0xbb, 0x62, 0x79, 0x7e, 0x91, 0xb7, 0x0a, 0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, 0xa8, 0x87, 0xa0, 0xf7, 0x88, 0x91, 0x83, 0x03, 0x62, 0x73, 0xaf, 0x49, 0x50, - 0x81, 0xbc, 0x85, 0x59, 0x1c, 0x46, 0x85, 0x68, 0x18, 0xdd, 0x18, 0x63, 0x18, 0xed, 0xf8, 0xdc, - 0xc8, 0x27, 0x2c, 0x3e, 0xec, 0xe8, 0xed, 0x5c, 0x82, 0xfa, 0xc9, 0x08, 0xdb, 0xb2, 0xd5, 0xcc, - 0xa1, 0xf7, 0x83, 0x75, 0x61, 0x03, 0x52, 0x29, 0xcc, 0x37, 0xad, 0x5a, 0x48, 0xcc, 0x40, 0x0e, - 0x70, 0x47, 0xde, 0xff, 0xe6, 0xe3, 0x53, 0x0e, 0xd0, 0xbf, 0x5f, 0xaf, 0xfc, 0xb7, 0x6d, 0xd5, - 0x6b, 0x0f, 0xf4, 0xa4, 0x3a, 0xdd, 0xc8, 0x22, 0x23, 0xda, 0x0f, 0x9c, 0xae, 0xf5, 0x21, 0x35, - 0x6a, 0x7d, 0x50, 0x57, 0x60, 0x56, 0xc6, 0x87, 0xe9, 0x1d, 0x75, 0x00, 0x40, 0xd6, 0x96, 0xe0, - 0xa8, 0x37, 0x60, 0x41, 0x1e, 0x10, 0x43, 0x56, 0x56, 0x5f, 0x1a, 0xc3, 0xce, 0x22, 0xbb, 0xc4, - 0xd8, 0x53, 0xec, 0x50, 0x89, 0x11, 0x97, 0x19, 0x3a, 0xe2, 0xf4, 0xeb, 0x70, 0x6d, 0x48, 0x52, - 0xc7, 0xc9, 0xff, 0xcf, 0x24, 0x6e, 0x0a, 0xc9, 0x73, 0x3b, 0xfe, 0xe8, 0xdc, 0x17, 0x95, 0x46, - 0x7c, 0x87, 0x04, 0x51, 0xe2, 0x47, 0x94, 0x88, 0x45, 0x3e, 0x99, 0x3d, 0x13, 0x29, 0x2b, 0xd9, - 0x5b, 0x51, 0x89, 0x6b, 0x90, 0x8e, 0xc0, 0x0d, 0xa2, 0x76, 0x1b, 0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xfc, 0xcc, 0x76, 0xf7, 0xdf, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xb7, 0xf7, 0x9f, 0xc3, 0xc1, 0x13, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -3678,7 +3678,7 @@ func (m *MsgCreateTSSVoter) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Status |= pkg.ReceiveStatus(b&0x7F) << shift + m.Status |= proto1.ReceiveStatus(b&0x7F) << shift if b < 0x80 { break } @@ -4229,7 +4229,7 @@ func (m *MsgAddToInTxTracker) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CoinType |= pkg.CoinType(b&0x7F) << shift + m.CoinType |= proto1.CoinType(b&0x7F) << shift if b < 0x80 { break } @@ -4264,7 +4264,7 @@ func (m *MsgAddToInTxTracker) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Proof == nil { - m.Proof = &pkg.Proof{} + m.Proof = &proto1.Proof{} } if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -4902,7 +4902,7 @@ func (m *MsgAddToOutTxTracker) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Proof == nil { - m.Proof = &pkg.Proof{} + m.Proof = &proto1.Proof{} } if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -5633,7 +5633,7 @@ func (m *MsgVoteOnObservedOutboundTx) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Status |= pkg.ReceiveStatus(b&0x7F) << shift + m.Status |= proto1.ReceiveStatus(b&0x7F) << shift if b < 0x80 { break } @@ -5690,7 +5690,7 @@ func (m *MsgVoteOnObservedOutboundTx) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CoinType |= pkg.CoinType(b&0x7F) << shift + m.CoinType |= proto1.CoinType(b&0x7F) << shift if b < 0x80 { break } @@ -6151,7 +6151,7 @@ func (m *MsgVoteOnObservedInboundTx) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CoinType |= pkg.CoinType(b&0x7F) << shift + m.CoinType |= proto1.CoinType(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/fungible/types/events.pb.go b/x/fungible/types/events.pb.go index b64a03c8d4..6e616e2403 100644 --- a/x/fungible/types/events.pb.go +++ b/x/fungible/types/events.pb.go @@ -11,7 +11,7 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - pkg "github.com/zeta-chain/zetacore/pkg" + proto1 "github.com/zeta-chain/zetacore/pkg/proto" ) // Reference imports to suppress errors if they are not otherwise used. @@ -94,15 +94,15 @@ func (m *EventSystemContractUpdated) GetSigner() string { } type EventZRC20Deployed struct { - MsgTypeUrl string `protobuf:"bytes,1,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` - ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Contract string `protobuf:"bytes,3,opt,name=contract,proto3" json:"contract,omitempty"` - Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` - Symbol string `protobuf:"bytes,5,opt,name=symbol,proto3" json:"symbol,omitempty"` - Decimals int64 `protobuf:"varint,6,opt,name=decimals,proto3" json:"decimals,omitempty"` - CoinType pkg.CoinType `protobuf:"varint,7,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` - Erc20 string `protobuf:"bytes,8,opt,name=erc20,proto3" json:"erc20,omitempty"` - GasLimit int64 `protobuf:"varint,9,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + MsgTypeUrl string `protobuf:"bytes,1,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` + ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + Contract string `protobuf:"bytes,3,opt,name=contract,proto3" json:"contract,omitempty"` + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` + Symbol string `protobuf:"bytes,5,opt,name=symbol,proto3" json:"symbol,omitempty"` + Decimals int64 `protobuf:"varint,6,opt,name=decimals,proto3" json:"decimals,omitempty"` + CoinType proto1.CoinType `protobuf:"varint,7,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` + Erc20 string `protobuf:"bytes,8,opt,name=erc20,proto3" json:"erc20,omitempty"` + GasLimit int64 `protobuf:"varint,9,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` } func (m *EventZRC20Deployed) Reset() { *m = EventZRC20Deployed{} } @@ -180,11 +180,11 @@ func (m *EventZRC20Deployed) GetDecimals() int64 { return 0 } -func (m *EventZRC20Deployed) GetCoinType() pkg.CoinType { +func (m *EventZRC20Deployed) GetCoinType() proto1.CoinType { if m != nil { return m.CoinType } - return pkg.CoinType_Zeta + return proto1.CoinType_Zeta } func (m *EventZRC20Deployed) GetErc20() string { @@ -202,15 +202,15 @@ func (m *EventZRC20Deployed) GetGasLimit() int64 { } type EventZRC20WithdrawFeeUpdated struct { - MsgTypeUrl string `protobuf:"bytes,1,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` - ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - CoinType pkg.CoinType `protobuf:"varint,3,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` - Zrc20Address string `protobuf:"bytes,4,opt,name=zrc20_address,json=zrc20Address,proto3" json:"zrc20_address,omitempty"` - OldWithdrawFee string `protobuf:"bytes,5,opt,name=old_withdraw_fee,json=oldWithdrawFee,proto3" json:"old_withdraw_fee,omitempty"` - NewWithdrawFee string `protobuf:"bytes,6,opt,name=new_withdraw_fee,json=newWithdrawFee,proto3" json:"new_withdraw_fee,omitempty"` - Signer string `protobuf:"bytes,7,opt,name=signer,proto3" json:"signer,omitempty"` - OldGasLimit string `protobuf:"bytes,8,opt,name=old_gas_limit,json=oldGasLimit,proto3" json:"old_gas_limit,omitempty"` - NewGasLimit string `protobuf:"bytes,9,opt,name=new_gas_limit,json=newGasLimit,proto3" json:"new_gas_limit,omitempty"` + MsgTypeUrl string `protobuf:"bytes,1,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` + ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + CoinType proto1.CoinType `protobuf:"varint,3,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` + Zrc20Address string `protobuf:"bytes,4,opt,name=zrc20_address,json=zrc20Address,proto3" json:"zrc20_address,omitempty"` + OldWithdrawFee string `protobuf:"bytes,5,opt,name=old_withdraw_fee,json=oldWithdrawFee,proto3" json:"old_withdraw_fee,omitempty"` + NewWithdrawFee string `protobuf:"bytes,6,opt,name=new_withdraw_fee,json=newWithdrawFee,proto3" json:"new_withdraw_fee,omitempty"` + Signer string `protobuf:"bytes,7,opt,name=signer,proto3" json:"signer,omitempty"` + OldGasLimit string `protobuf:"bytes,8,opt,name=old_gas_limit,json=oldGasLimit,proto3" json:"old_gas_limit,omitempty"` + NewGasLimit string `protobuf:"bytes,9,opt,name=new_gas_limit,json=newGasLimit,proto3" json:"new_gas_limit,omitempty"` } func (m *EventZRC20WithdrawFeeUpdated) Reset() { *m = EventZRC20WithdrawFeeUpdated{} } @@ -260,11 +260,11 @@ func (m *EventZRC20WithdrawFeeUpdated) GetChainId() int64 { return 0 } -func (m *EventZRC20WithdrawFeeUpdated) GetCoinType() pkg.CoinType { +func (m *EventZRC20WithdrawFeeUpdated) GetCoinType() proto1.CoinType { if m != nil { return m.CoinType } - return pkg.CoinType_Zeta + return proto1.CoinType_Zeta } func (m *EventZRC20WithdrawFeeUpdated) GetZrc20Address() string { @@ -557,7 +557,7 @@ func init() { func init() { proto.RegisterFile("fungible/events.proto", fileDescriptor_858e6494730deffd) } var fileDescriptor_858e6494730deffd = []byte{ - // 757 bytes of a gzipped FileDescriptorProto + // 756 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xc1, 0x4e, 0xdb, 0x4a, 0x14, 0xc5, 0x04, 0x02, 0x19, 0x08, 0x81, 0x51, 0xde, 0x93, 0x5f, 0x78, 0x2f, 0x42, 0x79, 0xaa, 0x4a, 0x51, 0x1b, 0xa3, 0x54, 0xfd, 0x00, 0xa0, 0xa5, 0x45, 0x6a, 0xa5, 0x2a, 0x94, 0x56, 0x62, @@ -565,47 +565,47 @@ var fileDescriptor_858e6494730deffd = []byte{ 0xb7, 0xf4, 0x0b, 0xba, 0xa4, 0xea, 0xa6, 0x4b, 0x04, 0x3f, 0x52, 0xcd, 0x78, 0xec, 0xc4, 0x54, 0x20, 0xd8, 0xcd, 0x1d, 0x9f, 0x7b, 0xef, 0x99, 0x33, 0x67, 0xae, 0xd1, 0x5f, 0x27, 0x23, 0xea, 0xf9, 0x83, 0x00, 0x2c, 0x18, 0x03, 0x15, 0xbc, 0x1b, 0xc5, 0x4c, 0x30, 0xbc, 0x7e, 0x0e, 0x82, - 0x38, 0x43, 0xe2, 0xd3, 0xae, 0x5a, 0xb1, 0x18, 0xba, 0x39, 0xb2, 0x55, 0x8f, 0x4e, 0x3d, 0x2b, - 0x3a, 0xf5, 0x32, 0x6c, 0x6b, 0xad, 0x28, 0x21, 0xce, 0xf4, 0x56, 0xd3, 0x63, 0x1e, 0x53, 0x4b, - 0x4b, 0xae, 0xb2, 0xdd, 0xce, 0x37, 0x03, 0xb5, 0x5e, 0xc9, 0x2e, 0x87, 0x29, 0x17, 0x10, 0xee, - 0x31, 0x2a, 0x62, 0xe2, 0x88, 0xa3, 0xc8, 0x25, 0x02, 0x5c, 0xbc, 0x81, 0x96, 0x43, 0xee, 0xd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, + 0x74, 0x7e, 0x1a, 0xa8, 0xa9, 0xa4, 0xd9, 0x4d, 0x05, 0x38, 0xcc, 0x7d, 0xc0, 0x4b, 0x7a, 0x82, + 0x56, 0x6f, 0x99, 0x8d, 0x0d, 0xe7, 0xc6, 0x98, 0xdb, 0x42, 0x6b, 0xd2, 0x78, 0x03, 0xdd, 0xc3, + 0x1e, 0x12, 0x3e, 0xd4, 0xda, 0x34, 0x28, 0x24, 0x79, 0xef, 0x37, 0x84, 0x0f, 0x25, 0x56, 0x1a, + 0xb9, 0x8c, 0xd5, 0x2a, 0xb1, 0xc0, 0x2d, 0x61, 0x27, 0xa7, 0x9a, 0x9f, 0x3e, 0xd5, 0xee, 0xc1, + 0xf7, 0xab, 0xb6, 0x71, 0x71, 0xd5, 0x36, 0x2e, 0xaf, 0xda, 0xc6, 0xe7, 0xeb, 0xf6, 0xcc, 0xc5, + 0x75, 0x7b, 0xe6, 0xd7, 0x75, 0x7b, 0xe6, 0xd8, 0xf2, 0x7c, 0x31, 0x1c, 0x0d, 0xba, 0x0e, 0x0b, + 0x2d, 0x79, 0x29, 0xcf, 0x94, 0xd9, 0xac, 0xdc, 0x6c, 0xd6, 0x99, 0x35, 0xf9, 0xdd, 0xa4, 0x11, + 0xf0, 0x41, 0x55, 0xfd, 0x4d, 0x9e, 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x34, 0xb2, 0xd9, 0x08, + 0xbb, 0x06, 0x00, 0x00, } func (m *EventSystemContractUpdated) Marshal() (dAtA []byte, err error) { @@ -1605,7 +1605,7 @@ func (m *EventZRC20Deployed) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CoinType |= pkg.CoinType(b&0x7F) << shift + m.CoinType |= proto1.CoinType(b&0x7F) << shift if b < 0x80 { break } @@ -1776,7 +1776,7 @@ func (m *EventZRC20WithdrawFeeUpdated) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CoinType |= pkg.CoinType(b&0x7F) << shift + m.CoinType |= proto1.CoinType(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/fungible/types/foreign_coins.pb.go b/x/fungible/types/foreign_coins.pb.go index ee2ca49b14..78f90e0d9d 100644 --- a/x/fungible/types/foreign_coins.pb.go +++ b/x/fungible/types/foreign_coins.pb.go @@ -12,7 +12,7 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - pkg "github.com/zeta-chain/zetacore/pkg" + proto1 "github.com/zeta-chain/zetacore/pkg/proto" ) // Reference imports to suppress errors if they are not otherwise used. @@ -34,7 +34,7 @@ type ForeignCoins struct { Decimals uint32 `protobuf:"varint,5,opt,name=decimals,proto3" json:"decimals,omitempty"` Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` Symbol string `protobuf:"bytes,7,opt,name=symbol,proto3" json:"symbol,omitempty"` - CoinType pkg.CoinType `protobuf:"varint,8,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` + CoinType proto1.CoinType `protobuf:"varint,8,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` GasLimit uint64 `protobuf:"varint,9,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` Paused bool `protobuf:"varint,10,opt,name=paused,proto3" json:"paused,omitempty"` LiquidityCap github_com_cosmos_cosmos_sdk_types.Uint `protobuf:"bytes,11,opt,name=liquidity_cap,json=liquidityCap,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Uint" json:"liquidity_cap"` @@ -115,11 +115,11 @@ func (m *ForeignCoins) GetSymbol() string { return "" } -func (m *ForeignCoins) GetCoinType() pkg.CoinType { +func (m *ForeignCoins) GetCoinType() proto1.CoinType { if m != nil { return m.CoinType } - return pkg.CoinType_Zeta + return proto1.CoinType_Zeta } func (m *ForeignCoins) GetGasLimit() uint64 { @@ -143,33 +143,33 @@ func init() { func init() { proto.RegisterFile("fungible/foreign_coins.proto", fileDescriptor_5285bb476cecbbf8) } var fileDescriptor_5285bb476cecbbf8 = []byte{ - // 416 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x52, 0x41, 0x6b, 0xdb, 0x30, - 0x14, 0x8e, 0x96, 0x34, 0x73, 0xb4, 0xa6, 0x0c, 0x11, 0x8a, 0x48, 0x87, 0x6b, 0x76, 0x99, 0x19, - 0xd4, 0x1a, 0xdd, 0xfe, 0xc0, 0x1a, 0x18, 0x14, 0x76, 0x32, 0xdd, 0x65, 0x17, 0xa3, 0x48, 0xaa, - 0x2a, 0x62, 0x5b, 0x9a, 0xa5, 0xc0, 0xdc, 0xeb, 0xfe, 0xc0, 0x7e, 0x56, 0x8f, 0x3d, 0x8e, 0x1d, - 0xca, 0x48, 0xfe, 0xc8, 0x90, 0xec, 0x98, 0x9e, 0xf4, 0x7d, 0xdf, 0x7b, 0xfa, 0xde, 0xd3, 0x7b, - 0x82, 0x6f, 0x6e, 0xb7, 0xb5, 0x54, 0xeb, 0x52, 0x90, 0x5b, 0xdd, 0x08, 0x25, 0xeb, 0x82, 0x69, - 0x55, 0xdb, 0xcc, 0x34, 0xda, 0x69, 0x74, 0x76, 0x2f, 0x1c, 0x65, 0x77, 0x54, 0xd5, 0x59, 0x40, - 0xba, 0x11, 0xd9, 0xe1, 0xc2, 0x72, 0x6e, 0x36, 0x92, 0x98, 0x8d, 0xec, 0x72, 0x97, 0x0b, 0xa9, - 0xa5, 0x0e, 0x90, 0x78, 0xd4, 0xa9, 0x6f, 0x7f, 0x8d, 0xe1, 0xf1, 0x97, 0xce, 0x79, 0xe5, 0x8d, - 0xd1, 0x27, 0x78, 0x7a, 0xdf, 0xb0, 0xcb, 0x0f, 0x05, 0xd3, 0xb5, 0x6b, 0x28, 0x73, 0x05, 0xe5, - 0xbc, 0x11, 0xd6, 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0x95, 0xcd, 0xbe, 0xa9, 0xda, 0xe5, - 0xc7, 0x83, 0xcb, 0x8a, 0x9a, 0xab, 0xeb, 0x87, 0x5d, 0x0c, 0x1e, 0x77, 0x31, 0xf8, 0xb7, 0x8b, - 0xc1, 0xef, 0x7d, 0x3c, 0x7a, 0xdc, 0xc7, 0xa3, 0x3f, 0xfb, 0x78, 0xf4, 0x9d, 0x3c, 0x33, 0xf4, - 0x2b, 0xbe, 0x08, 0x83, 0x24, 0x87, 0x6d, 0x93, 0x9f, 0x64, 0xf8, 0x20, 0xc1, 0x7d, 0x3d, 0x0d, - 0x7b, 0xfd, 0xf8, 0x3f, 0x00, 0x00, 0xff, 0xff, 0x2c, 0x33, 0x77, 0x6c, 0x39, 0x02, 0x00, 0x00, + // 415 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x52, 0xcf, 0x6a, 0xdb, 0x30, + 0x1c, 0x8e, 0x96, 0x34, 0x73, 0xb4, 0xa6, 0x0c, 0x11, 0x8a, 0x48, 0x87, 0x6b, 0x76, 0x99, 0x19, + 0xd4, 0x1a, 0xdd, 0x5e, 0x60, 0x0d, 0x0c, 0x0a, 0x3b, 0x99, 0xee, 0xb2, 0x8b, 0x51, 0x24, 0x55, + 0x15, 0xb1, 0x2d, 0xcd, 0x52, 0x60, 0xee, 0x75, 0x2f, 0xb0, 0xc7, 0xea, 0xb1, 0xc7, 0xb1, 0x43, + 0x19, 0xc9, 0x8b, 0x0c, 0xc9, 0x8e, 0xe9, 0x49, 0xdf, 0xf7, 0xfb, 0xf3, 0xfd, 0xfe, 0x09, 0xbe, + 0xb9, 0xdd, 0xd6, 0x52, 0xad, 0x4b, 0x41, 0x6e, 0x75, 0x23, 0x94, 0xac, 0x0b, 0xa6, 0x55, 0x6d, + 0x33, 0xd3, 0x68, 0xa7, 0xd1, 0xd9, 0xbd, 0x70, 0x94, 0xdd, 0x51, 0x55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, 0x30, 0x74, 0x6b, 0x05, 0xc7, 0x30, 0x01, 0x69, 0x94, 0xf7, 0x0c, 0xdd, 0xc0, 0x79, + 0xa9, 0x7e, 0x6c, 0x15, 0x57, 0xae, 0x2d, 0x18, 0x35, 0xf8, 0x95, 0xaf, 0x7f, 0x45, 0x1e, 0x9e, + 0xce, 0x47, 0x7f, 0x9f, 0xce, 0xdf, 0x49, 0xe5, 0xee, 0xb6, 0xeb, 0x8c, 0xe9, 0x8a, 0x30, 0x6d, + 0x2b, 0x6d, 0xfb, 0xe7, 0xc2, 0xf2, 0x0d, 0xf1, 0x5d, 0xd9, 0xec, 0x9b, 0xaa, 0x5d, 0x7e, 0x3c, + 0xa8, 0xac, 0xa8, 0xb9, 0xba, 0x7e, 0xd8, 0xc5, 0xe0, 0x71, 0x17, 0x83, 0x7f, 0xbb, 0x18, 0xfc, + 0xde, 0xc7, 0xa3, 0xc7, 0x7d, 0x3c, 0xfa, 0xb3, 0x8f, 0x47, 0xdf, 0xc9, 0x33, 0x41, 0x7f, 0xe2, + 0x8b, 0xb0, 0x48, 0x72, 0xb8, 0x36, 0xf9, 0x49, 0x86, 0x0f, 0x12, 0xd4, 0xd7, 0xd3, 0x70, 0xd7, + 0x8f, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x7d, 0xa7, 0x10, 0x39, 0x02, 0x00, 0x00, } func (m *ForeignCoins) Marshal() (dAtA []byte, err error) { @@ -531,7 +531,7 @@ func (m *ForeignCoins) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CoinType |= pkg.CoinType(b&0x7F) << shift + m.CoinType |= proto1.CoinType(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/fungible/types/tx.pb.go b/x/fungible/types/tx.pb.go index 34ad09985b..fcc5774138 100644 --- a/x/fungible/types/tx.pb.go +++ b/x/fungible/types/tx.pb.go @@ -14,7 +14,7 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" - pkg "github.com/zeta-chain/zetacore/pkg" + proto1 "github.com/zeta-chain/zetacore/pkg/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -355,14 +355,14 @@ func (m *MsgUpdateSystemContractResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateSystemContractResponse proto.InternalMessageInfo type MsgDeployFungibleCoinZRC20 struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ERC20 string `protobuf:"bytes,2,opt,name=ERC20,proto3" json:"ERC20,omitempty"` - ForeignChainId int64 `protobuf:"varint,3,opt,name=foreign_chain_id,json=foreignChainId,proto3" json:"foreign_chain_id,omitempty"` - Decimals uint32 `protobuf:"varint,4,opt,name=decimals,proto3" json:"decimals,omitempty"` - Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` - Symbol string `protobuf:"bytes,6,opt,name=symbol,proto3" json:"symbol,omitempty"` - CoinType pkg.CoinType `protobuf:"varint,7,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` - GasLimit int64 `protobuf:"varint,8,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + ERC20 string `protobuf:"bytes,2,opt,name=ERC20,proto3" json:"ERC20,omitempty"` + ForeignChainId int64 `protobuf:"varint,3,opt,name=foreign_chain_id,json=foreignChainId,proto3" json:"foreign_chain_id,omitempty"` + Decimals uint32 `protobuf:"varint,4,opt,name=decimals,proto3" json:"decimals,omitempty"` + Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` + Symbol string `protobuf:"bytes,6,opt,name=symbol,proto3" json:"symbol,omitempty"` + CoinType proto1.CoinType `protobuf:"varint,7,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` + GasLimit int64 `protobuf:"varint,8,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` } func (m *MsgDeployFungibleCoinZRC20) Reset() { *m = MsgDeployFungibleCoinZRC20{} } @@ -440,11 +440,11 @@ func (m *MsgDeployFungibleCoinZRC20) GetSymbol() string { return "" } -func (m *MsgDeployFungibleCoinZRC20) GetCoinType() pkg.CoinType { +func (m *MsgDeployFungibleCoinZRC20) GetCoinType() proto1.CoinType { if m != nil { return m.CoinType } - return pkg.CoinType_Zeta + return proto1.CoinType_Zeta } func (m *MsgDeployFungibleCoinZRC20) GetGasLimit() int64 { @@ -890,70 +890,70 @@ func init() { func init() { proto.RegisterFile("fungible/tx.proto", fileDescriptor_197fdedece277fa0) } var fileDescriptor_197fdedece277fa0 = []byte{ - // 998 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0x5d, 0x6b, 0xdb, 0x56, - 0x18, 0xb6, 0x92, 0xe6, 0xc3, 0x6f, 0x6b, 0xc7, 0x3d, 0x78, 0xad, 0xe6, 0x0c, 0xa7, 0x55, 0xcb, - 0x9a, 0x05, 0x6a, 0x75, 0x5e, 0xb7, 0x32, 0x58, 0x3b, 0x12, 0x37, 0xd9, 0x0a, 0xf5, 0x28, 0x4a, - 0xd3, 0xb1, 0xdc, 0x88, 0x13, 0xe9, 0x44, 0x16, 0xb1, 0x75, 0x34, 0x9d, 0xe3, 0xb9, 0xee, 0xdd, - 0x60, 0x30, 0x28, 0x6c, 0x14, 0xf6, 0x3f, 0x06, 0xfb, 0x17, 0xbd, 0xec, 0xe5, 0x18, 0x23, 0x8c, - 0xe4, 0x8f, 0x8c, 0x73, 0xf4, 0x11, 0xf9, 0x43, 0x4e, 0xec, 0x5e, 0xe5, 0x9c, 0x37, 0xef, 0xfb, - 0xe8, 0x79, 0xbf, 0x1e, 0x59, 0x70, 0xf5, 0xb0, 0xeb, 0x39, 0xee,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, 0xeb, 0x50, 0x3a, 0xa4, 0x01, 0x71, 0x1d, 0xcf, 0x94, - 0x4b, 0x67, 0xba, 0xb6, 0x1c, 0xc8, 0x79, 0xa3, 0x18, 0xd9, 0x1b, 0xc2, 0xfc, 0xc4, 0x46, 0x15, - 0x58, 0xb6, 0x89, 0xe5, 0x76, 0x70, 0x9b, 0xc9, 0x51, 0x2c, 0x18, 0xc9, 0x1d, 0x21, 0xb8, 0xe4, - 0xe1, 0x0e, 0x89, 0x66, 0x4f, 0x9e, 0xd1, 0x35, 0x58, 0x64, 0xfd, 0xce, 0x01, 0x6d, 0x87, 0xa3, - 0x60, 0x44, 0x37, 0xb4, 0x01, 0x79, 0x8b, 0xba, 0x9e, 0x29, 0x9a, 0x23, 0xbb, 0x59, 0xac, 0x17, - 0x6a, 0x62, 0xa7, 0x45, 0x12, 0xcf, 0xfb, 0x3e, 0x31, 0x96, 0xad, 0xe8, 0x84, 0x56, 0x21, 0x7f, - 0xd6, 0xf9, 0x65, 0x49, 0x6b, 0xd9, 0x89, 0xbb, 0xf8, 0x08, 0xb4, 0xec, 0x42, 0x24, 0x2b, 0xab, - 0xc2, 0x52, 0x5c, 0xfd, 0xa8, 0x20, 0xd1, 0x55, 0x7b, 0x0c, 0xe5, 0x26, 0x73, 0x0c, 0xd2, 0xa1, - 0x3f, 0x91, 0x9d, 0x28, 0x57, 0xea, 0x7a, 0x13, 0x4a, 0x18, 0xa7, 0x39, 0x77, 0x96, 0xa6, 0x56, - 0x85, 0x8f, 0xc6, 0xa1, 0x24, 0xfd, 0xfa, 0x45, 0x49, 0x2d, 0x5e, 0xdc, 0xcd, 0xad, 0x3e, 0x27, - 0x16, 0xb5, 0x27, 0x2d, 0xde, 0x27, 0x50, 0xca, 0x18, 0x9f, 0x15, 0x6b, 0x70, 0x6a, 0x90, 0x16, - 0xee, 0x88, 0x00, 0x34, 0x5b, 0x98, 0xb5, 0x22, 0x45, 0x11, 0x23, 0xdf, 0xa0, 0x36, 0xf9, 0x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, 0xcf, 0x0a, 0x5c, 0x1d, 0x95, 0x88, 0x4f, 0xcf, 0x83, 0x1d, 0x09, - 0xa9, 0x7c, 0x39, 0x75, 0x48, 0xc2, 0xe1, 0xb5, 0x02, 0xe5, 0xb1, 0xef, 0xa1, 0xfb, 0xe7, 0x61, - 0x8e, 0x8b, 0xaa, 0x7c, 0x35, 0x4b, 0x54, 0x42, 0xe6, 0x8d, 0x02, 0xd7, 0x32, 0xc4, 0xec, 0x8b, - 0x8b, 0x01, 0x0f, 0xc7, 0x55, 0x1e, 0xcd, 0x16, 0x37, 0x86, 0xd2, 0xc8, 0x0f, 0x9b, 0x0b, 0x52, - 0x1a, 0x8e, 0xbb, 0x28, 0xa5, 0xac, 0x1f, 0x0f, 0x72, 0x98, 0xb3, 0x64, 0xf4, 0xc1, 0x14, 0xd8, - 0xe9, 0xc0, 0xf3, 0x87, 0xf9, 0x1c, 0x21, 0x1c, 0x66, 0x35, 0xa0, 0x82, 0xd3, 0xb0, 0x4a, 0x07, - 0x4e, 0xc5, 0x6a, 0x9c, 0x88, 0x6d, 0x3d, 0x79, 0x7b, 0x52, 0x55, 0xde, 0x9d, 0x54, 0x95, 0xff, - 0x4e, 0xaa, 0xca, 0x9b, 0xd3, 0x6a, 0xee, 0xdd, 0x69, 0x35, 0xf7, 0xf7, 0x69, 0x35, 0xb7, 0xaf, - 0xa7, 0xb4, 0x53, 0x40, 0xdf, 0x95, 0x4f, 0xd1, 0xe3, 0xa7, 0xe8, 0x2f, 0xf5, 0xb3, 0xef, 0x07, - 0x21, 0xa4, 0x07, 0x8b, 0xf2, 0x0b, 0xe0, 0xb3, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x7b, 0xb0, - 0x1c, 0x96, 0x58, 0x0c, 0x00, 0x00, + // 999 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0x5d, 0x6b, 0x1b, 0x47, + 0x14, 0xd5, 0xda, 0xf1, 0x87, 0x6e, 0x22, 0x59, 0x19, 0xd4, 0x64, 0x2b, 0x17, 0x39, 0xd9, 0x84, + 0xc6, 0x35, 0x44, 0x9b, 0xaa, 0x69, 0x43, 0xa1, 0x49, 0xb1, 0x15, 0xbb, 0x0d, 0x44, 0x25, 0xac, + 0xe3, 0x94, 0xfa, 0x65, 0x19, 0xef, 0x8e, 0x57, 0x8b, 0xa5, 0x9d, 0xed, 0xce, 0xa8, 0x8a, 0xf2, + 0x56, 0x28, 0x14, 0x02, 0x2d, 0x81, 0xfe, 0x8f, 0x42, 0xff, 0x45, 0x1e, 0xf3, 0x58, 0x4a, 0x31, + 0xc5, 0xfe, 0x23, 0x65, 0x66, 0x3f, 0xbc, 0xfa, 0x58, 0xd9, 0x52, 0x9e, 0x3c, 0x33, 0xbe, 0xe7, + 0xec, 0xb9, 0x77, 0xee, 0x3d, 0xab, 0x85, 0xab, 0x87, 0x5d, 0xcf, 0x71, 0x0f, 0xda, 0x44, 0xe7, + 0x2f, 0x6b, 0x7e, 0x40, 0x39, 0x45, 0xab, 0xaf, 0x08, 0xc7, 0x56, 0x0b, 0xbb, 0x5e, 0x4d, 0xae, + 0x68, 0x40, 0x6a, 0x71, 0x54, 0xa5, 0xec, 0x50, 0x87, 0xca, 0x38, 0x5d, 0xac, 0x42, 0x48, 0xa5, + 0xe0, 0x1f, 0x39, 0xba, 0x7f, 0xe4, 0x84, 0x5b, 0xed, 0x3e, 0xa8, 0x4d, 0xe6, 0x3c, 0x26, 0x7e, + 0x9b, 0xf6, 0x77, 0xfb, 0x8c, 0x93, 0x4e, 0x83, 0x7a, 0x3c, 0xc0, 0x16, 0x67, 0x48, 0x85, 0x25, + 0x2b, 0x20, 0x98, 0xd3, 0x40, 0x55, 0x6e, 0x28, 0xeb, 0x79, 0x23, 0xde, 0x6a, 0xff, 0x2a, 0x70, + 0x23, 0x0b, 0x66, 0x10, 0xe6, 0x53, 0x8f, 0x11, 0xb4, 0x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xc6, 0x99, 0xd8, 0xd6, 0x93, 0xb7, 0x27, 0x55, 0xe5, 0xdd, 0x49, 0x55, + 0xf9, 0xef, 0xa4, 0xaa, 0xbc, 0x39, 0xad, 0xe6, 0xde, 0x9d, 0x56, 0x73, 0x7f, 0x9f, 0x56, 0x73, + 0xfb, 0x7a, 0xca, 0x3b, 0x05, 0xf5, 0x5d, 0xf9, 0x14, 0x3d, 0x7e, 0x8a, 0xfe, 0x52, 0x3f, 0xfb, + 0x7e, 0x10, 0x46, 0x7a, 0xb0, 0x28, 0xbf, 0x00, 0x3e, 0xfb, 0x3f, 0x00, 0x00, 0xff, 0xff, 0x7f, + 0xff, 0xad, 0xf0, 0x58, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -3058,7 +3058,7 @@ func (m *MsgDeployFungibleCoinZRC20) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CoinType |= pkg.CoinType(b&0x7F) << shift + m.CoinType |= proto1.CoinType(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/observer/types/chain_nonces.pb.go b/x/observer/types/chain_nonces.pb.go index d9c6b6483f..6edb1c1d64 100644 --- a/x/observer/types/chain_nonces.pb.go +++ b/x/observer/types/chain_nonces.pb.go @@ -11,7 +11,7 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - _ "github.com/zeta-chain/zetacore/pkg" + _ "github.com/zeta-chain/zetacore/pkg/proto" ) // Reference imports to suppress errors if they are not otherwise used. @@ -116,25 +116,25 @@ func init() { func init() { proto.RegisterFile("observer/chain_nonces.proto", fileDescriptor_a4a180ef3ffea001) } var fileDescriptor_a4a180ef3ffea001 = []byte{ - // 274 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x90, 0xbb, 0x4e, 0xc3, 0x30, - 0x18, 0x85, 0x63, 0xd2, 0x0b, 0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 0x6b, 0xc7, 0x66, - 0xb8, 0x79, 0x68, 0xdf, 0xac, 0xbf, 0x3a, 0x4e, 0xf6, 0x1d, 0x27, 0x3f, 0x1d, 0x27, 0x1f, 0x3d, - 0x0f, 0xf6, 0x3d, 0x0f, 0xbe, 0x7b, 0x1e, 0x3c, 0x08, 0xa9, 0x5c, 0xfd, 0x5a, 0xa4, 0xa5, 0x79, - 0x11, 0xbe, 0x91, 0x2b, 0x0c, 0x23, 0xc6, 0x72, 0xc4, 0x56, 0xfc, 0xd7, 0xe9, 0xde, 0x1b, 0x68, - 0x8b, 0x19, 0xd6, 0x70, 0xfd, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x43, 0xcb, 0x34, 0xb2, 0x67, 0x01, - 0x00, 0x00, + // 275 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x90, 0x3d, 0x4e, 0xc4, 0x30, + 0x10, 0x85, 0x63, 0xb2, 0x3f, 0x60, 0x84, 0x90, 0xa2, 0x2d, 0xcc, 0xae, 0x64, 0x45, 0x54, 0x69, + 0x88, 0x0b, 0x6e, 0x00, 0x0d, 0xdb, 0x50, 0xa4, 0xa4, 0x41, 0xf9, 0x19, 0x1c, 0x6b, 0xc1, 0x8e, + 0x1c, 0x83, 0x96, 0x3d, 0x05, 0x67, 0xe1, 0x14, 0x94, 0x5b, 0x52, 0xa2, 0xe4, 0x22, 0xc8, 0x13, + 0x42, 0xb1, 0xdd, 0x7c, 0x4f, 0xf3, 0x66, 0x9e, 0x1e, 0x5d, 0x99, 0xa2, 0x05, 0xfb, 0x06, 0x56, + 0x94, 0x75, 0xae, 0xf4, 0xa3, 0x36, 0xba, 0x84, 0x36, 0x6d, 0xac, 0x71, 0x26, 0x5a, 0xed, 0xc0, + 0xe5, 0xa8, 0xa7, 0x38, 0x19, 0x0b, 0xe9, 0xb8, 0xbf, 0x5c, 0x48, 0x23, 0x0d, 0xee, 0x09, 0x3f, + 0x0d, 0x96, 0xe5, 0x59, 0xb3, 0x91, 0xa2, 0xd9, 0xc8, 0x01, 0x2f, 0x3f, 0x09, 0x3d, 0xbd, 0xf5, + 0x07, 0xee, 0xf1, 0x6e, 0xc4, 0xe8, 0xbc, 0xb4, 0x90, 0x3b, 0x63, 0x19, 0x89, 0x49, 0x72, 0x92, + 0x8d, 0x18, 0x2d, 0xe8, 0x54, 0xe9, 0x0a, 0xb6, 0xec, 0x08, 0xf5, 0x01, 0xa2, 0x0b, 0x7a, 0x3c, + 0xe4, 0x52, 0x15, 0x0b, 0x63, 0x92, 0x84, 0xd9, 0x1c, 0x79, 0x5d, 0x79, 0x03, 0x86, 0x65, 0x93, + 0x98, 0x24, 0x93, 0x6c, 0x00, 0xff, 0xa0, 0x55, 0x52, 0x83, 0x6d, 0xd9, 0x34, 0x0e, 0xfd, 0x83, + 0x3f, 0x8c, 0x12, 0x7a, 0xfe, 0xa4, 0x74, 0xfe, 0xac, 0x76, 0x50, 0xdd, 0x81, 0x92, 0xb5, 0x63, + 0x33, 0x74, 0x1e, 0xca, 0x37, 0xeb, 0xaf, 0x8e, 0x93, 0x7d, 0xc7, 0xc9, 0x4f, 0xc7, 0xc9, 0x47, + 0xcf, 0x83, 0x7d, 0xcf, 0x83, 0xef, 0x9e, 0x07, 0x0f, 0x42, 0x2a, 0x57, 0xbf, 0x16, 0x69, 0x69, + 0x5e, 0x84, 0x6f, 0xe4, 0x0a, 0xc3, 0x88, 0xb1, 0x1c, 0xb1, 0x15, 0xff, 0x75, 0xba, 0xf7, 0x06, + 0xda, 0x62, 0x86, 0x35, 0x5c, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x30, 0x18, 0x60, 0x85, 0x67, + 0x01, 0x00, 0x00, } func (m *ChainNonces) Marshal() (dAtA []byte, err error) { diff --git a/x/observer/types/node_account.pb.go b/x/observer/types/node_account.pb.go index d42de31040..d231c89ffc 100644 --- a/x/observer/types/node_account.pb.go +++ b/x/observer/types/node_account.pb.go @@ -11,7 +11,7 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - pkg "github.com/zeta-chain/zetacore/pkg" + proto1 "github.com/zeta-chain/zetacore/pkg/proto" ) // Reference imports to suppress errors if they are not otherwise used. @@ -63,10 +63,10 @@ func (NodeStatus) EnumDescriptor() ([]byte, []int) { } type NodeAccount struct { - Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` - GranteeAddress string `protobuf:"bytes,2,opt,name=granteeAddress,proto3" json:"granteeAddress,omitempty"` - GranteePubkey *pkg.PubKeySet `protobuf:"bytes,3,opt,name=granteePubkey,proto3" json:"granteePubkey,omitempty"` - NodeStatus NodeStatus `protobuf:"varint,4,opt,name=nodeStatus,proto3,enum=zetachain.zetacore.observer.NodeStatus" json:"nodeStatus,omitempty"` + Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` + GranteeAddress string `protobuf:"bytes,2,opt,name=granteeAddress,proto3" json:"granteeAddress,omitempty"` + GranteePubkey *proto1.PubKeySet `protobuf:"bytes,3,opt,name=granteePubkey,proto3" json:"granteePubkey,omitempty"` + NodeStatus NodeStatus `protobuf:"varint,4,opt,name=nodeStatus,proto3,enum=zetachain.zetacore.observer.NodeStatus" json:"nodeStatus,omitempty"` } func (m *NodeAccount) Reset() { *m = NodeAccount{} } @@ -116,7 +116,7 @@ func (m *NodeAccount) GetGranteeAddress() string { return "" } -func (m *NodeAccount) GetGranteePubkey() *pkg.PubKeySet { +func (m *NodeAccount) GetGranteePubkey() *proto1.PubKeySet { if m != nil { return m.GranteePubkey } @@ -139,29 +139,29 @@ func init() { proto.RegisterFile("observer/node_account.proto", fileDescriptor_6 var fileDescriptor_6f54e38f9d1a9953 = []byte{ // 363 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xcd, 0x6a, 0xdb, 0x40, - 0x14, 0x85, 0x35, 0xfe, 0xab, 0x3d, 0xaa, 0x5d, 0x31, 0x74, 0x21, 0x64, 0x10, 0xa6, 0x8b, 0xd6, - 0x14, 0xaa, 0x01, 0xb7, 0x2f, 0xe0, 0x52, 0x28, 0xa5, 0x60, 0x8c, 0x4c, 0x29, 0x64, 0x13, 0x66, - 0x34, 0x17, 0x59, 0xc8, 0x99, 0x11, 0xa3, 0x91, 0x13, 0xe5, 0x29, 0xf2, 0x10, 0x59, 0xe4, 0x51, - 0xb2, 0xf4, 0x32, 0xcb, 0x60, 0xbf, 0x48, 0x90, 0x1c, 0x3b, 0x3f, 0x8b, 0xec, 0xce, 0x9c, 0xfb, - 0xcd, 0xe5, 0x5c, 0x0e, 0x1e, 0x2a, 0x9e, 0x83, 0x5e, 0x83, 0xa6, 0x52, 0x09, 0x38, 0x65, 0x51, - 0xa4, 0x0a, 0x69, 0x82, 0x4c, 0x2b, 0xa3, 0xc8, 0xf0, 0x12, 0x0c, 0x8b, 0x96, 0x2c, 0x91, 0x41, - 0xad, 0x94, 0x86, 0xe0, 0xc0, 0x7b, 0xfd, 0x2c, 0x8d, 0x69, 0x96, 0xc6, 0x7b, 0xd6, 0xfb, 0x18, - 0xab, 0x58, 0xd5, 0x92, 0x56, 0x6a, 0xef, 0x7e, 0xda, 0x20, 0x6c, 0xcf, 0x94, 0x80, 0xe9, 0x7e, - 0x2f, 0xf1, 0x70, 0x57, 0x65, 0xa0, 0x99, 0x51, 0xda, 0x45, 0x23, 0x34, 0xee, 0x85, 0xc7, 0x37, - 0xf9, 0x8c, 0x07, 0xb1, 0x66, 0xd2, 0x00, 0x4c, 0x85, 0xd0, 0x90, 0xe7, 0x6e, 0xa3, 0x26, 0x5e, - 0xb9, 0xe4, 0x07, 0xee, 0x3f, 0x3a, 0xf3, 0x82, 0xa7, 0x50, 0xba, 0xcd, 0x11, 0x1a, 0xdb, 0x93, - 0x41, 0x50, 0x85, 0x99, 0x17, 0xfc, 0x2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x13, 0xbe, 0x84, 0xc8, 0x6f, 0x8c, + 0x2b, 0x87, 0x0b, 0xc3, 0x4c, 0x91, 0xbb, 0xad, 0x11, 0x1a, 0x0f, 0x26, 0x5f, 0x82, 0x37, 0x0c, + 0x06, 0xb3, 0x23, 0x1e, 0x3e, 0x3b, 0xfd, 0xca, 0x31, 0x7e, 0xda, 0x10, 0x1b, 0xbf, 0xfb, 0x27, + 0x53, 0xa9, 0xce, 0xa5, 0x63, 0x91, 0x0f, 0xd8, 0xfe, 0xbf, 0x4c, 0x0c, 0xac, 0x92, 0xdc, 0x80, + 0x70, 0x50, 0xb5, 0x5d, 0x18, 0x26, 0x05, 0x2f, 0x9d, 0x06, 0xe9, 0xe1, 0x76, 0x08, 0x4c, 0x94, + 0x4e, 0x93, 0x60, 0xdc, 0x99, 0x46, 0x26, 0x59, 0x83, 0xd3, 0x22, 0xef, 0x71, 0xf7, 0x57, 0x92, + 0x33, 0xbe, 0x02, 0xe1, 0xb4, 0xbd, 0xd6, 0xcd, 0xb5, 0x8f, 0x7e, 0xfe, 0xb9, 0xdd, 0xfa, 0x68, + 0xb3, 0xf5, 0xd1, 0xfd, 0xd6, 0x47, 0x57, 0x3b, 0xdf, 0xda, 0xec, 0x7c, 0xeb, 0x6e, 0xe7, 0x5b, + 0x27, 0x34, 0x4e, 0xcc, 0xb2, 0xe0, 0x41, 0xa4, 0xce, 0x68, 0x25, 0xf9, 0x5b, 0xad, 0x9e, 0x1e, + 0xd4, 0xd3, 0x0b, 0x7a, 0x0c, 0xd4, 0x94, 0x19, 0xe4, 0xbc, 0x53, 0x07, 0xf1, 0xfd, 0x21, 0x00, + 0x00, 0xff, 0xff, 0x31, 0x59, 0x26, 0xf3, 0xe9, 0x01, 0x00, 0x00, } func (m *NodeAccount) Marshal() (dAtA []byte, err error) { @@ -382,7 +382,7 @@ func (m *NodeAccount) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.GranteePubkey == nil { - m.GranteePubkey = &pkg.PubKeySet{} + m.GranteePubkey = &proto1.PubKeySet{} } if err := m.GranteePubkey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/x/observer/types/nonce_to_cctx.pb.go b/x/observer/types/nonce_to_cctx.pb.go index 737bc8fd0a..8eb228d133 100644 --- a/x/observer/types/nonce_to_cctx.pb.go +++ b/x/observer/types/nonce_to_cctx.pb.go @@ -11,7 +11,7 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - _ "github.com/zeta-chain/zetacore/pkg" + _ "github.com/zeta-chain/zetacore/pkg/proto" ) // Reference imports to suppress errors if they are not otherwise used. @@ -105,18 +105,18 @@ var fileDescriptor_6f9bbe8a689fa6e4 = []byte{ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xc9, 0x4f, 0x2a, 0x4e, 0x2d, 0x2a, 0x4b, 0x2d, 0xd2, 0xcf, 0xcb, 0xcf, 0x4b, 0x4e, 0x8d, 0x2f, 0xc9, 0x8f, 0x4f, 0x4e, 0x2e, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0xae, 0x4a, 0x2d, 0x49, 0x4c, 0xce, - 0x48, 0xcc, 0xcc, 0xd3, 0x03, 0xb3, 0xf2, 0x8b, 0x52, 0xf5, 0x60, 0x1a, 0xa4, 0x78, 0x0b, 0xb2, - 0xd3, 0xf5, 0x0b, 0xb2, 0xd3, 0x21, 0x6a, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x4c, 0x7d, - 0x10, 0x0b, 0x22, 0xaa, 0x94, 0xc7, 0xc5, 0xed, 0x07, 0x32, 0x38, 0x24, 0xdf, 0x39, 0xb9, 0xa4, - 0x42, 0x48, 0x92, 0x8b, 0x03, 0x6c, 0x5c, 0x7c, 0x66, 0x8a, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x73, - 0x10, 0x3b, 0x98, 0xef, 0x99, 0x22, 0x24, 0xc2, 0xc5, 0x0a, 0x76, 0x82, 0x04, 0x13, 0x58, 0x1c, - 0xc2, 0x11, 0x92, 0xe1, 0xe2, 0x04, 0xb9, 0xc7, 0x33, 0x2f, 0x25, 0xb5, 0x42, 0x82, 0x59, 0x81, - 0x51, 0x83, 0x33, 0x08, 0x21, 0x20, 0x24, 0xc0, 0xc5, 0x5c, 0x52, 0x5c, 0x2c, 0xc1, 0x02, 0x16, - 0x07, 0x31, 0x9d, 0x3c, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, - 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x4a, 0x3f, - 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x1f, 0xe4, 0x19, 0x5d, 0xb0, 0xc5, - 0xfa, 0x30, 0x7f, 0xe9, 0x57, 0xe8, 0xc3, 0x83, 0xa2, 0xa4, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, - 0xec, 0x03, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2d, 0x46, 0xd9, 0xc6, 0x23, 0x01, 0x00, + 0x48, 0xcc, 0xcc, 0xd3, 0x03, 0xb3, 0xf2, 0x8b, 0x52, 0xf5, 0x60, 0x1a, 0xa4, 0x44, 0xd2, 0xf3, + 0xd3, 0xf3, 0xc1, 0xea, 0xf4, 0x41, 0x2c, 0x88, 0x16, 0x29, 0xde, 0x82, 0xec, 0x74, 0xfd, 0x82, + 0xec, 0x74, 0x08, 0x57, 0x29, 0x8f, 0x8b, 0xdb, 0x0f, 0x64, 0x70, 0x48, 0xbe, 0x73, 0x72, 0x49, + 0x85, 0x90, 0x24, 0x17, 0x07, 0xd8, 0xb8, 0xf8, 0xcc, 0x14, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xe6, + 0x20, 0x76, 0x30, 0xdf, 0x33, 0x45, 0x48, 0x84, 0x8b, 0x15, 0xec, 0x04, 0x09, 0x26, 0xb0, 0x38, + 0x84, 0x23, 0x24, 0xc3, 0xc5, 0x09, 0x72, 0x8f, 0x67, 0x5e, 0x4a, 0x6a, 0x85, 0x04, 0xb3, 0x02, + 0xa3, 0x06, 0x67, 0x10, 0x42, 0x40, 0x48, 0x80, 0x8b, 0xb9, 0xa4, 0xb8, 0x58, 0x82, 0x05, 0x2c, + 0x0e, 0x62, 0x3a, 0x79, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, + 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x7e, + 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0xc8, 0x33, 0xba, 0x60, 0x8b, + 0xf5, 0x61, 0xfe, 0xd2, 0xaf, 0xd0, 0x87, 0x07, 0x45, 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, + 0xd8, 0x07, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xef, 0xd8, 0x84, 0x2f, 0x23, 0x01, 0x00, 0x00, } diff --git a/x/observer/types/observer.pb.go b/x/observer/types/observer.pb.go index dd4d4e63b4..639caac692 100644 --- a/x/observer/types/observer.pb.go +++ b/x/observer/types/observer.pb.go @@ -11,7 +11,7 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - pkg "github.com/zeta-chain/zetacore/pkg" + proto1 "github.com/zeta-chain/zetacore/pkg/proto" ) // Reference imports to suppress errors if they are not otherwise used. @@ -88,9 +88,9 @@ func (ObserverUpdateReason) EnumDescriptor() ([]byte, []int) { } type ObserverMapper struct { - Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` - ObserverChain *pkg.Chain `protobuf:"bytes,2,opt,name=observer_chain,json=observerChain,proto3" json:"observer_chain,omitempty"` - ObserverList []string `protobuf:"bytes,4,rep,name=observer_list,json=observerList,proto3" json:"observer_list,omitempty"` + Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` + ObserverChain *proto1.Chain `protobuf:"bytes,2,opt,name=observer_chain,json=observerChain,proto3" json:"observer_chain,omitempty"` + ObserverList []string `protobuf:"bytes,4,rep,name=observer_list,json=observerList,proto3" json:"observer_list,omitempty"` } func (m *ObserverMapper) Reset() { *m = ObserverMapper{} } @@ -133,7 +133,7 @@ func (m *ObserverMapper) GetIndex() string { return "" } -func (m *ObserverMapper) GetObserverChain() *pkg.Chain { +func (m *ObserverMapper) GetObserverChain() *proto1.Chain { if m != nil { return m.ObserverChain } @@ -254,34 +254,34 @@ func init() { func init() { proto.RegisterFile("observer/observer.proto", fileDescriptor_3004233a4a5969ce) } var fileDescriptor_3004233a4a5969ce = []byte{ - // 425 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0xc1, 0x8a, 0x13, 0x41, - 0x10, 0x9d, 0x4e, 0xa2, 0x90, 0x8a, 0xc9, 0xce, 0x36, 0x11, 0x43, 0x84, 0x21, 0xac, 0x97, 0xb0, - 0xe8, 0x0c, 0xae, 0x5f, 0xe0, 0x06, 0xd1, 0xc5, 0xc8, 0xc2, 0x24, 0x8b, 0xe0, 0x25, 0x4c, 0x32, - 0xe5, 0xa4, 0xd9, 0xa4, 0xbb, 0x99, 0xa9, 0x48, 0xe2, 0xc1, 0x6f, 0xf0, 0x23, 0x3c, 0xf8, 0x29, - 0x1e, 0xf7, 0xe8, 0x51, 0x92, 0x1f, 0x91, 0xee, 0xb6, 0x73, 0x71, 0x6f, 0xef, 0xbd, 0xea, 0x57, - 0x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x63, 0x38, 0x7d, 0xb3, 0xd6, 0xb4, 0xf3, 0xc7, 0x8c, - 0x18, 0x06, 0xbc, 0x0d, 0xcd, 0x2b, 0x79, 0xa9, 0x36, 0x32, 0x9f, 0x6e, 0x43, 0xc6, 0x3b, 0x00, - 0xd7, 0x1b, 0xf2, 0xbc, 0x66, 0xc6, 0xd3, 0xc9, 0xe4, 0x3d, 0xee, 0xde, 0xa2, 0x0c, 0xeb, 0x66, - 0xec, 0xe8, 0x44, 0x14, 0x32, 0x6c, 0xf4, 0x1b, 0x3f, 0x7f, 0x44, 0xec, 0x7c, 0x0c, 0x5d, 0xbf, - 0xf5, 0x46, 0xe7, 0x19, 0x61, 0x8a, 0x59, 0xa5, 0xa4, 0x31, 0xdf, 0xc8, 0x1c, 0x3f, 0x0b, 0x89, - 0x79, 0x18, 0x58, 0xb3, 0x5a, 0xcf, 0x2b, 0x52, 0x86, 0x33, 0x7e, 0x02, 0xad, 0xd7, 0xf9, 0x5a, - 0x48, 0xe7, 0x09, 0x6b, 0x6e, 0xdb, 0xe5, 0xd5, 0xaf, 0x7d, 0xc4, 0xee, 0xf6, 0x11, 0xfb, 0xb3, - 0x8f, 0xd8, 0xf7, 0x43, 0x14, 0xdc, 0x1d, 0xa2, 0xe0, 0xf7, 0x21, 0x0a, 0x3e, 0x25, 0x85, 0xa0, - 0xe5, 0x66, 0x1e, 0x2f, 0xd4, 0x3a, 0x31, 0x2d, 0x79, 0x61, 0xff, 0x2f, 0xf1, 0x85, 0x49, 0xb6, - 0xc7, 0x56, 0x25, 0xb4, 0xd3, 0x58, 0xcd, 0x1f, 0xda, 0x6a, 0xbc, 0xfa, 0x1b, 0x00, 0x00, 0xff, - 0xff, 0xc5, 0xfa, 0xf3, 0xc5, 0x77, 0x02, 0x00, 0x00, + // 426 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xc1, 0x8a, 0x13, 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 0x1f, 0xa2, 0xe0, 0x53, 0x52, 0x08, + 0x5a, 0x6e, 0xe6, 0xf1, 0x42, 0xad, 0x13, 0x73, 0x25, 0x2f, 0xec, 0xff, 0x25, 0xfe, 0x60, 0x92, + 0xed, 0xf1, 0xaa, 0x12, 0xda, 0x69, 0xac, 0xe6, 0x0f, 0xed, 0x69, 0xbc, 0xfa, 0x1b, 0x00, 0x00, + 0xff, 0xff, 0x9b, 0x82, 0x5d, 0x57, 0x77, 0x02, 0x00, 0x00, } func (m *ObserverMapper) Marshal() (dAtA []byte, err error) { @@ -561,7 +561,7 @@ func (m *ObserverMapper) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.ObserverChain == nil { - m.ObserverChain = &pkg.Chain{} + m.ObserverChain = &proto1.Chain{} } if err := m.ObserverChain.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/x/observer/types/params.pb.go b/x/observer/types/params.pb.go index 5535e3a392..28cd9b2623 100644 --- a/x/observer/types/params.pb.go +++ b/x/observer/types/params.pb.go @@ -12,7 +12,7 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - pkg "github.com/zeta-chain/zetacore/pkg" + proto1 "github.com/zeta-chain/zetacore/pkg/proto" ) // Reference imports to suppress errors if they are not otherwise used. @@ -232,7 +232,7 @@ func (m *ChainParams) GetIsSupported() bool { // Deprecated(v13): Use ChainParamsList type ObserverParams struct { - Chain *pkg.Chain `protobuf:"bytes,1,opt,name=chain,proto3" json:"chain,omitempty"` + Chain *proto1.Chain `protobuf:"bytes,1,opt,name=chain,proto3" json:"chain,omitempty"` BallotThreshold github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=ballot_threshold,json=ballotThreshold,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"ballot_threshold"` MinObserverDelegation github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=min_observer_delegation,json=minObserverDelegation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"min_observer_delegation"` IsSupported bool `protobuf:"varint,5,opt,name=is_supported,json=isSupported,proto3" json:"is_supported,omitempty"` @@ -271,7 +271,7 @@ func (m *ObserverParams) XXX_DiscardUnknown() { var xxx_messageInfo_ObserverParams proto.InternalMessageInfo -func (m *ObserverParams) GetChain() *pkg.Chain { +func (m *ObserverParams) GetChain() *proto1.Chain { if m != nil { return m.Chain } @@ -421,48 +421,48 @@ var fileDescriptor_4542fa62877488a1 = []byte{ 0xc7, 0x76, 0x48, 0x9b, 0xaa, 0x48, 0x2b, 0xf5, 0x94, 0x37, 0xf3, 0x7e, 0xef, 0x3f, 0x6f, 0xde, 0xbc, 0x17, 0xc3, 0x33, 0x3e, 0x95, 0x54, 0xbc, 0xa5, 0xc2, 0x4b, 0xb0, 0xc0, 0x0b, 0xe9, 0x26, 0x82, 0x2b, 0x6e, 0xed, 0xff, 0x4c, 0x15, 0x26, 0x33, 0xcc, 0x62, 0x57, 0x5b, 0x5c, 0x50, 0xb7, - 0x24, 0xbb, 0x7b, 0xc9, 0x3c, 0xf4, 0x92, 0x79, 0x98, 0xb3, 0xdd, 0xa7, 0x21, 0x0f, 0xb9, 0x36, - 0xbd, 0xcc, 0x2a, 0x76, 0x9f, 0xaf, 0x85, 0x4b, 0x23, 0x77, 0xf4, 0x7f, 0x84, 0xf6, 0x28, 0x13, - 0x3e, 0xd5, 0xe7, 0x9d, 0x30, 0xa9, 0xac, 0xaf, 0xa1, 0xa9, 0xcf, 0x42, 0x79, 0x0e, 0xb6, 0xd1, - 0xab, 0x0d, 0xcc, 0xe1, 0xc0, 0xbd, 0x27, 0x09, 0x77, 0x43, 0xc3, 0x37, 0xc9, 0x7f, 0x8b, 0xfe, - 0x6f, 0x0d, 0x30, 0x37, 0x9c, 0xd6, 0xfb, 0xb0, 0x9b, 0x8b, 0xb3, 0xc0, 0x36, 0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 @@ func (m *ObserverParams) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Chain == nil { - m.Chain = &pkg.Chain{} + m.Chain = &proto1.Chain{} } if err := m.Chain.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/x/observer/types/pending_nonces.pb.go b/x/observer/types/pending_nonces.pb.go index b8c30f2998..c36c912c1b 100644 --- a/x/observer/types/pending_nonces.pb.go +++ b/x/observer/types/pending_nonces.pb.go @@ -11,7 +11,7 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - _ "github.com/zeta-chain/zetacore/pkg" + _ "github.com/zeta-chain/zetacore/pkg/proto" ) // Reference imports to suppress errors if they are not otherwise used. @@ -101,23 +101,23 @@ func init() { func init() { proto.RegisterFile("observer/pending_nonces.proto", fileDescriptor_dd001e4838750ecf) } var fileDescriptor_dd001e4838750ecf = []byte{ - // 250 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcd, 0x4f, 0x2a, 0x4e, - 0x2d, 0x2a, 0x4b, 0x2d, 0xd2, 0x2f, 0x48, 0xcd, 0x4b, 0xc9, 0xcc, 0x4b, 0x8f, 0xcf, 0xcb, 0xcf, - 0x4b, 0x4e, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0xae, 0x4a, 0x2d, 0x49, 0x4c, - 0xce, 0x48, 0xcc, 0xcc, 0xd3, 0x03, 0xb3, 0xf2, 0x8b, 0x52, 0xf5, 0x60, 0x3a, 0xa4, 0x78, 0x0b, - 0xb2, 0xd3, 0xf5, 0x0b, 0xb2, 0xd3, 0x21, 0x6a, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x4c, - 0x7d, 0x10, 0x0b, 0x22, 0xaa, 0x54, 0xc1, 0xc5, 0x1b, 0x00, 0x31, 0xd9, 0x0f, 0x6c, 0xb0, 0x90, - 0x34, 0x17, 0x27, 0xd8, 0x8a, 0xf8, 0x9c, 0xfc, 0x72, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xe6, 0x20, - 0x0e, 0xb0, 0x80, 0x4f, 0x7e, 0xb9, 0x90, 0x2c, 0x17, 0x17, 0x44, 0x32, 0x23, 0x33, 0x3d, 0x43, - 0x82, 0x09, 0x2c, 0x0b, 0x51, 0xee, 0x91, 0x99, 0x9e, 0x21, 0x24, 0xc9, 0xc5, 0x01, 0x76, 0x4c, - 0x7c, 0x66, 0x8a, 0x04, 0x33, 0x58, 0x92, 0x1d, 0xcc, 0xf7, 0x4c, 0x11, 0x12, 0xe0, 0x62, 0x2e, - 0x29, 0x2e, 0x96, 0x60, 0x51, 0x60, 0xd4, 0xe0, 0x0c, 0x02, 0x31, 0x9d, 0x3c, 0x4f, 0x3c, 0x92, - 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, - 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x4a, 0x3f, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, - 0x39, 0x3f, 0x57, 0x1f, 0xe4, 0x2d, 0x5d, 0xb0, 0x21, 0xfa, 0x30, 0x1f, 0xea, 0x57, 0xe8, 0xc3, - 0x43, 0xa5, 0xa4, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0xec, 0x17, 0x63, 0x40, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xc7, 0x5c, 0x5d, 0xfc, 0x2e, 0x01, 0x00, 0x00, + // 249 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x3c, 0x50, 0xbf, 0x4a, 0x03, 0x31, + 0x1c, 0xbe, 0x78, 0xa2, 0x6d, 0xa0, 0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x3d, 0xcf, 0x9e, 0x85, + 0x32, 0x51, 0xbf, 0xd5, 0x65, 0x03, 0xaf, 0x62, 0x98, 0x75, 0x83, 0x25, 0xe2, 0xb8, 0x50, 0xec, + 0xc5, 0xff, 0xaf, 0xc4, 0x0f, 0x27, 0x43, 0x7d, 0x86, 0x5b, 0x6e, 0xff, 0x02, 0x00, 0x00, 0xff, + 0xff, 0x24, 0x1e, 0x5b, 0xda, 0x2e, 0x01, 0x00, 0x00, } func (m *PendingNonces) Marshal() (dAtA []byte, err error) { diff --git a/x/observer/types/query.pb.go b/x/observer/types/query.pb.go index 9d42d85fa8..f8c16dc42c 100644 --- a/x/observer/types/query.pb.go +++ b/x/observer/types/query.pb.go @@ -14,7 +14,7 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" - pkg "github.com/zeta-chain/zetacore/pkg" + proto1 "github.com/zeta-chain/zetacore/pkg/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -785,11 +785,11 @@ func (m *QueryTssHistoryResponse) GetPagination() *query.PageResponse { } type QueryProveRequest struct { - ChainId int64 `protobuf:"varint,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - TxHash string `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` - Proof *pkg.Proof `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"` - BlockHash string `protobuf:"bytes,4,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` - TxIndex int64 `protobuf:"varint,5,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` + ChainId int64 `protobuf:"varint,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + TxHash string `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + Proof *proto1.Proof `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"` + BlockHash string `protobuf:"bytes,4,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + TxIndex int64 `protobuf:"varint,5,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` } func (m *QueryProveRequest) Reset() { *m = QueryProveRequest{} } @@ -839,7 +839,7 @@ func (m *QueryProveRequest) GetTxHash() string { return "" } -func (m *QueryProveRequest) GetProof() *pkg.Proof { +func (m *QueryProveRequest) GetProof() *proto1.Proof { if m != nil { return m.Proof } @@ -1363,7 +1363,7 @@ func (m *QuerySupportedChains) XXX_DiscardUnknown() { var xxx_messageInfo_QuerySupportedChains proto.InternalMessageInfo type QuerySupportedChainsResponse struct { - Chains []*pkg.Chain `protobuf:"bytes,1,rep,name=chains,proto3" json:"chains,omitempty"` + Chains []*proto1.Chain `protobuf:"bytes,1,rep,name=chains,proto3" json:"chains,omitempty"` } func (m *QuerySupportedChainsResponse) Reset() { *m = QuerySupportedChainsResponse{} } @@ -1399,7 +1399,7 @@ func (m *QuerySupportedChainsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QuerySupportedChainsResponse proto.InternalMessageInfo -func (m *QuerySupportedChainsResponse) GetChains() []*pkg.Chain { +func (m *QuerySupportedChainsResponse) GetChains() []*proto1.Chain { if m != nil { return m.Chains } @@ -2323,8 +2323,8 @@ func (m *QueryAllBlockHeaderRequest) GetPagination() *query.PageRequest { } type QueryAllBlockHeaderResponse struct { - BlockHeaders []*pkg.BlockHeader `protobuf:"bytes,1,rep,name=block_headers,json=blockHeaders,proto3" json:"block_headers,omitempty"` - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` + BlockHeaders []*proto1.BlockHeader `protobuf:"bytes,1,rep,name=block_headers,json=blockHeaders,proto3" json:"block_headers,omitempty"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryAllBlockHeaderResponse) Reset() { *m = QueryAllBlockHeaderResponse{} } @@ -2360,7 +2360,7 @@ func (m *QueryAllBlockHeaderResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryAllBlockHeaderResponse proto.InternalMessageInfo -func (m *QueryAllBlockHeaderResponse) GetBlockHeaders() []*pkg.BlockHeader { +func (m *QueryAllBlockHeaderResponse) GetBlockHeaders() []*proto1.BlockHeader { if m != nil { return m.BlockHeaders } @@ -2419,7 +2419,7 @@ func (m *QueryGetBlockHeaderByHashRequest) GetBlockHash() []byte { } type QueryGetBlockHeaderByHashResponse struct { - BlockHeader *pkg.BlockHeader `protobuf:"bytes,1,opt,name=block_header,json=blockHeader,proto3" json:"block_header,omitempty"` + BlockHeader *proto1.BlockHeader `protobuf:"bytes,1,opt,name=block_header,json=blockHeader,proto3" json:"block_header,omitempty"` } func (m *QueryGetBlockHeaderByHashResponse) Reset() { *m = QueryGetBlockHeaderByHashResponse{} } @@ -2455,7 +2455,7 @@ func (m *QueryGetBlockHeaderByHashResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryGetBlockHeaderByHashResponse proto.InternalMessageInfo -func (m *QueryGetBlockHeaderByHashResponse) GetBlockHeader() *pkg.BlockHeader { +func (m *QueryGetBlockHeaderByHashResponse) GetBlockHeader() *proto1.BlockHeader { if m != nil { return m.BlockHeader } @@ -2611,7 +2611,7 @@ func init() { func init() { proto.RegisterFile("observer/query.proto", fileDescriptor_dcb801e455adaee4) } var fileDescriptor_dcb801e455adaee4 = []byte{ - // 2492 bytes of a gzipped FileDescriptorProto + // 2493 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x5a, 0xcd, 0x6f, 0x1b, 0xc7, 0x15, 0xf7, 0x5a, 0x91, 0x2c, 0x3d, 0x7d, 0x58, 0x1e, 0xcb, 0x5f, 0x6b, 0x5b, 0x96, 0xd7, 0x49, 0x2c, 0x2b, 0x36, 0x19, 0xcb, 0x71, 0xfd, 0x1d, 0x5b, 0x74, 0x63, 0xc9, 0x4e, 0x6a, 0x3b, 0xa4, @@ -2619,155 +2619,155 @@ var fileDescriptor_dcb801e455adaee4 = []byte{ 0x42, 0x8b, 0x1e, 0x83, 0x1e, 0x02, 0x14, 0x68, 0x4f, 0x2d, 0x0a, 0x04, 0x3d, 0x16, 0x28, 0x02, 0x14, 0x2d, 0x50, 0xf4, 0x90, 0x53, 0x73, 0xe8, 0x21, 0x45, 0x81, 0xa2, 0xbd, 0xb4, 0x81, 0xdd, 0xfe, 0x1f, 0xc5, 0xbe, 0x7d, 0xcb, 0x9d, 0x5d, 0x2e, 0x97, 0x43, 0x45, 0xb9, 0x71, 0x67, 0xe6, - 0xbd, 0xf9, 0xfd, 0xde, 0xbc, 0x99, 0x79, 0x3f, 0xee, 0xc2, 0x8c, 0x53, 0xf1, 0xb8, 0xbb, 0xce, + 0xbd, 0xf9, 0xfd, 0xde, 0xbc, 0x99, 0x37, 0x3f, 0xee, 0xc2, 0x8c, 0x53, 0xf1, 0xb8, 0xbb, 0xce, 0xdd, 0xfc, 0x7b, 0x6b, 0xdc, 0x6d, 0xe7, 0x5a, 0xae, 0x23, 0x1c, 0x76, 0xf4, 0x03, 0x2e, 0xcc, - 0x6a, 0xc3, 0xb4, 0xec, 0x1c, 0xfe, 0x72, 0x5c, 0x9e, 0x0b, 0x07, 0xea, 0x93, 0xad, 0x27, 0xf5, - 0x7c, 0xeb, 0x49, 0x3d, 0x18, 0xab, 0x2f, 0x54, 0x1d, 0xef, 0xa9, 0xe3, 0xe5, 0x2b, 0xa6, 0xc7, - 0x03, 0x27, 0xf9, 0xf5, 0xf3, 0x15, 0x2e, 0xcc, 0xf3, 0xf9, 0x96, 0x59, 0xb7, 0x6c, 0x53, 0x58, - 0x8e, 0x4d, 0x63, 0x67, 0xea, 0x4e, 0xdd, 0xc1, 0x9f, 0x79, 0xff, 0x17, 0xb5, 0x1e, 0xab, 0x3b, - 0x4e, 0xbd,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52, 0x43, 0xc0, 0x98, 0xef, 0xd7, 0xc5, 0x34, 0xec, 0x82, - 0xad, 0x75, 0xc3, 0x66, 0x05, 0x18, 0xf3, 0x9f, 0xcb, 0xa2, 0xdd, 0xe2, 0xc8, 0x6b, 0x6a, 0xf1, - 0xa5, 0xcc, 0x30, 0xfb, 0xfe, 0x1f, 0xb5, 0x5b, 0xbc, 0x38, 0xba, 0x4e, 0xbf, 0x8c, 0x3f, 0xec, - 0x86, 0x13, 0x3d, 0x59, 0x50, 0x14, 0x06, 0x0a, 0xf8, 0xeb, 0x30, 0x82, 0x20, 0xfd, 0x48, 0x0f, - 0xe1, 0x1e, 0xef, 0x87, 0x08, 0x19, 0x17, 0xc9, 0x8a, 0xbd, 0x03, 0xd3, 0x41, 0x2f, 0x6e, 0xa3, - 0x80, 0xdb, 0x10, 0x72, 0x3b, 0x9b, 0xe9, 0xe9, 0x41, 0x64, 0x84, 0x14, 0xf7, 0x3a, 0xf1, 0x06, - 0x76, 0x1f, 0x26, 0x89, 0x85, 0x27, 0x4c, 0xb1, 0xe6, 0xe1, 0x3e, 0x99, 0x5a, 0x3c, 0x93, 0xe9, - 0x35, 0x88, 0x4a, 0x09, 0x0d, 0x8a, 0x13, 0x15, 0xe9, 0xc9, 0x60, 0x30, 0x8d, 0x81, 0x7b, 0x40, - 0x63, 0x4b, 0x5c, 0x18, 0x97, 0xe1, 0x70, 0xb2, 0xad, 0x13, 0xc5, 0x63, 0x30, 0x16, 0xba, 0x0d, - 0x8a, 0x88, 0xb1, 0x62, 0xd4, 0x60, 0x1c, 0xa4, 0x64, 0x2f, 0xad, 0xb5, 0x5a, 0x8e, 0x2b, 0x78, - 0x0d, 0x0f, 0x69, 0xcf, 0x28, 0x50, 0x25, 0x94, 0x68, 0xef, 0x78, 0x35, 0x60, 0x04, 0xb1, 0x87, - 0x75, 0x49, 0x70, 0x3a, 0x04, 0xb7, 0x37, 0xf5, 0x18, 0x37, 0xc1, 0x88, 0xd5, 0xb7, 0xc1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 0xbc, 0xf0, 0xbe, 0x9f, - 0xc6, 0xfb, 0x5e, 0x36, 0x98, 0xa8, 0x44, 0x0f, 0x3b, 0xf8, 0x37, 0xc3, 0x12, 0x2d, 0xe1, 0x32, - 0x17, 0xd2, 0x6c, 0x05, 0xbf, 0x66, 0x6e, 0x84, 0xb1, 0x88, 0xeb, 0x10, 0x3f, 0x16, 0x13, 0x92, - 0x0e, 0x31, 0xde, 0xa5, 0x05, 0x4b, 0x77, 0x41, 0x3c, 0x2f, 0xc0, 0x84, 0xcc, 0x93, 0x22, 0xda, - 0x4d, 0x73, 0x5c, 0xa2, 0x69, 0x5c, 0x8f, 0x0e, 0x70, 0x69, 0x8c, 0x5f, 0xa8, 0x29, 0xa4, 0x97, - 0xf1, 0xa3, 0x54, 0x6a, 0x64, 0x4d, 0xb0, 0xbe, 0x0d, 0x4c, 0x86, 0x85, 0x35, 0x24, 0x27, 0x70, - 0xe7, 0xfa, 0xe4, 0x53, 0xc2, 0xe5, 0x74, 0x25, 0xd1, 0xb2, 0xf8, 0xf1, 0x3c, 0x0c, 0x23, 0x02, - 0xf6, 0x91, 0x06, 0x23, 0x41, 0xc9, 0xc1, 0xf2, 0x99, 0x5e, 0xbb, 0x95, 0x98, 0xfe, 0xaa, 0xba, - 0x41, 0x40, 0xca, 0x38, 0xf5, 0x93, 0xbf, 0xff, 0xf7, 0x67, 0xbb, 0x8f, 0xb3, 0xa3, 0x79, 0x7f, - 0xfc, 0x39, 0x34, 0xcd, 0x27, 0xfe, 0x8a, 0x65, 0x7f, 0xd6, 0x60, 0x34, 0x14, 0x46, 0xec, 0x7c, - 0xff, 0x39, 0x12, 0x72, 0x4d, 0x5f, 0x1c, 0xc4, 0x84, 0x80, 0xdd, 0x43, 0x60, 0x5f, 0x67, 0x85, - 0x54, 0x60, 0x1d, 0x49, 0x96, 0xdf, 0xec, 0xd2, 0x25, 0x5b, 0xf9, 0xcd, 0x98, 0x70, 0xda, 0x62, - 0xff, 0xd0, 0x80, 0x75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0xef, 0xc0, 0x74, 0xd0, 0x8b, 0xdb, 0x28, + 0xe0, 0x36, 0x84, 0xdc, 0xce, 0x66, 0x7a, 0x7a, 0x10, 0x19, 0x21, 0xc5, 0xbd, 0x4e, 0xbc, 0x81, + 0xdd, 0x87, 0x49, 0x62, 0xe1, 0x09, 0x53, 0xac, 0x79, 0xb8, 0x4f, 0xa6, 0x16, 0xcf, 0x64, 0x7a, + 0x0d, 0xa2, 0x52, 0x42, 0x83, 0xe2, 0x44, 0x45, 0x7a, 0x32, 0x18, 0x4c, 0x63, 0xe0, 0x1e, 0xd0, + 0xd8, 0x12, 0x17, 0xc6, 0x65, 0x38, 0x9c, 0x6c, 0xeb, 0x44, 0xf1, 0x18, 0x8c, 0x85, 0x6e, 0x83, + 0x4b, 0xc4, 0x58, 0x31, 0x6a, 0x30, 0x0e, 0x52, 0xb2, 0x97, 0xd6, 0x5a, 0x2d, 0xc7, 0x15, 0xbc, + 0x86, 0x87, 0xb4, 0x67, 0x14, 0xe8, 0x26, 0x94, 0x68, 0xef, 0x78, 0x35, 0x60, 0x04, 0xb1, 0x87, + 0xf7, 0x92, 0xe0, 0x74, 0x08, 0xaa, 0x37, 0xf5, 0x18, 0x37, 0xc1, 0x88, 0xdd, 0x6f, 0x83, 0xdd, + 0x76, 0xc7, 0x71, 0x55, 0xef, 0x08, 0x2e, 0x9c, 0xca, 0x74, 0x40, 0x58, 0xde, 0x84, 0x89, 0xc0, + 0x43, 0x6c, 0xe7, 0x2b, 0xdc, 0x28, 0xe9, 0xec, 0x18, 0xaf, 0x46, 0x0f, 0xc6, 0xb1, 0xc4, 0x45, + 0x3e, 0x7e, 0xea, 0xd8, 0x89, 0x2b, 0x7b, 0xe2, 0xf4, 0x79, 0x90, 0x8a, 0xe4, 0xac, 0x2a, 0x12, + 0x4c, 0xc8, 0x18, 0x1a, 0x49, 0x56, 0xdc, 0x77, 0x6a, 0x7c, 0x29, 0x50, 0x39, 0xd9, 0xb2, 0xe2, + 0x07, 0x11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, 0xaf, 0xce, 0x85, 0x05, 0xc8, 0x99, 0xbd, 0xea, + 0x10, 0x09, 0x23, 0xbb, 0x36, 0xf8, 0xc3, 0xfd, 0x7b, 0x96, 0x3f, 0x95, 0xbd, 0xea, 0x18, 0x3c, + 0xda, 0x1d, 0x41, 0x1f, 0xaf, 0x3a, 0x6e, 0x6d, 0xc7, 0x45, 0xeb, 0xef, 0xb4, 0x48, 0x1d, 0xc7, + 0xe7, 0x21, 0x2a, 0xcb, 0x09, 0x2a, 0x43, 0x6a, 0x54, 0x28, 0x37, 0x23, 0x42, 0x3b, 0xb7, 0x07, + 0x4b, 0xa4, 0x51, 0x29, 0xfc, 0x78, 0xd4, 0x2e, 0xd9, 0x35, 0x14, 0x81, 0x0a, 0x57, 0xe3, 0x19, + 0x18, 0x46, 0xd9, 0x49, 0x3a, 0x26, 0x78, 0x30, 0x56, 0x49, 0xb9, 0xa6, 0x3b, 0xed, 0xb1, 0xac, + 0x43, 0x83, 0x2f, 0xab, 0x74, 0xb6, 0x16, 0xf0, 0x4e, 0x8d, 0xff, 0xa9, 0xed, 0xf4, 0xaa, 0xfe, + 0x52, 0x93, 0xb3, 0x47, 0x9a, 0x86, 0x88, 0x5c, 0x84, 0x49, 0xf9, 0x2f, 0xbd, 0xb0, 0xde, 0x4f, + 0x63, 0xbd, 0x97, 0x0d, 0x26, 0x2a, 0xd1, 0xc3, 0x0e, 0xfe, 0xcd, 0xb0, 0x44, 0x4b, 0xb8, 0xcc, + 0x85, 0x34, 0x5b, 0xc1, 0xbf, 0x33, 0x37, 0xc2, 0x58, 0xc4, 0x75, 0x88, 0x1f, 0x8b, 0x09, 0x49, + 0x87, 0x18, 0xef, 0xd2, 0x82, 0xa5, 0xbb, 0x20, 0x9e, 0x17, 0x60, 0x42, 0xe6, 0x49, 0x11, 0xed, + 0xa6, 0x39, 0x2e, 0xd1, 0x34, 0xae, 0x47, 0x07, 0xb8, 0x34, 0xc6, 0xbf, 0xa8, 0x29, 0xa4, 0x97,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 0xa1, 0x5b, 0x54, 0x12, 0x28, 0x61, 0xa2, 0x5f, 0x19, 0xd8, + 0xa4, 0x03, 0xf6, 0x2c, 0x82, 0x7d, 0x99, 0xbd, 0x98, 0x0a, 0xd6, 0x4b, 0x60, 0xfb, 0x8f, 0x06, + 0x07, 0xd3, 0x25, 0x0e, 0xbb, 0xd9, 0x1f, 0x43, 0xa6, 0xba, 0xd2, 0x6f, 0x6d, 0xdf, 0x01, 0x71, + 0x29, 0x20, 0x97, 0xeb, 0xec, 0x6a, 0x2a, 0x97, 0x3a, 0x17, 0x65, 0x59, 0xf2, 0x94, 0x57, 0x1d, + 0x37, 0x68, 0xc8, 0x6f, 0x86, 0xe7, 0xde, 0x16, 0xfb, 0x44, 0x83, 0xa9, 0xf8, 0x34, 0xec, 0xd2, + 0xa0, 0xc0, 0x42, 0x46, 0x97, 0x07, 0x37, 0x24, 0x26, 0xe7, 0x90, 0xc9, 0x69, 0xf6, 0x92, 0x12, + 0x13, 0x1f, 0x74, 0x4c, 0x19, 0xa8, 0x21, 0xee, 0x96, 0x41, 0x8a, 0x88, 0x53, 0x84, 0x8d, 0xf1, + 0x2a, 0x22, 0x5e, 0x60, 0xf3, 0xa9, 0x88, 0x25, 0x21, 0x96, 0xdf, 0x44, 0xed, 0xb7, 0xe5, 0xe7, + 0xfe, 0x94, 0xe4, 0x69, 0xa9, 0xd9, 0x54, 0xc1, 0x9d, 0x2a, 0xdf, 0x54, 0x70, 0xa7, 0x0b, 0x32, + 0x63, 0x1e, 0x71, 0x1b, 0x6c, 0xae, 0x1f, 0x6e, 0xf6, 0x27, 0x0d, 0xf6, 0x26, 0xb4, 0x8a, 0xca, + 0x11, 0xd9, 0x53, 0x54, 0xa9, 0x1c, 0x91, 0xbd, 0xe5, 0x56, 0x9f, 0x14, 0x49, 0x2a, 0x31, 0xf6, + 0x73, 0x0d, 0x46, 0x02, 0x85, 0xc3, 0x16, 0x95, 0xe6, 0x8d, 0x89, 0x2c, 0xfd, 0xc2, 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, 0xf3, 0xe7, 0xb3, 0xbb, + 0xfe, 0xf9, 0x7c, 0x76, 0xd7, 0xe3, 0x7c, 0xdd, 0x12, 0x8d, 0xb5, 0x4a, 0xae, 0xea, 0x3c, 0x4d, + 0xbd, 0xd8, 0x6f, 0x48, 0x7b, 0xa7, 0xdd, 0xe2, 0x5e, 0x65, 0x04, 0x3f, 0x96, 0xbc, 0xf0, 0xff, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x86, 0x67, 0x26, 0x4b, 0xef, 0x2a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -8048,7 +8048,7 @@ func (m *QueryProveRequest) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Proof == nil { - m.Proof = &pkg.Proof{} + m.Proof = &proto1.Proof{} } if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -9090,7 +9090,7 @@ func (m *QuerySupportedChainsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Chains = append(m.Chains, &pkg.Chain{}) + m.Chains = append(m.Chains, &proto1.Chain{}) if err := m.Chains[len(m.Chains)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -10876,7 +10876,7 @@ func (m *QueryAllBlockHeaderResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.BlockHeaders = append(m.BlockHeaders, &pkg.BlockHeader{}) + m.BlockHeaders = append(m.BlockHeaders, &proto1.BlockHeader{}) if err := m.BlockHeaders[len(m.BlockHeaders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -11081,7 +11081,7 @@ func (m *QueryGetBlockHeaderByHashResponse) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.BlockHeader == nil { - m.BlockHeader = &pkg.BlockHeader{} + m.BlockHeader = &proto1.BlockHeader{} } if err := m.BlockHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/x/observer/types/tx.pb.go b/x/observer/types/tx.pb.go index 698cd74b66..354ea8a244 100644 --- a/x/observer/types/tx.pb.go +++ b/x/observer/types/tx.pb.go @@ -13,7 +13,7 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" - pkg "github.com/zeta-chain/zetacore/pkg" + proto1 "github.com/zeta-chain/zetacore/pkg/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -135,11 +135,11 @@ func (m *MsgUpdateObserverResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateObserverResponse proto.InternalMessageInfo type MsgAddBlockHeader struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - BlockHash []byte `protobuf:"bytes,3,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` - Height int64 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` - Header pkg.HeaderData `protobuf:"bytes,5,opt,name=header,proto3" json:"header"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + BlockHash []byte `protobuf:"bytes,3,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + Height int64 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` + Header proto1.HeaderData `protobuf:"bytes,5,opt,name=header,proto3" json:"header"` } func (m *MsgAddBlockHeader) Reset() { *m = MsgAddBlockHeader{} } @@ -203,11 +203,11 @@ func (m *MsgAddBlockHeader) GetHeight() int64 { return 0 } -func (m *MsgAddBlockHeader) GetHeader() pkg.HeaderData { +func (m *MsgAddBlockHeader) GetHeader() proto1.HeaderData { if m != nil { return m.Header } - return pkg.HeaderData{} + return proto1.HeaderData{} } type MsgAddBlockHeaderResponse struct { @@ -950,71 +950,71 @@ func init() { func init() { proto.RegisterFile("observer/tx.proto", fileDescriptor_1bcd40fa296a2b1d) } var fileDescriptor_1bcd40fa296a2b1d = []byte{ - // 1021 bytes of a gzipped FileDescriptorProto + // 1020 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcb, 0x6e, 0xdb, 0x46, - 0x17, 0x36, 0xa3, 0xc4, 0xb1, 0x8f, 0x1c, 0x5f, 0x26, 0x76, 0x2c, 0xcb, 0xb1, 0x62, 0x70, 0xf1, - 0x43, 0x7f, 0xeb, 0x4a, 0xb6, 0xd2, 0x16, 0x4d, 0x81, 0x2e, 0xec, 0x5e, 0x6c, 0x35, 0x4d, 0x6c, - 0x10, 0xa8, 0x17, 0xdd, 0x10, 0x23, 0xce, 0x98, 0x24, 0x42, 0xcd, 0x08, 0x1c, 0x2a, 0xb6, 0x8a, - 0xb6, 0x40, 0x1f, 0xa0, 0x68, 0x1f, 0xa0, 0x2f, 0xd1, 0x77, 0xe8, 0x22, 0xcb, 0x2c, 0xbb, 0x2a, - 0x0a, 0x7b, 0xd5, 0xbe, 0x40, 0xb7, 0x05, 0x87, 0xe4, 0x48, 0x14, 0x25, 0x4a, 0xf2, 0x8a, 0x9c, - 0x39, 0xdf, 0xf9, 0xce, 0x65, 0xbe, 0xb9, 0xc0, 0x1a, 0x6f, 0x09, 0xea, 0xbf, 0xa6, 0x7e, 0x3d, - 0xb8, 0xaa, 0x75, 0x7c, 0x1e, 0x70, 0xb4, 0xfd, 0x2d, 0x0d, 0xb0, 0xe5, 0x60, 0x97, 0xd5, 0xe4, - 0x1f, 0xf7, 0x69, 0x2d, 0x41, 0x95, 0x1f, 0x5a, 0xbc, 0xdd, 0xe6, 0xac, 0x1e, 0x7d, 0x22, 0x8f, - 0xf2, 0xba, 0xcd, 0x6d, 0x2e, 0x7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, 0xf8, 0x78, 0x02, 0x23, 0x97, 0x5e, - 0xd7, 0x61, 0x77, 0x5c, 0xe3, 0xd5, 0xea, 0x1c, 0x4a, 0x25, 0x45, 0x98, 0xe7, 0xb4, 0x67, 0x53, - 0x96, 0xb3, 0x26, 0xeb, 0x70, 0x4f, 0x06, 0x8c, 0x65, 0x14, 0x0d, 0xe2, 0xb5, 0x1f, 0xa4, 0x50, - 0xec, 0xbf, 0x6a, 0xf0, 0x50, 0x6e, 0x55, 0x41, 0x03, 0xb9, 0x53, 0x5f, 0xca, 0x0b, 0xea, 0x76, - 0x62, 0xfd, 0x1f, 0xac, 0x44, 0x26, 0x79, 0xcb, 0x99, 0x1e, 0xbf, 0x94, 0x82, 0x28, 0x18, 0x0f, - 0x2c, 0x45, 0xfd, 0x15, 0xbf, 0x44, 0x55, 0x58, 0x1d, 0xc4, 0x39, 0xae, 0xed, 0xc4, 0x47, 0xef, - 0x72, 0x1f, 0x78, 0xe2, 0xda, 0x8e, 0xbe, 0x03, 0xdb, 0x23, 0xb2, 0x4b, 0xb2, 0x6f, 0xfc, 0xb3, - 0x00, 0x85, 0x17, 0xc2, 0x46, 0x1c, 0x8a, 0x83, 0x67, 0xc9, 0xbb, 0xb9, 0xeb, 0x95, 0xde, 0xb2, - 0xe5, 0xa7, 0x33, 0x80, 0x93, 0xc0, 0xe8, 0x0a, 0x96, 0x87, 0x6e, 0xe8, 0xda, 0x24, 0x9a, 0x34, - 0xbe, 0xfc, 0xe1, 0x6c, 0x78, 0x15, 0xf9, 0x47, 0x0d, 0xd6, 0xb2, 0x77, 0xc8, 0xc1, 0x74, 0x6c, - 0x03, 0x2e, 0xe5, 0x67, 0x33, 0xbb, 0xa4, 0x72, 0xc8, 0xde, 0x14, 0x13, 0x73, 0xc8, 0xb8, 0x4c, - 0xce, 0x61, 0xec, 0x15, 0x82, 0x7c, 0x58, 0x4a, 0x9d, 0xae, 0x7b, 0x53, 0x2c, 0xa3, 0x42, 0x97, - 0xdf, 0x9f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x7b, 0x73, 0x53, 0x9e, 0xfb, 0xeb, 0xa6, 0x3c, 0xf7, 0x5d, 0xcd, + 0x76, 0x03, 0xa7, 0xd3, 0xac, 0x5a, 0xbc, 0x55, 0x0b, 0x39, 0x1f, 0x4b, 0xfa, 0x5a, 0x42, 0x5f, + 0xbb, 0xaa, 0xf5, 0x7e, 0xfa, 0xbb, 0x6d, 0x2a, 0x9a, 0xf3, 0xf2, 0x47, 0xff, 0xe9, 0xdb, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x8d, 0xcb, 0xc0, 0x5e, 0xd9, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. From cf9fb0d7cee009a4d91a371226237ae34323443e Mon Sep 17 00:00:00 2001 From: skosito Date: Mon, 25 Mar 2024 18:39:46 +0100 Subject: [PATCH 33/41] Reorganize protos and pkg subpackages --- cmd/zetaclientd/debug.go | 27 +- cmd/zetaclientd/keygen_tss.go | 8 +- cmd/zetaclientd/start.go | 3 +- cmd/zetacored/get_pubkey.go | 8 +- cmd/zetacored/observer_accounts.go | 6 +- common/bitcoin/proof_test.go | 100 --- common/ethereum/proof_test.go | 129 --- e2e/e2etests/test_bitcoin_withdraw.go | 4 +- e2e/e2etests/test_update_bytecode.go | 4 +- e2e/e2etests/test_zeta_withdraw.go | 4 +- e2e/runner/bitcoin.go | 8 +- e2e/runner/evm.go | 9 +- e2e/runner/setup_zeta.go | 8 +- e2e/txserver/zeta_tx_server.go | 15 +- pkg/{ => authz}/authz_tx_types.go | 2 +- pkg/{ => authz}/authz_tx_types_test.go | 2 +- pkg/chain_test.go | 381 --------- pkg/{ => chains}/address.go | 2 +- pkg/{ => chains}/address_test.go | 2 +- pkg/{ => chains}/bitcoin.go | 2 +- pkg/{ => chains}/bitcoin_test.go | 2 +- pkg/{ => chains}/chain.go | 2 +- pkg/{ => chains}/chain_id.go | 2 +- pkg/{ => chains}/chain_id_test.go | 5 +- {common => pkg/chains}/chain_test.go | 2 +- pkg/{ => chains}/chains.go | 2 +- pkg/chains/chains.pb.go | 450 ++++++++++ pkg/{ => chains}/chains_test.go | 2 +- pkg/{ => chains}/utils.go | 2 +- pkg/{ => chains}/utils_test.go | 2 +- pkg/{ => coin}/coin.go | 2 +- pkg/coin/coin.pb.go | 76 ++ pkg/{ => coin}/coin_test.go | 23 +- pkg/crypto/crypto.pb.go | 371 +++++++++ pkg/{ => crypto}/pubkey.go | 19 +- pkg/{ => crypto}/pubkey_test.go | 17 +- pkg/{ => crypto}/tss.go | 2 +- pkg/{ => crypto}/tss_test.go | 2 +- pkg/{ => gas}/gas_limits.go | 2 +- pkg/{ => gas}/gas_limits_test.go | 2 +- pkg/{ => proofs}/bitcoin/bitcoin.pb.go | 34 +- pkg/{ => proofs}/bitcoin/bitcoin_spv.go | 0 pkg/{ => proofs}/bitcoin/bitcoin_spv_test.go | 0 pkg/{ => proofs}/bitcoin/proof.go | 0 pkg/{ => proofs}/bitcoin/proof_test.go | 0 pkg/{ => proofs}/ethereum/ethereum.pb.go | 33 +- pkg/{ => proofs}/ethereum/proof.go | 0 pkg/{ => proofs}/ethereum/proof_test.go | 0 pkg/{ => proofs}/headers.go | 7 +- pkg/{ => proofs}/headers_test.go | 23 +- pkg/{ => proofs}/proof.go | 6 +- pkg/{ => proofs}/proof_test.go | 41 +- pkg/{proto/pkg.pb.go => proofs/proofs.pb.go} | 773 +++--------------- proto/crosschain/cross_chain_tx.proto | 6 +- proto/crosschain/events.proto | 1 - proto/crosschain/in_tx_tracker.proto | 4 +- proto/crosschain/tx.proto | 18 +- proto/fungible/events.proto | 6 +- proto/fungible/foreign_coins.proto | 4 +- proto/fungible/tx.proto | 4 +- proto/observer/chain_nonces.proto | 1 - proto/observer/node_account.proto | 4 +- proto/observer/nonce_to_cctx.proto | 1 - proto/observer/observer.proto | 4 +- proto/observer/params.proto | 4 +- proto/observer/pending_nonces.proto | 1 - proto/observer/query.proto | 11 +- proto/observer/tx.proto | 4 +- proto/pkg/chains/chains.proto | 44 + proto/pkg/coin/coin.proto | 14 + proto/pkg/crypto/crypto.proto | 15 + proto/pkg/pkg.proto | 89 -- proto/pkg/{ => proofs}/bitcoin/bitcoin.proto | 2 +- .../pkg/{ => proofs}/ethereum/ethereum.proto | 2 +- proto/pkg/proofs/proofs.proto | 31 + testutil/keeper/mocks/crosschain/fungible.go | 22 +- testutil/keeper/mocks/crosschain/observer.go | 67 +- testutil/keeper/mocks/fungible/observer.go | 10 +- testutil/network/genesis_state.go | 13 +- testutil/sample/common.go | 17 +- testutil/sample/crosschain.go | 8 +- testutil/sample/fungible.go | 4 +- testutil/sample/observer.go | 7 +- testutil/sample/sample.go | 4 +- x/crosschain/client/cli/cli_cctx.go | 17 +- x/crosschain/client/cli/cli_in_tx_tracker.go | 4 +- x/crosschain/client/cli/cli_tss.go | 8 +- .../client/integrationtests/cli_helpers.go | 25 +- x/crosschain/keeper/abci.go | 6 +- x/crosschain/keeper/abci_test.go | 20 +- x/crosschain/keeper/cctx.go | 4 +- x/crosschain/keeper/cctx_test.go | 4 +- x/crosschain/keeper/cctx_utils.go | 6 +- x/crosschain/keeper/cctx_utils_test.go | 20 +- x/crosschain/keeper/events.go | 6 +- x/crosschain/keeper/evm_deposit.go | 9 +- x/crosschain/keeper/evm_deposit_test.go | 40 +- x/crosschain/keeper/evm_hooks.go | 15 +- x/crosschain/keeper/evm_hooks_test.go | 64 +- x/crosschain/keeper/gas_payment.go | 14 +- x/crosschain/keeper/gas_payment_test.go | 55 +- .../keeper/grpc_query_zeta_conversion_rate.go | 4 +- x/crosschain/keeper/in_tx_tracker_test.go | 4 +- .../keeper/msg_server_add_to_intx_tracker.go | 4 +- .../msg_server_add_to_intx_tracker_test.go | 13 +- .../keeper/msg_server_add_to_outtx_tracker.go | 16 +- .../keeper/msg_server_migrate_tss_funds.go | 27 +- .../msg_server_migrate_tss_funds_test.go | 7 +- .../keeper/msg_server_refund_aborted_tx.go | 4 +- .../msg_server_refund_aborted_tx_test.go | 28 +- x/crosschain/keeper/msg_server_tss_voter.go | 6 +- .../keeper/msg_server_vote_inbound_tx.go | 4 +- .../keeper/msg_server_vote_inbound_tx_test.go | 10 +- .../keeper/msg_server_vote_outbound_tx.go | 5 +- .../keeper/msg_server_whitelist_erc20.go | 9 +- x/crosschain/keeper/refund.go | 15 +- x/crosschain/keeper/refund_test.go | 32 +- x/crosschain/keeper/utils_test.go | 14 +- x/crosschain/keeper/verify_proof.go | 20 +- x/crosschain/migrations/v4/migrate.go | 7 +- x/crosschain/migrations/v4/migrate_test.go | 33 +- x/crosschain/migrations/v5/migrate.go | 19 +- x/crosschain/migrations/v5/migrate_test.go | 57 +- x/crosschain/types/cross_chain_tx.pb.go | 162 ++-- x/crosschain/types/events.pb.go | 84 +- x/crosschain/types/expected_keepers.go | 20 +- x/crosschain/types/in_tx_tracker.pb.go | 40 +- .../types/message_add_to_in_tx_tracker.go | 9 +- .../message_add_to_in_tx_tracker_test.go | 44 +- .../types/message_add_to_out_tx_tracker.go | 4 +- x/crosschain/types/message_gas_price_voter.go | 4 +- .../types/message_gas_price_voter_test.go | 4 +- .../types/message_migrate_tss_funds.go | 4 +- .../types/message_migrate_tss_funds_test.go | 18 +- x/crosschain/types/message_tss_voter.go | 4 +- x/crosschain/types/message_tss_voter_test.go | 18 +- .../message_vote_on_observed_inbound_tx.go | 7 +- ...essage_vote_on_observed_inbound_tx_test.go | 19 +- .../message_vote_on_observed_outbound_tx.go | 12 +- ...ssage_vote_on_observed_outbound_tx_test.go | 26 +- x/crosschain/types/tx.pb.go | 269 +++--- x/emissions/abci_test.go | 6 +- .../keeper/block_rewards_components.go | 4 +- .../cli/tx_deploy_fungible_coin_zrc_4.go | 4 +- x/fungible/keeper/deposits.go | 20 +- x/fungible/keeper/deposits_test.go | 61 +- x/fungible/keeper/evm.go | 7 +- x/fungible/keeper/evm_test.go | 9 +- x/fungible/keeper/foreign_coins.go | 8 +- x/fungible/keeper/foreign_coins_test.go | 24 +- x/fungible/keeper/gas_coin_and_pool.go | 9 +- .../msg_server_deploy_fungible_coin_zrc20.go | 4 +- ..._server_deploy_fungible_coin_zrc20_test.go | 20 +- ...sg_server_update_contract_bytecode_test.go | 9 +- .../msg_server_update_system_contract.go | 4 +- .../msg_server_update_system_contract_test.go | 6 +- x/fungible/types/events.pb.go | 148 ++-- x/fungible/types/expected_keepers.go | 4 +- x/fungible/types/foreign_coins.pb.go | 67 +- .../message_deploy_fungible_coin_zrc20.go | 4 +- ...message_deploy_fungible_coin_zrc20_test.go | 10 +- x/fungible/types/tx.pb.go | 152 ++-- x/observer/genesis.go | 4 +- x/observer/keeper/block_header.go | 6 +- x/observer/keeper/chain_params.go | 16 +- x/observer/keeper/chain_params_test.go | 14 +- x/observer/keeper/grpc_query_block_header.go | 6 +- x/observer/keeper/grpc_query_prove.go | 11 +- x/observer/keeper/grpc_query_tss.go | 19 +- .../keeper/msg_server_add_block_header.go | 9 +- .../msg_server_add_block_header_test.go | 31 +- x/observer/keeper/msg_server_add_observer.go | 8 +- .../msg_server_remove_chain_params_test.go | 20 +- .../keeper/msg_server_reset_chain_nonces.go | 4 +- .../msg_server_reset_chain_nonces_test.go | 10 +- .../msg_server_update_chain_params_test.go | 10 +- x/observer/keeper/utils.go | 4 +- x/observer/keeper/utils_test.go | 6 +- x/observer/keeper/vote_inbound.go | 6 +- x/observer/keeper/vote_inbound_test.go | 39 +- x/observer/keeper/vote_outbound.go | 4 +- x/observer/keeper/vote_outbound_test.go | 18 +- x/observer/migrations/v5/migrate_test.go | 6 +- x/observer/types/chain_nonces.pb.go | 38 +- x/observer/types/chain_params.go | 34 +- x/observer/types/message_add_blame_vote.go | 4 +- x/observer/types/message_add_block_header.go | 7 +- .../types/message_add_block_header_test.go | 12 +- x/observer/types/message_add_observer.go | 6 +- .../types/message_remove_chain_params.go | 4 +- .../types/message_remove_chain_params_test.go | 6 +- .../types/message_reset_chain_nonces.go | 4 +- .../types/message_reset_chain_nonces_test.go | 14 +- .../types/message_update_chain_params_test.go | 6 +- x/observer/types/node_account.pb.go | 55 +- x/observer/types/nonce_to_cctx.pb.go | 26 +- x/observer/types/observer.pb.go | 64 +- x/observer/types/observer_set.go | 8 +- x/observer/types/params.go | 4 +- x/observer/types/params.pb.go | 110 +-- x/observer/types/parsers.go | 8 +- x/observer/types/pending_nonces.pb.go | 34 +- x/observer/types/query.pb.go | 340 ++++---- x/observer/types/tx.pb.go | 138 ++-- zetaclient/app_context/app_context.go | 6 +- zetaclient/authz/authz_signer.go | 6 +- zetaclient/bitcoin/bitcoin_client.go | 35 +- zetaclient/bitcoin/bitcoin_client_rpc_test.go | 4 +- zetaclient/bitcoin/bitcoin_client_test.go | 6 +- zetaclient/bitcoin/bitcoin_signer.go | 13 +- zetaclient/bitcoin/bitcoin_signer_test.go | 4 +- zetaclient/bitcoin/bitcoin_test.go | 4 +- zetaclient/bitcoin/inbound_tracker.go | 4 +- zetaclient/bitcoin/utils.go | 8 +- zetaclient/bitcoin/utils_test.go | 8 +- zetaclient/config/config_chain.go | 28 +- zetaclient/config/types.go | 4 +- zetaclient/core_context/zeta_core_context.go | 18 +- .../core_context/zeta_core_context_test.go | 20 +- zetaclient/evm/evm_client.go | 66 +- zetaclient/evm/evm_client_test.go | 9 +- zetaclient/evm/evm_signer.go | 26 +- zetaclient/evm/evm_signer_test.go | 7 +- zetaclient/evm/inbounds.go | 28 +- zetaclient/evm/inbounds_test.go | 60 +- zetaclient/evm/outbound_transaction_data.go | 11 +- .../evm/outbound_transaction_data_test.go | 6 +- zetaclient/evm/validation_test.go | 70 +- zetaclient/interfaces/interfaces.go | 22 +- zetaclient/interfaces/signer.go | 6 +- zetaclient/keys/keys.go | 10 +- .../supplychecker/zeta_supply_checker.go | 19 +- zetaclient/testutils/stub/chain_signer.go | 6 +- zetaclient/testutils/stub/core_bridge.go | 22 +- zetaclient/testutils/stub/tss_signer.go | 4 +- zetaclient/testutils/testdata.go | 24 +- zetaclient/testutils/testdata_naming.go | 12 +- zetaclient/tss/tss_signer.go | 8 +- zetaclient/tss/tss_signer_test.go | 4 +- zetaclient/zetabridge/query.go | 13 +- zetaclient/zetabridge/tx.go | 26 +- zetaclient/zetabridge/tx_vote_inbound.go | 4 +- zetaclient/zetabridge/zetacore_bridge.go | 39 +- zetaclient/zetacore_observer.go | 12 +- zetaclient/zetacore_observer_test.go | 22 +- 245 files changed, 3355 insertions(+), 3555 deletions(-) delete mode 100644 common/bitcoin/proof_test.go delete mode 100644 common/ethereum/proof_test.go rename pkg/{ => authz}/authz_tx_types.go (97%) rename pkg/{ => authz}/authz_tx_types_test.go (98%) delete mode 100644 pkg/chain_test.go rename pkg/{ => chains}/address.go (99%) rename pkg/{ => chains}/address_test.go (99%) rename pkg/{ => chains}/bitcoin.go (98%) rename pkg/{ => chains}/bitcoin_test.go (98%) rename pkg/{ => chains}/chain.go (99%) rename pkg/{ => chains}/chain_id.go (98%) rename pkg/{ => chains}/chain_id_test.go (89%) rename {common => pkg/chains}/chain_test.go (99%) rename pkg/{ => chains}/chains.go (99%) create mode 100644 pkg/chains/chains.pb.go rename pkg/{ => chains}/chains_test.go (99%) rename pkg/{ => chains}/utils.go (99%) rename pkg/{ => chains}/utils_test.go (99%) rename pkg/{ => coin}/coin.go (98%) create mode 100644 pkg/coin/coin.pb.go rename pkg/{ => coin}/coin_test.go (85%) create mode 100644 pkg/crypto/crypto.pb.go rename pkg/{ => crypto}/pubkey.go (91%) rename pkg/{ => crypto}/pubkey_test.go (96%) rename pkg/{ => crypto}/tss.go (98%) rename pkg/{ => crypto}/tss_test.go (99%) rename pkg/{ => gas}/gas_limits.go (98%) rename pkg/{ => gas}/gas_limits_test.go (99%) rename pkg/{ => proofs}/bitcoin/bitcoin.pb.go (86%) rename pkg/{ => proofs}/bitcoin/bitcoin_spv.go (100%) rename pkg/{ => proofs}/bitcoin/bitcoin_spv_test.go (100%) rename pkg/{ => proofs}/bitcoin/proof.go (100%) rename pkg/{ => proofs}/bitcoin/proof_test.go (100%) rename pkg/{ => proofs}/ethereum/ethereum.pb.go (86%) rename pkg/{ => proofs}/ethereum/proof.go (100%) rename pkg/{ => proofs}/ethereum/proof_test.go (100%) rename pkg/{ => proofs}/headers.go (97%) rename pkg/{ => proofs}/headers_test.go (91%) rename pkg/{ => proofs}/proof.go (95%) rename pkg/{ => proofs}/proof_test.go (80%) rename pkg/{proto/pkg.pb.go => proofs/proofs.pb.go} (52%) create mode 100644 proto/pkg/chains/chains.proto create mode 100644 proto/pkg/coin/coin.proto create mode 100644 proto/pkg/crypto/crypto.proto delete mode 100644 proto/pkg/pkg.proto rename proto/pkg/{ => proofs}/bitcoin/bitcoin.proto (61%) rename proto/pkg/{ => proofs}/ethereum/ethereum.proto (60%) create mode 100644 proto/pkg/proofs/proofs.proto diff --git a/cmd/zetaclientd/debug.go b/cmd/zetaclientd/debug.go index e60cf7e7a9..76450875cb 100644 --- a/cmd/zetaclientd/debug.go +++ b/cmd/zetaclientd/debug.go @@ -10,7 +10,8 @@ import ( "github.com/ethereum/go-ethereum/ethclient" "github.com/onrik/ethrpc" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/zetaclient/bitcoin" corecontext "github.com/zeta-chain/zetacore/zetaclient/core_context" "github.com/zeta-chain/zetacore/zetaclient/evm" @@ -90,12 +91,12 @@ func DebugCmd() *cobra.Command { return err } - chain := pkg.GetChainFromChainID(chainID) + chain := chains.GetChainFromChainID(chainID) if chain == nil { return fmt.Errorf("invalid chain id") } - if pkg.IsEVMChain(chain.ChainId) { + if chains.IsEVMChain(chain.ChainId) { ob := evm.ChainClient{ Mu: &sync.Mutex{}, @@ -104,7 +105,7 @@ func DebugCmd() *cobra.Command { ob.WithLogger(chainLogger) var ethRPC *ethrpc.EthRPC var client *ethclient.Client - coinType := pkg.CoinType_Cmd + coinType := coin.CoinType_Cmd for chain, evmConfig := range cfg.GetAllEVMConfigs() { if chainID == chain { ethRPC = ethrpc.NewEthRPC(evmConfig.Endpoint) @@ -114,7 +115,7 @@ func DebugCmd() *cobra.Command { } ob.WithEvmClient(client) ob.WithEvmJSONRPC(ethRPC) - ob.WithChain(*pkg.GetChainFromChainID(chainID)) + ob.WithChain(*chains.GetChainFromChainID(chainID)) } } hash := ethcommon.HexToHash(txHash) @@ -144,29 +145,29 @@ func DebugCmd() *cobra.Command { } evmChainParams.ZetaTokenContractAddress = chainParams.ZetaTokenContractAddress if strings.EqualFold(tx.To, chainParams.ConnectorContractAddress) { - coinType = pkg.CoinType_Zeta + coinType = coin.CoinType_Zeta } else if strings.EqualFold(tx.To, chainParams.Erc20CustodyContractAddress) { - coinType = pkg.CoinType_ERC20 + coinType = coin.CoinType_ERC20 } else if strings.EqualFold(tx.To, tssEthAddress) { - coinType = pkg.CoinType_Gas + coinType = coin.CoinType_Gas } } } switch coinType { - case pkg.CoinType_Zeta: + case coin.CoinType_Zeta: ballotIdentifier, err = ob.CheckAndVoteInboundTokenZeta(tx, receipt, false) if err != nil { return err } - case pkg.CoinType_ERC20: + case coin.CoinType_ERC20: ballotIdentifier, err = ob.CheckAndVoteInboundTokenERC20(tx, receipt, false) if err != nil { return err } - case pkg.CoinType_Gas: + case coin.CoinType_Gas: ballotIdentifier, err = ob.CheckAndVoteInboundTokenGas(tx, receipt, false) if err != nil { return err @@ -175,13 +176,13 @@ func DebugCmd() *cobra.Command { fmt.Println("CoinType not detected") } fmt.Println("CoinType : ", coinType) - } else if pkg.IsBitcoinChain(chain.ChainId) { + } else if chains.IsBitcoinChain(chain.ChainId) { obBtc := bitcoin.BTCChainClient{ Mu: &sync.Mutex{}, } obBtc.WithZetaClient(bridge) obBtc.WithLogger(chainLogger) - obBtc.WithChain(*pkg.GetChainFromChainID(chainID)) + obBtc.WithChain(*chains.GetChainFromChainID(chainID)) connCfg := &rpcclient.ConnConfig{ Host: cfg.BitcoinConfig.RPCHost, User: cfg.BitcoinConfig.RPCUsername, diff --git a/cmd/zetaclientd/keygen_tss.go b/cmd/zetaclientd/keygen_tss.go index 91d9efcf7f..72c7946da3 100644 --- a/cmd/zetaclientd/keygen_tss.go +++ b/cmd/zetaclientd/keygen_tss.go @@ -17,7 +17,7 @@ import ( tsscommon "github.com/zeta-chain/go-tss/common" "github.com/zeta-chain/go-tss/keygen" "github.com/zeta-chain/go-tss/p2p" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" observertypes "github.com/zeta-chain/zetacore/x/observer/types" "github.com/zeta-chain/zetacore/zetaclient/metrics" ) @@ -37,7 +37,7 @@ func GenerateTss( // Bitcoin chain ID is currently used for using the correct signature format // TODO: remove this once we have a better way to determine the signature format // https://github.com/zeta-chain/node/issues/1397 - bitcoinChainID := pkg.BtcRegtestChain().ChainId + bitcoinChainID := chains.BtcRegtestChain().ChainId btcChain, _, btcEnabled := appContext.GetBTCChainAndConfig() if btcEnabled { bitcoinChainID = btcChain.ChainId @@ -109,7 +109,7 @@ func GenerateTss( err = keygenTss(keyGen, tss, keygenLogger) if err != nil { keygenLogger.Error().Err(err).Msg("keygenTss error") - tssFailedVoteHash, err := zetaBridge.SetTSS("", keyGen.BlockNumber, pkg.ReceiveStatus_Failed) + tssFailedVoteHash, err := zetaBridge.SetTSS("", keyGen.BlockNumber, chains.ReceiveStatus_Failed) if err != nil { keygenLogger.Error().Err(err).Msg("Failed to broadcast Failed TSS Vote to zetacore") return nil, err @@ -127,7 +127,7 @@ func GenerateTss( } // If TSS is successful , broadcast the vote to zetacore and set Pubkey - tssSuccessVoteHash, err := zetaBridge.SetTSS(newTss.CurrentPubkey, keyGen.BlockNumber, pkg.ReceiveStatus_Success) + tssSuccessVoteHash, err := zetaBridge.SetTSS(newTss.CurrentPubkey, keyGen.BlockNumber, chains.ReceiveStatus_Success) if err != nil { keygenLogger.Error().Err(err).Msg("TSS successful but unable to broadcast vote to zeta-core") return nil, err diff --git a/cmd/zetaclientd/start.go b/cmd/zetaclientd/start.go index 7946dcd158..c591cd781c 100644 --- a/cmd/zetaclientd/start.go +++ b/cmd/zetaclientd/start.go @@ -21,6 +21,7 @@ import ( "github.com/tendermint/tendermint/crypto/secp256k1" "github.com/zeta-chain/go-tss/p2p" "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/authz" observerTypes "github.com/zeta-chain/zetacore/x/observer/types" mc "github.com/zeta-chain/zetacore/zetaclient" appcontext "github.com/zeta-chain/zetacore/zetaclient/app_context" @@ -99,7 +100,7 @@ func start(_ *cobra.Command, _ []string) error { } zetaBridge.WaitForCoreToCreateBlocks() startLogger.Info().Msgf("ZetaBridge is ready") - zetaBridge.SetAccountNumber(pkg.ZetaClientGranteeKey) + zetaBridge.SetAccountNumber(authz.ZetaClientGranteeKey) // cross-check chainid res, err := zetaBridge.GetNodeInfo() diff --git a/cmd/zetacored/get_pubkey.go b/cmd/zetacored/get_pubkey.go index cb5f61e5c2..4743a5dd14 100644 --- a/cmd/zetacored/get_pubkey.go +++ b/cmd/zetacored/get_pubkey.go @@ -6,8 +6,8 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/crypto" "github.com/spf13/cobra" - "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/pkg/cosmos" + zetacrypto "github.com/zeta-chain/zetacore/pkg/crypto" ) func GetPubKeyCmd() *cobra.Command { @@ -33,8 +33,8 @@ func GetPubKeyCmd() *cobra.Command { return cmd } -func GetPubKeySet(clientctx client.Context, tssAccountName, password string) (pkg.PubKeySet, error) { - pubkeySet := pkg.PubKeySet{ +func GetPubKeySet(clientctx client.Context, tssAccountName, password string) (zetacrypto.PubKeySet, error) { + pubkeySet := zetacrypto.PubKeySet{ Secp256k1: "", Ed25519: "", } @@ -52,7 +52,7 @@ func GetPubKeySet(clientctx client.Context, tssAccountName, password string) (pk if err != nil { return pubkeySet, err } - pubkey, err := pkg.NewPubKey(s) + pubkey, err := zetacrypto.NewPubKey(s) if err != nil { return pubkeySet, err } diff --git a/cmd/zetacored/observer_accounts.go b/cmd/zetacored/observer_accounts.go index 02f8ba49bd..a4f6dedf84 100644 --- a/cmd/zetacored/observer_accounts.go +++ b/cmd/zetacored/observer_accounts.go @@ -23,7 +23,7 @@ import ( "github.com/spf13/cobra" "github.com/zeta-chain/zetacore/app" "github.com/zeta-chain/zetacore/cmd/zetacored/config" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/crypto" crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -115,11 +115,11 @@ func AddObserverAccountsCmd() *cobra.Command { observerSet.ObserverList = append(observerSet.ObserverList, info.ObserverAddress) if info.ZetaClientGranteePubKey != "" { - pubkey, err := pkg.NewPubKey(info.ZetaClientGranteePubKey) + pubkey, err := crypto.NewPubKey(info.ZetaClientGranteePubKey) if err != nil { panic(err) } - pubkeySet := pkg.PubKeySet{ + pubkeySet := crypto.PubKeySet{ Secp256k1: pubkey, Ed25519: "", } diff --git a/common/bitcoin/proof_test.go b/common/bitcoin/proof_test.go deleted file mode 100644 index 0f521c4934..0000000000 --- a/common/bitcoin/proof_test.go +++ /dev/null @@ -1,100 +0,0 @@ -package bitcoin - -import ( - "bytes" - "encoding/base64" - "encoding/hex" - "encoding/json" - "testing" - - "github.com/btcsuite/btcd/btcjson" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" - "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common/testdata" -) - -func TestBitcoinMerkleProof(t *testing.T) { - blocks := testdata.LoadTestBlocks(t) - - t.Run("it should verify merkle proof", func(t *testing.T) { - for _, b := range blocks.Blocks { - // Deserialize the header bytes from base64 - headerBytes, err := base64.StdEncoding.DecodeString(b.HeaderBase64) - require.NoError(t, err) - header := unmarshalHeader(t, headerBytes) - - // Deserialize the block bytes from base64 - blockBytes, err := base64.StdEncoding.DecodeString(b.BlockBase64) - require.NoError(t, err) - blockVerbose := &btcjson.GetBlockVerboseTxResult{} - err = json.Unmarshal(blockBytes, blockVerbose) - require.NoError(t, err) - - txns := getBlockTxs(t, blockVerbose) - - // Build a Merkle tree from the transaction hashes and verify each transaction - mk := NewMerkle(txns) - for i, tx := range txns { - path, index, err := mk.BuildMerkleProof(i) - require.NoError(t, err) - - // True proof should verify - pass := Prove(*tx.Hash(), header.MerkleRoot, path, index) - require.True(t, pass) - - // Fake proof should not verify - fakeIndex := index ^ 0xffffffff // flip all bits - pass = Prove(*tx.Hash(), header.MerkleRoot, path, fakeIndex) - require.False(t, pass) - } - } - }) - - t.Run("it should fail if tree is empty", func(t *testing.T) { - mt := Merkle{ - tree: []*chainhash.Hash{}, - } - - _, _, err := mt.BuildMerkleProof(0) - require.Error(t, err) - }) - - t.Run("it should fail if tree len + 1 is not power of 2", func(t *testing.T) { - mt := Merkle{ - tree: []*chainhash.Hash{{}, {}}, - } - - _, _, err := mt.BuildMerkleProof(0) - require.Error(t, err) - }) - - t.Run("it should fail if txIndex out of range", func(t *testing.T) { - mt := Merkle{ - tree: []*chainhash.Hash{{}}, - } - - _, _, err := mt.BuildMerkleProof(2) - require.Error(t, err) - }) -} - -func unmarshalHeader(t *testing.T, headerBytes []byte) *wire.BlockHeader { - var header wire.BlockHeader - err := header.Deserialize(bytes.NewReader(headerBytes)) - require.NoError(t, err) - return &header -} - -func getBlockTxs(t *testing.T, blockVerbose *btcjson.GetBlockVerboseTxResult) []*btcutil.Tx { - txns := []*btcutil.Tx{} - for _, res := range blockVerbose.Tx { - txBytes, err := hex.DecodeString(res.Hex) - require.NoError(t, err) - tx, err := btcutil.NewTxFromBytes(txBytes) - require.NoError(t, err) - txns = append(txns, tx) - } - return txns -} diff --git a/common/ethereum/proof_test.go b/common/ethereum/proof_test.go deleted file mode 100644 index da0a60e463..0000000000 --- a/common/ethereum/proof_test.go +++ /dev/null @@ -1,129 +0,0 @@ -package ethereum - -import ( - "testing" - - "github.com/ethereum/go-ethereum/core/types" - "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/common/testdata" -) - -func TestProofGeneration(t *testing.T) { - header, err := testdata.ReadEthHeader() - require.NoError(t, err) - - var receipts types.Receipts - for i := 0; i < testdata.TxsCount; i++ { - receipt, err := testdata.ReadEthReceipt(i) - require.NoError(t, err) - receipts = append(receipts, &receipt) - } - - // generate a trie from the receipts and compare the root hash with the one in the header - receiptTree := NewTrie(receipts) - require.EqualValues(t, header.ReceiptHash.Hex(), receiptTree.Trie.Hash().Hex()) - - t.Run("generate proof for receipts", func(t *testing.T) { - for i, receipt := range receipts { - // generate a proof for each receipt and verify it - proof, err := receiptTree.GenerateProof(i) - require.NoError(t, err) - - verified, err := proof.Verify(header.ReceiptHash, i) - require.NoError(t, err) - - // recover the receipt from the proof and compare it with the original receipt - // NOTE: eth receipts only hashes the following fields - // data := &receiptRLP{r.statusEncoding(), r.CumulativeGasUsed, r.Bloom, r.Logs} - var verifiedReceipt types.Receipt - err = verifiedReceipt.UnmarshalBinary(verified) - require.NoError(t, err) - require.EqualValues(t, receipt.Status, verifiedReceipt.Status) - require.EqualValues(t, receipt.CumulativeGasUsed, verifiedReceipt.CumulativeGasUsed) - require.EqualValues(t, receipt.Bloom.Bytes(), verifiedReceipt.Bloom.Bytes()) - require.EqualValues(t, len(receipt.Logs), len(verifiedReceipt.Logs)) - for i, log := range receipt.Logs { - require.EqualValues(t, log.Address, verifiedReceipt.Logs[i].Address) - require.EqualValues(t, log.Topics, verifiedReceipt.Logs[i].Topics) - require.EqualValues(t, log.Data, verifiedReceipt.Logs[i].Data) - } - } - }) - - t.Run("should error verify for negative key", func(t *testing.T) { - proof, err := receiptTree.GenerateProof(0) - require.NoError(t, err) - - verified, err := proof.Verify(header.ReceiptHash, -1) - require.Error(t, err) - require.Nil(t, verified) - }) - - t.Run("should not generate proof for negative tx index", func(t *testing.T) { - proof, err := receiptTree.GenerateProof(-1) - require.Error(t, err) - require.Nil(t, proof) - }) - - t.Run("has key", func(t *testing.T) { - proof, err := receiptTree.GenerateProof(0) - require.NoError(t, err) - require.Greater(t, len(proof.Keys), 0) - - proof2, err := receiptTree.GenerateProof(1) - require.NoError(t, err) - require.Equal(t, len(proof2.Keys), 3) - - key := proof.Keys[0] - has, err := proof.Has(key) - require.NoError(t, err) - require.True(t, has) - - err = proof.Put(key, proof.Values[0]) - require.NoError(t, err) - - key2 := proof2.Keys[2] - has, err = proof.Has(key2) - require.NoError(t, err) - require.False(t, has) - }) - - t.Run("get key", func(t *testing.T) { - proof, err := receiptTree.GenerateProof(0) - require.NoError(t, err) - require.Greater(t, len(proof.Keys), 0) - - proof2, err := receiptTree.GenerateProof(1) - require.NoError(t, err) - require.Equal(t, len(proof2.Keys), 3) - - key := proof.Keys[0] - _, err = proof.Get(key) - require.NoError(t, err) - - key2 := proof2.Keys[2] - _, err = proof.Get(key2) - require.Error(t, err) - }) - - t.Run("delete key", func(t *testing.T) { - proof, err := receiptTree.GenerateProof(0) - require.NoError(t, err) - require.Greater(t, len(proof.Keys), 0) - - proof2, err := receiptTree.GenerateProof(1) - require.NoError(t, err) - require.Equal(t, len(proof2.Keys), 3) - - key := proof.Keys[0] - err = proof.Delete(key) - require.NoError(t, err) - - err = proof.Delete(key) - require.Error(t, err) - - key2 := proof2.Keys[2] - err = proof.Delete(key2) - require.Error(t, err) - }) -} diff --git a/e2e/e2etests/test_bitcoin_withdraw.go b/e2e/e2etests/test_bitcoin_withdraw.go index 61b0ca3f1f..3920b7b3ce 100644 --- a/e2e/e2etests/test_bitcoin_withdraw.go +++ b/e2e/e2etests/test_bitcoin_withdraw.go @@ -10,7 +10,7 @@ import ( "github.com/btcsuite/btcutil" "github.com/zeta-chain/zetacore/e2e/runner" "github.com/zeta-chain/zetacore/e2e/utils" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/zetaclient/testutils" ) @@ -122,7 +122,7 @@ func WithdrawBitcoin(r *runner.E2ERunner, amount *big.Int) { func WithdrawBitcoinRestricted(r *runner.E2ERunner, amount *big.Int) { // use restricted BTC P2WPKH address - addressRestricted, err := pkg.DecodeBtcAddress(testutils.RestrictedBtcAddressTest, pkg.BtcRegtestChain().ChainId) + addressRestricted, err := chains.DecodeBtcAddress(testutils.RestrictedBtcAddressTest, chains.BtcRegtestChain().ChainId) if err != nil { panic(err) } diff --git a/e2e/e2etests/test_update_bytecode.go b/e2e/e2etests/test_update_bytecode.go index 3cdca22d02..a36af1db7c 100644 --- a/e2e/e2etests/test_update_bytecode.go +++ b/e2e/e2etests/test_update_bytecode.go @@ -7,7 +7,7 @@ import ( "github.com/zeta-chain/zetacore/e2e/contracts/testzrc20" "github.com/zeta-chain/zetacore/e2e/runner" "github.com/zeta-chain/zetacore/e2e/utils" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/testutil/sample" fungibletypes "github.com/zeta-chain/zetacore/x/fungible/types" ) @@ -32,7 +32,7 @@ func TestUpdateBytecode(r *runner.E2ERunner, _ []string) { r.ZEVMClient, big.NewInt(5), // #nosec G701 test - always in range - uint8(pkg.CoinType_Gas), + uint8(coin.CoinType_Gas), ) if err != nil { panic(err) diff --git a/e2e/e2etests/test_zeta_withdraw.go b/e2e/e2etests/test_zeta_withdraw.go index 0afe9d0eaa..2b5dc055e0 100644 --- a/e2e/e2etests/test_zeta_withdraw.go +++ b/e2e/e2etests/test_zeta_withdraw.go @@ -9,7 +9,7 @@ import ( "github.com/zeta-chain/protocol-contracts/pkg/contracts/zevm/connectorzevm.sol" "github.com/zeta-chain/zetacore/e2e/runner" "github.com/zeta-chain/zetacore/e2e/utils" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" cctxtypes "github.com/zeta-chain/zetacore/x/crosschain/types" ) @@ -135,7 +135,7 @@ func TestZetaWithdrawBTCRevert(r *runner.E2ERunner, args []string) { lessThanAmount := amount.Div(amount, big.NewInt(10)) // 1/10 of amount tx, err = r.ConnectorZEVM.Send(r.ZEVMAuth, connectorzevm.ZetaInterfacesSendInput{ - DestinationChainId: big.NewInt(pkg.BtcRegtestChain().ChainId), + DestinationChainId: big.NewInt(chains.BtcRegtestChain().ChainId), DestinationAddress: r.DeployerAddress.Bytes(), DestinationGasLimit: big.NewInt(400_000), Message: nil, diff --git a/e2e/runner/bitcoin.go b/e2e/runner/bitcoin.go index 2d405c0909..687e3aa8f3 100644 --- a/e2e/runner/bitcoin.go +++ b/e2e/runner/bitcoin.go @@ -17,7 +17,9 @@ import ( "github.com/rs/zerolog/log" "github.com/zeta-chain/zetacore/e2e/utils" "github.com/zeta-chain/zetacore/pkg" - "github.com/zeta-chain/zetacore/pkg/bitcoin" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/proofs" + "github.com/zeta-chain/zetacore/pkg/proofs/bitcoin" crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" zetabitcoin "github.com/zeta-chain/zetacore/zetaclient/bitcoin" @@ -387,10 +389,10 @@ func (runner *E2ERunner) ProveBTCTransaction(txHash *chainhash.Hash) { // verify merkle proof through RPC res, err := runner.ObserverClient.Prove(runner.Ctx, &observertypes.QueryProveRequest{ - ChainId: pkg.BtcRegtestChain().ChainId, + ChainId: chains.BtcRegtestChain().ChainId, TxHash: txHash.String(), BlockHash: blockHash.String(), - Proof: pkg.NewBitcoinProof(txBytes, path, index), + Proof: proofs.NewBitcoinProof(txBytes, path, index), TxIndex: 0, // bitcoin doesn't use txIndex }) if err != nil { diff --git a/e2e/runner/evm.go b/e2e/runner/evm.go index 31609e789d..8a931eeccd 100644 --- a/e2e/runner/evm.go +++ b/e2e/runner/evm.go @@ -8,8 +8,9 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/zeta-chain/zetacore/e2e/utils" - "github.com/zeta-chain/zetacore/pkg" - "github.com/zeta-chain/zetacore/pkg/ethereum" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/proofs" + "github.com/zeta-chain/zetacore/pkg/proofs/ethereum" observertypes "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -244,8 +245,8 @@ func (runner *E2ERunner) ProveEthTransaction(receipt *ethtypes.Receipt) { BlockHash: blockHash.Hex(), TxIndex: int64(txIndex), TxHash: txHash.Hex(), - Proof: pkg.NewEthereumProof(txProof), - ChainId: pkg.GoerliLocalnetChain().ChainId, + Proof: proofs.NewEthereumProof(txProof), + ChainId: chains.GoerliLocalnetChain().ChainId, }) if err != nil { panic(err) diff --git a/e2e/runner/setup_zeta.go b/e2e/runner/setup_zeta.go index c55b45ad3a..28d9f25658 100644 --- a/e2e/runner/setup_zeta.go +++ b/e2e/runner/setup_zeta.go @@ -5,6 +5,7 @@ import ( "time" "github.com/zeta-chain/zetacore/e2e/txserver" + "github.com/zeta-chain/zetacore/pkg/chains" "github.com/btcsuite/btcutil" "github.com/ethereum/go-ethereum/accounts/abi/bind" @@ -18,7 +19,6 @@ import ( "github.com/zeta-chain/zetacore/e2e/contracts/contextapp" "github.com/zeta-chain/zetacore/e2e/contracts/zevmswap" e2eutils "github.com/zeta-chain/zetacore/e2e/utils" - "github.com/zeta-chain/zetacore/pkg" fungibletypes "github.com/zeta-chain/zetacore/x/fungible/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -31,7 +31,7 @@ var EmissionsPoolFunding = big.NewInt(0).Mul(big.NewInt(1e18), big.NewInt(2e7)) func (runner *E2ERunner) SetTSSAddresses() error { runner.Logger.Print("⚙️ setting up TSS address") - btcChainID, err := pkg.GetBTCChainIDFromChainParams(runner.BitcoinParams) + btcChainID, err := chains.GetBTCChainIDFromChainParams(runner.BitcoinParams) if err != nil { return err } @@ -175,7 +175,7 @@ func (runner *E2ERunner) SetZEVMContracts() { // SetupETHZRC20 sets up the ETH ZRC20 in the runner from the values queried from the chain func (runner *E2ERunner) SetupETHZRC20() { - ethZRC20Addr, err := runner.SystemContract.GasCoinZRC20ByChainId(&bind.CallOpts{}, big.NewInt(pkg.GoerliLocalnetChain().ChainId)) + ethZRC20Addr, err := runner.SystemContract.GasCoinZRC20ByChainId(&bind.CallOpts{}, big.NewInt(chains.GoerliLocalnetChain().ChainId)) if err != nil { panic(err) } @@ -192,7 +192,7 @@ func (runner *E2ERunner) SetupETHZRC20() { // SetupBTCZRC20 sets up the BTC ZRC20 in the runner from the values queried from the chain func (runner *E2ERunner) SetupBTCZRC20() { - BTCZRC20Addr, err := runner.SystemContract.GasCoinZRC20ByChainId(&bind.CallOpts{}, big.NewInt(pkg.BtcRegtestChain().ChainId)) + BTCZRC20Addr, err := runner.SystemContract.GasCoinZRC20ByChainId(&bind.CallOpts{}, big.NewInt(chains.BtcRegtestChain().ChainId)) if err != nil { panic(err) } diff --git a/e2e/txserver/zeta_tx_server.go b/e2e/txserver/zeta_tx_server.go index ddfbadcb73..f610b8b2bf 100644 --- a/e2e/txserver/zeta_tx_server.go +++ b/e2e/txserver/zeta_tx_server.go @@ -34,7 +34,8 @@ import ( evmtypes "github.com/evmos/ethermint/x/evm/types" rpchttp "github.com/tendermint/tendermint/rpc/client/http" "github.com/zeta-chain/zetacore/cmd/zetacored/config" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" emissionstypes "github.com/zeta-chain/zetacore/x/emissions/types" fungibletypes "github.com/zeta-chain/zetacore/x/fungible/types" @@ -233,11 +234,11 @@ func (zts ZetaTxServer) DeploySystemContractsAndZRC20(account, erc20Addr string) _, err = zts.BroadcastTx(account, fungibletypes.NewMsgDeployFungibleCoinZRC20( addr.String(), "", - pkg.GoerliLocalnetChain().ChainId, + chains.GoerliLocalnetChain().ChainId, 18, "ETH", "gETH", - pkg.CoinType_Gas, + coin.CoinType_Gas, 100000, )) if err != nil { @@ -248,11 +249,11 @@ func (zts ZetaTxServer) DeploySystemContractsAndZRC20(account, erc20Addr string) _, err = zts.BroadcastTx(account, fungibletypes.NewMsgDeployFungibleCoinZRC20( addr.String(), "", - pkg.BtcRegtestChain().ChainId, + chains.BtcRegtestChain().ChainId, 8, "BTC", "tBTC", - pkg.CoinType_Gas, + coin.CoinType_Gas, 100000, )) if err != nil { @@ -263,11 +264,11 @@ func (zts ZetaTxServer) DeploySystemContractsAndZRC20(account, erc20Addr string) res, err = zts.BroadcastTx(account, fungibletypes.NewMsgDeployFungibleCoinZRC20( addr.String(), erc20Addr, - pkg.GoerliLocalnetChain().ChainId, + chains.GoerliLocalnetChain().ChainId, 6, "USDT", "USDT", - pkg.CoinType_ERC20, + coin.CoinType_ERC20, 100000, )) if err != nil { diff --git a/pkg/authz_tx_types.go b/pkg/authz/authz_tx_types.go similarity index 97% rename from pkg/authz_tx_types.go rename to pkg/authz/authz_tx_types.go index ce618233f1..74eafc93d0 100644 --- a/pkg/authz_tx_types.go +++ b/pkg/authz/authz_tx_types.go @@ -1,4 +1,4 @@ -package pkg +package authz type TxType string diff --git a/pkg/authz_tx_types_test.go b/pkg/authz/authz_tx_types_test.go similarity index 98% rename from pkg/authz_tx_types_test.go rename to pkg/authz/authz_tx_types_test.go index 1020b0df1b..49252706fe 100644 --- a/pkg/authz_tx_types_test.go +++ b/pkg/authz/authz_tx_types_test.go @@ -1,4 +1,4 @@ -package pkg +package authz import ( "testing" diff --git a/pkg/chain_test.go b/pkg/chain_test.go deleted file mode 100644 index 368317ecc8..0000000000 --- a/pkg/chain_test.go +++ /dev/null @@ -1,381 +0,0 @@ -package pkg - -import ( - "encoding/hex" - "testing" - - "github.com/btcsuite/btcd/btcec" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcutil" - ethcommon "github.com/ethereum/go-ethereum/common" - "github.com/stretchr/testify/require" -) - -func TestChain_EncodeAddress(t *testing.T) { - tests := []struct { - name string - chain Chain - b []byte - want string - wantErr bool - }{ - { - name: "should error if b is not a valid address on the bitcoin network", - chain: Chain{ - ChainName: ChainName_btc_testnet, - ChainId: 18332, - }, - b: []byte("bc1qk0cc73p8m7hswn8y2q080xa4e5pxapnqgp7h9c"), - want: "", - wantErr: true, - }, - { - name: "should pass if b is a valid address on the network", - chain: Chain{ - ChainName: ChainName_btc_mainnet, - ChainId: 8332, - }, - b: []byte("bc1qk0cc73p8m7hswn8y2q080xa4e5pxapnqgp7h9c"), - want: "bc1qk0cc73p8m7hswn8y2q080xa4e5pxapnqgp7h9c", - wantErr: false, - }, - { - name: "should error if b is not a valid address on the evm network", - chain: Chain{ - ChainName: ChainName_goerli_testnet, - ChainId: 5, - }, - b: ethcommon.Hex2Bytes("0x321"), - want: "", - wantErr: true, - }, - { - name: "should pass if b is a valid address on the evm network", - chain: Chain{ - ChainName: ChainName_goerli_testnet, - ChainId: 5, - }, - b: []byte("0x321"), - want: "0x0000000000000000000000000000003078333231", - wantErr: false, - }, - { - name: "should error if chain not supported", - chain: Chain{ - ChainName: 999, - ChainId: 999, - }, - b: ethcommon.Hex2Bytes("0x321"), - want: "", - wantErr: true, - }, - } - - for _, tc := range tests { - tc := tc - t.Run(tc.name, func(t *testing.T) { - s, err := tc.chain.EncodeAddress(tc.b) - if tc.wantErr { - require.Error(t, err) - return - } - require.Equal(t, tc.want, s) - }) - } -} - -func TestChain_DecodeAddress(t *testing.T) { - tests := []struct { - name string - chain Chain - b string - want []byte - wantErr bool - }{ - { - name: "should decode on btc chain", - chain: Chain{ - ChainName: ChainName_btc_testnet, - ChainId: 18332, - }, - want: []byte("bc1qk0cc73p8m7hswn8y2q080xa4e5pxapnqgp7h9c"), - b: "bc1qk0cc73p8m7hswn8y2q080xa4e5pxapnqgp7h9c", - wantErr: false, - }, - { - name: "should decode on evm chain", - chain: Chain{ - ChainName: ChainName_goerli_testnet, - ChainId: 5, - }, - want: ethcommon.HexToAddress("0x321").Bytes(), - b: "0x321", - wantErr: false, - }, - { - name: "should error if chain not supported", - chain: Chain{ - ChainName: 999, - ChainId: 999, - }, - want: ethcommon.Hex2Bytes("0x321"), - b: "", - wantErr: true, - }, - } - - for _, tc := range tests { - tc := tc - t.Run(tc.name, func(t *testing.T) { - s, err := tc.chain.DecodeAddress(tc.b) - if tc.wantErr { - require.Error(t, err) - return - } - require.Equal(t, tc.want, s) - }) - } -} - -func TestChain_InChainList(t *testing.T) { - require.True(t, ZetaChainMainnet().InChainList(ZetaChainList())) - require.True(t, ZetaMocknetChain().InChainList(ZetaChainList())) - require.True(t, ZetaPrivnetChain().InChainList(ZetaChainList())) - require.True(t, ZetaTestnetChain().InChainList(ZetaChainList())) - require.False(t, EthChain().InChainList(ZetaChainList())) -} - -func TestIsZetaChain(t *testing.T) { - tests := []struct { - name string - chainID int64 - want bool - }{ - {"Zeta Mainnet", ZetaChainMainnet().ChainId, true}, - {"Zeta Testnet", ZetaTestnetChain().ChainId, true}, - {"Zeta Mocknet", ZetaMocknetChain().ChainId, true}, - {"Zeta Privnet", ZetaPrivnetChain().ChainId, true}, - {"Non-Zeta", EthChain().ChainId, false}, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - require.Equal(t, tt.want, IsZetaChain(tt.chainID)) - }) - } -} - -func TestIsEVMChain(t *testing.T) { - tests := []struct { - name string - chainID int64 - want bool - }{ - {"Ethereum Mainnet", EthChain().ChainId, true}, - {"Goerli Testnet", GoerliChain().ChainId, true}, - {"Sepolia Testnet", SepoliaChain().ChainId, true}, - {"Non-EVM", BtcMainnetChain().ChainId, false}, - {"Zeta Mainnet", ZetaChainMainnet().ChainId, false}, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - require.Equal(t, tt.want, IsEVMChain(tt.chainID)) - }) - } -} - -func TestIsHeaderSupportedEVMChain(t *testing.T) { - tests := []struct { - name string - chainID int64 - want bool - }{ - {"Ethereum Mainnet", EthChain().ChainId, true}, - {"Goerli Testnet", GoerliChain().ChainId, true}, - {"Goerli Localnet", GoerliLocalnetChain().ChainId, true}, - {"Sepolia Testnet", SepoliaChain().ChainId, true}, - {"BSC Testnet", BscTestnetChain().ChainId, true}, - {"BSC Mainnet", BscMainnetChain().ChainId, true}, - {"Non-EVM", BtcMainnetChain().ChainId, false}, - {"Zeta Mainnet", ZetaChainMainnet().ChainId, false}, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - require.Equal(t, tt.want, IsHeaderSupportedEvmChain(tt.chainID)) - }) - } -} - -func TestSupportMerkleProof(t *testing.T) { - tests := []struct { - name string - chain Chain - want bool - }{ - {"Ethereum Mainnet", EthChain(), true}, - {"BSC Testnet", BscTestnetChain(), true}, - {"BSC Mainnet", BscMainnetChain(), true}, - {"Non-EVM", BtcMainnetChain(), true}, - {"Zeta Mainnet", ZetaChainMainnet(), false}, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - require.Equal(t, tt.want, tt.chain.SupportMerkleProof()) - }) - } -} - -func TestIsBitcoinChain(t *testing.T) { - tests := []struct { - name string - chainID int64 - want bool - }{ - {"Bitcoin Mainnet", BtcMainnetChain().ChainId, true}, - {"Bitcoin Testnet", BtcTestNetChain().ChainId, true}, - {"Bitcoin Regtest", BtcRegtestChain().ChainId, true}, - {"Non-Bitcoin", EthChain().ChainId, false}, - {"Zeta Mainnet", ZetaChainMainnet().ChainId, false}, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - require.Equal(t, tt.want, IsBitcoinChain(tt.chainID)) - }) - } -} - -func TestIsEthereumChain(t *testing.T) { - tests := []struct { - name string - chainID int64 - want bool - }{ - {"Ethereum Mainnet", EthChain().ChainId, true}, - {"Goerli Testnet", GoerliChain().ChainId, true}, - {"Sepolia Testnet", SepoliaChain().ChainId, true}, - {"Non-Ethereum", BtcMainnetChain().ChainId, false}, - {"Zeta Mainnet", ZetaChainMainnet().ChainId, false}, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - require.Equal(t, tt.want, IsEthereumChain(tt.chainID)) - }) - } -} - -func TestChain_IsExternalChain(t *testing.T) { - require.False(t, ZetaChainMainnet().IsExternalChain()) - require.True(t, EthChain().IsExternalChain()) -} - -func TestChain_IsZetaChain(t *testing.T) { - require.True(t, ZetaChainMainnet().IsZetaChain()) - require.False(t, EthChain().IsZetaChain()) -} - -func TestChain_IsEmpty(t *testing.T) { - require.True(t, Chain{}.IsEmpty()) - require.False(t, ZetaChainMainnet().IsEmpty()) -} - -func TestChain_WitnessProgram(t *testing.T) { - // Ordinarily the private key would come from whatever storage mechanism - // is being used, but for this example just hard code it. - privKeyBytes, err := hex.DecodeString("22a47fa09a223f2aa079edf85a7c2" + - "d4f8720ee63e502ee2869afab7de234b80c") - require.NoError(t, err) - - t.Run("should return btc address", func(t *testing.T) { - _, pubKey := btcec.PrivKeyFromBytes(btcec.S256(), privKeyBytes) - pubKeyHash := btcutil.Hash160(pubKey.SerializeCompressed()) - addr, err := btcutil.NewAddressWitnessPubKeyHash(pubKeyHash, &chaincfg.RegressionNetParams) - require.NoError(t, err) - - chain := BtcTestNetChain() - _, err = chain.BTCAddressFromWitnessProgram(addr.WitnessProgram()) - require.NoError(t, err) - }) - - t.Run("should fail for wrong chain id", func(t *testing.T) { - _, pubKey := btcec.PrivKeyFromBytes(btcec.S256(), privKeyBytes) - pubKeyHash := btcutil.Hash160(pubKey.SerializeCompressed()) - addr, err := btcutil.NewAddressWitnessPubKeyHash(pubKeyHash, &chaincfg.RegressionNetParams) - require.NoError(t, err) - - chain := GoerliChain() - _, err = chain.BTCAddressFromWitnessProgram(addr.WitnessProgram()) - require.Error(t, err) - }) - - t.Run("should fail for wrong witness program", func(t *testing.T) { - _, pubKey := btcec.PrivKeyFromBytes(btcec.S256(), privKeyBytes) - pubKeyHash := btcutil.Hash160(pubKey.SerializeCompressed()) - addr, err := btcutil.NewAddressWitnessPubKeyHash(pubKeyHash, &chaincfg.RegressionNetParams) - require.NoError(t, err) - - chain := BtcTestNetChain() - _, err = chain.BTCAddressFromWitnessProgram(addr.WitnessProgram()[0:19]) - require.Error(t, err) - }) -} - -func TestChains_Has(t *testing.T) { - chains := Chains{ZetaChainMainnet(), ZetaTestnetChain()} - require.True(t, chains.Has(ZetaChainMainnet())) - require.False(t, chains.Has(EthChain())) -} - -func TestChains_Distinct(t *testing.T) { - chains := Chains{ZetaChainMainnet(), ZetaChainMainnet(), ZetaTestnetChain()} - distinctChains := chains.Distinct() - require.Len(t, distinctChains, 2) -} - -func TestChains_Strings(t *testing.T) { - chains := Chains{ZetaChainMainnet(), ZetaTestnetChain()} - strings := chains.Strings() - expected := []string{chains[0].String(), chains[1].String()} - require.Equal(t, expected, strings) -} - -func TestGetChainFromChainID(t *testing.T) { - chain := GetChainFromChainID(ZetaChainMainnet().ChainId) - require.Equal(t, ZetaChainMainnet(), *chain) - require.Nil(t, GetChainFromChainID(9999)) -} - -func TestGetBTCChainParams(t *testing.T) { - params, err := GetBTCChainParams(BtcMainnetChain().ChainId) - require.NoError(t, err) - require.Equal(t, &chaincfg.MainNetParams, params) - - _, err = GetBTCChainParams(9999) - require.Error(t, err) -} - -func TestGetBTCChainIDFromChainParams(t *testing.T) { - chainID, err := GetBTCChainIDFromChainParams(&chaincfg.MainNetParams) - require.NoError(t, err) - require.Equal(t, int64(8332), chainID) - - chainID, err = GetBTCChainIDFromChainParams(&chaincfg.RegressionNetParams) - require.NoError(t, err) - require.Equal(t, int64(18444), chainID) - - chainID, err = GetBTCChainIDFromChainParams(&chaincfg.TestNet3Params) - require.NoError(t, err) - require.Equal(t, int64(18332), chainID) - - _, err = GetBTCChainIDFromChainParams(&chaincfg.Params{Name: "unknown"}) - require.Error(t, err) -} - -func TestChainIDInChainList(t *testing.T) { - require.True(t, ChainIDInChainList(ZetaChainMainnet().ChainId, ZetaChainList())) - require.False(t, ChainIDInChainList(EthChain().ChainId, ZetaChainList())) -} diff --git a/pkg/address.go b/pkg/chains/address.go similarity index 99% rename from pkg/address.go rename to pkg/chains/address.go index d38aab79e9..6ee8647f8b 100644 --- a/pkg/address.go +++ b/pkg/chains/address.go @@ -1,4 +1,4 @@ -package pkg +package chains import ( "errors" diff --git a/pkg/address_test.go b/pkg/chains/address_test.go similarity index 99% rename from pkg/address_test.go rename to pkg/chains/address_test.go index ea32cb9e89..f34b1145c5 100644 --- a/pkg/address_test.go +++ b/pkg/chains/address_test.go @@ -1,4 +1,4 @@ -package pkg +package chains import ( "errors" diff --git a/pkg/bitcoin.go b/pkg/chains/bitcoin.go similarity index 98% rename from pkg/bitcoin.go rename to pkg/chains/bitcoin.go index 77c70e351b..42f5ee7db2 100644 --- a/pkg/bitcoin.go +++ b/pkg/chains/bitcoin.go @@ -1,4 +1,4 @@ -package pkg +package chains import ( "fmt" diff --git a/pkg/bitcoin_test.go b/pkg/chains/bitcoin_test.go similarity index 98% rename from pkg/bitcoin_test.go rename to pkg/chains/bitcoin_test.go index 2f28e91fff..042cc6acaa 100644 --- a/pkg/bitcoin_test.go +++ b/pkg/chains/bitcoin_test.go @@ -1,4 +1,4 @@ -package pkg +package chains import ( "testing" diff --git a/pkg/chain.go b/pkg/chains/chain.go similarity index 99% rename from pkg/chain.go rename to pkg/chains/chain.go index 1f48d28d65..9d24216272 100644 --- a/pkg/chain.go +++ b/pkg/chains/chain.go @@ -1,4 +1,4 @@ -package pkg +package chains import ( "fmt" diff --git a/pkg/chain_id.go b/pkg/chains/chain_id.go similarity index 98% rename from pkg/chain_id.go rename to pkg/chains/chain_id.go index 8356a925bd..18b0704752 100644 --- a/pkg/chain_id.go +++ b/pkg/chains/chain_id.go @@ -1,4 +1,4 @@ -package pkg +package chains import ( "errors" diff --git a/pkg/chain_id_test.go b/pkg/chains/chain_id_test.go similarity index 89% rename from pkg/chain_id_test.go rename to pkg/chains/chain_id_test.go index 139412f0e4..63395a2265 100644 --- a/pkg/chain_id_test.go +++ b/pkg/chains/chain_id_test.go @@ -1,10 +1,9 @@ -package pkg_test +package chains import ( "testing" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" ) func TestCosmosToEthChainID(t *testing.T) { @@ -51,7 +50,7 @@ func TestCosmosToEthChainID(t *testing.T) { for _, tc := range testCases { tc := tc t.Run(tc.name, func(t *testing.T) { - ethChainID, err := pkg.CosmosToEthChainID(tc.chainID) + ethChainID, err := CosmosToEthChainID(tc.chainID) if tc.isErr { require.Error(t, err) } else { diff --git a/common/chain_test.go b/pkg/chains/chain_test.go similarity index 99% rename from common/chain_test.go rename to pkg/chains/chain_test.go index f694439d8c..8d491d1780 100644 --- a/common/chain_test.go +++ b/pkg/chains/chain_test.go @@ -1,4 +1,4 @@ -package common +package chains import ( "encoding/hex" diff --git a/pkg/chains.go b/pkg/chains/chains.go similarity index 99% rename from pkg/chains.go rename to pkg/chains/chains.go index 63aec166fc..ef1ffc9caf 100644 --- a/pkg/chains.go +++ b/pkg/chains/chains.go @@ -1,4 +1,4 @@ -package pkg +package chains import "fmt" diff --git a/pkg/chains/chains.pb.go b/pkg/chains/chains.pb.go new file mode 100644 index 0000000000..a305e7adbd --- /dev/null +++ b/pkg/chains/chains.pb.go @@ -0,0 +1,450 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: pkg/chains/chains.proto + +package chains + +import ( + fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/gogo/protobuf/proto" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type ReceiveStatus int32 + +const ( + ReceiveStatus_Created ReceiveStatus = 0 + ReceiveStatus_Success ReceiveStatus = 1 + ReceiveStatus_Failed ReceiveStatus = 2 +) + +var ReceiveStatus_name = map[int32]string{ + 0: "Created", + 1: "Success", + 2: "Failed", +} + +var ReceiveStatus_value = map[string]int32{ + "Created": 0, + "Success": 1, + "Failed": 2, +} + +func (x ReceiveStatus) String() string { + return proto.EnumName(ReceiveStatus_name, int32(x)) +} + +func (ReceiveStatus) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_37ad35e0488e8bbc, []int{0} +} + +type ChainName int32 + +const ( + ChainName_empty ChainName = 0 + ChainName_eth_mainnet ChainName = 1 + ChainName_zeta_mainnet ChainName = 2 + ChainName_btc_mainnet ChainName = 3 + ChainName_polygon_mainnet ChainName = 4 + ChainName_bsc_mainnet ChainName = 5 + // Testnet + ChainName_goerli_testnet ChainName = 6 + ChainName_mumbai_testnet ChainName = 7 + ChainName_ganache_testnet ChainName = 8 + ChainName_baobab_testnet ChainName = 9 + ChainName_bsc_testnet ChainName = 10 + ChainName_zeta_testnet ChainName = 11 + ChainName_btc_testnet ChainName = 12 + ChainName_sepolia_testnet ChainName = 13 + // LocalNet + // zeta_localnet = 13; + ChainName_goerli_localnet ChainName = 14 + ChainName_btc_regtest ChainName = 15 +) + +var ChainName_name = map[int32]string{ + 0: "empty", + 1: "eth_mainnet", + 2: "zeta_mainnet", + 3: "btc_mainnet", + 4: "polygon_mainnet", + 5: "bsc_mainnet", + 6: "goerli_testnet", + 7: "mumbai_testnet", + 8: "ganache_testnet", + 9: "baobab_testnet", + 10: "bsc_testnet", + 11: "zeta_testnet", + 12: "btc_testnet", + 13: "sepolia_testnet", + 14: "goerli_localnet", + 15: "btc_regtest", +} + +var ChainName_value = map[string]int32{ + "empty": 0, + "eth_mainnet": 1, + "zeta_mainnet": 2, + "btc_mainnet": 3, + "polygon_mainnet": 4, + "bsc_mainnet": 5, + "goerli_testnet": 6, + "mumbai_testnet": 7, + "ganache_testnet": 8, + "baobab_testnet": 9, + "bsc_testnet": 10, + "zeta_testnet": 11, + "btc_testnet": 12, + "sepolia_testnet": 13, + "goerli_localnet": 14, + "btc_regtest": 15, +} + +func (x ChainName) String() string { + return proto.EnumName(ChainName_name, int32(x)) +} + +func (ChainName) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_37ad35e0488e8bbc, []int{1} +} + +type Chain struct { + ChainName ChainName `protobuf:"varint,1,opt,name=chain_name,json=chainName,proto3,enum=chains.ChainName" json:"chain_name,omitempty"` + ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` +} + +func (m *Chain) Reset() { *m = Chain{} } +func (m *Chain) String() string { return proto.CompactTextString(m) } +func (*Chain) ProtoMessage() {} +func (*Chain) Descriptor() ([]byte, []int) { + return fileDescriptor_37ad35e0488e8bbc, []int{0} +} +func (m *Chain) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Chain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Chain.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Chain) XXX_Merge(src proto.Message) { + xxx_messageInfo_Chain.Merge(m, src) +} +func (m *Chain) XXX_Size() int { + return m.Size() +} +func (m *Chain) XXX_DiscardUnknown() { + xxx_messageInfo_Chain.DiscardUnknown(m) +} + +var xxx_messageInfo_Chain proto.InternalMessageInfo + +func (m *Chain) GetChainName() ChainName { + if m != nil { + return m.ChainName + } + return ChainName_empty +} + +func (m *Chain) GetChainId() int64 { + if m != nil { + return m.ChainId + } + return 0 +} + +func init() { + proto.RegisterEnum("chains.ReceiveStatus", ReceiveStatus_name, ReceiveStatus_value) + proto.RegisterEnum("chains.ChainName", ChainName_name, ChainName_value) + proto.RegisterType((*Chain)(nil), "chains.Chain") +} + +func init() { proto.RegisterFile("pkg/chains/chains.proto", fileDescriptor_37ad35e0488e8bbc) } + +var fileDescriptor_37ad35e0488e8bbc = []byte{ + // 390 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x92, 0x31, 0xaf, 0xd3, 0x30, + 0x10, 0x80, 0xe3, 0x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 0xc1, 0xef, 0x1b, 0x52, 0x1f, 0x46, + 0x98, 0x97, 0xfa, 0x18, 0x38, 0x74, 0x06, 0x13, 0xd4, 0xe9, 0x21, 0x67, 0xb2, 0x28, 0x50, 0x07, + 0x84, 0x06, 0x70, 0xff, 0x03, 0x35, 0xeb, 0x89, 0x6b, 0x94, 0x58, 0xf3, 0x1e, 0xdc, 0xd0, 0xa7, + 0x30, 0x2b, 0x55, 0x76, 0x14, 0xaa, 0xe8, 0xe1, 0xad, 0xb5, 0xea, 0xc1, 0x1a, 0x51, 0x0a, 0x53, + 0xa1, 0xb0, 0xca, 0xe4, 0x41, 0x63, 0xad, 0x0d, 0xf3, 0x0c, 0xcb, 0x9b, 0x3c, 0x66, 0x03, 0x1b, + 0x9b, 0x6a, 0x82, 0x15, 0x8c, 0xa7, 0xd8, 0xc3, 0x3b, 0x23, 0xc6, 0x4c, 0xc5, 0x2c, 0xee, 0x99, + 0xdf, 0x75, 0xe8, 0x00, 0xf4, 0xa3, 0x76, 0x64, 0xd2, 0x8d, 0xda, 0x81, 0x7b, 0x53, 0xbc, 0xc6, + 0x52, 0x65, 0x72, 0xb0, 0x1e, 0x6c, 0xc7, 0x76, 0xb2, 0x4c, 0x71, 0x96, 0x19, 0x38, 0xed, 0xae, + 0x56, 0x28, 0x8c, 0x18, 0xcc, 0xda, 0x1f, 0xf7, 0x61, 0xfb, 0xf7, 0x1c, 0x92, 0xd3, 0x39, 0x24, + 0xff, 0xcf, 0x21, 0xf9, 0x79, 0x09, 0x9d, 0xd3, 0x25, 0x74, 0xfe, 0x5d, 0x42, 0xe7, 0xeb, 0x2b, + 0x21, 0x75, 0xda, 0xc4, 0x1b, 0xae, 0xf2, 0xc8, 0x8c, 0xf1, 0xda, 0x3e, 0x94, 0x0d, 0xb9, 0xaa, + 0x30, 0x1a, 0x76, 0x27, 0xf6, 0xec, 0x5e, 0xbc, 0x7b, 0x0c, 0x00, 0x00, 0xff, 0xff, 0xad, 0x5e, + 0x66, 0xdc, 0x50, 0x02, 0x00, 0x00, +} + +func (m *Chain) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Chain) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Chain) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ChainId != 0 { + i = encodeVarintChains(dAtA, i, uint64(m.ChainId)) + i-- + dAtA[i] = 0x10 + } + if m.ChainName != 0 { + i = encodeVarintChains(dAtA, i, uint64(m.ChainName)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintChains(dAtA []byte, offset int, v uint64) int { + offset -= sovChains(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Chain) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ChainName != 0 { + n += 1 + sovChains(uint64(m.ChainName)) + } + if m.ChainId != 0 { + n += 1 + sovChains(uint64(m.ChainId)) + } + return n +} + +func sovChains(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozChains(x uint64) (n int) { + return sovChains(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Chain) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChains + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Chain: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Chain: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainName", wireType) + } + m.ChainName = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChains + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ChainName |= ChainName(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + } + m.ChainId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowChains + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ChainId |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipChains(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthChains + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipChains(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowChains + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowChains + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowChains + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthChains + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupChains + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthChains + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthChains = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowChains = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupChains = fmt.Errorf("proto: unexpected end of group") +) diff --git a/pkg/chains_test.go b/pkg/chains/chains_test.go similarity index 99% rename from pkg/chains_test.go rename to pkg/chains/chains_test.go index e6e74d5be1..070cb5922e 100644 --- a/pkg/chains_test.go +++ b/pkg/chains/chains_test.go @@ -1,4 +1,4 @@ -package pkg +package chains import ( "testing" diff --git a/pkg/utils.go b/pkg/chains/utils.go similarity index 99% rename from pkg/utils.go rename to pkg/chains/utils.go index f61dcc2117..6a6a6f4091 100644 --- a/pkg/utils.go +++ b/pkg/chains/utils.go @@ -1,4 +1,4 @@ -package pkg +package chains import ( "encoding/hex" diff --git a/pkg/utils_test.go b/pkg/chains/utils_test.go similarity index 99% rename from pkg/utils_test.go rename to pkg/chains/utils_test.go index 8a6b18f5f5..ca1f4722ef 100644 --- a/pkg/utils_test.go +++ b/pkg/chains/utils_test.go @@ -1,4 +1,4 @@ -package pkg +package chains import ( "encoding/hex" diff --git a/pkg/coin.go b/pkg/coin/coin.go similarity index 98% rename from pkg/coin.go rename to pkg/coin/coin.go index 3488cd96e8..74bbca935b 100644 --- a/pkg/coin.go +++ b/pkg/coin/coin.go @@ -1,4 +1,4 @@ -package pkg +package coin import ( "fmt" diff --git a/pkg/coin/coin.pb.go b/pkg/coin/coin.pb.go new file mode 100644 index 0000000000..ac4a65780c --- /dev/null +++ b/pkg/coin/coin.pb.go @@ -0,0 +1,76 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: pkg/coin/coin.proto + +package coin + +import ( + fmt "fmt" + math "math" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/gogo/protobuf/proto" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type CoinType int32 + +const ( + CoinType_Zeta CoinType = 0 + CoinType_Gas CoinType = 1 + CoinType_ERC20 CoinType = 2 + CoinType_Cmd CoinType = 3 +) + +var CoinType_name = map[int32]string{ + 0: "Zeta", + 1: "Gas", + 2: "ERC20", + 3: "Cmd", +} + +var CoinType_value = map[string]int32{ + "Zeta": 0, + "Gas": 1, + "ERC20": 2, + "Cmd": 3, +} + +func (x CoinType) String() string { + return proto.EnumName(CoinType_name, int32(x)) +} + +func (CoinType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_dc61d0144bf70fc2, []int{0} +} + +func init() { + proto.RegisterEnum("coin.CoinType", CoinType_name, CoinType_value) +} + +func init() { proto.RegisterFile("pkg/coin/coin.proto", fileDescriptor_dc61d0144bf70fc2) } + +var fileDescriptor_dc61d0144bf70fc2 = []byte{ + // 178 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2e, 0xc8, 0x4e, 0xd7, + 0x4f, 0xce, 0xcf, 0xcc, 0x03, 0x13, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x2c, 0x20, 0xb6, + 0x94, 0x48, 0x7a, 0x7e, 0x7a, 0x3e, 0x58, 0x40, 0x1f, 0xc4, 0x82, 0xc8, 0x69, 0x99, 0x73, 0x71, + 0x38, 0xe7, 0x67, 0xe6, 0x85, 0x54, 0x16, 0xa4, 0x0a, 0x71, 0x70, 0xb1, 0x44, 0xa5, 0x96, 0x24, + 0x0a, 0x30, 0x08, 0xb1, 0x73, 0x31, 0xbb, 0x27, 0x16, 0x0b, 0x30, 0x0a, 0x71, 0x72, 0xb1, 0xba, + 0x06, 0x39, 0x1b, 0x19, 0x08, 0x30, 0x81, 0xc4, 0x9c, 0x73, 0x53, 0x04, 0x98, 0xa5, 0x58, 0x56, + 0x2c, 0x91, 0x63, 0x74, 0x72, 0x3c, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, + 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, + 0xf5, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0xaa, 0xd4, 0x92, 0x44, + 0xdd, 0xe4, 0x8c, 0xc4, 0xcc, 0x3c, 0x30, 0x33, 0x39, 0xbf, 0x28, 0x55, 0x1f, 0xe6, 0xc4, 0x24, + 0x36, 0xb0, 0x13, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x4c, 0x7f, 0xab, 0x6e, 0xb5, 0x00, + 0x00, 0x00, +} diff --git a/pkg/coin_test.go b/pkg/coin/coin_test.go similarity index 85% rename from pkg/coin_test.go rename to pkg/coin/coin_test.go index 52131e01c3..6110c20538 100644 --- a/pkg/coin_test.go +++ b/pkg/coin/coin_test.go @@ -1,11 +1,10 @@ -package pkg_test +package coin import ( "testing" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" ) func Test_GetAzetaDecFromAmountInZeta(t *testing.T) { @@ -54,7 +53,7 @@ func Test_GetAzetaDecFromAmountInZeta(t *testing.T) { } for _, tc := range tt { t.Run(tc.name, func(t *testing.T) { - azeta, err := pkg.GetAzetaDecFromAmountInZeta(tc.zetaAmount) + azeta, err := GetAzetaDecFromAmountInZeta(tc.zetaAmount) tc.err(t, err) if err == nil { require.Equal(t, tc.azetaAmount, azeta) @@ -68,56 +67,56 @@ func TestGetCoinType(t *testing.T) { tests := []struct { name string coin string - want pkg.CoinType + want CoinType wantErr bool }{ { name: "valid coin type 0", coin: "0", - want: pkg.CoinType(0), + want: CoinType(0), wantErr: false, }, { name: "valid coin type 1", coin: "1", - want: pkg.CoinType(1), + want: CoinType(1), wantErr: false, }, { name: "valid coin type 2", coin: "2", - want: pkg.CoinType(2), + want: CoinType(2), wantErr: false, }, { name: "valid coin type 3", coin: "3", - want: pkg.CoinType(3), + want: CoinType(3), wantErr: false, }, { name: "invalid coin type negative", coin: "-1", - want: pkg.CoinType_Cmd, + want: CoinType_Cmd, wantErr: true, }, { name: "invalid coin type large number", coin: "4", - want: pkg.CoinType_Cmd, + want: CoinType_Cmd, wantErr: true, }, { name: "invalid coin type non-integer", coin: "abc", - want: pkg.CoinType_Cmd, + want: CoinType_Cmd, wantErr: true, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got, err := pkg.GetCoinType(tt.coin) + got, err := GetCoinType(tt.coin) if tt.wantErr { require.Error(t, err) } else { diff --git a/pkg/crypto/crypto.pb.go b/pkg/crypto/crypto.pb.go new file mode 100644 index 0000000000..db9a9a6821 --- /dev/null +++ b/pkg/crypto/crypto.pb.go @@ -0,0 +1,371 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: pkg/crypto/crypto.proto + +package crypto + +import ( + fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/gogo/protobuf/proto" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// PubKeySet contains two pub keys , secp256k1 and ed25519 +type PubKeySet struct { + Secp256k1 PubKey `protobuf:"bytes,1,opt,name=secp256k1,proto3,casttype=PubKey" json:"secp256k1,omitempty"` + Ed25519 PubKey `protobuf:"bytes,2,opt,name=ed25519,proto3,casttype=PubKey" json:"ed25519,omitempty"` +} + +func (m *PubKeySet) Reset() { *m = PubKeySet{} } +func (m *PubKeySet) String() string { return proto.CompactTextString(m) } +func (*PubKeySet) ProtoMessage() {} +func (*PubKeySet) Descriptor() ([]byte, []int) { + return fileDescriptor_5643a513c82df681, []int{0} +} +func (m *PubKeySet) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PubKeySet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PubKeySet.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PubKeySet) XXX_Merge(src proto.Message) { + xxx_messageInfo_PubKeySet.Merge(m, src) +} +func (m *PubKeySet) XXX_Size() int { + return m.Size() +} +func (m *PubKeySet) XXX_DiscardUnknown() { + xxx_messageInfo_PubKeySet.DiscardUnknown(m) +} + +var xxx_messageInfo_PubKeySet proto.InternalMessageInfo + +func (m *PubKeySet) GetSecp256k1() PubKey { + if m != nil { + return m.Secp256k1 + } + return "" +} + +func (m *PubKeySet) GetEd25519() PubKey { + if m != nil { + return m.Ed25519 + } + return "" +} + +func init() { + proto.RegisterType((*PubKeySet)(nil), "crypto.PubKeySet") +} + +func init() { proto.RegisterFile("pkg/crypto/crypto.proto", fileDescriptor_5643a513c82df681) } + +var fileDescriptor_5643a513c82df681 = []byte{ + // 195 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2f, 0xc8, 0x4e, 0xd7, + 0x4f, 0x2e, 0xaa, 0x2c, 0x28, 0xc9, 0x87, 0x52, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x6c, + 0x10, 0x9e, 0x94, 0x48, 0x7a, 0x7e, 0x7a, 0x3e, 0x58, 0x48, 0x1f, 0xc4, 0x82, 0xc8, 0x2a, 0x65, + 0x70, 0x71, 0x06, 0x94, 0x26, 0x79, 0xa7, 0x56, 0x06, 0xa7, 0x96, 0x08, 0x99, 0x72, 0x71, 0x16, + 0xa7, 0x26, 0x17, 0x18, 0x99, 0x9a, 0x65, 0x1b, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x3a, 0x89, + 0x3f, 0xba, 0x27, 0xcf, 0x19, 0x0c, 0x13, 0xfc, 0x75, 0x4f, 0x9e, 0x0d, 0xa2, 0x3c, 0x08, 0xa1, + 0x52, 0x48, 0x85, 0x8b, 0x3d, 0x35, 0xc5, 0xc8, 0xd4, 0xd4, 0xd0, 0x52, 0x82, 0x09, 0xac, 0x89, + 0x0b, 0x49, 0x1d, 0x4c, 0xca, 0xc9, 0xf9, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, + 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, + 0xa2, 0x34, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xab, 0x52, 0x4b, + 0x12, 0x75, 0x93, 0x33, 0x12, 0x33, 0xf3, 0xc0, 0xcc, 0xe4, 0xfc, 0xa2, 0x54, 0x7d, 0x84, 0xcf, + 0x92, 0xd8, 0xc0, 0xae, 0x36, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xe0, 0x44, 0x43, 0x35, 0xee, + 0x00, 0x00, 0x00, +} + +func (m *PubKeySet) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PubKeySet) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PubKeySet) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Ed25519) > 0 { + i -= len(m.Ed25519) + copy(dAtA[i:], m.Ed25519) + i = encodeVarintCrypto(dAtA, i, uint64(len(m.Ed25519))) + i-- + dAtA[i] = 0x12 + } + if len(m.Secp256k1) > 0 { + i -= len(m.Secp256k1) + copy(dAtA[i:], m.Secp256k1) + i = encodeVarintCrypto(dAtA, i, uint64(len(m.Secp256k1))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintCrypto(dAtA []byte, offset int, v uint64) int { + offset -= sovCrypto(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *PubKeySet) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Secp256k1) + if l > 0 { + n += 1 + l + sovCrypto(uint64(l)) + } + l = len(m.Ed25519) + if l > 0 { + n += 1 + l + sovCrypto(uint64(l)) + } + return n +} + +func sovCrypto(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozCrypto(x uint64) (n int) { + return sovCrypto(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *PubKeySet) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrypto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PubKeySet: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PubKeySet: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Secp256k1", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrypto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCrypto + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCrypto + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Secp256k1 = PubKey(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ed25519", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCrypto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCrypto + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCrypto + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ed25519 = PubKey(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCrypto(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCrypto + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipCrypto(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCrypto + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCrypto + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCrypto + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthCrypto + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupCrypto + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthCrypto + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthCrypto = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCrypto = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupCrypto = fmt.Errorf("proto: unexpected end of group") +) diff --git a/pkg/pubkey.go b/pkg/crypto/pubkey.go similarity index 91% rename from pkg/pubkey.go rename to pkg/crypto/pubkey.go index 4fc03a38b1..703d0bdad4 100644 --- a/pkg/pubkey.go +++ b/pkg/crypto/pubkey.go @@ -1,4 +1,4 @@ -package pkg +package crypto import ( "encoding/json" @@ -15,6 +15,7 @@ import ( eth "github.com/ethereum/go-ethereum/crypto" + "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/pkg/cosmos" ) @@ -71,31 +72,31 @@ func (pubKey PubKey) String() string { } // GetAddress will return an address for the given chain -func (pubKey PubKey) GetAddress(chain Chain) (Address, error) { - if IsEVMChain(chain.ChainId) { +func (pubKey PubKey) GetAddress(chain chains.Chain) (chains.Address, error) { + if chains.IsEVMChain(chain.ChainId) { return pubKey.GetEVMAddress() } - return NoAddress, nil + return chains.NoAddress, nil } // GetEVMAddress will return the evm address -func (pubKey PubKey) GetEVMAddress() (Address, error) { +func (pubKey PubKey) GetEVMAddress() (chains.Address, error) { if pubKey.IsEmpty() { - return NoAddress, nil + return chains.NoAddress, nil } // retrieve compressed pubkey bytes from bechh32 encoded str pk, err := cosmos.GetPubKeyFromBech32(cosmos.Bech32PubKeyTypeAccPub, string(pubKey)) if err != nil { - return NoAddress, err + return chains.NoAddress, err } // parse compressed bytes removing 5 first bytes (amino encoding) to get uncompressed pub, err := secp256k1.ParsePubKey(pk.Bytes()) if err != nil { - return NoAddress, err + return chains.NoAddress, err } str := strings.ToLower(eth.PubkeyToAddress(*pub.ToECDSA()).String()) - return NewAddress(str), nil + return chains.NewAddress(str), nil } // MarshalJSON to Marshals to JSON using Bech32 diff --git a/pkg/pubkey_test.go b/pkg/crypto/pubkey_test.go similarity index 96% rename from pkg/pubkey_test.go rename to pkg/crypto/pubkey_test.go index 01c55ad919..f86f07fcc0 100644 --- a/pkg/pubkey_test.go +++ b/pkg/crypto/pubkey_test.go @@ -1,4 +1,4 @@ -package pkg +package crypto import ( "encoding/hex" @@ -13,6 +13,7 @@ import ( . "gopkg.in/check.v1" "github.com/stretchr/testify/require" + "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/pkg/cosmos" ) @@ -131,23 +132,23 @@ func (s *PubKeyTestSuite) TestPubKeyGetAddress(c *C) { c.Assert(err, IsNil) c.Assert(os.Setenv("NET", "mainnet"), IsNil) - addrETH, err := pk.GetAddress(GoerliChain()) + addrETH, err := pk.GetAddress(chains.GoerliChain()) c.Assert(err, IsNil) c.Assert(addrETH.String(), Equals, d.addrETH.mainnet) c.Assert(os.Setenv("NET", "testnet"), IsNil) - addrETH, err = pk.GetAddress(GoerliChain()) + addrETH, err = pk.GetAddress(chains.GoerliChain()) c.Assert(err, IsNil) c.Assert(addrETH.String(), Equals, d.addrETH.testnet) c.Assert(os.Setenv("NET", "mocknet"), IsNil) - addrETH, err = pk.GetAddress(GoerliChain()) + addrETH, err = pk.GetAddress(chains.GoerliChain()) c.Assert(err, IsNil) c.Assert(addrETH.String(), Equals, d.addrETH.mocknet) - addrETH, err = pk.GetAddress(BtcRegtestChain()) + addrETH, err = pk.GetAddress(chains.BtcRegtestChain()) c.Assert(err, IsNil) - c.Assert(addrETH, Equals, NoAddress) + c.Assert(addrETH, Equals, chains.NoAddress) } } @@ -349,7 +350,7 @@ func TestGetEVMAddress(t *testing.T) { pubKey := PubKey("") e, err := pubKey.GetEVMAddress() require.Nil(t, err) - require.Equal(t, NoAddress, e) + require.Equal(t, chains.NoAddress, e) }) t.Run("should return addr from pubkey", func(t *testing.T) { @@ -365,6 +366,6 @@ func TestGetEVMAddress(t *testing.T) { pk := PubKey("invalid") e, err := pk.GetEVMAddress() require.NotNil(t, err) - require.Equal(t, NoAddress, e) + require.Equal(t, chains.NoAddress, e) }) } diff --git a/pkg/tss.go b/pkg/crypto/tss.go similarity index 98% rename from pkg/tss.go rename to pkg/crypto/tss.go index c2f857608d..fc3c36ed8a 100644 --- a/pkg/tss.go +++ b/pkg/crypto/tss.go @@ -1,4 +1,4 @@ -package pkg +package crypto import ( "github.com/btcsuite/btcd/chaincfg" diff --git a/pkg/tss_test.go b/pkg/crypto/tss_test.go similarity index 99% rename from pkg/tss_test.go rename to pkg/crypto/tss_test.go index 3a36213829..10497f1e85 100644 --- a/pkg/tss_test.go +++ b/pkg/crypto/tss_test.go @@ -1,4 +1,4 @@ -package pkg +package crypto import ( "testing" diff --git a/pkg/gas_limits.go b/pkg/gas/gas_limits.go similarity index 98% rename from pkg/gas_limits.go rename to pkg/gas/gas_limits.go index 7409a2ceb1..d4a3938adb 100644 --- a/pkg/gas_limits.go +++ b/pkg/gas/gas_limits.go @@ -1,4 +1,4 @@ -package pkg +package gas import ( sdkmath "cosmossdk.io/math" diff --git a/pkg/gas_limits_test.go b/pkg/gas/gas_limits_test.go similarity index 99% rename from pkg/gas_limits_test.go rename to pkg/gas/gas_limits_test.go index d4cdcac249..e9b1bbecd0 100644 --- a/pkg/gas_limits_test.go +++ b/pkg/gas/gas_limits_test.go @@ -1,4 +1,4 @@ -package pkg +package gas import ( "testing" diff --git a/pkg/bitcoin/bitcoin.pb.go b/pkg/proofs/bitcoin/bitcoin.pb.go similarity index 86% rename from pkg/bitcoin/bitcoin.pb.go rename to pkg/proofs/bitcoin/bitcoin.pb.go index 2a6c3aa1ec..07f03aa927 100644 --- a/pkg/bitcoin/bitcoin.pb.go +++ b/pkg/proofs/bitcoin/bitcoin.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: pkg/bitcoin/bitcoin.proto +// source: pkg/proofs/bitcoin/bitcoin.proto package bitcoin @@ -33,7 +33,7 @@ func (m *Proof) Reset() { *m = Proof{} } func (m *Proof) String() string { return proto.CompactTextString(m) } func (*Proof) ProtoMessage() {} func (*Proof) Descriptor() ([]byte, []int) { - return fileDescriptor_0c0df266727f042c, []int{0} + return fileDescriptor_683fe0fe4796f27d, []int{0} } func (m *Proof) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -87,22 +87,22 @@ func init() { proto.RegisterType((*Proof)(nil), "bitcoin.Proof") } -func init() { proto.RegisterFile("pkg/bitcoin/bitcoin.proto", fileDescriptor_0c0df266727f042c) } +func init() { proto.RegisterFile("pkg/proofs/bitcoin/bitcoin.proto", fileDescriptor_683fe0fe4796f27d) } -var fileDescriptor_0c0df266727f042c = []byte{ - // 178 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2c, 0xc8, 0x4e, 0xd7, - 0x4f, 0xca, 0x2c, 0x49, 0xce, 0xcf, 0xcc, 0x83, 0xd1, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, - 0xec, 0x50, 0xae, 0x92, 0x0f, 0x17, 0x6b, 0x40, 0x51, 0x7e, 0x7e, 0x9a, 0x90, 0x24, 0x17, 0x47, - 0x49, 0x45, 0x7c, 0x52, 0x65, 0x49, 0x6a, 0xb1, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x4f, 0x10, 0x7b, - 0x49, 0x85, 0x13, 0x88, 0x2b, 0x24, 0xc4, 0xc5, 0x52, 0x90, 0x58, 0x92, 0x21, 0xc1, 0x04, 0x16, - 0x06, 0xb3, 0x85, 0x44, 0xb8, 0x58, 0x33, 0xf3, 0x52, 0x52, 0x2b, 0x24, 0x98, 0x15, 0x18, 0x35, - 0x78, 0x83, 0x20, 0x1c, 0x27, 0x97, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, - 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, - 0xd2, 0x4a, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xaf, 0x4a, 0x2d, 0x49, - 0xd4, 0x4d, 0xce, 0x48, 0xcc, 0xcc, 0x03, 0x33, 0x93, 0xf3, 0x8b, 0x52, 0xf5, 0x91, 0x9c, 0x9a, - 0xc4, 0x06, 0x76, 0xa3, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x87, 0x34, 0x28, 0xd8, 0xc0, 0x00, - 0x00, 0x00, +var fileDescriptor_683fe0fe4796f27d = []byte{ + // 183 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x28, 0xc8, 0x4e, 0xd7, + 0x2f, 0x28, 0xca, 0xcf, 0x4f, 0x2b, 0xd6, 0x4f, 0xca, 0x2c, 0x49, 0xce, 0xcf, 0xcc, 0x83, 0xd1, + 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0xec, 0x50, 0xae, 0x92, 0x0f, 0x17, 0x6b, 0x00, 0x48, + 0xa1, 0x90, 0x24, 0x17, 0x47, 0x49, 0x45, 0x7c, 0x52, 0x65, 0x49, 0x6a, 0xb1, 0x04, 0xa3, 0x02, + 0xa3, 0x06, 0x4f, 0x10, 0x7b, 0x49, 0x85, 0x13, 0x88, 0x2b, 0x24, 0xc4, 0xc5, 0x52, 0x90, 0x58, + 0x92, 0x21, 0xc1, 0x04, 0x16, 0x06, 0xb3, 0x85, 0x44, 0xb8, 0x58, 0x33, 0xf3, 0x52, 0x52, 0x2b, + 0x24, 0x98, 0x15, 0x18, 0x35, 0x78, 0x83, 0x20, 0x1c, 0x27, 0xef, 0x13, 0x8f, 0xe4, 0x18, 0x2f, + 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, + 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x32, 0x4c, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, + 0xd5, 0xaf, 0x4a, 0x2d, 0x49, 0xd4, 0x4d, 0xce, 0x48, 0xcc, 0xcc, 0x03, 0x33, 0x93, 0xf3, 0x8b, + 0x52, 0xf5, 0x31, 0x5d, 0x9c, 0xc4, 0x06, 0x76, 0xaa, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x4f, + 0xf2, 0x97, 0x80, 0xce, 0x00, 0x00, 0x00, } func (m *Proof) Marshal() (dAtA []byte, err error) { diff --git a/pkg/bitcoin/bitcoin_spv.go b/pkg/proofs/bitcoin/bitcoin_spv.go similarity index 100% rename from pkg/bitcoin/bitcoin_spv.go rename to pkg/proofs/bitcoin/bitcoin_spv.go diff --git a/pkg/bitcoin/bitcoin_spv_test.go b/pkg/proofs/bitcoin/bitcoin_spv_test.go similarity index 100% rename from pkg/bitcoin/bitcoin_spv_test.go rename to pkg/proofs/bitcoin/bitcoin_spv_test.go diff --git a/pkg/bitcoin/proof.go b/pkg/proofs/bitcoin/proof.go similarity index 100% rename from pkg/bitcoin/proof.go rename to pkg/proofs/bitcoin/proof.go diff --git a/pkg/bitcoin/proof_test.go b/pkg/proofs/bitcoin/proof_test.go similarity index 100% rename from pkg/bitcoin/proof_test.go rename to pkg/proofs/bitcoin/proof_test.go diff --git a/pkg/ethereum/ethereum.pb.go b/pkg/proofs/ethereum/ethereum.pb.go similarity index 86% rename from pkg/ethereum/ethereum.pb.go rename to pkg/proofs/ethereum/ethereum.pb.go index d2c6b29db2..4cbfd2ba74 100644 --- a/pkg/ethereum/ethereum.pb.go +++ b/pkg/proofs/ethereum/ethereum.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: pkg/ethereum/ethereum.proto +// source: pkg/proofs/ethereum/ethereum.proto package ethereum @@ -32,7 +32,7 @@ func (m *Proof) Reset() { *m = Proof{} } func (m *Proof) String() string { return proto.CompactTextString(m) } func (*Proof) ProtoMessage() {} func (*Proof) Descriptor() ([]byte, []int) { - return fileDescriptor_824ba8ad73eb50c7, []int{0} + return fileDescriptor_bd99cabd67598caa, []int{0} } func (m *Proof) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -79,20 +79,23 @@ func init() { proto.RegisterType((*Proof)(nil), "ethereum.Proof") } -func init() { proto.RegisterFile("pkg/ethereum/ethereum.proto", fileDescriptor_824ba8ad73eb50c7) } +func init() { + proto.RegisterFile("pkg/proofs/ethereum/ethereum.proto", fileDescriptor_bd99cabd67598caa) +} -var fileDescriptor_824ba8ad73eb50c7 = []byte{ - // 156 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2e, 0xc8, 0x4e, 0xd7, - 0x4f, 0x2d, 0xc9, 0x48, 0x2d, 0x4a, 0x2d, 0xcd, 0x85, 0x33, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, - 0x85, 0x38, 0x60, 0x7c, 0x25, 0x63, 0x2e, 0xd6, 0x80, 0xa2, 0xfc, 0xfc, 0x34, 0x21, 0x21, 0x2e, - 0x96, 0xec, 0xd4, 0xca, 0x62, 0x09, 0x46, 0x05, 0x66, 0x0d, 0x9e, 0x20, 0x30, 0x5b, 0x48, 0x8c, - 0x8b, 0xad, 0x2c, 0x31, 0xa7, 0x34, 0xb5, 0x58, 0x82, 0x09, 0x2c, 0x0a, 0xe5, 0x39, 0xb9, 0x9e, - 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, - 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x76, 0x7a, 0x66, 0x49, 0x46, 0x69, - 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x55, 0x6a, 0x49, 0xa2, 0x6e, 0x72, 0x46, 0x62, 0x66, 0x1e, - 0x98, 0x99, 0x9c, 0x5f, 0x94, 0xaa, 0x8f, 0xec, 0xa8, 0x24, 0x36, 0xb0, 0x63, 0x8c, 0x01, 0x01, - 0x00, 0x00, 0xff, 0xff, 0x74, 0x7b, 0xe9, 0x63, 0xab, 0x00, 0x00, 0x00, +var fileDescriptor_bd99cabd67598caa = []byte{ + // 161 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2a, 0xc8, 0x4e, 0xd7, + 0x2f, 0x28, 0xca, 0xcf, 0x4f, 0x2b, 0xd6, 0x4f, 0x2d, 0xc9, 0x48, 0x2d, 0x4a, 0x2d, 0xcd, 0x85, + 0x33, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x38, 0x60, 0x7c, 0x25, 0x63, 0x2e, 0xd6, 0x00, + 0x90, 0x5a, 0x21, 0x21, 0x2e, 0x96, 0xec, 0xd4, 0xca, 0x62, 0x09, 0x46, 0x05, 0x66, 0x0d, 0x9e, + 0x20, 0x30, 0x5b, 0x48, 0x8c, 0x8b, 0xad, 0x2c, 0x31, 0xa7, 0x34, 0xb5, 0x58, 0x82, 0x09, 0x2c, + 0x0a, 0xe5, 0x39, 0xf9, 0x9c, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, + 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x51, + 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x55, 0x6a, 0x49, 0xa2, 0x6e, + 0x72, 0x46, 0x62, 0x66, 0x1e, 0x98, 0x99, 0x9c, 0x5f, 0x94, 0xaa, 0x8f, 0xc5, 0x6d, 0x49, 0x6c, + 0x60, 0x37, 0x19, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xdc, 0xc4, 0xcc, 0xc8, 0xb9, 0x00, 0x00, + 0x00, } func (m *Proof) Marshal() (dAtA []byte, err error) { diff --git a/pkg/ethereum/proof.go b/pkg/proofs/ethereum/proof.go similarity index 100% rename from pkg/ethereum/proof.go rename to pkg/proofs/ethereum/proof.go diff --git a/pkg/ethereum/proof_test.go b/pkg/proofs/ethereum/proof_test.go similarity index 100% rename from pkg/ethereum/proof_test.go rename to pkg/proofs/ethereum/proof_test.go diff --git a/pkg/headers.go b/pkg/proofs/headers.go similarity index 97% rename from pkg/headers.go rename to pkg/proofs/headers.go index f618a70678..64d2a6b2f1 100644 --- a/pkg/headers.go +++ b/pkg/proofs/headers.go @@ -1,4 +1,4 @@ -package pkg +package proofs import ( "bytes" @@ -13,7 +13,8 @@ import ( "github.com/btcsuite/btcutil" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rlp" - "github.com/zeta-chain/zetacore/pkg/bitcoin" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/proofs/bitcoin" ) // NewEthereumHeader returns a new HeaderData containing an Ethereum header @@ -148,7 +149,7 @@ func ValidateBitcoinHeader(headerBytes []byte, blockHash []byte, chainID int64) } // Timestamp must be not earlier than genesis block - chainParams, err := GetBTCChainParams(chainID) + chainParams, err := chains.GetBTCChainParams(chainID) if err != nil { return fmt.Errorf("cannot get chain params (%s) for chain id (%d)", err, chainID) } diff --git a/pkg/headers_test.go b/pkg/proofs/headers_test.go similarity index 91% rename from pkg/headers_test.go rename to pkg/proofs/headers_test.go index 6c7daed12d..f9499a9c2b 100644 --- a/pkg/headers_test.go +++ b/pkg/proofs/headers_test.go @@ -1,4 +1,4 @@ -package pkg_test +package proofs import ( "bytes" @@ -16,7 +16,6 @@ import ( "github.com/btcsuite/btcd/wire" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/pkg/testdata" ) @@ -37,7 +36,7 @@ func TestTrueEthereumHeader(t *testing.T) { err = header.EncodeRLP(&buffer) require.NoError(t, err) - headerData := pkg.NewEthereumHeader(buffer.Bytes()) + headerData := NewEthereumHeader(buffer.Bytes()) err = headerData.Validate(header.Hash().Bytes(), 1, 18495266) require.NoError(t, err) @@ -66,7 +65,7 @@ func TestFalseEthereumHeader(t *testing.T) { err = header.EncodeRLP(&buffer) require.NoError(t, err) - headerData := pkg.NewEthereumHeader(buffer.Bytes()) + headerData := NewEthereumHeader(buffer.Bytes()) err = headerData.Validate(hash.Bytes(), 1, 18495267) require.Error(t, err) } @@ -100,7 +99,7 @@ func TestFakeBitcoinHeader(t *testing.T) { } func TestNonExistentHeaderType(t *testing.T) { - headerData := pkg.HeaderData{} + headerData := HeaderData{} err := headerData.Validate([]byte{}, 18332, 0) require.EqualError(t, err, "unrecognized header type") @@ -184,7 +183,7 @@ func unmarshalHeader(t *testing.T, headerBytes []byte) *wire.BlockHeader { func validateTrueBitcoinHeader(t *testing.T, header *wire.BlockHeader, headerBytes []byte) { blockHash := header.BlockHash() - headerData := pkg.NewBitcoinHeader(headerBytes) + headerData := NewBitcoinHeader(headerBytes) // True Bitcoin header should pass validation err := headerData.Validate(blockHash[:], 18332, 0) require.NoError(t, err) @@ -202,7 +201,7 @@ func validateFakeBitcoinHeader(t *testing.T, header *wire.BlockHeader, headerByt blockHash := header.BlockHash() // Incorrect header length should fail validation - err := pkg.ValidateBitcoinHeader(headerBytes[:79], blockHash[:], 18332) + err := ValidateBitcoinHeader(headerBytes[:79], blockHash[:], 18332) require.Error(t, err) // Incorrect version should fail validation @@ -210,7 +209,7 @@ func validateFakeBitcoinHeader(t *testing.T, header *wire.BlockHeader, headerByt fakeHeader.Version = 0 fakeBytes := marshalHeader(t, fakeHeader) fakeHash := fakeHeader.BlockHash() - err = pkg.ValidateBitcoinHeader(fakeBytes, fakeHash[:], 18332) + err = ValidateBitcoinHeader(fakeBytes, fakeHash[:], 18332) require.Error(t, err) // Incorrect timestamp should fail validation @@ -219,24 +218,24 @@ func validateFakeBitcoinHeader(t *testing.T, header *wire.BlockHeader, headerByt fakeHeader.Timestamp = chaincfg.TestNet3Params.GenesisBlock.Header.Timestamp.Add(-time.Second) fakeBytes = marshalHeader(t, fakeHeader) fakeHash = fakeHeader.BlockHash() - err = pkg.ValidateBitcoinHeader(fakeBytes, fakeHash[:], 18332) + err = ValidateBitcoinHeader(fakeBytes, fakeHash[:], 18332) require.Error(t, err) // Case2: timestamp is after 2 hours in the future fakeHeader = copyHeader(header) fakeHeader.Timestamp = header.Timestamp.Add(time.Second * (blockchain.MaxTimeOffsetSeconds + 1)) fakeBytes = marshalHeader(t, fakeHeader) - err = pkg.NewBitcoinHeader(fakeBytes).ValidateTimestamp(header.Timestamp) + err = NewBitcoinHeader(fakeBytes).ValidateTimestamp(header.Timestamp) require.Error(t, err) // Incorrect block hash should fail validation fakeHeader = copyHeader(header) header.Nonce = 0 fakeBytes = marshalHeader(t, header) - err = pkg.ValidateBitcoinHeader(fakeBytes, blockHash[:], 18332) + err = ValidateBitcoinHeader(fakeBytes, blockHash[:], 18332) require.Error(t, err) // PoW not satisfied should fail validation fakeHash = fakeHeader.BlockHash() - err = pkg.ValidateBitcoinHeader(fakeBytes, fakeHash[:], 18332) + err = ValidateBitcoinHeader(fakeBytes, fakeHash[:], 18332) require.Error(t, err) } diff --git a/pkg/proof.go b/pkg/proofs/proof.go similarity index 95% rename from pkg/proof.go rename to pkg/proofs/proof.go index 42ff19d0e8..85b62d6bd0 100644 --- a/pkg/proof.go +++ b/pkg/proofs/proof.go @@ -1,4 +1,4 @@ -package pkg +package proofs import ( "bytes" @@ -8,8 +8,8 @@ import ( "github.com/btcsuite/btcutil" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rlp" - "github.com/zeta-chain/zetacore/pkg/bitcoin" - "github.com/zeta-chain/zetacore/pkg/ethereum" + "github.com/zeta-chain/zetacore/pkg/proofs/bitcoin" + "github.com/zeta-chain/zetacore/pkg/proofs/ethereum" ) // ErrInvalidProof is a error type for invalid proofs embedding the underlying error diff --git a/pkg/proof_test.go b/pkg/proofs/proof_test.go similarity index 80% rename from pkg/proof_test.go rename to pkg/proofs/proof_test.go index e25aad49a2..44f28535cb 100644 --- a/pkg/proof_test.go +++ b/pkg/proofs/proof_test.go @@ -1,4 +1,4 @@ -package pkg_test +package proofs import ( "errors" @@ -12,12 +12,9 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rlp" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" - "github.com/zeta-chain/zetacore/pkg/bitcoin" - "github.com/zeta-chain/zetacore/pkg/ethereum" + "github.com/zeta-chain/zetacore/pkg/proofs/bitcoin" + "github.com/zeta-chain/zetacore/pkg/proofs/ethereum" "github.com/zeta-chain/zetacore/pkg/testdata" - "github.com/zeta-chain/zetacore/x/crosschain/keeper" - crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" "github.com/btcsuite/btcd/blockchain" "github.com/btcsuite/btcd/btcjson" @@ -30,11 +27,11 @@ const ( ) func Test_IsErrorInvalidProof(t *testing.T) { - require.False(t, pkg.IsErrorInvalidProof(nil)) - require.False(t, pkg.IsErrorInvalidProof(errors.New("foo"))) + require.False(t, IsErrorInvalidProof(nil)) + require.False(t, IsErrorInvalidProof(errors.New("foo"))) invalidProofErr := errors.New("foo") - invalidProof := pkg.NewErrInvalidProof(invalidProofErr) - require.True(t, pkg.IsErrorInvalidProof(invalidProof)) + invalidProof := NewErrInvalidProof(invalidProofErr) + require.True(t, IsErrorInvalidProof(invalidProof)) require.Equal(t, invalidProofErr.Error(), invalidProof.Error()) } @@ -65,7 +62,7 @@ func TestEthereumMerkleProof(t *testing.T) { b, err := rlp.EncodeToBytes(&header) require.NoError(t, err) - headerData := pkg.NewEthereumHeader(b) + headerData := NewEthereumHeader(b) t.Run("should verify tx proof", func(t *testing.T) { var txs types.Transactions for i := 0; i < testdata.TxsCount; i++ { @@ -83,7 +80,7 @@ func TestEthereumMerkleProof(t *testing.T) { proof, err := txsTree.GenerateProof(i) require.NoError(t, err) - ethProof := pkg.NewEthereumProof(proof) + ethProof := NewEthereumProof(proof) _, err = ethProof.Verify(headerData, i) require.NoError(t, err) @@ -107,7 +104,7 @@ func TestEthereumMerkleProof(t *testing.T) { proof, err := txsTree.GenerateProof(i) require.NoError(t, err) - ethProof := pkg.NewEthereumProof(proof) + ethProof := NewEthereumProof(proof) _, err = ethProof.Verify(headerData, i) require.Error(t, err) @@ -153,16 +150,6 @@ func validateBitcoinBlock(t *testing.T, _ *wire.BlockHeader, headerBytes []byte, tx, err := btcutil.NewTxFromBytes(txBytes) require.NoError(t, err) - // Validate Tss SegWit transaction if it's an outTx - if res.Txid == outTxid { - msg := &crosschaintypes.MsgAddToOutTxTracker{ - ChainId: pkg.BtcTestNetChain().ChainId, - Nonce: nonce, - TxHash: outTxid, - } - err = keeper.VerifyBTCOutTxBody(msg, txBytes, tssAddress) - require.NoError(t, err) - } txns = append(txns, tx) txBodies = append(txBodies, txBytes) } @@ -174,15 +161,15 @@ func validateBitcoinBlock(t *testing.T, _ *wire.BlockHeader, headerBytes []byte, require.NoError(t, err) // True proof should verify - proof := pkg.NewBitcoinProof(txBodies[i], path, index) - txBytes, err := proof.Verify(pkg.NewBitcoinHeader(headerBytes), 0) + proof := NewBitcoinProof(txBodies[i], path, index) + txBytes, err := proof.Verify(NewBitcoinHeader(headerBytes), 0) require.NoError(t, err) require.Equal(t, txBytes, txBodies[i]) // Fake proof should not verify fakeIndex := index ^ 0xffffffff // flip all bits - fakeProof := pkg.NewBitcoinProof(txBodies[i], path, fakeIndex) - txBytes, err = fakeProof.Verify(pkg.NewBitcoinHeader(headerBytes), 0) + fakeProof := NewBitcoinProof(txBodies[i], path, fakeIndex) + txBytes, err = fakeProof.Verify(NewBitcoinHeader(headerBytes), 0) require.Error(t, err) require.Nil(t, txBytes) } diff --git a/pkg/proto/pkg.pb.go b/pkg/proofs/proofs.pb.go similarity index 52% rename from pkg/proto/pkg.pb.go rename to pkg/proofs/proofs.pb.go index 5d14e0cf5f..f866e9d782 100644 --- a/pkg/proto/pkg.pb.go +++ b/pkg/proofs/proofs.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: pkg/pkg.proto +// source: pkg/proofs/proofs.proto -package proto +package proofs import ( fmt "fmt" @@ -11,8 +11,8 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - bitcoin "github.com/zeta-chain/zetacore/pkg/bitcoin" - ethereum "github.com/zeta-chain/zetacore/pkg/ethereum" + bitcoin "github.com/zeta-chain/zetacore/pkg/proofs/bitcoin" + ethereum "github.com/zeta-chain/zetacore/pkg/proofs/ethereum" ) // Reference imports to suppress errors if they are not otherwise used. @@ -26,240 +26,6 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -type ReceiveStatus int32 - -const ( - ReceiveStatus_Created ReceiveStatus = 0 - ReceiveStatus_Success ReceiveStatus = 1 - ReceiveStatus_Failed ReceiveStatus = 2 -) - -var ReceiveStatus_name = map[int32]string{ - 0: "Created", - 1: "Success", - 2: "Failed", -} - -var ReceiveStatus_value = map[string]int32{ - "Created": 0, - "Success": 1, - "Failed": 2, -} - -func (x ReceiveStatus) String() string { - return proto.EnumName(ReceiveStatus_name, int32(x)) -} - -func (ReceiveStatus) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_9a6ed24fa3ed052d, []int{0} -} - -type CoinType int32 - -const ( - CoinType_Zeta CoinType = 0 - CoinType_Gas CoinType = 1 - CoinType_ERC20 CoinType = 2 - CoinType_Cmd CoinType = 3 -) - -var CoinType_name = map[int32]string{ - 0: "Zeta", - 1: "Gas", - 2: "ERC20", - 3: "Cmd", -} - -var CoinType_value = map[string]int32{ - "Zeta": 0, - "Gas": 1, - "ERC20": 2, - "Cmd": 3, -} - -func (x CoinType) String() string { - return proto.EnumName(CoinType_name, int32(x)) -} - -func (CoinType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_9a6ed24fa3ed052d, []int{1} -} - -type ChainName int32 - -const ( - ChainName_empty ChainName = 0 - ChainName_eth_mainnet ChainName = 1 - ChainName_zeta_mainnet ChainName = 2 - ChainName_btc_mainnet ChainName = 3 - ChainName_polygon_mainnet ChainName = 4 - ChainName_bsc_mainnet ChainName = 5 - // Testnet - ChainName_goerli_testnet ChainName = 6 - ChainName_mumbai_testnet ChainName = 7 - ChainName_ganache_testnet ChainName = 8 - ChainName_baobab_testnet ChainName = 9 - ChainName_bsc_testnet ChainName = 10 - ChainName_zeta_testnet ChainName = 11 - ChainName_btc_testnet ChainName = 12 - ChainName_sepolia_testnet ChainName = 13 - // LocalNet - // zeta_localnet = 13; - ChainName_goerli_localnet ChainName = 14 - ChainName_btc_regtest ChainName = 15 -) - -var ChainName_name = map[int32]string{ - 0: "empty", - 1: "eth_mainnet", - 2: "zeta_mainnet", - 3: "btc_mainnet", - 4: "polygon_mainnet", - 5: "bsc_mainnet", - 6: "goerli_testnet", - 7: "mumbai_testnet", - 8: "ganache_testnet", - 9: "baobab_testnet", - 10: "bsc_testnet", - 11: "zeta_testnet", - 12: "btc_testnet", - 13: "sepolia_testnet", - 14: "goerli_localnet", - 15: "btc_regtest", -} - -var ChainName_value = map[string]int32{ - "empty": 0, - "eth_mainnet": 1, - "zeta_mainnet": 2, - "btc_mainnet": 3, - "polygon_mainnet": 4, - "bsc_mainnet": 5, - "goerli_testnet": 6, - "mumbai_testnet": 7, - "ganache_testnet": 8, - "baobab_testnet": 9, - "bsc_testnet": 10, - "zeta_testnet": 11, - "btc_testnet": 12, - "sepolia_testnet": 13, - "goerli_localnet": 14, - "btc_regtest": 15, -} - -func (x ChainName) String() string { - return proto.EnumName(ChainName_name, int32(x)) -} - -func (ChainName) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_9a6ed24fa3ed052d, []int{2} -} - -// PubKeySet contains two pub keys , secp256k1 and ed25519 -type PubKeySet struct { - Secp256k1 PubKey `protobuf:"bytes,1,opt,name=secp256k1,proto3,casttype=PubKey" json:"secp256k1,omitempty"` - Ed25519 PubKey `protobuf:"bytes,2,opt,name=ed25519,proto3,casttype=PubKey" json:"ed25519,omitempty"` -} - -func (m *PubKeySet) Reset() { *m = PubKeySet{} } -func (m *PubKeySet) String() string { return proto.CompactTextString(m) } -func (*PubKeySet) ProtoMessage() {} -func (*PubKeySet) Descriptor() ([]byte, []int) { - return fileDescriptor_9a6ed24fa3ed052d, []int{0} -} -func (m *PubKeySet) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PubKeySet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PubKeySet.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *PubKeySet) XXX_Merge(src proto.Message) { - xxx_messageInfo_PubKeySet.Merge(m, src) -} -func (m *PubKeySet) XXX_Size() int { - return m.Size() -} -func (m *PubKeySet) XXX_DiscardUnknown() { - xxx_messageInfo_PubKeySet.DiscardUnknown(m) -} - -var xxx_messageInfo_PubKeySet proto.InternalMessageInfo - -func (m *PubKeySet) GetSecp256k1() PubKey { - if m != nil { - return m.Secp256k1 - } - return "" -} - -func (m *PubKeySet) GetEd25519() PubKey { - if m != nil { - return m.Ed25519 - } - return "" -} - -type Chain struct { - ChainName ChainName `protobuf:"varint,1,opt,name=chain_name,json=chainName,proto3,enum=pkg.ChainName" json:"chain_name,omitempty"` - ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` -} - -func (m *Chain) Reset() { *m = Chain{} } -func (m *Chain) String() string { return proto.CompactTextString(m) } -func (*Chain) ProtoMessage() {} -func (*Chain) Descriptor() ([]byte, []int) { - return fileDescriptor_9a6ed24fa3ed052d, []int{1} -} -func (m *Chain) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Chain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Chain.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Chain) XXX_Merge(src proto.Message) { - xxx_messageInfo_Chain.Merge(m, src) -} -func (m *Chain) XXX_Size() int { - return m.Size() -} -func (m *Chain) XXX_DiscardUnknown() { - xxx_messageInfo_Chain.DiscardUnknown(m) -} - -var xxx_messageInfo_Chain proto.InternalMessageInfo - -func (m *Chain) GetChainName() ChainName { - if m != nil { - return m.ChainName - } - return ChainName_empty -} - -func (m *Chain) GetChainId() int64 { - if m != nil { - return m.ChainId - } - return 0 -} - type BlockHeader struct { Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` @@ -273,7 +39,7 @@ func (m *BlockHeader) Reset() { *m = BlockHeader{} } func (m *BlockHeader) String() string { return proto.CompactTextString(m) } func (*BlockHeader) ProtoMessage() {} func (*BlockHeader) Descriptor() ([]byte, []int) { - return fileDescriptor_9a6ed24fa3ed052d, []int{2} + return fileDescriptor_248469268b1ea9af, []int{0} } func (m *BlockHeader) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -349,7 +115,7 @@ func (m *HeaderData) Reset() { *m = HeaderData{} } func (m *HeaderData) String() string { return proto.CompactTextString(m) } func (*HeaderData) ProtoMessage() {} func (*HeaderData) Descriptor() ([]byte, []int) { - return fileDescriptor_9a6ed24fa3ed052d, []int{3} + return fileDescriptor_248469268b1ea9af, []int{1} } func (m *HeaderData) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -435,7 +201,7 @@ func (m *Proof) Reset() { *m = Proof{} } func (m *Proof) String() string { return proto.CompactTextString(m) } func (*Proof) ProtoMessage() {} func (*Proof) Descriptor() ([]byte, []int) { - return fileDescriptor_9a6ed24fa3ed052d, []int{4} + return fileDescriptor_248469268b1ea9af, []int{2} } func (m *Proof) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -510,134 +276,39 @@ func (*Proof) XXX_OneofWrappers() []interface{} { } func init() { - proto.RegisterEnum("pkg.ReceiveStatus", ReceiveStatus_name, ReceiveStatus_value) - proto.RegisterEnum("pkg.CoinType", CoinType_name, CoinType_value) - proto.RegisterEnum("pkg.ChainName", ChainName_name, ChainName_value) - proto.RegisterType((*PubKeySet)(nil), "pkg.PubKeySet") - proto.RegisterType((*Chain)(nil), "pkg.Chain") - proto.RegisterType((*BlockHeader)(nil), "pkg.BlockHeader") - proto.RegisterType((*HeaderData)(nil), "pkg.HeaderData") - proto.RegisterType((*Proof)(nil), "pkg.Proof") -} - -func init() { proto.RegisterFile("pkg/pkg.proto", fileDescriptor_9a6ed24fa3ed052d) } - -var fileDescriptor_9a6ed24fa3ed052d = []byte{ - // 690 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x94, 0xcb, 0x6e, 0xd3, 0x4c, - 0x14, 0xc7, 0xed, 0xdc, 0x7d, 0x72, 0xb3, 0xe6, 0xfb, 0xf4, 0x7d, 0x6d, 0x91, 0x92, 0x2a, 0x42, - 0xa2, 0x54, 0x6a, 0x42, 0x83, 0xc2, 0x45, 0xec, 0x12, 0x2e, 0x45, 0x48, 0xa8, 0x38, 0xac, 0xba, - 0x89, 0xc6, 0xf6, 0xc1, 0xb6, 0x12, 0x7b, 0x2c, 0x7b, 0x82, 0x14, 0x76, 0xbc, 0x01, 0x0f, 0xd1, - 0x05, 0x4f, 0xc0, 0x33, 0x74, 0xd9, 0x25, 0xab, 0x0a, 0xa5, 0x6f, 0xc1, 0x0a, 0xcd, 0xd8, 0xe3, - 0x94, 0x95, 0xcf, 0xf9, 0xff, 0x7f, 0xe7, 0x62, 0x7b, 0x34, 0xd0, 0x8e, 0x97,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xbe, 0xed, 0x69, 0x3f, 0x6f, 0x7b, 0xda, 0xc5, 0x91, 0x17, 0x70, 0x7f, 0x6d, 0x0f, 0x1d, 0x16, - 0x8e, 0xc4, 0x1a, 0x27, 0xf2, 0xf8, 0xcb, 0xd0, 0x61, 0x09, 0x8e, 0xe4, 0xdd, 0x24, 0x2e, 0x11, - 0xbb, 0x26, 0x1f, 0x8f, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x86, 0x9e, 0x4b, 0x02, 0xaf, 0x04, - 0x00, 0x00, -} - -func (m *PubKeySet) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PubKeySet) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PubKeySet) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Ed25519) > 0 { - i -= len(m.Ed25519) - copy(dAtA[i:], m.Ed25519) - i = encodeVarintPkg(dAtA, i, uint64(len(m.Ed25519))) - i-- - dAtA[i] = 0x12 - } - if len(m.Secp256k1) > 0 { - i -= len(m.Secp256k1) - copy(dAtA[i:], m.Secp256k1) - i = encodeVarintPkg(dAtA, i, uint64(len(m.Secp256k1))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Chain) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Chain) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Chain) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ChainId != 0 { - i = encodeVarintPkg(dAtA, i, uint64(m.ChainId)) - i-- - dAtA[i] = 0x10 - } - if m.ChainName != 0 { - i = encodeVarintPkg(dAtA, i, uint64(m.ChainName)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil + proto.RegisterType((*BlockHeader)(nil), "proofs.BlockHeader") + proto.RegisterType((*HeaderData)(nil), "proofs.HeaderData") + proto.RegisterType((*Proof)(nil), "proofs.Proof") +} + +func init() { proto.RegisterFile("pkg/proofs/proofs.proto", fileDescriptor_248469268b1ea9af) } + +var fileDescriptor_248469268b1ea9af = []byte{ + // 373 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x91, 0xbd, 0x6e, 0xea, 0x30, + 0x14, 0xc7, 0x63, 0x08, 0xe1, 0xea, 0x84, 0x0b, 0x92, 0x75, 0x75, 0x6f, 0x2e, 0x43, 0x88, 0xb2, + 0x14, 0x86, 0x26, 0x15, 0x55, 0xa5, 0xce, 0x69, 0x07, 0xba, 0x55, 0x19, 0xbb, 0x44, 0x26, 0x71, + 0xe3, 0x88, 0x82, 0xa3, 0x60, 0x96, 0x6e, 0x7d, 0x83, 0xbe, 0x45, 0x5f, 0x85, 0x91, 0xb1, 0x53, + 0x55, 0xc1, 0x8b, 0x54, 0x71, 0x6c, 0x60, 0xf2, 0xf9, 0xf8, 0x9d, 0xbf, 0xcf, 0x07, 0xfc, 0x2b, + 0x17, 0x79, 0x58, 0x56, 0x9c, 0x3f, 0xaf, 0xd5, 0x13, 0x94, 0x15, 0x17, 0x1c, 0x5b, 0x8d, 0x37, + 0xfc, 0x93, 0xf3, 0x9c, 0xcb, 0x50, 0x58, 0x5b, 0x4d, 0x76, 0xe8, 0x9d, 0x95, 0xcd, 0x0b, 0x91, + 0xf2, 0x62, 0xa5, 0x5f, 0x45, 0xf8, 0x67, 0x04, 0x15, 0x8c, 0x56, 0x74, 0xb3, 0x3c, 0x1a, 0x0d, + 0xe3, 0x7f,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7b, 0x17, 0xed, 0xf6, 0x2e, 0xfa, 0xde, + 0xbb, 0xe8, 0xfd, 0xe0, 0x1a, 0xbb, 0x83, 0x6b, 0x7c, 0x1e, 0x5c, 0xe3, 0x69, 0x92, 0x17, 0x82, + 0x6d, 0xe6, 0x41, 0xca, 0x97, 0xe1, 0x2b, 0x15, 0xe4, 0x52, 0xae, 0x54, 0x9a, 0x29, 0xaf, 0x68, + 0x78, 0x3a, 0xfa, 0xdc, 0x92, 0x37, 0xbe, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0x53, 0xf1, 0xe6, + 0x53, 0x62, 0x02, 0x00, 0x00, } func (m *BlockHeader) Marshal() (dAtA []byte, err error) { @@ -666,31 +337,31 @@ func (m *BlockHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintPkg(dAtA, i, uint64(size)) + i = encodeVarintProofs(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x2a if m.ChainId != 0 { - i = encodeVarintPkg(dAtA, i, uint64(m.ChainId)) + i = encodeVarintProofs(dAtA, i, uint64(m.ChainId)) i-- dAtA[i] = 0x20 } if len(m.ParentHash) > 0 { i -= len(m.ParentHash) copy(dAtA[i:], m.ParentHash) - i = encodeVarintPkg(dAtA, i, uint64(len(m.ParentHash))) + i = encodeVarintProofs(dAtA, i, uint64(len(m.ParentHash))) i-- dAtA[i] = 0x1a } if len(m.Hash) > 0 { i -= len(m.Hash) copy(dAtA[i:], m.Hash) - i = encodeVarintPkg(dAtA, i, uint64(len(m.Hash))) + i = encodeVarintProofs(dAtA, i, uint64(len(m.Hash))) i-- dAtA[i] = 0x12 } if m.Height != 0 { - i = encodeVarintPkg(dAtA, i, uint64(m.Height)) + i = encodeVarintProofs(dAtA, i, uint64(m.Height)) i-- dAtA[i] = 0x8 } @@ -739,7 +410,7 @@ func (m *HeaderData_EthereumHeader) MarshalToSizedBuffer(dAtA []byte) (int, erro if m.EthereumHeader != nil { i -= len(m.EthereumHeader) copy(dAtA[i:], m.EthereumHeader) - i = encodeVarintPkg(dAtA, i, uint64(len(m.EthereumHeader))) + i = encodeVarintProofs(dAtA, i, uint64(len(m.EthereumHeader))) i-- dAtA[i] = 0xa } @@ -755,7 +426,7 @@ func (m *HeaderData_BitcoinHeader) MarshalToSizedBuffer(dAtA []byte) (int, error if m.BitcoinHeader != nil { i -= len(m.BitcoinHeader) copy(dAtA[i:], m.BitcoinHeader) - i = encodeVarintPkg(dAtA, i, uint64(len(m.BitcoinHeader))) + i = encodeVarintProofs(dAtA, i, uint64(len(m.BitcoinHeader))) i-- dAtA[i] = 0x12 } @@ -807,7 +478,7 @@ func (m *Proof_EthereumProof) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintPkg(dAtA, i, uint64(size)) + i = encodeVarintProofs(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa @@ -828,15 +499,15 @@ func (m *Proof_BitcoinProof) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintPkg(dAtA, i, uint64(size)) + i = encodeVarintProofs(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } return len(dAtA) - i, nil } -func encodeVarintPkg(dAtA []byte, offset int, v uint64) int { - offset -= sovPkg(v) +func encodeVarintProofs(dAtA []byte, offset int, v uint64) int { + offset -= sovProofs(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) @@ -846,38 +517,6 @@ func encodeVarintPkg(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *PubKeySet) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Secp256k1) - if l > 0 { - n += 1 + l + sovPkg(uint64(l)) - } - l = len(m.Ed25519) - if l > 0 { - n += 1 + l + sovPkg(uint64(l)) - } - return n -} - -func (m *Chain) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ChainName != 0 { - n += 1 + sovPkg(uint64(m.ChainName)) - } - if m.ChainId != 0 { - n += 1 + sovPkg(uint64(m.ChainId)) - } - return n -} - func (m *BlockHeader) Size() (n int) { if m == nil { return 0 @@ -885,21 +524,21 @@ func (m *BlockHeader) Size() (n int) { var l int _ = l if m.Height != 0 { - n += 1 + sovPkg(uint64(m.Height)) + n += 1 + sovProofs(uint64(m.Height)) } l = len(m.Hash) if l > 0 { - n += 1 + l + sovPkg(uint64(l)) + n += 1 + l + sovProofs(uint64(l)) } l = len(m.ParentHash) if l > 0 { - n += 1 + l + sovPkg(uint64(l)) + n += 1 + l + sovProofs(uint64(l)) } if m.ChainId != 0 { - n += 1 + sovPkg(uint64(m.ChainId)) + n += 1 + sovProofs(uint64(m.ChainId)) } l = m.Header.Size() - n += 1 + l + sovPkg(uint64(l)) + n += 1 + l + sovProofs(uint64(l)) return n } @@ -923,7 +562,7 @@ func (m *HeaderData_EthereumHeader) Size() (n int) { _ = l if m.EthereumHeader != nil { l = len(m.EthereumHeader) - n += 1 + l + sovPkg(uint64(l)) + n += 1 + l + sovProofs(uint64(l)) } return n } @@ -935,7 +574,7 @@ func (m *HeaderData_BitcoinHeader) Size() (n int) { _ = l if m.BitcoinHeader != nil { l = len(m.BitcoinHeader) - n += 1 + l + sovPkg(uint64(l)) + n += 1 + l + sovProofs(uint64(l)) } return n } @@ -959,7 +598,7 @@ func (m *Proof_EthereumProof) Size() (n int) { _ = l if m.EthereumProof != nil { l = m.EthereumProof.Size() - n += 1 + l + sovPkg(uint64(l)) + n += 1 + l + sovProofs(uint64(l)) } return n } @@ -971,218 +610,16 @@ func (m *Proof_BitcoinProof) Size() (n int) { _ = l if m.BitcoinProof != nil { l = m.BitcoinProof.Size() - n += 1 + l + sovPkg(uint64(l)) + n += 1 + l + sovProofs(uint64(l)) } return n } -func sovPkg(x uint64) (n int) { +func sovProofs(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } -func sozPkg(x uint64) (n int) { - return sovPkg(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *PubKeySet) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPkg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PubKeySet: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PubKeySet: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Secp256k1", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPkg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPkg - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPkg - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Secp256k1 = PubKey(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ed25519", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPkg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPkg - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPkg - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ed25519 = PubKey(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPkg(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPkg - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Chain) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPkg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Chain: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Chain: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainName", wireType) - } - m.ChainName = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPkg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ChainName |= ChainName(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - m.ChainId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPkg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ChainId |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipPkg(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPkg - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil +func sozProofs(x uint64) (n int) { + return sovProofs(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *BlockHeader) Unmarshal(dAtA []byte) error { l := len(dAtA) @@ -1192,7 +629,7 @@ func (m *BlockHeader) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPkg + return ErrIntOverflowProofs } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1220,7 +657,7 @@ func (m *BlockHeader) Unmarshal(dAtA []byte) error { m.Height = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPkg + return ErrIntOverflowProofs } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1239,7 +676,7 @@ func (m *BlockHeader) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPkg + return ErrIntOverflowProofs } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1252,11 +689,11 @@ func (m *BlockHeader) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthPkg + return ErrInvalidLengthProofs } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthPkg + return ErrInvalidLengthProofs } if postIndex > l { return io.ErrUnexpectedEOF @@ -1273,7 +710,7 @@ func (m *BlockHeader) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPkg + return ErrIntOverflowProofs } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1286,11 +723,11 @@ func (m *BlockHeader) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthPkg + return ErrInvalidLengthProofs } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthPkg + return ErrInvalidLengthProofs } if postIndex > l { return io.ErrUnexpectedEOF @@ -1307,7 +744,7 @@ func (m *BlockHeader) Unmarshal(dAtA []byte) error { m.ChainId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPkg + return ErrIntOverflowProofs } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1326,7 +763,7 @@ func (m *BlockHeader) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPkg + return ErrIntOverflowProofs } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1339,11 +776,11 @@ func (m *BlockHeader) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthPkg + return ErrInvalidLengthProofs } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthPkg + return ErrInvalidLengthProofs } if postIndex > l { return io.ErrUnexpectedEOF @@ -1354,12 +791,12 @@ func (m *BlockHeader) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipPkg(dAtA[iNdEx:]) + skippy, err := skipProofs(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPkg + return ErrInvalidLengthProofs } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1381,7 +818,7 @@ func (m *HeaderData) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPkg + return ErrIntOverflowProofs } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1409,7 +846,7 @@ func (m *HeaderData) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPkg + return ErrIntOverflowProofs } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1422,11 +859,11 @@ func (m *HeaderData) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthPkg + return ErrInvalidLengthProofs } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthPkg + return ErrInvalidLengthProofs } if postIndex > l { return io.ErrUnexpectedEOF @@ -1442,7 +879,7 @@ func (m *HeaderData) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPkg + return ErrIntOverflowProofs } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1455,11 +892,11 @@ func (m *HeaderData) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthPkg + return ErrInvalidLengthProofs } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthPkg + return ErrInvalidLengthProofs } if postIndex > l { return io.ErrUnexpectedEOF @@ -1470,12 +907,12 @@ func (m *HeaderData) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipPkg(dAtA[iNdEx:]) + skippy, err := skipProofs(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPkg + return ErrInvalidLengthProofs } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1497,7 +934,7 @@ func (m *Proof) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPkg + return ErrIntOverflowProofs } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1525,7 +962,7 @@ func (m *Proof) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPkg + return ErrIntOverflowProofs } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1538,11 +975,11 @@ func (m *Proof) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthPkg + return ErrInvalidLengthProofs } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthPkg + return ErrInvalidLengthProofs } if postIndex > l { return io.ErrUnexpectedEOF @@ -1560,7 +997,7 @@ func (m *Proof) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowPkg + return ErrIntOverflowProofs } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1573,11 +1010,11 @@ func (m *Proof) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthPkg + return ErrInvalidLengthProofs } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthPkg + return ErrInvalidLengthProofs } if postIndex > l { return io.ErrUnexpectedEOF @@ -1590,12 +1027,12 @@ func (m *Proof) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipPkg(dAtA[iNdEx:]) + skippy, err := skipProofs(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPkg + return ErrInvalidLengthProofs } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1609,7 +1046,7 @@ func (m *Proof) Unmarshal(dAtA []byte) error { } return nil } -func skipPkg(dAtA []byte) (n int, err error) { +func skipProofs(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 depth := 0 @@ -1617,7 +1054,7 @@ func skipPkg(dAtA []byte) (n int, err error) { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowPkg + return 0, ErrIntOverflowProofs } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -1634,7 +1071,7 @@ func skipPkg(dAtA []byte) (n int, err error) { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowPkg + return 0, ErrIntOverflowProofs } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -1650,7 +1087,7 @@ func skipPkg(dAtA []byte) (n int, err error) { var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowPkg + return 0, ErrIntOverflowProofs } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -1663,14 +1100,14 @@ func skipPkg(dAtA []byte) (n int, err error) { } } if length < 0 { - return 0, ErrInvalidLengthPkg + return 0, ErrInvalidLengthProofs } iNdEx += length case 3: depth++ case 4: if depth == 0 { - return 0, ErrUnexpectedEndOfGroupPkg + return 0, ErrUnexpectedEndOfGroupProofs } depth-- case 5: @@ -1679,7 +1116,7 @@ func skipPkg(dAtA []byte) (n int, err error) { return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { - return 0, ErrInvalidLengthPkg + return 0, ErrInvalidLengthProofs } if depth == 0 { return iNdEx, nil @@ -1689,7 +1126,7 @@ func skipPkg(dAtA []byte) (n int, err error) { } var ( - ErrInvalidLengthPkg = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowPkg = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupPkg = fmt.Errorf("proto: unexpected end of group") + ErrInvalidLengthProofs = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProofs = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupProofs = fmt.Errorf("proto: unexpected end of group") ) diff --git a/proto/crosschain/cross_chain_tx.proto b/proto/crosschain/cross_chain_tx.proto index 88c1f525c6..4ed336ed8f 100644 --- a/proto/crosschain/cross_chain_tx.proto +++ b/proto/crosschain/cross_chain_tx.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package zetachain.zetacore.crosschain; import "gogoproto/gogo.proto"; -import "pkg/pkg.proto"; +import "pkg/coin/coin.proto"; option go_package = "github.com/zeta-chain/zetacore/x/crosschain/types"; @@ -26,7 +26,7 @@ message InboundTxParams { string sender = 1; // this address is the immediate contract/EOA that calls the Connector.send() int64 sender_chain_id = 2; string tx_origin = 3; // this address is the EOA that signs the inbound tx - pkg.CoinType coin_type = 4; + coin.CoinType coin_type = 4; string asset = 5; // for ERC20 coin type, the asset is an address of the ERC20 contract string amount = 6 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", @@ -50,7 +50,7 @@ message ZetaAccounting { message OutboundTxParams { string receiver = 1; int64 receiver_chainId = 2; - pkg.CoinType coin_type = 3; + coin.CoinType coin_type = 3; string amount = 4 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", (gogoproto.nullable) = false diff --git a/proto/crosschain/events.proto b/proto/crosschain/events.proto index 05dff47ebe..05786446ed 100644 --- a/proto/crosschain/events.proto +++ b/proto/crosschain/events.proto @@ -2,7 +2,6 @@ syntax = "proto3"; package zetachain.zetacore.crosschain; import "gogoproto/gogo.proto"; -import "pkg/pkg.proto"; option go_package = "github.com/zeta-chain/zetacore/x/crosschain/types"; diff --git a/proto/crosschain/in_tx_tracker.proto b/proto/crosschain/in_tx_tracker.proto index 09c098888a..a29d0d6f55 100644 --- a/proto/crosschain/in_tx_tracker.proto +++ b/proto/crosschain/in_tx_tracker.proto @@ -1,12 +1,12 @@ syntax = "proto3"; package zetachain.zetacore.crosschain; -import "pkg/pkg.proto"; +import "pkg/coin/coin.proto"; option go_package = "github.com/zeta-chain/zetacore/x/crosschain/types"; message InTxTracker { int64 chain_id = 1; string tx_hash = 2; - pkg.CoinType coin_type = 3; + coin.CoinType coin_type = 3; } diff --git a/proto/crosschain/tx.proto b/proto/crosschain/tx.proto index c697ad6f10..d6e4fc093b 100644 --- a/proto/crosschain/tx.proto +++ b/proto/crosschain/tx.proto @@ -2,7 +2,9 @@ syntax = "proto3"; package zetachain.zetacore.crosschain; import "gogoproto/gogo.proto"; -import "pkg/pkg.proto"; +import "pkg/chains/chains.proto"; +import "pkg/coin/coin.proto"; +import "pkg/proofs/proofs.proto"; option go_package = "github.com/zeta-chain/zetacore/x/crosschain/types"; @@ -28,7 +30,7 @@ message MsgCreateTSSVoter { string creator = 1; string tss_pubkey = 2; int64 keyGenZetaHeight = 3; - pkg.ReceiveStatus status = 4; + chains.ReceiveStatus status = 4; } message MsgCreateTSSVoterResponse {} @@ -54,8 +56,8 @@ message MsgAddToInTxTracker { string creator = 1; int64 chain_id = 2; string tx_hash = 3; - pkg.CoinType coin_type = 4; - pkg.Proof proof = 5; + coin.CoinType coin_type = 4; + proofs.Proof proof = 5; string block_hash = 6; int64 tx_index = 7; } @@ -81,7 +83,7 @@ message MsgAddToOutTxTracker { int64 chain_id = 2; uint64 nonce = 3; string tx_hash = 4; - pkg.Proof proof = 5; + proofs.Proof proof = 5; string block_hash = 6; int64 tx_index = 7; } @@ -124,10 +126,10 @@ message MsgVoteOnObservedOutboundTx { (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"value_received\"" ]; - pkg.ReceiveStatus status = 6; + chains.ReceiveStatus status = 6; int64 outTx_chain = 7; uint64 outTx_tss_nonce = 8; - pkg.CoinType coin_type = 9; + coin.CoinType coin_type = 9; } message MsgVoteOnObservedOutboundTxResponse {} @@ -148,7 +150,7 @@ message MsgVoteOnObservedInboundTx { string in_tx_hash = 9; uint64 in_block_height = 10; uint64 gas_limit = 11; - pkg.CoinType coin_type = 12; + coin.CoinType coin_type = 12; string tx_origin = 13; string asset = 14; // event index of the sent asset in the observed tx diff --git a/proto/fungible/events.proto b/proto/fungible/events.proto index 7751c8f9a0..6e47edbfb8 100644 --- a/proto/fungible/events.proto +++ b/proto/fungible/events.proto @@ -3,7 +3,7 @@ package zetachain.zetacore.fungible; import "fungible/tx.proto"; import "gogoproto/gogo.proto"; -import "pkg/pkg.proto"; +import "pkg/coin/coin.proto"; option go_package = "github.com/zeta-chain/zetacore/x/fungible/types"; @@ -21,7 +21,7 @@ message EventZRC20Deployed { string name = 4; string symbol = 5; int64 decimals = 6; - pkg.CoinType coin_type = 7; + coin.CoinType coin_type = 7; string erc20 = 8; int64 gas_limit = 9; } @@ -29,7 +29,7 @@ message EventZRC20Deployed { message EventZRC20WithdrawFeeUpdated { string msg_type_url = 1; int64 chain_id = 2; - pkg.CoinType coin_type = 3; + coin.CoinType coin_type = 3; string zrc20_address = 4; string old_withdraw_fee = 5; string new_withdraw_fee = 6; diff --git a/proto/fungible/foreign_coins.proto b/proto/fungible/foreign_coins.proto index d20cad9284..e943d6b574 100644 --- a/proto/fungible/foreign_coins.proto +++ b/proto/fungible/foreign_coins.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package zetachain.zetacore.fungible; import "gogoproto/gogo.proto"; -import "pkg/pkg.proto"; +import "pkg/coin/coin.proto"; option go_package = "github.com/zeta-chain/zetacore/x/fungible/types"; @@ -14,7 +14,7 @@ message ForeignCoins { uint32 decimals = 5; string name = 6; string symbol = 7; - pkg.CoinType coin_type = 8; + coin.CoinType coin_type = 8; uint64 gas_limit = 9; bool paused = 10; string liquidity_cap = 11 [ diff --git a/proto/fungible/tx.proto b/proto/fungible/tx.proto index 3f9e6e6cf2..9ba063b43a 100644 --- a/proto/fungible/tx.proto +++ b/proto/fungible/tx.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package zetachain.zetacore.fungible; import "gogoproto/gogo.proto"; -import "pkg/pkg.proto"; +import "pkg/coin/coin.proto"; option go_package = "github.com/zeta-chain/zetacore/x/fungible/types"; @@ -59,7 +59,7 @@ message MsgDeployFungibleCoinZRC20 { uint32 decimals = 4; string name = 5; string symbol = 6; - pkg.CoinType coin_type = 7; + coin.CoinType coin_type = 7; int64 gas_limit = 8; } diff --git a/proto/observer/chain_nonces.proto b/proto/observer/chain_nonces.proto index 159b51d367..3d4ff65c32 100644 --- a/proto/observer/chain_nonces.proto +++ b/proto/observer/chain_nonces.proto @@ -2,7 +2,6 @@ syntax = "proto3"; package zetachain.zetacore.observer; import "gogoproto/gogo.proto"; -import "pkg/pkg.proto"; option go_package = "github.com/zeta-chain/zetacore/x/observer/types"; diff --git a/proto/observer/node_account.proto b/proto/observer/node_account.proto index d0556c25cb..ed6141e23e 100644 --- a/proto/observer/node_account.proto +++ b/proto/observer/node_account.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package zetachain.zetacore.observer; import "gogoproto/gogo.proto"; -import "pkg/pkg.proto"; +import "pkg/crypto/crypto.proto"; option go_package = "github.com/zeta-chain/zetacore/x/observer/types"; @@ -19,6 +19,6 @@ enum NodeStatus { message NodeAccount { string operator = 1; string granteeAddress = 2; - pkg.PubKeySet granteePubkey = 3; + crypto.PubKeySet granteePubkey = 3; NodeStatus nodeStatus = 4; } diff --git a/proto/observer/nonce_to_cctx.proto b/proto/observer/nonce_to_cctx.proto index bd383b7d5b..947e9c6f35 100644 --- a/proto/observer/nonce_to_cctx.proto +++ b/proto/observer/nonce_to_cctx.proto @@ -2,7 +2,6 @@ syntax = "proto3"; package zetachain.zetacore.observer; import "gogoproto/gogo.proto"; -import "pkg/pkg.proto"; option go_package = "github.com/zeta-chain/zetacore/x/observer/types"; diff --git a/proto/observer/observer.proto b/proto/observer/observer.proto index 0f85902220..575eea04f1 100644 --- a/proto/observer/observer.proto +++ b/proto/observer/observer.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package zetachain.zetacore.observer; import "gogoproto/gogo.proto"; -import "pkg/pkg.proto"; +import "pkg/chains/chains.proto"; option go_package = "github.com/zeta-chain/zetacore/x/observer/types"; @@ -24,7 +24,7 @@ enum ObserverUpdateReason { message ObserverMapper { string index = 1; - pkg.Chain observer_chain = 2; + chains.Chain observer_chain = 2; repeated string observer_list = 4; } diff --git a/proto/observer/params.proto b/proto/observer/params.proto index 11cd1d6ae3..8c26206ff6 100644 --- a/proto/observer/params.proto +++ b/proto/observer/params.proto @@ -3,7 +3,7 @@ package zetachain.zetacore.observer; import "gogoproto/gogo.proto"; import "observer/observer.proto"; -import "pkg/pkg.proto"; +import "pkg/chains/chains.proto"; option go_package = "github.com/zeta-chain/zetacore/x/observer/types"; @@ -36,7 +36,7 @@ message ChainParams { // Deprecated(v13): Use ChainParamsList message ObserverParams { - pkg.Chain chain = 1; + chains.Chain chain = 1; string ballot_threshold = 3 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false diff --git a/proto/observer/pending_nonces.proto b/proto/observer/pending_nonces.proto index 971c9a245d..e733843d01 100644 --- a/proto/observer/pending_nonces.proto +++ b/proto/observer/pending_nonces.proto @@ -2,7 +2,6 @@ syntax = "proto3"; package zetachain.zetacore.observer; import "gogoproto/gogo.proto"; -import "pkg/pkg.proto"; option go_package = "github.com/zeta-chain/zetacore/x/observer/types"; diff --git a/proto/observer/query.proto b/proto/observer/query.proto index 57bf20400b..0c2cde9644 100644 --- a/proto/observer/query.proto +++ b/proto/observer/query.proto @@ -15,7 +15,8 @@ import "observer/observer.proto"; import "observer/params.proto"; import "observer/pending_nonces.proto"; import "observer/tss.proto"; -import "pkg/pkg.proto"; +import "pkg/chains/chains.proto"; +import "pkg/proofs/proofs.proto"; option go_package = "github.com/zeta-chain/zetacore/x/observer/types"; @@ -217,7 +218,7 @@ message QueryTssHistoryResponse { message QueryProveRequest { int64 chain_id = 1; string tx_hash = 2; - pkg.Proof proof = 3; + proofs.Proof proof = 3; string block_hash = 4; int64 tx_index = 5; } @@ -267,7 +268,7 @@ message QueryObserverSetResponse { message QuerySupportedChains {} message QuerySupportedChainsResponse { - repeated pkg.Chain chains = 1; + repeated chains.Chain chains = 1; } message QueryGetChainParamsForChainRequest { @@ -350,7 +351,7 @@ message QueryAllBlockHeaderRequest { } message QueryAllBlockHeaderResponse { - repeated pkg.BlockHeader block_headers = 1; + repeated proofs.BlockHeader block_headers = 1; cosmos.base.query.v1beta1.PageResponse pagination = 2; } @@ -359,7 +360,7 @@ message QueryGetBlockHeaderByHashRequest { } message QueryGetBlockHeaderByHashResponse { - pkg.BlockHeader block_header = 1; + proofs.BlockHeader block_header = 1; } message QueryGetBlockHeaderStateRequest { diff --git a/proto/observer/tx.proto b/proto/observer/tx.proto index 8e7e00ff50..8245827f16 100644 --- a/proto/observer/tx.proto +++ b/proto/observer/tx.proto @@ -8,7 +8,7 @@ import "observer/observer.proto"; import "observer/params.proto"; import "observer/pending_nonces.proto"; import "observer/tss.proto"; -import "pkg/pkg.proto"; +import "pkg/proofs/proofs.proto"; option go_package = "github.com/zeta-chain/zetacore/x/observer/types"; @@ -38,7 +38,7 @@ message MsgAddBlockHeader { int64 chain_id = 2; bytes block_hash = 3; int64 height = 4; - pkg.HeaderData header = 5 [(gogoproto.nullable) = false]; + proofs.HeaderData header = 5 [(gogoproto.nullable) = false]; } message MsgAddBlockHeaderResponse {} diff --git a/proto/pkg/chains/chains.proto b/proto/pkg/chains/chains.proto new file mode 100644 index 0000000000..fa9e9e49db --- /dev/null +++ b/proto/pkg/chains/chains.proto @@ -0,0 +1,44 @@ +syntax = "proto3"; +package chains; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/zeta-chain/zetacore/pkg/chains"; + +enum ReceiveStatus { + option (gogoproto.goproto_enum_stringer) = true; + Created = 0; // some observer sees inbound tx + Success = 1; + Failed = 2; +} + +enum ChainName { + option (gogoproto.goproto_enum_stringer) = true; + empty = 0; + + eth_mainnet = 1; + zeta_mainnet = 2; + btc_mainnet = 3; + polygon_mainnet = 4; + bsc_mainnet = 5; + // Testnet + goerli_testnet = 6; + mumbai_testnet = 7; + ganache_testnet = 8; + baobab_testnet = 9; + bsc_testnet = 10; + zeta_testnet = 11; + btc_testnet = 12; + sepolia_testnet = 13; + // LocalNet + // zeta_localnet = 13; + goerli_localnet = 14; + btc_regtest = 15; + // Athens + // zeta_athensnet=15; +} + +message Chain { + ChainName chain_name = 1; + int64 chain_id = 2; +} diff --git a/proto/pkg/coin/coin.proto b/proto/pkg/coin/coin.proto new file mode 100644 index 0000000000..52d2a67967 --- /dev/null +++ b/proto/pkg/coin/coin.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; +package coin; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/zeta-chain/zetacore/pkg/coin"; + +enum CoinType { + option (gogoproto.goproto_enum_stringer) = true; + Zeta = 0; + Gas = 1; // Ether, BNB, Matic, Klay, BTC, etc + ERC20 = 2; // ERC20 token + Cmd = 3; // not a real coin, rather a command +} diff --git a/proto/pkg/crypto/crypto.proto b/proto/pkg/crypto/crypto.proto new file mode 100644 index 0000000000..f74878f490 --- /dev/null +++ b/proto/pkg/crypto/crypto.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; +package crypto; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/zeta-chain/zetacore/pkg/crypto"; + +// PubKeySet contains two pub keys , secp256k1 and ed25519 +message PubKeySet { + string secp256k1 = 1 [ + (gogoproto.casttype) = "PubKey", + (gogoproto.customname) = "Secp256k1" + ]; + string ed25519 = 2 [(gogoproto.casttype) = "PubKey"]; +} diff --git a/proto/pkg/pkg.proto b/proto/pkg/pkg.proto deleted file mode 100644 index 5a92b5f031..0000000000 --- a/proto/pkg/pkg.proto +++ /dev/null @@ -1,89 +0,0 @@ -syntax = "proto3"; -package pkg; - -//option (gogoproto.goproto_stringer_all) = false; -//option (gogoproto.stringer_all) = false; -//option (gogoproto.goproto_getters_all) = false; -import "gogoproto/gogo.proto"; -import "pkg/bitcoin/bitcoin.proto"; -import "pkg/ethereum/ethereum.proto"; - -option go_package = "github.com/zeta-chain/zetacore/pkg/proto"; - -// PubKeySet contains two pub keys , secp256k1 and ed25519 -message PubKeySet { - string secp256k1 = 1 [ - (gogoproto.casttype) = "PubKey", - (gogoproto.customname) = "Secp256k1" - ]; - string ed25519 = 2 [(gogoproto.casttype) = "PubKey"]; -} - -enum ReceiveStatus { - option (gogoproto.goproto_enum_stringer) = true; - Created = 0; // some observer sees inbound tx - Success = 1; - Failed = 2; -} - -enum CoinType { - option (gogoproto.goproto_enum_stringer) = true; - Zeta = 0; - Gas = 1; // Ether, BNB, Matic, Klay, BTC, etc - ERC20 = 2; // ERC20 token - Cmd = 3; // not a real coin, rather a command -} - -enum ChainName { - option (gogoproto.goproto_enum_stringer) = true; - empty = 0; - - eth_mainnet = 1; - zeta_mainnet = 2; - btc_mainnet = 3; - polygon_mainnet = 4; - bsc_mainnet = 5; - // Testnet - goerli_testnet = 6; - mumbai_testnet = 7; - ganache_testnet = 8; - baobab_testnet = 9; - bsc_testnet = 10; - zeta_testnet = 11; - btc_testnet = 12; - sepolia_testnet = 13; - // LocalNet - // zeta_localnet = 13; - goerli_localnet = 14; - btc_regtest = 15; - // Athens - // zeta_athensnet=15; -} - -message Chain { - ChainName chain_name = 1; - int64 chain_id = 2; -} - -message BlockHeader { - int64 height = 1; - bytes hash = 2; - bytes parent_hash = 3; - int64 chain_id = 4; - // chain specific header - HeaderData header = 5 [(gogoproto.nullable) = false]; -} - -message HeaderData { - oneof data { - bytes ethereum_header = 1; // binary encoded headers; RLP for ethereum - bytes bitcoin_header = 2; // 80-byte little-endian encoded binary data - } -} - -message Proof { - oneof proof { - ethereum.Proof ethereum_proof = 1; - bitcoin.Proof bitcoin_proof = 2; - } -} diff --git a/proto/pkg/bitcoin/bitcoin.proto b/proto/pkg/proofs/bitcoin/bitcoin.proto similarity index 61% rename from proto/pkg/bitcoin/bitcoin.proto rename to proto/pkg/proofs/bitcoin/bitcoin.proto index 55a4498e0d..7712782ce3 100644 --- a/proto/pkg/bitcoin/bitcoin.proto +++ b/proto/pkg/proofs/bitcoin/bitcoin.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package bitcoin; -option go_package = "github.com/zeta-chain/zetacore/pkg/bitcoin"; +option go_package = "github.com/zeta-chain/zetacore/pkg/proofs/bitcoin"; message Proof { bytes tx_bytes = 1; diff --git a/proto/pkg/ethereum/ethereum.proto b/proto/pkg/proofs/ethereum/ethereum.proto similarity index 60% rename from proto/pkg/ethereum/ethereum.proto rename to proto/pkg/proofs/ethereum/ethereum.proto index e1150bdcee..76d9489292 100644 --- a/proto/pkg/ethereum/ethereum.proto +++ b/proto/pkg/proofs/ethereum/ethereum.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package ethereum; -option go_package = "github.com/zeta-chain/zetacore/pkg/ethereum"; +option go_package = "github.com/zeta-chain/zetacore/pkg/proofs/ethereum"; message Proof { repeated bytes keys = 1; diff --git a/proto/pkg/proofs/proofs.proto b/proto/pkg/proofs/proofs.proto new file mode 100644 index 0000000000..e8360d5cbd --- /dev/null +++ b/proto/pkg/proofs/proofs.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; +package proofs; + +import "gogoproto/gogo.proto"; +import "pkg/proofs/bitcoin/bitcoin.proto"; +import "pkg/proofs/ethereum/ethereum.proto"; + +option go_package = "github.com/zeta-chain/zetacore/pkg/proofs"; + +message BlockHeader { + int64 height = 1; + bytes hash = 2; + bytes parent_hash = 3; + int64 chain_id = 4; + // chain specific header + HeaderData header = 5 [(gogoproto.nullable) = false]; +} + +message HeaderData { + oneof data { + bytes ethereum_header = 1; // binary encoded headers; RLP for ethereum + bytes bitcoin_header = 2; // 80-byte little-endian encoded binary data + } +} + +message Proof { + oneof proof { + ethereum.Proof ethereum_proof = 1; + bitcoin.Proof bitcoin_proof = 2; + } +} diff --git a/testutil/keeper/mocks/crosschain/fungible.go b/testutil/keeper/mocks/crosschain/fungible.go index 81d7c0f380..54b7e54a03 100644 --- a/testutil/keeper/mocks/crosschain/fungible.go +++ b/testutil/keeper/mocks/crosschain/fungible.go @@ -6,6 +6,8 @@ import ( big "math/big" common "github.com/ethereum/go-ethereum/common" + coin "github.com/zeta-chain/zetacore/pkg/coin" + evmtypes "github.com/evmos/ethermint/x/evm/types" fungibletypes "github.com/zeta-chain/zetacore/x/fungible/types" @@ -13,8 +15,6 @@ import ( mock "github.com/stretchr/testify/mock" types "github.com/cosmos/cosmos-sdk/types" - - "github.com/zeta-chain/zetacore/pkg" ) // CrosschainFungibleKeeper is an autogenerated mock type for the CrosschainFungibleKeeper type @@ -119,7 +119,7 @@ func (_m *CrosschainFungibleKeeper) CallZRC20Burn(ctx types.Context, sender comm } // DeployZRC20Contract provides a mock function with given fields: ctx, name, symbol, decimals, chainID, coinType, erc20Contract, gasLimit -func (_m *CrosschainFungibleKeeper) DeployZRC20Contract(ctx types.Context, name string, symbol string, decimals uint8, chainID int64, coinType pkg.CoinType, erc20Contract string, gasLimit *big.Int) (common.Address, error) { +func (_m *CrosschainFungibleKeeper) DeployZRC20Contract(ctx types.Context, name string, symbol string, decimals uint8, chainID int64, coinType coin.CoinType, erc20Contract string, gasLimit *big.Int) (common.Address, error) { ret := _m.Called(ctx, name, symbol, decimals, chainID, coinType, erc20Contract, gasLimit) if len(ret) == 0 { @@ -128,10 +128,10 @@ func (_m *CrosschainFungibleKeeper) DeployZRC20Contract(ctx types.Context, name var r0 common.Address var r1 error - if rf, ok := ret.Get(0).(func(types.Context, string, string, uint8, int64, pkg.CoinType, string, *big.Int) (common.Address, error)); ok { + if rf, ok := ret.Get(0).(func(types.Context, string, string, uint8, int64, coin.CoinType, string, *big.Int) (common.Address, error)); ok { return rf(ctx, name, symbol, decimals, chainID, coinType, erc20Contract, gasLimit) } - if rf, ok := ret.Get(0).(func(types.Context, string, string, uint8, int64, pkg.CoinType, string, *big.Int) common.Address); ok { + if rf, ok := ret.Get(0).(func(types.Context, string, string, uint8, int64, coin.CoinType, string, *big.Int) common.Address); ok { r0 = rf(ctx, name, symbol, decimals, chainID, coinType, erc20Contract, gasLimit) } else { if ret.Get(0) != nil { @@ -139,7 +139,7 @@ func (_m *CrosschainFungibleKeeper) DeployZRC20Contract(ctx types.Context, name } } - if rf, ok := ret.Get(1).(func(types.Context, string, string, uint8, int64, pkg.CoinType, string, *big.Int) error); ok { + if rf, ok := ret.Get(1).(func(types.Context, string, string, uint8, int64, coin.CoinType, string, *big.Int) error); ok { r1 = rf(ctx, name, symbol, decimals, chainID, coinType, erc20Contract, gasLimit) } else { r1 = ret.Error(1) @@ -598,7 +598,7 @@ func (_m *CrosschainFungibleKeeper) WithdrawFromGasStabilityPool(ctx types.Conte } // ZRC20DepositAndCallContract provides a mock function with given fields: ctx, from, to, amount, senderChainID, data, coinType, asset -func (_m *CrosschainFungibleKeeper) ZRC20DepositAndCallContract(ctx types.Context, from []byte, to common.Address, amount *big.Int, senderChainID int64, data []byte, coinType pkg.CoinType, asset string) (*evmtypes.MsgEthereumTxResponse, bool, error) { +func (_m *CrosschainFungibleKeeper) ZRC20DepositAndCallContract(ctx types.Context, from []byte, to common.Address, amount *big.Int, senderChainID int64, data []byte, coinType coin.CoinType, asset string) (*evmtypes.MsgEthereumTxResponse, bool, error) { ret := _m.Called(ctx, from, to, amount, senderChainID, data, coinType, asset) if len(ret) == 0 { @@ -608,10 +608,10 @@ func (_m *CrosschainFungibleKeeper) ZRC20DepositAndCallContract(ctx types.Contex var r0 *evmtypes.MsgEthereumTxResponse var r1 bool var r2 error - if rf, ok := ret.Get(0).(func(types.Context, []byte, common.Address, *big.Int, int64, []byte, pkg.CoinType, string) (*evmtypes.MsgEthereumTxResponse, bool, error)); ok { + if rf, ok := ret.Get(0).(func(types.Context, []byte, common.Address, *big.Int, int64, []byte, coin.CoinType, string) (*evmtypes.MsgEthereumTxResponse, bool, error)); ok { return rf(ctx, from, to, amount, senderChainID, data, coinType, asset) } - if rf, ok := ret.Get(0).(func(types.Context, []byte, common.Address, *big.Int, int64, []byte, pkg.CoinType, string) *evmtypes.MsgEthereumTxResponse); ok { + if rf, ok := ret.Get(0).(func(types.Context, []byte, common.Address, *big.Int, int64, []byte, coin.CoinType, string) *evmtypes.MsgEthereumTxResponse); ok { r0 = rf(ctx, from, to, amount, senderChainID, data, coinType, asset) } else { if ret.Get(0) != nil { @@ -619,13 +619,13 @@ func (_m *CrosschainFungibleKeeper) ZRC20DepositAndCallContract(ctx types.Contex } } - if rf, ok := ret.Get(1).(func(types.Context, []byte, common.Address, *big.Int, int64, []byte, pkg.CoinType, string) bool); ok { + if rf, ok := ret.Get(1).(func(types.Context, []byte, common.Address, *big.Int, int64, []byte, coin.CoinType, string) bool); ok { r1 = rf(ctx, from, to, amount, senderChainID, data, coinType, asset) } else { r1 = ret.Get(1).(bool) } - if rf, ok := ret.Get(2).(func(types.Context, []byte, common.Address, *big.Int, int64, []byte, pkg.CoinType, string) error); ok { + if rf, ok := ret.Get(2).(func(types.Context, []byte, common.Address, *big.Int, int64, []byte, coin.CoinType, string) error); ok { r2 = rf(ctx, from, to, amount, senderChainID, data, coinType, asset) } else { r2 = ret.Error(2) diff --git a/testutil/keeper/mocks/crosschain/observer.go b/testutil/keeper/mocks/crosschain/observer.go index 3cf01ecf0f..84590ca702 100644 --- a/testutil/keeper/mocks/crosschain/observer.go +++ b/testutil/keeper/mocks/crosschain/observer.go @@ -3,14 +3,17 @@ package mocks import ( - context "context" + chains "github.com/zeta-chain/zetacore/pkg/chains" + coin "github.com/zeta-chain/zetacore/pkg/coin" - "github.com/zeta-chain/zetacore/pkg" + context "context" mock "github.com/stretchr/testify/mock" observertypes "github.com/zeta-chain/zetacore/x/observer/types" + proofs "github.com/zeta-chain/zetacore/pkg/proofs" + types "github.com/cosmos/cosmos-sdk/types" ) @@ -109,7 +112,7 @@ func (_m *CrosschainObserverKeeper) CheckIfTssPubkeyHasBeenGenerated(ctx types.C } // FindBallot provides a mock function with given fields: ctx, index, chain, observationType -func (_m *CrosschainObserverKeeper) FindBallot(ctx types.Context, index string, chain *pkg.Chain, observationType observertypes.ObservationType) (observertypes.Ballot, bool, error) { +func (_m *CrosschainObserverKeeper) FindBallot(ctx types.Context, index string, chain *chains.Chain, observationType observertypes.ObservationType) (observertypes.Ballot, bool, error) { ret := _m.Called(ctx, index, chain, observationType) if len(ret) == 0 { @@ -119,22 +122,22 @@ func (_m *CrosschainObserverKeeper) FindBallot(ctx types.Context, index string, var r0 observertypes.Ballot var r1 bool var r2 error - if rf, ok := ret.Get(0).(func(types.Context, string, *pkg.Chain, observertypes.ObservationType) (observertypes.Ballot, bool, error)); ok { + if rf, ok := ret.Get(0).(func(types.Context, string, *chains.Chain, observertypes.ObservationType) (observertypes.Ballot, bool, error)); ok { return rf(ctx, index, chain, observationType) } - if rf, ok := ret.Get(0).(func(types.Context, string, *pkg.Chain, observertypes.ObservationType) observertypes.Ballot); ok { + if rf, ok := ret.Get(0).(func(types.Context, string, *chains.Chain, observertypes.ObservationType) observertypes.Ballot); ok { r0 = rf(ctx, index, chain, observationType) } else { r0 = ret.Get(0).(observertypes.Ballot) } - if rf, ok := ret.Get(1).(func(types.Context, string, *pkg.Chain, observertypes.ObservationType) bool); ok { + if rf, ok := ret.Get(1).(func(types.Context, string, *chains.Chain, observertypes.ObservationType) bool); ok { r1 = rf(ctx, index, chain, observationType) } else { r1 = ret.Get(1).(bool) } - if rf, ok := ret.Get(2).(func(types.Context, string, *pkg.Chain, observertypes.ObservationType) error); ok { + if rf, ok := ret.Get(2).(func(types.Context, string, *chains.Chain, observertypes.ObservationType) error); ok { r2 = rf(ctx, index, chain, observationType) } else { r2 = ret.Error(2) @@ -302,22 +305,22 @@ func (_m *CrosschainObserverKeeper) GetBallot(ctx types.Context, index string) ( } // GetBlockHeader provides a mock function with given fields: ctx, hash -func (_m *CrosschainObserverKeeper) GetBlockHeader(ctx types.Context, hash []byte) (pkg.BlockHeader, bool) { +func (_m *CrosschainObserverKeeper) GetBlockHeader(ctx types.Context, hash []byte) (proofs.BlockHeader, bool) { ret := _m.Called(ctx, hash) if len(ret) == 0 { panic("no return value specified for GetBlockHeader") } - var r0 pkg.BlockHeader + var r0 proofs.BlockHeader var r1 bool - if rf, ok := ret.Get(0).(func(types.Context, []byte) (pkg.BlockHeader, bool)); ok { + if rf, ok := ret.Get(0).(func(types.Context, []byte) (proofs.BlockHeader, bool)); ok { return rf(ctx, hash) } - if rf, ok := ret.Get(0).(func(types.Context, []byte) pkg.BlockHeader); ok { + if rf, ok := ret.Get(0).(func(types.Context, []byte) proofs.BlockHeader); ok { r0 = rf(ctx, hash) } else { - r0 = ret.Get(0).(pkg.BlockHeader) + r0 = ret.Get(0).(proofs.BlockHeader) } if rf, ok := ret.Get(1).(func(types.Context, []byte) bool); ok { @@ -584,19 +587,19 @@ func (_m *CrosschainObserverKeeper) GetPendingNonces(ctx types.Context, tss stri } // GetSupportedChainFromChainID provides a mock function with given fields: ctx, chainID -func (_m *CrosschainObserverKeeper) GetSupportedChainFromChainID(ctx types.Context, chainID int64) *pkg.Chain { +func (_m *CrosschainObserverKeeper) GetSupportedChainFromChainID(ctx types.Context, chainID int64) *chains.Chain { ret := _m.Called(ctx, chainID) if len(ret) == 0 { panic("no return value specified for GetSupportedChainFromChainID") } - var r0 *pkg.Chain - if rf, ok := ret.Get(0).(func(types.Context, int64) *pkg.Chain); ok { + var r0 *chains.Chain + if rf, ok := ret.Get(0).(func(types.Context, int64) *chains.Chain); ok { r0 = rf(ctx, chainID) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*pkg.Chain) + r0 = ret.Get(0).(*chains.Chain) } } @@ -604,19 +607,19 @@ func (_m *CrosschainObserverKeeper) GetSupportedChainFromChainID(ctx types.Conte } // GetSupportedChains provides a mock function with given fields: ctx -func (_m *CrosschainObserverKeeper) GetSupportedChains(ctx types.Context) []*pkg.Chain { +func (_m *CrosschainObserverKeeper) GetSupportedChains(ctx types.Context) []*chains.Chain { ret := _m.Called(ctx) if len(ret) == 0 { panic("no return value specified for GetSupportedChains") } - var r0 []*pkg.Chain - if rf, ok := ret.Get(0).(func(types.Context) []*pkg.Chain); ok { + var r0 []*chains.Chain + if rf, ok := ret.Get(0).(func(types.Context) []*chains.Chain); ok { r0 = rf(ctx) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).([]*pkg.Chain) + r0 = ret.Get(0).([]*chains.Chain) } } @@ -783,7 +786,7 @@ func (_m *CrosschainObserverKeeper) SetTssAndUpdateNonce(ctx types.Context, tss } // VoteOnInboundBallot provides a mock function with given fields: ctx, senderChainID, receiverChainID, coinType, voter, ballotIndex, inTxHash -func (_m *CrosschainObserverKeeper) VoteOnInboundBallot(ctx types.Context, senderChainID int64, receiverChainID int64, coinType pkg.CoinType, voter string, ballotIndex string, inTxHash string) (bool, bool, error) { +func (_m *CrosschainObserverKeeper) VoteOnInboundBallot(ctx types.Context, senderChainID int64, receiverChainID int64, coinType coin.CoinType, voter string, ballotIndex string, inTxHash string) (bool, bool, error) { ret := _m.Called(ctx, senderChainID, receiverChainID, coinType, voter, ballotIndex, inTxHash) if len(ret) == 0 { @@ -793,22 +796,22 @@ func (_m *CrosschainObserverKeeper) VoteOnInboundBallot(ctx types.Context, sende var r0 bool var r1 bool var r2 error - if rf, ok := ret.Get(0).(func(types.Context, int64, int64, pkg.CoinType, string, string, string) (bool, bool, error)); ok { + if rf, ok := ret.Get(0).(func(types.Context, int64, int64, coin.CoinType, string, string, string) (bool, bool, error)); ok { return rf(ctx, senderChainID, receiverChainID, coinType, voter, ballotIndex, inTxHash) } - if rf, ok := ret.Get(0).(func(types.Context, int64, int64, pkg.CoinType, string, string, string) bool); ok { + if rf, ok := ret.Get(0).(func(types.Context, int64, int64, coin.CoinType, string, string, string) bool); ok { r0 = rf(ctx, senderChainID, receiverChainID, coinType, voter, ballotIndex, inTxHash) } else { r0 = ret.Get(0).(bool) } - if rf, ok := ret.Get(1).(func(types.Context, int64, int64, pkg.CoinType, string, string, string) bool); ok { + if rf, ok := ret.Get(1).(func(types.Context, int64, int64, coin.CoinType, string, string, string) bool); ok { r1 = rf(ctx, senderChainID, receiverChainID, coinType, voter, ballotIndex, inTxHash) } else { r1 = ret.Get(1).(bool) } - if rf, ok := ret.Get(2).(func(types.Context, int64, int64, pkg.CoinType, string, string, string) error); ok { + if rf, ok := ret.Get(2).(func(types.Context, int64, int64, coin.CoinType, string, string, string) error); ok { r2 = rf(ctx, senderChainID, receiverChainID, coinType, voter, ballotIndex, inTxHash) } else { r2 = ret.Error(2) @@ -818,7 +821,7 @@ func (_m *CrosschainObserverKeeper) VoteOnInboundBallot(ctx types.Context, sende } // VoteOnOutboundBallot provides a mock function with given fields: ctx, ballotIndex, outTxChainID, receiveStatus, voter -func (_m *CrosschainObserverKeeper) VoteOnOutboundBallot(ctx types.Context, ballotIndex string, outTxChainID int64, receiveStatus pkg.ReceiveStatus, voter string) (bool, bool, observertypes.Ballot, string, error) { +func (_m *CrosschainObserverKeeper) VoteOnOutboundBallot(ctx types.Context, ballotIndex string, outTxChainID int64, receiveStatus chains.ReceiveStatus, voter string) (bool, bool, observertypes.Ballot, string, error) { ret := _m.Called(ctx, ballotIndex, outTxChainID, receiveStatus, voter) if len(ret) == 0 { @@ -830,34 +833,34 @@ func (_m *CrosschainObserverKeeper) VoteOnOutboundBallot(ctx types.Context, ball var r2 observertypes.Ballot var r3 string var r4 error - if rf, ok := ret.Get(0).(func(types.Context, string, int64, pkg.ReceiveStatus, string) (bool, bool, observertypes.Ballot, string, error)); ok { + if rf, ok := ret.Get(0).(func(types.Context, string, int64, chains.ReceiveStatus, string) (bool, bool, observertypes.Ballot, string, error)); ok { return rf(ctx, ballotIndex, outTxChainID, receiveStatus, voter) } - if rf, ok := ret.Get(0).(func(types.Context, string, int64, pkg.ReceiveStatus, string) bool); ok { + if rf, ok := ret.Get(0).(func(types.Context, string, int64, chains.ReceiveStatus, string) bool); ok { r0 = rf(ctx, ballotIndex, outTxChainID, receiveStatus, voter) } else { r0 = ret.Get(0).(bool) } - if rf, ok := ret.Get(1).(func(types.Context, string, int64, pkg.ReceiveStatus, string) bool); ok { + if rf, ok := ret.Get(1).(func(types.Context, string, int64, chains.ReceiveStatus, string) bool); ok { r1 = rf(ctx, ballotIndex, outTxChainID, receiveStatus, voter) } else { r1 = ret.Get(1).(bool) } - if rf, ok := ret.Get(2).(func(types.Context, string, int64, pkg.ReceiveStatus, string) observertypes.Ballot); ok { + if rf, ok := ret.Get(2).(func(types.Context, string, int64, chains.ReceiveStatus, string) observertypes.Ballot); ok { r2 = rf(ctx, ballotIndex, outTxChainID, receiveStatus, voter) } else { r2 = ret.Get(2).(observertypes.Ballot) } - if rf, ok := ret.Get(3).(func(types.Context, string, int64, pkg.ReceiveStatus, string) string); ok { + if rf, ok := ret.Get(3).(func(types.Context, string, int64, chains.ReceiveStatus, string) string); ok { r3 = rf(ctx, ballotIndex, outTxChainID, receiveStatus, voter) } else { r3 = ret.Get(3).(string) } - if rf, ok := ret.Get(4).(func(types.Context, string, int64, pkg.ReceiveStatus, string) error); ok { + if rf, ok := ret.Get(4).(func(types.Context, string, int64, chains.ReceiveStatus, string) error); ok { r4 = rf(ctx, ballotIndex, outTxChainID, receiveStatus, voter) } else { r4 = ret.Error(4) diff --git a/testutil/keeper/mocks/fungible/observer.go b/testutil/keeper/mocks/fungible/observer.go index ac4d1dea07..bbe76b1afa 100644 --- a/testutil/keeper/mocks/fungible/observer.go +++ b/testutil/keeper/mocks/fungible/observer.go @@ -4,7 +4,7 @@ package mocks import ( mock "github.com/stretchr/testify/mock" - "github.com/zeta-chain/zetacore/pkg" + chains "github.com/zeta-chain/zetacore/pkg/chains" types "github.com/cosmos/cosmos-sdk/types" ) @@ -15,19 +15,19 @@ type FungibleObserverKeeper struct { } // GetSupportedChains provides a mock function with given fields: ctx -func (_m *FungibleObserverKeeper) GetSupportedChains(ctx types.Context) []*pkg.Chain { +func (_m *FungibleObserverKeeper) GetSupportedChains(ctx types.Context) []*chains.Chain { ret := _m.Called(ctx) if len(ret) == 0 { panic("no return value specified for GetSupportedChains") } - var r0 []*pkg.Chain - if rf, ok := ret.Get(0).(func(types.Context) []*pkg.Chain); ok { + var r0 []*chains.Chain + if rf, ok := ret.Get(0).(func(types.Context) []*chains.Chain); ok { r0 = rf(ctx) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).([]*pkg.Chain) + r0 = ret.Get(0).([]*chains.Chain) } } diff --git a/testutil/network/genesis_state.go b/testutil/network/genesis_state.go index 202fb00c2a..4263ac256b 100644 --- a/testutil/network/genesis_state.go +++ b/testutil/network/genesis_state.go @@ -6,6 +6,8 @@ import ( "strconv" "testing" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" "cosmossdk.io/math" @@ -14,7 +16,6 @@ import ( evmtypes "github.com/evmos/ethermint/x/evm/types" "github.com/stretchr/testify/require" cmdcfg "github.com/zeta-chain/zetacore/cmd/zetacored/config" - "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/testutil/nullify" "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" @@ -61,8 +62,8 @@ func SetupZetaGenesisState(t *testing.T, genesisState map[string]json.RawMessage } if setupChainNonces { - chainNonceList := make([]observertypes.ChainNonces, len(pkg.PrivnetChainList())) - for i, chain := range pkg.PrivnetChainList() { + chainNonceList := make([]observertypes.ChainNonces, len(chains.PrivnetChainList())) + for i, chain := range chains.PrivnetChainList() { chainNonceList[i] = observertypes.ChainNonces{ Index: chain.ChainName.String(), ChainId: chain.ChainId, @@ -139,8 +140,8 @@ func AddObserverData(t *testing.T, n int, genesisState map[string]json.RawMessag FinalizedZetaHeight: 1, KeyGenZetaHeight: 1, } - pendingNonces := make([]observertypes.PendingNonces, len(pkg.DefaultChainsList())) - for i, chain := range pkg.DefaultChainsList() { + pendingNonces := make([]observertypes.PendingNonces, len(chains.DefaultChainsList())) + for i, chain := range chains.DefaultChainsList() { pendingNonces[i] = observertypes.PendingNonces{ ChainId: chain.ChainId, NonceLow: 0, @@ -205,7 +206,7 @@ func AddCrosschainData(t *testing.T, n int, genesisState map[string]json.RawMess inTxTracker := types.InTxTracker{ ChainId: 5, TxHash: fmt.Sprintf("txHash-%d", i), - CoinType: pkg.CoinType_Gas, + CoinType: coin.CoinType_Gas, } nullify.Fill(&inTxTracker) state.InTxTrackerList = append(state.InTxTrackerList, inTxTracker) diff --git a/testutil/sample/common.go b/testutil/sample/common.go index 0ef7411d15..7549d80ce0 100644 --- a/testutil/sample/common.go +++ b/testutil/sample/common.go @@ -3,22 +3,23 @@ package sample import ( "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "github.com/tendermint/tendermint/crypto/secp256k1" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/crypto" ) -func Chain(chainID int64) *pkg.Chain { +func Chain(chainID int64) *chains.Chain { r := newRandFromSeed(chainID) - return &pkg.Chain{ - ChainName: pkg.ChainName(r.Intn(4)), + return &chains.Chain{ + ChainName: chains.ChainName(r.Intn(4)), ChainId: chainID, } } -func PubKeySet() *pkg.PubKeySet { - pubKeySet := pkg.PubKeySet{ - Secp256k1: pkg.PubKey(secp256k1.GenPrivKey().PubKey().Bytes()), - Ed25519: pkg.PubKey(ed25519.GenPrivKey().PubKey().String()), +func PubKeySet() *crypto.PubKeySet { + pubKeySet := crypto.PubKeySet{ + Secp256k1: crypto.PubKey(secp256k1.GenPrivKey().PubKey().Bytes()), + Ed25519: crypto.PubKey(ed25519.GenPrivKey().PubKey().String()), } return &pubKeySet } diff --git a/testutil/sample/crosschain.go b/testutil/sample/crosschain.go index eaa015fd90..3fa5d04983 100644 --- a/testutil/sample/crosschain.go +++ b/testutil/sample/crosschain.go @@ -9,7 +9,7 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/x/crosschain/types" ) @@ -42,7 +42,7 @@ func InboundTxParams(r *rand.Rand) *types.InboundTxParams { Sender: EthAddress().String(), SenderChainId: r.Int63(), TxOrigin: EthAddress().String(), - CoinType: pkg.CoinType(r.Intn(100)), + CoinType: coin.CoinType(r.Intn(100)), Asset: StringRandom(r, 32), Amount: math.NewUint(uint64(r.Int63())), InboundTxObservedHash: StringRandom(r, 32), @@ -56,7 +56,7 @@ func OutboundTxParams(r *rand.Rand) *types.OutboundTxParams { return &types.OutboundTxParams{ Receiver: EthAddress().String(), ReceiverChainId: r.Int63(), - CoinType: pkg.CoinType(r.Intn(100)), + CoinType: coin.CoinType(r.Intn(100)), Amount: math.NewUint(uint64(r.Int63())), OutboundTxTssNonce: r.Uint64(), OutboundTxGasLimit: r.Uint64(), @@ -125,7 +125,7 @@ func ZetaAccounting(t *testing.T, index string) types.ZetaAccounting { } } -func InboundVote(coinType pkg.CoinType, from, to int64) types.MsgVoteOnObservedInboundTx { +func InboundVote(coinType coin.CoinType, from, to int64) types.MsgVoteOnObservedInboundTx { return types.MsgVoteOnObservedInboundTx{ Creator: "", Sender: EthAddress().String(), diff --git a/testutil/sample/fungible.go b/testutil/sample/fungible.go index dd130bf1c2..73fdc2b2e3 100644 --- a/testutil/sample/fungible.go +++ b/testutil/sample/fungible.go @@ -3,7 +3,7 @@ package sample import ( "testing" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/x/fungible/types" ) @@ -17,7 +17,7 @@ func ForeignCoins(t *testing.T, address string) types.ForeignCoins { Decimals: uint32(r.Uint64()), Name: StringRandom(r, 32), Symbol: StringRandom(r, 32), - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, GasLimit: r.Uint64(), } } diff --git a/testutil/sample/observer.go b/testutil/sample/observer.go index 317d24193a..c90036ff07 100644 --- a/testutil/sample/observer.go +++ b/testutil/sample/observer.go @@ -8,8 +8,9 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/crypto" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/pkg/cosmos" + zetacrypto "github.com/zeta-chain/zetacore/pkg/crypto" "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -111,7 +112,7 @@ func ChainParamsSupported(chainID int64) *types.ChainParams { } func ChainParamsList() (cpl types.ChainParamsList) { - chainList := pkg.PrivnetChainList() + chainList := chains.PrivnetChainList() for _, chain := range chainList { cpl.ChainParams = append(cpl.ChainParams, ChainParams(chain.ChainId)) @@ -125,7 +126,7 @@ func Tss() types.TSS { if err != nil { panic(err) } - pk, err := pkg.NewPubKey(spk) + pk, err := zetacrypto.NewPubKey(spk) if err != nil { panic(err) } diff --git a/testutil/sample/sample.go b/testutil/sample/sample.go index 46154096fb..0ac8621411 100644 --- a/testutil/sample/sample.go +++ b/testutil/sample/sample.go @@ -9,7 +9,6 @@ import ( sdkmath "cosmossdk.io/math" "github.com/zeta-chain/zetacore/cmd/zetacored/config" - "github.com/zeta-chain/zetacore/pkg" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" @@ -18,6 +17,7 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" "github.com/zeta-chain/zetacore/pkg/cosmos" + "github.com/zeta-chain/zetacore/pkg/crypto" ) var ErrSample = errors.New("sample error") @@ -86,7 +86,7 @@ func PubKeyString() string { if err != nil { panic(err) } - pubkey, err := pkg.NewPubKey(s) + pubkey, err := crypto.NewPubKey(s) if err != nil { panic(err) } diff --git a/x/crosschain/client/cli/cli_cctx.go b/x/crosschain/client/cli/cli_cctx.go index 66d7a9a828..92fed899d3 100644 --- a/x/crosschain/client/cli/cli_cctx.go +++ b/x/crosschain/client/cli/cli_cctx.go @@ -12,7 +12,8 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" "github.com/spf13/cobra" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/x/crosschain/types" ) @@ -148,11 +149,11 @@ func CmdCCTXInboundVoter() *cobra.Command { return err } - coinType, ok := pkg.CoinType_value[args[9]] + coinType, ok := coin.CoinType_value[args[9]] if !ok { return fmt.Errorf("wrong coin type %s", args[9]) } - argsCoinType := pkg.CoinType(coinType) + argsCoinType := coin.CoinType(coinType) argsAsset := args[10] @@ -224,11 +225,11 @@ func CmdCCTXOutboundVoter() *cobra.Command { argsMMint := args[6] - var status pkg.ReceiveStatus + var status chains.ReceiveStatus if args[7] == "0" { - status = pkg.ReceiveStatus_Success + status = chains.ReceiveStatus_Success } else if args[7] == "1" { - status = pkg.ReceiveStatus_Failed + status = chains.ReceiveStatus_Failed } else { return fmt.Errorf("wrong status") } @@ -243,11 +244,11 @@ func CmdCCTXOutboundVoter() *cobra.Command { return err } - coinType, ok := pkg.CoinType_value[args[10]] + coinType, ok := coin.CoinType_value[args[10]] if !ok { return fmt.Errorf("wrong coin type %s", args[10]) } - argsCoinType := pkg.CoinType(coinType) + argsCoinType := coin.CoinType(coinType) clientCtx, err := client.GetClientTxContext(cmd) if err != nil { diff --git a/x/crosschain/client/cli/cli_in_tx_tracker.go b/x/crosschain/client/cli/cli_in_tx_tracker.go index 730e075711..5afcec7ec8 100644 --- a/x/crosschain/client/cli/cli_in_tx_tracker.go +++ b/x/crosschain/client/cli/cli_in_tx_tracker.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" "github.com/spf13/cobra" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/x/crosschain/types" ) @@ -24,7 +24,7 @@ func CmdAddToInTxTracker() *cobra.Command { return err } argTxHash := args[1] - argsCoinType, err := pkg.GetCoinType(args[2]) + argsCoinType, err := coin.GetCoinType(args[2]) if err != nil { return err } diff --git a/x/crosschain/client/cli/cli_tss.go b/x/crosschain/client/cli/cli_tss.go index 298fb01294..7c85ea8b72 100644 --- a/x/crosschain/client/cli/cli_tss.go +++ b/x/crosschain/client/cli/cli_tss.go @@ -10,7 +10,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/tx" "github.com/spf13/cast" "github.com/spf13/cobra" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/x/crosschain/types" ) @@ -29,11 +29,11 @@ func CmdCreateTSSVoter() *cobra.Command { if err != nil { return err } - var status pkg.ReceiveStatus + var status chains.ReceiveStatus if args[2] == "0" { - status = pkg.ReceiveStatus_Success + status = chains.ReceiveStatus_Success } else if args[2] == "1" { - status = pkg.ReceiveStatus_Failed + status = chains.ReceiveStatus_Failed } else { return fmt.Errorf("wrong status") } diff --git a/x/crosschain/client/integrationtests/cli_helpers.go b/x/crosschain/client/integrationtests/cli_helpers.go index a0b57d0bf1..9cc05b32d6 100644 --- a/x/crosschain/client/integrationtests/cli_helpers.go +++ b/x/crosschain/client/integrationtests/cli_helpers.go @@ -17,7 +17,8 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/stretchr/testify/require" tmcli "github.com/tendermint/tendermint/libs/cli" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/testutil/network" "github.com/zeta-chain/zetacore/x/crosschain/client/cli" "github.com/zeta-chain/zetacore/x/crosschain/types" @@ -137,11 +138,11 @@ func BuildSignedDeployETHZRC20( } args := append([]string{ "", - strconv.FormatInt(pkg.GoerliLocalnetChain().ChainId, 10), + strconv.FormatInt(chains.GoerliLocalnetChain().ChainId, 10), "18", "ETH", "gETH", - strconv.FormatInt(int64(pkg.CoinType_Gas), 10), + strconv.FormatInt(int64(coin.CoinType_Gas), 10), "1000000", }, txArgs...) out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, args) @@ -156,7 +157,7 @@ func BuildSignedDeployETHZRC20( func BuildSignedGasPriceVote(t testing.TB, val *network.Validator, denom string, account authtypes.AccountI) *os.File { cmd := cli.CmdGasPriceVoter() inboundVoterArgs := []string{ - strconv.FormatInt(pkg.GoerliLocalnetChain().ChainId, 10), + strconv.FormatInt(chains.GoerliLocalnetChain().ChainId, 10), "10000000000", "100", "100", @@ -225,7 +226,7 @@ func BuildSignedOutboundVote( "0", valueReceived, status, - strconv.FormatInt(pkg.GoerliLocalnetChain().ChainId, 10), + strconv.FormatInt(chains.GoerliLocalnetChain().ChainId, 10), strconv.FormatUint(nonce, 10), "Zeta", } @@ -252,10 +253,10 @@ func BuildSignedInboundVote(t testing.TB, val *network.Validator, denom string, cmd := cli.CmdCCTXInboundVoter() inboundVoterArgs := []string{ "0x96B05C238b99768F349135de0653b687f9c13fEE", - strconv.FormatInt(pkg.GoerliLocalnetChain().ChainId, 10), + strconv.FormatInt(chains.GoerliLocalnetChain().ChainId, 10), "0x3b9Fe88DE29efD13240829A0c18E9EC7A44C3CA7", "0x96B05C238b99768F349135de0653b687f9c13fEE", - strconv.FormatInt(pkg.GoerliLocalnetChain().ChainId, 10), + strconv.FormatInt(chains.GoerliLocalnetChain().ChainId, 10), "10000000000000000000", message, "0x19398991572a825894b34b904ac1e3692720895351466b5c9e6bb7ae1e21d680", @@ -286,16 +287,16 @@ func GetBallotIdentifier(message string, eventIndex int) string { msg := types.NewMsgVoteOnObservedInboundTx( "", "0x96B05C238b99768F349135de0653b687f9c13fEE", - pkg.GoerliLocalnetChain().ChainId, + chains.GoerliLocalnetChain().ChainId, "0x3b9Fe88DE29efD13240829A0c18E9EC7A44C3CA7", "0x96B05C238b99768F349135de0653b687f9c13fEE", - pkg.GoerliLocalnetChain().ChainId, + chains.GoerliLocalnetChain().ChainId, sdk.NewUint(10000000000000000000), message, "0x19398991572a825894b34b904ac1e3692720895351466b5c9e6bb7ae1e21d680", 100, 250_000, - pkg.CoinType_Zeta, + coin.CoinType_Zeta, "", // #nosec G701 always positive uint(eventIndex), @@ -314,9 +315,9 @@ func GetBallotIdentifierOutBound(nonce uint64, cctxindex, outtxHash, valueReceiv 0, math.NewUintFromString(valueReceived), 0, - pkg.GoerliLocalnetChain().ChainId, + chains.GoerliLocalnetChain().ChainId, nonce, - pkg.CoinType_Zeta, + coin.CoinType_Zeta, ) return msg.Digest() } diff --git a/x/crosschain/keeper/abci.go b/x/crosschain/keeper/abci.go index cf4cee6a24..5a02c53676 100644 --- a/x/crosschain/keeper/abci.go +++ b/x/crosschain/keeper/abci.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/zeta-chain/zetacore/pkg" + zetachains "github.com/zeta-chain/zetacore/pkg/chains" cosmoserrors "cosmossdk.io/errors" "cosmossdk.io/math" @@ -30,7 +30,7 @@ type CheckAndUpdateCctxGasPriceFunc func( // The function returns the number of cctxs updated and the gas price increase flags used func (k Keeper) IterateAndUpdateCctxGasPrice( ctx sdk.Context, - chains []*pkg.Chain, + chains []*zetachains.Chain, updateFunc CheckAndUpdateCctxGasPriceFunc, ) (int, observertypes.GasPriceIncreaseFlags) { // fetch the gas price increase flags or use default @@ -50,7 +50,7 @@ func (k Keeper) IterateAndUpdateCctxGasPrice( IterateChains: for _, chain := range chains { // support only external evm chains - if pkg.IsEVMChain(chain.ChainId) && !pkg.IsZetaChain(chain.ChainId) { + if zetachains.IsEVMChain(chain.ChainId) && !zetachains.IsZetaChain(chain.ChainId) { res, err := k.CctxListPending(sdk.UnwrapSDKContext(ctx), &types.QueryListCctxPendingRequest{ ChainId: chain.ChainId, Limit: gasPriceIncreaseFlags.MaxPendingCctxs, diff --git a/x/crosschain/keeper/abci_test.go b/x/crosschain/keeper/abci_test.go index 0160d45e87..c8ef411f4b 100644 --- a/x/crosschain/keeper/abci_test.go +++ b/x/crosschain/keeper/abci_test.go @@ -9,7 +9,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" testkeeper "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/crosschain/keeper" @@ -42,20 +42,20 @@ func TestKeeper_IterateAndUpdateCctxGasPrice(t *testing.T) { } // add some evm and non-evm chains - supportedChains := []*pkg.Chain{ - {ChainId: pkg.EthChain().ChainId}, - {ChainId: pkg.BtcMainnetChain().ChainId}, - {ChainId: pkg.BscMainnetChain().ChainId}, - {ChainId: pkg.ZetaChainMainnet().ChainId}, + supportedChains := []*chains.Chain{ + {ChainId: chains.EthChain().ChainId}, + {ChainId: chains.BtcMainnetChain().ChainId}, + {ChainId: chains.BscMainnetChain().ChainId}, + {ChainId: chains.ZetaChainMainnet().ChainId}, } // set pending cctx tss := sample.Tss() zk.ObserverKeeper.SetTSS(ctx, tss) - createCctxWithNonceRange(t, ctx, *k, 10, 15, pkg.EthChain().ChainId, tss, zk) - createCctxWithNonceRange(t, ctx, *k, 20, 25, pkg.BtcMainnetChain().ChainId, tss, zk) - createCctxWithNonceRange(t, ctx, *k, 30, 35, pkg.BscMainnetChain().ChainId, tss, zk) - createCctxWithNonceRange(t, ctx, *k, 40, 45, pkg.ZetaChainMainnet().ChainId, tss, zk) + createCctxWithNonceRange(t, ctx, *k, 10, 15, chains.EthChain().ChainId, tss, zk) + createCctxWithNonceRange(t, ctx, *k, 20, 25, chains.BtcMainnetChain().ChainId, tss, zk) + createCctxWithNonceRange(t, ctx, *k, 30, 35, chains.BscMainnetChain().ChainId, tss, zk) + createCctxWithNonceRange(t, ctx, *k, 40, 45, chains.ZetaChainMainnet().ChainId, tss, zk) // set a cctx where the update function should fail to test that the next cctx are not updated but the next chains are failMap[sample.GetCctxIndexFromString("1-12")] = struct{}{} diff --git a/x/crosschain/keeper/cctx.go b/x/crosschain/keeper/cctx.go index 7ff21a32f5..c689e0cc00 100644 --- a/x/crosschain/keeper/cctx.go +++ b/x/crosschain/keeper/cctx.go @@ -6,7 +6,7 @@ import ( "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/x/crosschain/types" observerTypes "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -48,7 +48,7 @@ func (k Keeper) SetCctxAndNonceToCctxAndInTxHashToCctx(ctx sdk.Context, cctx typ Tss: tss.TssPubkey, }) } - if cctx.CctxStatus.Status == types.CctxStatus_Aborted && cctx.GetCurrentOutTxParam().CoinType == pkg.CoinType_Zeta { + if cctx.CctxStatus.Status == types.CctxStatus_Aborted && cctx.GetCurrentOutTxParam().CoinType == coin.CoinType_Zeta { k.AddZetaAbortedAmount(ctx, GetAbortedAmount(cctx)) } } diff --git a/x/crosschain/keeper/cctx_test.go b/x/crosschain/keeper/cctx_test.go index 91e9e6cdee..7f51dca642 100644 --- a/x/crosschain/keeper/cctx_test.go +++ b/x/crosschain/keeper/cctx_test.go @@ -8,6 +8,7 @@ import ( "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/types/query" "github.com/stretchr/testify/require" + "github.com/zeta-chain/zetacore/pkg/coin" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/crosschain/keeper" @@ -15,7 +16,6 @@ import ( "google.golang.org/grpc/status" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" ) @@ -48,7 +48,7 @@ func createNCctx(keeper *keeper.Keeper, ctx sdk.Context, n int) []types.CrossCha SenderChainId: int64(i), TxOrigin: fmt.Sprintf("%d", i), Asset: fmt.Sprintf("%d", i), - CoinType: pkg.CoinType_Zeta, + CoinType: coin.CoinType_Zeta, InboundTxObservedHash: fmt.Sprintf("%d", i), InboundTxObservedExternalHeight: uint64(i), InboundTxFinalizedZetaHeight: uint64(i), diff --git a/x/crosschain/keeper/cctx_utils.go b/x/crosschain/keeper/cctx_utils.go index e313bf528a..0fde2fb2e6 100644 --- a/x/crosschain/keeper/cctx_utils.go +++ b/x/crosschain/keeper/cctx_utils.go @@ -9,7 +9,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ethcommon "github.com/ethereum/go-ethereum/common" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/x/crosschain/types" fungibletypes "github.com/zeta-chain/zetacore/x/fungible/types" zetaObserverTypes "github.com/zeta-chain/zetacore/x/observer/types" @@ -59,7 +59,7 @@ func (k Keeper) GetRevertGasLimit(ctx sdk.Context, cctx types.CrossChainTx) (uin return 0, nil } - if cctx.InboundTxParams.CoinType == pkg.CoinType_Gas { + if cctx.InboundTxParams.CoinType == coin.CoinType_Gas { // get the gas limit of the gas token fc, found := k.fungibleKeeper.GetGasCoinForForeignCoin(ctx, cctx.InboundTxParams.SenderChainId) if !found { @@ -70,7 +70,7 @@ func (k Keeper) GetRevertGasLimit(ctx sdk.Context, cctx types.CrossChainTx) (uin return 0, errors.Wrap(fungibletypes.ErrContractCall, err.Error()) } return gasLimit.Uint64(), nil - } else if cctx.InboundTxParams.CoinType == pkg.CoinType_ERC20 { + } else if cctx.InboundTxParams.CoinType == coin.CoinType_ERC20 { // get the gas limit of the associated asset fc, found := k.fungibleKeeper.GetForeignCoinFromAsset(ctx, cctx.InboundTxParams.Asset, cctx.InboundTxParams.SenderChainId) if !found { diff --git a/x/crosschain/keeper/cctx_utils_test.go b/x/crosschain/keeper/cctx_utils_test.go index 5a915836f3..c637cc4cc9 100644 --- a/x/crosschain/keeper/cctx_utils_test.go +++ b/x/crosschain/keeper/cctx_utils_test.go @@ -6,7 +6,7 @@ import ( sdkmath "cosmossdk.io/math" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/coin" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" crosschainkeeper "github.com/zeta-chain/zetacore/x/crosschain/keeper" @@ -28,7 +28,7 @@ func TestGetRevertGasLimit(t *testing.T) { gasLimit, err := k.GetRevertGasLimit(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_Zeta, + CoinType: coin.CoinType_Zeta, }}) require.NoError(t, err) require.Equal(t, uint64(0), gasLimit) @@ -47,7 +47,7 @@ func TestGetRevertGasLimit(t *testing.T) { gasLimit, err := k.GetRevertGasLimit(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_Gas, + CoinType: coin.CoinType_Gas, SenderChainId: chainID, }}) require.NoError(t, err) @@ -77,7 +77,7 @@ func TestGetRevertGasLimit(t *testing.T) { gasLimit, err := k.GetRevertGasLimit(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, SenderChainId: chainID, Asset: asset, }}) @@ -90,7 +90,7 @@ func TestGetRevertGasLimit(t *testing.T) { _, err := k.GetRevertGasLimit(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_Gas, + CoinType: coin.CoinType_Gas, SenderChainId: 999999, }}) require.ErrorIs(t, err, types.ErrForeignCoinNotFound) @@ -105,13 +105,13 @@ func TestGetRevertGasLimit(t *testing.T) { zk.FungibleKeeper.SetForeignCoins(ctx, fungibletypes.ForeignCoins{ Zrc20ContractAddress: sample.EthAddress().String(), ForeignChainId: chainID, - CoinType: pkg.CoinType_Gas, + CoinType: coin.CoinType_Gas, }) // no contract deployed therefore will fail _, err := k.GetRevertGasLimit(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_Gas, + CoinType: coin.CoinType_Gas, SenderChainId: chainID, }}) require.ErrorIs(t, err, fungibletypes.ErrContractCall) @@ -122,7 +122,7 @@ func TestGetRevertGasLimit(t *testing.T) { _, err := k.GetRevertGasLimit(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, SenderChainId: 999999, }}) require.ErrorIs(t, err, types.ErrForeignCoinNotFound) @@ -138,14 +138,14 @@ func TestGetRevertGasLimit(t *testing.T) { zk.FungibleKeeper.SetForeignCoins(ctx, fungibletypes.ForeignCoins{ Zrc20ContractAddress: sample.EthAddress().String(), ForeignChainId: chainID, - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, Asset: asset, }) // no contract deployed therefore will fail _, err := k.GetRevertGasLimit(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, SenderChainId: chainID, Asset: asset, }}) diff --git a/x/crosschain/keeper/events.go b/x/crosschain/keeper/events.go index 2008fc5413..6943d77723 100644 --- a/x/crosschain/keeper/events.go +++ b/x/crosschain/keeper/events.go @@ -3,7 +3,7 @@ package keeper import ( "strconv" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/zeta-chain/zetacore/x/crosschain/types" @@ -15,13 +15,13 @@ func EmitEventInboundFinalized(ctx sdk.Context, cctx *types.CrossChainTx) { MsgTypeUrl: sdk.MsgTypeURL(&types.MsgVoteOnObservedInboundTx{}), CctxIndex: cctx.Index, Sender: cctx.InboundTxParams.Sender, - SenderChain: pkg.GetChainFromChainID(cctx.InboundTxParams.SenderChainId).ChainName.String(), + SenderChain: chains.GetChainFromChainID(cctx.InboundTxParams.SenderChainId).ChainName.String(), TxOrgin: cctx.InboundTxParams.TxOrigin, Asset: cctx.InboundTxParams.Asset, InTxHash: cctx.InboundTxParams.InboundTxObservedHash, InBlockHeight: strconv.FormatUint(cctx.InboundTxParams.InboundTxObservedExternalHeight, 10), Receiver: currentOutParam.Receiver, - ReceiverChain: pkg.GetChainFromChainID(currentOutParam.ReceiverChainId).ChainName.String(), + ReceiverChain: chains.GetChainFromChainID(currentOutParam.ReceiverChainId).ChainName.String(), Amount: cctx.InboundTxParams.Amount.String(), RelayedMessage: cctx.RelayedMessage, NewStatus: cctx.CctxStatus.Status.String(), diff --git a/x/crosschain/keeper/evm_deposit.go b/x/crosschain/keeper/evm_deposit.go index 731485c84a..96be91a5d4 100644 --- a/x/crosschain/keeper/evm_deposit.go +++ b/x/crosschain/keeper/evm_deposit.go @@ -10,7 +10,8 @@ import ( "github.com/pkg/errors" tmbytes "github.com/tendermint/tendermint/libs/bytes" tmtypes "github.com/tendermint/tendermint/types" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/x/crosschain/types" fungibletypes "github.com/zeta-chain/zetacore/x/fungible/types" ) @@ -35,7 +36,7 @@ func (k Keeper) HandleEVMDeposit( cctx.GetCurrentOutTxParam().OutboundTxObservedExternalHeight = uint64(ctx.BlockHeight()) } - if msg.CoinType == pkg.CoinType_Zeta { + if msg.CoinType == coin.CoinType_Zeta { // if coin type is Zeta, this is a deposit ZETA to zEVM cctx. err := k.fungibleKeeper.DepositCoinZeta(ctx, to, msg.Amount.BigInt()) if err != nil { @@ -43,7 +44,7 @@ func (k Keeper) HandleEVMDeposit( } } else { // cointype is Gas or ERC20; then it could be a ZRC20 deposit/depositAndCall cctx. - parsedAddress, data, err := pkg.ParseAddressAndData(msg.Message) + parsedAddress, data, err := chains.ParseAddressAndData(msg.Message) if err != nil { return false, errors.Wrap(types.ErrUnableToParseAddress, err.Error()) } @@ -51,7 +52,7 @@ func (k Keeper) HandleEVMDeposit( to = parsedAddress } - from, err := pkg.DecodeAddressFromChainID(senderChainID, msg.Sender) + from, err := chains.DecodeAddressFromChainID(senderChainID, msg.Sender) if err != nil { return false, fmt.Errorf("HandleEVMDeposit: unable to decode address: %s", err.Error()) } diff --git a/x/crosschain/keeper/evm_deposit_test.go b/x/crosschain/keeper/evm_deposit_test.go index fd294a3fd2..15ca00a62a 100644 --- a/x/crosschain/keeper/evm_deposit_test.go +++ b/x/crosschain/keeper/evm_deposit_test.go @@ -10,7 +10,7 @@ import ( evmtypes "github.com/evmos/ethermint/x/evm/types" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/coin" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/crosschain/types" @@ -37,7 +37,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { types.MsgVoteOnObservedInboundTx{ Receiver: receiver.String(), Amount: math.NewUintFromBigInt(amount), - CoinType: pkg.CoinType_Zeta, + CoinType: coin.CoinType_Zeta, }, 0, ) @@ -66,7 +66,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { types.MsgVoteOnObservedInboundTx{ Receiver: receiver.String(), Amount: math.NewUintFromBigInt(amount), - CoinType: pkg.CoinType_Zeta, + CoinType: coin.CoinType_Zeta, }, 0, ) @@ -96,7 +96,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { amount, senderChain, mock.Anything, - pkg.CoinType_ERC20, + coin.CoinType_ERC20, mock.Anything, ).Return(&evmtypes.MsgEthereumTxResponse{}, false, nil) @@ -108,7 +108,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { Sender: sample.EthAddress().String(), Receiver: receiver.String(), Amount: math.NewUintFromBigInt(amount), - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, Message: "", Asset: "", }, @@ -141,7 +141,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { amount, senderChain, mock.Anything, - pkg.CoinType_ERC20, + coin.CoinType_ERC20, mock.Anything, ).Return(&evmtypes.MsgEthereumTxResponse{}, false, errDeposit) @@ -153,7 +153,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { Sender: sample.EthAddress().String(), Receiver: receiver.String(), Amount: math.NewUintFromBigInt(amount), - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, Message: "", Asset: "", }, @@ -186,7 +186,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { amount, senderChain, mock.Anything, - pkg.CoinType_ERC20, + coin.CoinType_ERC20, mock.Anything, ).Return(&evmtypes.MsgEthereumTxResponse{VmError: "reverted"}, false, errDeposit) @@ -198,7 +198,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { Sender: sample.EthAddress().String(), Receiver: receiver.String(), Amount: math.NewUintFromBigInt(amount), - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, Message: "", Asset: "", }, @@ -230,7 +230,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { amount, senderChain, mock.Anything, - pkg.CoinType_ERC20, + coin.CoinType_ERC20, mock.Anything, ).Return(&evmtypes.MsgEthereumTxResponse{}, false, fungibletypes.ErrForeignCoinCapReached) @@ -242,7 +242,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { Sender: sample.EthAddress().String(), Receiver: receiver.String(), Amount: math.NewUintFromBigInt(amount), - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, Message: "", Asset: "", }, @@ -274,7 +274,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { amount, senderChain, mock.Anything, - pkg.CoinType_ERC20, + coin.CoinType_ERC20, mock.Anything, ).Return(&evmtypes.MsgEthereumTxResponse{}, false, fungibletypes.ErrPausedZRC20) @@ -286,7 +286,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { Sender: sample.EthAddress().String(), Receiver: receiver.String(), Amount: math.NewUintFromBigInt(amount), - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, Message: "", Asset: "", }, @@ -316,7 +316,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { amount, senderChain, mock.Anything, - pkg.CoinType_ERC20, + coin.CoinType_ERC20, mock.Anything, ).Return(&evmtypes.MsgEthereumTxResponse{}, false, fungibletypes.ErrCallNonContract) @@ -328,7 +328,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { Sender: sample.EthAddress().String(), Receiver: receiver.String(), Amount: math.NewUintFromBigInt(amount), - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, Message: "", Asset: "", }, @@ -352,7 +352,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { Sender: sample.EthAddress().String(), Receiver: sample.EthAddress().String(), Amount: math.NewUint(42), - CoinType: pkg.CoinType_Gas, + CoinType: coin.CoinType_Gas, Message: "not_hex", Asset: "", }, @@ -382,7 +382,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { amount, senderChain, data, - pkg.CoinType_ERC20, + coin.CoinType_ERC20, mock.Anything, ).Return(&evmtypes.MsgEthereumTxResponse{}, false, nil) @@ -393,7 +393,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { Sender: sample.EthAddress().String(), Receiver: sample.EthAddress().String(), Amount: math.NewUintFromBigInt(amount), - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, Message: receiver.Hex()[2:] + "DEADBEEF", Asset: "", }, @@ -425,7 +425,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { amount, senderChain, data, - pkg.CoinType_ERC20, + coin.CoinType_ERC20, mock.Anything, ).Return(&evmtypes.MsgEthereumTxResponse{}, false, nil) @@ -436,7 +436,7 @@ func TestMsgServer_HandleEVMDeposit(t *testing.T) { Sender: sample.EthAddress().String(), Receiver: receiver.String(), Amount: math.NewUintFromBigInt(amount), - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, Message: "DEADBEEF", Asset: "", }, diff --git a/x/crosschain/keeper/evm_hooks.go b/x/crosschain/keeper/evm_hooks.go index f2932451ef..e5d85aba2a 100644 --- a/x/crosschain/keeper/evm_hooks.go +++ b/x/crosschain/keeper/evm_hooks.go @@ -17,7 +17,8 @@ import ( connectorzevm "github.com/zeta-chain/protocol-contracts/pkg/contracts/zevm/connectorzevm.sol" zrc20 "github.com/zeta-chain/protocol-contracts/pkg/contracts/zevm/zrc20.sol" "github.com/zeta-chain/zetacore/cmd/zetacored/config" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/x/crosschain/types" fungibletypes "github.com/zeta-chain/zetacore/x/fungible/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" @@ -137,7 +138,7 @@ func (k Keeper) ProcessZRC20WithdrawalEvent(ctx sdk.Context, event *zrc20.ZRC20W if receiverChain == nil { return errorsmod.Wrapf(observertypes.ErrSupportedChains, "chain with chainID %d not supported", foreignCoin.ForeignChainId) } - senderChain, err := pkg.ZetaChainFromChainID(ctx.ChainID()) + senderChain, err := chains.ZetaChainFromChainID(ctx.ChainID()) if err != nil { return fmt.Errorf("ProcessZRC20WithdrawalEvent: failed to convert chainID: %s", err.Error()) } @@ -224,7 +225,7 @@ func (k Keeper) ProcessZetaSentEvent(ctx sdk.Context, event *connectorzevm.ZetaC return types.ErrUnableToSendCoinType } toAddr := "0x" + hex.EncodeToString(event.DestinationAddress) - senderChain, err := pkg.ZetaChainFromChainID(ctx.ChainID()) + senderChain, err := chains.ZetaChainFromChainID(ctx.ChainID()) if err != nil { return fmt.Errorf("ProcessZetaSentEvent: failed to convert chainID: %s", err.Error()) } @@ -242,7 +243,7 @@ func (k Keeper) ProcessZetaSentEvent(ctx sdk.Context, event *connectorzevm.ZetaC event.Raw.TxHash.String(), event.Raw.BlockNumber, 90000, - pkg.CoinType_Zeta, + coin.CoinType_Zeta, "", event.Raw.Index, ) @@ -273,7 +274,7 @@ func (k Keeper) ProcessZetaSentEvent(ctx sdk.Context, event *connectorzevm.ZetaC return k.ProcessCCTX(ctx, cctx, receiverChain) } -func (k Keeper) ProcessCCTX(ctx sdk.Context, cctx types.CrossChainTx, receiverChain *pkg.Chain) error { +func (k Keeper) ProcessCCTX(ctx sdk.Context, cctx types.CrossChainTx, receiverChain *chains.Chain) error { inCctxIndex, ok := ctx.Value("inCctxIndex").(string) if ok { cctx.InboundTxParams.InboundTxObservedHash = inCctxIndex @@ -310,11 +311,11 @@ func ParseZRC20WithdrawalEvent(log ethtypes.Log) (*zrc20.ZRC20Withdrawal, error) func ValidateZrc20WithdrawEvent(event *zrc20.ZRC20Withdrawal, chainID int64) error { // The event was parsed; that means the user has deposited tokens to the contract. - if pkg.IsBitcoinChain(chainID) { + if chains.IsBitcoinChain(chainID) { if event.Value.Cmp(big.NewInt(0)) <= 0 { return fmt.Errorf("ParseZRC20WithdrawalEvent: invalid amount %s", event.Value.String()) } - addr, err := pkg.DecodeBtcAddress(string(event.To), chainID) + addr, err := chains.DecodeBtcAddress(string(event.To), chainID) if err != nil { return fmt.Errorf("ParseZRC20WithdrawalEvent: invalid address %s: %s", event.To, err) } diff --git a/x/crosschain/keeper/evm_hooks_test.go b/x/crosschain/keeper/evm_hooks_test.go index 1c48059861..85676457cf 100644 --- a/x/crosschain/keeper/evm_hooks_test.go +++ b/x/crosschain/keeper/evm_hooks_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" "github.com/zeta-chain/zetacore/cmd/zetacored/config" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" crosschainkeeper "github.com/zeta-chain/zetacore/x/crosschain/keeper" @@ -22,7 +22,7 @@ import ( observertypes "github.com/zeta-chain/zetacore/x/observer/types" ) -func SetupStateForProcessLogsZetaSent(t *testing.T, ctx sdk.Context, k *crosschainkeeper.Keeper, zk keepertest.ZetaKeepers, sdkk keepertest.SDKKeepers, chain pkg.Chain) { +func SetupStateForProcessLogsZetaSent(t *testing.T, ctx sdk.Context, k *crosschainkeeper.Keeper, zk keepertest.ZetaKeepers, sdkk keepertest.SDKKeepers, chain chains.Chain) { assetAddress := sample.EthAddress().String() gasZRC20 := setupGasCoin(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper, chain.ChainId, "ethereum", "ETH") zrc20Addr := deployZRC20( @@ -53,7 +53,7 @@ func SetupStateForProcessLogsZetaSent(t *testing.T, ctx sdk.Context, k *crosscha ) } -func SetupStateForProcessLogs(t *testing.T, ctx sdk.Context, k *crosschainkeeper.Keeper, zk keepertest.ZetaKeepers, sdkk keepertest.SDKKeepers, chain pkg.Chain) { +func SetupStateForProcessLogs(t *testing.T, ctx sdk.Context, k *crosschainkeeper.Keeper, zk keepertest.ZetaKeepers, sdkk keepertest.SDKKeepers, chain chains.Chain) { deploySystemContracts(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper) tss := sample.Tss() @@ -134,7 +134,7 @@ func TestValidateZrc20WithdrawEvent(t *testing.T) { t.Run("successfully validate a valid event", func(t *testing.T) { btcMainNetWithdrawalEvent, err := crosschainkeeper.ParseZRC20WithdrawalEvent(*sample.GetValidZRC20WithdrawToBTC(t).Logs[3]) require.NoError(t, err) - err = crosschainkeeper.ValidateZrc20WithdrawEvent(btcMainNetWithdrawalEvent, pkg.BtcMainnetChain().ChainId) + err = crosschainkeeper.ValidateZrc20WithdrawEvent(btcMainNetWithdrawalEvent, chains.BtcMainnetChain().ChainId) require.NoError(t, err) }) @@ -142,14 +142,14 @@ func TestValidateZrc20WithdrawEvent(t *testing.T) { btcMainNetWithdrawalEvent, err := crosschainkeeper.ParseZRC20WithdrawalEvent(*sample.GetValidZRC20WithdrawToBTC(t).Logs[3]) require.NoError(t, err) btcMainNetWithdrawalEvent.Value = big.NewInt(0) - err = crosschainkeeper.ValidateZrc20WithdrawEvent(btcMainNetWithdrawalEvent, pkg.BtcMainnetChain().ChainId) + err = crosschainkeeper.ValidateZrc20WithdrawEvent(btcMainNetWithdrawalEvent, chains.BtcMainnetChain().ChainId) require.ErrorContains(t, err, "ParseZRC20WithdrawalEvent: invalid amount") }) t.Run("unable to validate a event with an invalid chain ID", func(t *testing.T) { btcMainNetWithdrawalEvent, err := crosschainkeeper.ParseZRC20WithdrawalEvent(*sample.GetValidZRC20WithdrawToBTC(t).Logs[3]) require.NoError(t, err) - err = crosschainkeeper.ValidateZrc20WithdrawEvent(btcMainNetWithdrawalEvent, pkg.BtcTestNetChain().ChainId) + err = crosschainkeeper.ValidateZrc20WithdrawEvent(btcMainNetWithdrawalEvent, chains.BtcTestNetChain().ChainId) require.ErrorContains(t, err, "address is not for network testnet3") }) @@ -157,7 +157,7 @@ func TestValidateZrc20WithdrawEvent(t *testing.T) { btcMainNetWithdrawalEvent, err := crosschainkeeper.ParseZRC20WithdrawalEvent(*sample.GetValidZRC20WithdrawToBTC(t).Logs[3]) require.NoError(t, err) btcMainNetWithdrawalEvent.To = []byte("1EYVvXLusCxtVuEwoYvWRyN5EZTXwPVvo3") - err = crosschainkeeper.ValidateZrc20WithdrawEvent(btcMainNetWithdrawalEvent, pkg.BtcTestNetChain().ChainId) + err = crosschainkeeper.ValidateZrc20WithdrawEvent(btcMainNetWithdrawalEvent, chains.BtcTestNetChain().ChainId) require.ErrorContains(t, err, "decode address failed: unknown address type") }) } @@ -167,7 +167,7 @@ func TestKeeper_ProcessZRC20WithdrawalEvent(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := pkg.BtcMainnetChain() + chain := chains.BtcMainnetChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -193,7 +193,7 @@ func TestKeeper_ProcessZRC20WithdrawalEvent(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := pkg.EthChain() + chain := chains.EthChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -219,7 +219,7 @@ func TestKeeper_ProcessZRC20WithdrawalEvent(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := pkg.EthChain() + chain := chains.EthChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -240,7 +240,7 @@ func TestKeeper_ProcessZRC20WithdrawalEvent(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := pkg.EthChain() + chain := chains.EthChain() chainID := chain.ChainId SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -261,7 +261,7 @@ func TestKeeper_ProcessZRC20WithdrawalEvent(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := pkg.EthChain() + chain := chains.EthChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -284,7 +284,7 @@ func TestKeeper_ProcessZRC20WithdrawalEvent(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := pkg.EthChain() + chain := chains.EthChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -310,7 +310,7 @@ func TestKeeper_ProcessZRC20WithdrawalEvent(t *testing.T) { fungibleMock := keepertest.GetCrosschainFungibleMock(t, k) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := pkg.EthChain() + chain := chains.EthChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -335,7 +335,7 @@ func TestKeeper_ProcessZRC20WithdrawalEvent(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := pkg.EthChain() + chain := chains.EthChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -358,7 +358,7 @@ func TestKeeper_ProcessZRC20WithdrawalEvent(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := pkg.EthChain() + chain := chains.EthChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -393,7 +393,7 @@ func TestKeeper_ParseZetaSentEvent(t *testing.T) { require.Nil(t, event) continue } - require.Equal(t, pkg.EthChain().ChainId, event.DestinationChainId.Int64()) + require.Equal(t, chains.EthChain().ChainId, event.DestinationChainId.Int64()) require.Equal(t, "70000000000000000000", event.ZetaValueAndGas.String()) require.Equal(t, "0x60983881bdf302dcfa96603A58274D15D5966209", event.SourceTxOriginAddress.String()) require.Equal(t, "0xF0a3F93Ed1B126142E61423F9546bf1323Ff82DF", event.ZetaTxSenderAddress.String()) @@ -430,7 +430,7 @@ func TestKeeper_ProcessZetaSentEvent(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := pkg.EthChain() + chain := chains.EthChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) @@ -452,7 +452,7 @@ func TestKeeper_ProcessZetaSentEvent(t *testing.T) { cctxList := k.GetAllCrossChainTx(ctx) require.Len(t, cctxList, 1) require.Equal(t, strings.Compare("0x60983881bdf302dcfa96603a58274d15d5966209", cctxList[0].GetCurrentOutTxParam().Receiver), 0) - require.Equal(t, pkg.EthChain().ChainId, cctxList[0].GetCurrentOutTxParam().ReceiverChainId) + require.Equal(t, chains.EthChain().ChainId, cctxList[0].GetCurrentOutTxParam().ReceiverChainId) require.Equal(t, emittingContract.Hex(), cctxList[0].InboundTxParams.Sender) require.Equal(t, txOrigin.Hex(), cctxList[0].InboundTxParams.TxOrigin) }) @@ -461,7 +461,7 @@ func TestKeeper_ProcessZetaSentEvent(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := pkg.EthChain() + chain := chains.EthChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -481,7 +481,7 @@ func TestKeeper_ProcessZetaSentEvent(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := pkg.EthChain() + chain := chains.EthChain() SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) SetupStateForProcessLogsZetaSent(t, ctx, k, zk, sdkk, chain) @@ -503,7 +503,7 @@ func TestKeeper_ProcessZetaSentEvent(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := pkg.EthChain() + chain := chains.EthChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -528,7 +528,7 @@ func TestKeeper_ProcessZetaSentEvent(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := pkg.EthChain() + chain := chains.EthChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -551,7 +551,7 @@ func TestKeeper_ProcessZetaSentEvent(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := pkg.EthChain() + chain := chains.EthChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) @@ -583,7 +583,7 @@ func TestKeeper_ProcessLogs(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := pkg.BtcMainnetChain() + chain := chains.BtcMainnetChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -609,7 +609,7 @@ func TestKeeper_ProcessLogs(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := pkg.EthChain() + chain := chains.EthChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -633,7 +633,7 @@ func TestKeeper_ProcessLogs(t *testing.T) { cctxList := k.GetAllCrossChainTx(ctx) require.Len(t, cctxList, 1) require.Equal(t, strings.Compare("0x60983881bdf302dcfa96603a58274d15d5966209", cctxList[0].GetCurrentOutTxParam().Receiver), 0) - require.Equal(t, pkg.EthChain().ChainId, cctxList[0].GetCurrentOutTxParam().ReceiverChainId) + require.Equal(t, chains.EthChain().ChainId, cctxList[0].GetCurrentOutTxParam().ReceiverChainId) require.Equal(t, emittingContract.Hex(), cctxList[0].InboundTxParams.Sender) require.Equal(t, txOrigin.Hex(), cctxList[0].InboundTxParams.TxOrigin) }) @@ -652,7 +652,7 @@ func TestKeeper_ProcessLogs(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := pkg.BtcMainnetChain() + chain := chains.BtcMainnetChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -673,7 +673,7 @@ func TestKeeper_ProcessLogs(t *testing.T) { t.Run("no cctx created for logs containing proper event but not emitted from a known ZRC20 contract", func(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := pkg.BtcMainnetChain() + chain := chains.BtcMainnetChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -694,7 +694,7 @@ func TestKeeper_ProcessLogs(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := pkg.BtcMainnetChain() + chain := chains.BtcMainnetChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -718,7 +718,7 @@ func TestKeeper_ProcessLogs(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := pkg.BtcMainnetChain() + chain := chains.BtcMainnetChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) @@ -739,7 +739,7 @@ func TestKeeper_ProcessLogs(t *testing.T) { k, ctx, sdkk, zk := keepertest.CrosschainKeeper(t) k.GetAuthKeeper().GetModuleAccount(ctx, fungibletypes.ModuleName) - chain := pkg.BtcMainnetChain() + chain := chains.BtcMainnetChain() chainID := chain.ChainId setSupportedChain(ctx, zk, chainID) SetupStateForProcessLogs(t, ctx, k, zk, sdkk, chain) diff --git a/x/crosschain/keeper/gas_payment.go b/x/crosschain/keeper/gas_payment.go index c025bde196..6a9b957f16 100644 --- a/x/crosschain/keeper/gas_payment.go +++ b/x/crosschain/keeper/gas_payment.go @@ -11,7 +11,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ethcommon "github.com/ethereum/go-ethereum/common" "github.com/zeta-chain/zetacore/cmd/zetacored/config" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/x/crosschain/types" fungibletypes "github.com/zeta-chain/zetacore/x/fungible/types" zetaObserverTypes "github.com/zeta-chain/zetacore/x/observer/types" @@ -29,11 +29,11 @@ func (k Keeper) PayGasAndUpdateCctx( ) error { // Dispatch to the correct function based on the coin type switch cctx.InboundTxParams.CoinType { - case pkg.CoinType_Zeta: + case coin.CoinType_Zeta: return k.PayGasInZetaAndUpdateCctx(ctx, chainID, cctx, inputAmount, noEthereumTxEvent) - case pkg.CoinType_Gas: + case coin.CoinType_Gas: return k.PayGasNativeAndUpdateCctx(ctx, chainID, cctx, inputAmount) - case pkg.CoinType_ERC20: + case coin.CoinType_ERC20: return k.PayGasInERC20AndUpdateCctx(ctx, chainID, cctx, inputAmount, noEthereumTxEvent) default: // can't pay gas with coin type @@ -90,7 +90,7 @@ func (k Keeper) PayGasNativeAndUpdateCctx( inputAmount math.Uint, ) error { // preliminary checks - if cctx.InboundTxParams.CoinType != pkg.CoinType_Gas { + if cctx.InboundTxParams.CoinType != coin.CoinType_Gas { return cosmoserrors.Wrapf(types.ErrInvalidCoinType, "can't pay gas in native gas with %s", cctx.InboundTxParams.CoinType.String()) } if chain := k.zetaObserverKeeper.GetSupportedChainFromChainID(ctx, chainID); chain == nil { @@ -137,7 +137,7 @@ func (k Keeper) PayGasInERC20AndUpdateCctx( noEthereumTxEvent bool, ) error { // preliminary checks - if cctx.InboundTxParams.CoinType != pkg.CoinType_ERC20 { + if cctx.InboundTxParams.CoinType != coin.CoinType_ERC20 { return cosmoserrors.Wrapf(types.ErrInvalidCoinType, "can't pay gas in erc20 with %s", cctx.InboundTxParams.CoinType.String()) } @@ -264,7 +264,7 @@ func (k Keeper) PayGasInZetaAndUpdateCctx( noEthereumTxEvent bool, ) error { // preliminary checks - if cctx.InboundTxParams.CoinType != pkg.CoinType_Zeta { + if cctx.InboundTxParams.CoinType != coin.CoinType_Zeta { return cosmoserrors.Wrapf(types.ErrInvalidCoinType, "can't pay gas in zeta with %s", cctx.InboundTxParams.CoinType.String()) } diff --git a/x/crosschain/keeper/gas_payment_test.go b/x/crosschain/keeper/gas_payment_test.go index c667fb3a3b..1ccb31c937 100644 --- a/x/crosschain/keeper/gas_payment_test.go +++ b/x/crosschain/keeper/gas_payment_test.go @@ -4,13 +4,14 @@ import ( "math/big" "testing" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/testutil/sample" observertypes "github.com/zeta-chain/zetacore/x/observer/types" "cosmossdk.io/math" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" testkeeper "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/x/crosschain/types" fungibletypes "github.com/zeta-chain/zetacore/x/fungible/types" @@ -47,11 +48,11 @@ func TestKeeper_PayGasNativeAndUpdateCctx(t *testing.T) { // create a cctx reverted from zeta cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_Gas, + CoinType: coin.CoinType_Gas, }, OutboundTxParams: []*types.OutboundTxParams{ { - ReceiverChainId: pkg.ZetaPrivnetChain().ChainId, + ReceiverChainId: chains.ZetaPrivnetChain().ChainId, }, { ReceiverChainId: chainID, @@ -73,7 +74,7 @@ func TestKeeper_PayGasNativeAndUpdateCctx(t *testing.T) { chainID := getValidEthChainID(t) cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_Zeta, + CoinType: coin.CoinType_Zeta, }, } err := k.PayGasNativeAndUpdateCctx(ctx, chainID, &cctx, math.NewUint(inputAmount)) @@ -84,7 +85,7 @@ func TestKeeper_PayGasNativeAndUpdateCctx(t *testing.T) { k, ctx, _, _ := testkeeper.CrosschainKeeper(t) cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_Gas, + CoinType: coin.CoinType_Gas, }, } err := k.PayGasNativeAndUpdateCctx(ctx, 999999, &cctx, math.NewUint(inputAmount)) @@ -104,11 +105,11 @@ func TestKeeper_PayGasNativeAndUpdateCctx(t *testing.T) { // create a cctx reverted from zeta cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_Gas, + CoinType: coin.CoinType_Gas, }, OutboundTxParams: []*types.OutboundTxParams{ { - ReceiverChainId: pkg.ZetaPrivnetChain().ChainId, + ReceiverChainId: chains.ZetaPrivnetChain().ChainId, }, { ReceiverChainId: chainID, @@ -141,11 +142,11 @@ func TestKeeper_PayGasNativeAndUpdateCctx(t *testing.T) { cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_Gas, + CoinType: coin.CoinType_Gas, }, OutboundTxParams: []*types.OutboundTxParams{ { - ReceiverChainId: pkg.ZetaPrivnetChain().ChainId, + ReceiverChainId: chains.ZetaPrivnetChain().ChainId, }, { ReceiverChainId: chainID, @@ -202,12 +203,12 @@ func TestKeeper_PayGasInERC20AndUpdateCctx(t *testing.T) { // create a cctx reverted from zeta cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, Asset: assetAddress, }, OutboundTxParams: []*types.OutboundTxParams{ { - ReceiverChainId: pkg.ZetaPrivnetChain().ChainId, + ReceiverChainId: chains.ZetaPrivnetChain().ChainId, }, { ReceiverChainId: chainID, @@ -234,7 +235,7 @@ func TestKeeper_PayGasInERC20AndUpdateCctx(t *testing.T) { chainID := getValidEthChainID(t) cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_Gas, + CoinType: coin.CoinType_Gas, }, } err := k.PayGasInERC20AndUpdateCctx(ctx, chainID, &cctx, math.NewUint(inputAmount), false) @@ -245,7 +246,7 @@ func TestKeeper_PayGasInERC20AndUpdateCctx(t *testing.T) { k, ctx, _, _ := testkeeper.CrosschainKeeper(t) cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, }, } err := k.PayGasInERC20AndUpdateCctx(ctx, 999999, &cctx, math.NewUint(inputAmount), false) @@ -265,11 +266,11 @@ func TestKeeper_PayGasInERC20AndUpdateCctx(t *testing.T) { // create a cctx reverted from zeta cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, }, OutboundTxParams: []*types.OutboundTxParams{ { - ReceiverChainId: pkg.ZetaPrivnetChain().ChainId, + ReceiverChainId: chains.ZetaPrivnetChain().ChainId, }, { ReceiverChainId: chainID, @@ -306,12 +307,12 @@ func TestKeeper_PayGasInERC20AndUpdateCctx(t *testing.T) { // create a cctx reverted from zeta cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, Asset: assetAddress, }, OutboundTxParams: []*types.OutboundTxParams{ { - ReceiverChainId: pkg.ZetaPrivnetChain().ChainId, + ReceiverChainId: chains.ZetaPrivnetChain().ChainId, }, { ReceiverChainId: chainID, @@ -358,12 +359,12 @@ func TestKeeper_PayGasInERC20AndUpdateCctx(t *testing.T) { // create a cctx reverted from zeta cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, Asset: assetAddress, }, OutboundTxParams: []*types.OutboundTxParams{ { - ReceiverChainId: pkg.ZetaPrivnetChain().ChainId, + ReceiverChainId: chains.ZetaPrivnetChain().ChainId, }, { ReceiverChainId: chainID, @@ -416,12 +417,12 @@ func TestKeeper_PayGasInERC20AndUpdateCctx(t *testing.T) { // create a cctx reverted from zeta cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, Asset: assetAddress, }, OutboundTxParams: []*types.OutboundTxParams{ { - ReceiverChainId: pkg.ZetaPrivnetChain().ChainId, + ReceiverChainId: chains.ZetaPrivnetChain().ChainId, }, { ReceiverChainId: chainID, @@ -461,7 +462,7 @@ func TestKeeper_PayGasInZetaAndUpdateCctx(t *testing.T) { // create a cctx reverted from zeta cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_Zeta, + CoinType: coin.CoinType_Zeta, }, OutboundTxParams: []*types.OutboundTxParams{ { @@ -487,7 +488,7 @@ func TestKeeper_PayGasInZetaAndUpdateCctx(t *testing.T) { // can call with undefined zeta fees cctx = types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_Zeta, + CoinType: coin.CoinType_Zeta, }, OutboundTxParams: []*types.OutboundTxParams{ { @@ -512,7 +513,7 @@ func TestKeeper_PayGasInZetaAndUpdateCctx(t *testing.T) { chainID := getValidEthChainID(t) cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_Gas, + CoinType: coin.CoinType_Gas, }, } err := k.PayGasInZetaAndUpdateCctx(ctx, chainID, &cctx, math.NewUint(100000), false) @@ -523,7 +524,7 @@ func TestKeeper_PayGasInZetaAndUpdateCctx(t *testing.T) { k, ctx, _, _ := testkeeper.CrosschainKeeper(t) cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_Zeta, + CoinType: coin.CoinType_Zeta, }, } err := k.PayGasInZetaAndUpdateCctx(ctx, 999999, &cctx, math.NewUint(100000), false) @@ -545,7 +546,7 @@ func TestKeeper_PayGasInZetaAndUpdateCctx(t *testing.T) { // create a cctx reverted from zeta cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_Zeta, + CoinType: coin.CoinType_Zeta, }, OutboundTxParams: []*types.OutboundTxParams{ { @@ -577,7 +578,7 @@ func TestKeeper_PayGasInZetaAndUpdateCctx(t *testing.T) { // create a cctx reverted from zeta cctx := types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_Zeta, + CoinType: coin.CoinType_Zeta, }, OutboundTxParams: []*types.OutboundTxParams{ { diff --git a/x/crosschain/keeper/grpc_query_zeta_conversion_rate.go b/x/crosschain/keeper/grpc_query_zeta_conversion_rate.go index 84fe370a84..5cb26ef831 100644 --- a/x/crosschain/keeper/grpc_query_zeta_conversion_rate.go +++ b/x/crosschain/keeper/grpc_query_zeta_conversion_rate.go @@ -6,7 +6,7 @@ import ( "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/x/crosschain/types" zetaObserverTypes "github.com/zeta-chain/zetacore/x/observer/types" "google.golang.org/grpc/codes" @@ -15,7 +15,7 @@ import ( func (k Keeper) ConvertGasToZeta(context context.Context, request *types.QueryConvertGasToZetaRequest) (*types.QueryConvertGasToZetaResponse, error) { ctx := sdk.UnwrapSDKContext(context) - chain := pkg.GetChainFromChainID(request.ChainId) + chain := chains.GetChainFromChainID(request.ChainId) if chain == nil { return nil, zetaObserverTypes.ErrSupportedChains diff --git a/x/crosschain/keeper/in_tx_tracker_test.go b/x/crosschain/keeper/in_tx_tracker_test.go index 871e472c0a..317f305a82 100644 --- a/x/crosschain/keeper/in_tx_tracker_test.go +++ b/x/crosschain/keeper/in_tx_tracker_test.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/coin" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/nullify" "github.com/zeta-chain/zetacore/x/crosschain/keeper" @@ -20,7 +20,7 @@ func createNInTxTracker(keeper *keeper.Keeper, ctx sdk.Context, n int, chainID i for i := range items { items[i].TxHash = fmt.Sprintf("TxHash-%d", i) items[i].ChainId = chainID - items[i].CoinType = pkg.CoinType_Gas + items[i].CoinType = coin.CoinType_Gas keeper.SetInTxTracker(ctx, items[i]) } return items diff --git a/x/crosschain/keeper/msg_server_add_to_intx_tracker.go b/x/crosschain/keeper/msg_server_add_to_intx_tracker.go index 0cfd77a8e9..960fa3d2c5 100644 --- a/x/crosschain/keeper/msg_server_add_to_intx_tracker.go +++ b/x/crosschain/keeper/msg_server_add_to_intx_tracker.go @@ -6,7 +6,7 @@ import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" @@ -32,7 +32,7 @@ func (k msgServer) AddToInTxTracker(goCtx context.Context, msg *types.MsgAddToIn return nil, types.ErrProofVerificationFail.Wrapf(err.Error()) } - if pkg.IsEVMChain(msg.ChainId) { + if chains.IsEVMChain(msg.ChainId) { err = k.VerifyEVMInTxBody(ctx, msg, txBytes) if err != nil { return nil, types.ErrTxBodyVerificationFail.Wrapf(err.Error()) diff --git a/x/crosschain/keeper/msg_server_add_to_intx_tracker_test.go b/x/crosschain/keeper/msg_server_add_to_intx_tracker_test.go index 0870951850..a43816db66 100644 --- a/x/crosschain/keeper/msg_server_add_to_intx_tracker_test.go +++ b/x/crosschain/keeper/msg_server_add_to_intx_tracker_test.go @@ -6,7 +6,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/coin" + "github.com/zeta-chain/zetacore/pkg/proofs" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" @@ -18,12 +19,12 @@ import ( func setupVerificationParams(zk keepertest.ZetaKeepers, ctx sdk.Context, tx_index int64, chainID int64, header ethtypes.Header, headerRLP []byte, block *ethtypes.Block) { params := zk.ObserverKeeper.GetParamsIfExists(ctx) zk.ObserverKeeper.SetParams(ctx, params) - zk.ObserverKeeper.SetBlockHeader(ctx, pkg.BlockHeader{ + zk.ObserverKeeper.SetBlockHeader(ctx, proofs.BlockHeader{ Height: block.Number().Int64(), Hash: block.Hash().Bytes(), ParentHash: header.ParentHash.Bytes(), ChainId: chainID, - Header: pkg.NewEthereumHeader(headerRLP), + Header: proofs.NewEthereumHeader(headerRLP), }) zk.ObserverKeeper.SetChainParamsList(ctx, observertypes.ChainParamsList{ChainParams: []*observertypes.ChainParams{ { @@ -56,7 +57,7 @@ func TestMsgServer_AddToInTxTracker(t *testing.T) { Creator: sample.AccAddress(), ChainId: chainID, TxHash: tx_hash, - CoinType: pkg.CoinType_Zeta, + CoinType: coin.CoinType_Zeta, Proof: nil, BlockHash: "", TxIndex: 0, @@ -85,7 +86,7 @@ func TestMsgServer_AddToInTxTracker(t *testing.T) { Creator: admin, ChainId: chainID, TxHash: tx_hash, - CoinType: pkg.CoinType_Zeta, + CoinType: coin.CoinType_Zeta, Proof: nil, BlockHash: "", TxIndex: 0, @@ -114,7 +115,7 @@ func TestMsgServer_AddToInTxTracker(t *testing.T) { Creator: admin, ChainId: chainID, TxHash: "Malicious TX HASH", - CoinType: pkg.CoinType_Zeta, + CoinType: coin.CoinType_Zeta, Proof: nil, BlockHash: "", TxIndex: 0, diff --git a/x/crosschain/keeper/msg_server_add_to_outtx_tracker.go b/x/crosschain/keeper/msg_server_add_to_outtx_tracker.go index 926fe66f8d..7f747fbcd7 100644 --- a/x/crosschain/keeper/msg_server_add_to_outtx_tracker.go +++ b/x/crosschain/keeper/msg_server_add_to_outtx_tracker.go @@ -12,7 +12,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" eth "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" @@ -116,7 +116,7 @@ func (k msgServer) AddToOutTxTracker(goCtx context.Context, msg *types.MsgAddToO func (k Keeper) VerifyOutTxBody(ctx sdk.Context, msg *types.MsgAddToOutTxTracker, txBytes []byte) error { // get tss address var bitcoinChainID int64 - if pkg.IsBitcoinChain(msg.ChainId) { + if chains.IsBitcoinChain(msg.ChainId) { bitcoinChainID = msg.ChainId } tss, err := k.zetaObserverKeeper.GetTssAddress(ctx, &observertypes.QueryGetTssAddressRequest{ @@ -127,9 +127,9 @@ func (k Keeper) VerifyOutTxBody(ctx sdk.Context, msg *types.MsgAddToOutTxTracker } // verify message against transaction body - if pkg.IsEVMChain(msg.ChainId) { + if chains.IsEVMChain(msg.ChainId) { err = VerifyEVMOutTxBody(msg, txBytes, tss.Eth) - } else if pkg.IsBitcoinChain(msg.ChainId) { + } else if chains.IsBitcoinChain(msg.ChainId) { err = VerifyBTCOutTxBody(msg, txBytes, tss.Btc) } else { return fmt.Errorf("cannot verify outTx body for chain %d", msg.ChainId) @@ -172,7 +172,7 @@ func VerifyEVMOutTxBody(msg *types.MsgAddToOutTxTracker, txBytes []byte, tssEth // VerifyBTCOutTxBody validates the SegWit sender address, nonce and chain id and tx hash // Note: 'msg' may contain fabricated information func VerifyBTCOutTxBody(msg *types.MsgAddToOutTxTracker, txBytes []byte, tssBtc string) error { - if !pkg.IsBitcoinChain(msg.ChainId) { + if !chains.IsBitcoinChain(msg.ChainId) { return fmt.Errorf("not a Bitcoin chain ID %d", msg.ChainId) } tx, err := btcutil.NewTxFromBytes(txBytes) @@ -187,7 +187,7 @@ func VerifyBTCOutTxBody(msg *types.MsgAddToOutTxTracker, txBytes []byte, tssBtc if err != nil { return fmt.Errorf("failed to parse public key") } - bitcoinNetParams, err := pkg.BitcoinNetParamsFromChainID(msg.ChainId) + bitcoinNetParams, err := chains.BitcoinNetParamsFromChainID(msg.ChainId) if err != nil { return fmt.Errorf("failed to get Bitcoin net params, error %s", err.Error()) } @@ -205,8 +205,8 @@ func VerifyBTCOutTxBody(msg *types.MsgAddToOutTxTracker, txBytes []byte, tssBtc if len(tx.MsgTx().TxOut) < 1 { return fmt.Errorf("outTx should have at least one output") } - if tx.MsgTx().TxOut[0].Value != pkg.NonceMarkAmount(msg.Nonce) { - return fmt.Errorf("want nonce mark %d, got %d", tx.MsgTx().TxOut[0].Value, pkg.NonceMarkAmount(msg.Nonce)) + if tx.MsgTx().TxOut[0].Value != chains.NonceMarkAmount(msg.Nonce) { + return fmt.Errorf("want nonce mark %d, got %d", tx.MsgTx().TxOut[0].Value, chains.NonceMarkAmount(msg.Nonce)) } if tx.MsgTx().TxHash().String() != msg.TxHash { return fmt.Errorf("want tx hash %s, got %s", tx.MsgTx().TxHash(), msg.TxHash) diff --git a/x/crosschain/keeper/msg_server_migrate_tss_funds.go b/x/crosschain/keeper/msg_server_migrate_tss_funds.go index 8505637421..a9ad02429f 100644 --- a/x/crosschain/keeper/msg_server_migrate_tss_funds.go +++ b/x/crosschain/keeper/msg_server_migrate_tss_funds.go @@ -13,6 +13,11 @@ import ( tmbytes "github.com/tendermint/tendermint/libs/bytes" tmtypes "github.com/tendermint/tendermint/types" "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + zetacrypto "github.com/zeta-chain/zetacore/pkg/crypto" + "github.com/zeta-chain/zetacore/pkg/gas" + + "github.com/zeta-chain/zetacore/pkg/coin" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" @@ -92,7 +97,7 @@ func (k Keeper) MigrateTSSFundsForChain(ctx sdk.Context, chainID int64, amount s Sender: "", SenderChainId: chainID, TxOrigin: "", - CoinType: pkg.CoinType_Cmd, + CoinType: coin.CoinType_Cmd, Asset: "", Amount: amount, InboundTxObservedHash: tmbytes.HexBytes(tmtypes.Tx(ctx.TxBytes()).Hash()).String(), @@ -103,7 +108,7 @@ func (k Keeper) MigrateTSSFundsForChain(ctx sdk.Context, chainID int64, amount s OutboundTxParams: []*types.OutboundTxParams{{ Receiver: "", ReceiverChainId: chainID, - CoinType: pkg.CoinType_Cmd, + CoinType: coin.CoinType_Cmd, Amount: amount, OutboundTxTssNonce: 0, OutboundTxGasLimit: 1_000_000, @@ -117,21 +122,21 @@ func (k Keeper) MigrateTSSFundsForChain(ctx sdk.Context, chainID int64, amount s TssPubkey: currentTss.TssPubkey, }}} // Set the sender and receiver addresses for EVM chain - if pkg.IsEVMChain(chainID) { - ethAddressOld, err := pkg.GetTssAddrEVM(currentTss.TssPubkey) + if chains.IsEVMChain(chainID) { + ethAddressOld, err := zetacrypto.GetTssAddrEVM(currentTss.TssPubkey) if err != nil { return err } - ethAddressNew, err := pkg.GetTssAddrEVM(newTss.TssPubkey) + ethAddressNew, err := zetacrypto.GetTssAddrEVM(newTss.TssPubkey) if err != nil { return err } cctx.InboundTxParams.Sender = ethAddressOld.String() cctx.GetCurrentOutTxParam().Receiver = ethAddressNew.String() // Tss migration is a send transaction, so the gas limit is set to 21000 - cctx.GetCurrentOutTxParam().OutboundTxGasLimit = pkg.EVMSend + cctx.GetCurrentOutTxParam().OutboundTxGasLimit = gas.EVMSend // Multiple current gas price with standard multiplier to add some buffer - multipliedGasPrice, err := pkg.MultiplyGasPrice(medianGasPrice, types.TssMigrationGasMultiplierEVM) + multipliedGasPrice, err := gas.MultiplyGasPrice(medianGasPrice, types.TssMigrationGasMultiplierEVM) if err != nil { return err } @@ -143,16 +148,16 @@ func (k Keeper) MigrateTSSFundsForChain(ctx sdk.Context, chainID int64, amount s cctx.GetCurrentOutTxParam().Amount = amount.Sub(evmFee) } // Set the sender and receiver addresses for Bitcoin chain - if pkg.IsBitcoinChain(chainID) { - bitcoinNetParams, err := pkg.BitcoinNetParamsFromChainID(chainID) + if chains.IsBitcoinChain(chainID) { + bitcoinNetParams, err := chains.BitcoinNetParamsFromChainID(chainID) if err != nil { return err } - btcAddressOld, err := pkg.GetTssAddrBTC(currentTss.TssPubkey, bitcoinNetParams) + btcAddressOld, err := zetacrypto.GetTssAddrBTC(currentTss.TssPubkey, bitcoinNetParams) if err != nil { return err } - btcAddressNew, err := pkg.GetTssAddrBTC(newTss.TssPubkey, bitcoinNetParams) + btcAddressNew, err := zetacrypto.GetTssAddrBTC(newTss.TssPubkey, bitcoinNetParams) if err != nil { return err } diff --git a/x/crosschain/keeper/msg_server_migrate_tss_funds_test.go b/x/crosschain/keeper/msg_server_migrate_tss_funds_test.go index c4282e4f17..d4a6c5206e 100644 --- a/x/crosschain/keeper/msg_server_migrate_tss_funds_test.go +++ b/x/crosschain/keeper/msg_server_migrate_tss_funds_test.go @@ -7,7 +7,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/crypto" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/gas" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" @@ -20,7 +21,7 @@ func setupTssMigrationParams( zk keepertest.ZetaKeepers, k *keeper.Keeper, ctx sdk.Context, - chain pkg.Chain, + chain chains.Chain, amount sdkmath.Uint, setNewTss bool, setCurrentTSS bool, @@ -102,7 +103,7 @@ func TestKeeper_MigrateTSSFundsForChain(t *testing.T) { index := hash.Hex() cctx, found := k.GetCrossChainTx(ctx, index) require.True(t, found) - multipliedValue, err := pkg.MultiplyGasPrice(gp, crosschaintypes.TssMigrationGasMultiplierEVM) + multipliedValue, err := gas.MultiplyGasPrice(gp, crosschaintypes.TssMigrationGasMultiplierEVM) require.NoError(t, err) require.Equal(t, multipliedValue.String(), cctx.GetCurrentOutTxParam().OutboundTxGasPrice) diff --git a/x/crosschain/keeper/msg_server_refund_aborted_tx.go b/x/crosschain/keeper/msg_server_refund_aborted_tx.go index c99b406227..2d08296630 100644 --- a/x/crosschain/keeper/msg_server_refund_aborted_tx.go +++ b/x/crosschain/keeper/msg_server_refund_aborted_tx.go @@ -6,7 +6,7 @@ import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" ethcommon "github.com/ethereum/go-ethereum/common" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/coin" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" @@ -43,7 +43,7 @@ func (k msgServer) RefundAbortedCCTX(goCtx context.Context, msg *types.MsgRefund } // Check if aborted amount is available to maintain zeta accounting - if cctx.InboundTxParams.CoinType == pkg.CoinType_Zeta { + if cctx.InboundTxParams.CoinType == coin.CoinType_Zeta { err := k.RemoveZetaAbortedAmount(ctx, GetAbortedAmount(cctx)) // if the zeta accounting is not found, it means the zeta accounting is not set yet and the refund should not be processed if errors.Is(err, types.ErrUnableToFindZetaAccounting) { diff --git a/x/crosschain/keeper/msg_server_refund_aborted_tx_test.go b/x/crosschain/keeper/msg_server_refund_aborted_tx_test.go index e822f237f3..5defcd882a 100644 --- a/x/crosschain/keeper/msg_server_refund_aborted_tx_test.go +++ b/x/crosschain/keeper/msg_server_refund_aborted_tx_test.go @@ -7,7 +7,7 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" "github.com/zeta-chain/zetacore/cmd/zetacored/config" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/coin" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" @@ -55,7 +55,7 @@ func TestMsgServer_RefundAbortedCCTX(t *testing.T) { cctx.CctxStatus.IsAbortRefunded = false cctx.InboundTxParams.TxOrigin = cctx.InboundTxParams.Sender cctx.InboundTxParams.SenderChainId = chainID - cctx.InboundTxParams.CoinType = pkg.CoinType_Gas + cctx.InboundTxParams.CoinType = coin.CoinType_Gas k.SetCrossChainTx(ctx, *cctx) deploySystemContracts(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper) zrc20 := setupGasCoin(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper, cctx.InboundTxParams.SenderChainId, "foobar", "foobar") @@ -94,7 +94,7 @@ func TestMsgServer_RefundAbortedCCTX(t *testing.T) { cctx.CctxStatus.IsAbortRefunded = false cctx.InboundTxParams.TxOrigin = cctx.InboundTxParams.Sender cctx.InboundTxParams.SenderChainId = chainID - cctx.InboundTxParams.CoinType = pkg.CoinType_Zeta + cctx.InboundTxParams.CoinType = coin.CoinType_Zeta k.SetCrossChainTx(ctx, *cctx) k.SetZetaAccounting(ctx, crosschaintypes.ZetaAccounting{AbortedZetaAmount: cctx.GetCurrentOutTxParam().Amount}) deploySystemContracts(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper) @@ -133,7 +133,7 @@ func TestMsgServer_RefundAbortedCCTX(t *testing.T) { cctx.CctxStatus.IsAbortRefunded = false cctx.InboundTxParams.TxOrigin = cctx.InboundTxParams.Sender cctx.InboundTxParams.SenderChainId = chainID - cctx.InboundTxParams.CoinType = pkg.CoinType_Zeta + cctx.InboundTxParams.CoinType = coin.CoinType_Zeta cctx.OutboundTxParams = nil k.SetCrossChainTx(ctx, *cctx) k.SetZetaAccounting(ctx, crosschaintypes.ZetaAccounting{AbortedZetaAmount: cctx.GetCurrentOutTxParam().Amount}) @@ -173,7 +173,7 @@ func TestMsgServer_RefundAbortedCCTX(t *testing.T) { cctx.CctxStatus.IsAbortRefunded = false cctx.InboundTxParams.TxOrigin = cctx.InboundTxParams.Sender cctx.InboundTxParams.SenderChainId = chainID - cctx.InboundTxParams.CoinType = pkg.CoinType_Zeta + cctx.InboundTxParams.CoinType = coin.CoinType_Zeta k.SetCrossChainTx(ctx, *cctx) k.SetZetaAccounting(ctx, crosschaintypes.ZetaAccounting{AbortedZetaAmount: cctx.InboundTxParams.Amount}) deploySystemContracts(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper) @@ -212,7 +212,7 @@ func TestMsgServer_RefundAbortedCCTX(t *testing.T) { cctx.CctxStatus.Status = crosschaintypes.CctxStatus_Aborted cctx.CctxStatus.IsAbortRefunded = false cctx.InboundTxParams.SenderChainId = chainID - cctx.InboundTxParams.CoinType = pkg.CoinType_ERC20 + cctx.InboundTxParams.CoinType = coin.CoinType_ERC20 cctx.InboundTxParams.Asset = asset k.SetCrossChainTx(ctx, *cctx) // deploy zrc20 @@ -262,7 +262,7 @@ func TestMsgServer_RefundAbortedCCTX(t *testing.T) { cctx.CctxStatus.IsAbortRefunded = false cctx.InboundTxParams.TxOrigin = cctx.InboundTxParams.Sender cctx.InboundTxParams.SenderChainId = chainID - cctx.InboundTxParams.CoinType = pkg.CoinType_Gas + cctx.InboundTxParams.CoinType = coin.CoinType_Gas k.SetCrossChainTx(ctx, *cctx) deploySystemContracts(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper) zrc20 := setupGasCoin(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper, cctx.InboundTxParams.SenderChainId, "foobar", "foobar") @@ -301,7 +301,7 @@ func TestMsgServer_RefundAbortedCCTX(t *testing.T) { cctx.CctxStatus.IsAbortRefunded = false cctx.InboundTxParams.TxOrigin = cctx.InboundTxParams.Sender cctx.InboundTxParams.SenderChainId = chainID - cctx.InboundTxParams.CoinType = pkg.CoinType_Zeta + cctx.InboundTxParams.CoinType = coin.CoinType_Zeta k.SetCrossChainTx(ctx, *cctx) k.SetZetaAccounting(ctx, crosschaintypes.ZetaAccounting{AbortedZetaAmount: cctx.InboundTxParams.Amount}) deploySystemContracts(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper) @@ -332,7 +332,7 @@ func TestMsgServer_RefundAbortedCCTX(t *testing.T) { cctx.CctxStatus.IsAbortRefunded = false cctx.InboundTxParams.TxOrigin = cctx.InboundTxParams.Sender cctx.InboundTxParams.SenderChainId = chainID - cctx.InboundTxParams.CoinType = pkg.CoinType_Zeta + cctx.InboundTxParams.CoinType = coin.CoinType_Zeta k.SetCrossChainTx(ctx, *cctx) k.SetZetaAccounting(ctx, crosschaintypes.ZetaAccounting{AbortedZetaAmount: cctx.InboundTxParams.Amount}) deploySystemContracts(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper) @@ -363,7 +363,7 @@ func TestMsgServer_RefundAbortedCCTX(t *testing.T) { cctx.CctxStatus.IsAbortRefunded = false cctx.InboundTxParams.TxOrigin = cctx.InboundTxParams.Sender cctx.InboundTxParams.SenderChainId = chainID - cctx.InboundTxParams.CoinType = pkg.CoinType_Gas + cctx.InboundTxParams.CoinType = coin.CoinType_Gas k.SetCrossChainTx(ctx, *cctx) deploySystemContracts(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper) @@ -396,7 +396,7 @@ func TestMsgServer_RefundAbortedCCTX(t *testing.T) { cctx.CctxStatus.IsAbortRefunded = false cctx.InboundTxParams.TxOrigin = cctx.InboundTxParams.Sender cctx.InboundTxParams.SenderChainId = chainID - cctx.InboundTxParams.CoinType = pkg.CoinType_Gas + cctx.InboundTxParams.CoinType = coin.CoinType_Gas deploySystemContracts(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper) _, err := msgServer.RefundAbortedCCTX(ctx, &crosschaintypes.MsgRefundAbortedCCTX{ @@ -425,7 +425,7 @@ func TestMsgServer_RefundAbortedCCTX(t *testing.T) { cctx.CctxStatus.IsAbortRefunded = false cctx.InboundTxParams.TxOrigin = cctx.InboundTxParams.Sender cctx.InboundTxParams.SenderChainId = chainID - cctx.InboundTxParams.CoinType = pkg.CoinType_Gas + cctx.InboundTxParams.CoinType = coin.CoinType_Gas k.SetCrossChainTx(ctx, *cctx) deploySystemContracts(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper) _ = setupGasCoin(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper, cctx.InboundTxParams.SenderChainId, "foobar", "foobar") @@ -456,7 +456,7 @@ func TestMsgServer_RefundAbortedCCTX(t *testing.T) { cctx.CctxStatus.IsAbortRefunded = false cctx.InboundTxParams.TxOrigin = cctx.InboundTxParams.Sender cctx.InboundTxParams.SenderChainId = chainID - cctx.InboundTxParams.CoinType = pkg.CoinType_Zeta + cctx.InboundTxParams.CoinType = coin.CoinType_Zeta k.SetCrossChainTx(ctx, *cctx) deploySystemContracts(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper) @@ -486,7 +486,7 @@ func TestMsgServer_RefundAbortedCCTX(t *testing.T) { cctx.CctxStatus.IsAbortRefunded = false cctx.InboundTxParams.TxOrigin = cctx.InboundTxParams.Sender cctx.InboundTxParams.SenderChainId = chainID - cctx.InboundTxParams.CoinType = pkg.CoinType_Gas + cctx.InboundTxParams.CoinType = coin.CoinType_Gas k.SetCrossChainTx(ctx, *cctx) deploySystemContracts(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper) _ = setupGasCoin(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper, cctx.InboundTxParams.SenderChainId, "foobar", "foobar") diff --git a/x/crosschain/keeper/msg_server_tss_voter.go b/x/crosschain/keeper/msg_server_tss_voter.go index 0bca8c6028..a3782729b1 100644 --- a/x/crosschain/keeper/msg_server_tss_voter.go +++ b/x/crosschain/keeper/msg_server_tss_voter.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" math2 "github.com/ethereum/go-ethereum/common/math" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/x/crosschain/types" "github.com/zeta-chain/zetacore/x/observer/keeper" observertypes "github.com/zeta-chain/zetacore/x/observer/types" @@ -65,12 +65,12 @@ func (k msgServer) CreateTSSVoter(goCtx context.Context, msg *types.MsgCreateTSS k.zetaObserverKeeper.AddBallotToList(ctx, ballot) } var err error - if msg.Status == pkg.ReceiveStatus_Success { + if msg.Status == chains.ReceiveStatus_Success { ballot, err = k.zetaObserverKeeper.AddVoteToBallot(ctx, ballot, msg.Creator, observertypes.VoteType_SuccessObservation) if err != nil { return &types.MsgCreateTSSVoterResponse{}, err } - } else if msg.Status == pkg.ReceiveStatus_Failed { + } else if msg.Status == chains.ReceiveStatus_Failed { ballot, err = k.zetaObserverKeeper.AddVoteToBallot(ctx, ballot, msg.Creator, observertypes.VoteType_FailureObservation) if err != nil { return &types.MsgCreateTSSVoterResponse{}, err diff --git a/x/crosschain/keeper/msg_server_vote_inbound_tx.go b/x/crosschain/keeper/msg_server_vote_inbound_tx.go index d1459b4cba..4fee3a2c9d 100644 --- a/x/crosschain/keeper/msg_server_vote_inbound_tx.go +++ b/x/crosschain/keeper/msg_server_vote_inbound_tx.go @@ -6,7 +6,7 @@ import ( cosmoserrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/x/crosschain/types" ) @@ -121,7 +121,7 @@ func (k msgServer) VoteOnObservedInboundTx(goCtx context.Context, msg *types.Msg // FinalizeInbound updates CCTX Prices and Nonce // Aborts is any of the updates fail - if pkg.IsZetaChain(msg.ReceiverChain) { + if chains.IsZetaChain(msg.ReceiverChain) { tmpCtx, commit := ctx.CacheContext() isContractReverted, err := k.HandleEVMDeposit(tmpCtx, &cctx, *msg, msg.SenderChainId) diff --git a/x/crosschain/keeper/msg_server_vote_inbound_tx_test.go b/x/crosschain/keeper/msg_server_vote_inbound_tx_test.go index 24f77f4579..fa51c66bfa 100644 --- a/x/crosschain/keeper/msg_server_vote_inbound_tx_test.go +++ b/x/crosschain/keeper/msg_server_vote_inbound_tx_test.go @@ -7,7 +7,7 @@ import ( sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/crosschain/keeper" @@ -42,12 +42,12 @@ func TestKeeper_VoteOnObservedInboundTx(t *testing.T) { msgServer := keeper.NewMsgServerImpl(*k) validatorList := setObservers(t, k, ctx, zk) to, from := int64(1337), int64(101) - chains := zk.ObserverKeeper.GetSupportedChains(ctx) - for _, chain := range chains { - if pkg.IsEVMChain(chain.ChainId) { + supportedChains := zk.ObserverKeeper.GetSupportedChains(ctx) + for _, chain := range supportedChains { + if chains.IsEVMChain(chain.ChainId) { from = chain.ChainId } - if pkg.IsZetaChain(chain.ChainId) { + if chains.IsZetaChain(chain.ChainId) { to = chain.ChainId } } diff --git a/x/crosschain/keeper/msg_server_vote_outbound_tx.go b/x/crosschain/keeper/msg_server_vote_outbound_tx.go index 81331024f4..9286f0865a 100644 --- a/x/crosschain/keeper/msg_server_vote_outbound_tx.go +++ b/x/crosschain/keeper/msg_server_vote_outbound_tx.go @@ -12,7 +12,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/rs/zerolog/log" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/x/crosschain/types" observerkeeper "github.com/zeta-chain/zetacore/x/observer/keeper" observertypes "github.com/zeta-chain/zetacore/x/observer/types" @@ -142,7 +143,7 @@ func (k msgServer) VoteOnObservedOutboundTx(goCtx context.Context, msg *types.Ms newStatus := cctx.CctxStatus.Status.String() EmitOutboundSuccess(tmpCtx, msg, oldStatus.String(), newStatus, cctx) case observertypes.BallotStatus_BallotFinalized_FailureObservation: - if msg.CoinType == pkg.CoinType_Cmd || pkg.IsZetaChain(cctx.InboundTxParams.SenderChainId) { + if msg.CoinType == coin.CoinType_Cmd || chains.IsZetaChain(cctx.InboundTxParams.SenderChainId) { // if the cctx is of coin type cmd or the sender chain is zeta chain, then we do not revert, the cctx is aborted cctx.CctxStatus.ChangeStatus(types.CctxStatus_Aborted, "") } else { diff --git a/x/crosschain/keeper/msg_server_whitelist_erc20.go b/x/crosschain/keeper/msg_server_whitelist_erc20.go index f845c53a52..9bc6aba87d 100644 --- a/x/crosschain/keeper/msg_server_whitelist_erc20.go +++ b/x/crosschain/keeper/msg_server_whitelist_erc20.go @@ -5,6 +5,7 @@ import ( "fmt" "math/big" + "github.com/zeta-chain/zetacore/pkg/coin" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" errorsmod "cosmossdk.io/errors" @@ -72,7 +73,7 @@ func (k msgServer) WhitelistERC20(goCtx context.Context, msg *types.MsgWhitelist // #nosec G701 always in range uint8(msg.Decimals), chain.ChainId, - pkg.CoinType_ERC20, + coin.CoinType_ERC20, msg.Erc20Address, big.NewInt(msg.GasLimit), ) @@ -125,7 +126,7 @@ func (k msgServer) WhitelistERC20(goCtx context.Context, msg *types.MsgWhitelist Sender: "", SenderChainId: 0, TxOrigin: "", - CoinType: pkg.CoinType_Cmd, + CoinType: coin.CoinType_Cmd, Asset: "", Amount: math.Uint{}, InboundTxObservedHash: hash.String(), // all Upper case Cosmos TX HEX, with no 0x prefix @@ -137,7 +138,7 @@ func (k msgServer) WhitelistERC20(goCtx context.Context, msg *types.MsgWhitelist { Receiver: param.Erc20CustodyContractAddress, ReceiverChainId: msg.ChainId, - CoinType: pkg.CoinType_Cmd, + CoinType: coin.CoinType_Cmd, Amount: math.NewUint(0), OutboundTxTssNonce: 0, OutboundTxGasLimit: 100_000, @@ -162,7 +163,7 @@ func (k msgServer) WhitelistERC20(goCtx context.Context, msg *types.MsgWhitelist Decimals: msg.Decimals, Name: msg.Name, Symbol: msg.Symbol, - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, // #nosec G701 always positive GasLimit: uint64(msg.GasLimit), } diff --git a/x/crosschain/keeper/refund.go b/x/crosschain/keeper/refund.go index 36638bd1be..1781264c1c 100644 --- a/x/crosschain/keeper/refund.go +++ b/x/crosschain/keeper/refund.go @@ -7,18 +7,19 @@ import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" ethcommon "github.com/ethereum/go-ethereum/common" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/x/crosschain/types" ) func (k Keeper) RefundAbortedAmountOnZetaChain(ctx sdk.Context, cctx types.CrossChainTx, refundAddress ethcommon.Address) error { coinType := cctx.InboundTxParams.CoinType switch coinType { - case pkg.CoinType_Gas: + case coin.CoinType_Gas: return k.RefundAmountOnZetaChainGas(ctx, cctx, refundAddress) - case pkg.CoinType_Zeta: + case coin.CoinType_Zeta: return k.RefundAmountOnZetaChainZeta(ctx, cctx, refundAddress) - case pkg.CoinType_ERC20: + case coin.CoinType_ERC20: return k.RefundAmountOnZetaChainERC20(ctx, cctx, refundAddress) default: return errors.New("unsupported coin type for refund on ZetaChain") @@ -56,7 +57,7 @@ func (k Keeper) RefundAmountOnZetaChainZeta(ctx sdk.Context, cctx types.CrossCha refundAmount := GetAbortedAmount(cctx) chainID := cctx.InboundTxParams.SenderChainId // check if chain is an EVM chain - if !pkg.IsEVMChain(chainID) { + if !chains.IsEVMChain(chainID) { return errors.New("only EVM chains are supported for refund when coin type is Zeta") } if cctx.InboundTxParams.Amount.IsNil() || cctx.InboundTxParams.Amount.IsZero() { @@ -75,10 +76,10 @@ func (k Keeper) RefundAmountOnZetaChainZeta(ctx sdk.Context, cctx types.CrossCha func (k Keeper) RefundAmountOnZetaChainERC20(ctx sdk.Context, cctx types.CrossChainTx, refundAddress ethcommon.Address) error { refundAmount := GetAbortedAmount(cctx) // preliminary checks - if cctx.InboundTxParams.CoinType != pkg.CoinType_ERC20 { + if cctx.InboundTxParams.CoinType != coin.CoinType_ERC20 { return errors.New("unsupported coin type for refund on ZetaChain") } - if !pkg.IsEVMChain(cctx.InboundTxParams.SenderChainId) { + if !chains.IsEVMChain(cctx.InboundTxParams.SenderChainId) { return errors.New("only EVM chains are supported for refund on ZetaChain") } diff --git a/x/crosschain/keeper/refund_test.go b/x/crosschain/keeper/refund_test.go index ba339ceed9..933359008f 100644 --- a/x/crosschain/keeper/refund_test.go +++ b/x/crosschain/keeper/refund_test.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" "github.com/zeta-chain/zetacore/cmd/zetacored/config" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/coin" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/crosschain/types" @@ -26,7 +26,7 @@ func TestKeeper_RefundAmountOnZetaChainGas(t *testing.T) { err := k.RefundAmountOnZetaChainGas(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_Gas, + CoinType: coin.CoinType_Gas, SenderChainId: chainID, Sender: sender.String(), TxOrigin: sender.String(), @@ -53,7 +53,7 @@ func TestKeeper_RefundAmountOnZetaChainGas(t *testing.T) { err := k.RefundAmountOnZetaChainGas(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_Gas, + CoinType: coin.CoinType_Gas, SenderChainId: chainID, Sender: sender.String(), TxOrigin: sender.String(), @@ -75,7 +75,7 @@ func TestKeeper_RefundAmountOnZetaChainGas(t *testing.T) { deploySystemContracts(t, ctx, zk.FungibleKeeper, sdkk.EvmKeeper) err := k.RefundAmountOnZetaChainGas(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_Gas, + CoinType: coin.CoinType_Gas, SenderChainId: chainID, Sender: sender.String(), TxOrigin: sender.String(), @@ -100,7 +100,7 @@ func TestKeeper_RefundAmountOnZetaChainGas(t *testing.T) { err := k.RefundAmountOnZetaChainGas(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_Gas, + CoinType: coin.CoinType_Gas, SenderChainId: chainID, Sender: sender.String(), TxOrigin: sender.String(), @@ -126,7 +126,7 @@ func TestKeeper_RefundAmountOnZetaChainZeta(t *testing.T) { err := k.RefundAmountOnZetaChainZeta(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_Gas, + CoinType: coin.CoinType_Gas, SenderChainId: chainID, Sender: sender.String(), TxOrigin: sender.String(), @@ -151,7 +151,7 @@ func TestKeeper_RefundAmountOnZetaChainZeta(t *testing.T) { err := k.RefundAmountOnZetaChainZeta(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_Gas, + CoinType: coin.CoinType_Gas, SenderChainId: chainID, Sender: sender.String(), TxOrigin: sender.String(), @@ -172,7 +172,7 @@ func TestKeeper_RefundAmountOnZetaChainZeta(t *testing.T) { err := k.RefundAmountOnZetaChainZeta(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_Gas, + CoinType: coin.CoinType_Gas, SenderChainId: chainID, Sender: sender.String(), TxOrigin: sender.String(), @@ -211,7 +211,7 @@ func TestKeeper_RefundAmountOnZetaChainERC20(t *testing.T) { err := k.RefundAmountOnZetaChainERC20(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, SenderChainId: chainID, Sender: sender.String(), Asset: asset, @@ -233,7 +233,7 @@ func TestKeeper_RefundAmountOnZetaChainERC20(t *testing.T) { // can refund again err = k.RefundAmountOnZetaChainERC20(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, SenderChainId: chainID, Sender: sender.String(), Asset: asset, @@ -252,7 +252,7 @@ func TestKeeper_RefundAmountOnZetaChainERC20(t *testing.T) { err := k.RefundAmountOnZetaChainERC20(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_Zeta, + CoinType: coin.CoinType_Zeta, Amount: math.NewUint(42), }}, sample.EthAddress(), @@ -261,7 +261,7 @@ func TestKeeper_RefundAmountOnZetaChainERC20(t *testing.T) { err = k.RefundAmountOnZetaChainERC20(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_Gas, + CoinType: coin.CoinType_Gas, }}, sample.EthAddress(), ) @@ -269,7 +269,7 @@ func TestKeeper_RefundAmountOnZetaChainERC20(t *testing.T) { err = k.RefundAmountOnZetaChainERC20(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, SenderChainId: 999999, Amount: math.NewUint(42), }}, @@ -279,7 +279,7 @@ func TestKeeper_RefundAmountOnZetaChainERC20(t *testing.T) { err = k.RefundAmountOnZetaChainERC20(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, SenderChainId: getValidEthChainID(t), Sender: sample.EthAddress().String(), Amount: math.Uint{}, @@ -290,7 +290,7 @@ func TestKeeper_RefundAmountOnZetaChainERC20(t *testing.T) { err = k.RefundAmountOnZetaChainERC20(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, SenderChainId: getValidEthChainID(t), Sender: sample.EthAddress().String(), Amount: math.ZeroUint(), @@ -302,7 +302,7 @@ func TestKeeper_RefundAmountOnZetaChainERC20(t *testing.T) { // the foreign coin has not been set err = k.RefundAmountOnZetaChainERC20(ctx, types.CrossChainTx{ InboundTxParams: &types.InboundTxParams{ - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, SenderChainId: getValidEthChainID(t), Sender: sample.EthAddress().String(), Asset: sample.EthAddress().String(), diff --git a/x/crosschain/keeper/utils_test.go b/x/crosschain/keeper/utils_test.go index 4dd56e67b4..732ec5d0bd 100644 --- a/x/crosschain/keeper/utils_test.go +++ b/x/crosschain/keeper/utils_test.go @@ -5,7 +5,7 @@ import ( "math/big" "testing" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/crosschain/types" @@ -27,13 +27,13 @@ func getValidEthChainID(t *testing.T) int64 { } // getValidEthChain get a valid eth chain -func getValidEthChain(_ *testing.T) *pkg.Chain { - goerli := pkg.GoerliLocalnetChain() +func getValidEthChain(_ *testing.T) *chains.Chain { + goerli := chains.GoerliLocalnetChain() return &goerli } -func getValidBTCChain() *pkg.Chain { - btcRegNet := pkg.BtcRegtestChain() +func getValidBTCChain() *chains.Chain { + btcRegNet := chains.BtcRegtestChain() return &btcRegNet } @@ -45,9 +45,9 @@ func getValidBtcChainID() int64 { func getValidEthChainIDWithIndex(t *testing.T, index int) int64 { switch index { case 0: - return pkg.GoerliLocalnetChain().ChainId + return chains.GoerliLocalnetChain().ChainId case 1: - return pkg.GoerliChain().ChainId + return chains.GoerliChain().ChainId default: require.Fail(t, "invalid index") } diff --git a/x/crosschain/keeper/verify_proof.go b/x/crosschain/keeper/verify_proof.go index 7df158457d..5c58c98b10 100644 --- a/x/crosschain/keeper/verify_proof.go +++ b/x/crosschain/keeper/verify_proof.go @@ -7,12 +7,14 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" eth "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" + "github.com/zeta-chain/zetacore/pkg/proofs" "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" ) -func (k Keeper) VerifyProof(ctx sdk.Context, proof *pkg.Proof, chainID int64, blockHash string, txIndex int64) ([]byte, error) { +func (k Keeper) VerifyProof(ctx sdk.Context, proof *proofs.Proof, chainID int64, blockHash string, txIndex int64) ([]byte, error) { // header-based merkle proof verification must be enabled crosschainFlags, found := k.zetaObserverKeeper.GetCrosschainFlags(ctx) if !found { @@ -21,15 +23,15 @@ func (k Keeper) VerifyProof(ctx sdk.Context, proof *pkg.Proof, chainID int64, bl if crosschainFlags.BlockHeaderVerificationFlags == nil { return nil, fmt.Errorf("block header verification flags not found") } - if pkg.IsBitcoinChain(chainID) && !crosschainFlags.BlockHeaderVerificationFlags.IsBtcTypeChainEnabled { + if chains.IsBitcoinChain(chainID) && !crosschainFlags.BlockHeaderVerificationFlags.IsBtcTypeChainEnabled { return nil, fmt.Errorf("proof verification not enabled for bitcoin chain") } - if pkg.IsEVMChain(chainID) && !crosschainFlags.BlockHeaderVerificationFlags.IsEthTypeChainEnabled { + if chains.IsEVMChain(chainID) && !crosschainFlags.BlockHeaderVerificationFlags.IsEthTypeChainEnabled { return nil, fmt.Errorf("proof verification not enabled for evm chain") } // chain must support header-based merkle proof verification - senderChain := pkg.GetChainFromChainID(chainID) + senderChain := chains.GetChainFromChainID(chainID) if senderChain == nil { return nil, types.ErrUnsupportedChain } @@ -38,7 +40,7 @@ func (k Keeper) VerifyProof(ctx sdk.Context, proof *pkg.Proof, chainID int64, bl } // get block header from the store - hashBytes, err := pkg.StringToHash(chainID, blockHash) + hashBytes, err := chains.StringToHash(chainID, blockHash) if err != nil { return nil, fmt.Errorf("block hash %s conversion failed %s", blockHash, err) } @@ -68,7 +70,7 @@ func (k Keeper) VerifyEVMInTxBody(ctx sdk.Context, msg *types.MsgAddToInTxTracke return fmt.Errorf("want evm chain id %d, got %d", txx.ChainId(), msg.ChainId) } switch msg.CoinType { - case pkg.CoinType_Zeta: + case coin.CoinType_Zeta: chainParams, found := k.zetaObserverKeeper.GetChainParamsByChainID(ctx, msg.ChainId) if !found { return types.ErrUnsupportedChain.Wrapf("chain params not found for chain %d", msg.ChainId) @@ -77,7 +79,7 @@ func (k Keeper) VerifyEVMInTxBody(ctx sdk.Context, msg *types.MsgAddToInTxTracke return fmt.Errorf("receiver is not connector contract for coin type %s", msg.CoinType) } return nil - case pkg.CoinType_ERC20: + case coin.CoinType_ERC20: chainParams, found := k.zetaObserverKeeper.GetChainParamsByChainID(ctx, msg.ChainId) if !found { return types.ErrUnsupportedChain.Wrapf("chain params not found for chain %d", msg.ChainId) @@ -86,7 +88,7 @@ func (k Keeper) VerifyEVMInTxBody(ctx sdk.Context, msg *types.MsgAddToInTxTracke return fmt.Errorf("receiver is not erc20Custory contract for coin type %s", msg.CoinType) } return nil - case pkg.CoinType_Gas: + case coin.CoinType_Gas: tss, err := k.zetaObserverKeeper.GetTssAddress(ctx, &observertypes.QueryGetTssAddressRequest{ BitcoinChainId: msg.ChainId, }) diff --git a/x/crosschain/migrations/v4/migrate.go b/x/crosschain/migrations/v4/migrate.go index 4b29169263..da289e062e 100644 --- a/x/crosschain/migrations/v4/migrate.go +++ b/x/crosschain/migrations/v4/migrate.go @@ -8,7 +8,8 @@ import ( "github.com/cosmos/cosmos-sdk/store/prefix" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -54,7 +55,7 @@ func SetZetaAccounting( for ; iterator.Valid(); iterator.Next() { var val types.CrossChainTx cdc.MustUnmarshal(iterator.Value(), &val) - if val.CctxStatus.Status == types.CctxStatus_Aborted && val.GetCurrentOutTxParam().CoinType == pkg.CoinType_Zeta { + if val.CctxStatus.Status == types.CctxStatus_Aborted && val.GetCurrentOutTxParam().CoinType == coin.CoinType_Zeta { abortedAmountZeta = abortedAmountZeta.Add(val.GetCurrentOutTxParam().Amount) } } @@ -176,7 +177,7 @@ func SetBitcoinFinalizedInbound(ctx sdk.Context, crosschainKeeper crosschainKeep for _, cctx := range crosschainKeeper.GetAllCrossChainTx(ctx) { if cctx.InboundTxParams != nil { // check if bitcoin inbound - if pkg.IsBitcoinChain(cctx.InboundTxParams.SenderChainId) { + if chains.IsBitcoinChain(cctx.InboundTxParams.SenderChainId) { // add finalized inbound crosschainKeeper.AddFinalizedInbound( ctx, diff --git a/x/crosschain/migrations/v4/migrate_test.go b/x/crosschain/migrations/v4/migrate_test.go index 14d6b88cbb..c4c68d93a5 100644 --- a/x/crosschain/migrations/v4/migrate_test.go +++ b/x/crosschain/migrations/v4/migrate_test.go @@ -10,7 +10,8 @@ import ( "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/crosschain/keeper" @@ -96,49 +97,49 @@ func TestSetBitcoinFinalizedInbound(t *testing.T) { k.SetCrossChainTx(ctx, types.CrossChainTx{ Index: "0", InboundTxParams: &types.InboundTxParams{ - SenderChainId: pkg.GoerliChain().ChainId, + SenderChainId: chains.GoerliChain().ChainId, InboundTxObservedHash: "0xaaa", }, }) k.SetCrossChainTx(ctx, types.CrossChainTx{ Index: "1", InboundTxParams: &types.InboundTxParams{ - SenderChainId: pkg.BtcMainnetChain().ChainId, + SenderChainId: chains.BtcMainnetChain().ChainId, InboundTxObservedHash: "0x111", }, }) k.SetCrossChainTx(ctx, types.CrossChainTx{ Index: "2", InboundTxParams: &types.InboundTxParams{ - SenderChainId: pkg.EthChain().ChainId, + SenderChainId: chains.EthChain().ChainId, InboundTxObservedHash: "0xbbb", }, }) k.SetCrossChainTx(ctx, types.CrossChainTx{ Index: "3", InboundTxParams: &types.InboundTxParams{ - SenderChainId: pkg.BtcTestNetChain().ChainId, + SenderChainId: chains.BtcTestNetChain().ChainId, InboundTxObservedHash: "0x222", }, }) k.SetCrossChainTx(ctx, types.CrossChainTx{ Index: "4", InboundTxParams: &types.InboundTxParams{ - SenderChainId: pkg.BtcTestNetChain().ChainId, + SenderChainId: chains.BtcTestNetChain().ChainId, InboundTxObservedHash: "0x333", }, }) k.SetCrossChainTx(ctx, types.CrossChainTx{ Index: "5", InboundTxParams: &types.InboundTxParams{ - SenderChainId: pkg.MumbaiChain().ChainId, + SenderChainId: chains.MumbaiChain().ChainId, InboundTxObservedHash: "0xccc", }, }) k.SetCrossChainTx(ctx, types.CrossChainTx{ Index: "6", InboundTxParams: &types.InboundTxParams{ - SenderChainId: pkg.BtcRegtestChain().ChainId, + SenderChainId: chains.BtcRegtestChain().ChainId, InboundTxObservedHash: "0x444", }, }) @@ -147,13 +148,13 @@ func TestSetBitcoinFinalizedInbound(t *testing.T) { v4.SetBitcoinFinalizedInbound(ctx, k) // check finalized inbound - require.False(t, k.IsFinalizedInbound(ctx, "0xaaa", pkg.GoerliChain().ChainId, 0)) - require.False(t, k.IsFinalizedInbound(ctx, "0xbbb", pkg.EthChain().ChainId, 0)) - require.False(t, k.IsFinalizedInbound(ctx, "0xccc", pkg.MumbaiChain().ChainId, 0)) - require.True(t, k.IsFinalizedInbound(ctx, "0x111", pkg.BtcMainnetChain().ChainId, 0)) - require.True(t, k.IsFinalizedInbound(ctx, "0x222", pkg.BtcTestNetChain().ChainId, 0)) - require.True(t, k.IsFinalizedInbound(ctx, "0x333", pkg.BtcTestNetChain().ChainId, 0)) - require.True(t, k.IsFinalizedInbound(ctx, "0x444", pkg.BtcRegtestChain().ChainId, 0)) + require.False(t, k.IsFinalizedInbound(ctx, "0xaaa", chains.GoerliChain().ChainId, 0)) + require.False(t, k.IsFinalizedInbound(ctx, "0xbbb", chains.EthChain().ChainId, 0)) + require.False(t, k.IsFinalizedInbound(ctx, "0xccc", chains.MumbaiChain().ChainId, 0)) + require.True(t, k.IsFinalizedInbound(ctx, "0x111", chains.BtcMainnetChain().ChainId, 0)) + require.True(t, k.IsFinalizedInbound(ctx, "0x222", chains.BtcTestNetChain().ChainId, 0)) + require.True(t, k.IsFinalizedInbound(ctx, "0x333", chains.BtcTestNetChain().ChainId, 0)) + require.True(t, k.IsFinalizedInbound(ctx, "0x444", chains.BtcRegtestChain().ChainId, 0)) }) } @@ -170,7 +171,7 @@ func SetRandomCctx(ctx sdk.Context, k keeper.Keeper) sdkmath.Uint { CctxStatus: &types.Status{Status: types.CctxStatus_Aborted}, OutboundTxParams: []*types.OutboundTxParams{{ Amount: amount, - CoinType: pkg.CoinType_Zeta, + CoinType: coin.CoinType_Zeta, }}, }) totalZeta = totalZeta.Add(amount) diff --git a/x/crosschain/migrations/v5/migrate.go b/x/crosschain/migrations/v5/migrate.go index 8e6567f156..98fee02256 100644 --- a/x/crosschain/migrations/v5/migrate.go +++ b/x/crosschain/migrations/v5/migrate.go @@ -7,7 +7,8 @@ import ( "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/x/crosschain/types" ) @@ -69,17 +70,17 @@ func ResetTestnetNonce( } type TestnetNonce struct { - chain pkg.Chain + chain chains.Chain nonceHigh uint64 nonceLow uint64 } func CurrentTestnetChains() []TestnetNonce { return []TestnetNonce{ - {chain: pkg.GoerliChain(), nonceHigh: 226841, nonceLow: 226841}, - {chain: pkg.MumbaiChain(), nonceHigh: 200599, nonceLow: 200599}, - {chain: pkg.BscTestnetChain(), nonceHigh: 110454, nonceLow: 110454}, - {chain: pkg.BtcTestNetChain(), nonceHigh: 4881, nonceLow: 4881}, + {chain: chains.GoerliChain(), nonceHigh: 226841, nonceLow: 226841}, + {chain: chains.MumbaiChain(), nonceHigh: 200599, nonceLow: 200599}, + {chain: chains.BscTestnetChain(), nonceHigh: 110454, nonceLow: 110454}, + {chain: chains.BtcTestNetChain(), nonceHigh: 4881, nonceLow: 4881}, } } @@ -94,7 +95,7 @@ func SetZetaAccounting( if cctx.CctxStatus.Status == types.CctxStatus_Aborted { switch cctx.InboundTxParams.CoinType { - case pkg.CoinType_ERC20: + case coin.CoinType_ERC20: { receiverChain := observerKeeper.GetSupportedChainFromChainID(ctx, cctx.GetCurrentOutTxParam().ReceiverChainId) if receiverChain == nil { @@ -110,7 +111,7 @@ func SetZetaAccounting( cctx.CctxStatus.IsAbortRefunded = false } } - case pkg.CoinType_Zeta: + case coin.CoinType_Zeta: { // add the required amount into the zeta accounting. // GetAbortedAmount replaces using Outbound Amount directly, to make sure we refund the amount deposited by the user if the outbound is never created and the cctx is aborted. @@ -120,7 +121,7 @@ func SetZetaAccounting( cctx.CctxStatus.IsAbortRefunded = false } - case pkg.CoinType_Gas: + case coin.CoinType_Gas: { // CointType gas can be processed as normal and we can issue the refund using the admin refund tx . cctx.CctxStatus.IsAbortRefunded = false diff --git a/x/crosschain/migrations/v5/migrate_test.go b/x/crosschain/migrations/v5/migrate_test.go index 010c9000a4..3e9e535fda 100644 --- a/x/crosschain/migrations/v5/migrate_test.go +++ b/x/crosschain/migrations/v5/migrate_test.go @@ -7,7 +7,8 @@ import ( "cosmossdk.io/math" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" crosschainkeeper "github.com/zeta-chain/zetacore/x/crosschain/keeper" @@ -24,7 +25,7 @@ func TestMigrateStore(t *testing.T) { v4ZetaAccountingAmount := math.ZeroUint() for _, cctx := range cctxList { k.SetCrossChainTx(ctx, cctx) - if cctx.CctxStatus.Status != crosschaintypes.CctxStatus_Aborted || cctx.GetCurrentOutTxParam().CoinType != pkg.CoinType_Zeta { + if cctx.CctxStatus.Status != crosschaintypes.CctxStatus_Aborted || cctx.GetCurrentOutTxParam().CoinType != coin.CoinType_Zeta { continue } v5ZetaAccountingAmount = v5ZetaAccountingAmount.Add(crosschainkeeper.GetAbortedAmount(cctx)) @@ -45,7 +46,7 @@ func TestMigrateStore(t *testing.T) { // Check refund status of the cctx for _, cctx := range cctxListUpdated { switch cctx.InboundTxParams.CoinType { - case pkg.CoinType_ERC20: + case coin.CoinType_ERC20: receiverChain := zk.ObserverKeeper.GetSupportedChainFromChainID(ctx, cctx.GetCurrentOutTxParam().ReceiverChainId) require.NotNil(t, receiverChain) if receiverChain.IsZetaChain() { @@ -53,9 +54,9 @@ func TestMigrateStore(t *testing.T) { } else { require.False(t, cctx.CctxStatus.IsAbortRefunded) } - case pkg.CoinType_Zeta: + case coin.CoinType_Zeta: require.False(t, cctx.CctxStatus.IsAbortRefunded) - case pkg.CoinType_Gas: + case coin.CoinType_Gas: require.False(t, cctx.CctxStatus.IsAbortRefunded) } } @@ -66,8 +67,8 @@ func TestMigrateStore(t *testing.T) { func TestResetTestnetNonce(t *testing.T) { t.Run("reset only testnet nonce without changing mainnet chains", func(t *testing.T) { k, ctx, _, zk := keepertest.CrosschainKeeper(t) - testnetChains := []pkg.Chain{pkg.GoerliChain(), pkg.MumbaiChain(), pkg.BscTestnetChain(), pkg.BtcTestNetChain()} - mainnetChains := []pkg.Chain{pkg.EthChain(), pkg.BscMainnetChain(), pkg.BtcMainnetChain()} + testnetChains := []chains.Chain{chains.GoerliChain(), chains.MumbaiChain(), chains.BscTestnetChain(), chains.BtcTestNetChain()} + mainnetChains := []chains.Chain{chains.EthChain(), chains.BscMainnetChain(), chains.BtcMainnetChain()} nonceLow := int64(1) nonceHigh := int64(10) tss := sample.Tss() @@ -100,11 +101,11 @@ func TestResetTestnetNonce(t *testing.T) { } err := v5.MigrateStore(ctx, k, zk.ObserverKeeper) require.NoError(t, err) - assertValues := map[pkg.Chain]int64{ - pkg.GoerliChain(): 226841, - pkg.MumbaiChain(): 200599, - pkg.BscTestnetChain(): 110454, - pkg.BtcTestNetChain(): 4881, + assertValues := map[chains.Chain]int64{ + chains.GoerliChain(): 226841, + chains.MumbaiChain(): 200599, + chains.BscTestnetChain(): 110454, + chains.BtcTestNetChain(): 4881, } for _, chain := range testnetChains { @@ -129,7 +130,7 @@ func TestResetTestnetNonce(t *testing.T) { t.Run("reset nonce even if some chain values are missing", func(t *testing.T) { k, ctx, _, zk := keepertest.CrosschainKeeper(t) - testnetChains := []pkg.Chain{pkg.GoerliChain()} + testnetChains := []chains.Chain{chains.GoerliChain()} nonceLow := int64(1) nonceHigh := int64(10) tss := sample.Tss() @@ -149,10 +150,10 @@ func TestResetTestnetNonce(t *testing.T) { } err := v5.MigrateStore(ctx, k, zk.ObserverKeeper) require.NoError(t, err) - assertValuesSet := map[pkg.Chain]int64{ - pkg.GoerliChain(): 226841, + assertValuesSet := map[chains.Chain]int64{ + chains.GoerliChain(): 226841, } - assertValuesNotSet := []pkg.Chain{pkg.MumbaiChain(), pkg.BscTestnetChain(), pkg.BtcTestNetChain()} + assertValuesNotSet := []chains.Chain{chains.MumbaiChain(), chains.BscTestnetChain(), chains.BtcTestNetChain()} for _, chain := range testnetChains { pn, found := zk.ObserverKeeper.GetPendingNonces(ctx, tss.TssPubkey, chain.ChainId) @@ -183,11 +184,11 @@ func CrossChainTxList(count int) []crosschaintypes.CrossChainTx { CctxStatus: &crosschaintypes.Status{Status: crosschaintypes.CctxStatus_Aborted}, InboundTxParams: &crosschaintypes.InboundTxParams{ Amount: amount.Add(math.NewUint(uint64(r.Uint32()))), - CoinType: pkg.CoinType_Zeta, + CoinType: coin.CoinType_Zeta, }, OutboundTxParams: []*crosschaintypes.OutboundTxParams{{ Amount: amount, - CoinType: pkg.CoinType_Zeta, + CoinType: coin.CoinType_Zeta, }}, } for ; i < count; i++ { @@ -197,11 +198,11 @@ func CrossChainTxList(count int) []crosschaintypes.CrossChainTx { CctxStatus: &crosschaintypes.Status{Status: crosschaintypes.CctxStatus_Aborted}, InboundTxParams: &crosschaintypes.InboundTxParams{ Amount: amount, - CoinType: pkg.CoinType_Zeta, + CoinType: coin.CoinType_Zeta, }, OutboundTxParams: []*crosschaintypes.OutboundTxParams{{ Amount: math.ZeroUint(), - CoinType: pkg.CoinType_Zeta, + CoinType: coin.CoinType_Zeta, }}, } } @@ -212,12 +213,12 @@ func CrossChainTxList(count int) []crosschaintypes.CrossChainTx { CctxStatus: &crosschaintypes.Status{Status: crosschaintypes.CctxStatus_Aborted}, InboundTxParams: &crosschaintypes.InboundTxParams{ Amount: amount, - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, }, OutboundTxParams: []*crosschaintypes.OutboundTxParams{{ Amount: math.ZeroUint(), - CoinType: pkg.CoinType_ERC20, - ReceiverChainId: pkg.ZetaPrivnetChain().ChainId, + CoinType: coin.CoinType_ERC20, + ReceiverChainId: chains.ZetaPrivnetChain().ChainId, }}, } } @@ -228,12 +229,12 @@ func CrossChainTxList(count int) []crosschaintypes.CrossChainTx { CctxStatus: &crosschaintypes.Status{Status: crosschaintypes.CctxStatus_Aborted}, InboundTxParams: &crosschaintypes.InboundTxParams{ Amount: amount, - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, }, OutboundTxParams: []*crosschaintypes.OutboundTxParams{{ Amount: math.ZeroUint(), - CoinType: pkg.CoinType_ERC20, - ReceiverChainId: pkg.GoerliLocalnetChain().ChainId, + CoinType: coin.CoinType_ERC20, + ReceiverChainId: chains.GoerliLocalnetChain().ChainId, }}, } } @@ -244,11 +245,11 @@ func CrossChainTxList(count int) []crosschaintypes.CrossChainTx { CctxStatus: &crosschaintypes.Status{Status: crosschaintypes.CctxStatus_Aborted}, InboundTxParams: &crosschaintypes.InboundTxParams{ Amount: amount, - CoinType: pkg.CoinType_Gas, + CoinType: coin.CoinType_Gas, }, OutboundTxParams: []*crosschaintypes.OutboundTxParams{{ Amount: amount, - CoinType: pkg.CoinType_Gas, + CoinType: coin.CoinType_Gas, }}, } } diff --git a/x/crosschain/types/cross_chain_tx.pb.go b/x/crosschain/types/cross_chain_tx.pb.go index 17ba755231..665a7958b6 100644 --- a/x/crosschain/types/cross_chain_tx.pb.go +++ b/x/crosschain/types/cross_chain_tx.pb.go @@ -12,7 +12,7 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - proto1 "github.com/zeta-chain/zetacore/pkg/proto" + coin "github.com/zeta-chain/zetacore/pkg/coin" ) // Reference imports to suppress errors if they are not otherwise used. @@ -95,7 +95,7 @@ type InboundTxParams struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` SenderChainId int64 `protobuf:"varint,2,opt,name=sender_chain_id,json=senderChainId,proto3" json:"sender_chain_id,omitempty"` TxOrigin string `protobuf:"bytes,3,opt,name=tx_origin,json=txOrigin,proto3" json:"tx_origin,omitempty"` - CoinType proto1.CoinType `protobuf:"varint,4,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` + CoinType coin.CoinType `protobuf:"varint,4,opt,name=coin_type,json=coinType,proto3,enum=coin.CoinType" json:"coin_type,omitempty"` Asset string `protobuf:"bytes,5,opt,name=asset,proto3" json:"asset,omitempty"` Amount github_com_cosmos_cosmos_sdk_types.Uint `protobuf:"bytes,6,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Uint" json:"amount"` InboundTxObservedHash string `protobuf:"bytes,7,opt,name=inbound_tx_observed_hash,json=inboundTxObservedHash,proto3" json:"inbound_tx_observed_hash,omitempty"` @@ -159,11 +159,11 @@ func (m *InboundTxParams) GetTxOrigin() string { return "" } -func (m *InboundTxParams) GetCoinType() proto1.CoinType { +func (m *InboundTxParams) GetCoinType() coin.CoinType { if m != nil { return m.CoinType } - return proto1.CoinType_Zeta + return coin.CoinType_Zeta } func (m *InboundTxParams) GetAsset() string { @@ -249,7 +249,7 @@ var xxx_messageInfo_ZetaAccounting proto.InternalMessageInfo type OutboundTxParams struct { Receiver string `protobuf:"bytes,1,opt,name=receiver,proto3" json:"receiver,omitempty"` ReceiverChainId int64 `protobuf:"varint,2,opt,name=receiver_chainId,json=receiverChainId,proto3" json:"receiver_chainId,omitempty"` - CoinType proto1.CoinType `protobuf:"varint,3,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` + CoinType coin.CoinType `protobuf:"varint,3,opt,name=coin_type,json=coinType,proto3,enum=coin.CoinType" json:"coin_type,omitempty"` Amount github_com_cosmos_cosmos_sdk_types.Uint `protobuf:"bytes,4,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Uint" json:"amount"` OutboundTxTssNonce uint64 `protobuf:"varint,5,opt,name=outbound_tx_tss_nonce,json=outboundTxTssNonce,proto3" json:"outbound_tx_tss_nonce,omitempty"` OutboundTxGasLimit uint64 `protobuf:"varint,6,opt,name=outbound_tx_gas_limit,json=outboundTxGasLimit,proto3" json:"outbound_tx_gas_limit,omitempty"` @@ -313,11 +313,11 @@ func (m *OutboundTxParams) GetReceiverChainId() int64 { return 0 } -func (m *OutboundTxParams) GetCoinType() proto1.CoinType { +func (m *OutboundTxParams) GetCoinType() coin.CoinType { if m != nil { return m.CoinType } - return proto1.CoinType_Zeta + return coin.CoinType_Zeta } func (m *OutboundTxParams) GetOutboundTxTssNonce() uint64 { @@ -556,78 +556,78 @@ func init() { func init() { proto.RegisterFile("crosschain/cross_chain_tx.proto", fileDescriptor_af3a0ad055343c21) } var fileDescriptor_af3a0ad055343c21 = []byte{ - // 1121 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xdd, 0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, 0xfc, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfb, 0xe0, 0xd3, 0xd8, 0x9a, 0x0a, 0x00, - 0x00, + // 1125 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x5d, 0x4f, 0x1b, 0x47, + 0x17, 0xf6, 0xc6, 0xc6, 0xd8, 0xc7, 0x60, 0x2f, 0x83, 0xe1, 0x5d, 0x91, 0x37, 0xb6, 0xe5, 0x36, + 0x89, 0x93, 0x2a, 0xb6, 0x20, 0xaa, 0x22, 0xf5, 0x0e, 0x28, 0x24, 0x28, 0x09, 0xa0, 0x2d, 0xdc, + 0x20, 0x55, 0xdb, 0xf1, 0xee, 0x60, 0x8f, 0xb0, 0x77, 0xdc, 0x9d, 0x31, 0x32, 0x51, 0x7f, 0x44, + 0xd5, 0xdf, 0xd0, 0x8b, 0xfe, 0x94, 0x5c, 0x54, 0x6a, 0x2e, 0xab, 0x5e, 0xa0, 0x0a, 0x2e, 0x7b, + 0xd7, 0x5f, 0x50, 0xcd, 0xc7, 0xda, 0x8b, 0xcb, 0x47, 0xbf, 0xae, 0xf6, 0xcc, 0x99, 0x79, 0x9e, + 0x73, 0x76, 0xce, 0x73, 0x66, 0x06, 0xaa, 0x7e, 0xc4, 0x38, 0xf7, 0xbb, 0x98, 0x86, 0x2d, 0x65, + 0x7a, 0xca, 0xf6, 0xc4, 0xa8, 0x39, 0x88, 0x98, 0x60, 0xe8, 0xc1, 0x3b, 0x22, 0xb0, 0xf2, 0x35, + 0x95, 0xc5, 0x22, 0xd2, 0x9c, 0x60, 0x56, 0xca, 0x1d, 0xd6, 0x61, 0x6a, 0x65, 0x4b, 0x5a, 0x1a, + 0xb4, 0xb2, 0x38, 0x38, 0xe9, 0xb4, 0x7c, 0x26, 0x39, 0x19, 0x0d, 0xb5, 0xb3, 0xfe, 0x5b, 0x06, + 0x4a, 0x3b, 0x61,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, 0xb7, 0x97, 0x95, 0xd4, 0x87, 0xcb, 0x4a, 0xea, 0xe7, 0xcb, 0x4a, 0xea, 0x68, 0x35, + 0xa1, 0x2b, 0xb9, 0x4f, 0xcf, 0xf4, 0x8b, 0x33, 0xde, 0xb2, 0xd6, 0xa8, 0x95, 0x78, 0x87, 0x2a, + 0x99, 0xb5, 0xb3, 0xea, 0xd5, 0xf8, 0xfc, 0x8f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xec, 0x1d, 0x5c, + 0x64, 0xa2, 0x0a, 0x00, 0x00, } func (m *InboundTxParams) Marshal() (dAtA []byte, err error) { @@ -1338,7 +1338,7 @@ func (m *InboundTxParams) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CoinType |= proto1.CoinType(b&0x7F) << shift + m.CoinType |= coin.CoinType(b&0x7F) << shift if b < 0x80 { break } @@ -1729,7 +1729,7 @@ func (m *OutboundTxParams) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CoinType |= proto1.CoinType(b&0x7F) << shift + m.CoinType |= coin.CoinType(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/crosschain/types/events.pb.go b/x/crosschain/types/events.pb.go index 2f2b5aa604..39d521d4a7 100644 --- a/x/crosschain/types/events.pb.go +++ b/x/crosschain/types/events.pb.go @@ -11,7 +11,6 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - _ "github.com/zeta-chain/zetacore/pkg/proto" ) // Reference imports to suppress errors if they are not otherwise used. @@ -581,48 +580,47 @@ func init() { func init() { proto.RegisterFile("crosschain/events.proto", fileDescriptor_7398db8b12b87b9e) } var fileDescriptor_7398db8b12b87b9e = []byte{ - // 651 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x95, 0xdf, 0x4e, 0x13, 0x4f, - 0x14, 0xc7, 0x59, 0x68, 0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, 0xb6, 0xad, 0x10, 0xde, - 0x40, 0x0d, 0x0d, 0x22, 0x06, 0x85, 0xe7, 0x5c, 0xaa, 0x88, 0xc2, 0x9b, 0xa8, 0x69, 0x72, 0x22, - 0x15, 0xe3, 0x02, 0xd7, 0x5c, 0x66, 0xde, 0xe4, 0x3b, 0x36, 0x0c, 0x97, 0x51, 0x9d, 0x6a, 0x0d, - 0x06, 0xd7, 0x9d, 0xee, 0x83, 0xf0, 0x16, 0x42, 0x5c, 0x10, 0x93, 0x93, 0x84, 0xea, 0x04, 0x37, - 0x5c, 0xaa, 0xc9, 0xc5, 0x7e, 0xbe, 0x45, 0x75, 0x12, 0xde, 0x45, 0x4b, 0x5c, 0x90, 0x51, 0x2a, - 0xa3, 0x43, 0x92, 0x00, 0x67, 0x89, 0xc1, 0xf3, 0xae, 0xa4, 0xcd, 0xc5, 0x86, 0x55, 0xb7, 0x9c, - 0x18, 0x76, 0x51, 0x53, 0x41, 0x04, 0xfc, 0x08, 0x14, 0x6e, 0xfa, 0x1e, 0x65, 0x1c, 0xde, 0x41, - 0x9d, 0xf2, 0x4c, 0x9c, 0x79, 0xb8, 0xe5, 0x5b, 0x94, 0xea, 0xd0, 0x8a, 0xf6, 0x45, 0x74, 0x2c, - 0x33, 0x61, 0x30, 0xf2, 0x2f, 0xf2, 0x51, 0x78, 0x0f, 0x2d, 0x29, 0x48, 0xe9, 0x09, 0xc4, 0x64, - 0x0c, 0x5a, 0x53, 0x06, 0x78, 0xc1, 0x15, 0x74, 0x0a, 0xf9, 0xb9, 0x57, 0xad, 0x63, 0x02, 0x8e, - 0x89, 0x36, 0xd4, 0x64, 0x1a, 0x2f, 0x7a, 0xc7, 0x04, 0x1c, 0xef, 0x39, 0xc1, 0x62, 0xf8, 0xd4, - 0xf7, 0x36, 0x6d, 0x8f, 0xe1, 0xd5, 0xb2, 0xcb, 0x6d, 0xb4, 0xe8, 0xad, 0x2c, 0x58, 0x3b, 0xae, - 0x68, 0xc1, 0x6b, 0x8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 0x94, 0xbc, 0x01, 0x28, 0x5f, 0xd5, - 0xb9, 0x94, 0x37, 0x01, 0xf4, 0xc6, 0xb3, 0x4f, 0xe7, 0xbd, 0xe0, 0xec, 0xbc, 0x17, 0x7c, 0x3d, - 0xef, 0x05, 0x6f, 0x2f, 0x7a, 0x33, 0x67, 0x17, 0xbd, 0x99, 0x2f, 0x17, 0xbd, 0x99, 0x83, 0x47, - 0x8c, 0x9b, 0x24, 0x1b, 0xf5, 0x23, 0x39, 0x1e, 0xd8, 0x5d, 0xf1, 0xd0, 0xaf, 0x93, 0x72, 0x6d, - 0x0c, 0xf2, 0xc1, 0x95, 0x25, 0x63, 0xad, 0xd7, 0xa3, 0x86, 0x5b, 0x10, 0x8f, 0xbf, 0x05, 0x00, - 0x00, 0xff, 0xff, 0xdd, 0x9e, 0xb3, 0xe1, 0x7f, 0x06, 0x00, 0x00, + // 640 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x95, 0xdf, 0x4e, 0x14, 0x31, + 0x14, 0xc6, 0x19, 0xd8, 0x5d, 0x76, 0x0b, 0x2c, 0x66, 0x82, 0x52, 0x89, 0x4c, 0x90, 0xc4, 0x3f, + 0x17, 0xba, 0x1b, 0xe3, 0x1b, 0xb0, 0x11, 0x21, 0xc6, 0x60, 0x00, 0xa3, 0xe1, 0xa6, 0xe9, 0x4e, + 0x8f, 0x33, 0x8d, 0xb3, 0xed, 0xa6, 0xed, 0xc0, 0xc0, 0x53, 0x18, 0xdf, 0xc3, 0xc4, 0x07, 0xf0, + 0x01, 0xbc, 0xe4, 0xc2, 0x0b, 0x2f, 0x0d, 0xbc, 0x88, 0x69, 0x3b, 0x23, 0xec, 0x60, 0xf4, 0xc2, + 0x68, 0xe2, 0x5d, 0xcf, 0x77, 0x4e, 0x0f, 0xbf, 0x7e, 0x67, 0xd8, 0x83, 0x96, 0x63, 0x25, 0xb5, + 0x8e, 0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 0x72, 0x05, 0x7f, + 0x8e, 0xbb, 0x8a, 0x90, 0xcc, 0x58, 0xf5, 0x87, 0x3d, 0x72, 0x47, 0x66, 0xac, 0xfc, 0x4a, 0x27, + 0xb9, 0x1a, 0x3f, 0xf9, 0x88, 0x0f, 0x69, 0x96, 0x03, 0x29, 0x07, 0xc3, 0x4a, 0xf4, 0x05, 0xa7, + 0xee, 0x96, 0xe2, 0x55, 0xfc, 0xbd, 0x3c, 0x8e, 0x41, 0xeb, 0xff, 0x04, 0xff, 0x7d, 0x80, 0x56, + 0x1c, 0xfe, 0x60, 0xb0, 0xff, 0xfa, 0x29, 0xd5, 0x2f, 0x14, 0x8f, 0x61, 0x5b, 0xc4, 0x0a, 0xa8, + 0x06, 0x56, 0x43, 0x0c, 0xea, 0x88, 0x0f, 0x50, 0x98, 0x50, 0x4d, 0xc6, 0xf6, 0x12, 0xe1, 0xe5, + 0xad, 0xf2, 0x25, 0xd7, 0x92, 0x5a, 0x37, 0xfb, 0xf3, 0x42, 0x19, 0xe3, 0x86, 0x4b, 0x41, 0x33, + 0xf2, 0x06, 0xa0, 0x7a, 0x55, 0xf7, 0x42, 0xde, 0x04, 0xd0, 0x1b, 0xcf, 0x3e, 0x9f, 0x45, 0xc1, + 0xe9, 0x59, 0x14, 0x7c, 0x3b, 0x8b, 0x82, 0x77, 0xe7, 0xd1, 0xd4, 0xe9, 0x79, 0x34, 0xf5, 0xf5, + 0x3c, 0x9a, 0x3a, 0x78, 0x94, 0x70, 0x93, 0xe6, 0xc3, 0x5e, 0x2c, 0x47, 0x7d, 0xbb, 0x1c, 0x1e, + 0xfa, 0xfd, 0x51, 0xed, 0x89, 0x7e, 0xd1, 0xbf, 0xb4, 0x55, 0xac, 0xf5, 0x7a, 0xd8, 0x72, 0x0b, + 0xe2, 0xf1, 0xf7, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd0, 0xf3, 0x4a, 0xbd, 0x70, 0x06, 0x00, 0x00, } func (m *EventInboundFinalized) Marshal() (dAtA []byte, err error) { diff --git a/x/crosschain/types/expected_keepers.go b/x/crosschain/types/expected_keepers.go index e8a11b2d44..eb291938c4 100644 --- a/x/crosschain/types/expected_keepers.go +++ b/x/crosschain/types/expected_keepers.go @@ -9,7 +9,9 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" eth "github.com/ethereum/go-ethereum/common" evmtypes "github.com/evmos/ethermint/x/evm/types" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" + "github.com/zeta-chain/zetacore/pkg/proofs" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" fungibletypes "github.com/zeta-chain/zetacore/x/fungible/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" @@ -46,9 +48,9 @@ type ObserverKeeper interface { AddVoteToBallot(ctx sdk.Context, ballot observertypes.Ballot, address string, observationType observertypes.VoteType) (observertypes.Ballot, error) CheckIfFinalizingVote(ctx sdk.Context, ballot observertypes.Ballot) (observertypes.Ballot, bool) IsAuthorized(ctx sdk.Context, address string) bool - FindBallot(ctx sdk.Context, index string, chain *pkg.Chain, observationType observertypes.ObservationType) (ballot observertypes.Ballot, isNew bool, err error) + FindBallot(ctx sdk.Context, index string, chain *chains.Chain, observationType observertypes.ObservationType) (ballot observertypes.Ballot, isNew bool, err error) AddBallotToList(ctx sdk.Context, ballot observertypes.Ballot) - GetBlockHeader(ctx sdk.Context, hash []byte) (val pkg.BlockHeader, found bool) + GetBlockHeader(ctx sdk.Context, hash []byte) (val proofs.BlockHeader, found bool) CheckIfTssPubkeyHasBeenGenerated(ctx sdk.Context, tssPubkey string) (observertypes.TSS, bool) GetAllTSS(ctx sdk.Context) (list []observertypes.TSS) GetTSS(ctx sdk.Context) (val observertypes.TSS, found bool) @@ -75,7 +77,7 @@ type ObserverKeeper interface { ctx sdk.Context, senderChainID int64, receiverChainID int64, - coinType pkg.CoinType, + coinType coin.CoinType, voter string, ballotIndex string, inTxHash string, @@ -84,11 +86,11 @@ type ObserverKeeper interface { ctx sdk.Context, ballotIndex string, outTxChainID int64, - receiveStatus pkg.ReceiveStatus, + receiveStatus chains.ReceiveStatus, voter string, ) (bool, bool, observertypes.Ballot, string, error) - GetSupportedChainFromChainID(ctx sdk.Context, chainID int64) *pkg.Chain - GetSupportedChains(ctx sdk.Context) []*pkg.Chain + GetSupportedChainFromChainID(ctx sdk.Context, chainID int64) *chains.Chain + GetSupportedChains(ctx sdk.Context) []*chains.Chain } type FungibleKeeper interface { @@ -120,7 +122,7 @@ type FungibleKeeper interface { amount *big.Int, senderChainID int64, data []byte, - coinType pkg.CoinType, + coinType coin.CoinType, asset string, ) (*evmtypes.MsgEthereumTxResponse, bool, error) CallUniswapV2RouterSwapExactTokensForTokens( @@ -154,7 +156,7 @@ type FungibleKeeper interface { name, symbol string, decimals uint8, chainID int64, - coinType pkg.CoinType, + coinType coin.CoinType, erc20Contract string, gasLimit *big.Int, ) (eth.Address, error) diff --git a/x/crosschain/types/in_tx_tracker.pb.go b/x/crosschain/types/in_tx_tracker.pb.go index 41df88abf9..244ec7aec3 100644 --- a/x/crosschain/types/in_tx_tracker.pb.go +++ b/x/crosschain/types/in_tx_tracker.pb.go @@ -10,7 +10,7 @@ import ( math_bits "math/bits" proto "github.com/gogo/protobuf/proto" - proto1 "github.com/zeta-chain/zetacore/pkg/proto" + coin "github.com/zeta-chain/zetacore/pkg/coin" ) // Reference imports to suppress errors if they are not otherwise used. @@ -25,9 +25,9 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type InTxTracker struct { - ChainId int64 `protobuf:"varint,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - TxHash string `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` - CoinType proto1.CoinType `protobuf:"varint,3,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` + ChainId int64 `protobuf:"varint,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + TxHash string `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + CoinType coin.CoinType `protobuf:"varint,3,opt,name=coin_type,json=coinType,proto3,enum=coin.CoinType" json:"coin_type,omitempty"` } func (m *InTxTracker) Reset() { *m = InTxTracker{} } @@ -77,11 +77,11 @@ func (m *InTxTracker) GetTxHash() string { return "" } -func (m *InTxTracker) GetCoinType() proto1.CoinType { +func (m *InTxTracker) GetCoinType() coin.CoinType { if m != nil { return m.CoinType } - return proto1.CoinType_Zeta + return coin.CoinType_Zeta } func init() { @@ -91,22 +91,22 @@ func init() { func init() { proto.RegisterFile("crosschain/in_tx_tracker.proto", fileDescriptor_799b411f065af0ce) } var fileDescriptor_799b411f065af0ce = []byte{ - // 238 bytes of a gzipped FileDescriptorProto + // 240 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0x2e, 0xca, 0x2f, 0x2e, 0x4e, 0xce, 0x48, 0xcc, 0xcc, 0xd3, 0xcf, 0xcc, 0x8b, 0x2f, 0xa9, 0x88, 0x2f, 0x29, 0x4a, 0x4c, 0xce, 0x4e, 0x2d, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0xad, 0x4a, 0x2d, 0x49, - 0x04, 0x4b, 0xeb, 0x81, 0x59, 0xf9, 0x45, 0xa9, 0x7a, 0x08, 0x2d, 0x52, 0xbc, 0x05, 0xd9, 0xe9, - 0xfa, 0x05, 0xd9, 0xe9, 0x10, 0xd5, 0x4a, 0xb9, 0x5c, 0xdc, 0x9e, 0x79, 0x21, 0x15, 0x21, 0x10, - 0x23, 0x84, 0x24, 0xb9, 0x38, 0xc0, 0xca, 0xe2, 0x33, 0x53, 0x24, 0x18, 0x15, 0x18, 0x35, 0x98, - 0x83, 0xd8, 0xc1, 0x7c, 0xcf, 0x14, 0x21, 0x71, 0x2e, 0xf6, 0x92, 0x8a, 0xf8, 0x8c, 0xc4, 0xe2, - 0x0c, 0x09, 0x26, 0x05, 0x46, 0x0d, 0xce, 0x20, 0xb6, 0x92, 0x0a, 0x8f, 0xc4, 0xe2, 0x0c, 0x21, - 0x2d, 0x2e, 0xce, 0xe4, 0x7c, 0x90, 0x4b, 0x2a, 0x0b, 0x52, 0x25, 0x98, 0x15, 0x18, 0x35, 0xf8, - 0x8c, 0x78, 0xf5, 0x40, 0x36, 0x38, 0xe7, 0x67, 0xe6, 0x85, 0x54, 0x16, 0xa4, 0x06, 0x71, 0x24, - 0x43, 0x59, 0x4e, 0xde, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, - 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x65, 0x98, - 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x0f, 0x72, 0xb7, 0x2e, 0xc4, 0x87, - 0x30, 0x2f, 0xe8, 0x57, 0xe8, 0x23, 0xf9, 0x1b, 0x64, 0x55, 0x71, 0x12, 0x1b, 0xd8, 0x0b, 0xc6, - 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xce, 0xc2, 0x70, 0x12, 0x01, 0x00, 0x00, + 0x04, 0x4b, 0xeb, 0x81, 0x59, 0xf9, 0x45, 0xa9, 0x7a, 0x08, 0x2d, 0x52, 0xc2, 0x05, 0xd9, 0xe9, + 0xfa, 0xc9, 0xf9, 0x99, 0x79, 0x60, 0x02, 0xa2, 0x47, 0x29, 0x8f, 0x8b, 0xdb, 0x33, 0x2f, 0xa4, + 0x22, 0x04, 0x62, 0x90, 0x90, 0x24, 0x17, 0x07, 0x58, 0x71, 0x7c, 0x66, 0x8a, 0x04, 0xa3, 0x02, + 0xa3, 0x06, 0x73, 0x10, 0x3b, 0x98, 0xef, 0x99, 0x22, 0x24, 0xce, 0xc5, 0x5e, 0x52, 0x11, 0x9f, + 0x91, 0x58, 0x9c, 0x21, 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0x19, 0xc4, 0x56, 0x52, 0xe1, 0x91, 0x58, + 0x9c, 0x21, 0xa4, 0xcd, 0xc5, 0x09, 0x32, 0x30, 0xbe, 0xa4, 0xb2, 0x20, 0x55, 0x82, 0x59, 0x81, + 0x51, 0x83, 0xcf, 0x88, 0x4f, 0x0f, 0x6c, 0x85, 0x73, 0x7e, 0x66, 0x5e, 0x48, 0x65, 0x41, 0x6a, + 0x10, 0x47, 0x32, 0x94, 0xe5, 0xe4, 0x7d, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, + 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, + 0x51, 0x86, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x20, 0xe7, 0xeb, + 0x42, 0x3c, 0x0a, 0xf3, 0x89, 0x7e, 0x85, 0x3e, 0x92, 0xf7, 0x41, 0x76, 0x15, 0x27, 0xb1, 0x81, + 0xfd, 0x60, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xba, 0x1e, 0xbf, 0xb5, 0x19, 0x01, 0x00, 0x00, } func (m *InTxTracker) Marshal() (dAtA []byte, err error) { @@ -279,7 +279,7 @@ func (m *InTxTracker) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CoinType |= proto1.CoinType(b&0x7F) << shift + m.CoinType |= coin.CoinType(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/crosschain/types/message_add_to_in_tx_tracker.go b/x/crosschain/types/message_add_to_in_tx_tracker.go index f48f250663..66498192a7 100644 --- a/x/crosschain/types/message_add_to_in_tx_tracker.go +++ b/x/crosschain/types/message_add_to_in_tx_tracker.go @@ -4,14 +4,15 @@ import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" ) const TypeMsgAddToInTxTracker = "AddToInTxTracker" var _ sdk.Msg = &MsgAddToInTxTracker{} -func NewMsgAddToInTxTracker(creator string, chain int64, coinType pkg.CoinType, txHash string) *MsgAddToInTxTracker { +func NewMsgAddToInTxTracker(creator string, chain int64, coinType coin.CoinType, txHash string) *MsgAddToInTxTracker { return &MsgAddToInTxTracker{ Creator: creator, ChainId: chain, @@ -46,14 +47,14 @@ func (msg *MsgAddToInTxTracker) ValidateBasic() error { if err != nil { return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) } - chain := pkg.GetChainFromChainID(msg.ChainId) + chain := chains.GetChainFromChainID(msg.ChainId) if chain == nil { return errorsmod.Wrapf(ErrInvalidChainID, "chain id (%d)", msg.ChainId) } if msg.Proof != nil && !chain.SupportMerkleProof() { return errorsmod.Wrapf(ErrProofVerificationFail, "chain id %d does not support proof-based trackers", msg.ChainId) } - _, ok := pkg.CoinType_value[msg.CoinType.String()] + _, ok := coin.CoinType_value[msg.CoinType.String()] if !ok { return errorsmod.Wrapf(ErrProofVerificationFail, "coin-type not supported") } diff --git a/x/crosschain/types/message_add_to_in_tx_tracker_test.go b/x/crosschain/types/message_add_to_in_tx_tracker_test.go index 1884a8e14d..b145737eaa 100644 --- a/x/crosschain/types/message_add_to_in_tx_tracker_test.go +++ b/x/crosschain/types/message_add_to_in_tx_tracker_test.go @@ -7,7 +7,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" + "github.com/zeta-chain/zetacore/pkg/proofs" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/crosschain/types" ) @@ -22,8 +24,8 @@ func TestMsgAddToInTxTracker_ValidateBasic(t *testing.T) { name: "invalid address", msg: types.NewMsgAddToInTxTracker( "invalid_address", - pkg.GoerliChain().ChainId, - pkg.CoinType_Gas, + chains.GoerliChain().ChainId, + coin.CoinType_Gas, "hash", ), err: sdkerrors.ErrInvalidAddress, @@ -33,7 +35,7 @@ func TestMsgAddToInTxTracker_ValidateBasic(t *testing.T) { msg: types.NewMsgAddToInTxTracker( sample.AccAddress(), 42, - pkg.CoinType_Gas, + coin.CoinType_Gas, "hash", ), err: errorsmod.Wrapf(types.ErrInvalidChainID, "chain id (%d)", 42), @@ -42,17 +44,17 @@ func TestMsgAddToInTxTracker_ValidateBasic(t *testing.T) { name: "invalid proof", msg: &types.MsgAddToInTxTracker{ Creator: sample.AccAddress(), - ChainId: pkg.ZetaTestnetChain().ChainId, - CoinType: pkg.CoinType_Gas, - Proof: &pkg.Proof{}, + ChainId: chains.ZetaTestnetChain().ChainId, + CoinType: coin.CoinType_Gas, + Proof: &proofs.Proof{}, }, - err: errorsmod.Wrapf(types.ErrProofVerificationFail, "chain id %d does not support proof-based trackers", pkg.ZetaTestnetChain().ChainId), + err: errorsmod.Wrapf(types.ErrProofVerificationFail, "chain id %d does not support proof-based trackers", chains.ZetaTestnetChain().ChainId), }, { name: "invalid coin type", msg: &types.MsgAddToInTxTracker{ Creator: sample.AccAddress(), - ChainId: pkg.ZetaTestnetChain().ChainId, + ChainId: chains.ZetaTestnetChain().ChainId, CoinType: 5, }, err: errorsmod.Wrapf(types.ErrProofVerificationFail, "coin-type not supported"), @@ -61,8 +63,8 @@ func TestMsgAddToInTxTracker_ValidateBasic(t *testing.T) { name: "valid", msg: types.NewMsgAddToInTxTracker( sample.AccAddress(), - pkg.GoerliChain().ChainId, - pkg.CoinType_Gas, + chains.GoerliChain().ChainId, + coin.CoinType_Gas, "hash", ), err: nil, @@ -91,8 +93,8 @@ func TestMsgAddToInTxTracker_GetSigners(t *testing.T) { name: "valid signer", msg: types.NewMsgAddToInTxTracker( signer, - pkg.GoerliChain().ChainId, - pkg.CoinType_Gas, + chains.GoerliChain().ChainId, + coin.CoinType_Gas, "hash", ), panics: false, @@ -101,8 +103,8 @@ func TestMsgAddToInTxTracker_GetSigners(t *testing.T) { name: "invalid signer", msg: types.NewMsgAddToInTxTracker( "invalid_address", - pkg.GoerliChain().ChainId, - pkg.CoinType_Gas, + chains.GoerliChain().ChainId, + coin.CoinType_Gas, "hash", ), panics: true, @@ -126,8 +128,8 @@ func TestMsgAddToInTxTracker_GetSigners(t *testing.T) { func TestMsgAddToInTxTracker_Type(t *testing.T) { msg := types.NewMsgAddToInTxTracker( sample.AccAddress(), - pkg.GoerliChain().ChainId, - pkg.CoinType_Gas, + chains.GoerliChain().ChainId, + coin.CoinType_Gas, "hash", ) require.Equal(t, types.TypeMsgAddToInTxTracker, msg.Type()) @@ -136,8 +138,8 @@ func TestMsgAddToInTxTracker_Type(t *testing.T) { func TestMsgAddToInTxTracker_Route(t *testing.T) { msg := types.NewMsgAddToInTxTracker( sample.AccAddress(), - pkg.GoerliChain().ChainId, - pkg.CoinType_Gas, + chains.GoerliChain().ChainId, + coin.CoinType_Gas, "hash", ) require.Equal(t, types.RouterKey, msg.Route()) @@ -146,8 +148,8 @@ func TestMsgAddToInTxTracker_Route(t *testing.T) { func TestMsgAddToInTxTracker_GetSignBytes(t *testing.T) { msg := types.NewMsgAddToInTxTracker( sample.AccAddress(), - pkg.GoerliChain().ChainId, - pkg.CoinType_Gas, + chains.GoerliChain().ChainId, + coin.CoinType_Gas, "hash", ) require.NotPanics(t, func() { diff --git a/x/crosschain/types/message_add_to_out_tx_tracker.go b/x/crosschain/types/message_add_to_out_tx_tracker.go index 71f2c312b2..4e1900bb65 100644 --- a/x/crosschain/types/message_add_to_out_tx_tracker.go +++ b/x/crosschain/types/message_add_to_out_tx_tracker.go @@ -4,7 +4,7 @@ import ( cosmoserrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/proofs" ) const TypeMsgAddToOutTxTracker = "AddToTracker" @@ -16,7 +16,7 @@ func NewMsgAddToOutTxTracker( chain int64, nonce uint64, txHash string, - proof *pkg.Proof, + proof *proofs.Proof, blockHash string, txIndex int64, ) *MsgAddToOutTxTracker { diff --git a/x/crosschain/types/message_gas_price_voter.go b/x/crosschain/types/message_gas_price_voter.go index 954cc54f9d..89dc8030c4 100644 --- a/x/crosschain/types/message_gas_price_voter.go +++ b/x/crosschain/types/message_gas_price_voter.go @@ -4,7 +4,7 @@ import ( cosmoserrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/authz" ) var _ sdk.Msg = &MsgGasPriceVoter{} @@ -24,7 +24,7 @@ func (msg *MsgGasPriceVoter) Route() string { } func (msg *MsgGasPriceVoter) Type() string { - return pkg.GasPriceVoter.String() + return authz.GasPriceVoter.String() } func (msg *MsgGasPriceVoter) GetSigners() []sdk.AccAddress { diff --git a/x/crosschain/types/message_gas_price_voter_test.go b/x/crosschain/types/message_gas_price_voter_test.go index d0cf868333..10ce98a1bd 100644 --- a/x/crosschain/types/message_gas_price_voter_test.go +++ b/x/crosschain/types/message_gas_price_voter_test.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/authz" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/crosschain/types" ) @@ -103,7 +103,7 @@ func TestMsgGasPriceVoter_Type(t *testing.T) { msg := types.MsgGasPriceVoter{ Creator: sample.AccAddress(), } - require.Equal(t, pkg.GasPriceVoter.String(), msg.Type()) + require.Equal(t, authz.GasPriceVoter.String(), msg.Type()) } func TestMsgGasPriceVoter_Route(t *testing.T) { diff --git a/x/crosschain/types/message_migrate_tss_funds.go b/x/crosschain/types/message_migrate_tss_funds.go index 818fe907e0..cb78371d43 100644 --- a/x/crosschain/types/message_migrate_tss_funds.go +++ b/x/crosschain/types/message_migrate_tss_funds.go @@ -5,7 +5,7 @@ import ( sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" ) const TypeMsgMigrateTssFunds = "MigrateTssFunds" @@ -46,7 +46,7 @@ func (msg *MsgMigrateTssFunds) ValidateBasic() error { if err != nil { return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) } - if pkg.GetChainFromChainID(msg.ChainId) == nil { + if chains.GetChainFromChainID(msg.ChainId) == nil { return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "invalid chain id (%d)", msg.ChainId) } if msg.Amount.IsZero() { diff --git a/x/crosschain/types/message_migrate_tss_funds_test.go b/x/crosschain/types/message_migrate_tss_funds_test.go index 6b6ca5126a..f882cf90fa 100644 --- a/x/crosschain/types/message_migrate_tss_funds_test.go +++ b/x/crosschain/types/message_migrate_tss_funds_test.go @@ -6,7 +6,7 @@ import ( sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/crosschain/types" @@ -23,7 +23,7 @@ func TestNewMsgMigrateTssFunds_ValidateBasic(t *testing.T) { name: "invalid creator", msg: types.NewMsgMigrateTssFunds( "invalid address", - pkg.DefaultChainsList()[0].ChainId, + chains.DefaultChainsList()[0].ChainId, sdkmath.NewUintFromString("100000"), ), error: true, @@ -41,7 +41,7 @@ func TestNewMsgMigrateTssFunds_ValidateBasic(t *testing.T) { name: "invalid amount", msg: types.NewMsgMigrateTssFunds( sample.AccAddress(), - pkg.DefaultChainsList()[0].ChainId, + chains.DefaultChainsList()[0].ChainId, sdkmath.NewUintFromString("0"), ), error: true, @@ -50,7 +50,7 @@ func TestNewMsgMigrateTssFunds_ValidateBasic(t *testing.T) { name: "valid msg", msg: types.NewMsgMigrateTssFunds( sample.AccAddress(), - pkg.DefaultChainsList()[0].ChainId, + chains.DefaultChainsList()[0].ChainId, sdkmath.NewUintFromString("100000"), ), error: false, @@ -80,7 +80,7 @@ func TestNewMsgMigrateTssFunds_GetSigners(t *testing.T) { name: "valid signer", msg: types.MsgMigrateTssFunds{ Creator: signer, - ChainId: pkg.DefaultChainsList()[0].ChainId, + ChainId: chains.DefaultChainsList()[0].ChainId, Amount: sdkmath.NewUintFromString("100000"), }, panics: false, @@ -89,7 +89,7 @@ func TestNewMsgMigrateTssFunds_GetSigners(t *testing.T) { name: "invalid signer", msg: types.MsgMigrateTssFunds{ Creator: "invalid_address", - ChainId: pkg.DefaultChainsList()[0].ChainId, + ChainId: chains.DefaultChainsList()[0].ChainId, Amount: sdkmath.NewUintFromString("100000"), }, panics: true, @@ -113,7 +113,7 @@ func TestNewMsgMigrateTssFunds_GetSigners(t *testing.T) { func TestNewMsgMigrateTssFunds_Type(t *testing.T) { msg := types.MsgMigrateTssFunds{ Creator: sample.AccAddress(), - ChainId: pkg.DefaultChainsList()[0].ChainId, + ChainId: chains.DefaultChainsList()[0].ChainId, Amount: sdkmath.NewUintFromString("100000"), } require.Equal(t, types.TypeMsgMigrateTssFunds, msg.Type()) @@ -122,7 +122,7 @@ func TestNewMsgMigrateTssFunds_Type(t *testing.T) { func TestNewMsgMigrateTssFunds_Route(t *testing.T) { msg := types.MsgMigrateTssFunds{ Creator: sample.AccAddress(), - ChainId: pkg.DefaultChainsList()[0].ChainId, + ChainId: chains.DefaultChainsList()[0].ChainId, Amount: sdkmath.NewUintFromString("100000"), } require.Equal(t, types.RouterKey, msg.Route()) @@ -131,7 +131,7 @@ func TestNewMsgMigrateTssFunds_Route(t *testing.T) { func TestNewMsgMigrateTssFunds_GetSignBytes(t *testing.T) { msg := types.MsgMigrateTssFunds{ Creator: sample.AccAddress(), - ChainId: pkg.DefaultChainsList()[0].ChainId, + ChainId: chains.DefaultChainsList()[0].ChainId, Amount: sdkmath.NewUintFromString("100000"), } require.NotPanics(t, func() { diff --git a/x/crosschain/types/message_tss_voter.go b/x/crosschain/types/message_tss_voter.go index 86fcd836b9..dc9abc4ccb 100644 --- a/x/crosschain/types/message_tss_voter.go +++ b/x/crosschain/types/message_tss_voter.go @@ -6,14 +6,14 @@ import ( cosmoserrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" ) const TypeMsgCreateTSSVoter = "CreateTSSVoter" var _ sdk.Msg = &MsgCreateTSSVoter{} -func NewMsgCreateTSSVoter(creator string, pubkey string, keygenZetaHeight int64, status pkg.ReceiveStatus) *MsgCreateTSSVoter { +func NewMsgCreateTSSVoter(creator string, pubkey string, keygenZetaHeight int64, status chains.ReceiveStatus) *MsgCreateTSSVoter { return &MsgCreateTSSVoter{ Creator: creator, TssPubkey: pubkey, diff --git a/x/crosschain/types/message_tss_voter_test.go b/x/crosschain/types/message_tss_voter_test.go index 6f8df9f43a..8c87c0e552 100644 --- a/x/crosschain/types/message_tss_voter_test.go +++ b/x/crosschain/types/message_tss_voter_test.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/crosschain/types" @@ -20,11 +20,11 @@ func TestMsgCreateTSSVoter_ValidateBasic(t *testing.T) { }{ { name: "valid message", - msg: types.NewMsgCreateTSSVoter(sample.AccAddress(), "pubkey", 1, pkg.ReceiveStatus_Created), + msg: types.NewMsgCreateTSSVoter(sample.AccAddress(), "pubkey", 1, chains.ReceiveStatus_Created), }, { name: "invalid creator address", - msg: types.NewMsgCreateTSSVoter("invalid", "pubkey", 1, pkg.ReceiveStatus_Created), + msg: types.NewMsgCreateTSSVoter("invalid", "pubkey", 1, chains.ReceiveStatus_Created), err: sdkerrors.ErrInvalidAddress, }, } @@ -50,12 +50,12 @@ func TestMsgCreateTSSVoter_GetSigners(t *testing.T) { }{ { name: "valid signer", - msg: types.NewMsgCreateTSSVoter(signer, "pubkey", 1, pkg.ReceiveStatus_Created), + msg: types.NewMsgCreateTSSVoter(signer, "pubkey", 1, chains.ReceiveStatus_Created), panics: false, }, { name: "invalid signer", - msg: types.NewMsgCreateTSSVoter("invalid", "pubkey", 1, pkg.ReceiveStatus_Created), + msg: types.NewMsgCreateTSSVoter("invalid", "pubkey", 1, chains.ReceiveStatus_Created), panics: true, }, } @@ -75,23 +75,23 @@ func TestMsgCreateTSSVoter_GetSigners(t *testing.T) { } func TestMsgCreateTSSVoter_Type(t *testing.T) { - msg := types.NewMsgCreateTSSVoter(sample.AccAddress(), "pubkey", 1, pkg.ReceiveStatus_Created) + msg := types.NewMsgCreateTSSVoter(sample.AccAddress(), "pubkey", 1, chains.ReceiveStatus_Created) require.Equal(t, types.TypeMsgCreateTSSVoter, msg.Type()) } func TestMsgCreateTSSVoter_Route(t *testing.T) { - msg := types.NewMsgCreateTSSVoter(sample.AccAddress(), "pubkey", 1, pkg.ReceiveStatus_Created) + msg := types.NewMsgCreateTSSVoter(sample.AccAddress(), "pubkey", 1, chains.ReceiveStatus_Created) require.Equal(t, types.RouterKey, msg.Route()) } func TestMsgCreateTSSVoter_GetSignBytes(t *testing.T) { - msg := types.NewMsgCreateTSSVoter(sample.AccAddress(), "pubkey", 1, pkg.ReceiveStatus_Created) + msg := types.NewMsgCreateTSSVoter(sample.AccAddress(), "pubkey", 1, chains.ReceiveStatus_Created) require.NotPanics(t, func() { msg.GetSignBytes() }) } func TestMsgCreateTSSVoter_Digest(t *testing.T) { - msg := types.NewMsgCreateTSSVoter(sample.AccAddress(), "pubkey", 1, pkg.ReceiveStatus_Created) + msg := types.NewMsgCreateTSSVoter(sample.AccAddress(), "pubkey", 1, chains.ReceiveStatus_Created) require.Equal(t, "1-tss-keygen", msg.Digest()) } diff --git a/x/crosschain/types/message_vote_on_observed_inbound_tx.go b/x/crosschain/types/message_vote_on_observed_inbound_tx.go index 31dec381d8..aeb8305f57 100644 --- a/x/crosschain/types/message_vote_on_observed_inbound_tx.go +++ b/x/crosschain/types/message_vote_on_observed_inbound_tx.go @@ -6,7 +6,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/ethereum/go-ethereum/crypto" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/authz" + "github.com/zeta-chain/zetacore/pkg/coin" ) // MaxMessageLength is the maximum length of a message in a cctx @@ -29,7 +30,7 @@ func NewMsgVoteOnObservedInboundTx( inTxHash string, inBlockHeight, gasLimit uint64, - coinType pkg.CoinType, + coinType coin.CoinType, asset string, eventIndex uint, ) *MsgVoteOnObservedInboundTx { @@ -56,7 +57,7 @@ func (msg *MsgVoteOnObservedInboundTx) Route() string { } func (msg *MsgVoteOnObservedInboundTx) Type() string { - return pkg.InboundVoter.String() + return authz.InboundVoter.String() } func (msg *MsgVoteOnObservedInboundTx) GetSigners() []sdk.AccAddress { diff --git a/x/crosschain/types/message_vote_on_observed_inbound_tx_test.go b/x/crosschain/types/message_vote_on_observed_inbound_tx_test.go index 06d4340443..a62a3e2b62 100644 --- a/x/crosschain/types/message_vote_on_observed_inbound_tx_test.go +++ b/x/crosschain/types/message_vote_on_observed_inbound_tx_test.go @@ -9,7 +9,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/authz" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/crosschain/types" ) @@ -36,7 +37,7 @@ func TestMsgVoteOnObservedInboundTx_ValidateBasic(t *testing.T) { sample.String(), 42, 42, - pkg.CoinType_Zeta, + coin.CoinType_Zeta, sample.String(), 42, ), @@ -55,7 +56,7 @@ func TestMsgVoteOnObservedInboundTx_ValidateBasic(t *testing.T) { sample.String(), 42, 42, - pkg.CoinType_Zeta, + coin.CoinType_Zeta, sample.String(), 42, ), @@ -75,7 +76,7 @@ func TestMsgVoteOnObservedInboundTx_ValidateBasic(t *testing.T) { sample.String(), 42, 42, - pkg.CoinType_Zeta, + coin.CoinType_Zeta, sample.String(), 42, ), @@ -95,7 +96,7 @@ func TestMsgVoteOnObservedInboundTx_ValidateBasic(t *testing.T) { sample.String(), 42, 42, - pkg.CoinType_Zeta, + coin.CoinType_Zeta, sample.String(), 42, ), @@ -115,7 +116,7 @@ func TestMsgVoteOnObservedInboundTx_ValidateBasic(t *testing.T) { sample.String(), 42, 42, - pkg.CoinType_Zeta, + coin.CoinType_Zeta, sample.String(), 42, ), @@ -149,7 +150,7 @@ func TestMsgVoteOnObservedInboundTx_Digest(t *testing.T) { InTxHash: sample.String(), InBlockHeight: 42, GasLimit: 42, - CoinType: pkg.CoinType_Zeta, + CoinType: coin.CoinType_Zeta, Asset: sample.String(), EventIndex: 42, } @@ -224,7 +225,7 @@ func TestMsgVoteOnObservedInboundTx_Digest(t *testing.T) { // coin type used msg2 = msg - msg2.CoinType = pkg.CoinType_ERC20 + msg2.CoinType = coin.CoinType_ERC20 hash2 = msg2.Digest() require.NotEqual(t, hash, hash2, "coin type should change hash") @@ -282,7 +283,7 @@ func TestMsgVoteOnObservedInboundTx_Type(t *testing.T) { msg := types.MsgVoteOnObservedInboundTx{ Creator: sample.AccAddress(), } - require.Equal(t, pkg.InboundVoter.String(), msg.Type()) + require.Equal(t, authz.InboundVoter.String(), msg.Type()) } func TestMsgVoteOnObservedInboundTx_Route(t *testing.T) { diff --git a/x/crosschain/types/message_vote_on_observed_outbound_tx.go b/x/crosschain/types/message_vote_on_observed_outbound_tx.go index 570f98648b..360038c6f4 100644 --- a/x/crosschain/types/message_vote_on_observed_outbound_tx.go +++ b/x/crosschain/types/message_vote_on_observed_outbound_tx.go @@ -6,7 +6,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/ethereum/go-ethereum/crypto" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/authz" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" ) var _ sdk.Msg = &MsgVoteOnObservedOutboundTx{} @@ -20,10 +22,10 @@ func NewMsgVoteOnObservedOutboundTx( outTxEffectiveGasPrice math.Int, outTxEffectiveGasLimit uint64, valueReceived math.Uint, - status pkg.ReceiveStatus, + status chains.ReceiveStatus, chain int64, nonce uint64, - coinType pkg.CoinType, + coinType coin.CoinType, ) *MsgVoteOnObservedOutboundTx { return &MsgVoteOnObservedOutboundTx{ Creator: creator, @@ -46,7 +48,7 @@ func (msg *MsgVoteOnObservedOutboundTx) Route() string { } func (msg *MsgVoteOnObservedOutboundTx) Type() string { - return pkg.OutboundVoter.String() + return authz.OutboundVoter.String() } func (msg *MsgVoteOnObservedOutboundTx) GetSigners() []sdk.AccAddress { @@ -79,7 +81,7 @@ func (msg *MsgVoteOnObservedOutboundTx) Digest() string { m.Creator = "" // Set status to ReceiveStatus_Created to make sure both successful and failed votes are added to the same ballot - m.Status = pkg.ReceiveStatus_Created + m.Status = chains.ReceiveStatus_Created // Outbound and reverted txs have different digest as ObservedOutTxHash is different so they are stored in different ballots hash := crypto.Keccak256Hash([]byte(m.String())) diff --git a/x/crosschain/types/message_vote_on_observed_outbound_tx_test.go b/x/crosschain/types/message_vote_on_observed_outbound_tx_test.go index 27b0a701f8..d9e3f6a3ca 100644 --- a/x/crosschain/types/message_vote_on_observed_outbound_tx_test.go +++ b/x/crosschain/types/message_vote_on_observed_outbound_tx_test.go @@ -8,7 +8,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/authz" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/crosschain/types" ) @@ -30,10 +32,10 @@ func TestMsgVoteOnObservedOutboundTx_ValidateBasic(t *testing.T) { math.NewInt(42), 42, math.NewUint(42), - pkg.ReceiveStatus_Created, + chains.ReceiveStatus_Created, 42, 42, - pkg.CoinType_Zeta, + coin.CoinType_Zeta, ), }, { @@ -47,10 +49,10 @@ func TestMsgVoteOnObservedOutboundTx_ValidateBasic(t *testing.T) { math.NewInt(42), 42, math.NewUint(42), - pkg.ReceiveStatus_Created, + chains.ReceiveStatus_Created, 42, 42, - pkg.CoinType_Zeta, + coin.CoinType_Zeta, ), err: sdkerrors.ErrInvalidAddress, }, @@ -65,10 +67,10 @@ func TestMsgVoteOnObservedOutboundTx_ValidateBasic(t *testing.T) { math.NewInt(42), 42, math.NewUint(42), - pkg.ReceiveStatus_Created, + chains.ReceiveStatus_Created, -1, 42, - pkg.CoinType_Zeta, + coin.CoinType_Zeta, ), err: types.ErrInvalidChainID, }, @@ -97,10 +99,10 @@ func TestMsgVoteOnObservedOutboundTx_Digest(t *testing.T) { ObservedOutTxEffectiveGasPrice: math.NewInt(42), ObservedOutTxEffectiveGasLimit: 42, ValueReceived: math.NewUint(42), - Status: pkg.ReceiveStatus_Created, + Status: chains.ReceiveStatus_Created, OutTxChain: 42, OutTxTssNonce: 42, - CoinType: pkg.CoinType_Zeta, + CoinType: coin.CoinType_Zeta, } hash := msg.Digest() require.NotEmpty(t, hash, "hash should not be empty") @@ -113,7 +115,7 @@ func TestMsgVoteOnObservedOutboundTx_Digest(t *testing.T) { // status not used msg2 = msg - msg2.Status = pkg.ReceiveStatus_Failed + msg2.Status = chains.ReceiveStatus_Failed hash2 = msg2.Digest() require.Equal(t, hash, hash2, "status should not change hash") @@ -173,7 +175,7 @@ func TestMsgVoteOnObservedOutboundTx_Digest(t *testing.T) { // coin type used msg2 = msg - msg2.CoinType = pkg.CoinType_ERC20 + msg2.CoinType = coin.CoinType_ERC20 hash2 = msg2.Digest() require.NotEqual(t, hash, hash2, "coin type should change hash") } @@ -219,7 +221,7 @@ func TestMsgVoteOnObservedOutboundTx_Type(t *testing.T) { msg := types.MsgVoteOnObservedOutboundTx{ Creator: sample.AccAddress(), } - require.Equal(t, pkg.OutboundVoter.String(), msg.Type()) + require.Equal(t, authz.OutboundVoter.String(), msg.Type()) } func TestMsgVoteOnObservedOutboundTx_Route(t *testing.T) { diff --git a/x/crosschain/types/tx.pb.go b/x/crosschain/types/tx.pb.go index 8e7e7fffe1..c8338b386b 100644 --- a/x/crosschain/types/tx.pb.go +++ b/x/crosschain/types/tx.pb.go @@ -14,7 +14,9 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" - proto1 "github.com/zeta-chain/zetacore/pkg/proto" + chains "github.com/zeta-chain/zetacore/pkg/chains" + coin "github.com/zeta-chain/zetacore/pkg/coin" + proofs "github.com/zeta-chain/zetacore/pkg/proofs" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -35,7 +37,7 @@ type MsgCreateTSSVoter struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` TssPubkey string `protobuf:"bytes,2,opt,name=tss_pubkey,json=tssPubkey,proto3" json:"tss_pubkey,omitempty"` KeyGenZetaHeight int64 `protobuf:"varint,3,opt,name=keyGenZetaHeight,proto3" json:"keyGenZetaHeight,omitempty"` - Status proto1.ReceiveStatus `protobuf:"varint,4,opt,name=status,proto3,enum=pkg.ReceiveStatus" json:"status,omitempty"` + Status chains.ReceiveStatus `protobuf:"varint,4,opt,name=status,proto3,enum=chains.ReceiveStatus" json:"status,omitempty"` } func (m *MsgCreateTSSVoter) Reset() { *m = MsgCreateTSSVoter{} } @@ -92,11 +94,11 @@ func (m *MsgCreateTSSVoter) GetKeyGenZetaHeight() int64 { return 0 } -func (m *MsgCreateTSSVoter) GetStatus() proto1.ReceiveStatus { +func (m *MsgCreateTSSVoter) GetStatus() chains.ReceiveStatus { if m != nil { return m.Status } - return proto1.ReceiveStatus_Created + return chains.ReceiveStatus_Created } type MsgCreateTSSVoterResponse struct { @@ -313,13 +315,13 @@ func (m *MsgUpdateTssAddressResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateTssAddressResponse proto.InternalMessageInfo type MsgAddToInTxTracker struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - TxHash string `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` - CoinType proto1.CoinType `protobuf:"varint,4,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` - Proof *proto1.Proof `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"` - BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` - TxIndex int64 `protobuf:"varint,7,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + TxHash string `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + CoinType coin.CoinType `protobuf:"varint,4,opt,name=coin_type,json=coinType,proto3,enum=coin.CoinType" json:"coin_type,omitempty"` + Proof *proofs.Proof `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"` + BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + TxIndex int64 `protobuf:"varint,7,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` } func (m *MsgAddToInTxTracker) Reset() { *m = MsgAddToInTxTracker{} } @@ -376,14 +378,14 @@ func (m *MsgAddToInTxTracker) GetTxHash() string { return "" } -func (m *MsgAddToInTxTracker) GetCoinType() proto1.CoinType { +func (m *MsgAddToInTxTracker) GetCoinType() coin.CoinType { if m != nil { return m.CoinType } - return proto1.CoinType_Zeta + return coin.CoinType_Zeta } -func (m *MsgAddToInTxTracker) GetProof() *proto1.Proof { +func (m *MsgAddToInTxTracker) GetProof() *proofs.Proof { if m != nil { return m.Proof } @@ -589,7 +591,7 @@ type MsgAddToOutTxTracker struct { ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` Nonce uint64 `protobuf:"varint,3,opt,name=nonce,proto3" json:"nonce,omitempty"` TxHash string `protobuf:"bytes,4,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` - Proof *proto1.Proof `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"` + Proof *proofs.Proof `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"` BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` TxIndex int64 `protobuf:"varint,7,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` } @@ -655,7 +657,7 @@ func (m *MsgAddToOutTxTracker) GetTxHash() string { return "" } -func (m *MsgAddToOutTxTracker) GetProof() *proto1.Proof { +func (m *MsgAddToOutTxTracker) GetProof() *proofs.Proof { if m != nil { return m.Proof } @@ -937,10 +939,10 @@ type MsgVoteOnObservedOutboundTx struct { ObservedOutTxEffectiveGasPrice github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,11,opt,name=observed_outTx_effective_gas_price,json=observedOutTxEffectiveGasPrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"observed_outTx_effective_gas_price"` ObservedOutTxEffectiveGasLimit uint64 `protobuf:"varint,12,opt,name=observed_outTx_effective_gas_limit,json=observedOutTxEffectiveGasLimit,proto3" json:"observed_outTx_effective_gas_limit,omitempty"` ValueReceived github_com_cosmos_cosmos_sdk_types.Uint `protobuf:"bytes,5,opt,name=value_received,json=valueReceived,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Uint" json:"value_received" yaml:"value_received"` - Status proto1.ReceiveStatus `protobuf:"varint,6,opt,name=status,proto3,enum=pkg.ReceiveStatus" json:"status,omitempty"` + Status chains.ReceiveStatus `protobuf:"varint,6,opt,name=status,proto3,enum=chains.ReceiveStatus" json:"status,omitempty"` OutTxChain int64 `protobuf:"varint,7,opt,name=outTx_chain,json=outTxChain,proto3" json:"outTx_chain,omitempty"` OutTxTssNonce uint64 `protobuf:"varint,8,opt,name=outTx_tss_nonce,json=outTxTssNonce,proto3" json:"outTx_tss_nonce,omitempty"` - CoinType proto1.CoinType `protobuf:"varint,9,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` + CoinType coin.CoinType `protobuf:"varint,9,opt,name=coin_type,json=coinType,proto3,enum=coin.CoinType" json:"coin_type,omitempty"` } func (m *MsgVoteOnObservedOutboundTx) Reset() { *m = MsgVoteOnObservedOutboundTx{} } @@ -1018,11 +1020,11 @@ func (m *MsgVoteOnObservedOutboundTx) GetObservedOutTxEffectiveGasLimit() uint64 return 0 } -func (m *MsgVoteOnObservedOutboundTx) GetStatus() proto1.ReceiveStatus { +func (m *MsgVoteOnObservedOutboundTx) GetStatus() chains.ReceiveStatus { if m != nil { return m.Status } - return proto1.ReceiveStatus_Created + return chains.ReceiveStatus_Created } func (m *MsgVoteOnObservedOutboundTx) GetOutTxChain() int64 { @@ -1039,11 +1041,11 @@ func (m *MsgVoteOnObservedOutboundTx) GetOutTxTssNonce() uint64 { return 0 } -func (m *MsgVoteOnObservedOutboundTx) GetCoinType() proto1.CoinType { +func (m *MsgVoteOnObservedOutboundTx) GetCoinType() coin.CoinType { if m != nil { return m.CoinType } - return proto1.CoinType_Zeta + return coin.CoinType_Zeta } type MsgVoteOnObservedOutboundTxResponse struct { @@ -1091,13 +1093,13 @@ type MsgVoteOnObservedInboundTx struct { // string zeta_burnt = 6; Amount github_com_cosmos_cosmos_sdk_types.Uint `protobuf:"bytes,6,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Uint" json:"amount"` // string mMint = 7; - Message string `protobuf:"bytes,8,opt,name=message,proto3" json:"message,omitempty"` - InTxHash string `protobuf:"bytes,9,opt,name=in_tx_hash,json=inTxHash,proto3" json:"in_tx_hash,omitempty"` - InBlockHeight uint64 `protobuf:"varint,10,opt,name=in_block_height,json=inBlockHeight,proto3" json:"in_block_height,omitempty"` - GasLimit uint64 `protobuf:"varint,11,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` - CoinType proto1.CoinType `protobuf:"varint,12,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` - TxOrigin string `protobuf:"bytes,13,opt,name=tx_origin,json=txOrigin,proto3" json:"tx_origin,omitempty"` - Asset string `protobuf:"bytes,14,opt,name=asset,proto3" json:"asset,omitempty"` + Message string `protobuf:"bytes,8,opt,name=message,proto3" json:"message,omitempty"` + InTxHash string `protobuf:"bytes,9,opt,name=in_tx_hash,json=inTxHash,proto3" json:"in_tx_hash,omitempty"` + InBlockHeight uint64 `protobuf:"varint,10,opt,name=in_block_height,json=inBlockHeight,proto3" json:"in_block_height,omitempty"` + GasLimit uint64 `protobuf:"varint,11,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + CoinType coin.CoinType `protobuf:"varint,12,opt,name=coin_type,json=coinType,proto3,enum=coin.CoinType" json:"coin_type,omitempty"` + TxOrigin string `protobuf:"bytes,13,opt,name=tx_origin,json=txOrigin,proto3" json:"tx_origin,omitempty"` + Asset string `protobuf:"bytes,14,opt,name=asset,proto3" json:"asset,omitempty"` // event index of the sent asset in the observed tx EventIndex uint64 `protobuf:"varint,15,opt,name=event_index,json=eventIndex,proto3" json:"event_index,omitempty"` } @@ -1198,11 +1200,11 @@ func (m *MsgVoteOnObservedInboundTx) GetGasLimit() uint64 { return 0 } -func (m *MsgVoteOnObservedInboundTx) GetCoinType() proto1.CoinType { +func (m *MsgVoteOnObservedInboundTx) GetCoinType() coin.CoinType { if m != nil { return m.CoinType } - return proto1.CoinType_Zeta + return coin.CoinType_Zeta } func (m *MsgVoteOnObservedInboundTx) GetTxOrigin() string { @@ -1476,101 +1478,102 @@ func init() { func init() { proto.RegisterFile("crosschain/tx.proto", fileDescriptor_81d6d611190b7635) } var fileDescriptor_81d6d611190b7635 = []byte{ - // 1501 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xdd, 0x6b, 0xdb, 0x56, - 0x1b, 0x8f, 0xde, 0x24, 0x8e, 0xfd, 0x24, 0x4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 0xd8, 0x72, 0xca, 0x29, 0xfc, 0xcc, 0x76, 0xf7, 0xdf, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xb7, 0xf7, 0x9f, 0xc3, 0xc1, 0x13, 0x00, 0x00, + // 1517 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x18, 0xdd, 0x4e, 0x1b, 0x47, + 0x97, 0xfd, 0x00, 0x63, 0x1f, 0x30, 0x24, 0x0b, 0x09, 0xce, 0x12, 0x0c, 0x59, 0xbe, 0xa4, 0xa8, + 0x55, 0xec, 0x84, 0xa8, 0x6a, 0x92, 0xb6, 0x52, 0x01, 0x25, 0x84, 0x36, 0x84, 0x68, 0x71, 0xda, + 0x2a, 0x37, 0xd6, 0x7a, 0x77, 0x58, 0x56, 0xd8, 0x3b, 0xd6, 0xce, 0xd8, 0xb2, 0x51, 0xa5, 0x56, + 0x95, 0x7a, 0x5f, 0x55, 0x95, 0x5a, 0xf5, 0x05, 0xfa, 0x2a, 0xb9, 0x8c, 0x7a, 0xd3, 0x9f, 0x8b, + 0xa8, 0x0a, 0x0f, 0x50, 0xa9, 0x4f, 0x50, 0xcd, 0x99, 0xf1, 0xe2, 0xb5, 0xf1, 0x0f, 0x44, 0xb9, + 0xb1, 0xf7, 0x9c, 0x99, 0xf3, 0xff, 0xbb, 0x0b, 0xb3, 0x4e, 0x48, 0x19, 0x73, 0x0e, 0x6c, 0x3f, + 0xc8, 0xf3, 0x46, 0xae, 0x1a, 0x52, 0x4e, 0xf5, 0xc5, 0x23, 0xc2, 0x6d, 0xc4, 0xe5, 0xf0, 0x89, + 0x86, 0x24, 0x77, 0x72, 0xcf, 0x98, 0xf3, 0xa8, 0x47, 0xf1, 0x66, 0x5e, 0x3c, 0x49, 0x22, 0x63, + 0xbe, 0x7a, 0xe8, 0xe5, 0xf1, 0x02, 0x53, 0x7f, 0xea, 0x60, 0x16, 0x0f, 0xa8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3, 0xa7, 0x0e, 0x76, 0xf5, 0xee, 0x99, 0x73, 0x67, + 0x98, 0x4e, 0xd4, 0x41, 0x34, 0x4c, 0x57, 0xef, 0x39, 0x65, 0x36, 0x3e, 0x7b, 0xf1, 0x3a, 0xab, + 0xbd, 0x7c, 0x9d, 0xd5, 0xfe, 0x7e, 0x9d, 0xd5, 0xbe, 0x3f, 0xce, 0x8e, 0xbc, 0x3c, 0xce, 0x8e, + 0xfc, 0x71, 0x9c, 0x1d, 0x79, 0x7e, 0xbb, 0x6d, 0xaf, 0x11, 0x6c, 0x6f, 0xca, 0xef, 0x7a, 0x2d, + 0x09, 0xf9, 0x46, 0xbe, 0xfd, 0x6b, 0x9f, 0x58, 0x73, 0x4a, 0x09, 0xfc, 0xea, 0x76, 0xe7, 0xbf, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x08, 0xaa, 0x5d, 0x39, 0x08, 0x14, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -3678,7 +3681,7 @@ func (m *MsgCreateTSSVoter) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Status |= proto1.ReceiveStatus(b&0x7F) << shift + m.Status |= chains.ReceiveStatus(b&0x7F) << shift if b < 0x80 { break } @@ -4229,7 +4232,7 @@ func (m *MsgAddToInTxTracker) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CoinType |= proto1.CoinType(b&0x7F) << shift + m.CoinType |= coin.CoinType(b&0x7F) << shift if b < 0x80 { break } @@ -4264,7 +4267,7 @@ func (m *MsgAddToInTxTracker) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Proof == nil { - m.Proof = &proto1.Proof{} + m.Proof = &proofs.Proof{} } if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -4902,7 +4905,7 @@ func (m *MsgAddToOutTxTracker) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Proof == nil { - m.Proof = &proto1.Proof{} + m.Proof = &proofs.Proof{} } if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -5633,7 +5636,7 @@ func (m *MsgVoteOnObservedOutboundTx) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Status |= proto1.ReceiveStatus(b&0x7F) << shift + m.Status |= chains.ReceiveStatus(b&0x7F) << shift if b < 0x80 { break } @@ -5690,7 +5693,7 @@ func (m *MsgVoteOnObservedOutboundTx) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CoinType |= proto1.CoinType(b&0x7F) << shift + m.CoinType |= coin.CoinType(b&0x7F) << shift if b < 0x80 { break } @@ -6151,7 +6154,7 @@ func (m *MsgVoteOnObservedInboundTx) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CoinType |= proto1.CoinType(b&0x7F) << shift + m.CoinType |= coin.CoinType(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/emissions/abci_test.go b/x/emissions/abci_test.go index d75cfe92e5..65153b377a 100644 --- a/x/emissions/abci_test.go +++ b/x/emissions/abci_test.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/stretchr/testify/require" "github.com/zeta-chain/zetacore/cmd/zetacored/config" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/coin" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" emissionsModule "github.com/zeta-chain/zetacore/x/emissions" @@ -88,7 +88,7 @@ func TestBeginBlocker(t *testing.T) { }) // Total block rewards is the fixed amount of rewards that are distributed - totalBlockRewards, err := pkg.GetAzetaDecFromAmountInZeta(emissionstypes.BlockRewardsInZeta) + totalBlockRewards, err := coin.GetAzetaDecFromAmountInZeta(emissionstypes.BlockRewardsInZeta) totalRewardCoins := sdk.NewCoins(sdk.NewCoin(config.BaseDenom, totalBlockRewards.TruncateInt())) require.NoError(t, err) // Fund the emission pool to start the emission process @@ -246,7 +246,7 @@ func TestDistributeObserverRewards(t *testing.T) { zk.ObserverKeeper.SetObserverSet(ctx, observerSet) // Total block rewards is the fixed amount of rewards that are distributed - totalBlockRewards, err := pkg.GetAzetaDecFromAmountInZeta(emissionstypes.BlockRewardsInZeta) + totalBlockRewards, err := coin.GetAzetaDecFromAmountInZeta(emissionstypes.BlockRewardsInZeta) totalRewardCoins := sdk.NewCoins(sdk.NewCoin(config.BaseDenom, totalBlockRewards.TruncateInt())) require.NoError(t, err) diff --git a/x/emissions/keeper/block_rewards_components.go b/x/emissions/keeper/block_rewards_components.go index b51ae9a96e..e1eadf66ad 100644 --- a/x/emissions/keeper/block_rewards_components.go +++ b/x/emissions/keeper/block_rewards_components.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/zeta-chain/zetacore/cmd/zetacored/config" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/x/emissions/types" ) @@ -66,7 +66,7 @@ func (k Keeper) GetFixedBlockRewards() (sdk.Dec, error) { } func CalculateFixedValidatorRewards(avgBlockTimeString string) (sdk.Dec, error) { - azetaAmountTotalRewards, err := pkg.GetAzetaDecFromAmountInZeta(types.BlockRewardsInZeta) + azetaAmountTotalRewards, err := coin.GetAzetaDecFromAmountInZeta(types.BlockRewardsInZeta) if err != nil { return sdk.ZeroDec(), err } diff --git a/x/fungible/client/cli/tx_deploy_fungible_coin_zrc_4.go b/x/fungible/client/cli/tx_deploy_fungible_coin_zrc_4.go index 06f3cca2dd..703b57fd1e 100644 --- a/x/fungible/client/cli/tx_deploy_fungible_coin_zrc_4.go +++ b/x/fungible/client/cli/tx_deploy_fungible_coin_zrc_4.go @@ -3,7 +3,7 @@ package cli import ( "strconv" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" @@ -50,7 +50,7 @@ func CmdDeployFungibleCoinZRC4() *cobra.Command { uint32(argDecimals), argName, argSymbol, - pkg.CoinType(argCoinType), + coin.CoinType(argCoinType), argGasLimit, ) diff --git a/x/fungible/keeper/deposits.go b/x/fungible/keeper/deposits.go index e5410ec578..c7d786db18 100644 --- a/x/fungible/keeper/deposits.go +++ b/x/fungible/keeper/deposits.go @@ -7,7 +7,7 @@ import ( eth "github.com/ethereum/go-ethereum/common" evmtypes "github.com/evmos/ethermint/x/evm/types" "github.com/zeta-chain/protocol-contracts/pkg/contracts/zevm/systemcontract.sol" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/coin" crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" "github.com/zeta-chain/zetacore/x/fungible/types" ) @@ -28,35 +28,35 @@ func (k Keeper) ZRC20DepositAndCallContract( amount *big.Int, senderChainID int64, data []byte, - coinType pkg.CoinType, + coinType coin.CoinType, asset string, ) (*evmtypes.MsgEthereumTxResponse, bool, error) { var ZRC20Contract eth.Address - var coin types.ForeignCoins + var foreignCoin types.ForeignCoins var found bool // get foreign coin - if coinType == pkg.CoinType_Gas { - coin, found = k.GetGasCoinForForeignCoin(ctx, senderChainID) + if coinType == coin.CoinType_Gas { + foreignCoin, found = k.GetGasCoinForForeignCoin(ctx, senderChainID) if !found { return nil, false, crosschaintypes.ErrGasCoinNotFound } } else { - coin, found = k.GetForeignCoinFromAsset(ctx, asset, senderChainID) + foreignCoin, found = k.GetForeignCoinFromAsset(ctx, asset, senderChainID) if !found { return nil, false, crosschaintypes.ErrForeignCoinNotFound } } - ZRC20Contract = eth.HexToAddress(coin.Zrc20ContractAddress) + ZRC20Contract = eth.HexToAddress(foreignCoin.Zrc20ContractAddress) // check if foreign coin is paused - if coin.Paused { + if foreignCoin.Paused { return nil, false, types.ErrPausedZRC20 } // check foreign coins cap if it has a cap - if !coin.LiquidityCap.IsNil() && !coin.LiquidityCap.IsZero() { - liquidityCap := coin.LiquidityCap.BigInt() + if !foreignCoin.LiquidityCap.IsNil() && !foreignCoin.LiquidityCap.IsZero() { + liquidityCap := foreignCoin.LiquidityCap.BigInt() totalSupply, err := k.TotalSupplyZRC4(ctx, ZRC20Contract) if err != nil { return nil, false, err diff --git a/x/fungible/keeper/deposits_test.go b/x/fungible/keeper/deposits_test.go index e84acb5e2d..858a8130ce 100644 --- a/x/fungible/keeper/deposits_test.go +++ b/x/fungible/keeper/deposits_test.go @@ -7,7 +7,8 @@ import ( "cosmossdk.io/math" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/testutil/contracts" testkeeper "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" @@ -21,7 +22,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { k, ctx, sdkk, _ := testkeeper.FungibleKeeper(t) _ = k.GetAuthKeeper().GetModuleAccount(ctx, types.ModuleName) - chainList := pkg.DefaultChainsList() + chainList := chains.DefaultChainsList() chain := chainList[0].ChainId // deploy the system contracts @@ -37,7 +38,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { big.NewInt(42), chain, []byte{}, - pkg.CoinType_Gas, + coin.CoinType_Gas, sample.EthAddress().String(), ) require.NoError(t, err) @@ -52,7 +53,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { k, ctx, sdkk, _ := testkeeper.FungibleKeeper(t) _ = k.GetAuthKeeper().GetModuleAccount(ctx, types.ModuleName) - chainList := pkg.DefaultChainsList() + chainList := chains.DefaultChainsList() chain := chainList[0].ChainId assetAddress := sample.EthAddress().String() @@ -69,7 +70,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { big.NewInt(42), chain, []byte{}, - pkg.CoinType_ERC20, + coin.CoinType_ERC20, assetAddress, ) require.NoError(t, err) @@ -84,7 +85,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { k, ctx, sdkk, _ := testkeeper.FungibleKeeper(t) _ = k.GetAuthKeeper().GetModuleAccount(ctx, types.ModuleName) - chainList := pkg.DefaultChainsList() + chainList := chains.DefaultChainsList() chain := chainList[0].ChainId assetAddress := sample.EthAddress().String() @@ -101,7 +102,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { big.NewInt(42), chain, []byte("DEADBEEF"), - pkg.CoinType_ERC20, + coin.CoinType_ERC20, assetAddress, ) require.ErrorIs(t, err, types.ErrCallNonContract) @@ -112,7 +113,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { k, ctx, sdkk, _ := testkeeper.FungibleKeeper(t) _ = k.GetAuthKeeper().GetModuleAccount(ctx, types.ModuleName) - chainList := pkg.DefaultChainsList() + chainList := chains.DefaultChainsList() chain := chainList[0].ChainId // deploy the system contracts @@ -124,10 +125,10 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { require.NoError(t, err) // set a liquidity cap - coin, found := k.GetForeignCoins(ctx, zrc20.String()) + foreignCoin, found := k.GetForeignCoins(ctx, zrc20.String()) require.True(t, found) - coin.LiquidityCap = math.NewUint(initialTotalSupply.Uint64() + 1000) - k.SetForeignCoins(ctx, coin) + foreignCoin.LiquidityCap = math.NewUint(initialTotalSupply.Uint64() + 1000) + k.SetForeignCoins(ctx, foreignCoin) // increase total supply _, err = k.DepositZRC20(ctx, zrc20, sample.EthAddress(), big.NewInt(500)) @@ -142,7 +143,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { big.NewInt(500), chain, []byte{}, - pkg.CoinType_Gas, + coin.CoinType_Gas, sample.EthAddress().String(), ) require.NoError(t, err) @@ -158,7 +159,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { k, ctx, sdkk, _ := testkeeper.FungibleKeeper(t) _ = k.GetAuthKeeper().GetModuleAccount(ctx, types.ModuleName) - chainList := pkg.DefaultChainsList() + chainList := chains.DefaultChainsList() chain := chainList[0].ChainId // deploy the system contracts @@ -166,10 +167,10 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { zrc20 := setupGasCoin(t, ctx, k, sdkk.EvmKeeper, chain, "foobar", "foobar") // pause the coin - coin, found := k.GetForeignCoins(ctx, zrc20.String()) + foreignCoin, found := k.GetForeignCoins(ctx, zrc20.String()) require.True(t, found) - coin.Paused = true - k.SetForeignCoins(ctx, coin) + foreignCoin.Paused = true + k.SetForeignCoins(ctx, foreignCoin) to := sample.EthAddress() _, _, err := k.ZRC20DepositAndCallContract( @@ -179,7 +180,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { big.NewInt(42), chain, []byte{}, - pkg.CoinType_Gas, + coin.CoinType_Gas, sample.EthAddress().String(), ) require.ErrorIs(t, err, types.ErrPausedZRC20) @@ -190,7 +191,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { k, ctx, sdkk, _ := testkeeper.FungibleKeeper(t) _ = k.GetAuthKeeper().GetModuleAccount(ctx, types.ModuleName) - chainList := pkg.DefaultChainsList() + chainList := chains.DefaultChainsList() chain := chainList[0].ChainId // deploy the system contracts @@ -202,10 +203,10 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { require.NoError(t, err) // set a liquidity cap - coin, found := k.GetForeignCoins(ctx, zrc20.String()) + foreignCoin, found := k.GetForeignCoins(ctx, zrc20.String()) require.True(t, found) - coin.LiquidityCap = math.NewUint(initialTotalSupply.Uint64() + 1000) - k.SetForeignCoins(ctx, coin) + foreignCoin.LiquidityCap = math.NewUint(initialTotalSupply.Uint64() + 1000) + k.SetForeignCoins(ctx, foreignCoin) // increase total supply _, err = k.DepositZRC20(ctx, zrc20, sample.EthAddress(), big.NewInt(500)) @@ -220,7 +221,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { big.NewInt(501), chain, []byte{}, - pkg.CoinType_Gas, + coin.CoinType_Gas, sample.EthAddress().String(), ) require.ErrorIs(t, err, types.ErrForeignCoinCapReached) @@ -231,7 +232,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { k, ctx, sdkk, _ := testkeeper.FungibleKeeper(t) _ = k.GetAuthKeeper().GetModuleAccount(ctx, types.ModuleName) - chainList := pkg.DefaultChainsList() + chainList := chains.DefaultChainsList() chain := chainList[0].ChainId // deploy the system contracts @@ -246,7 +247,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { big.NewInt(42), chain, []byte{}, - pkg.CoinType_Gas, + coin.CoinType_Gas, sample.EthAddress().String(), ) require.ErrorIs(t, err, crosschaintypes.ErrGasCoinNotFound) @@ -256,7 +257,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { k, ctx, sdkk, _ := testkeeper.FungibleKeeper(t) _ = k.GetAuthKeeper().GetModuleAccount(ctx, types.ModuleName) - chainList := pkg.DefaultChainsList() + chainList := chains.DefaultChainsList() chain := chainList[0].ChainId assetAddress := sample.EthAddress().String() @@ -272,7 +273,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { big.NewInt(42), chain, []byte{}, - pkg.CoinType_ERC20, + coin.CoinType_ERC20, assetAddress, ) require.ErrorIs(t, err, crosschaintypes.ErrForeignCoinNotFound) @@ -283,7 +284,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { k, ctx, sdkk, _ := testkeeper.FungibleKeeper(t) _ = k.GetAuthKeeper().GetModuleAccount(ctx, types.ModuleName) - chainList := pkg.DefaultChainsList() + chainList := chains.DefaultChainsList() chain := chainList[0].ChainId // deploy the system contracts @@ -302,7 +303,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { big.NewInt(42), chain, []byte{}, - pkg.CoinType_Gas, + coin.CoinType_Gas, sample.EthAddress().String(), ) require.NoError(t, err) @@ -321,7 +322,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { k, ctx, sdkk, _ := testkeeper.FungibleKeeper(t) _ = k.GetAuthKeeper().GetModuleAccount(ctx, types.ModuleName) - chainList := pkg.DefaultChainsList() + chainList := chains.DefaultChainsList() chain := chainList[0].ChainId // deploy the system contracts @@ -340,7 +341,7 @@ func TestKeeper_ZRC20DepositAndCallContract(t *testing.T) { big.NewInt(42), chain, []byte{}, - pkg.CoinType_Gas, + coin.CoinType_Gas, sample.EthAddress().String(), ) require.Error(t, err) diff --git a/x/fungible/keeper/evm.go b/x/fungible/keeper/evm.go index 5fe96e88b0..313a1301aa 100644 --- a/x/fungible/keeper/evm.go +++ b/x/fungible/keeper/evm.go @@ -26,7 +26,8 @@ import ( zrc20 "github.com/zeta-chain/protocol-contracts/pkg/contracts/zevm/zrc20.sol" uniswapv2factory "github.com/zeta-chain/protocol-contracts/pkg/uniswap/v2-core/contracts/uniswapv2factory.sol" uniswapv2router02 "github.com/zeta-chain/protocol-contracts/pkg/uniswap/v2-periphery/contracts/uniswapv2router02.sol" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/server/config" "github.com/zeta-chain/zetacore/x/fungible/types" zetaObserverTypes "github.com/zeta-chain/zetacore/x/observer/types" @@ -89,11 +90,11 @@ func (k Keeper) DeployZRC20Contract( name, symbol string, decimals uint8, chainID int64, - coinType pkg.CoinType, + coinType coin.CoinType, erc20Contract string, gasLimit *big.Int, ) (common.Address, error) { - chain := pkg.GetChainFromChainID(chainID) + chain := chains.GetChainFromChainID(chainID) if chain == nil { return common.Address{}, cosmoserrors.Wrapf(zetaObserverTypes.ErrSupportedChains, "chain %d not found", chainID) } diff --git a/x/fungible/keeper/evm_test.go b/x/fungible/keeper/evm_test.go index 433ffed083..8d52742c0c 100644 --- a/x/fungible/keeper/evm_test.go +++ b/x/fungible/keeper/evm_test.go @@ -12,7 +12,8 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" "github.com/zeta-chain/protocol-contracts/pkg/contracts/zevm/systemcontract.sol" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/server/config" "github.com/zeta-chain/zetacore/testutil/contracts" testkeeper "github.com/zeta-chain/zetacore/testutil/keeper" @@ -23,7 +24,7 @@ import ( // get a valid chain id independently of the build flag func getValidChainID(t *testing.T) int64 { - list := pkg.DefaultChainsList() + list := chains.DefaultChainsList() require.NotEmpty(t, list) require.NotNil(t, list[0]) @@ -181,7 +182,7 @@ func TestKeeper_DeployZRC20Contract(t *testing.T) { "bar", 8, chainID, - pkg.CoinType_Gas, + coin.CoinType_Gas, "foobar", big.NewInt(1000), ) @@ -196,7 +197,7 @@ func TestKeeper_DeployZRC20Contract(t *testing.T) { require.Equal(t, uint32(8), foreignCoins.Decimals) require.Equal(t, "foo", foreignCoins.Name) require.Equal(t, "bar", foreignCoins.Symbol) - require.Equal(t, pkg.CoinType_Gas, foreignCoins.CoinType) + require.Equal(t, coin.CoinType_Gas, foreignCoins.CoinType) require.Equal(t, uint64(1000), foreignCoins.GasLimit) // can get the zrc20 data diff --git a/x/fungible/keeper/foreign_coins.go b/x/fungible/keeper/foreign_coins.go index f995daee29..ee424e92c1 100644 --- a/x/fungible/keeper/foreign_coins.go +++ b/x/fungible/keeper/foreign_coins.go @@ -4,7 +4,7 @@ import ( "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" ethcommon "github.com/ethereum/go-ethereum/common" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/x/fungible/types" ) @@ -82,9 +82,9 @@ func (k Keeper) GetAllForeignCoins(ctx sdk.Context) (list []types.ForeignCoins) // GetGasCoinForForeignCoin returns the gas coin for a given chain func (k Keeper) GetGasCoinForForeignCoin(ctx sdk.Context, chainID int64) (types.ForeignCoins, bool) { foreignCoinList := k.GetAllForeignCoinsForChain(ctx, chainID) - for _, coin := range foreignCoinList { - if coin.CoinType == pkg.CoinType_Gas { - return coin, true + for _, c := range foreignCoinList { + if c.CoinType == coin.CoinType_Gas { + return c, true } } return types.ForeignCoins{}, false diff --git a/x/fungible/keeper/foreign_coins_test.go b/x/fungible/keeper/foreign_coins_test.go index dc4c722c2f..d9a98a4031 100644 --- a/x/fungible/keeper/foreign_coins_test.go +++ b/x/fungible/keeper/foreign_coins_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/coin" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" @@ -38,31 +38,31 @@ func TestKeeper_GetGasCoinForForeignCoin(t *testing.T) { types.ForeignCoins{ Zrc20ContractAddress: sample.EthAddress().String(), ForeignChainId: 1, - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, Name: "foo", }, types.ForeignCoins{ Zrc20ContractAddress: sample.EthAddress().String(), ForeignChainId: 1, - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, Name: "foo", }, types.ForeignCoins{ Zrc20ContractAddress: sample.EthAddress().String(), ForeignChainId: 1, - CoinType: pkg.CoinType_Gas, + CoinType: coin.CoinType_Gas, Name: "bar", }, types.ForeignCoins{ Zrc20ContractAddress: sample.EthAddress().String(), ForeignChainId: 2, - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, Name: "foo", }, types.ForeignCoins{ Zrc20ContractAddress: sample.EthAddress().String(), ForeignChainId: 2, - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, Name: "foo", }, ) @@ -88,35 +88,35 @@ func TestKeeperGetForeignCoinFromAsset(t *testing.T) { Zrc20ContractAddress: sample.EthAddress().String(), Asset: sample.EthAddress().String(), ForeignChainId: 1, - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, Name: "foo", }, types.ForeignCoins{ Zrc20ContractAddress: sample.EthAddress().String(), Asset: gasAsset, ForeignChainId: 1, - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, Name: "bar", }, types.ForeignCoins{ Zrc20ContractAddress: sample.EthAddress().String(), Asset: sample.EthAddress().String(), ForeignChainId: 1, - CoinType: pkg.CoinType_Gas, + CoinType: coin.CoinType_Gas, Name: "foo", }, types.ForeignCoins{ Zrc20ContractAddress: sample.EthAddress().String(), Asset: sample.EthAddress().String(), ForeignChainId: 2, - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, Name: "foo", }, types.ForeignCoins{ Zrc20ContractAddress: sample.EthAddress().String(), Asset: sample.EthAddress().String(), ForeignChainId: 2, - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, Name: "foo", }, ) @@ -142,7 +142,7 @@ func TestKeeperGetForeignCoinFromAsset(t *testing.T) { Zrc20ContractAddress: sample.EthAddress().String(), Asset: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", ForeignChainId: 1, - CoinType: pkg.CoinType_ERC20, + CoinType: coin.CoinType_ERC20, Name: "foo", }, ) diff --git a/x/fungible/keeper/gas_coin_and_pool.go b/x/fungible/keeper/gas_coin_and_pool.go index 7c4c82f5ff..6b06cd8cec 100644 --- a/x/fungible/keeper/gas_coin_and_pool.go +++ b/x/fungible/keeper/gas_coin_and_pool.go @@ -10,7 +10,8 @@ import ( systemcontract "github.com/zeta-chain/protocol-contracts/pkg/contracts/zevm/systemcontract.sol" zrc20 "github.com/zeta-chain/protocol-contracts/pkg/contracts/zevm/zrc20.sol" uniswapv2router02 "github.com/zeta-chain/protocol-contracts/pkg/uniswap/v2-periphery/contracts/uniswapv2router02.sol" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/x/fungible/types" zetaObserverTypes "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -26,7 +27,7 @@ func (k Keeper) SetupChainGasCoinAndPool( decimals uint8, gasLimit *big.Int, ) (ethcommon.Address, error) { - chain := pkg.GetChainFromChainID(chainID) + chain := chains.GetChainFromChainID(chainID) if chain == nil { return ethcommon.Address{}, zetaObserverTypes.ErrSupportedChains } @@ -43,12 +44,12 @@ func (k Keeper) SetupChainGasCoinAndPool( // default values if transferGasLimit == nil { transferGasLimit = big.NewInt(21_000) - if pkg.IsBitcoinChain(chain.ChainId) { + if chains.IsBitcoinChain(chain.ChainId) { transferGasLimit = big.NewInt(100) // 100B for a typical tx } } - zrc20Addr, err := k.DeployZRC20Contract(ctx, name, symbol, decimals, chain.ChainId, pkg.CoinType_Gas, "", transferGasLimit) + zrc20Addr, err := k.DeployZRC20Contract(ctx, name, symbol, decimals, chain.ChainId, coin.CoinType_Gas, "", transferGasLimit) if err != nil { return ethcommon.Address{}, cosmoserrors.Wrapf(err, "failed to DeployZRC20Contract") } diff --git a/x/fungible/keeper/msg_server_deploy_fungible_coin_zrc20.go b/x/fungible/keeper/msg_server_deploy_fungible_coin_zrc20.go index 2d38dd8820..27b31aab29 100644 --- a/x/fungible/keeper/msg_server_deploy_fungible_coin_zrc20.go +++ b/x/fungible/keeper/msg_server_deploy_fungible_coin_zrc20.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/ethereum/go-ethereum/common" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/coin" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" "github.com/zeta-chain/zetacore/x/fungible/types" ) @@ -45,7 +45,7 @@ func (k msgServer) DeployFungibleCoinZRC20(goCtx context.Context, msg *types.Msg return nil, cosmoserrors.Wrap(sdkerrors.ErrUnauthorized, "Deploy can only be executed by the correct policy account") } - if msg.CoinType == pkg.CoinType_Gas { + if msg.CoinType == coin.CoinType_Gas { // #nosec G701 always in range address, err = k.SetupChainGasCoinAndPool(ctx, msg.ForeignChainId, msg.Name, msg.Symbol, uint8(msg.Decimals), big.NewInt(msg.GasLimit)) if err != nil { diff --git a/x/fungible/keeper/msg_server_deploy_fungible_coin_zrc20_test.go b/x/fungible/keeper/msg_server_deploy_fungible_coin_zrc20_test.go index 709b38fe00..75ec3f4d08 100644 --- a/x/fungible/keeper/msg_server_deploy_fungible_coin_zrc20_test.go +++ b/x/fungible/keeper/msg_server_deploy_fungible_coin_zrc20_test.go @@ -7,7 +7,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ethcommon "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/coin" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" @@ -39,7 +39,7 @@ func TestMsgServer_DeployFungibleCoinZRC20(t *testing.T) { 8, "foo", "foo", - pkg.CoinType_Gas, + coin.CoinType_Gas, 1000000, )) require.NoError(t, err) @@ -49,7 +49,7 @@ func TestMsgServer_DeployFungibleCoinZRC20(t *testing.T) { // can retrieve the gas coin foreignCoin, found := k.GetForeignCoins(ctx, gasAddress) require.True(t, found) - require.Equal(t, foreignCoin.CoinType, pkg.CoinType_Gas) + require.Equal(t, foreignCoin.CoinType, coin.CoinType_Gas) require.Contains(t, foreignCoin.Name, "foo") // check gas limit @@ -71,7 +71,7 @@ func TestMsgServer_DeployFungibleCoinZRC20(t *testing.T) { 8, "bar", "bar", - pkg.CoinType_ERC20, + coin.CoinType_ERC20, 2000000, )) require.NoError(t, err) @@ -79,7 +79,7 @@ func TestMsgServer_DeployFungibleCoinZRC20(t *testing.T) { foreignCoin, found = k.GetForeignCoins(ctx, res.Address) require.True(t, found) - require.Equal(t, foreignCoin.CoinType, pkg.CoinType_ERC20) + require.Equal(t, foreignCoin.CoinType, coin.CoinType_ERC20) require.Contains(t, foreignCoin.Name, "bar") // check gas limit @@ -115,7 +115,7 @@ func TestMsgServer_DeployFungibleCoinZRC20(t *testing.T) { 8, "foo", "foo", - pkg.CoinType_Gas, + coin.CoinType_Gas, 1000000, )) require.Error(t, err) @@ -142,7 +142,7 @@ func TestMsgServer_DeployFungibleCoinZRC20(t *testing.T) { 78, "foo", "foo", - pkg.CoinType_Gas, + coin.CoinType_Gas, 1000000, )) require.Error(t, err) @@ -169,7 +169,7 @@ func TestMsgServer_DeployFungibleCoinZRC20(t *testing.T) { 8, "foo", "foo", - pkg.CoinType_Gas, + coin.CoinType_Gas, 1000000, )) require.Error(t, err) @@ -196,7 +196,7 @@ func TestMsgServer_DeployFungibleCoinZRC20(t *testing.T) { 8, "foo", "foo", - pkg.CoinType_Gas, + coin.CoinType_Gas, 1000000, ) @@ -213,7 +213,7 @@ func TestMsgServer_DeployFungibleCoinZRC20(t *testing.T) { require.ErrorIs(t, err, types.ErrForeignCoinAlreadyExist) // Similar to above, redeploying existing erc20 should also fail - deployMsg.CoinType = pkg.CoinType_ERC20 + deployMsg.CoinType = coin.CoinType_ERC20 keepertest.MockIsAuthorized(&authorityMock.Mock, admin, authoritytypes.PolicyType_groupAdmin, true) _, err = keeper.NewMsgServerImpl(*k).DeployFungibleCoinZRC20(ctx, deployMsg) diff --git a/x/fungible/keeper/msg_server_update_contract_bytecode_test.go b/x/fungible/keeper/msg_server_update_contract_bytecode_test.go index 2c40ecdbd7..48f7db6b6c 100644 --- a/x/fungible/keeper/msg_server_update_contract_bytecode_test.go +++ b/x/fungible/keeper/msg_server_update_contract_bytecode_test.go @@ -11,7 +11,8 @@ import ( "github.com/evmos/ethermint/x/evm/statedb" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" @@ -39,7 +40,7 @@ func TestKeeper_UpdateContractBytecode(t *testing.T) { authorityMock := keepertest.GetFungibleAuthorityMock(t, k) // sample chainIDs and addresses - chainList := pkg.DefaultChainsList() + chainList := chains.DefaultChainsList() require.True(t, len(chainList) > 1) require.NotNil(t, chainList[0]) require.NotNil(t, chainList[1]) @@ -86,7 +87,7 @@ func TestKeeper_UpdateContractBytecode(t *testing.T) { "BETA", 18, chainID2, - pkg.CoinType_ERC20, + coin.CoinType_ERC20, "beta", big.NewInt(90_000), ) @@ -132,7 +133,7 @@ func TestKeeper_UpdateContractBytecode(t *testing.T) { "GAMMA", 18, chainID1, - pkg.CoinType_ERC20, + coin.CoinType_ERC20, "gamma", big.NewInt(90_000), ) diff --git a/x/fungible/keeper/msg_server_update_system_contract.go b/x/fungible/keeper/msg_server_update_system_contract.go index c0d776c811..bda5373c3c 100644 --- a/x/fungible/keeper/msg_server_update_system_contract.go +++ b/x/fungible/keeper/msg_server_update_system_contract.go @@ -10,7 +10,7 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" "github.com/zeta-chain/protocol-contracts/pkg/contracts/zevm/systemcontract.sol" "github.com/zeta-chain/protocol-contracts/pkg/contracts/zevm/zrc20.sol" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/coin" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" "github.com/zeta-chain/zetacore/x/fungible/types" ) @@ -47,7 +47,7 @@ func (k msgServer) UpdateSystemContract(goCtx context.Context, msg *types.MsgUpd if err != nil { return nil, cosmoserrors.Wrapf(types.ErrContractCall, "failed to call zrc20 contract method updateSystemContractAddress (%s)", err.Error()) } - if fcoin.CoinType == pkg.CoinType_Gas { + if fcoin.CoinType == coin.CoinType_Gas { _, err = k.CallEVM(tmpCtx, *sysABI, types.ModuleAddressEVM, newSystemContractAddr, BigIntZero, nil, true, false, "setGasCoinZRC20", big.NewInt(fcoin.ForeignChainId), zrc20Addr) if err != nil { return nil, cosmoserrors.Wrapf(types.ErrContractCall, "failed to call system contract method setGasCoinZRC20 (%s)", err.Error()) diff --git a/x/fungible/keeper/msg_server_update_system_contract_test.go b/x/fungible/keeper/msg_server_update_system_contract_test.go index 147e65af81..f66ccd1643 100644 --- a/x/fungible/keeper/msg_server_update_system_contract_test.go +++ b/x/fungible/keeper/msg_server_update_system_contract_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/require" "github.com/zeta-chain/protocol-contracts/pkg/contracts/zevm/systemcontract.sol" zrc20 "github.com/zeta-chain/protocol-contracts/pkg/contracts/zevm/zrc20.sol" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" @@ -43,7 +43,7 @@ func TestKeeper_UpdateSystemContract(t *testing.T) { return address.Hex() } - chains := pkg.DefaultChainsList() + chains := chains.DefaultChainsList() require.True(t, len(chains) > 1) require.NotNil(t, chains[0]) require.NotNil(t, chains[1]) @@ -193,7 +193,7 @@ func TestKeeper_UpdateSystemContract(t *testing.T) { admin := sample.AccAddress() authorityMock := keepertest.GetFungibleAuthorityMock(t, k) - chains := pkg.DefaultChainsList() + chains := chains.DefaultChainsList() require.True(t, len(chains) > 1) require.NotNil(t, chains[0]) chainID1 := chains[0].ChainId diff --git a/x/fungible/types/events.pb.go b/x/fungible/types/events.pb.go index 6e616e2403..b6e51845c2 100644 --- a/x/fungible/types/events.pb.go +++ b/x/fungible/types/events.pb.go @@ -11,7 +11,7 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - proto1 "github.com/zeta-chain/zetacore/pkg/proto" + coin "github.com/zeta-chain/zetacore/pkg/coin" ) // Reference imports to suppress errors if they are not otherwise used. @@ -94,15 +94,15 @@ func (m *EventSystemContractUpdated) GetSigner() string { } type EventZRC20Deployed struct { - MsgTypeUrl string `protobuf:"bytes,1,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` - ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Contract string `protobuf:"bytes,3,opt,name=contract,proto3" json:"contract,omitempty"` - Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` - Symbol string `protobuf:"bytes,5,opt,name=symbol,proto3" json:"symbol,omitempty"` - Decimals int64 `protobuf:"varint,6,opt,name=decimals,proto3" json:"decimals,omitempty"` - CoinType proto1.CoinType `protobuf:"varint,7,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` - Erc20 string `protobuf:"bytes,8,opt,name=erc20,proto3" json:"erc20,omitempty"` - GasLimit int64 `protobuf:"varint,9,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + MsgTypeUrl string `protobuf:"bytes,1,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` + ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + Contract string `protobuf:"bytes,3,opt,name=contract,proto3" json:"contract,omitempty"` + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` + Symbol string `protobuf:"bytes,5,opt,name=symbol,proto3" json:"symbol,omitempty"` + Decimals int64 `protobuf:"varint,6,opt,name=decimals,proto3" json:"decimals,omitempty"` + CoinType coin.CoinType `protobuf:"varint,7,opt,name=coin_type,json=coinType,proto3,enum=coin.CoinType" json:"coin_type,omitempty"` + Erc20 string `protobuf:"bytes,8,opt,name=erc20,proto3" json:"erc20,omitempty"` + GasLimit int64 `protobuf:"varint,9,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` } func (m *EventZRC20Deployed) Reset() { *m = EventZRC20Deployed{} } @@ -180,11 +180,11 @@ func (m *EventZRC20Deployed) GetDecimals() int64 { return 0 } -func (m *EventZRC20Deployed) GetCoinType() proto1.CoinType { +func (m *EventZRC20Deployed) GetCoinType() coin.CoinType { if m != nil { return m.CoinType } - return proto1.CoinType_Zeta + return coin.CoinType_Zeta } func (m *EventZRC20Deployed) GetErc20() string { @@ -202,15 +202,15 @@ func (m *EventZRC20Deployed) GetGasLimit() int64 { } type EventZRC20WithdrawFeeUpdated struct { - MsgTypeUrl string `protobuf:"bytes,1,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` - ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - CoinType proto1.CoinType `protobuf:"varint,3,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` - Zrc20Address string `protobuf:"bytes,4,opt,name=zrc20_address,json=zrc20Address,proto3" json:"zrc20_address,omitempty"` - OldWithdrawFee string `protobuf:"bytes,5,opt,name=old_withdraw_fee,json=oldWithdrawFee,proto3" json:"old_withdraw_fee,omitempty"` - NewWithdrawFee string `protobuf:"bytes,6,opt,name=new_withdraw_fee,json=newWithdrawFee,proto3" json:"new_withdraw_fee,omitempty"` - Signer string `protobuf:"bytes,7,opt,name=signer,proto3" json:"signer,omitempty"` - OldGasLimit string `protobuf:"bytes,8,opt,name=old_gas_limit,json=oldGasLimit,proto3" json:"old_gas_limit,omitempty"` - NewGasLimit string `protobuf:"bytes,9,opt,name=new_gas_limit,json=newGasLimit,proto3" json:"new_gas_limit,omitempty"` + MsgTypeUrl string `protobuf:"bytes,1,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` + ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + CoinType coin.CoinType `protobuf:"varint,3,opt,name=coin_type,json=coinType,proto3,enum=coin.CoinType" json:"coin_type,omitempty"` + Zrc20Address string `protobuf:"bytes,4,opt,name=zrc20_address,json=zrc20Address,proto3" json:"zrc20_address,omitempty"` + OldWithdrawFee string `protobuf:"bytes,5,opt,name=old_withdraw_fee,json=oldWithdrawFee,proto3" json:"old_withdraw_fee,omitempty"` + NewWithdrawFee string `protobuf:"bytes,6,opt,name=new_withdraw_fee,json=newWithdrawFee,proto3" json:"new_withdraw_fee,omitempty"` + Signer string `protobuf:"bytes,7,opt,name=signer,proto3" json:"signer,omitempty"` + OldGasLimit string `protobuf:"bytes,8,opt,name=old_gas_limit,json=oldGasLimit,proto3" json:"old_gas_limit,omitempty"` + NewGasLimit string `protobuf:"bytes,9,opt,name=new_gas_limit,json=newGasLimit,proto3" json:"new_gas_limit,omitempty"` } func (m *EventZRC20WithdrawFeeUpdated) Reset() { *m = EventZRC20WithdrawFeeUpdated{} } @@ -260,11 +260,11 @@ func (m *EventZRC20WithdrawFeeUpdated) GetChainId() int64 { return 0 } -func (m *EventZRC20WithdrawFeeUpdated) GetCoinType() proto1.CoinType { +func (m *EventZRC20WithdrawFeeUpdated) GetCoinType() coin.CoinType { if m != nil { return m.CoinType } - return proto1.CoinType_Zeta + return coin.CoinType_Zeta } func (m *EventZRC20WithdrawFeeUpdated) GetZrc20Address() string { @@ -557,55 +557,55 @@ func init() { func init() { proto.RegisterFile("fungible/events.proto", fileDescriptor_858e6494730deffd) } var fileDescriptor_858e6494730deffd = []byte{ - // 756 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xc1, 0x4e, 0xdb, 0x4a, - 0x14, 0xc5, 0x04, 0x02, 0x19, 0x08, 0x81, 0x51, 0xde, 0x93, 0x5f, 0x78, 0x2f, 0x42, 0x79, 0xaa, - 0x4a, 0x51, 0x1b, 0xa3, 0x54, 0xfd, 0x00, 0xa0, 0xa5, 0x45, 0x6a, 0xa5, 0x2a, 0x94, 0x56, 0x62, - 0x63, 0x4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xec, 0x73, 0x18, 0x87, 0xda, 0x38, 0xf5, 0x62, 0xf7, 0x18, - 0xc6, 0xa1, 0x54, 0x9a, 0xab, 0x33, 0x15, 0x43, 0x27, 0xb7, 0x0d, 0x2f, 0x1d, 0xf5, 0x36, 0xdb, - 0x74, 0x7e, 0x1a, 0xa8, 0xa9, 0xa4, 0xd9, 0x4d, 0x05, 0x38, 0xcc, 0x7d, 0xc0, 0x4b, 0x7a, 0x82, - 0x56, 0x6f, 0x99, 0x8d, 0x0d, 0xe7, 0xc6, 0x98, 0xdb, 0x42, 0x6b, 0xd2, 0x78, 0x03, 0xdd, 0xc3, - 0x1e, 0x12, 0x3e, 0xd4, 0xda, 0x34, 0x28, 0x24, 0x79, 0xef, 0x37, 0x84, 0x0f, 0x25, 0x56, 0x1a, - 0xb9, 0x8c, 0xd5, 0x2a, 0xb1, 0xc0, 0x2d, 0x61, 0x27, 0xa7, 0x9a, 0x9f, 0x3e, 0xd5, 0xee, 0xc1, - 0xf7, 0xab, 0xb6, 0x71, 0x71, 0xd5, 0x36, 0x2e, 0xaf, 0xda, 0xc6, 0xe7, 0xeb, 0xf6, 0xcc, 0xc5, - 0x75, 0x7b, 0xe6, 0xd7, 0x75, 0x7b, 0xe6, 0xd8, 0xf2, 0x7c, 0x31, 0x1c, 0x0d, 0xba, 0x0e, 0x0b, - 0x2d, 0x79, 0x29, 0xcf, 0x94, 0xd9, 0xac, 0xdc, 0x6c, 0xd6, 0x99, 0x35, 0xf9, 0xdd, 0xa4, 0x11, - 0xf0, 0x41, 0x55, 0xfd, 0x4d, 0x9e, 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x34, 0xb2, 0xd9, 0x08, - 0xbb, 0x06, 0x00, 0x00, + // 761 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xd1, 0x4e, 0xdb, 0x48, + 0x14, 0xc5, 0x04, 0x02, 0x19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xe4, 0xe1, 0x8f, 0x00, 0x00, 0x00, 0xff, + 0xff, 0xbf, 0x18, 0x8d, 0x7b, 0xc3, 0x06, 0x00, 0x00, } func (m *EventSystemContractUpdated) Marshal() (dAtA []byte, err error) { @@ -1605,7 +1605,7 @@ func (m *EventZRC20Deployed) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CoinType |= proto1.CoinType(b&0x7F) << shift + m.CoinType |= coin.CoinType(b&0x7F) << shift if b < 0x80 { break } @@ -1776,7 +1776,7 @@ func (m *EventZRC20WithdrawFeeUpdated) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CoinType |= proto1.CoinType(b&0x7F) << shift + m.CoinType |= coin.CoinType(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/fungible/types/expected_keepers.go b/x/fungible/types/expected_keepers.go index 3ca676ae6f..f1064b0476 100644 --- a/x/fungible/types/expected_keepers.go +++ b/x/fungible/types/expected_keepers.go @@ -11,7 +11,7 @@ import ( "github.com/ethereum/go-ethereum/core/vm" "github.com/evmos/ethermint/x/evm/statedb" evmtypes "github.com/evmos/ethermint/x/evm/types" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" ) @@ -31,7 +31,7 @@ type BankKeeper interface { } type ObserverKeeper interface { - GetSupportedChains(ctx sdk.Context) []*pkg.Chain + GetSupportedChains(ctx sdk.Context) []*chains.Chain } type EVMKeeper interface { diff --git a/x/fungible/types/foreign_coins.pb.go b/x/fungible/types/foreign_coins.pb.go index 78f90e0d9d..05a014fa47 100644 --- a/x/fungible/types/foreign_coins.pb.go +++ b/x/fungible/types/foreign_coins.pb.go @@ -12,7 +12,7 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - proto1 "github.com/zeta-chain/zetacore/pkg/proto" + coin "github.com/zeta-chain/zetacore/pkg/coin" ) // Reference imports to suppress errors if they are not otherwise used. @@ -27,14 +27,14 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type ForeignCoins struct { - // string index = 1; + // string index = 1; Zrc20ContractAddress string `protobuf:"bytes,2,opt,name=zrc20_contract_address,json=zrc20ContractAddress,proto3" json:"zrc20_contract_address,omitempty"` Asset string `protobuf:"bytes,3,opt,name=asset,proto3" json:"asset,omitempty"` ForeignChainId int64 `protobuf:"varint,4,opt,name=foreign_chain_id,json=foreignChainId,proto3" json:"foreign_chain_id,omitempty"` Decimals uint32 `protobuf:"varint,5,opt,name=decimals,proto3" json:"decimals,omitempty"` Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` Symbol string `protobuf:"bytes,7,opt,name=symbol,proto3" json:"symbol,omitempty"` - CoinType proto1.CoinType `protobuf:"varint,8,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` + CoinType coin.CoinType `protobuf:"varint,8,opt,name=coin_type,json=coinType,proto3,enum=coin.CoinType" json:"coin_type,omitempty"` GasLimit uint64 `protobuf:"varint,9,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` Paused bool `protobuf:"varint,10,opt,name=paused,proto3" json:"paused,omitempty"` LiquidityCap github_com_cosmos_cosmos_sdk_types.Uint `protobuf:"bytes,11,opt,name=liquidity_cap,json=liquidityCap,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Uint" json:"liquidity_cap"` @@ -115,11 +115,11 @@ func (m *ForeignCoins) GetSymbol() string { return "" } -func (m *ForeignCoins) GetCoinType() proto1.CoinType { +func (m *ForeignCoins) GetCoinType() coin.CoinType { if m != nil { return m.CoinType } - return proto1.CoinType_Zeta + return coin.CoinType_Zeta } func (m *ForeignCoins) GetGasLimit() uint64 { @@ -143,33 +143,34 @@ func init() { func init() { proto.RegisterFile("fungible/foreign_coins.proto", fileDescriptor_5285bb476cecbbf8) } var fileDescriptor_5285bb476cecbbf8 = []byte{ - // 415 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x52, 0xcf, 0x6a, 0xdb, 0x30, - 0x1c, 0x8e, 0x96, 0x34, 0x73, 0xb4, 0xa6, 0x0c, 0x11, 0x8a, 0x48, 0x87, 0x6b, 0x76, 0x99, 0x19, - 0xd4, 0x1a, 0xdd, 0x5e, 0x60, 0x0d, 0x0c, 0x0a, 0x3b, 0x99, 0xee, 0xb2, 0x8b, 0x51, 0x24, 0x55, - 0x15, 0xb1, 0x2d, 0xcd, 0x52, 0x60, 0xee, 0x75, 0x2f, 0xb0, 0xc7, 0xea, 0xb1, 0xc7, 0xb1, 0x43, - 0x19, 0xc9, 0x8b, 0x0c, 0xc9, 0x8e, 0xe9, 0x49, 0xdf, 0xf7, 0xfb, 0xf3, 0xfd, 0xfe, 0x09, 0xbe, - 0xb9, 0xdd, 0xd6, 0x52, 0xad, 0x4b, 0x41, 0x6e, 0x75, 0x23, 0x94, 0xac, 0x0b, 0xa6, 0x55, 0x6d, - 0x33, 0xd3, 0x68, 0xa7, 0xd1, 0xd9, 0xbd, 0x70, 0x94, 0xdd, 0x51, 0x55, 0x67, 0x01, 0xe9, 0x46, - 0x64, 0x87, 0x84, 0xe5, 0x42, 0x6a, 0xa9, 0x43, 0x1c, 0xf1, 0xa8, 0x4b, 0x59, 0xce, 0xcd, 0x46, - 0x12, 0xb3, 0x91, 0x1d, 0x7d, 0xfb, 0x6b, 0x0c, 0x8f, 0xbf, 0x74, 0xca, 0x2b, 0x2f, 0x8c, 0x3e, - 0xc1, 0xd3, 0xfb, 0x86, 0x5d, 0x7e, 0x28, 0x98, 0xae, 0x5d, 0x43, 0x99, 0x2b, 0x28, 0xe7, 0x8d, - 0xb0, 0x16, 0xbf, 0x48, 0x40, 0x3a, 0xcb, 0x17, 0xc1, 0xbb, 0xea,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0xa8, 0xac, 0xa8, 0xb9, 0xba, 0x7e, 0xd8, 0xc5, 0xe0, 0x71, 0x17, 0x83, 0x7f, 0xbb, 0x18, 0xfc, - 0xde, 0xc7, 0xa3, 0xc7, 0x7d, 0x3c, 0xfa, 0xb3, 0x8f, 0x47, 0xdf, 0xc9, 0x33, 0x41, 0x7f, 0xe2, - 0x8b, 0xb0, 0x48, 0x72, 0xb8, 0x36, 0xf9, 0x49, 0x86, 0x0f, 0x12, 0xd4, 0xd7, 0xd3, 0x70, 0xd7, - 0x8f, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x7d, 0xa7, 0x10, 0x39, 0x02, 0x00, 0x00, + // 418 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x52, 0xc1, 0x6a, 0xdc, 0x30, + 0x14, 0x5c, 0x75, 0x37, 0x5b, 0xaf, 0x9a, 0x2c, 0x45, 0x5d, 0x82, 0xd8, 0x14, 0xc7, 0xf4, 0x52, + 0x43, 0x89, 0x55, 0xd2, 0xfe, 0x40, 0x63, 0x28, 0x04, 0x7a, 0x32, 0xe9, 0xa5, 0x17, 0x23, 0x4b, + 0x8a, 0x22, 0x62, 0x5b, 0xae, 0x25, 0x43, 0x9d, 0x73, 0x3f, 0xa0, 0x9f, 0x95, 0x63, 0x8e, 0xa5, + 0x87, 0x50, 0x76, 0x7f, 0xa4, 0x48, 0x76, 0x4c, 0x2f, 0xf6, 0xcc, 0x3c, 0xbd, 0xf1, 0x3c, 0x3f, + 0xc1, 0xd7, 0xd7, 0x5d, 0x2d, 0x55, 0x51, 0x0a, 0x72, 0xad, 0x5b, 0xa1, 0x64, 0x9d, 0x33, 0xad, + 0x6a, 0x93, 0x34, 0xad, 0xb6, 0x1a, 0x9d, 0xdc, 0x09, 0x4b, 0xd9, 0x0d, 0x55, 0x75, 0xe2, 0x91, + 0x6e, 0x45, 0xf2, 0xd4,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0xe0, 0x18, 0x46, 0x20, 0x0e, 0xb2, 0x91, 0xa1, + 0x2b, 0x78, 0x54, 0xaa, 0xef, 0x9d, 0xe2, 0xca, 0xf6, 0x39, 0xa3, 0x0d, 0x7e, 0xe1, 0x02, 0x5c, + 0x90, 0xfb, 0xc7, 0xd3, 0xd9, 0x9f, 0xc7, 0xd3, 0xb7, 0x52, 0xd9, 0x9b, 0xae, 0x48, 0x98, 0xae, + 0x08, 0xd3, 0xa6, 0xd2, 0x66, 0x7c, 0x9d, 0x19, 0x7e, 0x4b, 0x5c, 0x2c, 0x93, 0x7c, 0x55, 0xb5, + 0xcd, 0x0e, 0x27, 0x97, 0x94, 0x36, 0x17, 0x97, 0xf7, 0xbb, 0x10, 0x3c, 0xec, 0x42, 0xf0, 0x77, + 0x17, 0x82, 0x5f, 0xfb, 0x70, 0xf6, 0xb0, 0x0f, 0x67, 0xbf, 0xf7, 0xe1, 0xec, 0x1b, 0xf9, 0xcf, + 0xd0, 0x6d, 0xfa, 0xcc, 0xff, 0x49, 0xf2, 0xb4, 0x74, 0xf2, 0x83, 0x4c, 0xf7, 0xc4, 0xbb, 0x17, + 0x4b, 0xbf, 0xd8, 0x0f, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x6a, 0xca, 0x24, 0xbf, 0x40, 0x02, + 0x00, 0x00, } func (m *ForeignCoins) Marshal() (dAtA []byte, err error) { @@ -531,7 +532,7 @@ func (m *ForeignCoins) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CoinType |= proto1.CoinType(b&0x7F) << shift + m.CoinType |= coin.CoinType(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/fungible/types/message_deploy_fungible_coin_zrc20.go b/x/fungible/types/message_deploy_fungible_coin_zrc20.go index cdba98fded..6103b6ef35 100644 --- a/x/fungible/types/message_deploy_fungible_coin_zrc20.go +++ b/x/fungible/types/message_deploy_fungible_coin_zrc20.go @@ -4,14 +4,14 @@ import ( cosmoserrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/coin" ) const TypeMsgDeployFungibleCoinZRC20 = "deploy_fungible_coin_zrc_20" var _ sdk.Msg = &MsgDeployFungibleCoinZRC20{} -func NewMsgDeployFungibleCoinZRC20(creator string, ERC20 string, foreignChainID int64, decimals uint32, name string, symbol string, coinType pkg.CoinType, gasLimit int64) *MsgDeployFungibleCoinZRC20 { +func NewMsgDeployFungibleCoinZRC20(creator string, ERC20 string, foreignChainID int64, decimals uint32, name string, symbol string, coinType coin.CoinType, gasLimit int64) *MsgDeployFungibleCoinZRC20 { return &MsgDeployFungibleCoinZRC20{ Creator: creator, ERC20: ERC20, diff --git a/x/fungible/types/message_deploy_fungible_coin_zrc20_test.go b/x/fungible/types/message_deploy_fungible_coin_zrc20_test.go index bd9dbbe884..99b7ea9886 100644 --- a/x/fungible/types/message_deploy_fungible_coin_zrc20_test.go +++ b/x/fungible/types/message_deploy_fungible_coin_zrc20_test.go @@ -7,7 +7,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/fungible/types" ) @@ -27,7 +27,7 @@ func TestMsgDeployFungibleCoinZRC4_ValidateBasic(t *testing.T) { 6, "test", "test", - pkg.CoinType_ERC20, + coin.CoinType_ERC20, 10, ), err: sdkerrors.ErrInvalidAddress, @@ -41,7 +41,7 @@ func TestMsgDeployFungibleCoinZRC4_ValidateBasic(t *testing.T) { 6, "test", "test", - pkg.CoinType_ERC20, + coin.CoinType_ERC20, -1, ), err: sdkerrors.ErrInvalidGasLimit, @@ -55,7 +55,7 @@ func TestMsgDeployFungibleCoinZRC4_ValidateBasic(t *testing.T) { 78, "test", "test", - pkg.CoinType_ERC20, + coin.CoinType_ERC20, 10, ), err: cosmoserrors.Wrapf(sdkerrors.ErrInvalidRequest, "decimals must be less than 78"), @@ -69,7 +69,7 @@ func TestMsgDeployFungibleCoinZRC4_ValidateBasic(t *testing.T) { 6, "test", "test", - pkg.CoinType_ERC20, + coin.CoinType_ERC20, 10, ), }, diff --git a/x/fungible/types/tx.pb.go b/x/fungible/types/tx.pb.go index fcc5774138..a4db855245 100644 --- a/x/fungible/types/tx.pb.go +++ b/x/fungible/types/tx.pb.go @@ -14,7 +14,7 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" - proto1 "github.com/zeta-chain/zetacore/pkg/proto" + coin "github.com/zeta-chain/zetacore/pkg/coin" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -355,14 +355,14 @@ func (m *MsgUpdateSystemContractResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateSystemContractResponse proto.InternalMessageInfo type MsgDeployFungibleCoinZRC20 struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ERC20 string `protobuf:"bytes,2,opt,name=ERC20,proto3" json:"ERC20,omitempty"` - ForeignChainId int64 `protobuf:"varint,3,opt,name=foreign_chain_id,json=foreignChainId,proto3" json:"foreign_chain_id,omitempty"` - Decimals uint32 `protobuf:"varint,4,opt,name=decimals,proto3" json:"decimals,omitempty"` - Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` - Symbol string `protobuf:"bytes,6,opt,name=symbol,proto3" json:"symbol,omitempty"` - CoinType proto1.CoinType `protobuf:"varint,7,opt,name=coin_type,json=coinType,proto3,enum=pkg.CoinType" json:"coin_type,omitempty"` - GasLimit int64 `protobuf:"varint,8,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + ERC20 string `protobuf:"bytes,2,opt,name=ERC20,proto3" json:"ERC20,omitempty"` + ForeignChainId int64 `protobuf:"varint,3,opt,name=foreign_chain_id,json=foreignChainId,proto3" json:"foreign_chain_id,omitempty"` + Decimals uint32 `protobuf:"varint,4,opt,name=decimals,proto3" json:"decimals,omitempty"` + Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` + Symbol string `protobuf:"bytes,6,opt,name=symbol,proto3" json:"symbol,omitempty"` + CoinType coin.CoinType `protobuf:"varint,7,opt,name=coin_type,json=coinType,proto3,enum=coin.CoinType" json:"coin_type,omitempty"` + GasLimit int64 `protobuf:"varint,8,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` } func (m *MsgDeployFungibleCoinZRC20) Reset() { *m = MsgDeployFungibleCoinZRC20{} } @@ -440,11 +440,11 @@ func (m *MsgDeployFungibleCoinZRC20) GetSymbol() string { return "" } -func (m *MsgDeployFungibleCoinZRC20) GetCoinType() proto1.CoinType { +func (m *MsgDeployFungibleCoinZRC20) GetCoinType() coin.CoinType { if m != nil { return m.CoinType } - return proto1.CoinType_Zeta + return coin.CoinType_Zeta } func (m *MsgDeployFungibleCoinZRC20) GetGasLimit() int64 { @@ -890,70 +890,70 @@ func init() { func init() { proto.RegisterFile("fungible/tx.proto", fileDescriptor_197fdedece277fa0) } var fileDescriptor_197fdedece277fa0 = []byte{ - // 999 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0x5d, 0x6b, 0x1b, 0x47, - 0x14, 0xd5, 0xda, 0xf1, 0x87, 0x6e, 0x22, 0x59, 0x19, 0xd4, 0x64, 0x2b, 0x17, 0x39, 0xd9, 0x84, - 0xc6, 0x35, 0x44, 0x9b, 0xaa, 0x69, 0x43, 0xa1, 0x49, 0xb1, 0x15, 0xbb, 0x0d, 0x44, 0x25, 0xac, - 0xe3, 0x94, 0xfa, 0x65, 0x19, 0xef, 0x8e, 0x57, 0x8b, 0xa5, 0x9d, 0xed, 0xce, 0xa8, 0x8a, 0xf2, - 0x56, 0x28, 0x14, 0x02, 0x2d, 0x81, 0xfe, 0x8f, 0x42, 0xff, 0x45, 0x1e, 0xf3, 0x58, 0x4a, 0x31, - 0xc5, 0xfe, 0x23, 0x65, 0x66, 0x3f, 0xbc, 0xfa, 0x58, 0xd9, 0x52, 0x9e, 0x3c, 0x33, 0xbe, 0xe7, - 0xec, 0xb9, 0x77, 0xee, 0x3d, 0xab, 0x85, 0xab, 0x87, 0x5d, 0xcf, 0x71, 0x0f, 0xda, 0x44, 0xe7, - 0x2f, 0x6b, 0x7e, 0x40, 0x39, 0x45, 0xab, 0xaf, 0x08, 0xc7, 0x56, 0x0b, 0xbb, 0x5e, 0x4d, 0xae, - 0x68, 0x40, 0x6a, 0x71, 0x54, 0xa5, 0xec, 0x50, 0x87, 0xca, 0x38, 0x5d, 0xac, 0x42, 0x48, 0xa5, - 0xe0, 0x1f, 0x39, 0xba, 0x7f, 0xe4, 0x84, 0x5b, 0xed, 0x3e, 0xa8, 0x4d, 0xe6, 0x3c, 0x26, 0x7e, - 0x9b, 0xf6, 0x77, 0xfb, 0x8c, 0x93, 0x4e, 0x83, 0x7a, 0x3c, 0xc0, 0x16, 0x67, 0x48, 0x85, 0x25, - 0x2b, 0x20, 0x98, 0xd3, 0x40, 0x55, 0x6e, 0x28, 0xeb, 0x79, 0x23, 0xde, 0x6a, 0xff, 0x2a, 0x70, - 0x23, 0x0b, 0x66, 0x10, 0xe6, 0x53, 0x8f, 0x11, 0xb4, 0x01, 0xa5, 0xae, 0xe7, 0xb2, 0x1e, 0xf6, - 0x5f, 0xd4, 0x77, 0xb0, 0xc5, 0x69, 0xd0, 0x8f, 0x78, 0x46, 0xce, 0x51, 0x19, 0x16, 0x7a, 0x22, - 0x03, 0x75, 0x4e, 0x06, 0x84, 0x1b, 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x74, 0xe8, 0x4f, 0x64, 0x27, 0xca, 0x95, 0xba, 0xde, 0x84, 0x12, 0xc6, 0x69, 0xce, 0x9d, - 0xa5, 0xa9, 0x55, 0xe1, 0xa3, 0x71, 0x2c, 0xc9, 0x7d, 0xfd, 0xa2, 0xa4, 0x06, 0x2f, 0xbe, 0xcd, - 0xad, 0x3e, 0x27, 0x16, 0xb5, 0x27, 0x0d, 0xde, 0x27, 0x50, 0xca, 0x68, 0x9f, 0x15, 0x6b, 0xb0, - 0x6b, 0x90, 0x16, 0xce, 0x88, 0x20, 0x34, 0x5b, 0x98, 0xb5, 0x22, 0x47, 0x11, 0x2d, 0xdf, 0xa0, - 0x36, 0xf9, 0x16, 0xb3, 0xd6, 0x40, 0xcb, 0x0f, 0xab, 0x48, 0xb4, 0xfe, 0xa9, 0xc8, 0xde, 0x4a, - 0x0d, 0xc6, 0x33, 0xdc, 0x65, 0xc4, 0xde, 0xe5, 0x98, 0x77, 0x27, 0x98, 0x27, 0xba, 0x03, 0x2b, - 0x03, 0x2e, 0x41, 0x84, 0xd6, 0x79, 0x61, 0x43, 0x69, 0x9f, 0x20, 0x0c, 0x35, 0x61, 0x11, 0x5b, - 0xdc, 0xa5, 0x9e, 0xd4, 0x58, 0xac, 0x7f, 0x5e, 0x9b, 0x60, 0xf7, 0xb5, 0x50, 0x48, 0x5a, 0xc3, - 0xa6, 0x04, 0x1b, 0x11, 0x89, 0x76, 0x5b, 0xb6, 0x40, 0x86, 0xde, 0x24, 0xad, 0xbf, 0x46, 0xd2, - 0x7a, 0xea, 0xfe, 0xd8, 0x75, 0x6d, 0x97, 0xf7, 0x1b, 0xd8, 0x7f, 0x5f, 0xf3, 0x7b, 0x0e, 0x85, - 0x76, 0x4c, 0x67, 0x5a, 0xd8, 0x0f, 0xab, 0x3f, 0xbd, 0x43, 0x5d, 0x69, 0xa7, 0x44, 0x8d, 0x66, - 0x96, 0x96, 0x1c, 0x67, 0xb6, 0x51, 0x07, 0x35, 0xab, 0x46,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, 0x7a, 0xca, 0x3b, 0x05, 0xf5, 0x5d, 0xf9, 0x14, 0x3d, 0x7e, 0x8a, 0xfe, 0x52, 0x3f, 0xfb, - 0x7e, 0x10, 0x46, 0x7a, 0xb0, 0x28, 0xbf, 0x00, 0x3e, 0xfb, 0x3f, 0x00, 0x00, 0xff, 0xff, 0x7f, - 0xff, 0xad, 0xf0, 0x58, 0x0c, 0x00, 0x00, + // 1001 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0x5d, 0x6f, 0xdb, 0x54, + 0x18, 0xae, 0xdb, 0xf5, 0x23, 0xef, 0x96, 0x34, 0x3b, 0x84, 0xcd, 0xb8, 0x28, 0xdd, 0xbc, 0x89, + 0x95, 0xa1, 0xc5, 0x23, 0x0c, 0x26, 0x24, 0x36, 0xd4, 0x66, 0x2d, 0x4c, 0x5a, 0xd0, 0xe4, 0xae, + 0x43, 0xf4, 0xc6, 0x3a, 0xb5, 0x4f, 0x1d, 0x6b, 0x89, 0x8f, 0xf1, 0x39, 0x21, 0xcb, 0xee, 0x90, + 0xb8, 0x40, 0x93, 0x40, 0x93, 0xf8, 0x1f, 0x48, 0xfc, 0x8b, 0x5d, 0xee, 0x12, 0x21, 0x34, 0xa1, + 0xf6, 0x8f, 0xa0, 0x73, 0xfc, 0x51, 0xe7, 0xc3, 0x69, 0x93, 0xdd, 0xb4, 0xe7, 0xbc, 0x79, 0xdf, + 0xc7, 0xcf, 0xfb, 0xf5, 0x38, 0x81, 0x8b, 0x87, 0x5d, 0xdf, 0xf5, 0x0e, 0xda, 0xc4, 0xe0, 0xcf, + 0x6b, 0x41, 0x48, 0x39, 0x45, 0x6b, 0x2f, 0x08, 0xc7, 0x76, 0x0b, 0x7b, 0x7e, 0x4d, 0x9e, 0x68, + 0x48, 0x6a, 0x89, 0x97, 0x56, 0x71, 0xa9, 0x4b, 0xa5, 0x9f, 0x21, 0x4e,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0xab, 0x59, 0xa2, 0x52, 0x32, 0xaf, 0x14, 0xb8, 0x94, 0x23, + 0x66, 0x5f, 0x9c, 0x0d, 0x78, 0x38, 0x4e, 0xbb, 0x3f, 0x5b, 0xdc, 0x18, 0x4a, 0x23, 0xdf, 0x6c, + 0xce, 0x48, 0x69, 0x38, 0xee, 0xac, 0x94, 0xf2, 0xbe, 0x3d, 0xc8, 0x61, 0xce, 0x93, 0xd1, 0xbb, + 0x53, 0x60, 0x67, 0x03, 0x4f, 0x1f, 0xe6, 0x53, 0x84, 0x70, 0x98, 0xd5, 0x80, 0x0a, 0x4e, 0xc3, + 0x2a, 0x1b, 0x38, 0x15, 0xab, 0x71, 0x22, 0xb6, 0xf5, 0xf0, 0xf5, 0x51, 0x55, 0x79, 0x73, 0x54, + 0x55, 0xfe, 0x3b, 0xaa, 0x2a, 0xaf, 0x8e, 0xab, 0x73, 0x6f, 0x8e, 0xab, 0x73, 0x7f, 0x1f, 0x57, + 0xe7, 0xf6, 0x8d, 0x8c, 0x76, 0x0a, 0xe8, 0x5b, 0xf2, 0x29, 0x46, 0xf2, 0x14, 0xe3, 0xb9, 0x71, + 0xf2, 0x33, 0x42, 0x08, 0xe9, 0xc1, 0x92, 0xfc, 0x09, 0xf0, 0xd9, 0xff, 0x01, 0x00, 0x00, 0xff, + 0xff, 0x72, 0x83, 0xf4, 0x62, 0x5f, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -3058,7 +3058,7 @@ func (m *MsgDeployFungibleCoinZRC20) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CoinType |= proto1.CoinType(b&0x7F) << shift + m.CoinType |= coin.CoinType(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/observer/genesis.go b/x/observer/genesis.go index 61236567a3..7e3ff44311 100644 --- a/x/observer/genesis.go +++ b/x/observer/genesis.go @@ -2,7 +2,7 @@ package observer import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/x/observer/keeper" "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -106,7 +106,7 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) k.SetPendingNonces(ctx, pendingNonce) } } else { - for _, chain := range pkg.DefaultChainsList() { + for _, chain := range chains.DefaultChainsList() { if genState.Tss != nil { k.SetPendingNonces(ctx, types.PendingNonces{ NonceLow: 0, diff --git a/x/observer/keeper/block_header.go b/x/observer/keeper/block_header.go index 1ed54c9edd..aaf06bca4b 100644 --- a/x/observer/keeper/block_header.go +++ b/x/observer/keeper/block_header.go @@ -5,19 +5,19 @@ import ( "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/proofs" "github.com/zeta-chain/zetacore/x/observer/types" ) // SetBlockHeader set a specific block header in the store from its index -func (k Keeper) SetBlockHeader(ctx sdk.Context, header pkg.BlockHeader) { +func (k Keeper) SetBlockHeader(ctx sdk.Context, header proofs.BlockHeader) { store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.BlockHeaderKey)) b := k.cdc.MustMarshal(&header) store.Set(header.Hash, b) } // GetBlockHeader returns a block header from its hash -func (k Keeper) GetBlockHeader(ctx sdk.Context, hash []byte) (val pkg.BlockHeader, found bool) { +func (k Keeper) GetBlockHeader(ctx sdk.Context, hash []byte) (val proofs.BlockHeader, found bool) { store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.BlockHeaderKey)) b := store.Get(hash) diff --git a/x/observer/keeper/chain_params.go b/x/observer/keeper/chain_params.go index f0db89368f..7b5e0a246e 100644 --- a/x/observer/keeper/chain_params.go +++ b/x/observer/keeper/chain_params.go @@ -4,7 +4,7 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -42,7 +42,7 @@ func (k Keeper) GetChainParamsByChainID(ctx sdk.Context, chainID int64) (*types. // GetSupportedChainFromChainID returns the chain from the chain id // it returns nil if the chain doesn't exist or is not supported -func (k Keeper) GetSupportedChainFromChainID(ctx sdk.Context, chainID int64) *pkg.Chain { +func (k Keeper) GetSupportedChainFromChainID(ctx sdk.Context, chainID int64) *chains.Chain { cpl, found := k.GetChainParamsList(ctx) if !found { return nil @@ -50,24 +50,24 @@ func (k Keeper) GetSupportedChainFromChainID(ctx sdk.Context, chainID int64) *pk for _, cp := range cpl.ChainParams { if cp.ChainId == chainID && cp.IsSupported { - return pkg.GetChainFromChainID(chainID) + return chains.GetChainFromChainID(chainID) } } return nil } // GetSupportedChains returns the list of supported chains -func (k Keeper) GetSupportedChains(ctx sdk.Context) []*pkg.Chain { +func (k Keeper) GetSupportedChains(ctx sdk.Context) []*chains.Chain { cpl, found := k.GetChainParamsList(ctx) if !found { - return []*pkg.Chain{} + return []*chains.Chain{} } - var chains []*pkg.Chain + var c []*chains.Chain for _, cp := range cpl.ChainParams { if cp.IsSupported { - chains = append(chains, pkg.GetChainFromChainID(cp.ChainId)) + c = append(c, chains.GetChainFromChainID(cp.ChainId)) } } - return chains + return c } diff --git a/x/observer/keeper/chain_params_test.go b/x/observer/keeper/chain_params_test.go index 0818ec2a71..3464c950fa 100644 --- a/x/observer/keeper/chain_params_test.go +++ b/x/observer/keeper/chain_params_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/observer/types" @@ -49,12 +49,12 @@ func TestKeeper_GetSupportedChains(t *testing.T) { t.Run("return list containing supported chains", func(t *testing.T) { k, ctx, _, _ := keepertest.ObserverKeeper(t) - require.Greater(t, len(pkg.ExternalChainList()), 5) - supported1 := pkg.ExternalChainList()[0] - supported2 := pkg.ExternalChainList()[1] - unsupported := pkg.ExternalChainList()[2] - supported3 := pkg.ExternalChainList()[3] - supported4 := pkg.ExternalChainList()[4] + require.Greater(t, len(chains.ExternalChainList()), 5) + supported1 := chains.ExternalChainList()[0] + supported2 := chains.ExternalChainList()[1] + unsupported := chains.ExternalChainList()[2] + supported3 := chains.ExternalChainList()[3] + supported4 := chains.ExternalChainList()[4] var chainParamsList []*types.ChainParams chainParamsList = append(chainParamsList, sample.ChainParamsSupported(supported1.ChainId)) diff --git a/x/observer/keeper/grpc_query_block_header.go b/x/observer/keeper/grpc_query_block_header.go index 7ae2d72662..18e9c955c6 100644 --- a/x/observer/keeper/grpc_query_block_header.go +++ b/x/observer/keeper/grpc_query_block_header.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/proofs" "github.com/zeta-chain/zetacore/x/observer/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -22,9 +22,9 @@ func (k Keeper) GetAllBlockHeaders(c context.Context, req *types.QueryAllBlockHe store := ctx.KVStore(k.storeKey) blockHeaderStore := prefix.NewStore(store, types.KeyPrefix(types.BlockHeaderKey)) - var blockHeaders []*pkg.BlockHeader + var blockHeaders []*proofs.BlockHeader pageRes, err := query.Paginate(blockHeaderStore, req.Pagination, func(key []byte, value []byte) error { - var blockHeader pkg.BlockHeader + var blockHeader proofs.BlockHeader if err := k.cdc.Unmarshal(value, &blockHeader); err != nil { return err } diff --git a/x/observer/keeper/grpc_query_prove.go b/x/observer/keeper/grpc_query_prove.go index 219d77ba61..edfd0588e5 100644 --- a/x/observer/keeper/grpc_query_prove.go +++ b/x/observer/keeper/grpc_query_prove.go @@ -5,7 +5,8 @@ import ( "fmt" "github.com/btcsuite/btcutil" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/proofs" sdk "github.com/cosmos/cosmos-sdk/types" ethtypes "github.com/ethereum/go-ethereum/core/types" @@ -23,7 +24,7 @@ func (k Keeper) Prove(c context.Context, req *types.QueryProveRequest) (*types.Q } ctx := sdk.UnwrapSDKContext(c) - blockHash, err := pkg.StringToHash(req.ChainId, req.BlockHash) + blockHash, err := chains.StringToHash(req.ChainId, req.BlockHash) if err != nil { return nil, status.Error(codes.InvalidArgument, err.Error()) } @@ -35,11 +36,11 @@ func (k Keeper) Prove(c context.Context, req *types.QueryProveRequest) (*types.Q proven := false txBytes, err := req.Proof.Verify(res.Header, int(req.TxIndex)) - if err != nil && !pkg.IsErrorInvalidProof(err) { + if err != nil && !proofs.IsErrorInvalidProof(err) { return nil, status.Error(codes.Internal, err.Error()) } if err == nil { - if pkg.IsEVMChain(req.ChainId) { + if chains.IsEVMChain(req.ChainId) { var txx ethtypes.Transaction err = txx.UnmarshalBinary(txBytes) if err != nil { @@ -49,7 +50,7 @@ func (k Keeper) Prove(c context.Context, req *types.QueryProveRequest) (*types.Q return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("tx hash mismatch: %s != %s", txx.Hash().Hex(), req.TxHash)) } proven = true - } else if pkg.IsBitcoinChain(req.ChainId) { + } else if chains.IsBitcoinChain(req.ChainId) { tx, err := btcutil.NewTxFromBytes(txBytes) if err != nil { return nil, status.Error(codes.Internal, fmt.Sprintf("failed to unmarshal btc transaction: %s", err)) diff --git a/x/observer/keeper/grpc_query_tss.go b/x/observer/keeper/grpc_query_tss.go index 3be419e3ab..48485f0112 100644 --- a/x/observer/keeper/grpc_query_tss.go +++ b/x/observer/keeper/grpc_query_tss.go @@ -5,7 +5,8 @@ import ( "sort" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/crypto" "github.com/zeta-chain/zetacore/x/observer/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -45,18 +46,18 @@ func (k Keeper) GetTssAddress(goCtx context.Context, req *types.QueryGetTssAddre if !found { return nil, status.Error(codes.NotFound, "current tss not set") } - ethAddress, err := pkg.GetTssAddrEVM(tss.TssPubkey) + ethAddress, err := crypto.GetTssAddrEVM(tss.TssPubkey) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } - bitcoinParams := pkg.BitcoinRegnetParams + bitcoinParams := chains.BitcoinRegnetParams if req.BitcoinChainId != 0 { - bitcoinParams, err = pkg.BitcoinNetParamsFromChainID(req.BitcoinChainId) + bitcoinParams, err = chains.BitcoinNetParamsFromChainID(req.BitcoinChainId) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } } - btcAddress, err := pkg.GetTssAddrBTC(tss.TssPubkey, bitcoinParams) + btcAddress, err := crypto.GetTssAddrBTC(tss.TssPubkey, bitcoinParams) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } @@ -76,18 +77,18 @@ func (k Keeper) GetTssAddressByFinalizedHeight(goCtx context.Context, req *types if !found { return nil, status.Error(codes.NotFound, "tss not found") } - ethAddress, err := pkg.GetTssAddrEVM(tss.TssPubkey) + ethAddress, err := crypto.GetTssAddrEVM(tss.TssPubkey) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } - bitcoinParams := pkg.BitcoinRegnetParams + bitcoinParams := chains.BitcoinRegnetParams if req.BitcoinChainId != 0 { - bitcoinParams, err = pkg.BitcoinNetParamsFromChainID(req.BitcoinChainId) + bitcoinParams, err = chains.BitcoinNetParamsFromChainID(req.BitcoinChainId) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } } - btcAddress, err := pkg.GetTssAddrBTC(tss.TssPubkey, bitcoinParams) + btcAddress, err := crypto.GetTssAddrBTC(tss.TssPubkey, bitcoinParams) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } diff --git a/x/observer/keeper/msg_server_add_block_header.go b/x/observer/keeper/msg_server_add_block_header.go index 11a80923de..427ab53175 100644 --- a/x/observer/keeper/msg_server_add_block_header.go +++ b/x/observer/keeper/msg_server_add_block_header.go @@ -6,7 +6,8 @@ import ( cosmoserrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/proofs" "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -31,10 +32,10 @@ func (k msgServer) AddBlockHeader(goCtx context.Context, msg *types.MsgAddBlockH if crosschainFlags.BlockHeaderVerificationFlags == nil { return nil, fmt.Errorf("block header verification flags not found") } - if pkg.IsBitcoinChain(msg.ChainId) && !crosschainFlags.BlockHeaderVerificationFlags.IsBtcTypeChainEnabled { + if chains.IsBitcoinChain(msg.ChainId) && !crosschainFlags.BlockHeaderVerificationFlags.IsBtcTypeChainEnabled { return nil, cosmoserrors.Wrapf(types.ErrBlockHeaderVerificationDisabled, "proof verification not enabled for bitcoin ,chain id: %d", msg.ChainId) } - if pkg.IsEVMChain(msg.ChainId) && !crosschainFlags.BlockHeaderVerificationFlags.IsEthTypeChainEnabled { + if chains.IsEVMChain(msg.ChainId) && !crosschainFlags.BlockHeaderVerificationFlags.IsEthTypeChainEnabled { return nil, cosmoserrors.Wrapf(types.ErrBlockHeaderVerificationDisabled, "proof verification not enabled for evm ,chain id: %d", msg.ChainId) } @@ -111,7 +112,7 @@ func (k msgServer) AddBlockHeader(goCtx context.Context, msg *types.MsgAddBlockH } k.Keeper.SetBlockHeaderState(ctx, bhs) - bh := pkg.BlockHeader{ + bh := proofs.BlockHeader{ Header: msg.Header, Height: msg.Height, Hash: msg.BlockHash, diff --git a/x/observer/keeper/msg_server_add_block_header_test.go b/x/observer/keeper/msg_server_add_block_header_test.go index 7d9cf3ce94..f5fc68f55a 100644 --- a/x/observer/keeper/msg_server_add_block_header_test.go +++ b/x/observer/keeper/msg_server_add_block_header_test.go @@ -11,7 +11,8 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/ethereum/go-ethereum/rlp" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/proofs" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/observer/keeper" @@ -45,10 +46,10 @@ func TestMsgServer_AddBlockHeader(t *testing.T) { name: "success submit eth header", msg: &types.MsgAddBlockHeader{ Creator: observerAddress.String(), - ChainId: pkg.GoerliLocalnetChain().ChainId, + ChainId: chains.GoerliLocalnetChain().ChainId, BlockHash: header.Hash().Bytes(), Height: 1, - Header: pkg.NewEthereumHeader(header1RLP), + Header: proofs.NewEthereumHeader(header1RLP), }, IsEthTypeChainEnabled: true, IsBtcTypeChainEnabled: true, @@ -59,10 +60,10 @@ func TestMsgServer_AddBlockHeader(t *testing.T) { name: "failure submit eth header eth disabled", msg: &types.MsgAddBlockHeader{ Creator: observerAddress.String(), - ChainId: pkg.GoerliLocalnetChain().ChainId, + ChainId: chains.GoerliLocalnetChain().ChainId, BlockHash: header.Hash().Bytes(), Height: 1, - Header: pkg.NewEthereumHeader(header1RLP), + Header: proofs.NewEthereumHeader(header1RLP), }, IsEthTypeChainEnabled: false, IsBtcTypeChainEnabled: true, @@ -75,10 +76,10 @@ func TestMsgServer_AddBlockHeader(t *testing.T) { name: "failure submit eth header eth disabled", msg: &types.MsgAddBlockHeader{ Creator: sample.AccAddress(), - ChainId: pkg.GoerliLocalnetChain().ChainId, + ChainId: chains.GoerliLocalnetChain().ChainId, BlockHash: header.Hash().Bytes(), Height: 1, - Header: pkg.NewEthereumHeader(header1RLP), + Header: proofs.NewEthereumHeader(header1RLP), }, IsEthTypeChainEnabled: false, IsBtcTypeChainEnabled: true, @@ -91,10 +92,10 @@ func TestMsgServer_AddBlockHeader(t *testing.T) { name: "should succeed if block header parent does exist", msg: &types.MsgAddBlockHeader{ Creator: observerAddress.String(), - ChainId: pkg.GoerliLocalnetChain().ChainId, + ChainId: chains.GoerliLocalnetChain().ChainId, BlockHash: header2.Hash().Bytes(), Height: 2, - Header: pkg.NewEthereumHeader(header2RLP), + Header: proofs.NewEthereumHeader(header2RLP), }, IsEthTypeChainEnabled: true, IsBtcTypeChainEnabled: true, @@ -109,10 +110,10 @@ func TestMsgServer_AddBlockHeader(t *testing.T) { // name: "should fail if block header parent does not exist", // msg: &types.MsgAddBlockHeader{ // Creator: observerAddress.String(), - // ChainId: pkg.GoerliLocalnetChain().ChainId, + // ChainId: chains.GoerliLocalnetChain().ChainId, // BlockHash: header3.Hash().Bytes(), // Height: 3, - // Header: pkg.NewEthereumHeader(header3RLP), + // Header: chains.NewEthereumHeader(header3RLP), // }, // IsEthTypeChainEnabled: true, // IsBtcTypeChainEnabled: true, @@ -125,10 +126,10 @@ func TestMsgServer_AddBlockHeader(t *testing.T) { // name: "should succeed to post 3rd header if 2nd header is posted", // msg: &types.MsgAddBlockHeader{ // Creator: observerAddress.String(), - // ChainId: pkg.GoerliLocalnetChain().ChainId, + // ChainId: chains.GoerliLocalnetChain().ChainId, // BlockHash: header3.Hash().Bytes(), // Height: 3, - // Header: pkg.NewEthereumHeader(header3RLP), + // Header: chains.NewEthereumHeader(header3RLP), // }, // IsEthTypeChainEnabled: true, // IsBtcTypeChainEnabled: true, @@ -144,7 +145,7 @@ func TestMsgServer_AddBlockHeader(t *testing.T) { ChainId: 9999, BlockHash: header3.Hash().Bytes(), Height: 3, - Header: pkg.NewEthereumHeader(header3RLP), + Header: proofs.NewEthereumHeader(header3RLP), }, IsEthTypeChainEnabled: true, IsBtcTypeChainEnabled: true, @@ -172,7 +173,7 @@ func TestMsgServer_AddBlockHeader(t *testing.T) { }, }) - setSupportedChain(ctx, *k, pkg.GoerliLocalnetChain().ChainId) + setSupportedChain(ctx, *k, chains.GoerliLocalnetChain().ChainId) _, err := srv.AddBlockHeader(ctx, tc.msg) tc.wantErr(t, err) diff --git a/x/observer/keeper/msg_server_add_observer.go b/x/observer/keeper/msg_server_add_observer.go index cf15b3fa2a..7ea31c9ed2 100644 --- a/x/observer/keeper/msg_server_add_observer.go +++ b/x/observer/keeper/msg_server_add_observer.go @@ -4,12 +4,12 @@ import ( "context" "math" + "github.com/zeta-chain/zetacore/pkg/crypto" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" cosmoserrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -22,11 +22,11 @@ func (k msgServer) AddObserver(goCtx context.Context, msg *types.MsgAddObserver) return &types.MsgAddObserverResponse{}, types.ErrNotAuthorizedPolicy } - pubkey, err := pkg.NewPubKey(msg.ZetaclientGranteePubkey) + pubkey, err := crypto.NewPubKey(msg.ZetaclientGranteePubkey) if err != nil { return &types.MsgAddObserverResponse{}, cosmoserrors.Wrap(sdkerrors.ErrInvalidPubKey, err.Error()) } - granteeAddress, err := pkg.GetAddressFromPubkeyString(msg.ZetaclientGranteePubkey) + granteeAddress, err := crypto.GetAddressFromPubkeyString(msg.ZetaclientGranteePubkey) if err != nil { return &types.MsgAddObserverResponse{}, cosmoserrors.Wrap(sdkerrors.ErrInvalidPubKey, err.Error()) } @@ -38,7 +38,7 @@ func (k msgServer) AddObserver(goCtx context.Context, msg *types.MsgAddObserver) // False: adds observer to the observer list, and not the node account list // Inbound is disabled in both cases and needs to be enabled manually using an admin TX if msg.AddNodeAccountOnly { - pubkeySet := pkg.PubKeySet{Secp256k1: pubkey, Ed25519: ""} + pubkeySet := crypto.PubKeySet{Secp256k1: pubkey, Ed25519: ""} k.SetNodeAccount(ctx, types.NodeAccount{ Operator: msg.ObserverAddress, GranteeAddress: granteeAddress.String(), diff --git a/x/observer/keeper/msg_server_remove_chain_params_test.go b/x/observer/keeper/msg_server_remove_chain_params_test.go index f85e4e3af8..6faaa0325a 100644 --- a/x/observer/keeper/msg_server_remove_chain_params_test.go +++ b/x/observer/keeper/msg_server_remove_chain_params_test.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" @@ -23,9 +23,9 @@ func TestMsgServer_RemoveChainParams(t *testing.T) { // mock the authority keeper for authorization authorityMock := keepertest.GetObserverAuthorityMock(t, k) - chain1 := pkg.ExternalChainList()[0].ChainId - chain2 := pkg.ExternalChainList()[1].ChainId - chain3 := pkg.ExternalChainList()[2].ChainId + chain1 := chains.ExternalChainList()[0].ChainId + chain2 := chains.ExternalChainList()[1].ChainId + chain3 := chains.ExternalChainList()[2].ChainId // set admin admin := sample.AccAddress() @@ -97,7 +97,7 @@ func TestMsgServer_RemoveChainParams(t *testing.T) { _, err := srv.RemoveChainParams(sdk.WrapSDKContext(ctx), &types.MsgRemoveChainParams{ Creator: admin, - ChainId: pkg.ExternalChainList()[0].ChainId, + ChainId: chains.ExternalChainList()[0].ChainId, }) require.ErrorIs(t, err, types.ErrNotAuthorizedPolicy) }) @@ -119,16 +119,16 @@ func TestMsgServer_RemoveChainParams(t *testing.T) { _, err := srv.RemoveChainParams(sdk.WrapSDKContext(ctx), &types.MsgRemoveChainParams{ Creator: admin, - ChainId: pkg.ExternalChainList()[0].ChainId, + ChainId: chains.ExternalChainList()[0].ChainId, }) require.ErrorIs(t, err, types.ErrChainParamsNotFound) // add chain params k.SetChainParamsList(ctx, types.ChainParamsList{ ChainParams: []*types.ChainParams{ - sample.ChainParams(pkg.ExternalChainList()[0].ChainId), - sample.ChainParams(pkg.ExternalChainList()[1].ChainId), - sample.ChainParams(pkg.ExternalChainList()[2].ChainId), + sample.ChainParams(chains.ExternalChainList()[0].ChainId), + sample.ChainParams(chains.ExternalChainList()[1].ChainId), + sample.ChainParams(chains.ExternalChainList()[2].ChainId), }, }) @@ -137,7 +137,7 @@ func TestMsgServer_RemoveChainParams(t *testing.T) { // not found if chain ID not in list _, err = srv.RemoveChainParams(sdk.WrapSDKContext(ctx), &types.MsgRemoveChainParams{ Creator: admin, - ChainId: pkg.ExternalChainList()[3].ChainId, + ChainId: chains.ExternalChainList()[3].ChainId, }) require.ErrorIs(t, err, types.ErrChainParamsNotFound) }) diff --git a/x/observer/keeper/msg_server_reset_chain_nonces.go b/x/observer/keeper/msg_server_reset_chain_nonces.go index feb23b58c4..211b4dee8c 100644 --- a/x/observer/keeper/msg_server_reset_chain_nonces.go +++ b/x/observer/keeper/msg_server_reset_chain_nonces.go @@ -4,7 +4,7 @@ import ( "context" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -22,7 +22,7 @@ func (k msgServer) ResetChainNonces(goCtx context.Context, msg *types.MsgResetCh return nil, types.ErrTssNotFound } - chain := pkg.GetChainFromChainID(msg.ChainId) + chain := chains.GetChainFromChainID(msg.ChainId) if chain == nil { return nil, types.ErrSupportedChains } diff --git a/x/observer/keeper/msg_server_reset_chain_nonces_test.go b/x/observer/keeper/msg_server_reset_chain_nonces_test.go index 0b1e60e4c6..58f673c3ba 100644 --- a/x/observer/keeper/msg_server_reset_chain_nonces_test.go +++ b/x/observer/keeper/msg_server_reset_chain_nonces_test.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" @@ -19,7 +19,7 @@ func TestMsgServer_ResetChainNonces(t *testing.T) { UseAuthorityMock: true, }) srv := keeper.NewMsgServerImpl(*k) - chainId := pkg.GoerliLocalnetChain().ChainId + chainId := chains.GoerliLocalnetChain().ChainId admin := sample.AccAddress() authorityMock := keepertest.GetObserverAuthorityMock(t, k) @@ -44,7 +44,7 @@ func TestMsgServer_ResetChainNonces(t *testing.T) { authorityMock := keepertest.GetObserverAuthorityMock(t, k) keepertest.MockIsAuthorized(&authorityMock.Mock, admin, authoritytypes.PolicyType_groupAdmin, true) - chainId := pkg.GoerliLocalnetChain().ChainId + chainId := chains.GoerliLocalnetChain().ChainId _, err := srv.ResetChainNonces(sdk.WrapSDKContext(ctx), &types.MsgResetChainNonces{ Creator: admin, ChainId: chainId, @@ -88,8 +88,8 @@ func TestMsgServer_ResetChainNonces(t *testing.T) { keepertest.MockIsAuthorized(&authorityMock.Mock, admin, authoritytypes.PolicyType_groupAdmin, true) keepertest.MockIsAuthorized(&authorityMock.Mock, admin, authoritytypes.PolicyType_groupAdmin, true) - chainId := pkg.GoerliLocalnetChain().ChainId - index := pkg.GoerliLocalnetChain().ChainName.String() + chainId := chains.GoerliLocalnetChain().ChainId + index := chains.GoerliLocalnetChain().ChainName.String() // check existing chain nonces _, found := k.GetChainNonces(ctx, index) diff --git a/x/observer/keeper/msg_server_update_chain_params_test.go b/x/observer/keeper/msg_server_update_chain_params_test.go index 917f27b8db..274730a4bf 100644 --- a/x/observer/keeper/msg_server_update_chain_params_test.go +++ b/x/observer/keeper/msg_server_update_chain_params_test.go @@ -3,11 +3,11 @@ package keeper_test import ( "testing" + "github.com/zeta-chain/zetacore/pkg/chains" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/observer/keeper" @@ -21,9 +21,9 @@ func TestMsgServer_UpdateChainParams(t *testing.T) { }) srv := keeper.NewMsgServerImpl(*k) - chain1 := pkg.ExternalChainList()[0].ChainId - chain2 := pkg.ExternalChainList()[1].ChainId - chain3 := pkg.ExternalChainList()[2].ChainId + chain1 := chains.ExternalChainList()[0].ChainId + chain2 := chains.ExternalChainList()[1].ChainId + chain3 := chains.ExternalChainList()[2].ChainId // set admin admin := sample.AccAddress() @@ -115,7 +115,7 @@ func TestMsgServer_UpdateChainParams(t *testing.T) { _, err := srv.UpdateChainParams(sdk.WrapSDKContext(ctx), &types.MsgUpdateChainParams{ Creator: admin, - ChainParams: sample.ChainParams(pkg.ExternalChainList()[0].ChainId), + ChainParams: sample.ChainParams(chains.ExternalChainList()[0].ChainId), }) require.ErrorIs(t, err, types.ErrNotAuthorizedPolicy) }) diff --git a/x/observer/keeper/utils.go b/x/observer/keeper/utils.go index 77270fa561..95787cf1a1 100644 --- a/x/observer/keeper/utils.go +++ b/x/observer/keeper/utils.go @@ -4,7 +4,7 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -48,7 +48,7 @@ func (k Keeper) IsAuthorized(ctx sdk.Context, address string) bool { func (k Keeper) FindBallot( ctx sdk.Context, index string, - chain *pkg.Chain, + chain *chains.Chain, observationType types.ObservationType, ) (ballot types.Ballot, isNew bool, err error) { isNew = false diff --git a/x/observer/keeper/utils_test.go b/x/observer/keeper/utils_test.go index 16edfeeda8..8a59bfe310 100644 --- a/x/observer/keeper/utils_test.go +++ b/x/observer/keeper/utils_test.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/observer/keeper" @@ -32,9 +32,9 @@ func setSupportedChain(ctx sdk.Context, observerKeeper keeper.Keeper, chainIDs . func getValidEthChainIDWithIndex(t *testing.T, index int) int64 { switch index { case 0: - return pkg.GoerliLocalnetChain().ChainId + return chains.GoerliLocalnetChain().ChainId case 1: - return pkg.GoerliChain().ChainId + return chains.GoerliChain().ChainId default: require.Fail(t, "invalid index") } diff --git a/x/observer/keeper/vote_inbound.go b/x/observer/keeper/vote_inbound.go index 0903fdc3e5..31b56912e5 100644 --- a/x/observer/keeper/vote_inbound.go +++ b/x/observer/keeper/vote_inbound.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -16,7 +16,7 @@ func (k Keeper) VoteOnInboundBallot( ctx sdk.Context, senderChainID int64, receiverChainID int64, - coinType pkg.CoinType, + coinType coin.CoinType, voter string, ballotIndex string, inTxHash string, @@ -58,7 +58,7 @@ func (k Keeper) VoteOnInboundBallot( if !found { return false, false, types.ErrChainParamsNotFound } - if coreParams.ZetaTokenContractAddress == "" && coinType == pkg.CoinType_Zeta { + if coreParams.ZetaTokenContractAddress == "" && coinType == coin.CoinType_Zeta { return false, false, types.ErrInvalidZetaCoinTypes } } diff --git a/x/observer/keeper/vote_inbound_test.go b/x/observer/keeper/vote_inbound_test.go index 0197892216..41a3999b75 100644 --- a/x/observer/keeper/vote_inbound_test.go +++ b/x/observer/keeper/vote_inbound_test.go @@ -5,7 +5,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/observer/types" @@ -23,8 +24,8 @@ func TestKeeper_VoteOnInboundBallot(t *testing.T) { _, _, err := k.VoteOnInboundBallot( ctx, getValidEthChainIDWithIndex(t, 0), - pkg.ZetaPrivnetChain().ChainId, - pkg.CoinType_ERC20, + chains.ZetaPrivnetChain().ChainId, + coin.CoinType_ERC20, sample.AccAddress(), "index", "inTxHash", @@ -45,8 +46,8 @@ func TestKeeper_VoteOnInboundBallot(t *testing.T) { _, _, err := k.VoteOnInboundBallot( ctx, getValidEthChainIDWithIndex(t, 0), - pkg.ZetaPrivnetChain().ChainId, - pkg.CoinType_ERC20, + chains.ZetaPrivnetChain().ChainId, + coin.CoinType_ERC20, sample.AccAddress(), "index", "inTxHash", @@ -67,8 +68,8 @@ func TestKeeper_VoteOnInboundBallot(t *testing.T) { _, _, err = k.VoteOnInboundBallot( ctx, getValidEthChainIDWithIndex(t, 0), - pkg.ZetaPrivnetChain().ChainId, - pkg.CoinType_ERC20, + chains.ZetaPrivnetChain().ChainId, + coin.CoinType_ERC20, sample.AccAddress(), "index", "inTxHash", @@ -96,8 +97,8 @@ func TestKeeper_VoteOnInboundBallot(t *testing.T) { _, _, err := k.VoteOnInboundBallot( ctx, getValidEthChainIDWithIndex(t, 0), - pkg.ZetaPrivnetChain().ChainId, - pkg.CoinType_ERC20, + chains.ZetaPrivnetChain().ChainId, + coin.CoinType_ERC20, sample.AccAddress(), "index", "inTxHash", @@ -133,8 +134,8 @@ func TestKeeper_VoteOnInboundBallot(t *testing.T) { _, _, err := k.VoteOnInboundBallot( ctx, getValidEthChainIDWithIndex(t, 0), - pkg.ZetaPrivnetChain().ChainId, - pkg.CoinType_ERC20, + chains.ZetaPrivnetChain().ChainId, + coin.CoinType_ERC20, observer, "index", "inTxHash", @@ -150,7 +151,7 @@ func TestKeeper_VoteOnInboundBallot(t *testing.T) { IsSupported: true, }, { - ChainId: pkg.ZetaPrivnetChain().ChainId, + ChainId: chains.ZetaPrivnetChain().ChainId, IsSupported: false, }, }, @@ -161,8 +162,8 @@ func TestKeeper_VoteOnInboundBallot(t *testing.T) { _, _, err = k.VoteOnInboundBallot( ctx, getValidEthChainIDWithIndex(t, 0), - pkg.ZetaPrivnetChain().ChainId, - pkg.CoinType_ERC20, + chains.ZetaPrivnetChain().ChainId, + coin.CoinType_ERC20, observer, "index", "inTxHash", @@ -204,7 +205,7 @@ func TestKeeper_VoteOnInboundBallot(t *testing.T) { ctx, getValidEthChainIDWithIndex(t, 0), getValidEthChainIDWithIndex(t, 1), - pkg.CoinType_Zeta, + coin.CoinType_Zeta, observer, "index", "inTxHash", @@ -245,7 +246,7 @@ func TestKeeper_VoteOnInboundBallot(t *testing.T) { ctx, getValidEthChainIDWithIndex(t, 0), getValidEthChainIDWithIndex(t, 1), - pkg.CoinType_ERC20, + coin.CoinType_ERC20, observer, "index", "inTxHash", @@ -298,7 +299,7 @@ func TestKeeper_VoteOnInboundBallot(t *testing.T) { ctx, getValidEthChainIDWithIndex(t, 0), getValidEthChainIDWithIndex(t, 1), - pkg.CoinType_ERC20, + coin.CoinType_ERC20, observer, "index", "inTxHash", @@ -362,7 +363,7 @@ func TestKeeper_VoteOnInboundBallot(t *testing.T) { ctx, getValidEthChainIDWithIndex(t, 0), getValidEthChainIDWithIndex(t, 1), - pkg.CoinType_ERC20, + coin.CoinType_ERC20, observer, "index", "inTxHash", @@ -424,7 +425,7 @@ func TestKeeper_VoteOnInboundBallot(t *testing.T) { ctx, getValidEthChainIDWithIndex(t, 0), getValidEthChainIDWithIndex(t, 1), - pkg.CoinType_ERC20, + coin.CoinType_ERC20, observer, "index", "inTxHash", diff --git a/x/observer/keeper/vote_outbound.go b/x/observer/keeper/vote_outbound.go index b118298bb7..34f3c73fc0 100644 --- a/x/observer/keeper/vote_outbound.go +++ b/x/observer/keeper/vote_outbound.go @@ -2,7 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" observertypes "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -15,7 +15,7 @@ func (k Keeper) VoteOnOutboundBallot( ctx sdk.Context, ballotIndex string, outTxChainID int64, - receiveStatus pkg.ReceiveStatus, + receiveStatus chains.ReceiveStatus, voter string, ) (isFinalized bool, isNew bool, ballot observertypes.Ballot, observationChainName string, err error) { // Observer Chain already checked then inbound is created diff --git a/x/observer/keeper/vote_outbound_test.go b/x/observer/keeper/vote_outbound_test.go index fb9ba8dc67..fa34a11ca6 100644 --- a/x/observer/keeper/vote_outbound_test.go +++ b/x/observer/keeper/vote_outbound_test.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/observer/types" @@ -21,7 +21,7 @@ func TestKeeper_VoteOnOutboundBallot(t *testing.T) { ctx, "index", getValidEthChainIDWithIndex(t, 0), - pkg.ReceiveStatus_Success, + chains.ReceiveStatus_Success, sample.AccAddress(), ) require.Error(t, err) @@ -41,7 +41,7 @@ func TestKeeper_VoteOnOutboundBallot(t *testing.T) { ctx, "index", getValidEthChainIDWithIndex(t, 0), - pkg.ReceiveStatus_Success, + chains.ReceiveStatus_Success, sample.AccAddress(), ) require.Error(t, err) @@ -64,7 +64,7 @@ func TestKeeper_VoteOnOutboundBallot(t *testing.T) { ctx, "index", getValidEthChainIDWithIndex(t, 0), - pkg.ReceiveStatus(1000), + chains.ReceiveStatus(1000), sample.AccAddress(), ) require.Error(t, err) @@ -88,7 +88,7 @@ func TestKeeper_VoteOnOutboundBallot(t *testing.T) { ctx, "index", getValidEthChainIDWithIndex(t, 0), - pkg.ReceiveStatus_Success, + chains.ReceiveStatus_Success, sample.AccAddress(), ) require.Error(t, err) @@ -120,7 +120,7 @@ func TestKeeper_VoteOnOutboundBallot(t *testing.T) { ctx, "index", getValidEthChainIDWithIndex(t, 0), - pkg.ReceiveStatus_Success, + chains.ReceiveStatus_Success, observer, ) require.NoError(t, err) @@ -166,7 +166,7 @@ func TestKeeper_VoteOnOutboundBallot(t *testing.T) { ctx, "index", getValidEthChainIDWithIndex(t, 0), - pkg.ReceiveStatus_Success, + chains.ReceiveStatus_Success, observer, ) require.NoError(t, err) @@ -224,7 +224,7 @@ func TestKeeper_VoteOnOutboundBallot(t *testing.T) { ctx, "index", getValidEthChainIDWithIndex(t, 0), - pkg.ReceiveStatus_Success, + chains.ReceiveStatus_Success, observer, ) require.NoError(t, err) @@ -280,7 +280,7 @@ func TestKeeper_VoteOnOutboundBallot(t *testing.T) { ctx, "index", getValidEthChainIDWithIndex(t, 0), - pkg.ReceiveStatus_Success, + chains.ReceiveStatus_Success, observer, ) require.NoError(t, err) diff --git a/x/observer/migrations/v5/migrate_test.go b/x/observer/migrations/v5/migrate_test.go index 78479d69cb..40d072230d 100644 --- a/x/observer/migrations/v5/migrate_test.go +++ b/x/observer/migrations/v5/migrate_test.go @@ -6,7 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" v5 "github.com/zeta-chain/zetacore/x/observer/migrations/v5" @@ -68,13 +68,13 @@ func TestMigrateObserverParams(t *testing.T) { params := types.Params{ ObserverParams: []*types.ObserverParams{ { - Chain: &pkg.Chain{ChainId: 2}, + Chain: &chains.Chain{ChainId: 2}, BallotThreshold: dec42, MinObserverDelegation: dec1000, IsSupported: true, }, { - Chain: &pkg.Chain{ChainId: 3}, + Chain: &chains.Chain{ChainId: 3}, BallotThreshold: dec43, MinObserverDelegation: dec1001, IsSupported: true, diff --git a/x/observer/types/chain_nonces.pb.go b/x/observer/types/chain_nonces.pb.go index 6edb1c1d64..18090e8ec5 100644 --- a/x/observer/types/chain_nonces.pb.go +++ b/x/observer/types/chain_nonces.pb.go @@ -11,7 +11,6 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - _ "github.com/zeta-chain/zetacore/pkg/proto" ) // Reference imports to suppress errors if they are not otherwise used. @@ -116,25 +115,24 @@ func init() { func init() { proto.RegisterFile("observer/chain_nonces.proto", fileDescriptor_a4a180ef3ffea001) } var fileDescriptor_a4a180ef3ffea001 = []byte{ - // 275 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x90, 0x3d, 0x4e, 0xc4, 0x30, - 0x10, 0x85, 0x63, 0xb2, 0x3f, 0x60, 0x84, 0x90, 0xa2, 0x2d, 0xcc, 0xae, 0x64, 0x45, 0x54, 0x69, - 0x88, 0x0b, 0x6e, 0x00, 0x0d, 0xdb, 0x50, 0xa4, 0xa4, 0x41, 0xf9, 0x19, 0x1c, 0x6b, 0xc1, 0x8e, - 0x1c, 0x83, 0x96, 0x3d, 0x05, 0x67, 0xe1, 0x14, 0x94, 0x5b, 0x52, 0xa2, 0xe4, 0x22, 0xc8, 0x13, - 0x42, 0xb1, 0xdd, 0x7c, 0x4f, 0xf3, 0x66, 0x9e, 0x1e, 0x5d, 0x99, 0xa2, 0x05, 0xfb, 0x06, 0x56, - 0x94, 0x75, 0xae, 0xf4, 0xa3, 0x36, 0xba, 0x84, 0x36, 0x6d, 0xac, 0x71, 0x26, 0x5a, 0xed, 0xc0, - 0xe5, 0xa8, 0xa7, 0x38, 0x19, 0x0b, 0xe9, 0xb8, 0xbf, 0x5c, 0x48, 0x23, 0x0d, 0xee, 0x09, 0x3f, - 0x0d, 0x96, 0xe5, 0x59, 0xb3, 0x91, 0xa2, 0xd9, 0xc8, 0x01, 0x2f, 0x3f, 0x09, 0x3d, 0xbd, 0xf5, - 0x07, 0xee, 0xf1, 0x6e, 0xc4, 0xe8, 0xbc, 0xb4, 0x90, 0x3b, 0x63, 0x19, 0x89, 0x49, 0x72, 0x92, - 0x8d, 0x18, 0x2d, 0xe8, 0x54, 0xe9, 0x0a, 0xb6, 0xec, 0x08, 0xf5, 0x01, 0xa2, 0x0b, 0x7a, 0x3c, - 0xe4, 0x52, 0x15, 0x0b, 0x63, 0x92, 0x84, 0xd9, 0x1c, 0x79, 0x5d, 0x79, 0x03, 0x86, 0x65, 0x93, - 0x98, 0x24, 0x93, 0x6c, 0x00, 0xff, 0xa0, 0x55, 0x52, 0x83, 0x6d, 0xd9, 0x34, 0x0e, 0xfd, 0x83, - 0x3f, 0x8c, 0x12, 0x7a, 0xfe, 0xa4, 0x74, 0xfe, 0xac, 0x76, 0x50, 0xdd, 0x81, 0x92, 0xb5, 0x63, - 0x33, 0x74, 0x1e, 0xca, 0x37, 0xeb, 0xaf, 0x8e, 0x93, 0x7d, 0xc7, 0xc9, 0x4f, 0xc7, 0xc9, 0x47, - 0xcf, 0x83, 0x7d, 0xcf, 0x83, 0xef, 0x9e, 0x07, 0x0f, 0x42, 0x2a, 0x57, 0xbf, 0x16, 0x69, 0x69, - 0x5e, 0x84, 0x6f, 0xe4, 0x0a, 0xc3, 0x88, 0xb1, 0x1c, 0xb1, 0x15, 0xff, 0x75, 0xba, 0xf7, 0x06, - 0xda, 0x62, 0x86, 0x35, 0x5c, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x30, 0x18, 0x60, 0x85, 0x67, - 0x01, 0x00, 0x00, + // 267 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0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c, 0xa7, 0x27, 0x0f, 0xda, 0x54, 0x8f, + 0x7a, 0x0f, 0xed, 0x0d, 0x68, 0xd5, 0x05, 0xbe, 0x40, 0xe7, 0x5f, 0xf9, 0x6a, 0xf3, 0xd1, 0x0b, + 0x72, 0xe8, 0x05, 0xf9, 0xea, 0x05, 0x79, 0x1b, 0x44, 0x72, 0x18, 0x44, 0xf2, 0x39, 0x88, 0xe4, + 0x4e, 0x2a, 0x1d, 0xba, 0xe7, 0xba, 0x68, 0xec, 0x93, 0x8c, 0x15, 0x5c, 0x60, 0x18, 0x39, 0xb5, + 0x21, 0x77, 0xf2, 0xb7, 0xbf, 0xf0, 0xba, 0x05, 0x5f, 0x2f, 0xb0, 0x86, 0xcb, 0xef, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xfa, 0xab, 0xcc, 0x63, 0x58, 0x01, 0x00, 0x00, } func (m *ChainNonces) Marshal() (dAtA []byte, err error) { diff --git a/x/observer/types/chain_params.go b/x/observer/types/chain_params.go index c2d49cde7b..e32ee9e597 100644 --- a/x/observer/types/chain_params.go +++ b/x/observer/types/chain_params.go @@ -8,8 +8,8 @@ import ( errorsmod "cosmossdk.io/errors" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - ethpkg "github.com/ethereum/go-ethereum/common" - "github.com/zeta-chain/zetacore/pkg" + ethchains "github.com/ethereum/go-ethereum/common" + "github.com/zeta-chain/zetacore/pkg/chains" ) const ( @@ -27,7 +27,7 @@ func (cpl ChainParamsList) Validate() error { chainMap := make(map[int64]struct{}) existingChainMap := make(map[int64]struct{}) - externalChainList := pkg.DefaultChainsList() + externalChainList := chains.DefaultChainsList() for _, chain := range externalChainList { chainMap[chain.ChainId] = struct{}{} } @@ -54,7 +54,7 @@ func ValidateChainParams(params *ChainParams) error { if params == nil { return fmt.Errorf("chain params cannot be nil") } - chain := pkg.GetChainFromChainID(params.ChainId) + chain := chains.GetChainFromChainID(params.ChainId) if chain == nil { return fmt.Errorf("ChainId %d not supported", params.ChainId) } @@ -83,12 +83,12 @@ func ValidateChainParams(params *ChainParams) error { } // chain type specific checks - if pkg.IsBitcoinChain(params.ChainId) { + if chains.IsBitcoinChain(params.ChainId) { if params.WatchUtxoTicker == 0 || params.WatchUtxoTicker > 300 { return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "WatchUtxoTicker %d out of range", params.WatchUtxoTicker) } } - if pkg.IsEVMChain(params.ChainId) { + if chains.IsEVMChain(params.ChainId) { if !validChainContractAddress(params.ZetaTokenContractAddress) { return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "invalid ZetaTokenContractAddress %s", params.ZetaTokenContractAddress) } @@ -115,7 +115,7 @@ func validChainContractAddress(address string) bool { if !strings.HasPrefix(address, "0x") { return false } - return ethpkg.IsHexAddress(address) + return ethchains.IsHexAddress(address) } // GetDefaultChainParams returns a list of default chain params @@ -140,7 +140,7 @@ func GetDefaultChainParams() ChainParamsList { func GetDefaultEthMainnetChainParams() *ChainParams { return &ChainParams{ - ChainId: pkg.EthChain().ChainId, + ChainId: chains.EthChain().ChainId, ConfirmationCount: 14, ZetaTokenContractAddress: zeroAddress, ConnectorContractAddress: zeroAddress, @@ -158,7 +158,7 @@ func GetDefaultEthMainnetChainParams() *ChainParams { } func GetDefaultBscMainnetChainParams() *ChainParams { return &ChainParams{ - ChainId: pkg.BscMainnetChain().ChainId, + ChainId: chains.BscMainnetChain().ChainId, ConfirmationCount: 14, ZetaTokenContractAddress: zeroAddress, ConnectorContractAddress: zeroAddress, @@ -176,7 +176,7 @@ func GetDefaultBscMainnetChainParams() *ChainParams { } func GetDefaultBtcMainnetChainParams() *ChainParams { return &ChainParams{ - ChainId: pkg.BtcMainnetChain().ChainId, + ChainId: chains.BtcMainnetChain().ChainId, ConfirmationCount: 2, ZetaTokenContractAddress: zeroAddress, ConnectorContractAddress: zeroAddress, @@ -194,7 +194,7 @@ func GetDefaultBtcMainnetChainParams() *ChainParams { } func GetDefaultGoerliTestnetChainParams() *ChainParams { return &ChainParams{ - ChainId: pkg.GoerliChain().ChainId, + ChainId: chains.GoerliChain().ChainId, ConfirmationCount: 6, // This is the actual Zeta token Goerli testnet, we need to specify this address for the integration tests to pass ZetaTokenContractAddress: "0x0000c304d2934c00db1d51995b9f6996affd17c0", @@ -213,7 +213,7 @@ func GetDefaultGoerliTestnetChainParams() *ChainParams { } func GetDefaultBscTestnetChainParams() *ChainParams { return &ChainParams{ - ChainId: pkg.BscTestnetChain().ChainId, + ChainId: chains.BscTestnetChain().ChainId, ConfirmationCount: 6, ZetaTokenContractAddress: zeroAddress, ConnectorContractAddress: zeroAddress, @@ -231,7 +231,7 @@ func GetDefaultBscTestnetChainParams() *ChainParams { } func GetDefaultMumbaiTestnetChainParams() *ChainParams { return &ChainParams{ - ChainId: pkg.MumbaiChain().ChainId, + ChainId: chains.MumbaiChain().ChainId, ConfirmationCount: 12, ZetaTokenContractAddress: zeroAddress, ConnectorContractAddress: zeroAddress, @@ -249,7 +249,7 @@ func GetDefaultMumbaiTestnetChainParams() *ChainParams { } func GetDefaultBtcTestnetChainParams() *ChainParams { return &ChainParams{ - ChainId: pkg.BtcTestNetChain().ChainId, + ChainId: chains.BtcTestNetChain().ChainId, ConfirmationCount: 2, ZetaTokenContractAddress: zeroAddress, ConnectorContractAddress: zeroAddress, @@ -267,7 +267,7 @@ func GetDefaultBtcTestnetChainParams() *ChainParams { } func GetDefaultBtcRegtestChainParams() *ChainParams { return &ChainParams{ - ChainId: pkg.BtcRegtestChain().ChainId, + ChainId: chains.BtcRegtestChain().ChainId, ConfirmationCount: 1, ZetaTokenContractAddress: zeroAddress, ConnectorContractAddress: zeroAddress, @@ -285,7 +285,7 @@ func GetDefaultBtcRegtestChainParams() *ChainParams { } func GetDefaultGoerliLocalnetChainParams() *ChainParams { return &ChainParams{ - ChainId: pkg.GoerliLocalnetChain().ChainId, + ChainId: chains.GoerliLocalnetChain().ChainId, ConfirmationCount: 1, ZetaTokenContractAddress: "0x733aB8b06DDDEf27Eaa72294B0d7c9cEF7f12db9", ConnectorContractAddress: "0xD28D6A0b8189305551a0A8bd247a6ECa9CE781Ca", @@ -303,7 +303,7 @@ func GetDefaultGoerliLocalnetChainParams() *ChainParams { } func GetDefaultZetaPrivnetChainParams() *ChainParams { return &ChainParams{ - ChainId: pkg.ZetaPrivnetChain().ChainId, + ChainId: chains.ZetaPrivnetChain().ChainId, ConfirmationCount: 1, ZetaTokenContractAddress: zeroAddress, ConnectorContractAddress: zeroAddress, diff --git a/x/observer/types/message_add_blame_vote.go b/x/observer/types/message_add_blame_vote.go index c82aeb18fa..5a93f0cafe 100644 --- a/x/observer/types/message_add_blame_vote.go +++ b/x/observer/types/message_add_blame_vote.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/ethereum/go-ethereum/crypto" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" ) const TypeMsgAddBlameVote = "add_blame_vote" @@ -33,7 +33,7 @@ func (m *MsgAddBlameVote) ValidateBasic() error { if err != nil { return cosmoserrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) } - if pkg.GetChainFromChainID(m.ChainId) == nil { + if chains.GetChainFromChainID(m.ChainId) == nil { return cosmoserrors.Wrapf(sdkerrors.ErrInvalidChainID, "chain id (%d)", m.ChainId) } return nil diff --git a/x/observer/types/message_add_block_header.go b/x/observer/types/message_add_block_header.go index 3570777a63..58be17f079 100644 --- a/x/observer/types/message_add_block_header.go +++ b/x/observer/types/message_add_block_header.go @@ -6,7 +6,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/ethereum/go-ethereum/crypto" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/proofs" ) var _ sdk.Msg = &MsgAddBlockHeader{} @@ -15,7 +16,7 @@ const ( TypeMsgAddBlockHeader = "add_block_header" ) -func NewMsgAddBlockHeader(creator string, chainID int64, blockHash []byte, height int64, header pkg.HeaderData) *MsgAddBlockHeader { +func NewMsgAddBlockHeader(creator string, chainID int64, blockHash []byte, height int64, header proofs.HeaderData) *MsgAddBlockHeader { return &MsgAddBlockHeader{ Creator: creator, ChainId: chainID, @@ -52,7 +53,7 @@ func (msg *MsgAddBlockHeader) ValidateBasic() error { return cosmoserrors.Wrapf(sdkerrors.ErrInvalidAddress, err.Error()) } - if pkg.IsHeaderSupportedEvmChain(msg.ChainId) || pkg.IsBitcoinChain(msg.ChainId) { + if chains.IsHeaderSupportedEvmChain(msg.ChainId) || chains.IsBitcoinChain(msg.ChainId) { if len(msg.BlockHash) != 32 { return cosmoserrors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid block hash length (%d)", len(msg.BlockHash)) } diff --git a/x/observer/types/message_add_block_header_test.go b/x/observer/types/message_add_block_header_test.go index 86fb2d3058..9f53590dde 100644 --- a/x/observer/types/message_add_block_header_test.go +++ b/x/observer/types/message_add_block_header_test.go @@ -9,7 +9,7 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/proofs" "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/observer/types" @@ -29,7 +29,7 @@ func TestMsgAddBlockHeader_ValidateBasic(t *testing.T) { var buffer bytes.Buffer err = header.EncodeRLP(&buffer) require.NoError(t, err) - headerData := pkg.NewEthereumHeader(buffer.Bytes()) + headerData := proofs.NewEthereumHeader(buffer.Bytes()) tests := []struct { name string msg *types.MsgAddBlockHeader @@ -42,7 +42,7 @@ func TestMsgAddBlockHeader_ValidateBasic(t *testing.T) { 1, []byte{}, 6, - pkg.HeaderData{}, + proofs.HeaderData{}, ), error: true, }, @@ -53,7 +53,7 @@ func TestMsgAddBlockHeader_ValidateBasic(t *testing.T) { -1, []byte{}, 6, - pkg.HeaderData{}, + proofs.HeaderData{}, ), error: true, }, @@ -64,7 +64,7 @@ func TestMsgAddBlockHeader_ValidateBasic(t *testing.T) { 5, sample.Hash().Bytes(), 6, - pkg.HeaderData{}, + proofs.HeaderData{}, ), error: true, }, @@ -75,7 +75,7 @@ func TestMsgAddBlockHeader_ValidateBasic(t *testing.T) { 5, sample.Hash().Bytes()[:31], 6, - pkg.HeaderData{}, + proofs.HeaderData{}, ), error: true, }, diff --git a/x/observer/types/message_add_observer.go b/x/observer/types/message_add_observer.go index 80b75ba86b..087636b10a 100644 --- a/x/observer/types/message_add_observer.go +++ b/x/observer/types/message_add_observer.go @@ -4,7 +4,7 @@ import ( cosmoserrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/crypto" ) const TypeMsgAddObserver = "add_observer" @@ -50,11 +50,11 @@ func (msg *MsgAddObserver) ValidateBasic() error { if err != nil { return cosmoserrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid observer address (%s)", err) } - _, err = pkg.NewPubKey(msg.ZetaclientGranteePubkey) + _, err = crypto.NewPubKey(msg.ZetaclientGranteePubkey) if err != nil { return cosmoserrors.Wrapf(sdkerrors.ErrInvalidPubKey, "invalid zetaclient grantee pubkey (%s)", err) } - _, err = pkg.GetAddressFromPubkeyString(msg.ZetaclientGranteePubkey) + _, err = crypto.GetAddressFromPubkeyString(msg.ZetaclientGranteePubkey) if err != nil { return cosmoserrors.Wrapf(sdkerrors.ErrInvalidPubKey, "invalid zetaclient grantee pubkey (%s)", err) } diff --git a/x/observer/types/message_remove_chain_params.go b/x/observer/types/message_remove_chain_params.go index 02fdb1803c..5b333c4bc1 100644 --- a/x/observer/types/message_remove_chain_params.go +++ b/x/observer/types/message_remove_chain_params.go @@ -2,7 +2,7 @@ package types import ( cosmoserrors "cosmossdk.io/errors" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -47,7 +47,7 @@ func (msg *MsgRemoveChainParams) ValidateBasic() error { } // Check if chain exists - chain := pkg.GetChainFromChainID(msg.ChainId) + chain := chains.GetChainFromChainID(msg.ChainId) if chain == nil { return cosmoserrors.Wrapf(sdkerrors.ErrInvalidChainID, "invalid chain id (%d)", msg.ChainId) } diff --git a/x/observer/types/message_remove_chain_params_test.go b/x/observer/types/message_remove_chain_params_test.go index 48b862f214..bd46dfe692 100644 --- a/x/observer/types/message_remove_chain_params_test.go +++ b/x/observer/types/message_remove_chain_params_test.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -21,14 +21,14 @@ func TestMsgRemoveChainParams_ValidateBasic(t *testing.T) { name: "valid message", msg: types.NewMsgRemoveChainParams( sample.AccAddress(), - pkg.ExternalChainList()[0].ChainId, + chains.ExternalChainList()[0].ChainId, ), }, { name: "invalid address", msg: types.NewMsgRemoveChainParams( "invalid_address", - pkg.ExternalChainList()[0].ChainId, + chains.ExternalChainList()[0].ChainId, ), err: sdkerrors.ErrInvalidAddress, }, diff --git a/x/observer/types/message_reset_chain_nonces.go b/x/observer/types/message_reset_chain_nonces.go index b14cb75df1..c7bb615040 100644 --- a/x/observer/types/message_reset_chain_nonces.go +++ b/x/observer/types/message_reset_chain_nonces.go @@ -4,7 +4,7 @@ import ( "errors" cosmoserrors "cosmossdk.io/errors" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -51,7 +51,7 @@ func (msg *MsgResetChainNonces) ValidateBasic() error { } // Check if chain exists - chain := pkg.GetChainFromChainID(msg.ChainId) + chain := chains.GetChainFromChainID(msg.ChainId) if chain == nil { return cosmoserrors.Wrapf(sdkerrors.ErrInvalidChainID, "invalid chain id (%d)", msg.ChainId) } diff --git a/x/observer/types/message_reset_chain_nonces_test.go b/x/observer/types/message_reset_chain_nonces_test.go index 3b8f1788f4..4f37b359bb 100644 --- a/x/observer/types/message_reset_chain_nonces_test.go +++ b/x/observer/types/message_reset_chain_nonces_test.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -20,7 +20,7 @@ func TestMsgResetChainNonces_ValidateBasic(t *testing.T) { name: "valid message chain nonce high greater than nonce low", msg: types.MsgResetChainNonces{ Creator: sample.AccAddress(), - ChainId: pkg.ExternalChainList()[0].ChainId, + ChainId: chains.ExternalChainList()[0].ChainId, ChainNonceLow: 1, ChainNonceHigh: 5, }, @@ -30,7 +30,7 @@ func TestMsgResetChainNonces_ValidateBasic(t *testing.T) { name: "valid message chain nonce high same as nonce low", msg: types.MsgResetChainNonces{ Creator: sample.AccAddress(), - ChainId: pkg.ExternalChainList()[0].ChainId, + ChainId: chains.ExternalChainList()[0].ChainId, ChainNonceLow: 1, ChainNonceHigh: 1, }, @@ -40,7 +40,7 @@ func TestMsgResetChainNonces_ValidateBasic(t *testing.T) { name: "invalid address", msg: types.MsgResetChainNonces{ Creator: "invalid_address", - ChainId: pkg.ExternalChainList()[0].ChainId, + ChainId: chains.ExternalChainList()[0].ChainId, }, wantErr: true, }, @@ -56,7 +56,7 @@ func TestMsgResetChainNonces_ValidateBasic(t *testing.T) { name: "invalid chain nonce low", msg: types.MsgResetChainNonces{ Creator: sample.AccAddress(), - ChainId: pkg.ExternalChainList()[0].ChainId, + ChainId: chains.ExternalChainList()[0].ChainId, ChainNonceLow: -1, }, wantErr: true, @@ -65,7 +65,7 @@ func TestMsgResetChainNonces_ValidateBasic(t *testing.T) { name: "invalid chain nonce high", msg: types.MsgResetChainNonces{ Creator: sample.AccAddress(), - ChainId: pkg.ExternalChainList()[0].ChainId, + ChainId: chains.ExternalChainList()[0].ChainId, ChainNonceLow: 1, ChainNonceHigh: -1, }, @@ -75,7 +75,7 @@ func TestMsgResetChainNonces_ValidateBasic(t *testing.T) { name: "invalid chain nonce low greater than chain nonce high", msg: types.MsgResetChainNonces{ Creator: sample.AccAddress(), - ChainId: pkg.ExternalChainList()[0].ChainId, + ChainId: chains.ExternalChainList()[0].ChainId, ChainNonceLow: 1, ChainNonceHigh: 0, }, diff --git a/x/observer/types/message_update_chain_params_test.go b/x/observer/types/message_update_chain_params_test.go index 2e714f0b07..1e909ea783 100644 --- a/x/observer/types/message_update_chain_params_test.go +++ b/x/observer/types/message_update_chain_params_test.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -21,14 +21,14 @@ func TestMsgUpdateChainParams_ValidateBasic(t *testing.T) { name: "valid message", msg: types.NewMsgUpdateChainParams( sample.AccAddress(), - sample.ChainParams(pkg.ExternalChainList()[0].ChainId), + sample.ChainParams(chains.ExternalChainList()[0].ChainId), ), }, { name: "invalid address", msg: types.NewMsgUpdateChainParams( "invalid_address", - sample.ChainParams(pkg.ExternalChainList()[0].ChainId), + sample.ChainParams(chains.ExternalChainList()[0].ChainId), ), err: sdkerrors.ErrInvalidAddress, }, diff --git a/x/observer/types/node_account.pb.go b/x/observer/types/node_account.pb.go index d231c89ffc..a127e290e6 100644 --- a/x/observer/types/node_account.pb.go +++ b/x/observer/types/node_account.pb.go @@ -11,7 +11,7 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - proto1 "github.com/zeta-chain/zetacore/pkg/proto" + crypto "github.com/zeta-chain/zetacore/pkg/crypto" ) // Reference imports to suppress errors if they are not otherwise used. @@ -65,7 +65,7 @@ func (NodeStatus) EnumDescriptor() ([]byte, []int) { type NodeAccount struct { Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` GranteeAddress string `protobuf:"bytes,2,opt,name=granteeAddress,proto3" json:"granteeAddress,omitempty"` - GranteePubkey *proto1.PubKeySet `protobuf:"bytes,3,opt,name=granteePubkey,proto3" json:"granteePubkey,omitempty"` + GranteePubkey *crypto.PubKeySet `protobuf:"bytes,3,opt,name=granteePubkey,proto3" json:"granteePubkey,omitempty"` NodeStatus NodeStatus `protobuf:"varint,4,opt,name=nodeStatus,proto3,enum=zetachain.zetacore.observer.NodeStatus" json:"nodeStatus,omitempty"` } @@ -116,7 +116,7 @@ func (m *NodeAccount) GetGranteeAddress() string { return "" } -func (m *NodeAccount) GetGranteePubkey() *proto1.PubKeySet { +func (m *NodeAccount) GetGranteePubkey() *crypto.PubKeySet { if m != nil { return m.GranteePubkey } @@ -138,30 +138,31 @@ func init() { func init() { proto.RegisterFile("observer/node_account.proto", fileDescriptor_6f54e38f9d1a9953) } var fileDescriptor_6f54e38f9d1a9953 = []byte{ - // 363 bytes of a gzipped FileDescriptorProto + // 370 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xcb, 0x6a, 0xdb, 0x40, - 0x14, 0x86, 0x35, 0xbe, 0xd5, 0x1e, 0xd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, 0xba, 0xc3, 0xaf, 0xc1, 0x2b, 0xd7, 0x06, 0xe3, 0x03, 0x1e, 0x3e, 0x19, 0xfd, 0xc6, 0x31, + 0x7e, 0x54, 0x88, 0x8d, 0xdf, 0xfc, 0x97, 0x73, 0xa9, 0xce, 0xa4, 0x63, 0x91, 0xf7, 0xd8, 0x3e, + 0x9a, 0x25, 0x06, 0x16, 0x49, 0x66, 0x40, 0x38, 0xa8, 0x54, 0xa7, 0x86, 0x49, 0xc1, 0x0b, 0xa7, + 0x46, 0x3a, 0xb8, 0x19, 0x02, 0x13, 0x85, 0x53, 0x27, 0x18, 0xb7, 0x46, 0x91, 0x49, 0x96, 0xe0, + 0x34, 0xc8, 0x5b, 0xdc, 0xfe, 0x9d, 0x64, 0x8c, 0x2f, 0x40, 0x38, 0x4d, 0xaf, 0x71, 0x7d, 0xe5, + 0xa3, 0x5f, 0x7f, 0x6f, 0xd6, 0x3e, 0x5a, 0xad, 0x7d, 0x74, 0xbf, 0xf6, 0xd1, 0xe5, 0xc6, 0xb7, + 0x56, 0x1b, 0xdf, 0xba, 0xdb, 0xf8, 0xd6, 0x31, 0x8d, 0x13, 0x33, 0xcb, 0x79, 0x10, 0xa9, 0x53, + 0x5a, 0x5a, 0xfe, 0x5e, 0xb9, 0xa7, 0x7b, 0xf7, 0xf4, 0x9c, 0x1e, 0xd2, 0x35, 0x45, 0x0a, 0x19, + 0x6f, 0x55, 0x59, 0xfc, 0x78, 0x08, 0x00, 0x00, 0xff, 0xff, 0x94, 0xd1, 0x0e, 0xdf, 0xf6, 0x01, + 0x00, 0x00, } func (m *NodeAccount) Marshal() (dAtA []byte, err error) { @@ -382,7 +383,7 @@ func (m *NodeAccount) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.GranteePubkey == nil { - m.GranteePubkey = &proto1.PubKeySet{} + m.GranteePubkey = &crypto.PubKeySet{} } if err := m.GranteePubkey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/x/observer/types/nonce_to_cctx.pb.go b/x/observer/types/nonce_to_cctx.pb.go index 8eb228d133..0e7e05e98c 100644 --- a/x/observer/types/nonce_to_cctx.pb.go +++ b/x/observer/types/nonce_to_cctx.pb.go @@ -11,7 +11,6 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - _ "github.com/zeta-chain/zetacore/pkg/proto" ) // Reference imports to suppress errors if they are not otherwise used. @@ -101,23 +100,22 @@ func init() { func init() { proto.RegisterFile("observer/nonce_to_cctx.proto", fileDescriptor_6f9bbe8a689fa6e4) } var fileDescriptor_6f9bbe8a689fa6e4 = []byte{ - // 241 bytes of a gzipped FileDescriptorProto + // 230 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xc9, 0x4f, 0x2a, 0x4e, 0x2d, 0x2a, 0x4b, 0x2d, 0xd2, 0xcf, 0xcb, 0xcf, 0x4b, 0x4e, 0x8d, 0x2f, 0xc9, 0x8f, 0x4f, 0x4e, 0x2e, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0xae, 0x4a, 0x2d, 0x49, 0x4c, 0xce, 0x48, 0xcc, 0xcc, 0xd3, 0x03, 0xb3, 0xf2, 0x8b, 0x52, 0xf5, 0x60, 0x1a, 0xa4, 0x44, 0xd2, 0xf3, - 0xd3, 0xf3, 0xc1, 0xea, 0xf4, 0x41, 0x2c, 0x88, 0x16, 0x29, 0xde, 0x82, 0xec, 0x74, 0xfd, 0x82, - 0xec, 0x74, 0x08, 0x57, 0x29, 0x8f, 0x8b, 0xdb, 0x0f, 0x64, 0x70, 0x48, 0xbe, 0x73, 0x72, 0x49, - 0x85, 0x90, 0x24, 0x17, 0x07, 0xd8, 0xb8, 0xf8, 0xcc, 0x14, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xe6, - 0x20, 0x76, 0x30, 0xdf, 0x33, 0x45, 0x48, 0x84, 0x8b, 0x15, 0xec, 0x04, 0x09, 0x26, 0xb0, 0x38, - 0x84, 0x23, 0x24, 0xc3, 0xc5, 0x09, 0x72, 0x8f, 0x67, 0x5e, 0x4a, 0x6a, 0x85, 0x04, 0xb3, 0x02, - 0xa3, 0x06, 0x67, 0x10, 0x42, 0x40, 0x48, 0x80, 0x8b, 0xb9, 0xa4, 0xb8, 0x58, 0x82, 0x05, 0x2c, - 0x0e, 0x62, 0x3a, 0x79, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, - 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x7e, - 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0xc8, 0x33, 0xba, 0x60, 0x8b, - 0xf5, 0x61, 0xfe, 0xd2, 0xaf, 0xd0, 0x87, 0x07, 0x45, 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, - 0xd8, 0x07, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xef, 0xd8, 0x84, 0x2f, 0x23, 0x01, 0x00, - 0x00, + 0xd3, 0xf3, 0xc1, 0xea, 0xf4, 0x41, 0x2c, 0x88, 0x16, 0xa5, 0x3c, 0x2e, 0x6e, 0x3f, 0x90, 0x49, + 0x21, 0xf9, 0xce, 0xc9, 0x25, 0x15, 0x42, 0x92, 0x5c, 0x1c, 0x60, 0xfd, 0xf1, 0x99, 0x29, 0x12, + 0x8c, 0x0a, 0x8c, 0x1a, 0xcc, 0x41, 0xec, 0x60, 0xbe, 0x67, 0x8a, 0x90, 0x08, 0x17, 0x2b, 0xd8, + 0x4e, 0x09, 0x26, 0xb0, 0x38, 0x84, 0x23, 0x24, 0xc3, 0xc5, 0x09, 0x72, 0x80, 0x67, 0x5e, 0x4a, + 0x6a, 0x85, 0x04, 0xb3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0x42, 0x40, 0x48, 0x80, 0x8b, 0xb9, 0xa4, + 0xb8, 0x58, 0x82, 0x05, 0x2c, 0x0e, 0x62, 0x3a, 0x79, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, + 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, + 0xb1, 0x1c, 0x43, 0x94, 0x7e, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, + 0xc8, 0xf5, 0xba, 0x60, 0x8b, 0xf5, 0x61, 0x1e, 0xd1, 0xaf, 0xd0, 0x87, 0xfb, 0xbd, 0xa4, 0xb2, + 0x20, 0xb5, 0x38, 0x89, 0x0d, 0xec, 0x03, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x54, 0xf7, + 0xb7, 0x20, 0x14, 0x01, 0x00, 0x00, } func (m *NonceToCctx) Marshal() (dAtA []byte, err error) { diff --git a/x/observer/types/observer.pb.go b/x/observer/types/observer.pb.go index 639caac692..ede9e119a5 100644 --- a/x/observer/types/observer.pb.go +++ b/x/observer/types/observer.pb.go @@ -11,7 +11,7 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - proto1 "github.com/zeta-chain/zetacore/pkg/proto" + chains "github.com/zeta-chain/zetacore/pkg/chains" ) // Reference imports to suppress errors if they are not otherwise used. @@ -89,7 +89,7 @@ func (ObserverUpdateReason) EnumDescriptor() ([]byte, []int) { type ObserverMapper struct { Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` - ObserverChain *proto1.Chain `protobuf:"bytes,2,opt,name=observer_chain,json=observerChain,proto3" json:"observer_chain,omitempty"` + ObserverChain *chains.Chain `protobuf:"bytes,2,opt,name=observer_chain,json=observerChain,proto3" json:"observer_chain,omitempty"` ObserverList []string `protobuf:"bytes,4,rep,name=observer_list,json=observerList,proto3" json:"observer_list,omitempty"` } @@ -133,7 +133,7 @@ func (m *ObserverMapper) GetIndex() string { return "" } -func (m *ObserverMapper) GetObserverChain() *proto1.Chain { +func (m *ObserverMapper) GetObserverChain() *chains.Chain { if m != nil { return m.ObserverChain } @@ -254,34 +254,34 @@ func init() { func init() { proto.RegisterFile("observer/observer.proto", fileDescriptor_3004233a4a5969ce) } var fileDescriptor_3004233a4a5969ce = []byte{ - // 426 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xc1, 0x8a, 0x13, 0x41, - 0x10, 0x86, 0xa7, 0x93, 0x28, 0xa4, 0x62, 0xb2, 0xb3, 0x4d, 0xc4, 0x10, 0x61, 0x08, 0xeb, 0x25, - 0x2c, 0x3a, 0x83, 0xeb, 0x13, 0xb8, 0x41, 0x74, 0x31, 0xb2, 0x30, 0xc9, 0x22, 0x78, 0x09, 0x93, - 0x4c, 0x39, 0x69, 0x36, 0xe9, 0x6e, 0x66, 0x2a, 0x92, 0x78, 0xf0, 0x19, 0x7c, 0x08, 0x0f, 0x3e, - 0x8a, 0xc7, 0x3d, 0x7a, 0x94, 0xe4, 0x45, 0xa4, 0xbb, 0xed, 0x5c, 0xdc, 0x5b, 0xfd, 0x7f, 0xf5, - 0xf7, 0x57, 0x41, 0x17, 0x3c, 0x51, 0xf3, 0x0a, 0xcb, 0x2f, 0x58, 0x26, 0xbe, 0x88, 0x75, 0xa9, - 0x48, 0xf1, 0xa7, 0x5f, 0x91, 0xb2, 0xc5, 0x32, 0x13, 0x32, 0xb6, 0x95, 0x2a, 0x31, 0xf6, 0x4f, - 0xfa, 0xdd, 0x42, 0x15, 0xca, 0xbe, 0x4b, 0x4c, 0xe5, 0x90, 0x7e, 0x5b, 0xdf, 0x16, 0x89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, 0x28, 0x64, 0xd8, 0xe8, 0x37, 0x7e, 0xfe, 0x88, 0xd8, 0xf9, 0x18, 0xba, - 0x3e, 0xf5, 0x46, 0xe7, 0x19, 0x61, 0x8a, 0x59, 0xa5, 0xa4, 0x81, 0x6f, 0x64, 0x8e, 0x9f, 0x85, - 0xc4, 0x3c, 0x0c, 0x2c, 0xac, 0xd6, 0xf3, 0x8a, 0x94, 0xd1, 0x8c, 0x9f, 0x40, 0xeb, 0x75, 0xbe, - 0x16, 0xd2, 0x31, 0x61, 0xcd, 0xa5, 0x5d, 0x5e, 0xfd, 0xda, 0x47, 0xec, 0x6e, 0x1f, 0xb1, 0x3f, - 0xfb, 0x88, 0x7d, 0x3f, 0x44, 0xc1, 0xdd, 0x21, 0x0a, 0x7e, 0x1f, 0xa2, 0xe0, 0x53, 0x52, 0x08, - 0x5a, 0x6e, 0xe6, 0xf1, 0x42, 0xad, 0x13, 0x73, 0x25, 0x2f, 0xec, 0xff, 0x25, 0xfe, 0x60, 0x92, - 0xed, 0xf1, 0xaa, 0x12, 0xda, 0x69, 0xac, 0xe6, 0x0f, 0xed, 0x69, 0xbc, 0xfa, 0x1b, 0x00, 0x00, - 0xff, 0xff, 0x9b, 0x82, 0x5d, 0x57, 0x77, 0x02, 0x00, 0x00, + // 429 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0xc1, 0x8a, 0x13, 0x41, + 0x10, 0x9d, 0x4e, 0xa2, 0x90, 0x8e, 0xc9, 0xce, 0x36, 0x91, 0x0d, 0x11, 0x86, 0xb0, 0x5e, 0xc2, + 0xa2, 0x33, 0xb0, 0xfa, 0x03, 0x6e, 0x10, 0x5d, 0x8c, 0x2c, 0x4c, 0xb2, 0x08, 0x5e, 0x42, 0x27, + 0x53, 0x4e, 0x1a, 0x93, 0xee, 0x66, 0xba, 0x22, 0x89, 0x37, 0xff, 0xc0, 0x8f, 0xf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, 0x85, 0x02, 0x00, 0x00, } func (m *ObserverMapper) Marshal() (dAtA []byte, err error) { @@ -561,7 +561,7 @@ func (m *ObserverMapper) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.ObserverChain == nil { - m.ObserverChain = &proto1.Chain{} + m.ObserverChain = &chains.Chain{} } if err := m.ObserverChain.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/x/observer/types/observer_set.go b/x/observer/types/observer_set.go index 252f3cce8e..483f28592c 100644 --- a/x/observer/types/observer_set.go +++ b/x/observer/types/observer_set.go @@ -2,7 +2,7 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" ) func (m *ObserverSet) Len() int { @@ -24,11 +24,11 @@ func (m *ObserverSet) Validate() error { return nil } -func CheckReceiveStatus(status pkg.ReceiveStatus) error { +func CheckReceiveStatus(status chains.ReceiveStatus) error { switch status { - case pkg.ReceiveStatus_Success: + case chains.ReceiveStatus_Success: return nil - case pkg.ReceiveStatus_Failed: + case chains.ReceiveStatus_Failed: return nil default: return ErrInvalidStatus diff --git a/x/observer/types/params.go b/x/observer/types/params.go index 6f8b262c25..7fc72c1e89 100644 --- a/x/observer/types/params.go +++ b/x/observer/types/params.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" "gopkg.in/yaml.v2" ) @@ -28,7 +28,7 @@ func NewParams(observerParams []*ObserverParams, adminParams []*Admin_Policy, ba // privnet chains are supported by default for testing purposes // custom params must be provided in genesis for other networks func DefaultParams() Params { - chains := pkg.PrivnetChainList() + chains := chains.PrivnetChainList() observerParams := make([]*ObserverParams, len(chains)) for i, chain := range chains { observerParams[i] = &ObserverParams{ diff --git a/x/observer/types/params.pb.go b/x/observer/types/params.pb.go index 28cd9b2623..8e223d5571 100644 --- a/x/observer/types/params.pb.go +++ b/x/observer/types/params.pb.go @@ -12,7 +12,7 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - proto1 "github.com/zeta-chain/zetacore/pkg/proto" + chains "github.com/zeta-chain/zetacore/pkg/chains" ) // Reference imports to suppress errors if they are not otherwise used. @@ -232,7 +232,7 @@ func (m *ChainParams) GetIsSupported() bool { // Deprecated(v13): Use ChainParamsList type ObserverParams struct { - Chain *proto1.Chain `protobuf:"bytes,1,opt,name=chain,proto3" json:"chain,omitempty"` + Chain *chains.Chain `protobuf:"bytes,1,opt,name=chain,proto3" json:"chain,omitempty"` BallotThreshold github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=ballot_threshold,json=ballotThreshold,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"ballot_threshold"` MinObserverDelegation github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=min_observer_delegation,json=minObserverDelegation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"min_observer_delegation"` IsSupported bool `protobuf:"varint,5,opt,name=is_supported,json=isSupported,proto3" json:"is_supported,omitempty"` @@ -271,7 +271,7 @@ func (m *ObserverParams) XXX_DiscardUnknown() { var xxx_messageInfo_ObserverParams proto.InternalMessageInfo -func (m *ObserverParams) GetChain() *proto1.Chain { +func (m *ObserverParams) GetChain() *chains.Chain { if m != nil { return m.Chain } @@ -412,58 +412,58 @@ func init() { func init() { proto.RegisterFile("observer/params.proto", fileDescriptor_4542fa62877488a1) } var fileDescriptor_4542fa62877488a1 = []byte{ - // 804 bytes of a gzipped FileDescriptorProto + // 805 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x95, 0x41, 0x6f, 0xe3,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 0xd4, 0xe4, 0x13, 0x78, 0xab, 0xe8, + 0x84, 0x05, 0x56, 0xa9, 0x60, 0x6a, 0x85, 0xa6, 0x11, 0x27, 0x73, 0xa9, 0xfb, 0xa1, 0xe6, 0x3f, + 0xcd, 0xbd, 0x5f, 0x16, 0xce, 0x63, 0xed, 0xfb, 0xb4, 0xfe, 0xd3, 0x2f, 0x07, 0x95, 0x17, 0x2f, + 0xc1, 0xdc, 0xa8, 0x8f, 0x05, 0xd0, 0x08, 0x05, 0x4f, 0x93, 0x8f, 0x3a, 0x95, 0xb5, 0x3d, 0xec, + 0x18, 0xdd, 0xfa, 0xef, 0xbf, 0x39, 0xc6, 0xf1, 0xf8, 0xfc, 0xca, 0x31, 0x2e, 0xae, 0x1c, 0xe3, + 0xaf, 0x2b, 0xc7, 0xf8, 0xf1, 0xda, 0xa9, 0x5c, 0x5c, 0x3b, 0x95, 0x3f, 0xae, 0x9d, 0xca, 0xb7, + 0xde, 0x46, 0x23, 0x64, 0xa9, 0x1f, 0xea, 0x53, 0x78, 0xe5, 0x29, 0xbc, 0xe5, 0xfa, 0xa7, 0x94, + 0x77, 0xc5, 0xb4, 0xa1, 0x7f, 0x41, 0x1f, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0x70, 0xbf, 0xfa, + 0xb7, 0x00, 0x07, 0x00, 0x00, } func (m *ChainParamsList) Marshal() (dAtA []byte, err error) { @@ -1448,7 +1448,7 @@ func (m *ObserverParams) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Chain == nil { - m.Chain = &proto1.Chain{} + m.Chain = &chains.Chain{} } if err := m.Chain.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/x/observer/types/parsers.go b/x/observer/types/parsers.go index 9cfad1c182..ad7537e18e 100644 --- a/x/observer/types/parsers.go +++ b/x/observer/types/parsers.go @@ -2,14 +2,14 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" ) -func ConvertReceiveStatusToVoteType(status pkg.ReceiveStatus) VoteType { +func ConvertReceiveStatusToVoteType(status chains.ReceiveStatus) VoteType { switch status { - case pkg.ReceiveStatus_Success: + case chains.ReceiveStatus_Success: return VoteType_SuccessObservation - case pkg.ReceiveStatus_Failed: + case chains.ReceiveStatus_Failed: return VoteType_FailureObservation default: return VoteType_NotYetVoted diff --git a/x/observer/types/pending_nonces.pb.go b/x/observer/types/pending_nonces.pb.go index c36c912c1b..2769d17d76 100644 --- a/x/observer/types/pending_nonces.pb.go +++ b/x/observer/types/pending_nonces.pb.go @@ -11,7 +11,6 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - _ "github.com/zeta-chain/zetacore/pkg/proto" ) // Reference imports to suppress errors if they are not otherwise used. @@ -101,23 +100,22 @@ func init() { func init() { proto.RegisterFile("observer/pending_nonces.proto", fileDescriptor_dd001e4838750ecf) } var fileDescriptor_dd001e4838750ecf = []byte{ - // 249 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x3c, 0x50, 0xbf, 0x4a, 0x03, 0x31, - 0x1c, 0xbe, 0x78, 0xa2, 0x6d, 0xa0, 0x20, 0xc1, 0xe1, 0x6c, 0x69, 0x28, 0x4e, 0x5d, 0xbc, 0x0c, - 0xbe, 0x81, 0x93, 0x05, 0x11, 0xe9, 0xe8, 0x72, 0xf4, 0xee, 0x42, 0x12, 0xaa, 0xf9, 0x85, 0x24, - 0xda, 0xea, 0x53, 0xf8, 0x58, 0x8e, 0x1d, 0x1d, 0xe5, 0xee, 0x45, 0xe4, 0x7e, 0xa1, 0x6e, 0xdf, - 0x97, 0xef, 0x4f, 0xf2, 0x85, 0xce, 0xa1, 0x0e, 0xd2, 0xbf, 0x4b, 0x2f, 0x9c, 0xb4, 0xad, 0xb1, - 0xaa, 0xb2, 0x60, 0x1b, 0x19, 0x4a, 0xe7, 0x21, 0x02, 0x9b, 0x7d, 0xca, 0xb8, 0x69, 0xf4, 0xc6, - 0xd8, 0x12, 0x11, 0x78, 0x59, 0x1e, 0x13, 0xd3, 0x4b, 0x05, 0x0a, 0xd0, 0x27, 0x06, 0x94, 0x22, - 0xd3, 0x89, 0xdb, 0x2a, 0xe1, 0xb6, 0x2a, 0xd1, 0xeb, 0x3d, 0x9d, 0x3c, 0xa5, 0xe6, 0x47, 0x2c, - 0x66, 0x33, 0x3a, 0xc6, 0x2b, 0xaa, 0x17, 0xd8, 0x15, 0x64, 0x41, 0x96, 0xf9, 0x7a, 0x84, 0x07, - 0x0f, 0xb0, 0x63, 0x73, 0x4a, 0x93, 0xa8, 0x8d, 0xd2, 0xc5, 0x09, 0xaa, 0xc9, 0x7e, 0x6f, 0x94, - 0x66, 0x57, 0x74, 0x84, 0x8f, 0xa9, 0x4c, 0x5b, 0xe4, 0x28, 0x9e, 0x23, 0x5f, 0xb5, 0xec, 0x82, - 0xe6, 0x31, 0x84, 0xe2, 0x74, 0x41, 0x96, 0xe3, 0xf5, 0x00, 0xef, 0x56, 0xdf, 0x1d, 0x27, 0x87, - 0x8e, 0x93, 0xdf, 0x8e, 0x93, 0xaf, 0x9e, 0x67, 0x87, 0x9e, 0x67, 0x3f, 0x3d, 0xcf, 0x9e, 0x85, - 0x32, 0x51, 0xbf, 0xd5, 0x65, 0x03, 0xaf, 0x62, 0x98, 0x75, 0x83, 0x25, 0xe2, 0xb8, 0x50, 0xec, - 0xc5, 0xff, 0xaf, 0xc4, 0x0f, 0x27, 0x43, 0x7d, 0x86, 0x5b, 0x6e, 0xff, 0x02, 0x00, 0x00, 0xff, - 0xff, 0x24, 0x1e, 0x5b, 0xda, 0x2e, 0x01, 0x00, 0x00, + // 239 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcd, 0x4f, 0x2a, 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, 0xfc, 0x5c, 0x7d, 0x90, 0x3f, 0x74, 0xc1, 0x86, 0xe8, 0xc3, + 0xbc, 0xa4, 0x5f, 0xa1, 0x0f, 0x0f, 0x86, 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, 0xb0, 0x5f, + 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xa8, 0x1d, 0x35, 0x4c, 0x1f, 0x01, 0x00, 0x00, } func (m *PendingNonces) Marshal() (dAtA []byte, err error) { diff --git a/x/observer/types/query.pb.go b/x/observer/types/query.pb.go index f8c16dc42c..4c2dc1375c 100644 --- a/x/observer/types/query.pb.go +++ b/x/observer/types/query.pb.go @@ -14,7 +14,8 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" - proto1 "github.com/zeta-chain/zetacore/pkg/proto" + chains "github.com/zeta-chain/zetacore/pkg/chains" + proofs "github.com/zeta-chain/zetacore/pkg/proofs" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -787,7 +788,7 @@ func (m *QueryTssHistoryResponse) GetPagination() *query.PageResponse { type QueryProveRequest struct { ChainId int64 `protobuf:"varint,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` TxHash string `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` - Proof *proto1.Proof `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"` + Proof *proofs.Proof `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"` BlockHash string `protobuf:"bytes,4,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` TxIndex int64 `protobuf:"varint,5,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` } @@ -839,7 +840,7 @@ func (m *QueryProveRequest) GetTxHash() string { return "" } -func (m *QueryProveRequest) GetProof() *proto1.Proof { +func (m *QueryProveRequest) GetProof() *proofs.Proof { if m != nil { return m.Proof } @@ -1363,7 +1364,7 @@ func (m *QuerySupportedChains) XXX_DiscardUnknown() { var xxx_messageInfo_QuerySupportedChains proto.InternalMessageInfo type QuerySupportedChainsResponse struct { - Chains []*proto1.Chain `protobuf:"bytes,1,rep,name=chains,proto3" json:"chains,omitempty"` + Chains []*chains.Chain `protobuf:"bytes,1,rep,name=chains,proto3" json:"chains,omitempty"` } func (m *QuerySupportedChainsResponse) Reset() { *m = QuerySupportedChainsResponse{} } @@ -1399,7 +1400,7 @@ func (m *QuerySupportedChainsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QuerySupportedChainsResponse proto.InternalMessageInfo -func (m *QuerySupportedChainsResponse) GetChains() []*proto1.Chain { +func (m *QuerySupportedChainsResponse) GetChains() []*chains.Chain { if m != nil { return m.Chains } @@ -2323,7 +2324,7 @@ func (m *QueryAllBlockHeaderRequest) GetPagination() *query.PageRequest { } type QueryAllBlockHeaderResponse struct { - BlockHeaders []*proto1.BlockHeader `protobuf:"bytes,1,rep,name=block_headers,json=blockHeaders,proto3" json:"block_headers,omitempty"` + BlockHeaders []*proofs.BlockHeader `protobuf:"bytes,1,rep,name=block_headers,json=blockHeaders,proto3" json:"block_headers,omitempty"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -2360,7 +2361,7 @@ func (m *QueryAllBlockHeaderResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryAllBlockHeaderResponse proto.InternalMessageInfo -func (m *QueryAllBlockHeaderResponse) GetBlockHeaders() []*proto1.BlockHeader { +func (m *QueryAllBlockHeaderResponse) GetBlockHeaders() []*proofs.BlockHeader { if m != nil { return m.BlockHeaders } @@ -2419,7 +2420,7 @@ func (m *QueryGetBlockHeaderByHashRequest) GetBlockHash() []byte { } type QueryGetBlockHeaderByHashResponse struct { - BlockHeader *proto1.BlockHeader `protobuf:"bytes,1,opt,name=block_header,json=blockHeader,proto3" json:"block_header,omitempty"` + BlockHeader *proofs.BlockHeader `protobuf:"bytes,1,opt,name=block_header,json=blockHeader,proto3" json:"block_header,omitempty"` } func (m *QueryGetBlockHeaderByHashResponse) Reset() { *m = QueryGetBlockHeaderByHashResponse{} } @@ -2455,7 +2456,7 @@ func (m *QueryGetBlockHeaderByHashResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryGetBlockHeaderByHashResponse proto.InternalMessageInfo -func (m *QueryGetBlockHeaderByHashResponse) GetBlockHeader() *proto1.BlockHeader { +func (m *QueryGetBlockHeaderByHashResponse) GetBlockHeader() *proofs.BlockHeader { if m != nil { return m.BlockHeader } @@ -2611,163 +2612,164 @@ func init() { func init() { proto.RegisterFile("observer/query.proto", fileDescriptor_dcb801e455adaee4) } var fileDescriptor_dcb801e455adaee4 = []byte{ - // 2493 bytes of a gzipped FileDescriptorProto + // 2504 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x5a, 0xcd, 0x6f, 0x1b, 0xc7, - 0x15, 0xf7, 0x5a, 0x91, 0x2c, 0x3d, 0x7d, 0x58, 0x1e, 0xcb, 0x5f, 0x6b, 0x5b, 0x96, 0xd7, 0x49, - 0x2c, 0x2b, 0x36, 0x19, 0xcb, 0x71, 0xfd, 0x1d, 0x5b, 0x74, 0x63, 0xc9, 0x4e, 0x6a, 0x3b, 0xa4, - 0xdb, 0x04, 0xee, 0x07, 0xbb, 0x24, 0x47, 0xe4, 0xd6, 0xf4, 0x2e, 0xb3, 0x3b, 0x52, 0xc4, 0xa8, - 0x42, 0x8b, 0x1e, 0x83, 0x1e, 0x02, 0x14, 0x68, 0x4f, 0x2d, 0x0a, 0x04, 0x3d, 0x16, 0x28, 0x02, - 0x14, 0x2d, 0x50, 0xf4, 0x90, 0x53, 0x73, 0xe8, 0x21, 0x45, 0x81, 0xa2, 0xbd, 0xb4, 0x81, 0xdd, - 0xfe,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, 0x74, 0xd0, 0x8b, 0xdb, 0x28, - 0xe0, 0x36, 0x84, 0xdc, 0xce, 0x66, 0x7a, 0x7a, 0x10, 0x19, 0x21, 0xc5, 0xbd, 0x4e, 0xbc, 0x81, - 0xdd, 0x87, 0x49, 0x62, 0xe1, 0x09, 0x53, 0xac, 0x79, 0xb8, 0x4f, 0xa6, 0x16, 0xcf, 0x64, 0x7a, - 0x0d, 0xa2, 0x52, 0x42, 0x83, 0xe2, 0x44, 0x45, 0x7a, 0x32, 0x18, 0x4c, 0x63, 0xe0, 0x1e, 0xd0, - 0xd8, 0x12, 0x17, 0xc6, 0x65, 0x38, 0x9c, 0x6c, 0xeb, 0x44, 0xf1, 0x18, 0x8c, 0x85, 0x6e, 0x83, - 0x4b, 0xc4, 0x58, 0x31, 0x6a, 0x30, 0x0e, 0x52, 0xb2, 0x97, 0xd6, 0x5a, 0x2d, 0xc7, 0x15, 0xbc, - 0x86, 0x87, 0xb4, 0x67, 0x14, 0xe8, 0x26, 0x94, 0x68, 0xef, 0x78, 0x35, 0x60, 0x04, 0xb1, 0x87, - 0xf7, 0x92, 0xe0, 0x74, 0x08, 0xaa, 0x37, 0xf5, 0x18, 0x37, 0xc1, 0x88, 0xdd, 0x6f, 0x83, 0xdd, - 0x76, 0xc7, 0x71, 0x55, 0xef, 0x08, 0x2e, 0x9c, 0xca, 0x74, 0x40, 0x58, 0xde, 0x84, 0x89, 0xc0, - 0x43, 0x6c, 0xe7, 0x2b, 0xdc, 0x28, 0xe9, 0xec, 0x18, 0xaf, 0x46, 0x0f, 0xc6, 0xb1, 0xc4, 0x45, - 0x3e, 0x7e, 0xea, 0xd8, 0x89, 0x2b, 0x7b, 0xe2, 0xf4, 0x79, 0x90, 0x8a, 0xe4, 0xac, 0x2a, 0x12, - 0x4c, 0xc8, 0x18, 0x1a, 0x49, 0x56, 0xdc, 0x77, 0x6a, 0x7c, 0x29, 0x50, 0x39, 0xd9, 0xb2, 0xe2, - 0x07, 0x11, 0xc6, 0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xce, 0x85, 0x05, 0xc8, 0x99, 0xbd, 0xea, - 0x10, 0x09, 0x23, 0xbb, 0x36, 0xf8, 0xc3, 0xfd, 0x7b, 0x96, 0x3f, 0x95, 0xbd, 0xea, 0x18, 0x3c, - 0xda, 0x1d, 0x41, 0x1f, 0xaf, 0x3a, 0x6e, 0x6d, 0xc7, 0x45, 0xeb, 0xef, 0xb4, 0x48, 0x1d, 0xc7, - 0xe7, 0x21, 0x2a, 0xcb, 0x09, 0x2a, 0x43, 0x6a, 0x54, 0x28, 0x37, 0x23, 0x42, 0x3b, 0xb7, 0x07, - 0x4b, 0xa4, 0x51, 0x29, 0xfc, 0x78, 0xd4, 0x2e, 0xd9, 0x35, 0x14, 0x81, 0x0a, 0x57, 0xe3, 0x19, - 0x18, 0x46, 0xd9, 0x49, 0x3a, 0x26, 0x78, 0x30, 0x56, 0x49, 0xb9, 0xa6, 0x3b, 0xed, 0xb1, 0xac, - 0x43, 0x83, 0x2f, 0xab, 0x74, 0xb6, 0x16, 0xf0, 0x4e, 0x8d, 0xff, 0xa9, 0xed, 0xf4, 0xaa, 0xfe, - 0x52, 0x93, 0xb3, 0x47, 0x9a, 0x86, 0x88, 0x5c, 0x84, 0x49, 0xf9, 0x2f, 0xbd, 0xb0, 0xde, 0x4f, - 0x63, 0xbd, 0x97, 0x0d, 0x26, 0x2a, 0xd1, 0xc3, 0x0e, 0xfe, 0xcd, 0xb0, 0x44, 0x4b, 0xb8, 0xcc, - 0x85, 0x34, 0x5b, 0xc1, 0xbf, 0x33, 0x37, 0xc2, 0x58, 0xc4, 0x75, 0x88, 0x1f, 0x8b, 0x09, 0x49, - 0x87, 0x18, 0xef, 0xd2, 0x82, 0xa5, 0xbb, 0x20, 0x9e, 0x17, 0x60, 0x42, 0xe6, 0x49, 0x11, 0xed, - 0xa6, 0x39, 0x2e, 0xd1, 0x34, 0xae, 0x47, 0x07, 0xb8, 0x34, 0xc6, 0xbf, 0xa8, 0x29, 0xa4, 0x97, - 0xf1, 0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5b, 0x54, 0x12, 0x28, 0x61, 0xa2, 0x5f, 0x19, 0xd8, - 0xa4, 0x03, 0xf6, 0x2c, 0x82, 0x7d, 0x99, 0xbd, 0x98, 0x0a, 0xd6, 0x4b, 0x60, 0xfb, 0x8f, 0x06, - 0x07, 0xd3, 0x25, 0x0e, 0xbb, 0xd9, 0x1f, 0x43, 0xa6, 0xba, 0xd2, 0x6f, 0x6d, 0xdf, 0x01, 0x71, - 0x29, 0x20, 0x97, 0xeb, 0xec, 0x6a, 0x2a, 0x97, 0x3a, 0x17, 0x65, 0x59, 0xf2, 0x94, 0x57, 0x1d, - 0x37, 0x68, 0xc8, 0x6f, 0x86, 0xe7, 0xde, 0x16, 0xfb, 0x44, 0x83, 0xa9, 0xf8, 0x34, 0xec, 0xd2, - 0xa0, 0xc0, 0x42, 0x46, 0x97, 0x07, 0x37, 0x24, 0x26, 0xe7, 0x90, 0xc9, 0x69, 0xf6, 0x92, 0x12, - 0x13, 0x1f, 0x74, 0x4c, 0x19, 0xa8, 0x21, 0xee, 0x96, 0x41, 0x8a, 0x88, 0x53, 0x84, 0x8d, 0xf1, - 0x2a, 0x22, 0x5e, 0x60, 0xf3, 0xa9, 0x88, 0x25, 0x21, 0x96, 0xdf, 0x44, 0xed, 0xb7, 0xe5, 0xe7, - 0xfe, 0x94, 0xe4, 0x69, 0xa9, 0xd9, 0x54, 0xc1, 0x9d, 0x2a, 0xdf, 0x54, 0x70, 0xa7, 0x0b, 0x32, - 0x63, 0x1e, 0x71, 0x1b, 0x6c, 0xae, 0x1f, 0x6e, 0xf6, 0x27, 0x0d, 0xf6, 0x26, 0xb4, 0x8a, 0xca, - 0x11, 0xd9, 0x53, 0x54, 0xa9, 0x1c, 0x91, 0xbd, 0xe5, 0x56, 0x9f, 0x14, 0x49, 0x2a, 0x31, 0xf6, - 0x73, 0x0d, 0x46, 0x02, 0x85, 0xc3, 0x16, 0x95, 0xe6, 0x8d, 0x89, 0x2c, 0xfd, 0xc2, 0x40, 0x36,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0x30, + 0xea, 0x96, 0x4d, 0x91, 0xe1, 0x18, 0xde, 0x09, 0xde, 0x88, 0x59, 0x6f, 0xbc, 0x06, 0x07, 0x13, + 0x33, 0x21, 0x8b, 0x63, 0x30, 0xd6, 0x30, 0xbd, 0xb2, 0x3f, 0x38, 0x08, 0xc6, 0x68, 0x03, 0x07, + 0x19, 0x5f, 0x87, 0x59, 0x6e, 0x55, 0xe0, 0x73, 0x16, 0xda, 0xd1, 0xac, 0xbb, 0x41, 0x6a, 0x30, + 0x18, 0xf3, 0xfd, 0xba, 0x3c, 0x13, 0x3b, 0x60, 0x6b, 0x9d, 0xb0, 0x49, 0x01, 0xc6, 0xfc, 0xe7, + 0x32, 0x6b, 0xb7, 0x28, 0xe7, 0x35, 0xb5, 0x74, 0x3a, 0x33, 0xcc, 0xbe, 0xff, 0xc7, 0xed, 0x16, + 0x2d, 0x8e, 0x6e, 0xe2, 0x2f, 0xe3, 0xf7, 0x7b, 0xe1, 0x64, 0x57, 0x16, 0x18, 0x85, 0xbe, 0x02, + 0xfe, 0x26, 0x8c, 0x70, 0x90, 0x7e, 0xa4, 0x87, 0xf8, 0x36, 0xef, 0x85, 0x88, 0x33, 0x2e, 0xa2, + 0x15, 0x79, 0x17, 0xa6, 0x45, 0x2f, 0xdf, 0x49, 0x82, 0xdb, 0x10, 0xe7, 0x76, 0x2e, 0xd3, 0xd3, + 0xc3, 0xc8, 0x88, 0x53, 0xdc, 0xe7, 0xc4, 0x1b, 0xc8, 0x03, 0x98, 0x44, 0x16, 0x1e, 0x33, 0xd9, + 0x86, 0xc7, 0xf7, 0xc9, 0xd4, 0xd2, 0xd9, 0x4c, 0xaf, 0x22, 0x2a, 0x25, 0x6e, 0x50, 0x9c, 0xa8, + 0x48, 0x4f, 0x06, 0x81, 0x69, 0x1e, 0xb8, 0x87, 0x38, 0xb6, 0x44, 0x99, 0x71, 0x19, 0x8e, 0x24, + 0xdb, 0xc2, 0x28, 0x1e, 0x87, 0xb1, 0xc0, 0x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x7f, 0x9e, 0x9b, 0xe6, 0x13, 0xff, + 0xc8, 0x25, 0x7f, 0xd2, 0x60, 0x34, 0x50, 0x48, 0xe4, 0x42, 0xef, 0x39, 0x12, 0xba, 0x4d, 0x5f, + 0xea, 0xc7, 0x04, 0x81, 0xdd, 0xe7, 0xc0, 0xbe, 0x46, 0x0a, 0xa9, 0xc0, 0x42, 0x6d, 0x96, 0xdf, + 0xee, 0x10, 0x28, 0x3b, 0xf9, 0xed, 0x98, 0x82, 0xda, 0x21, 0x7f, 0xd7, 0x80, 0x74, 0xaa, 0x1c, + 0x72, 0xad, 0x37, 0xac, 0xae, 0x0a, 0x4f, 0xbf, 0xbe, 0x3b, 0x63, 0x64, 0x77, 0x87, 0xb3, 0xbb, + 0x49, 0x6e, 0xa4, 0xb2, 0x43, 0x4a, 0x95, 0xb6, 0xc4, 0x2a, 0x8d, 0x28, 0xf9, 0x85, 0x06, 0xe3, + 0x92, 0xe2, 0x20, 0xe7, 0x7b, 0x83, 0x92, 0x86, 0xeb, 0xaf, 0xf7, 0x35, 0x3c, 0x04, 0x7f, 0x96, + 0x83, 0x9f, 0x27, 0xa7, 0x52, 0xc1, 0x87, 0x15, 0x81, 0x47, 0x19, 0xf9, 0x8d, 0x06, 0xfb, 0x12, + 0x02, 0x46, 0x25, 0x81, 0x12, 0x26, 0xfa, 0x95, 0xbe, 0x4d, 0x42, 0xb0, 0xe7, 0x38, 0xd8, 0x97, + 0xc9, 0x4b, 0xa9, 0x60, 0xbd, 0x04, 0xb6, 0x7f, 0x6b, 0x70, 0x28, 0x5d, 0xe8, 0x90, 0x9b, 0xbd, + 0x31, 0x64, 0x6a, 0x2c, 0xfd, 0xd6, 0xee, 0x1d, 0x20, 0x97, 0x02, 0xe7, 0x72, 0x9d, 0x5c, 0x4d, + 0xe5, 0x52, 0xa7, 0xac, 0x2c, 0x0b, 0x9f, 0xf2, 0x9a, 0xe3, 0x8a, 0x86, 0xfc, 0x76, 0x70, 0xee, + 0xed, 0x90, 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0xc6, 0x14, 0x41, 0x2f, 0x72, 0xd0, 0x2f, 0x11, 0x23, 0x7d, + 0xf7, 0xc6, 0xbe, 0x04, 0xfa, 0x8b, 0x06, 0x33, 0x69, 0x5f, 0xdf, 0xa8, 0x5c, 0x0c, 0x19, 0x1f, + 0xfd, 0xa8, 0x5c, 0x0c, 0x59, 0x1f, 0xfd, 0x18, 0xaf, 0x73, 0x0e, 0x79, 0x72, 0xbe, 0x37, 0x87, + 0x84, 0xae, 0x8c, 0x7d, 0x14, 0xd6, 0x87, 0xa8, 0x8c, 0xc7, 0xff, 0x72, 0xff, 0x86, 0x4a, 0x12, + 0xad, 0x1a, 0x59, 0xc4, 0x24, 0x9a, 0xe4, 0x49, 0x5d, 0xa2, 0xed, 0x0e, 0x77, 0xfa, 0x17, 0x79, + 0x3d, 0x24, 0x9a, 0x84, 0xbb, 0x70, 0xef, 0xf3, 0x67, 0xb3, 0xda, 0x17, 0xcf, 0x66, 0xb5, 0x2f, + 0x9f, 0xcd, 0x6a, 0x1f, 0x3f, 0x9f, 0xdd, 0xf3, 0xc5, 0xf3, 0xd9, 0x3d, 0xff, 0x78, 0x3e, 0xbb, + 0xe7, 0x49, 0xbe, 0x6e, 0xb1, 0xc6, 0x46, 0x25, 0x57, 0x75, 0xd6, 0x53, 0x0b, 0xfb, 0x2d, 0x69, + 0xef, 0xb4, 0x5b, 0xd4, 0xab, 0x8c, 0xf0, 0x0f, 0x27, 0x2f, 0xfe, 0x2f, 0x00, 0x00, 0xff, 0xff, + 0xcd, 0x82, 0xdb, 0xae, 0x1e, 0x2b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -8048,7 +8050,7 @@ func (m *QueryProveRequest) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Proof == nil { - m.Proof = &proto1.Proof{} + m.Proof = &proofs.Proof{} } if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -9090,7 +9092,7 @@ func (m *QuerySupportedChainsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Chains = append(m.Chains, &proto1.Chain{}) + m.Chains = append(m.Chains, &chains.Chain{}) if err := m.Chains[len(m.Chains)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -10876,7 +10878,7 @@ func (m *QueryAllBlockHeaderResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.BlockHeaders = append(m.BlockHeaders, &proto1.BlockHeader{}) + m.BlockHeaders = append(m.BlockHeaders, &proofs.BlockHeader{}) if err := m.BlockHeaders[len(m.BlockHeaders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -11081,7 +11083,7 @@ func (m *QueryGetBlockHeaderByHashResponse) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.BlockHeader == nil { - m.BlockHeader = &proto1.BlockHeader{} + m.BlockHeader = &proofs.BlockHeader{} } if err := m.BlockHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/x/observer/types/tx.pb.go b/x/observer/types/tx.pb.go index 354ea8a244..fef0e1ec4a 100644 --- a/x/observer/types/tx.pb.go +++ b/x/observer/types/tx.pb.go @@ -13,7 +13,7 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" - proto1 "github.com/zeta-chain/zetacore/pkg/proto" + proofs "github.com/zeta-chain/zetacore/pkg/proofs" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -139,7 +139,7 @@ type MsgAddBlockHeader struct { ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` BlockHash []byte `protobuf:"bytes,3,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` Height int64 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` - Header proto1.HeaderData `protobuf:"bytes,5,opt,name=header,proto3" json:"header"` + Header proofs.HeaderData `protobuf:"bytes,5,opt,name=header,proto3" json:"header"` } func (m *MsgAddBlockHeader) Reset() { *m = MsgAddBlockHeader{} } @@ -203,11 +203,11 @@ func (m *MsgAddBlockHeader) GetHeight() int64 { return 0 } -func (m *MsgAddBlockHeader) GetHeader() proto1.HeaderData { +func (m *MsgAddBlockHeader) GetHeader() proofs.HeaderData { if m != nil { return m.Header } - return proto1.HeaderData{} + return proofs.HeaderData{} } type MsgAddBlockHeaderResponse struct { @@ -950,71 +950,71 @@ func init() { func init() { proto.RegisterFile("observer/tx.proto", fileDescriptor_1bcd40fa296a2b1d) } var fileDescriptor_1bcd40fa296a2b1d = []byte{ - // 1020 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcb, 0x6e, 0xdb, 0x46, - 0x14, 0x35, 0xa3, 0xc4, 0xb1, 0xaf, 0xfc, 0x9c, 0xca, 0xb1, 0x2c, 0xc7, 0x8a, 0xc1, 0x45, 0xa1, - 0xb6, 0x8e, 0x14, 0x2b, 0x6d, 0xd1, 0x14, 0xe8, 0xc2, 0xee, 0xc3, 0x56, 0xd3, 0xc4, 0x06, 0x81, - 0x7a, 0xd1, 0x0d, 0x31, 0xe2, 0x8c, 0x49, 0xc2, 0xd4, 0x8c, 0xc0, 0xa1, 0x62, 0xab, 0x68, 0x0b, - 0xf4, 0x03, 0x8a, 0xf6, 0x03, 0xfa, 0x0d, 0xfd, 0x8a, 0x2e, 0xb2, 0xcc, 0xb2, 0xab, 0xa2, 0xb0, - 0x57, 0xed, 0x0f, 0x74, 0x1b, 0x70, 0x48, 0x8e, 0x44, 0x3d, 0x28, 0xc9, 0x3b, 0xce, 0xdc, 0x73, - 0xcf, 0x7d, 0xcc, 0x99, 0x3b, 0x84, 0x75, 0xde, 0x14, 0xd4, 0x7f, 0x45, 0xfd, 0x5a, 0x70, 0x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// 1024 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0x4d, 0x6f, 0xe3, 0x44, + 0x18, 0xae, 0x37, 0xfb, 0xd1, 0xbe, 0xe9, 0xf6, 0x63, 0x48, 0xb7, 0x69, 0xba, 0xcd, 0x56, 0x3e, + 0xa0, 0x00, 0x25, 0x69, 0xb3, 0x80, 0x58, 0x24, 0x0e, 0x2d, 0x1f, 0x6d, 0x58, 0x76, 0x5b, 0x59, + 0xa2, 0x07, 0x2e, 0xd6, 0xc4, 0x33, 0xb1, 0xad, 0x3a, 0x33, 0x91, 0xc7, 0xd9, 0x36, 0x08, 0x90, + 0xf8, 0x01, 0x08, 0x7e, 0x00, 0x7f, 0x82, 0xff, 0xc0, 0x61, 0x8f, 0x7b, 0xe4, 0x84, 0x50, 0x7b, + 0x82, 0x3f, 0xc0, 0x15, 0x79, 0x6c, 0x4f, 0xe2, 0x7c, 0x38, 0x49, 0x4f, 0xcd, 0xcc, 0xfb, 0xbc, + 0xcf, 0xfb, 0x31, 0xcf, 0xbc, 0xe3, 0xc2, 0x3a, 0x6f, 0x0a, 0xea, 0xbf, 0xa2, 0x7e, 0x2d, 0xb8, + 0xaa, 0x76, 0x7c, 0x1e, 0x70, 0xb4, 0xfd, 0x1d, 0x0d, 0xb0, 0xe5, 0x60, 0x97, 0x55, 0xe5, 0x2f, + 0xee, 0xd3, 0x6a, 0x82, 0x2a, 0x15, 0x6c, 0x6e, 0x73, 0x89, 0xab, 0x85, 0xbf, 0x22, 0x97, 0x52, + 0x41, 0xb1, 0x34, 0x3d, 0xdc, 0xa6, 0xf1, 0xee, 0x13, 0xb5, 0x6b, 0xf9, 0x5c, 0x08, 0x49, 0x69, + 0xb6, 0x3c, 0x6c, 0x8b, 0x18, 0xb0, 0xa9, 0x00, 0xc9, 0x8f, 0xd8, 0xb0, 0xa1, 0x0c, 0x1d, 0xec, + 0xe3, 0x76, 0x82, 0xdf, 0xe9, 0x6f, 0x53, 0x46, 0x5c, 0x66, 0x9b, 0x8c, 0x33, 0x8b, 0x26, 0x66, + 0xd4, 0xaf, 0x45, 0xa8, 0x10, 0x9d, 0x0b, 0xbb, 0xd6, 0xf1, 0x39, 0x6f, 0x89, 0xf8, 0x4f, 0x64, + 0xd0, 0xff, 0xd1, 0x60, 0xfd, 0x85, 0xb0, 0xbf, 0xe9, 0x10, 0x1c, 0xd0, 0xd3, 0xd8, 0x11, 0x15, + 0xe1, 0x81, 0xe5, 0x53, 0x1c, 0x70, 0xbf, 0xa8, 0xed, 0x6a, 0x95, 0x25, 0x23, 0x59, 0xa2, 0x7d, + 0x28, 0x70, 0x8f, 0x98, 0x49, 0x08, 0x13, 0x13, 0xe2, 0x53, 0x21, 0x8a, 0x77, 0x24, 0x0c, 0x71, + 0x8f, 0x24, 0x24, 0x87, 0x91, 0x25, 0xf4, 0x60, 0xf4, 0x72, 0xd4, 0x23, 0x17, 0x79, 0x30, 0x7a, + 0x39, 0xec, 0x71, 0x0e, 0x0f, 0xbb, 0x32, 0x1f, 0xd3, 0xa7, 0x58, 0x70, 0x56, 0xbc, 0xbb, 0xab, + 0x55, 0x56, 0xea, 0x07, 0xd5, 0x8c, 0x13, 0xa9, 0x26, 0x24, 0x51, 0x25, 0x86, 0x74, 0x34, 0x96, + 0xbb, 0x03, 0x2b, 0x7d, 0x1b, 0xb6, 0x46, 0x4a, 0x35, 0xa8, 0xe8, 0x70, 0x26, 0xa8, 0xfe, 0x7b, + 0xd4, 0x88, 0x43, 0x42, 0x8e, 0x3c, 0x6e, 0x5d, 0x9c, 0x50, 0x4c, 0x32, 0x1b, 0xb1, 0x05, 0x8b, + 0xd1, 0x49, 0xba, 0x44, 0x16, 0x9f, 0x33, 0x1e, 0xc8, 0x75, 0x83, 0xa0, 0x1d, 0x80, 0x66, 0xc8, + 0x61, 0x3a, 0x58, 0x38, 0xb2, 0xce, 0x65, 0x63, 0x49, 0xee, 0x9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, 0x85, 0xbd, 0xd9, 0xe8, 0x22, + 0xf4, 0xf4, 0x1e, 0x8c, 0x1b, 0x18, 0xa1, 0xf2, 0x87, 0x3e, 0xc9, 0xaa, 0x33, 0xf5, 0x52, 0xe1, + 0xa7, 0x2b, 0x7f, 0xfc, 0xf7, 0x13, 0xfa, 0x11, 0xd6, 0x46, 0xc6, 0xd4, 0xfe, 0x74, 0x01, 0xa5, + 0x3d, 0x4a, 0x1f, 0xcf, 0xeb, 0x91, 0xc4, 0x3f, 0x6a, 0xbc, 0xbe, 0x2e, 0x6b, 0x6f, 0xae, 0xcb, + 0xda, 0xdf, 0xd7, 0x65, 0xed, 0xd7, 0x9b, 0xf2, 0xc2, 0x9b, 0x9b, 0xf2, 0xc2, 0x9f, 0x37, 0xe5, + 0x85, 0x6f, 0x6b, 0xb6, 0x1b, 0x38, 0xdd, 0x66, 0xd5, 0xe2, 0xed, 0x5a, 0xc8, 0xf9, 0xbe, 0xa4, + 0xaf, 0x25, 0xf4, 0xb5, 0xab, 0x5a, 0xff, 0x3f, 0x80, 0x5e, 0x87, 0x8a, 0xe6, 0x7d, 0xf9, 0xad, + 0xff, 0xf4, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc5, 0x1a, 0xf7, 0xc9, 0xe6, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/zetaclient/app_context/app_context.go b/zetaclient/app_context/app_context.go index 537b830e7a..ba4cafbace 100644 --- a/zetaclient/app_context/app_context.go +++ b/zetaclient/app_context/app_context.go @@ -1,7 +1,7 @@ package appcontext import ( - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/zetaclient/config" corecontext "github.com/zeta-chain/zetacore/zetaclient/core_context" ) @@ -32,12 +32,12 @@ func (a AppContext) ZetaCoreContext() *corecontext.ZetaCoreContext { } // GetBTCChainAndConfig returns btc chain and config if enabled -func (a AppContext) GetBTCChainAndConfig() (pkg.Chain, config.BTCConfig, bool) { +func (a AppContext) GetBTCChainAndConfig() (chains.Chain, config.BTCConfig, bool) { btcConfig, configEnabled := a.Config().GetBTCConfig() btcChain, _, paramsEnabled := a.ZetaCoreContext().GetBTCChainParams() if !configEnabled || !paramsEnabled { - return pkg.Chain{}, config.BTCConfig{}, false + return chains.Chain{}, config.BTCConfig{}, false } return btcChain, btcConfig, true diff --git a/zetaclient/authz/authz_signer.go b/zetaclient/authz/authz_signer.go index c17f5c5704..42f9cea92a 100644 --- a/zetaclient/authz/authz_signer.go +++ b/zetaclient/authz/authz_signer.go @@ -2,12 +2,12 @@ package authz import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/authz" crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" ) type Signer struct { - KeyType pkg.KeyType + KeyType authz.KeyType GranterAddress string GranteeAddress sdk.AccAddress } @@ -21,7 +21,7 @@ var signers map[string]Signer func init() { signersList := make(map[string]Signer) for _, tx := range crosschaintypes.GetAllAuthzZetaclientTxTypes() { - signersList[tx] = Signer{KeyType: pkg.ZetaClientGranteeKey} + signersList[tx] = Signer{KeyType: authz.ZetaClientGranteeKey} } signers = signersList } diff --git a/zetaclient/bitcoin/bitcoin_client.go b/zetaclient/bitcoin/bitcoin_client.go index 4bc9477890..60f1f83d85 100644 --- a/zetaclient/bitcoin/bitcoin_client.go +++ b/zetaclient/bitcoin/bitcoin_client.go @@ -13,6 +13,10 @@ import ( "sync/atomic" "time" + "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" + "github.com/zeta-chain/zetacore/pkg/proofs" corecontext "github.com/zeta-chain/zetacore/zetaclient/core_context" appcontext "github.com/zeta-chain/zetacore/zetaclient/app_context" @@ -34,7 +38,6 @@ import ( lru "github.com/hashicorp/golang-lru" "github.com/pkg/errors" "github.com/rs/zerolog" - "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" clienttypes "github.com/zeta-chain/zetacore/zetaclient/types" @@ -62,7 +65,7 @@ type BTCLog struct { // BTCChainClient represents a chain configuration for Bitcoin // Filled with above constants depending on chain type BTCChainClient struct { - chain pkg.Chain + chain chains.Chain netParams *chaincfg.Params rpcClient interfaces.BTCRPCClient zetaClient interfaces.ZetaCoreBridger @@ -118,7 +121,7 @@ func (ob *BTCChainClient) WithBtcClient(client *rpcclient.Client) { ob.rpcClient = client } -func (ob *BTCChainClient) WithChain(chain pkg.Chain) { +func (ob *BTCChainClient) WithChain(chain chains.Chain) { ob.Mu.Lock() defer ob.Mu.Unlock() ob.chain = chain @@ -139,7 +142,7 @@ func (ob *BTCChainClient) GetChainParams() observertypes.ChainParams { // NewBitcoinClient returns a new configuration based on supplied target chain func NewBitcoinClient( appcontext *appcontext.AppContext, - chain pkg.Chain, + chain chains.Chain, bridge interfaces.ZetaCoreBridger, tss interfaces.TSSSigner, dbpath string, @@ -152,7 +155,7 @@ func NewBitcoinClient( } ob.stop = make(chan struct{}) ob.chain = chain - netParams, err := pkg.BitcoinNetParamsFromChainID(ob.chain.ChainId) + netParams, err := chains.BitcoinNetParamsFromChainID(ob.chain.ChainId) if err != nil { return nil, fmt.Errorf("error getting net params for chain %d: %s", ob.chain.ChainId, err) } @@ -370,7 +373,7 @@ func (ob *BTCChainClient) postBlockHeader(tip int64) error { ob.chain.ChainId, blockHash[:], res2.Block.Height, - pkg.NewBitcoinHeader(headerBuf.Bytes()), + proofs.NewBitcoinHeader(headerBuf.Bytes()), ) ob.logger.WatchInTx.Info().Msgf("posted block header %d: %s", bn, blockHash) if err != nil { // error shouldn't block the process @@ -559,10 +562,10 @@ func (ob *BTCChainClient) IsSendOutTxProcessed(cctx *types.CrossChainTx, logger nil, // gas price not used with Bitcoin 0, // gas limit not used with Bitcoin amountInSat, - pkg.ReceiveStatus_Success, + chains.ReceiveStatus_Success, ob.chain, nonce, - pkg.CoinType_Gas, + coin.CoinType_Gas, ) if err != nil { logger.Error().Err(err).Msgf("IsSendOutTxProcessed: error confirming bitcoin outTx %s, nonce %d ballot %s", res.TxID, nonce, ballot) @@ -699,7 +702,7 @@ func (ob *BTCChainClient) GetInboundVoteMessageFromBtcEvent(inTx *BTCInTxEvnet) inTx.TxHash, inTx.BlockNumber, 0, - pkg.CoinType_Gas, + coin.CoinType_Gas, "", ob.zetaClient.GetKeys().GetOperatorAddress().String(), 0, @@ -709,7 +712,7 @@ func (ob *BTCChainClient) GetInboundVoteMessageFromBtcEvent(inTx *BTCInTxEvnet) // IsInTxRestricted returns true if the inTx contains restricted addresses func (ob *BTCChainClient) IsInTxRestricted(inTx *BTCInTxEvnet) bool { receiver := "" - parsedAddress, _, err := pkg.ParseAddressAndData(hex.EncodeToString(inTx.MemoBytes)) + parsedAddress, _, err := chains.ParseAddressAndData(hex.EncodeToString(inTx.MemoBytes)) if err == nil && parsedAddress != (ethcommon.Address{}) { receiver = parsedAddress.Hex() } @@ -852,7 +855,7 @@ func (ob *BTCChainClient) FetchUTXOS() error { // List all unspent UTXOs (160ms) tssAddr := ob.Tss.BTCAddress() - address, err := pkg.DecodeBtcAddress(tssAddr, ob.chain.ChainId) + address, err := chains.DecodeBtcAddress(tssAddr, ob.chain.ChainId) if err != nil { return fmt.Errorf("btc: error decoding wallet address (%s) : %s", tssAddr, err.Error()) } @@ -967,7 +970,7 @@ func (ob *BTCChainClient) getOutTxidByNonce(nonce uint64, test bool) (string, er func (ob *BTCChainClient) findNonceMarkUTXO(nonce uint64, txid string) (int, error) { tssAddress := ob.Tss.BTCAddressWitnessPubkeyHash().EncodeAddress() - amount := pkg.NonceMarkAmount(nonce) + amount := chains.NonceMarkAmount(nonce) for i, utxo := range ob.utxos { sats, err := GetSatoshis(utxo.Amount) if err != nil { @@ -1340,8 +1343,8 @@ func (ob *BTCChainClient) checkTSSVout(params *types.OutboundTxParams, vouts []b if recvAddress != tssAddress { return fmt.Errorf("checkTSSVout: nonce-mark address %s not match TSS address %s", recvAddress, tssAddress) } - if amount != pkg.NonceMarkAmount(nonce) { - return fmt.Errorf("checkTSSVout: nonce-mark amount %d not match nonce-mark amount %d", amount, pkg.NonceMarkAmount(nonce)) + if amount != chains.NonceMarkAmount(nonce) { + return fmt.Errorf("checkTSSVout: nonce-mark amount %d not match nonce-mark amount %d", amount, chains.NonceMarkAmount(nonce)) } } // 2nd vout: payment to recipient @@ -1385,8 +1388,8 @@ func (ob *BTCChainClient) checkTSSVoutCancelled(params *types.OutboundTxParams, if recvAddress != tssAddress { return fmt.Errorf("checkTSSVoutCancelled: nonce-mark address %s not match TSS address %s", recvAddress, tssAddress) } - if amount != pkg.NonceMarkAmount(nonce) { - return fmt.Errorf("checkTSSVoutCancelled: nonce-mark amount %d not match nonce-mark amount %d", amount, pkg.NonceMarkAmount(nonce)) + if amount != chains.NonceMarkAmount(nonce) { + return fmt.Errorf("checkTSSVoutCancelled: nonce-mark amount %d not match nonce-mark amount %d", amount, chains.NonceMarkAmount(nonce)) } } // 2nd vout: change to TSS (optional) diff --git a/zetaclient/bitcoin/bitcoin_client_rpc_test.go b/zetaclient/bitcoin/bitcoin_client_rpc_test.go index f5f7e43efe..d4f65ed84a 100644 --- a/zetaclient/bitcoin/bitcoin_client_rpc_test.go +++ b/zetaclient/bitcoin/bitcoin_client_rpc_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" appcontext "github.com/zeta-chain/zetacore/zetaclient/app_context" clientcommon "github.com/zeta-chain/zetacore/zetaclient/common" "github.com/zeta-chain/zetacore/zetaclient/config" @@ -47,7 +47,7 @@ func (suite *BitcoinClientTestSuite) SetupTest() { PrivKey: privateKey, } appContext := appcontext.NewAppContext(&corecontext.ZetaCoreContext{}, config.Config{}) - client, err := NewBitcoinClient(appContext, pkg.BtcRegtestChain(), nil, tss, tempSQLiteDbPath, + client, err := NewBitcoinClient(appContext, chains.BtcRegtestChain(), nil, tss, tempSQLiteDbPath, clientcommon.DefaultLoggers(), config.BTCConfig{}, nil) suite.Require().NoError(err) suite.BitcoinChainClient = client diff --git a/zetaclient/bitcoin/bitcoin_client_test.go b/zetaclient/bitcoin/bitcoin_client_test.go index 28c1ef60ce..fa7a84b02f 100644 --- a/zetaclient/bitcoin/bitcoin_client_test.go +++ b/zetaclient/bitcoin/bitcoin_client_test.go @@ -15,7 +15,7 @@ import ( "github.com/btcsuite/btcutil" "github.com/rs/zerolog/log" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/testutil/sample" observertypes "github.com/zeta-chain/zetacore/x/observer/types" appcontext "github.com/zeta-chain/zetacore/zetaclient/app_context" @@ -32,7 +32,7 @@ func MockBTCClientMainnet() *BTCChainClient { coreContext := corecontext.NewZetaCoreContext(cfg) return &BTCChainClient{ - chain: pkg.BtcMainnetChain(), + chain: chains.BtcMainnetChain(), zetaClient: stub.NewMockZetaCoreBridge(), Tss: stub.NewTSSMainnet(), coreContext: coreContext, @@ -44,7 +44,7 @@ func TestNewBitcoinClient(t *testing.T) { cfg := config.NewConfig() coreContext := corecontext.NewZetaCoreContext(cfg) appContext := appcontext.NewAppContext(coreContext, cfg) - chain := pkg.BtcMainnetChain() + chain := chains.BtcMainnetChain() bridge := stub.NewMockZetaCoreBridge() tss := stub.NewMockTSS(sample.EthAddress().String(), "") loggers := clientcommon.ClientLogger{} diff --git a/zetaclient/bitcoin/bitcoin_signer.go b/zetaclient/bitcoin/bitcoin_signer.go index 8ceb8fea19..747649be06 100644 --- a/zetaclient/bitcoin/bitcoin_signer.go +++ b/zetaclient/bitcoin/bitcoin_signer.go @@ -8,6 +8,8 @@ import ( "math/rand" "time" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" corecontext "github.com/zeta-chain/zetacore/zetaclient/core_context" ethcommon "github.com/ethereum/go-ethereum/common" @@ -25,7 +27,6 @@ import ( "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcutil" "github.com/rs/zerolog" - "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" "github.com/zeta-chain/zetacore/zetaclient/config" @@ -106,11 +107,11 @@ func (signer *BTCSigner) SignWithdrawTx( btcClient *BTCChainClient, height uint64, nonce uint64, - chain *pkg.Chain, + chain *chains.Chain, cancelTx bool, ) (*wire.MsgTx, error) { estimateFee := float64(gasPrice.Uint64()*outTxBytesMax) / 1e8 - nonceMark := pkg.NonceMarkAmount(nonce) + nonceMark := chains.NonceMarkAmount(nonce) // refresh unspent UTXOs and continue with keysign regardless of error err := btcClient.FetchUTXOS() @@ -285,7 +286,7 @@ func (signer *BTCSigner) TryProcessOutTx( Logger() params := cctx.GetCurrentOutTxParam() - if params.CoinType == pkg.CoinType_Zeta || params.CoinType == pkg.CoinType_ERC20 { + if params.CoinType == coin.CoinType_Zeta || params.CoinType == coin.CoinType_ERC20 { logger.Error().Msgf("BTC TryProcessOutTx: can only send BTC to a BTC network") return } @@ -312,12 +313,12 @@ func (signer *BTCSigner) TryProcessOutTx( } // Check receiver P2WPKH address - bitcoinNetParams, err := pkg.BitcoinNetParamsFromChainID(params.ReceiverChainId) + bitcoinNetParams, err := chains.BitcoinNetParamsFromChainID(params.ReceiverChainId) if err != nil { logger.Error().Err(err).Msgf("cannot get bitcoin net params%v", err) return } - addr, err := pkg.DecodeBtcAddress(params.Receiver, params.ReceiverChainId) + addr, err := chains.DecodeBtcAddress(params.Receiver, params.ReceiverChainId) if err != nil { logger.Error().Err(err).Msgf("cannot decode address %s ", params.Receiver) return diff --git a/zetaclient/bitcoin/bitcoin_signer_test.go b/zetaclient/bitcoin/bitcoin_signer_test.go index a464395ee9..26e79ed8d6 100644 --- a/zetaclient/bitcoin/bitcoin_signer_test.go +++ b/zetaclient/bitcoin/bitcoin_signer_test.go @@ -19,7 +19,7 @@ import ( "github.com/btcsuite/btcutil" "github.com/ethereum/go-ethereum/crypto" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" clientcommon "github.com/zeta-chain/zetacore/zetaclient/common" "github.com/zeta-chain/zetacore/zetaclient/config" corecontext "github.com/zeta-chain/zetacore/zetaclient/core_context" @@ -458,7 +458,7 @@ func mineTxNSetNonceMark(ob *BTCChainClient, nonce uint64, txid string, preMarkI // Set nonce mark tssAddress := ob.Tss.BTCAddressWitnessPubkeyHash().EncodeAddress() - nonceMark := btcjson.ListUnspentResult{TxID: txid, Address: tssAddress, Amount: float64(pkg.NonceMarkAmount(nonce)) * 1e-8} + nonceMark := btcjson.ListUnspentResult{TxID: txid, Address: tssAddress, Amount: float64(chains.NonceMarkAmount(nonce)) * 1e-8} if preMarkIndex >= 0 { // replace nonce-mark utxo ob.utxos[preMarkIndex] = nonceMark diff --git a/zetaclient/bitcoin/bitcoin_test.go b/zetaclient/bitcoin/bitcoin_test.go index ffb0f19d44..12e9e29136 100644 --- a/zetaclient/bitcoin/bitcoin_test.go +++ b/zetaclient/bitcoin/bitcoin_test.go @@ -7,6 +7,7 @@ import ( "math/big" "testing" + "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/zetaclient/interfaces" "github.com/btcsuite/btcd/btcec" @@ -16,7 +17,6 @@ import ( "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcutil" "github.com/stretchr/testify/suite" - "github.com/zeta-chain/zetacore/pkg" "gorm.io/driver/sqlite" "gorm.io/gorm" ) @@ -145,7 +145,7 @@ func getTSSTX(tss *interfaces.TestSigner, tx *wire.MsgTx, sigHashes *txscript.Tx return "", err } - sig65B, err := tss.Sign(witnessHash, 10, 10, &pkg.Chain{}, "") + sig65B, err := tss.Sign(witnessHash, 10, 10, &chains.Chain{}, "") R := big.NewInt(0).SetBytes(sig65B[:32]) S := big.NewInt(0).SetBytes(sig65B[32:64]) sig := btcec.Signature{ diff --git a/zetaclient/bitcoin/inbound_tracker.go b/zetaclient/bitcoin/inbound_tracker.go index c1e4851be3..2a6b80c124 100644 --- a/zetaclient/bitcoin/inbound_tracker.go +++ b/zetaclient/bitcoin/inbound_tracker.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/zetaclient/types" "github.com/zeta-chain/zetacore/zetaclient/zetabridge" ) @@ -44,7 +44,7 @@ func (ob *BTCChainClient) ObserveTrackerSuggestions() error { if err != nil { return err } - ob.logger.WatchInTx.Info().Msgf("Vote submitted for inbound Tracker,Chain : %s,Ballot Identifier : %s, coin-type %s", ob.chain.ChainName, ballotIdentifier, pkg.CoinType_Gas.String()) + ob.logger.WatchInTx.Info().Msgf("Vote submitted for inbound Tracker,Chain : %s,Ballot Identifier : %s, coin-type %s", ob.chain.ChainName, ballotIdentifier, coin.CoinType_Gas.String()) } return nil } diff --git a/zetaclient/bitcoin/utils.go b/zetaclient/bitcoin/utils.go index 98c9ebc73e..12d24a5880 100644 --- a/zetaclient/bitcoin/utils.go +++ b/zetaclient/bitcoin/utils.go @@ -12,7 +12,7 @@ import ( "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcutil" "github.com/rs/zerolog" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" clientcommon "github.com/zeta-chain/zetacore/zetaclient/common" "github.com/btcsuite/btcd/txscript" @@ -172,11 +172,11 @@ func CalcDepositorFee(blockVb *btcjson.GetBlockVerboseTxResult, chainID int64, n dynamicFee := true // use default fee for regnet - if pkg.IsBitcoinRegnet(chainID) { + if chains.IsBitcoinRegnet(chainID) { dynamicFee = false } // mainnet dynamic fee takes effect only after a planned upgrade height - if pkg.IsBitcoinMainnet(chainID) && blockVb.Height < DynamicDepositorFeeHeight { + if chains.IsBitcoinMainnet(chainID) && blockVb.Height < DynamicDepositorFeeHeight { dynamicFee = false } if !dynamicFee { @@ -227,7 +227,7 @@ func PayToWitnessPubKeyHashScript(pubKeyHash []byte) ([]byte, error) { } // DecodeP2WPKHVout decodes receiver and amount from P2WPKH output -func DecodeP2WPKHVout(vout btcjson.Vout, chain pkg.Chain) (string, int64, error) { +func DecodeP2WPKHVout(vout btcjson.Vout, chain chains.Chain) (string, int64, error) { amount, err := GetSatoshis(vout.Value) if err != nil { return "", 0, errors.Wrap(err, "error getting satoshis") diff --git a/zetaclient/bitcoin/utils_test.go b/zetaclient/bitcoin/utils_test.go index 48ae850c6b..7196460cd8 100644 --- a/zetaclient/bitcoin/utils_test.go +++ b/zetaclient/bitcoin/utils_test.go @@ -6,14 +6,14 @@ import ( "github.com/btcsuite/btcd/btcjson" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/zetaclient/testutils" ) func TestDecodeP2WPKHVout(t *testing.T) { // load archived outtx raw result // https://blockstream.info/tx/030cd813443f7b70cc6d8a544d320c6d8465e4528fc0f3410b599dc0b26753a0 - chain := pkg.BtcMainnetChain() + chain := chains.BtcMainnetChain() nonce := uint64(148) nameTx := path.Join("../", testutils.TestDataPathBTC, testutils.FileNameBTCOuttx(chain.ChainId, nonce)) @@ -26,7 +26,7 @@ func TestDecodeP2WPKHVout(t *testing.T) { receiver, amount, err := DecodeP2WPKHVout(rawResult.Vout[0], chain) require.NoError(t, err) require.Equal(t, testutils.TSSAddressBTCMainnet, receiver) - require.Equal(t, pkg.NonceMarkAmount(nonce), amount) + require.Equal(t, chains.NonceMarkAmount(nonce), amount) // decode vout 1, payment 0.00012000 BTC receiver, amount, err = DecodeP2WPKHVout(rawResult.Vout[1], chain) @@ -44,7 +44,7 @@ func TestDecodeP2WPKHVout(t *testing.T) { func TestDecodeP2WPKHVoutErrors(t *testing.T) { // load archived outtx raw result // https://blockstream.info/tx/030cd813443f7b70cc6d8a544d320c6d8465e4528fc0f3410b599dc0b26753a0 - chain := pkg.BtcMainnetChain() + chain := chains.BtcMainnetChain() nonce := uint64(148) nameTx := path.Join("../", testutils.TestDataPathBTC, testutils.FileNameBTCOuttx(chain.ChainId, nonce)) diff --git a/zetaclient/config/config_chain.go b/zetaclient/config/config_chain.go index 1f541f5ecb..869d9111ea 100644 --- a/zetaclient/config/config_chain.go +++ b/zetaclient/config/config_chain.go @@ -1,8 +1,6 @@ package config -import ( - "github.com/zeta-chain/zetacore/pkg" -) +import "github.com/zeta-chain/zetacore/pkg/chains" const ( BtcConfirmationCount = 1 @@ -46,26 +44,26 @@ var bitcoinConfigRegnet = BTCConfig{ } var evmChainsConfigs = map[int64]EVMConfig{ - pkg.EthChain().ChainId: { - Chain: pkg.EthChain(), + chains.EthChain().ChainId: { + Chain: chains.EthChain(), }, - pkg.BscMainnetChain().ChainId: { - Chain: pkg.BscMainnetChain(), + chains.BscMainnetChain().ChainId: { + Chain: chains.BscMainnetChain(), }, - pkg.GoerliChain().ChainId: { - Chain: pkg.GoerliChain(), + chains.GoerliChain().ChainId: { + Chain: chains.GoerliChain(), Endpoint: "", }, - pkg.BscTestnetChain().ChainId: { - Chain: pkg.BscTestnetChain(), + chains.BscTestnetChain().ChainId: { + Chain: chains.BscTestnetChain(), Endpoint: "", }, - pkg.MumbaiChain().ChainId: { - Chain: pkg.MumbaiChain(), + chains.MumbaiChain().ChainId: { + Chain: chains.MumbaiChain(), Endpoint: "", }, - pkg.GoerliLocalnetChain().ChainId: { - Chain: pkg.GoerliLocalnetChain(), + chains.GoerliLocalnetChain().ChainId: { + Chain: chains.GoerliLocalnetChain(), Endpoint: "http://eth:8545", }, } diff --git a/zetaclient/config/types.go b/zetaclient/config/types.go index f92eb1518d..ea861d46bb 100644 --- a/zetaclient/config/types.go +++ b/zetaclient/config/types.go @@ -5,7 +5,7 @@ import ( "strings" "sync" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" ) // KeyringBackend is the type of keyring backend to use for the hotkey @@ -27,7 +27,7 @@ type ClientConfiguration struct { } type EVMConfig struct { - Chain pkg.Chain + Chain chains.Chain Endpoint string } diff --git a/zetaclient/core_context/zeta_core_context.go b/zetaclient/core_context/zeta_core_context.go index 2402b99a8c..d35c502c86 100644 --- a/zetaclient/core_context/zeta_core_context.go +++ b/zetaclient/core_context/zeta_core_context.go @@ -6,7 +6,7 @@ import ( "sync" "github.com/rs/zerolog" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" observertypes "github.com/zeta-chain/zetacore/x/observer/types" "github.com/zeta-chain/zetacore/zetaclient/config" ) @@ -16,7 +16,7 @@ import ( type ZetaCoreContext struct { coreContextLock *sync.RWMutex keygen observertypes.Keygen - chainsEnabled []pkg.Chain + chainsEnabled []chains.Chain evmChainParams map[int64]*observertypes.ChainParams bitcoinChainParams *observertypes.ChainParams currentTssPubkey string @@ -37,7 +37,7 @@ func NewZetaCoreContext(cfg config.Config) *ZetaCoreContext { } return &ZetaCoreContext{ coreContextLock: new(sync.RWMutex), - chainsEnabled: []pkg.Chain{}, + chainsEnabled: []chains.Chain{}, evmChainParams: evmChainParams, bitcoinChainParams: bitcoinChainParams, crossChainFlags: observertypes.CrosschainFlags{}, @@ -66,10 +66,10 @@ func (c *ZetaCoreContext) GetCurrentTssPubkey() string { return c.currentTssPubkey } -func (c *ZetaCoreContext) GetEnabledChains() []pkg.Chain { +func (c *ZetaCoreContext) GetEnabledChains() []chains.Chain { c.coreContextLock.RLock() defer c.coreContextLock.RUnlock() - copiedChains := make([]pkg.Chain, len(c.chainsEnabled)) + copiedChains := make([]chains.Chain, len(c.chainsEnabled)) copy(copiedChains, c.chainsEnabled) return copiedChains } @@ -94,14 +94,14 @@ func (c *ZetaCoreContext) GetAllEVMChainParams() map[int64]*observertypes.ChainP return copied } -func (c *ZetaCoreContext) GetBTCChainParams() (pkg.Chain, *observertypes.ChainParams, bool) { +func (c *ZetaCoreContext) GetBTCChainParams() (chains.Chain, *observertypes.ChainParams, bool) { c.coreContextLock.RLock() defer c.coreContextLock.RUnlock() if c.bitcoinChainParams == nil { // bitcoin is not enabled - return pkg.Chain{}, &observertypes.ChainParams{}, false + return chains.Chain{}, &observertypes.ChainParams{}, false } - chain := pkg.GetChainFromChainID(c.bitcoinChainParams.ChainId) + chain := chains.GetChainFromChainID(c.bitcoinChainParams.ChainId) if chain == nil { panic(fmt.Sprintf("BTCChain is missing for chainID %d", c.bitcoinChainParams.ChainId)) } @@ -118,7 +118,7 @@ func (c *ZetaCoreContext) GetCrossChainFlags() observertypes.CrosschainFlags { // this must be the ONLY function that writes to core context func (c *ZetaCoreContext) Update( keygen *observertypes.Keygen, - newChains []pkg.Chain, + newChains []chains.Chain, evmChainParams map[int64]*observertypes.ChainParams, btcChainParams *observertypes.ChainParams, tssPubKey string, diff --git a/zetaclient/core_context/zeta_core_context_test.go b/zetaclient/core_context/zeta_core_context_test.go index a6e285f7a6..14f36a1cc2 100644 --- a/zetaclient/core_context/zeta_core_context_test.go +++ b/zetaclient/core_context/zeta_core_context_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/testutil/sample" observertypes "github.com/zeta-chain/zetacore/x/observer/types" clientcommon "github.com/zeta-chain/zetacore/zetaclient/common" @@ -31,7 +31,7 @@ func TestNewZetaCoreContext(t *testing.T) { // assert btc chain params chain, btcChainParams, btcChainParamsFound := zetaContext.GetBTCChainParams() - require.Equal(t, pkg.Chain{}, chain) + require.Equal(t, chains.Chain{}, chain) require.False(t, btcChainParamsFound) require.Equal(t, &observertypes.ChainParams{}, btcChainParams) @@ -44,13 +44,13 @@ func TestNewZetaCoreContext(t *testing.T) { testCfg := config.NewConfig() testCfg.EVMChainConfigs = map[int64]config.EVMConfig{ 1: { - Chain: pkg.Chain{ + Chain: chains.Chain{ ChainName: 1, ChainId: 1, }, }, 2: { - Chain: pkg.Chain{ + Chain: chains.Chain{ ChainName: 2, ChainId: 2, }, @@ -103,7 +103,7 @@ func TestUpdateZetaCoreContext(t *testing.T) { Status: observertypes.KeygenStatus_KeyGenSuccess, GranteePubkeys: []string{"testpubkey1"}, } - enabledChainsToUpdate := []pkg.Chain{ + enabledChainsToUpdate := []chains.Chain{ { ChainName: 1, ChainId: 1, @@ -151,7 +151,7 @@ func TestUpdateZetaCoreContext(t *testing.T) { // assert btc chain params still empty because they were not specified in config chain, btcChainParams, btcChainParamsFound := zetaContext.GetBTCChainParams() - require.Equal(t, pkg.Chain{}, chain) + require.Equal(t, chains.Chain{}, chain) require.False(t, btcChainParamsFound) require.Equal(t, &observertypes.ChainParams{}, btcChainParams) @@ -167,13 +167,13 @@ func TestUpdateZetaCoreContext(t *testing.T) { testCfg := config.NewConfig() testCfg.EVMChainConfigs = map[int64]config.EVMConfig{ 1: { - Chain: pkg.Chain{ + Chain: chains.Chain{ ChainName: 1, ChainId: 1, }, }, 2: { - Chain: pkg.Chain{ + Chain: chains.Chain{ ChainName: 2, ChainId: 2, }, @@ -193,7 +193,7 @@ func TestUpdateZetaCoreContext(t *testing.T) { Status: observertypes.KeygenStatus_KeyGenSuccess, GranteePubkeys: []string{"testpubkey1"}, } - enabledChainsToUpdate := []pkg.Chain{ + enabledChainsToUpdate := []chains.Chain{ { ChainName: 1, ChainId: 1, @@ -212,7 +212,7 @@ func TestUpdateZetaCoreContext(t *testing.T) { }, } - testBtcChain := pkg.BtcTestNetChain() + testBtcChain := chains.BtcTestNetChain() btcChainParamsToUpdate := &observertypes.ChainParams{ ChainId: testBtcChain.ChainId, } diff --git a/zetaclient/evm/evm_client.go b/zetaclient/evm/evm_client.go index 91626bb7c8..a70401365e 100644 --- a/zetaclient/evm/evm_client.go +++ b/zetaclient/evm/evm_client.go @@ -13,6 +13,9 @@ import ( "sync/atomic" "time" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" + "github.com/zeta-chain/zetacore/pkg/proofs" appcontext "github.com/zeta-chain/zetacore/zetaclient/app_context" corecontext "github.com/zeta-chain/zetacore/zetaclient/core_context" @@ -36,7 +39,6 @@ import ( "github.com/rs/zerolog/log" "github.com/zeta-chain/protocol-contracts/pkg/contracts/evm/erc20custody.sol" "github.com/zeta-chain/protocol-contracts/pkg/contracts/evm/zetaconnector.non-eth.sol" - "github.com/zeta-chain/zetacore/pkg" crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" clientcommon "github.com/zeta-chain/zetacore/zetaclient/common" @@ -70,7 +72,7 @@ var _ interfaces.ChainClient = &ChainClient{} // ChainClient represents the chain configuration for an EVM chain // Filled with above constants depending on chain type ChainClient struct { - chain pkg.Chain + chain chains.Chain evmClient interfaces.EVMRPCClient evmJSONRPC interfaces.EVMJSONRPCClient zetaClient interfaces.ZetaCoreBridger @@ -161,7 +163,7 @@ func NewEVMChainClient( return &ob, nil } -func (ob *ChainClient) WithChain(chain pkg.Chain) { +func (ob *ChainClient) WithChain(chain chains.Chain) { ob.Mu.Lock() defer ob.Mu.Unlock() ob.chain = chain @@ -332,9 +334,9 @@ func (ob *ChainClient) IsSendOutTxProcessed(cctx *crosschaintypes.CrossChainTx, // compliance check, special handling the cancelled cctx if compliance.IsCctxRestricted(cctx) { - recvStatus := pkg.ReceiveStatus_Failed + recvStatus := chains.ReceiveStatus_Failed if receipt.Status == 1 { - recvStatus = pkg.ReceiveStatus_Success + recvStatus = chains.ReceiveStatus_Success } zetaTxHash, ballot, err := ob.zetaClient.PostVoteOutbound( sendHash, @@ -348,7 +350,7 @@ func (ob *ChainClient) IsSendOutTxProcessed(cctx *crosschaintypes.CrossChainTx, recvStatus, ob.chain, nonce, - pkg.CoinType_Cmd, + coin.CoinType_Cmd, ) if err != nil { logger.Error().Err(err).Msgf("error posting confirmation to meta core for cctx %s nonce %d", sendHash, nonce) @@ -358,10 +360,10 @@ func (ob *ChainClient) IsSendOutTxProcessed(cctx *crosschaintypes.CrossChainTx, return true, true, nil } - if cointype == pkg.CoinType_Cmd { - recvStatus := pkg.ReceiveStatus_Failed + if cointype == coin.CoinType_Cmd { + recvStatus := chains.ReceiveStatus_Failed if receipt.Status == 1 { - recvStatus = pkg.ReceiveStatus_Success + recvStatus = chains.ReceiveStatus_Success } zetaTxHash, ballot, err := ob.zetaClient.PostVoteOutbound( sendHash, @@ -374,7 +376,7 @@ func (ob *ChainClient) IsSendOutTxProcessed(cctx *crosschaintypes.CrossChainTx, recvStatus, ob.chain, nonce, - pkg.CoinType_Cmd, + coin.CoinType_Cmd, ) if err != nil { logger.Error().Err(err).Msgf("error posting confirmation to meta core for cctx %s nonce %d", sendHash, nonce) @@ -383,7 +385,7 @@ func (ob *ChainClient) IsSendOutTxProcessed(cctx *crosschaintypes.CrossChainTx, } return true, true, nil - } else if cointype == pkg.CoinType_Gas { // the outbound is a regular Ether/BNB/Matic transfer; no need to check events + } else if cointype == coin.CoinType_Gas { // the outbound is a regular Ether/BNB/Matic transfer; no need to check events if receipt.Status == 1 { zetaTxHash, ballot, err := ob.zetaClient.PostVoteOutbound( sendHash, @@ -393,10 +395,10 @@ func (ob *ChainClient) IsSendOutTxProcessed(cctx *crosschaintypes.CrossChainTx, transaction.GasPrice(), transaction.Gas(), transaction.Value(), - pkg.ReceiveStatus_Success, + chains.ReceiveStatus_Success, ob.chain, nonce, - pkg.CoinType_Gas, + coin.CoinType_Gas, ) if err != nil { logger.Error().Err(err).Msgf("error posting confirmation to meta core for cctx %s nonce %d", sendHash, nonce) @@ -414,10 +416,10 @@ func (ob *ChainClient) IsSendOutTxProcessed(cctx *crosschaintypes.CrossChainTx, transaction.GasPrice(), transaction.Gas(), big.NewInt(0), - pkg.ReceiveStatus_Failed, + chains.ReceiveStatus_Failed, ob.chain, nonce, - pkg.CoinType_Gas, + coin.CoinType_Gas, ) if err != nil { logger.Error().Err(err).Msgf("PostVoteOutbound error in WatchTxHashWithTimeout; zeta tx hash %s cctx %s nonce %d", zetaTxHash, sendHash, nonce) @@ -426,7 +428,7 @@ func (ob *ChainClient) IsSendOutTxProcessed(cctx *crosschaintypes.CrossChainTx, } return true, true, nil } - } else if cointype == pkg.CoinType_Zeta { // the outbound is a Zeta transfer; need to check events ZetaReceived + } else if cointype == coin.CoinType_Zeta { // the outbound is a Zeta transfer; need to check events ZetaReceived if receipt.Status == 1 { logs := receipt.Logs for _, vLog := range logs { @@ -458,10 +460,10 @@ func (ob *ChainClient) IsSendOutTxProcessed(cctx *crosschaintypes.CrossChainTx, transaction.GasPrice(), transaction.Gas(), mMint, - pkg.ReceiveStatus_Success, + chains.ReceiveStatus_Success, ob.chain, nonce, - pkg.CoinType_Zeta, + coin.CoinType_Zeta, ) if err != nil { logger.Error().Err(err).Msgf("error posting confirmation to meta core for cctx %s nonce %d", sendHash, nonce) @@ -495,10 +497,10 @@ func (ob *ChainClient) IsSendOutTxProcessed(cctx *crosschaintypes.CrossChainTx, transaction.GasPrice(), transaction.Gas(), mMint, - pkg.ReceiveStatus_Success, + chains.ReceiveStatus_Success, ob.chain, nonce, - pkg.CoinType_Zeta, + coin.CoinType_Zeta, ) if err != nil { logger.Err(err).Msgf("error posting confirmation to meta core for cctx %s nonce %d", sendHash, nonce) @@ -523,10 +525,10 @@ func (ob *ChainClient) IsSendOutTxProcessed(cctx *crosschaintypes.CrossChainTx, transaction.GasPrice(), transaction.Gas(), big.NewInt(0), - pkg.ReceiveStatus_Failed, + chains.ReceiveStatus_Failed, ob.chain, nonce, - pkg.CoinType_Zeta, + coin.CoinType_Zeta, ) if err != nil { logger.Error().Err(err).Msgf("error posting confirmation to meta core for cctx %s nonce %d", sendHash, nonce) @@ -535,7 +537,7 @@ func (ob *ChainClient) IsSendOutTxProcessed(cctx *crosschaintypes.CrossChainTx, } return true, true, nil } - } else if cointype == pkg.CoinType_ERC20 { + } else if cointype == coin.CoinType_ERC20 { if receipt.Status == 1 { logs := receipt.Logs addrCustody, ERC20Custody, err := ob.GetERC20CustodyContract() @@ -563,10 +565,10 @@ func (ob *ChainClient) IsSendOutTxProcessed(cctx *crosschaintypes.CrossChainTx, transaction.GasPrice(), transaction.Gas(), event.Amount, - pkg.ReceiveStatus_Success, + chains.ReceiveStatus_Success, ob.chain, nonce, - pkg.CoinType_ERC20, + coin.CoinType_ERC20, ) if err != nil { logger.Error().Err(err).Msgf("error posting confirmation to meta core for cctx %s nonce %d", sendHash, nonce) @@ -590,10 +592,10 @@ func (ob *ChainClient) IsSendOutTxProcessed(cctx *crosschaintypes.CrossChainTx, transaction.GasPrice(), transaction.Gas(), big.NewInt(0), - pkg.ReceiveStatus_Failed, + chains.ReceiveStatus_Failed, ob.chain, nonce, - pkg.CoinType_ERC20, + coin.CoinType_ERC20, ) if err != nil { logger.Error().Err(err).Msgf("PostVoteOutbound error in WatchTxHashWithTimeout; zeta tx hash %s", zetaTxHash) @@ -897,7 +899,7 @@ func (ob *ChainClient) postBlockHeader(tip uint64) error { ob.chain.ChainId, header.Hash().Bytes(), header.Number.Int64(), - pkg.NewEthereumHeader(headerRLP), + proofs.NewEthereumHeader(headerRLP), ) if err != nil { ob.logger.ExternalChainWatcher.Error().Err(err).Msgf("postBlockHeader: error posting block header: %d", bn) @@ -1035,7 +1037,7 @@ func (ob *ChainClient) ObserveZetaSent(startBlock, toBlock uint64) uint64 { msg := ob.BuildInboundVoteMsgForZetaSentEvent(event) if msg != nil { - _, err = ob.PostVoteInbound(msg, pkg.CoinType_Zeta, zetabridge.PostVoteInboundMessagePassingExecutionGasLimit) + _, err = ob.PostVoteInbound(msg, coin.CoinType_Zeta, zetabridge.PostVoteInboundMessagePassingExecutionGasLimit) if err != nil { return beingScanned - 1 // we have to re-scan from this block next time } @@ -1115,7 +1117,7 @@ func (ob *ChainClient) ObserveERC20Deposited(startBlock, toBlock uint64) uint64 msg := ob.BuildInboundVoteMsgForDepositedEvent(event, sender) if msg != nil { - _, err = ob.PostVoteInbound(msg, pkg.CoinType_ERC20, zetabridge.PostVoteInboundExecutionGasLimit) + _, err = ob.PostVoteInbound(msg, coin.CoinType_ERC20, zetabridge.PostVoteInboundExecutionGasLimit) if err != nil { return beingScanned - 1 // we have to re-scan from this block next time } @@ -1138,7 +1140,7 @@ func (ob *ChainClient) ObserverTSSReceive(startBlock, toBlock uint64, flags obse // TODO: consider having a independent ticker(from TSS scaning) for posting block headers if flags.BlockHeaderVerificationFlags != nil && flags.BlockHeaderVerificationFlags.IsEthTypeChainEnabled && - pkg.IsHeaderSupportedEvmChain(ob.chain.ChainId) { // post block header for supported chains + chains.IsHeaderSupportedEvmChain(ob.chain.ChainId) { // post block header for supported chains err := ob.postBlockHeader(toBlock) if err != nil { ob.logger.ExternalChainWatcher.Error().Err(err).Msg("error posting block header") @@ -1280,7 +1282,7 @@ func (ob *ChainClient) BuildReceiptsMap() error { } // LoadDB open sql database and load data into EVMChainClient -func (ob *ChainClient) LoadDB(dbPath string, chain pkg.Chain) error { +func (ob *ChainClient) LoadDB(dbPath string, chain chains.Chain) error { if dbPath != "" { if _, err := os.Stat(dbPath); os.IsNotExist(err) { err := os.MkdirAll(dbPath, os.ModePerm) diff --git a/zetaclient/evm/evm_client_test.go b/zetaclient/evm/evm_client_test.go index 80a4d0634c..7596931f3e 100644 --- a/zetaclient/evm/evm_client_test.go +++ b/zetaclient/evm/evm_client_test.go @@ -8,7 +8,8 @@ import ( lru "github.com/hashicorp/golang-lru" "github.com/onrik/ethrpc" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/x/crosschain/types" "github.com/zeta-chain/zetacore/zetaclient/evm" "github.com/zeta-chain/zetacore/zetaclient/testutils" @@ -45,7 +46,7 @@ func TestEVM_CheckTxInclusion(t *testing.T) { // load archived evm outtx Gas // https://etherscan.io/tx/0xd13b593eb62b5500a00e288cc2fb2c8af1339025c0e6bc6183b8bef2ebbed0d3 chainID := int64(1) - coinType := pkg.CoinType_Gas + coinType := coin.CoinType_Gas outtxHash := "0xd13b593eb62b5500a00e288cc2fb2c8af1339025c0e6bc6183b8bef2ebbed0d3" tx, receipt := testutils.LoadEVMOuttxNReceipt(t, chainID, outtxHash, coinType) @@ -96,7 +97,7 @@ func TestEVM_VoteOutboundBallot(t *testing.T) { // load archived evm outtx Gas // https://etherscan.io/tx/0xd13b593eb62b5500a00e288cc2fb2c8af1339025c0e6bc6183b8bef2ebbed0d3 chainID := int64(1) - coinType := pkg.CoinType_Gas + coinType := coin.CoinType_Gas outtxHash := "0xd13b593eb62b5500a00e288cc2fb2c8af1339025c0e6bc6183b8bef2ebbed0d3" tx, receipt := testutils.LoadEVMOuttxNReceipt(t, chainID, outtxHash, coinType) @@ -113,7 +114,7 @@ func TestEVM_VoteOutboundBallot(t *testing.T) { math.NewIntFromBigInt(tx.GasPrice()), tx.Gas(), math.NewUintFromBigInt(tx.Value()), - pkg.ReceiveStatus_Success, + chains.ReceiveStatus_Success, chainID, tx.Nonce(), coinType, diff --git a/zetaclient/evm/evm_signer.go b/zetaclient/evm/evm_signer.go index a7b840f659..a3a492e4b6 100644 --- a/zetaclient/evm/evm_signer.go +++ b/zetaclient/evm/evm_signer.go @@ -21,6 +21,8 @@ import ( "github.com/rs/zerolog/log" "github.com/zeta-chain/protocol-contracts/pkg/contracts/evm/erc20custody.sol" "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" crosschainkeeper "github.com/zeta-chain/zetacore/x/crosschain/keeper" "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" @@ -37,7 +39,7 @@ import ( // Signer deals with the signing EVM transactions and implements the ChainSigner interface type Signer struct { client interfaces.EVMRPCClient - chain *pkg.Chain + chain *chains.Chain tssSigner interfaces.TSSSigner ethSigner ethtypes.Signer logger clientcommon.ClientLogger @@ -56,7 +58,7 @@ type Signer struct { var _ interfaces.ChainSigner = &Signer{} func NewEVMSigner( - chain pkg.Chain, + chain chains.Chain, endpoint string, tssSigner interfaces.TSSSigner, zetaConnectorABI string, @@ -343,7 +345,7 @@ func (signer *Signer) TryProcessOutTx( } // Get destination chain for logging - toChain := pkg.GetChainFromChainID(txData.toChainID.Int64()) + toChain := chains.GetChainFromChainID(txData.toChainID.Int64()) // Get cross-chain flags crossChainflags := signer.coreContext.GetCrossChainFlags() @@ -358,7 +360,7 @@ func (signer *Signer) TryProcessOutTx( logger.Warn().Err(err).Msg(SignerErrorMsg(cctx)) return } - } else if cctx.GetCurrentOutTxParam().CoinType == pkg.CoinType_Cmd { // admin command + } else if cctx.GetCurrentOutTxParam().CoinType == coin.CoinType_Cmd { // admin command to := ethcommon.HexToAddress(cctx.GetCurrentOutTxParam().Receiver) if to == (ethcommon.Address{}) { logger.Error().Msgf("invalid receiver %s", cctx.GetCurrentOutTxParam().Receiver) @@ -370,7 +372,7 @@ func (signer *Signer) TryProcessOutTx( return } // cmd field is used to determine whether to execute ERC20 whitelist or migrate TSS funds given that the coin type - // from the cctx is pkg.CoinType_Cmd + // from the cctx is coin.CoinType_Cmd cmd := msg[0] // params field is used to pass input parameters for command requests, currently it is used to pass the ERC20 // contract address when a whitelist command is requested @@ -382,13 +384,13 @@ func (signer *Signer) TryProcessOutTx( } } else if IsSenderZetaChain(cctx, zetaBridge, &crossChainflags) { switch cctx.GetCurrentOutTxParam().CoinType { - case pkg.CoinType_Gas: + case coin.CoinType_Gas: logger.Info().Msgf("SignWithdrawTx: %d => %s, nonce %d, gasPrice %d", cctx.InboundTxParams.SenderChainId, toChain, cctx.GetCurrentOutTxParam().OutboundTxTssNonce, txData.gasPrice) tx, err = signer.SignWithdrawTx(txData) - case pkg.CoinType_ERC20: + case coin.CoinType_ERC20: logger.Info().Msgf("SignERC20WithdrawTx: %d => %s, nonce %d, gasPrice %d", cctx.InboundTxParams.SenderChainId, toChain, cctx.GetCurrentOutTxParam().OutboundTxTssNonce, txData.gasPrice) tx, err = signer.SignERC20WithdrawTx(txData) - case pkg.CoinType_Zeta: + case coin.CoinType_Zeta: logger.Info().Msgf("SignOutboundTx: %d => %s, nonce %d, gasPrice %d", cctx.InboundTxParams.SenderChainId, toChain, cctx.GetCurrentOutTxParam().OutboundTxTssNonce, txData.gasPrice) tx, err = signer.SignOutboundTx(txData) } @@ -398,10 +400,10 @@ func (signer *Signer) TryProcessOutTx( } } else if cctx.CctxStatus.Status == types.CctxStatus_PendingRevert && cctx.OutboundTxParams[0].ReceiverChainId == zetaBridge.ZetaChain().ChainId { switch cctx.GetCurrentOutTxParam().CoinType { - case pkg.CoinType_Gas: + case coin.CoinType_Gas: logger.Info().Msgf("SignWithdrawTx: %d => %s, nonce %d, gasPrice %d", cctx.InboundTxParams.SenderChainId, toChain, cctx.GetCurrentOutTxParam().OutboundTxTssNonce, txData.gasPrice) tx, err = signer.SignWithdrawTx(txData) - case pkg.CoinType_ERC20: + case coin.CoinType_ERC20: logger.Info().Msgf("SignERC20WithdrawTx: %d => %s, nonce %d, gasPrice %d", cctx.InboundTxParams.SenderChainId, toChain, cctx.GetCurrentOutTxParam().OutboundTxTssNonce, txData.gasPrice) tx, err = signer.SignERC20WithdrawTx(txData) } @@ -443,7 +445,7 @@ func (signer *Signer) BroadcastOutTx( zetaBridge interfaces.ZetaCoreBridger, txData *OutBoundTransactionData) { // Get destination chain for logging - toChain := pkg.GetChainFromChainID(txData.toChainID.Int64()) + toChain := chains.GetChainFromChainID(txData.toChainID.Int64()) // Try to broadcast transaction if tx != nil { @@ -642,7 +644,7 @@ func (signer *Signer) EvmSigner() ethtypes.Signer { // getEVMRPC is a helper function to set up the client and signer, also initializes a mock client for unit tests func getEVMRPC(endpoint string) (interfaces.EVMRPCClient, ethtypes.Signer, error) { if endpoint == stub.EVMRPCEnabled { - chainID := big.NewInt(pkg.BscMainnetChain().ChainId) + chainID := big.NewInt(chains.BscMainnetChain().ChainId) ethSigner := ethtypes.NewEIP155Signer(chainID) client := &stub.MockEvmClient{} return client, ethSigner, nil diff --git a/zetaclient/evm/evm_signer_test.go b/zetaclient/evm/evm_signer_test.go index df897adb74..5f82d9bf91 100644 --- a/zetaclient/evm/evm_signer_test.go +++ b/zetaclient/evm/evm_signer_test.go @@ -9,6 +9,7 @@ import ( "github.com/rs/zerolog" "github.com/stretchr/testify/require" "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/crosschain/types" crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" @@ -35,7 +36,7 @@ func getNewEvmSigner() (*Signer, error) { ts := &metrics.TelemetryServer{} cfg := config.NewConfig() return NewEVMSigner( - pkg.BscMainnetChain(), + chains.BscMainnetChain(), stub.EVMRPCEnabled, stub.NewTSSMainnet(), config.GetConnectorABI(), @@ -53,8 +54,8 @@ func getNewEvmChainClient() (*ChainClient, error) { cfg := config.NewConfig() tss := stub.NewTSSMainnet() - evmcfg := config.EVMConfig{Chain: pkg.BscMainnetChain(), Endpoint: "http://localhost:8545"} - cfg.EVMChainConfigs[pkg.BscMainnetChain().ChainId] = evmcfg + evmcfg := config.EVMConfig{Chain: chains.BscMainnetChain(), Endpoint: "http://localhost:8545"} + cfg.EVMChainConfigs[chains.BscMainnetChain().ChainId] = evmcfg coreCTX := corecontext.NewZetaCoreContext(cfg) appCTX := appcontext.NewAppContext(coreCTX, cfg) diff --git a/zetaclient/evm/inbounds.go b/zetaclient/evm/inbounds.go index 27610f96bf..a8dee66c11 100644 --- a/zetaclient/evm/inbounds.go +++ b/zetaclient/evm/inbounds.go @@ -13,6 +13,8 @@ import ( "github.com/pkg/errors" "github.com/zeta-chain/protocol-contracts/pkg/contracts/evm/erc20custody.sol" "github.com/zeta-chain/protocol-contracts/pkg/contracts/evm/zetaconnector.non-eth.sol" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/zetaclient/compliance" "github.com/zeta-chain/zetacore/zetaclient/config" clienttypes "github.com/zeta-chain/zetacore/zetaclient/types" @@ -73,11 +75,11 @@ func (ob *ChainClient) ObserveIntxTrackers() error { // check and vote on inbound tx switch tracker.CoinType { - case pkg.CoinType_Zeta: + case coin.CoinType_Zeta: _, err = ob.CheckAndVoteInboundTokenZeta(tx, receipt, true) - case pkg.CoinType_ERC20: + case coin.CoinType_ERC20: _, err = ob.CheckAndVoteInboundTokenERC20(tx, receipt, true) - case pkg.CoinType_Gas: + case coin.CoinType_Gas: _, err = ob.CheckAndVoteInboundTokenGas(tx, receipt, true) default: return fmt.Errorf("unknown coin type %s for intx %s chain %d", tracker.CoinType, tx.Hash, ob.chain.ChainId) @@ -123,7 +125,7 @@ func (ob *ChainClient) CheckAndVoteInboundTokenZeta(tx *ethrpc.Transaction, rece return "", nil } if vote { - return ob.PostVoteInbound(msg, pkg.CoinType_Zeta, zetabridge.PostVoteInboundMessagePassingExecutionGasLimit) + return ob.PostVoteInbound(msg, coin.CoinType_Zeta, zetabridge.PostVoteInboundMessagePassingExecutionGasLimit) } return msg.Digest(), nil } @@ -164,7 +166,7 @@ func (ob *ChainClient) CheckAndVoteInboundTokenERC20(tx *ethrpc.Transaction, rec return "", nil } if vote { - return ob.PostVoteInbound(msg, pkg.CoinType_ERC20, zetabridge.PostVoteInboundExecutionGasLimit) + return ob.PostVoteInbound(msg, coin.CoinType_ERC20, zetabridge.PostVoteInboundExecutionGasLimit) } return msg.Digest(), nil } @@ -192,13 +194,13 @@ func (ob *ChainClient) CheckAndVoteInboundTokenGas(tx *ethrpc.Transaction, recei return "", nil } if vote { - return ob.PostVoteInbound(msg, pkg.CoinType_Gas, zetabridge.PostVoteInboundExecutionGasLimit) + return ob.PostVoteInbound(msg, coin.CoinType_Gas, zetabridge.PostVoteInboundExecutionGasLimit) } return msg.Digest(), nil } // PostVoteInbound posts a vote for the given vote message -func (ob *ChainClient) PostVoteInbound(msg *types.MsgVoteOnObservedInboundTx, coinType pkg.CoinType, retryGasLimit uint64) (string, error) { +func (ob *ChainClient) PostVoteInbound(msg *types.MsgVoteOnObservedInboundTx, coinType coin.CoinType, retryGasLimit uint64) (string, error) { txHash := msg.InTxHash chainID := ob.chain.ChainId zetaHash, ballot, err := ob.zetaClient.PostVoteInbound(zetabridge.PostVoteInboundGasLimit, retryGasLimit, msg) @@ -223,7 +225,7 @@ func (ob *ChainClient) HasEnoughConfirmations(receipt *ethtypes.Receipt, lastHei func (ob *ChainClient) BuildInboundVoteMsgForDepositedEvent(event *erc20custody.ERC20CustodyDeposited, sender ethcommon.Address) *types.MsgVoteOnObservedInboundTx { // compliance check maybeReceiver := "" - parsedAddress, _, err := pkg.ParseAddressAndData(hex.EncodeToString(event.Message)) + parsedAddress, _, err := chains.ParseAddressAndData(hex.EncodeToString(event.Message)) if err == nil && parsedAddress != (ethcommon.Address{}) { maybeReceiver = parsedAddress.Hex() } @@ -253,7 +255,7 @@ func (ob *ChainClient) BuildInboundVoteMsgForDepositedEvent(event *erc20custody. event.Raw.TxHash.Hex(), event.Raw.BlockNumber, 1_500_000, - pkg.CoinType_ERC20, + coin.CoinType_ERC20, event.Asset.String(), ob.zetaClient.GetKeys().GetOperatorAddress().String(), event.Raw.Index, @@ -262,7 +264,7 @@ func (ob *ChainClient) BuildInboundVoteMsgForDepositedEvent(event *erc20custody. // BuildInboundVoteMsgForZetaSentEvent builds a inbound vote message for a ZetaSent event func (ob *ChainClient) BuildInboundVoteMsgForZetaSentEvent(event *zetaconnector.ZetaConnectorNonEthZetaSent) *types.MsgVoteOnObservedInboundTx { - destChain := pkg.GetChainFromChainID(event.DestinationChainId.Int64()) + destChain := chains.GetChainFromChainID(event.DestinationChainId.Int64()) if destChain == nil { ob.logger.ExternalChainWatcher.Warn().Msgf("chain id not supported %d", event.DestinationChainId.Int64()) return nil @@ -304,7 +306,7 @@ func (ob *ChainClient) BuildInboundVoteMsgForZetaSentEvent(event *zetaconnector. event.Raw.TxHash.Hex(), event.Raw.BlockNumber, event.DestinationGasLimit.Uint64(), - pkg.CoinType_Zeta, + coin.CoinType_Zeta, "", ob.zetaClient.GetKeys().GetOperatorAddress().String(), event.Raw.Index, @@ -317,7 +319,7 @@ func (ob *ChainClient) BuildInboundVoteMsgForTokenSentToTSS(tx *ethrpc.Transacti // compliance check maybeReceiver := "" - parsedAddress, _, err := pkg.ParseAddressAndData(message) + parsedAddress, _, err := chains.ParseAddressAndData(message) if err == nil && parsedAddress != (ethcommon.Address{}) { maybeReceiver = parsedAddress.Hex() } @@ -348,7 +350,7 @@ func (ob *ChainClient) BuildInboundVoteMsgForTokenSentToTSS(tx *ethrpc.Transacti tx.Hash, blockNumber, 90_000, - pkg.CoinType_Gas, + coin.CoinType_Gas, "", ob.zetaClient.GetKeys().GetOperatorAddress().String(), 0, // not a smart contract call diff --git a/zetaclient/evm/inbounds_test.go b/zetaclient/evm/inbounds_test.go index 87d60e0436..e4625177e7 100644 --- a/zetaclient/evm/inbounds_test.go +++ b/zetaclient/evm/inbounds_test.go @@ -11,6 +11,8 @@ import ( "github.com/onrik/ethrpc" "github.com/stretchr/testify/require" "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" observertypes "github.com/zeta-chain/zetacore/x/observer/types" "github.com/zeta-chain/zetacore/zetaclient/config" "github.com/zeta-chain/zetacore/zetaclient/evm" @@ -22,7 +24,7 @@ import ( // MockEVMClient creates a mock ChainClient with custom chain, TSS, params etc func MockEVMClient( - chain pkg.Chain, + chain chains.Chain, evmClient interfaces.EVMRPCClient, evmJSONRPC interfaces.EVMJSONRPCClient, zetClient interfaces.ZetaCoreBridger, @@ -52,14 +54,14 @@ func MockEVMClient( func TestEVM_CheckAndVoteInboundTokenZeta(t *testing.T) { // load archived ZetaSent intx, receipt and cctx // https://etherscan.io/tx/0xf3935200c80f98502d5edc7e871ffc40ca898e134525c42c2ae3cbc5725f9d76 - chain := pkg.EthChain() + chain := chains.EthChain() confirmation := uint64(10) chainID := chain.ChainId chainParam := stub.MockChainParams(chain.ChainId, confirmation) intxHash := "0xf3935200c80f98502d5edc7e871ffc40ca898e134525c42c2ae3cbc5725f9d76" t.Run("should pass for archived intx, receipt and cctx", func(t *testing.T) { - tx, receipt, cctx := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, pkg.CoinType_Zeta) + tx, receipt, cctx := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, coin.CoinType_Zeta) require.NoError(t, evm.ValidateEvmTransaction(tx)) lastBlock := receipt.BlockNumber.Uint64() + confirmation @@ -69,7 +71,7 @@ func TestEVM_CheckAndVoteInboundTokenZeta(t *testing.T) { require.Equal(t, cctx.InboundTxParams.InboundTxBallotIndex, ballot) }) t.Run("should fail on unconfirmed intx", func(t *testing.T) { - tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, pkg.CoinType_Zeta) + tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, coin.CoinType_Zeta) require.NoError(t, evm.ValidateEvmTransaction(tx)) lastBlock := receipt.BlockNumber.Uint64() + confirmation - 1 @@ -78,7 +80,7 @@ func TestEVM_CheckAndVoteInboundTokenZeta(t *testing.T) { require.ErrorContains(t, err, "not been confirmed") }) t.Run("should not act if no ZetaSent event", func(t *testing.T) { - tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, pkg.CoinType_Zeta) + tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, coin.CoinType_Zeta) receipt.Logs = receipt.Logs[:2] // remove ZetaSent event require.NoError(t, evm.ValidateEvmTransaction(tx)) lastBlock := receipt.BlockNumber.Uint64() + confirmation @@ -89,7 +91,7 @@ func TestEVM_CheckAndVoteInboundTokenZeta(t *testing.T) { require.Equal(t, "", ballot) }) t.Run("should not act if emitter is not ZetaConnector", func(t *testing.T) { - tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, pkg.CoinType_Zeta) + tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, coin.CoinType_Zeta) require.NoError(t, evm.ValidateEvmTransaction(tx)) lastBlock := receipt.BlockNumber.Uint64() + confirmation @@ -103,14 +105,14 @@ func TestEVM_CheckAndVoteInboundTokenZeta(t *testing.T) { func TestEVM_CheckAndVoteInboundTokenERC20(t *testing.T) { // load archived ERC20 intx, receipt and cctx // https://etherscan.io/tx/0x4ea69a0e2ff36f7548ab75791c3b990e076e2a4bffeb616035b239b7d33843da - chain := pkg.EthChain() + chain := chains.EthChain() confirmation := uint64(10) chainID := chain.ChainId chainParam := stub.MockChainParams(chain.ChainId, confirmation) intxHash := "0x4ea69a0e2ff36f7548ab75791c3b990e076e2a4bffeb616035b239b7d33843da" t.Run("should pass for archived intx, receipt and cctx", func(t *testing.T) { - tx, receipt, cctx := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, pkg.CoinType_ERC20) + tx, receipt, cctx := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, coin.CoinType_ERC20) require.NoError(t, evm.ValidateEvmTransaction(tx)) lastBlock := receipt.BlockNumber.Uint64() + confirmation @@ -120,7 +122,7 @@ func TestEVM_CheckAndVoteInboundTokenERC20(t *testing.T) { require.Equal(t, cctx.InboundTxParams.InboundTxBallotIndex, ballot) }) t.Run("should fail on unconfirmed intx", func(t *testing.T) { - tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, pkg.CoinType_ERC20) + tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, coin.CoinType_ERC20) require.NoError(t, evm.ValidateEvmTransaction(tx)) lastBlock := receipt.BlockNumber.Uint64() + confirmation - 1 @@ -129,7 +131,7 @@ func TestEVM_CheckAndVoteInboundTokenERC20(t *testing.T) { require.ErrorContains(t, err, "not been confirmed") }) t.Run("should not act if no Deposit event", func(t *testing.T) { - tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, pkg.CoinType_ERC20) + tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, coin.CoinType_ERC20) receipt.Logs = receipt.Logs[:1] // remove Deposit event require.NoError(t, evm.ValidateEvmTransaction(tx)) lastBlock := receipt.BlockNumber.Uint64() + confirmation @@ -140,7 +142,7 @@ func TestEVM_CheckAndVoteInboundTokenERC20(t *testing.T) { require.Equal(t, "", ballot) }) t.Run("should not act if emitter is not ERC20 Custody", func(t *testing.T) { - tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, pkg.CoinType_ERC20) + tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, coin.CoinType_ERC20) require.NoError(t, evm.ValidateEvmTransaction(tx)) lastBlock := receipt.BlockNumber.Uint64() + confirmation @@ -154,14 +156,14 @@ func TestEVM_CheckAndVoteInboundTokenERC20(t *testing.T) { func TestEVM_CheckAndVoteInboundTokenGas(t *testing.T) { // load archived Gas intx, receipt and cctx // https://etherscan.io/tx/0xeaec67d5dd5d85f27b21bef83e01cbdf59154fd793ea7a22c297f7c3a722c532 - chain := pkg.EthChain() + chain := chains.EthChain() confirmation := uint64(10) chainID := chain.ChainId chainParam := stub.MockChainParams(chain.ChainId, confirmation) intxHash := "0xeaec67d5dd5d85f27b21bef83e01cbdf59154fd793ea7a22c297f7c3a722c532" t.Run("should pass for archived intx, receipt and cctx", func(t *testing.T) { - tx, receipt, cctx := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, pkg.CoinType_Gas) + tx, receipt, cctx := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, coin.CoinType_Gas) require.NoError(t, evm.ValidateEvmTransaction(tx)) lastBlock := receipt.BlockNumber.Uint64() + confirmation @@ -171,7 +173,7 @@ func TestEVM_CheckAndVoteInboundTokenGas(t *testing.T) { require.Equal(t, cctx.InboundTxParams.InboundTxBallotIndex, ballot) }) t.Run("should fail on unconfirmed intx", func(t *testing.T) { - tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, pkg.CoinType_Gas) + tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, coin.CoinType_Gas) require.NoError(t, evm.ValidateEvmTransaction(tx)) lastBlock := receipt.BlockNumber.Uint64() + confirmation - 1 @@ -180,7 +182,7 @@ func TestEVM_CheckAndVoteInboundTokenGas(t *testing.T) { require.ErrorContains(t, err, "not been confirmed") }) t.Run("should not act if receiver is not TSS", func(t *testing.T) { - tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, pkg.CoinType_Gas) + tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, coin.CoinType_Gas) tx.To = testutils.OtherAddress1 // use other address require.NoError(t, evm.ValidateEvmTransaction(tx)) lastBlock := receipt.BlockNumber.Uint64() + confirmation @@ -191,7 +193,7 @@ func TestEVM_CheckAndVoteInboundTokenGas(t *testing.T) { require.Equal(t, "", ballot) }) t.Run("should not act if transaction failed", func(t *testing.T) { - tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, pkg.CoinType_Gas) + tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, coin.CoinType_Gas) receipt.Status = ethtypes.ReceiptStatusFailed require.NoError(t, evm.ValidateEvmTransaction(tx)) lastBlock := receipt.BlockNumber.Uint64() + confirmation @@ -202,7 +204,7 @@ func TestEVM_CheckAndVoteInboundTokenGas(t *testing.T) { require.Equal(t, "", ballot) }) t.Run("should not act on nil message", func(t *testing.T) { - tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, pkg.CoinType_Gas) + tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, coin.CoinType_Gas) tx.Input = hex.EncodeToString([]byte(pkg.DonationMessage)) // donation will result in nil message require.NoError(t, evm.ValidateEvmTransaction(tx)) lastBlock := receipt.BlockNumber.Uint64() + confirmation @@ -218,10 +220,10 @@ func TestEVM_BuildInboundVoteMsgForZetaSentEvent(t *testing.T) { // load archived ZetaSent receipt // https://etherscan.io/tx/0xf3935200c80f98502d5edc7e871ffc40ca898e134525c42c2ae3cbc5725f9d76 chainID := int64(1) - chain := pkg.EthChain() + chain := chains.EthChain() intxHash := "0xf3935200c80f98502d5edc7e871ffc40ca898e134525c42c2ae3cbc5725f9d76" - receipt := testutils.LoadEVMIntxReceipt(t, chainID, intxHash, pkg.CoinType_Zeta) - cctx := testutils.LoadEVMIntxCctx(t, chainID, intxHash, pkg.CoinType_Zeta) + receipt := testutils.LoadEVMIntxReceipt(t, chainID, intxHash, coin.CoinType_Zeta) + cctx := testutils.LoadEVMIntxCctx(t, chainID, intxHash, coin.CoinType_Zeta) // parse ZetaSent event ob := MockEVMClient(chain, nil, nil, nil, nil, 1, stub.MockChainParams(1, 1)) @@ -264,11 +266,11 @@ func TestEVM_BuildInboundVoteMsgForZetaSentEvent(t *testing.T) { func TestEVM_BuildInboundVoteMsgForDepositedEvent(t *testing.T) { // load archived Deposited receipt // https://etherscan.io/tx/0x4ea69a0e2ff36f7548ab75791c3b990e076e2a4bffeb616035b239b7d33843da - chain := pkg.EthChain() + chain := chains.EthChain() chainID := chain.ChainId intxHash := "0x4ea69a0e2ff36f7548ab75791c3b990e076e2a4bffeb616035b239b7d33843da" - tx, receipt := testutils.LoadEVMIntxNReceipt(t, chainID, intxHash, pkg.CoinType_ERC20) - cctx := testutils.LoadEVMIntxCctx(t, chainID, intxHash, pkg.CoinType_ERC20) + tx, receipt := testutils.LoadEVMIntxNReceipt(t, chainID, intxHash, coin.CoinType_ERC20) + cctx := testutils.LoadEVMIntxCctx(t, chainID, intxHash, coin.CoinType_ERC20) // parse Deposited event ob := MockEVMClient(chain, nil, nil, nil, nil, 1, stub.MockChainParams(1, 1)) @@ -309,17 +311,17 @@ func TestEVM_BuildInboundVoteMsgForDepositedEvent(t *testing.T) { func TestEVM_BuildInboundVoteMsgForTokenSentToTSS(t *testing.T) { // load archived gas token transfer to TSS // https://etherscan.io/tx/0xeaec67d5dd5d85f27b21bef83e01cbdf59154fd793ea7a22c297f7c3a722c532 - chain := pkg.EthChain() + chain := chains.EthChain() chainID := chain.ChainId intxHash := "0xeaec67d5dd5d85f27b21bef83e01cbdf59154fd793ea7a22c297f7c3a722c532" - tx, receipt := testutils.LoadEVMIntxNReceipt(t, chainID, intxHash, pkg.CoinType_Gas) + tx, receipt := testutils.LoadEVMIntxNReceipt(t, chainID, intxHash, coin.CoinType_Gas) require.NoError(t, evm.ValidateEvmTransaction(tx)) - cctx := testutils.LoadEVMIntxCctx(t, chainID, intxHash, pkg.CoinType_Gas) + cctx := testutils.LoadEVMIntxCctx(t, chainID, intxHash, coin.CoinType_Gas) // load archived gas token donation to TSS // https://etherscan.io/tx/0x52f214cf7b10be71f4d274193287d47bc9632b976e69b9d2cdeb527c2ba32155 inTxHashDonation := "0x52f214cf7b10be71f4d274193287d47bc9632b976e69b9d2cdeb527c2ba32155" - txDonation, receiptDonation := testutils.LoadEVMIntxNReceiptDonation(t, chainID, inTxHashDonation, pkg.CoinType_Gas) + txDonation, receiptDonation := testutils.LoadEVMIntxNReceiptDonation(t, chainID, inTxHashDonation, coin.CoinType_Gas) require.NoError(t, evm.ValidateEvmTransaction(txDonation)) // create test compliance config @@ -358,14 +360,14 @@ func TestEVM_BuildInboundVoteMsgForTokenSentToTSS(t *testing.T) { func TestEVM_ObserveTSSReceiveInBlock(t *testing.T) { // https://etherscan.io/tx/0xeaec67d5dd5d85f27b21bef83e01cbdf59154fd793ea7a22c297f7c3a722c532 - chain := pkg.EthChain() + chain := chains.EthChain() chainID := chain.ChainId confirmation := uint64(1) chainParam := stub.MockChainParams(chain.ChainId, confirmation) intxHash := "0xeaec67d5dd5d85f27b21bef83e01cbdf59154fd793ea7a22c297f7c3a722c532" // load archived tx and receipt - tx, receipt := testutils.LoadEVMIntxNReceipt(t, chainID, intxHash, pkg.CoinType_Gas) + tx, receipt := testutils.LoadEVMIntxNReceipt(t, chainID, intxHash, coin.CoinType_Gas) require.NoError(t, evm.ValidateEvmTransaction(tx)) // load archived evm block diff --git a/zetaclient/evm/outbound_transaction_data.go b/zetaclient/evm/outbound_transaction_data.go index c4bc9749b3..0255c1c525 100644 --- a/zetaclient/evm/outbound_transaction_data.go +++ b/zetaclient/evm/outbound_transaction_data.go @@ -10,7 +10,8 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" "github.com/rs/zerolog" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/x/crosschain/types" "github.com/zeta-chain/zetacore/zetaclient/interfaces" ) @@ -66,7 +67,7 @@ func (txData *OutBoundTransactionData) SetupGas( cctx *types.CrossChainTx, logger zerolog.Logger, client interfaces.EVMRPCClient, - chain *pkg.Chain, + chain *chains.Chain, ) error { txData.gasLimit = cctx.GetCurrentOutTxParam().OutboundTxGasLimit @@ -85,7 +86,7 @@ func (txData *OutBoundTransactionData) SetupGas( // we should possibly remove it completely and return an error if no OutboundTxGasPrice is provided because it means no fee is processed on ZetaChain specified, ok := new(big.Int).SetString(cctx.GetCurrentOutTxParam().OutboundTxGasPrice, 10) if !ok { - if pkg.IsEthereumChain(chain.ChainId) { + if chains.IsEthereumChain(chain.ChainId) { suggested, err := client.SuggestGasPrice(context.Background()) if err != nil { return errors.Join(err, fmt.Errorf("cannot get gas price from chain %s ", chain)) @@ -127,7 +128,7 @@ func NewOutBoundTransactionData( return nil, true, nil } - toChain := pkg.GetChainFromChainID(txData.toChainID.Int64()) + toChain := chains.GetChainFromChainID(txData.toChainID.Int64()) if toChain == nil { return nil, true, fmt.Errorf("unknown chain: %d", txData.toChainID.Int64()) } @@ -169,7 +170,7 @@ func NewOutBoundTransactionData( } // Base64 decode message - if cctx.GetCurrentOutTxParam().CoinType != pkg.CoinType_Cmd { + if cctx.GetCurrentOutTxParam().CoinType != coin.CoinType_Cmd { txData.message, err = base64.StdEncoding.DecodeString(cctx.RelayedMessage) if err != nil { logger.Err(err).Msgf("decode CCTX.Message %s error", cctx.RelayedMessage) diff --git a/zetaclient/evm/outbound_transaction_data_test.go b/zetaclient/evm/outbound_transaction_data_test.go index ebe6d84169..8943091157 100644 --- a/zetaclient/evm/outbound_transaction_data_test.go +++ b/zetaclient/evm/outbound_transaction_data_test.go @@ -7,7 +7,7 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" "github.com/rs/zerolog" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/x/crosschain/types" ) @@ -55,14 +55,14 @@ func TestSigner_SetupGas(t *testing.T) { logger := zerolog.Logger{} t.Run("SetupGas_success", func(t *testing.T) { - chain := pkg.BscMainnetChain() + chain := chains.BscMainnetChain() err := txData.SetupGas(cctx, logger, evmSigner.EvmClient(), &chain) require.NoError(t, err) }) t.Run("SetupGas_error", func(t *testing.T) { cctx.GetCurrentOutTxParam().OutboundTxGasPrice = "invalidGasPrice" - chain := pkg.BscMainnetChain() + chain := chains.BscMainnetChain() err := txData.SetupGas(cctx, logger, evmSigner.EvmClient(), &chain) require.ErrorContains(t, err, "cannot convert gas price") }) diff --git a/zetaclient/evm/validation_test.go b/zetaclient/evm/validation_test.go index 9995fbc123..61075b1025 100644 --- a/zetaclient/evm/validation_test.go +++ b/zetaclient/evm/validation_test.go @@ -9,7 +9,7 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/onrik/ethrpc" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/zetaclient/testutils" ) @@ -117,7 +117,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { }{ { name: "should pass for valid transaction", - tx: testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas), + tx: testutils.LoadEVMIntx(t, chainID, intxHash, coin.CoinType_Gas), fail: false, }, { @@ -129,7 +129,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { { name: "should fail for empty hash", tx: func() *ethrpc.Transaction { - tx := testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, chainID, intxHash, coin.CoinType_Gas) tx.Hash = "" return tx }(), @@ -139,7 +139,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { { name: "should fail for negative nonce", tx: func() *ethrpc.Transaction { - tx := testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, chainID, intxHash, coin.CoinType_Gas) tx.Nonce = -1 return tx }(), @@ -149,7 +149,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { { name: "should fail for empty from address", tx: func() *ethrpc.Transaction { - tx := testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, chainID, intxHash, coin.CoinType_Gas) tx.From = "" return tx }(), @@ -159,7 +159,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { { name: "should fail for invalid from address", tx: func() *ethrpc.Transaction { - tx := testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, chainID, intxHash, coin.CoinType_Gas) tx.From = "0x" return tx }(), @@ -169,7 +169,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { { name: "should pass for empty to address", tx: func() *ethrpc.Transaction { - tx := testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, chainID, intxHash, coin.CoinType_Gas) tx.To = "" return tx }(), @@ -178,7 +178,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { { name: "should fail for invalid to address", tx: func() *ethrpc.Transaction { - tx := testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, chainID, intxHash, coin.CoinType_Gas) tx.To = "0xinvalid" return tx }(), @@ -188,7 +188,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { { name: "should fail for negative value", tx: func() *ethrpc.Transaction { - tx := testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, chainID, intxHash, coin.CoinType_Gas) tx.Value = *big.NewInt(-1) return tx }(), @@ -198,7 +198,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { { name: "should fail for negative gas", tx: func() *ethrpc.Transaction { - tx := testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, chainID, intxHash, coin.CoinType_Gas) tx.Gas = -1 return tx }(), @@ -208,7 +208,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { { name: "should fail for negative gas price", tx: func() *ethrpc.Transaction { - tx := testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, chainID, intxHash, coin.CoinType_Gas) tx.GasPrice = *big.NewInt(-1) return tx }(), @@ -218,7 +218,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { { name: "should remove '0x' prefix from input data", tx: func() *ethrpc.Transaction { - tx := testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, chainID, intxHash, coin.CoinType_Gas) return tx }(), fail: false, @@ -226,7 +226,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { { name: "nil block number should pass", tx: func() *ethrpc.Transaction { - tx := testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, chainID, intxHash, coin.CoinType_Gas) tx.BlockNumber = nil return tx }(), @@ -235,7 +235,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { { name: "should fail for negative block number", tx: func() *ethrpc.Transaction { - tx := testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, chainID, intxHash, coin.CoinType_Gas) negBlockNumber := -1 tx.BlockNumber = &negBlockNumber return tx @@ -246,7 +246,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { { name: "should fail for empty block hash", tx: func() *ethrpc.Transaction { - tx := testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, chainID, intxHash, coin.CoinType_Gas) tx.BlockHash = "" return tx }(), @@ -256,7 +256,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { { name: "nil transaction index should fail", tx: func() *ethrpc.Transaction { - tx := testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, chainID, intxHash, coin.CoinType_Gas) tx.TransactionIndex = nil return tx }(), @@ -266,7 +266,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { { name: "should fail for negative transaction index", tx: func() *ethrpc.Transaction { - tx := testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, chainID, intxHash, coin.CoinType_Gas) negTransactionIndex := -1 tx.TransactionIndex = &negTransactionIndex return tx @@ -277,7 +277,7 @@ func TestCheckEvmTransactionTable(t *testing.T) { { name: "should fail for invalid input data", tx: func() *ethrpc.Transaction { - tx := testutils.LoadEVMIntx(t, chainID, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, chainID, intxHash, coin.CoinType_Gas) tx.Input = "03befinvalid" return tx }(), @@ -304,7 +304,7 @@ func TestCheckEvmTransaction(t *testing.T) { intxHash := "0xeaec67d5dd5d85f27b21bef83e01cbdf59154fd793ea7a22c297f7c3a722c532" t.Run("should pass for valid transaction", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, coin.CoinType_Gas) err := ValidateEvmTransaction(tx) require.NoError(t, err) }) @@ -313,99 +313,99 @@ func TestCheckEvmTransaction(t *testing.T) { require.ErrorContains(t, err, "transaction is nil") }) t.Run("should fail for empty hash", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, coin.CoinType_Gas) tx.Hash = "" err := ValidateEvmTransaction(tx) require.ErrorContains(t, err, "hash is empty") }) t.Run("should fail for negative nonce", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, coin.CoinType_Gas) tx.Nonce = -1 err := ValidateEvmTransaction(tx) require.ErrorContains(t, err, "nonce -1 is negative") }) t.Run("should fail for empty from address", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, coin.CoinType_Gas) tx.From = "" err := ValidateEvmTransaction(tx) require.ErrorContains(t, err, "not a valid hex address") }) t.Run("should fail for invalid from address", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, coin.CoinType_Gas) tx.From = "0x" err := ValidateEvmTransaction(tx) require.ErrorContains(t, err, "from 0x is not a valid hex address") }) t.Run("should pass for empty to address", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, coin.CoinType_Gas) tx.To = "" err := ValidateEvmTransaction(tx) require.NoError(t, err) }) t.Run("should fail for invalid to address", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, coin.CoinType_Gas) tx.To = "0xinvalid" err := ValidateEvmTransaction(tx) require.ErrorContains(t, err, "to 0xinvalid is not a valid hex address") }) t.Run("should fail for negative value", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, coin.CoinType_Gas) tx.Value = *big.NewInt(-1) err := ValidateEvmTransaction(tx) require.ErrorContains(t, err, "value -1 is negative") }) t.Run("should fail for negative gas", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, coin.CoinType_Gas) tx.Gas = -1 err := ValidateEvmTransaction(tx) require.ErrorContains(t, err, "gas -1 is negative") }) t.Run("should fail for negative gas price", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, coin.CoinType_Gas) tx.GasPrice = *big.NewInt(-1) err := ValidateEvmTransaction(tx) require.ErrorContains(t, err, "gas price -1 is negative") }) t.Run("should remove '0x' prefix from input data", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, coin.CoinType_Gas) err := ValidateEvmTransaction(tx) require.NoError(t, err) require.Equal(t, "", tx.Input) }) t.Run("nil block number should pass", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, coin.CoinType_Gas) tx.BlockNumber = nil err := ValidateEvmTransaction(tx) require.NoError(t, err) }) t.Run("should fail for negative block number", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, coin.CoinType_Gas) negBlockNumber := -1 tx.BlockNumber = &negBlockNumber err := ValidateEvmTransaction(tx) require.ErrorContains(t, err, "block number -1 is not positive") }) t.Run("should fail for empty block hash", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, coin.CoinType_Gas) tx.BlockHash = "" err := ValidateEvmTransaction(tx) require.ErrorContains(t, err, "block hash is empty") }) t.Run("nil transaction index should fail", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, coin.CoinType_Gas) tx.TransactionIndex = nil err := ValidateEvmTransaction(tx) require.ErrorContains(t, err, "index is nil") }) t.Run("should fail for negative transaction index", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, coin.CoinType_Gas) negTransactionIndex := -1 tx.TransactionIndex = &negTransactionIndex err := ValidateEvmTransaction(tx) require.ErrorContains(t, err, "index -1 is negative") }) t.Run("should fail for invalid input data", func(t *testing.T) { - tx := testutils.LoadEVMIntx(t, 1, intxHash, pkg.CoinType_Gas) + tx := testutils.LoadEVMIntx(t, 1, intxHash, coin.CoinType_Gas) tx.Input = "03befinvalid" err := ValidateEvmTransaction(tx) require.ErrorContains(t, err, "input data is not hex encoded") diff --git a/zetaclient/interfaces/interfaces.go b/zetaclient/interfaces/interfaces.go index ab827df773..75242ab17d 100644 --- a/zetaclient/interfaces/interfaces.go +++ b/zetaclient/interfaces/interfaces.go @@ -5,6 +5,9 @@ import ( "math/big" "github.com/onrik/ethrpc" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" + "github.com/zeta-chain/zetacore/pkg/proofs" "github.com/zeta-chain/zetacore/zetaclient/keys" "github.com/zeta-chain/zetacore/zetaclient/outtxprocessor" @@ -20,7 +23,6 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/rs/zerolog" "github.com/zeta-chain/go-tss/blame" - "github.com/zeta-chain/zetacore/pkg" crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -71,13 +73,13 @@ type ZetaCoreBridger interface { outTxEffectiveGasPrice *big.Int, outTxEffectiveGasLimit uint64, amount *big.Int, - status pkg.ReceiveStatus, - chain pkg.Chain, + status chains.ReceiveStatus, + chain chains.Chain, nonce uint64, - coinType pkg.CoinType, + coinType coin.CoinType, ) (string, string, error) - PostGasPrice(chain pkg.Chain, gasPrice uint64, supply string, blockNum uint64) (string, error) - PostAddBlockHeader(chainID int64, txhash []byte, height int64, header pkg.HeaderData) (string, error) + PostGasPrice(chain chains.Chain, gasPrice uint64, supply string, blockNum uint64) (string, error) + PostAddBlockHeader(chainID int64, txhash []byte, height int64, header proofs.HeaderData) (string, error) GetBlockHeaderStateByChain(chainID int64) (observertypes.QueryGetBlockHeaderStateResponse, error) PostBlameData(blame *blame.Blame, chainID int64, index string) (string, error) @@ -85,18 +87,18 @@ type ZetaCoreBridger interface { chainID int64, nonce uint64, txHash string, - proof *pkg.Proof, + proof *proofs.Proof, blockHash string, txIndex int64, ) (string, error) GetKeys() *keys.Keys GetBlockHeight() (int64, error) GetZetaBlockHeight() (int64, error) - GetLastBlockHeightByChain(chain pkg.Chain) (*crosschaintypes.LastBlockHeight, error) + GetLastBlockHeightByChain(chain chains.Chain) (*crosschaintypes.LastBlockHeight, error) ListPendingCctx(chainID int64) ([]*crosschaintypes.CrossChainTx, uint64, error) GetPendingNoncesByChain(chainID int64) (observertypes.PendingNonces, error) GetCctxByNonce(chainID int64, nonce uint64) (*crosschaintypes.CrossChainTx, error) - GetOutTxTracker(chain pkg.Chain, nonce uint64) (*crosschaintypes.OutTxTracker, error) + GetOutTxTracker(chain chains.Chain, nonce uint64) (*crosschaintypes.OutTxTracker, error) GetAllOutTxTrackerByChain(chainID int64, order Order) ([]crosschaintypes.OutTxTracker, error) GetCrosschainFlags() (observertypes.CrosschainFlags, error) GetObserverList() ([]string, error) @@ -104,7 +106,7 @@ type ZetaCoreBridger interface { GetBtcTssAddress(chainID int64) (string, error) GetInboundTrackersForChain(chainID int64) ([]crosschaintypes.InTxTracker, error) GetLogger() *zerolog.Logger - ZetaChain() pkg.Chain + ZetaChain() chains.Chain Pause() Unpause() GetZetaHotKeyBalance() (sdkmath.Int, error) diff --git a/zetaclient/interfaces/signer.go b/zetaclient/interfaces/signer.go index aaa4ad71df..461902359c 100644 --- a/zetaclient/interfaces/signer.go +++ b/zetaclient/interfaces/signer.go @@ -4,7 +4,7 @@ import ( "crypto/ecdsa" "fmt" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/chaincfg" @@ -17,7 +17,7 @@ import ( type TSSSigner interface { Pubkey() []byte // Sign: Specify optionalPubkey to use a different pubkey than the current pubkey set during keygen - Sign(data []byte, height uint64, nonce uint64, chain *pkg.Chain, optionalPubkey string) ([65]byte, error) + Sign(data []byte, height uint64, nonce uint64, chain *chains.Chain, optionalPubkey string) ([65]byte, error) EVMAddress() ethcommon.Address BTCAddress() string BTCAddressWitnessPubkeyHash() *btcutil.AddressWitnessPubKeyHash @@ -31,7 +31,7 @@ type TestSigner struct { PrivKey *ecdsa.PrivateKey } -func (s TestSigner) Sign(digest []byte, _ uint64, _ uint64, _ *pkg.Chain, _ string) ([65]byte, error) { +func (s TestSigner) Sign(digest []byte, _ uint64, _ uint64, _ *chains.Chain, _ string) ([65]byte, error) { sig, err := crypto.Sign(digest, s.PrivKey) if err != nil { return [65]byte{}, err diff --git a/zetaclient/keys/keys.go b/zetaclient/keys/keys.go index 0396f87e90..0f028474e5 100644 --- a/zetaclient/keys/keys.go +++ b/zetaclient/keys/keys.go @@ -15,8 +15,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/rs/zerolog/log" "github.com/zeta-chain/zetacore/cmd" - "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/pkg/cosmos" + zetacrypto "github.com/zeta-chain/zetacore/pkg/crypto" "github.com/zeta-chain/zetacore/zetaclient/config" zetaerrors "github.com/zeta-chain/zetacore/zetaclient/errors" ) @@ -78,7 +78,7 @@ func GetKeyringKeybase(cfg config.Config, hotkeyPassword string) (ckeys.Keyring, return nil, "", fmt.Errorf("key not in backend %s present with name (%s): %w", kb.Backend(), granteeName, err) } - pubkeyBech32, err := pkg.GetPubkeyBech32FromRecord(rc) + pubkeyBech32, err := zetacrypto.GetPubkeyBech32FromRecord(rc) if err != nil { return nil, "", fmt.Errorf("fail to get pubkey from record,err:%w", err) } @@ -151,8 +151,8 @@ func (k *Keys) GetKeybase() ckeys.Keyring { return k.kb } -func (k *Keys) GetPubKeySet(password string) (pkg.PubKeySet, error) { - pubkeySet := pkg.PubKeySet{ +func (k *Keys) GetPubKeySet(password string) (zetacrypto.PubKeySet, error) { + pubkeySet := zetacrypto.PubKeySet{ Secp256k1: "", Ed25519: "", } @@ -166,7 +166,7 @@ func (k *Keys) GetPubKeySet(password string) (pkg.PubKeySet, error) { if err != nil { return pubkeySet, zetaerrors.ErrBech32ifyPubKey } - pubkey, err := pkg.NewPubKey(s) + pubkey, err := zetacrypto.NewPubKey(s) if err != nil { return pubkeySet, zetaerrors.ErrNewPubKey } diff --git a/zetaclient/supplychecker/zeta_supply_checker.go b/zetaclient/supplychecker/zeta_supply_checker.go index bd9cb86046..2168c5483e 100644 --- a/zetaclient/supplychecker/zeta_supply_checker.go +++ b/zetaclient/supplychecker/zeta_supply_checker.go @@ -15,7 +15,8 @@ import ( "github.com/ethereum/go-ethereum/ethclient" "github.com/pkg/errors" "github.com/rs/zerolog" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/x/crosschain/types" corecontext "github.com/zeta-chain/zetacore/zetaclient/core_context" clienttypes "github.com/zeta-chain/zetacore/zetaclient/types" @@ -28,8 +29,8 @@ type ZetaSupplyChecker struct { ticker *clienttypes.DynamicTicker stop chan struct{} logger zerolog.Logger - externalEvmChain []pkg.Chain - ethereumChain pkg.Chain + externalEvmChain []chains.Chain + ethereumChain chains.Chain genesisSupply sdkmath.Int } @@ -61,11 +62,11 @@ func NewZetaSupplyChecker(appContext *appcontext.AppContext, zetaClient *zetabri } for chainID := range zetaSupplyChecker.evmClient { - chain := pkg.GetChainFromChainID(chainID) - if chain.IsExternalChain() && pkg.IsEVMChain(chain.ChainId) && !pkg.IsEthereumChain(chain.ChainId) { + chain := chains.GetChainFromChainID(chainID) + if chain.IsExternalChain() && chains.IsEVMChain(chain.ChainId) && !chains.IsEthereumChain(chain.ChainId) { zetaSupplyChecker.externalEvmChain = append(zetaSupplyChecker.externalEvmChain, *chain) } - if pkg.IsEthereumChain(chain.ChainId) { + if chains.IsEthereumChain(chain.ChainId) { zetaSupplyChecker.ethereumChain = *chain } } @@ -224,7 +225,7 @@ func (zs *ZetaSupplyChecker) AbortedTxAmount() (sdkmath.Int, error) { } func (zs *ZetaSupplyChecker) GetAmountOfZetaInTransit() sdkmath.Int { - chainsToCheck := make([]pkg.Chain, len(zs.externalEvmChain)+1) + chainsToCheck := make([]chains.Chain, len(zs.externalEvmChain)+1) chainsToCheck = append(append(chainsToCheck, zs.externalEvmChain...), zs.ethereumChain) cctxs := zs.GetPendingCCTXInTransit(chainsToCheck) amount := sdkmath.ZeroUint() @@ -237,7 +238,7 @@ func (zs *ZetaSupplyChecker) GetAmountOfZetaInTransit() sdkmath.Int { } return amountInt } -func (zs *ZetaSupplyChecker) GetPendingCCTXInTransit(receivingChains []pkg.Chain) []*types.CrossChainTx { +func (zs *ZetaSupplyChecker) GetPendingCCTXInTransit(receivingChains []chains.Chain) []*types.CrossChainTx { cctxInTransit := make([]*types.CrossChainTx, 0) for _, chain := range receivingChains { cctx, _, err := zs.zetaClient.ListPendingCctx(chain.ChainId) @@ -246,7 +247,7 @@ func (zs *ZetaSupplyChecker) GetPendingCCTXInTransit(receivingChains []pkg.Chain } nonceToCctxMap := make(map[uint64]*types.CrossChainTx) for _, c := range cctx { - if c.GetInboundTxParams().CoinType == pkg.CoinType_Zeta { + if c.GetInboundTxParams().CoinType == coin.CoinType_Zeta { nonceToCctxMap[c.GetCurrentOutTxParam().OutboundTxTssNonce] = c } } diff --git a/zetaclient/testutils/stub/chain_signer.go b/zetaclient/testutils/stub/chain_signer.go index e659a16278..487452cea7 100644 --- a/zetaclient/testutils/stub/chain_signer.go +++ b/zetaclient/testutils/stub/chain_signer.go @@ -2,7 +2,7 @@ package stub import ( ethcommon "github.com/ethereum/go-ethereum/common" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" "github.com/zeta-chain/zetacore/zetaclient/interfaces" "github.com/zeta-chain/zetacore/zetaclient/outtxprocessor" @@ -15,13 +15,13 @@ var _ interfaces.ChainSigner = (*EVMSigner)(nil) // EVMSigner is a mock of evm chain signer for testing type EVMSigner struct { - Chain pkg.Chain + Chain chains.Chain ZetaConnectorAddress ethcommon.Address ERC20CustodyAddress ethcommon.Address } func NewEVMSigner( - chain pkg.Chain, + chain chains.Chain, zetaConnectorAddress ethcommon.Address, erc20CustodyAddress ethcommon.Address, ) *EVMSigner { diff --git a/zetaclient/testutils/stub/core_bridge.go b/zetaclient/testutils/stub/core_bridge.go index 337a7b8e00..111d73983a 100644 --- a/zetaclient/testutils/stub/core_bridge.go +++ b/zetaclient/testutils/stub/core_bridge.go @@ -7,7 +7,9 @@ import ( "cosmossdk.io/math" "github.com/rs/zerolog" "github.com/zeta-chain/go-tss/blame" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/coin" + "github.com/zeta-chain/zetacore/pkg/proofs" cctxtypes "github.com/zeta-chain/zetacore/x/crosschain/types" observerTypes "github.com/zeta-chain/zetacore/x/observer/types" "github.com/zeta-chain/zetacore/zetaclient/interfaces" @@ -21,11 +23,11 @@ var _ interfaces.ZetaCoreBridger = &MockZetaCoreBridge{} type MockZetaCoreBridge struct { paused bool - zetaChain pkg.Chain + zetaChain chains.Chain } func NewMockZetaCoreBridge() *MockZetaCoreBridge { - zetaChain, err := pkg.ZetaChainFromChainID("zetachain_7000-1") + zetaChain, err := chains.ZetaChainFromChainID("zetachain_7000-1") if err != nil { panic(err) } @@ -42,21 +44,21 @@ func (z *MockZetaCoreBridge) PostVoteInbound(_, _ uint64, _ *cctxtypes.MsgVoteOn return "", "", nil } -func (z *MockZetaCoreBridge) PostVoteOutbound(_ string, _ string, _ uint64, _ uint64, _ *big.Int, _ uint64, _ *big.Int, _ pkg.ReceiveStatus, _ pkg.Chain, _ uint64, _ pkg.CoinType) (string, string, error) { +func (z *MockZetaCoreBridge) PostVoteOutbound(_ string, _ string, _ uint64, _ uint64, _ *big.Int, _ uint64, _ *big.Int, _ chains.ReceiveStatus, _ chains.Chain, _ uint64, _ coin.CoinType) (string, string, error) { if z.paused { return "", "", errors.New(ErrMsgPaused) } return "", "", nil } -func (z *MockZetaCoreBridge) PostGasPrice(_ pkg.Chain, _ uint64, _ string, _ uint64) (string, error) { +func (z *MockZetaCoreBridge) PostGasPrice(_ chains.Chain, _ uint64, _ string, _ uint64) (string, error) { if z.paused { return "", errors.New(ErrMsgPaused) } return "", nil } -func (z *MockZetaCoreBridge) PostAddBlockHeader(_ int64, _ []byte, _ int64, _ pkg.HeaderData) (string, error) { +func (z *MockZetaCoreBridge) PostAddBlockHeader(_ int64, _ []byte, _ int64, _ proofs.HeaderData) (string, error) { if z.paused { return "", errors.New(ErrMsgPaused) } @@ -77,7 +79,7 @@ func (z *MockZetaCoreBridge) PostBlameData(_ *blame.Blame, _ int64, _ string) (s return "", nil } -func (z *MockZetaCoreBridge) AddTxHashToOutTxTracker(_ int64, _ uint64, _ string, _ *pkg.Proof, _ string, _ int64) (string, error) { +func (z *MockZetaCoreBridge) AddTxHashToOutTxTracker(_ int64, _ uint64, _ string, _ *proofs.Proof, _ string, _ int64) (string, error) { if z.paused { return "", errors.New(ErrMsgPaused) } @@ -102,7 +104,7 @@ func (z *MockZetaCoreBridge) GetZetaBlockHeight() (int64, error) { return 0, nil } -func (z *MockZetaCoreBridge) GetLastBlockHeightByChain(_ pkg.Chain) (*cctxtypes.LastBlockHeight, error) { +func (z *MockZetaCoreBridge) GetLastBlockHeightByChain(_ chains.Chain) (*cctxtypes.LastBlockHeight, error) { if z.paused { return nil, errors.New(ErrMsgPaused) } @@ -130,7 +132,7 @@ func (z *MockZetaCoreBridge) GetCctxByNonce(_ int64, _ uint64) (*cctxtypes.Cross return &cctxtypes.CrossChainTx{}, nil } -func (z *MockZetaCoreBridge) GetOutTxTracker(_ pkg.Chain, _ uint64) (*cctxtypes.OutTxTracker, error) { +func (z *MockZetaCoreBridge) GetOutTxTracker(_ chains.Chain, _ uint64) (*cctxtypes.OutTxTracker, error) { if z.paused { return nil, errors.New(ErrMsgPaused) } @@ -183,7 +185,7 @@ func (z *MockZetaCoreBridge) GetLogger() *zerolog.Logger { return nil } -func (z *MockZetaCoreBridge) ZetaChain() pkg.Chain { +func (z *MockZetaCoreBridge) ZetaChain() chains.Chain { return z.zetaChain } diff --git a/zetaclient/testutils/stub/tss_signer.go b/zetaclient/testutils/stub/tss_signer.go index 6f58466297..5270618df0 100644 --- a/zetaclient/testutils/stub/tss_signer.go +++ b/zetaclient/testutils/stub/tss_signer.go @@ -7,7 +7,7 @@ import ( "github.com/btcsuite/btcutil" ethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/zetaclient/interfaces" "github.com/zeta-chain/zetacore/zetaclient/testutils" ) @@ -46,7 +46,7 @@ func NewTSSAthens3() *TSS { } // Sign uses test key unrelated to any tss key in production -func (s *TSS) Sign(data []byte, _ uint64, _ uint64, _ *pkg.Chain, _ string) ([65]byte, error) { +func (s *TSS) Sign(data []byte, _ uint64, _ uint64, _ *chains.Chain, _ string) ([65]byte, error) { signature, err := crypto.Sign(data, TestPrivateKey) if err != nil { return [65]byte{}, err diff --git a/zetaclient/testutils/testdata.go b/zetaclient/testutils/testdata.go index 641e4d824d..c8d5788d8d 100644 --- a/zetaclient/testutils/testdata.go +++ b/zetaclient/testutils/testdata.go @@ -11,7 +11,7 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/onrik/ethrpc" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/coin" crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" "github.com/zeta-chain/zetacore/zetaclient/config" ) @@ -106,7 +106,7 @@ func LoadEVMIntx( t *testing.T, chainID int64, intxHash string, - coinType pkg.CoinType) *ethrpc.Transaction { + coinType coin.CoinType) *ethrpc.Transaction { nameTx := path.Join("../", TestDataPathEVM, FileNameEVMIntx(chainID, intxHash, coinType, false)) tx := ðrpc.Transaction{} @@ -120,7 +120,7 @@ func LoadEVMIntxReceipt( t *testing.T, chainID int64, intxHash string, - coinType pkg.CoinType) *ethtypes.Receipt { + coinType coin.CoinType) *ethtypes.Receipt { nameReceipt := path.Join("../", TestDataPathEVM, FileNameEVMIntxReceipt(chainID, intxHash, coinType, false)) receipt := ðtypes.Receipt{} @@ -134,7 +134,7 @@ func LoadEVMIntxCctx( t *testing.T, chainID int64, intxHash string, - coinType pkg.CoinType) *crosschaintypes.CrossChainTx { + coinType coin.CoinType) *crosschaintypes.CrossChainTx { nameCctx := path.Join("../", TestDataPathCctx, FileNameEVMIntxCctx(chainID, intxHash, coinType)) cctx := &crosschaintypes.CrossChainTx{} @@ -161,7 +161,7 @@ func LoadEVMIntxNReceipt( t *testing.T, chainID int64, intxHash string, - coinType pkg.CoinType) (*ethrpc.Transaction, *ethtypes.Receipt) { + coinType coin.CoinType) (*ethrpc.Transaction, *ethtypes.Receipt) { // load archived intx and receipt tx := LoadEVMIntx(t, chainID, intxHash, coinType) receipt := LoadEVMIntxReceipt(t, chainID, intxHash, coinType) @@ -174,7 +174,7 @@ func LoadEVMIntxDonation( t *testing.T, chainID int64, intxHash string, - coinType pkg.CoinType) *ethrpc.Transaction { + coinType coin.CoinType) *ethrpc.Transaction { nameTx := path.Join("../", TestDataPathEVM, FileNameEVMIntx(chainID, intxHash, coinType, true)) tx := ðrpc.Transaction{} @@ -188,7 +188,7 @@ func LoadEVMIntxReceiptDonation( t *testing.T, chainID int64, intxHash string, - coinType pkg.CoinType) *ethtypes.Receipt { + coinType coin.CoinType) *ethtypes.Receipt { nameReceipt := path.Join("../", TestDataPathEVM, FileNameEVMIntxReceipt(chainID, intxHash, coinType, true)) receipt := ðtypes.Receipt{} @@ -202,7 +202,7 @@ func LoadEVMIntxNReceiptDonation( t *testing.T, chainID int64, intxHash string, - coinType pkg.CoinType) (*ethrpc.Transaction, *ethtypes.Receipt) { + coinType coin.CoinType) (*ethrpc.Transaction, *ethtypes.Receipt) { // load archived donation intx and receipt tx := LoadEVMIntxDonation(t, chainID, intxHash, coinType) receipt := LoadEVMIntxReceiptDonation(t, chainID, intxHash, coinType) @@ -215,7 +215,7 @@ func LoadEVMIntxNReceiptNCctx( t *testing.T, chainID int64, intxHash string, - coinType pkg.CoinType) (*ethrpc.Transaction, *ethtypes.Receipt, *crosschaintypes.CrossChainTx) { + coinType coin.CoinType) (*ethrpc.Transaction, *ethtypes.Receipt, *crosschaintypes.CrossChainTx) { // load archived intx, receipt and cctx tx := LoadEVMIntx(t, chainID, intxHash, coinType) receipt := LoadEVMIntxReceipt(t, chainID, intxHash, coinType) @@ -229,7 +229,7 @@ func LoadEVMOuttx( t *testing.T, chainID int64, intxHash string, - coinType pkg.CoinType) *ethtypes.Transaction { + coinType coin.CoinType) *ethtypes.Transaction { nameTx := path.Join("../", TestDataPathEVM, FileNameEVMOuttx(chainID, intxHash, coinType)) tx := ðtypes.Transaction{} @@ -243,7 +243,7 @@ func LoadEVMOuttxReceipt( t *testing.T, chainID int64, intxHash string, - coinType pkg.CoinType) *ethtypes.Receipt { + coinType coin.CoinType) *ethtypes.Receipt { nameReceipt := path.Join("../", TestDataPathEVM, FileNameEVMOuttxReceipt(chainID, intxHash, coinType)) receipt := ðtypes.Receipt{} @@ -257,7 +257,7 @@ func LoadEVMOuttxNReceipt( t *testing.T, chainID int64, intxHash string, - coinType pkg.CoinType) (*ethtypes.Transaction, *ethtypes.Receipt) { + coinType coin.CoinType) (*ethtypes.Transaction, *ethtypes.Receipt) { // load archived evm outtx and receipt tx := LoadEVMOuttx(t, chainID, intxHash, coinType) receipt := LoadEVMOuttxReceipt(t, chainID, intxHash, coinType) diff --git a/zetaclient/testutils/testdata_naming.go b/zetaclient/testutils/testdata_naming.go index 43d355054c..bfe842310e 100644 --- a/zetaclient/testutils/testdata_naming.go +++ b/zetaclient/testutils/testdata_naming.go @@ -3,7 +3,7 @@ package testutils import ( "fmt" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/coin" ) // FileNameEVMBlock returns unified archive file name for block @@ -15,7 +15,7 @@ func FileNameEVMBlock(chainID int64, blockNumber uint64, trimmed bool) string { } // FileNameEVMIntx returns unified archive file name for inbound tx -func FileNameEVMIntx(chainID int64, intxHash string, coinType pkg.CoinType, donation bool) string { +func FileNameEVMIntx(chainID int64, intxHash string, coinType coin.CoinType, donation bool) string { if !donation { return fmt.Sprintf("chain_%d_intx_ethrpc_%s_%s.json", chainID, coinType, intxHash) } @@ -23,7 +23,7 @@ func FileNameEVMIntx(chainID int64, intxHash string, coinType pkg.CoinType, dona } // FileNameEVMIntxReceipt returns unified archive file name for inbound tx receipt -func FileNameEVMIntxReceipt(chainID int64, intxHash string, coinType pkg.CoinType, donation bool) string { +func FileNameEVMIntxReceipt(chainID int64, intxHash string, coinType coin.CoinType, donation bool) string { if !donation { return fmt.Sprintf("chain_%d_intx_receipt_%s_%s.json", chainID, coinType, intxHash) } @@ -31,7 +31,7 @@ func FileNameEVMIntxReceipt(chainID int64, intxHash string, coinType pkg.CoinTyp } // FileNameEVMIntxCctx returns unified archive file name for inbound cctx -func FileNameEVMIntxCctx(chainID int64, intxHash string, coinType pkg.CoinType) string { +func FileNameEVMIntxCctx(chainID int64, intxHash string, coinType coin.CoinType) string { return fmt.Sprintf("cctx_intx_%d_%s_%s.json", chainID, coinType, intxHash) } @@ -54,11 +54,11 @@ func FileNameCctxByNonce(chainID int64, nonce uint64) string { } // FileNameEVMOuttx returns unified archive file name for outbound tx -func FileNameEVMOuttx(chainID int64, txHash string, coinType pkg.CoinType) string { +func FileNameEVMOuttx(chainID int64, txHash string, coinType coin.CoinType) string { return fmt.Sprintf("chain_%d_outtx_%s_%s.json", chainID, coinType, txHash) } // FileNameEVMOuttxReceipt returns unified archive file name for outbound tx receipt -func FileNameEVMOuttxReceipt(chainID int64, txHash string, coinType pkg.CoinType) string { +func FileNameEVMOuttxReceipt(chainID int64, txHash string, coinType coin.CoinType) string { return fmt.Sprintf("chain_%d_outtx_receipt_%s_%s.json", chainID, coinType, txHash) } diff --git a/zetaclient/tss/tss_signer.go b/zetaclient/tss/tss_signer.go index 9744d64074..72cc1b30d2 100644 --- a/zetaclient/tss/tss_signer.go +++ b/zetaclient/tss/tss_signer.go @@ -12,7 +12,7 @@ import ( "strings" "time" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/pkg/cosmos" appcontext "github.com/zeta-chain/zetacore/zetaclient/app_context" "github.com/zeta-chain/zetacore/zetaclient/interfaces" @@ -193,7 +193,7 @@ func (tss *TSS) Pubkey() []byte { // Sign signs a digest // digest should be Hashes of some data // NOTE: Specify optionalPubkey to use a different pubkey than the current pubkey set during keygen -func (tss *TSS) Sign(digest []byte, height uint64, nonce uint64, chain *pkg.Chain, optionalPubKey string) ([65]byte, error) { +func (tss *TSS) Sign(digest []byte, height uint64, nonce uint64, chain *chains.Chain, optionalPubKey string) ([65]byte, error) { H := digest log.Debug().Msgf("hash of digest is %s", H) @@ -263,7 +263,7 @@ func (tss *TSS) Sign(digest []byte, height uint64, nonce uint64, chain *pkg.Chai // SignBatch is hash of some data // digest should be batch of hashes of some data -func (tss *TSS) SignBatch(digests [][]byte, height uint64, nonce uint64, chain *pkg.Chain) ([][65]byte, error) { +func (tss *TSS) SignBatch(digests [][]byte, height uint64, nonce uint64, chain *chains.Chain) ([][65]byte, error) { tssPubkey := tss.CurrentPubkey digestBase64 := make([]string, len(digests)) for i, digest := range digests { @@ -589,7 +589,7 @@ func getKeyAddrBTCWitnessPubkeyHash(tssPubkey string, chainID int64) (*btcutil.A return nil, err } - bitcoinNetParams, err := pkg.BitcoinNetParamsFromChainID(chainID) + bitcoinNetParams, err := chains.BitcoinNetParamsFromChainID(chainID) if err != nil { return nil, err } diff --git a/zetaclient/tss/tss_signer_test.go b/zetaclient/tss/tss_signer_test.go index 8871ccd29b..4388fc5ef1 100644 --- a/zetaclient/tss/tss_signer_test.go +++ b/zetaclient/tss/tss_signer_test.go @@ -5,13 +5,13 @@ import ( "os" "testing" - "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/zetaclient/keys" "github.com/cosmos/cosmos-sdk/testutil/testdata" "github.com/rs/zerolog" "github.com/stretchr/testify/require" "github.com/zeta-chain/zetacore/pkg/cosmos" + "github.com/zeta-chain/zetacore/pkg/crypto" ) func Test_LoadTssFilesFromDirectory(t *testing.T) { @@ -63,7 +63,7 @@ func GenerateKeyshareFiles(n int, dir string) error { if err != nil { return err } - pk, err := pkg.NewPubKey(spk) + pk, err := crypto.NewPubKey(spk) if err != nil { return err } diff --git a/zetaclient/zetabridge/query.go b/zetaclient/zetabridge/query.go index 7330bfdb7b..218c8494fa 100644 --- a/zetaclient/zetabridge/query.go +++ b/zetaclient/zetabridge/query.go @@ -6,6 +6,8 @@ import ( "sort" "time" + "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/proofs" "github.com/zeta-chain/zetacore/zetaclient/interfaces" sdkmath "cosmossdk.io/math" @@ -18,7 +20,6 @@ import ( upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" tmhttp "github.com/tendermint/tendermint/rpc/client/http" "github.com/zeta-chain/zetacore/cmd/zetacored/config" - "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" "google.golang.org/grpc" @@ -193,7 +194,7 @@ func (b *ZetaCoreBridge) GetNodeInfo() (*tmservice.GetNodeInfoResponse, error) { return nil, err } -func (b *ZetaCoreBridge) GetLastBlockHeightByChain(chain pkg.Chain) (*types.LastBlockHeight, error) { +func (b *ZetaCoreBridge) GetLastBlockHeightByChain(chain chains.Chain) (*types.LastBlockHeight, error) { client := types.NewQueryClient(b.grpcConn) resp, err := client.LastBlockHeight(context.Background(), &types.QueryGetLastBlockHeightRequest{Index: chain.ChainName.String()}) if err != nil { @@ -230,7 +231,7 @@ func (b *ZetaCoreBridge) GetBallotByID(id string) (*observertypes.QueryBallotByI }) } -func (b *ZetaCoreBridge) GetNonceByChain(chain pkg.Chain) (observertypes.ChainNonces, error) { +func (b *ZetaCoreBridge) GetNonceByChain(chain chains.Chain) (observertypes.ChainNonces, error) { client := observertypes.NewQueryClient(b.grpcConn) resp, err := client.ChainNonces(context.Background(), &observertypes.QueryGetChainNoncesRequest{Index: chain.ChainName.String()}) if err != nil { @@ -322,7 +323,7 @@ func (b *ZetaCoreBridge) GetTssHistory() ([]observertypes.TSS, error) { return resp.TssList, nil } -func (b *ZetaCoreBridge) GetOutTxTracker(chain pkg.Chain, nonce uint64) (*types.OutTxTracker, error) { +func (b *ZetaCoreBridge) GetOutTxTracker(chain chains.Chain, nonce uint64) (*types.OutTxTracker, error) { client := types.NewQueryClient(b.grpcConn) resp, err := client.OutTxTracker(context.Background(), &types.QueryGetOutTxTrackerRequest{ ChainID: chain.ChainId, @@ -380,7 +381,7 @@ func (b *ZetaCoreBridge) GetBlockHeaderStateByChain(chainID int64) (observertype return *resp, nil } -func (b *ZetaCoreBridge) GetSupportedChains() ([]*pkg.Chain, error) { +func (b *ZetaCoreBridge) GetSupportedChains() ([]*chains.Chain, error) { client := observertypes.NewQueryClient(b.grpcConn) resp, err := client.SupportedChains(context.Background(), &observertypes.QuerySupportedChains{}) if err != nil { @@ -398,7 +399,7 @@ func (b *ZetaCoreBridge) GetPendingNonces() (*observertypes.QueryAllPendingNonce return resp, nil } -func (b *ZetaCoreBridge) Prove(blockHash string, txHash string, txIndex int64, proof *pkg.Proof, chainID int64) (bool, error) { +func (b *ZetaCoreBridge) Prove(blockHash string, txHash string, txIndex int64, proof *proofs.Proof, chainID int64) (bool, error) { client := observertypes.NewQueryClient(b.grpcConn) resp, err := client.Prove(context.Background(), &observertypes.QueryProveRequest{ BlockHash: blockHash, diff --git a/zetaclient/zetabridge/tx.go b/zetaclient/zetabridge/tx.go index 57d3c93a94..1c604af4ef 100644 --- a/zetaclient/zetabridge/tx.go +++ b/zetaclient/zetabridge/tx.go @@ -7,6 +7,8 @@ import ( "time" "cosmossdk.io/math" + "github.com/zeta-chain/zetacore/pkg/coin" + "github.com/zeta-chain/zetacore/pkg/proofs" appcontext "github.com/zeta-chain/zetacore/zetaclient/app_context" authz2 "github.com/zeta-chain/zetacore/zetaclient/authz" clientcommon "github.com/zeta-chain/zetacore/zetaclient/common" @@ -15,16 +17,16 @@ import ( "github.com/cosmos/cosmos-sdk/x/authz" "github.com/pkg/errors" "github.com/zeta-chain/go-tss/blame" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/x/crosschain/types" observerTypes "github.com/zeta-chain/zetacore/x/observer/types" ) // GasPriceMultiplier returns the gas price multiplier for the given chain func GasPriceMultiplier(chainID int64) (float64, error) { - if pkg.IsEVMChain(chainID) { + if chains.IsEVMChain(chainID) { return clientcommon.EVMOuttxGasPriceMultiplier, nil - } else if pkg.IsBitcoinChain(chainID) { + } else if chains.IsBitcoinChain(chainID) { return clientcommon.BTCOuttxGasPriceMultiplier, nil } return 0, fmt.Errorf("cannot get gas price multiplier for unknown chain %d", chainID) @@ -43,7 +45,7 @@ func (b *ZetaCoreBridge) WrapMessageWithAuthz(msg sdk.Msg) (sdk.Msg, authz2.Sign return &authzMessage, authzSigner, nil } -func (b *ZetaCoreBridge) PostGasPrice(chain pkg.Chain, gasPrice uint64, supply string, blockNum uint64) (string, error) { +func (b *ZetaCoreBridge) PostGasPrice(chain chains.Chain, gasPrice uint64, supply string, blockNum uint64) (string, error) { // apply gas price multiplier for the chain multiplier, err := GasPriceMultiplier(chain.ChainId) if err != nil { @@ -75,12 +77,12 @@ func (b *ZetaCoreBridge) AddTxHashToOutTxTracker( chainID int64, nonce uint64, txHash string, - proof *pkg.Proof, + proof *proofs.Proof, blockHash string, txIndex int64, ) (string, error) { // don't report if the tracker already contains the txHash - tracker, err := b.GetOutTxTracker(pkg.Chain{ChainId: chainID}, nonce) + tracker, err := b.GetOutTxTracker(chains.Chain{ChainId: chainID}, nonce) if err == nil { for _, hash := range tracker.HashList { if strings.EqualFold(hash.TxHash, txHash) { @@ -103,7 +105,7 @@ func (b *ZetaCoreBridge) AddTxHashToOutTxTracker( return zetaTxHash, nil } -func (b *ZetaCoreBridge) SetTSS(tssPubkey string, keyGenZetaHeight int64, status pkg.ReceiveStatus) (string, error) { +func (b *ZetaCoreBridge) SetTSS(tssPubkey string, keyGenZetaHeight int64, status chains.ReceiveStatus) (string, error) { signerAddress := b.keys.GetOperatorAddress().String() msg := types.NewMsgCreateTSSVoter(signerAddress, tssPubkey, keyGenZetaHeight, status) @@ -171,7 +173,7 @@ func (b *ZetaCoreBridge) PostBlameData(blame *blame.Blame, chainID int64, index return "", fmt.Errorf("post blame data failed after %d retries", DefaultRetryCount) } -func (b *ZetaCoreBridge) PostAddBlockHeader(chainID int64, blockHash []byte, height int64, header pkg.HeaderData) (string, error) { +func (b *ZetaCoreBridge) PostAddBlockHeader(chainID int64, blockHash []byte, height int64, header proofs.HeaderData) (string, error) { signerAddress := b.keys.GetOperatorAddress().String() msg := observerTypes.NewMsgAddBlockHeader(signerAddress, chainID, blockHash, height, header) @@ -287,10 +289,10 @@ func (b *ZetaCoreBridge) PostVoteOutbound( outTxEffectiveGasPrice *big.Int, outTxEffectiveGasLimit uint64, amount *big.Int, - status pkg.ReceiveStatus, - chain pkg.Chain, + status chains.ReceiveStatus, + chain chains.Chain, nonce uint64, - coinType pkg.CoinType, + coinType coin.CoinType, ) (string, string, error) { signerAddress := b.keys.GetOperatorAddress().String() msg := types.NewMsgVoteOnObservedOutboundTx( @@ -313,7 +315,7 @@ func (b *ZetaCoreBridge) PostVoteOutbound( // the higher gas limit is only necessary when the vote is finalized and the outbound is processed // therefore we use a retryGasLimit with a higher value to resend the tx if it fails (when the vote is finalized) retryGasLimit := uint64(0) - if msg.Status == pkg.ReceiveStatus_Failed { + if msg.Status == chains.ReceiveStatus_Failed { retryGasLimit = PostVoteOutboundRevertGasLimit } diff --git a/zetaclient/zetabridge/tx_vote_inbound.go b/zetaclient/zetabridge/tx_vote_inbound.go index affecdead5..43bbd4aaaf 100644 --- a/zetaclient/zetabridge/tx_vote_inbound.go +++ b/zetaclient/zetabridge/tx_vote_inbound.go @@ -2,7 +2,7 @@ package zetabridge import ( "cosmossdk.io/math" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/coin" "github.com/zeta-chain/zetacore/x/crosschain/types" ) @@ -30,7 +30,7 @@ func GetInBoundVoteMessage( inTxHash string, inBlockHeight uint64, gasLimit uint64, - coinType pkg.CoinType, + coinType coin.CoinType, asset string, signerAddress string, eventIndex uint, diff --git a/zetaclient/zetabridge/zetacore_bridge.go b/zetaclient/zetabridge/zetacore_bridge.go index 89d7b96496..9aaa03f228 100644 --- a/zetaclient/zetabridge/zetacore_bridge.go +++ b/zetaclient/zetabridge/zetacore_bridge.go @@ -5,11 +5,6 @@ import ( "sync" "time" - "github.com/zeta-chain/zetacore/pkg" - "github.com/zeta-chain/zetacore/zetaclient/interfaces" - "github.com/zeta-chain/zetacore/zetaclient/keys" - "github.com/zeta-chain/zetacore/zetaclient/metrics" - "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/simapp/params" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -18,6 +13,8 @@ import ( "github.com/rs/zerolog" "github.com/rs/zerolog/log" "github.com/zeta-chain/zetacore/app" + "github.com/zeta-chain/zetacore/pkg/authz" + "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/pkg/cosmos" crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" @@ -35,8 +32,8 @@ var _ interfaces.ZetaCoreBridger = &ZetaCoreBridge{} type ZetaCoreBridge struct { logger zerolog.Logger blockHeight int64 - accountNumber map[pkg.KeyType]uint64 - seqNumber map[pkg.KeyType]uint64 + accountNumber map[authz.KeyType]uint64 + seqNumber map[authz.KeyType]uint64 grpcConn *grpc.ClientConn httpClient *retryablehttp.Client cfg config.ClientConfiguration @@ -44,7 +41,7 @@ type ZetaCoreBridge struct { keys *keys.Keys broadcastLock *sync.RWMutex zetaChainID string - zetaChain pkg.Chain + zetaChain chains.Chain stop chan struct{} pause chan struct{} Telemetry *metrics.TelemetryServer @@ -81,14 +78,14 @@ func NewZetaCoreBridge( logger.Error().Err(err).Msg("grpc dial fail") return nil, err } - accountsMap := make(map[pkg.KeyType]uint64) - seqMap := make(map[pkg.KeyType]uint64) - for _, keyType := range pkg.GetAllKeyTypes() { + accountsMap := make(map[authz.KeyType]uint64) + seqMap := make(map[authz.KeyType]uint64) + for _, keyType := range authz.GetAllKeyTypes() { accountsMap[keyType] = 0 seqMap[keyType] = 0 } - zetaChain, err := pkg.ZetaChainFromChainID(chainID) + zetaChain, err := chains.ZetaChainFromChainID(chainID) if err != nil { return nil, fmt.Errorf("invalid chain id %s, %w", chainID, err) } @@ -129,7 +126,7 @@ func (b *ZetaCoreBridge) UpdateChainID(chainID string) error { if b.zetaChainID != chainID { b.zetaChainID = chainID - zetaChain, err := pkg.ZetaChainFromChainID(chainID) + zetaChain, err := chains.ZetaChainFromChainID(chainID) if err != nil { return fmt.Errorf("invalid chain id %s, %w", chainID, err) } @@ -140,7 +137,7 @@ func (b *ZetaCoreBridge) UpdateChainID(chainID string) error { } // ZetaChain returns the ZetaChain chain object -func (b *ZetaCoreBridge) ZetaChain() pkg.Chain { +func (b *ZetaCoreBridge) ZetaChain() chains.Chain { return b.zetaChain } @@ -150,7 +147,7 @@ func (b *ZetaCoreBridge) Stop() { } // GetAccountNumberAndSequenceNumber We do not use multiple KeyType for now , but this can be optionally used in the future to seprate TSS signer from Zetaclient GRantee -func (b *ZetaCoreBridge) GetAccountNumberAndSequenceNumber(_ pkg.KeyType) (uint64, uint64, error) { +func (b *ZetaCoreBridge) GetAccountNumberAndSequenceNumber(_ authz.KeyType) (uint64, uint64, error) { ctx, err := b.GetContext() if err != nil { return 0, 0, err @@ -159,7 +156,7 @@ func (b *ZetaCoreBridge) GetAccountNumberAndSequenceNumber(_ pkg.KeyType) (uint6 return ctx.AccountRetriever.GetAccountNumberSequence(ctx, address) } -func (b *ZetaCoreBridge) SetAccountNumber(keyType pkg.KeyType) { +func (b *ZetaCoreBridge) SetAccountNumber(keyType authz.KeyType) { ctx, err := b.GetContext() if err != nil { b.logger.Error().Err(err).Msg("fail to get context") @@ -233,19 +230,19 @@ func (b *ZetaCoreBridge) UpdateZetaCoreContext(coreContext *corecontext.ZetaCore b.logger.Info().Msgf("Chain %d is not supported yet", chainParam.ChainId) continue } - if pkg.IsBitcoinChain(chainParam.ChainId) { + if chains.IsBitcoinChain(chainParam.ChainId) { newBTCParams = chainParam - } else if pkg.IsEVMChain(chainParam.ChainId) { + } else if chains.IsEVMChain(chainParam.ChainId) { newEVMParams[chainParam.ChainId] = chainParam } } - chains, err := b.GetSupportedChains() + supporteChains, err := b.GetSupportedChains() if err != nil { return err } - newChains := make([]pkg.Chain, len(chains)) - for i, chain := range chains { + newChains := make([]chains.Chain, len(supporteChains)) + for i, chain := range supporteChains { newChains[i] = *chain } keyGen, err := b.GetKeyGen() diff --git a/zetaclient/zetacore_observer.go b/zetaclient/zetacore_observer.go index b6dcb36c8f..8ec76013a5 100644 --- a/zetaclient/zetacore_observer.go +++ b/zetaclient/zetacore_observer.go @@ -6,6 +6,7 @@ import ( "time" ethcommon "github.com/ethereum/go-ethereum/common" + "github.com/zeta-chain/zetacore/pkg/chains" appcontext "github.com/zeta-chain/zetacore/zetaclient/app_context" "github.com/zeta-chain/zetacore/zetaclient/bitcoin" corecontext "github.com/zeta-chain/zetacore/zetaclient/core_context" @@ -17,7 +18,6 @@ import ( sdkmath "cosmossdk.io/math" "github.com/rs/zerolog" - "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" "github.com/zeta-chain/zetacore/zetaclient/metrics" ) @@ -165,9 +165,9 @@ func (co *CoreObserver) startCctxScheduler(appContext *appcontext.AppContext) { // #nosec G701 range is verified zetaHeight := uint64(bn) - if pkg.IsEVMChain(c.ChainId) { + if chains.IsEVMChain(c.ChainId) { co.scheduleCctxEVM(outTxMan, zetaHeight, c.ChainId, cctxList, ob, signer) - } else if pkg.IsBitcoinChain(c.ChainId) { + } else if chains.IsBitcoinChain(c.ChainId) { co.scheduleCctxBTC(outTxMan, zetaHeight, c.ChainId, cctxList, ob, signer) } else { co.logger.ZetaChainWatcher.Error().Msgf("startCctxScheduler: unsupported chain %d", c.ChainId) @@ -332,7 +332,7 @@ func (co *CoreObserver) GetUpdatedSigner(coreContext *corecontext.ZetaCoreContex return nil, fmt.Errorf("signer not found for chainID %d", chainID) } // update EVM signer parameters only. BTC signer doesn't use chain parameters for now. - if pkg.IsEVMChain(chainID) { + if chains.IsEVMChain(chainID) { evmParams, found := coreContext.GetEVMChainParams(chainID) if found { // update zeta connector and ERC20 custody addresses @@ -361,14 +361,14 @@ func (co *CoreObserver) GetUpdatedChainClient(coreContext *corecontext.ZetaCoreC } // update chain client chain parameters curParams := chainOb.GetChainParams() - if pkg.IsEVMChain(chainID) { + if chains.IsEVMChain(chainID) { evmParams, found := coreContext.GetEVMChainParams(chainID) if found && !observertypes.ChainParamsEqual(curParams, *evmParams) { chainOb.SetChainParams(*evmParams) co.logger.ZetaChainWatcher.Info().Msgf( "updated chain params for chainID %d, new params: %v", chainID, *evmParams) } - } else if pkg.IsBitcoinChain(chainID) { + } else if chains.IsBitcoinChain(chainID) { _, btcParams, found := coreContext.GetBTCChainParams() if found && !observertypes.ChainParamsEqual(curParams, *btcParams) { diff --git a/zetaclient/zetacore_observer_test.go b/zetaclient/zetacore_observer_test.go index 21ede8577f..56ca752b97 100644 --- a/zetaclient/zetacore_observer_test.go +++ b/zetaclient/zetacore_observer_test.go @@ -7,7 +7,7 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" "github.com/rs/zerolog" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/testutil/sample" observertypes "github.com/zeta-chain/zetacore/x/observer/types" "github.com/zeta-chain/zetacore/zetaclient/config" @@ -17,7 +17,7 @@ import ( "github.com/zeta-chain/zetacore/zetaclient/testutils/stub" ) -func MockCoreObserver(t *testing.T, evmChain, btcChain pkg.Chain, evmChainParams, btcChainParams *observertypes.ChainParams) *CoreObserver { +func MockCoreObserver(t *testing.T, evmChain, btcChain chains.Chain, evmChainParams, btcChainParams *observertypes.ChainParams) *CoreObserver { // create mock signers and clients evmSigner := stub.NewEVMSigner( evmChain, @@ -42,7 +42,7 @@ func MockCoreObserver(t *testing.T, evmChain, btcChain pkg.Chain, evmChainParams return observer } -func CreateCoreContext(evmChain, btcChain pkg.Chain, evmChainParams, btcChainParams *observertypes.ChainParams) *corecontext.ZetaCoreContext { +func CreateCoreContext(evmChain, btcChain chains.Chain, evmChainParams, btcChainParams *observertypes.ChainParams) *corecontext.ZetaCoreContext { // new config cfg := config.NewConfig() cfg.EVMChainConfigs[evmChain.ChainId] = config.EVMConfig{ @@ -60,7 +60,7 @@ func CreateCoreContext(evmChain, btcChain pkg.Chain, evmChainParams, btcChainPar // feed chain params coreContext.Update( &observertypes.Keygen{}, - []pkg.Chain{evmChain, btcChain}, + []chains.Chain{evmChain, btcChain}, evmChainParamsMap, btcChainParams, "", @@ -73,8 +73,8 @@ func CreateCoreContext(evmChain, btcChain pkg.Chain, evmChainParams, btcChainPar func Test_GetUpdatedSigner(t *testing.T) { // initial parameters for core observer creation - evmChain := pkg.EthChain() - btcChain := pkg.BtcMainnetChain() + evmChain := chains.EthChain() + btcChain := chains.BtcMainnetChain() evmChainParams := &observertypes.ChainParams{ ChainId: evmChain.ChainId, ConnectorContractAddress: testutils.ConnectorAddresses[evmChain.ChainId].Hex(), @@ -93,7 +93,7 @@ func Test_GetUpdatedSigner(t *testing.T) { observer := MockCoreObserver(t, evmChain, btcChain, evmChainParams, btcChainParams) coreContext := CreateCoreContext(evmChain, btcChain, evmChainParamsNew, btcChainParams) // BSC signer should not be found - _, err := observer.GetUpdatedSigner(coreContext, pkg.BscMainnetChain().ChainId) + _, err := observer.GetUpdatedSigner(coreContext, chains.BscMainnetChain().ChainId) require.ErrorContains(t, err, "signer not found") }) t.Run("should be able to update connector and erc20 custody address", func(t *testing.T) { @@ -109,8 +109,8 @@ func Test_GetUpdatedSigner(t *testing.T) { func Test_GetUpdatedChainClient(t *testing.T) { // initial parameters for core observer creation - evmChain := pkg.EthChain() - btcChain := pkg.BtcMainnetChain() + evmChain := chains.EthChain() + btcChain := chains.BtcMainnetChain() evmChainParams := &observertypes.ChainParams{ ChainId: evmChain.ChainId, ConnectorContractAddress: testutils.ConnectorAddresses[evmChain.ChainId].Hex(), @@ -158,7 +158,7 @@ func Test_GetUpdatedChainClient(t *testing.T) { observer := MockCoreObserver(t, evmChain, btcChain, evmChainParams, btcChainParams) coreContext := CreateCoreContext(evmChain, btcChain, evmChainParamsNew, btcChainParams) // BSC chain client should not be found - _, err := observer.GetUpdatedChainClient(coreContext, pkg.BscMainnetChain().ChainId) + _, err := observer.GetUpdatedChainClient(coreContext, chains.BscMainnetChain().ChainId) require.ErrorContains(t, err, "chain client not found") }) t.Run("chain params in evm chain client should be updated successfully", func(t *testing.T) { @@ -174,7 +174,7 @@ func Test_GetUpdatedChainClient(t *testing.T) { observer := MockCoreObserver(t, evmChain, btcChain, evmChainParams, btcChainParams) coreContext := CreateCoreContext(btcChain, btcChain, evmChainParams, btcChainParamsNew) // BTC testnet chain client should not be found - _, err := observer.GetUpdatedChainClient(coreContext, pkg.BtcTestNetChain().ChainId) + _, err := observer.GetUpdatedChainClient(coreContext, chains.BtcTestNetChain().ChainId) require.ErrorContains(t, err, "chain client not found") }) t.Run("chain params in btc chain client should be updated successfully", func(t *testing.T) { From 5b51e10355e195c4c2aa9a929b931b805d2ad809 Mon Sep 17 00:00:00 2001 From: skosito Date: Mon, 25 Mar 2024 18:56:31 +0100 Subject: [PATCH 34/41] Make generate --- docs/openapi/openapi.swagger.yaml | 130 +++---- docs/spec/crosschain/messages.md | 14 +- docs/spec/fungible/messages.md | 2 +- docs/spec/observer/messages.md | 2 +- typescript/common/common_pb.d.ts | 338 ------------------ typescript/common/index.d.ts | 1 - typescript/crosschain/cross_chain_tx_pb.d.ts | 6 +- typescript/crosschain/in_tx_tracker_pb.d.ts | 4 +- typescript/crosschain/tx_pb.d.ts | 18 +- typescript/fungible/events_pb.d.ts | 6 +- typescript/fungible/foreign_coins_pb.d.ts | 4 +- typescript/fungible/tx_pb.d.ts | 4 +- typescript/observer/node_account_pb.d.ts | 4 +- typescript/observer/observer_pb.d.ts | 4 +- typescript/observer/params_pb.d.ts | 4 +- typescript/observer/query_pb.d.ts | 11 +- typescript/observer/tx_pb.d.ts | 4 +- typescript/pkg/chains/chains_pb.d.ts | 152 ++++++++ typescript/pkg/chains/index.d.ts | 1 + typescript/pkg/coin/coin_pb.d.ts | 36 ++ typescript/pkg/coin/index.d.ts | 1 + typescript/pkg/crypto/crypto_pb.d.ts | 39 ++ typescript/pkg/crypto/index.d.ts | 1 + .../proofs}/bitcoin/bitcoin_pb.d.ts | 2 +- .../{common => pkg/proofs}/bitcoin/index.d.ts | 0 .../proofs}/ethereum/ethereum_pb.d.ts | 2 +- .../proofs}/ethereum/index.d.ts | 0 typescript/pkg/proofs/index.d.ts | 1 + typescript/pkg/proofs/proofs_pb.d.ts | 132 +++++++ 29 files changed, 475 insertions(+), 448 deletions(-) delete mode 100644 typescript/common/common_pb.d.ts delete mode 100644 typescript/common/index.d.ts create mode 100644 typescript/pkg/chains/chains_pb.d.ts create mode 100644 typescript/pkg/chains/index.d.ts create mode 100644 typescript/pkg/coin/coin_pb.d.ts create mode 100644 typescript/pkg/coin/index.d.ts create mode 100644 typescript/pkg/crypto/crypto_pb.d.ts create mode 100644 typescript/pkg/crypto/index.d.ts rename typescript/{common => pkg/proofs}/bitcoin/bitcoin_pb.d.ts (92%) rename typescript/{common => pkg/proofs}/bitcoin/index.d.ts (100%) rename typescript/{common => pkg/proofs}/ethereum/ethereum_pb.d.ts (92%) rename typescript/{common => pkg/proofs}/ethereum/index.d.ts (100%) create mode 100644 typescript/pkg/proofs/index.d.ts create mode 100644 typescript/pkg/proofs/proofs_pb.d.ts diff --git a/docs/openapi/openapi.swagger.yaml b/docs/openapi/openapi.swagger.yaml index dc7759c5a2..804a4fd88c 100644 --- a/docs/openapi/openapi.swagger.yaml +++ b/docs/openapi/openapi.swagger.yaml @@ -53521,33 +53521,15 @@ definitions: index: type: integer format: int64 - commonBlockHeader: - type: object - properties: - height: - type: string - format: int64 - hash: - type: string - format: byte - parent_hash: - type: string - format: byte - chain_id: - type: string - format: int64 - header: - $ref: '#/definitions/commonHeaderData' - title: chain specific header - commonChain: + chainsChain: type: object properties: chain_name: - $ref: '#/definitions/commonChainName' + $ref: '#/definitions/chainsChainName' chain_id: type: string format: int64 - commonChainName: + chainsChainName: type: string enum: - empty @@ -53573,7 +53555,15 @@ definitions: zeta_localnet = 13; - btc_regtest: Athens zeta_athensnet=15; - commonCoinType: + chainsReceiveStatus: + type: string + enum: + - Created + - Success + - Failed + default: Created + title: '- Created: some observer sees inbound tx' + coinCoinType: type: string enum: - Zeta @@ -53585,40 +53575,6 @@ definitions: - Gas: Ether, BNB, Matic, Klay, BTC, etc - ERC20: ERC20 token - Cmd: not a real coin, rather a command - commonHeaderData: - type: object - properties: - ethereum_header: - type: string - format: byte - title: binary encoded headers; RLP for ethereum - bitcoin_header: - type: string - format: byte - title: 80-byte little-endian encoded binary data - commonProof: - type: object - properties: - ethereum_proof: - $ref: '#/definitions/ethereumProof' - bitcoin_proof: - $ref: '#/definitions/bitcoinProof' - commonPubKeySet: - type: object - properties: - secp256k1: - type: string - ed25519: - type: string - title: PubKeySet contains two pub keys , secp256k1 and ed25519 - commonReceiveStatus: - type: string - enum: - - Created - - Success - - Failed - default: Created - title: '- Created: some observer sees inbound tx' crosschainCctxStatus: type: string enum: @@ -53702,7 +53658,7 @@ definitions: tx_hash: type: string coin_type: - $ref: '#/definitions/commonCoinType' + $ref: '#/definitions/coinCoinType' crosschainInboundTxParams: type: object properties: @@ -53716,7 +53672,7 @@ definitions: type: string title: this address is the EOA that signs the inbound tx coin_type: - $ref: '#/definitions/commonCoinType' + $ref: '#/definitions/coinCoinType' asset: type: string title: for ERC20 coin type, the asset is an address of the ERC20 contract @@ -53808,7 +53764,7 @@ definitions: type: string format: int64 coin_type: - $ref: '#/definitions/commonCoinType' + $ref: '#/definitions/coinCoinType' amount: type: string outbound_tx_tss_nonce: @@ -54011,6 +53967,14 @@ definitions: type: string proved: type: boolean + cryptoPubKeySet: + type: object + properties: + secp256k1: + type: string + ed25519: + type: string + title: PubKeySet contains two pub keys , secp256k1 and ed25519 emissionsMsgWithdrawEmissionResponse: type: object emissionsQueryGetEmissionsFactorsResponse: @@ -54069,7 +54033,7 @@ definitions: symbol: type: string coin_type: - $ref: '#/definitions/commonCoinType' + $ref: '#/definitions/coinCoinType' gas_limit: type: string format: uint64 @@ -54393,7 +54357,7 @@ definitions: granteeAddress: type: string granteePubkey: - $ref: '#/definitions/commonPubKeySet' + $ref: '#/definitions/cryptoPubKeySet' nodeStatus: $ref: '#/definitions/observerNodeStatus' observerNodeStatus: @@ -54419,7 +54383,7 @@ definitions: type: object properties: chain: - $ref: '#/definitions/commonChain' + $ref: '#/definitions/chainsChain' ballot_threshold: type: string min_observer_delegation: @@ -54473,7 +54437,7 @@ definitions: type: array items: type: object - $ref: '#/definitions/commonBlockHeader' + $ref: '#/definitions/proofsBlockHeader' pagination: $ref: '#/definitions/v1beta1PageResponse' observerQueryAllChainNoncesResponse: @@ -54537,7 +54501,7 @@ definitions: type: object properties: block_header: - $ref: '#/definitions/commonBlockHeader' + $ref: '#/definitions/proofsBlockHeader' observerQueryGetBlockHeaderStateResponse: type: object properties: @@ -54619,7 +54583,7 @@ definitions: type: array items: type: object - $ref: '#/definitions/commonChain' + $ref: '#/definitions/chainsChain' observerQueryTssHistoryResponse: type: object properties: @@ -54664,6 +54628,42 @@ definitions: type: string vote_type: $ref: '#/definitions/observerVoteType' + proofsBlockHeader: + type: object + properties: + height: + type: string + format: int64 + hash: + type: string + format: byte + parent_hash: + type: string + format: byte + chain_id: + type: string + format: int64 + header: + $ref: '#/definitions/proofsHeaderData' + title: chain specific header + proofsHeaderData: + type: object + properties: + ethereum_header: + type: string + format: byte + title: binary encoded headers; RLP for ethereum + bitcoin_header: + type: string + format: byte + title: 80-byte little-endian encoded binary data + proofsProof: + type: object + properties: + ethereum_proof: + $ref: '#/definitions/ethereumProof' + bitcoin_proof: + $ref: '#/definitions/bitcoinProof' protobufAny: type: object properties: diff --git a/docs/spec/crosschain/messages.md b/docs/spec/crosschain/messages.md index d18adeb778..506ca0f94c 100644 --- a/docs/spec/crosschain/messages.md +++ b/docs/spec/crosschain/messages.md @@ -14,7 +14,7 @@ message MsgAddToOutTxTracker { int64 chain_id = 2; uint64 nonce = 3; string tx_hash = 4; - common.Proof proof = 5; + proofs.Proof proof = 5; string block_hash = 6; int64 tx_index = 7; } @@ -31,8 +31,8 @@ message MsgAddToInTxTracker { string creator = 1; int64 chain_id = 2; string tx_hash = 3; - common.CoinType coin_type = 4; - common.Proof proof = 5; + coin.CoinType coin_type = 4; + proofs.Proof proof = 5; string block_hash = 6; int64 tx_index = 7; } @@ -124,10 +124,10 @@ message MsgVoteOnObservedOutboundTx { string observed_outTx_effective_gas_price = 11; uint64 observed_outTx_effective_gas_limit = 12; string value_received = 5; - common.ReceiveStatus status = 6; + chains.ReceiveStatus status = 6; int64 outTx_chain = 7; uint64 outTx_tss_nonce = 8; - common.CoinType coin_type = 9; + coin.CoinType coin_type = 9; } ``` @@ -187,7 +187,7 @@ message MsgVoteOnObservedInboundTx { string in_tx_hash = 9; uint64 in_block_height = 10; uint64 gas_limit = 11; - common.CoinType coin_type = 12; + coin.CoinType coin_type = 12; string tx_origin = 13; string asset = 14; uint64 event_index = 15; @@ -254,7 +254,7 @@ message MsgCreateTSSVoter { string creator = 1; string tss_pubkey = 2; int64 keyGenZetaHeight = 3; - common.ReceiveStatus status = 4; + chains.ReceiveStatus status = 4; } ``` diff --git a/docs/spec/fungible/messages.md b/docs/spec/fungible/messages.md index 696cc70631..57c089699f 100644 --- a/docs/spec/fungible/messages.md +++ b/docs/spec/fungible/messages.md @@ -41,7 +41,7 @@ message MsgDeployFungibleCoinZRC20 { uint32 decimals = 4; string name = 5; string symbol = 6; - common.CoinType coin_type = 7; + coin.CoinType coin_type = 7; int64 gas_limit = 8; } ``` diff --git a/docs/spec/observer/messages.md b/docs/spec/observer/messages.md index dfa2d3d1de..9ddfdc0fd0 100644 --- a/docs/spec/observer/messages.md +++ b/docs/spec/observer/messages.md @@ -104,7 +104,7 @@ message MsgAddBlockHeader { int64 chain_id = 2; bytes block_hash = 3; int64 height = 4; - common.HeaderData header = 5; + proofs.HeaderData header = 5; } ``` diff --git a/typescript/common/common_pb.d.ts b/typescript/common/common_pb.d.ts deleted file mode 100644 index dbba2518c0..0000000000 --- a/typescript/common/common_pb.d.ts +++ /dev/null @@ -1,338 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 with parameter "target=dts" -// @generated from file common/common.proto (package common, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; -import type { Proof as Proof$1 } from "./ethereum/ethereum_pb.js"; -import type { Proof as Proof$2 } from "./bitcoin/bitcoin_pb.js"; - -/** - * @generated from enum common.ReceiveStatus - */ -export declare enum ReceiveStatus { - /** - * some observer sees inbound tx - * - * @generated from enum value: Created = 0; - */ - Created = 0, - - /** - * @generated from enum value: Success = 1; - */ - Success = 1, - - /** - * @generated from enum value: Failed = 2; - */ - Failed = 2, -} - -/** - * @generated from enum common.CoinType - */ -export declare enum CoinType { - /** - * @generated from enum value: Zeta = 0; - */ - Zeta = 0, - - /** - * Ether, BNB, Matic, Klay, BTC, etc - * - * @generated from enum value: Gas = 1; - */ - Gas = 1, - - /** - * ERC20 token - * - * @generated from enum value: ERC20 = 2; - */ - ERC20 = 2, - - /** - * not a real coin, rather a command - * - * @generated from enum value: Cmd = 3; - */ - Cmd = 3, -} - -/** - * @generated from enum common.ChainName - */ -export declare enum ChainName { - /** - * @generated from enum value: empty = 0; - */ - empty = 0, - - /** - * @generated from enum value: eth_mainnet = 1; - */ - eth_mainnet = 1, - - /** - * @generated from enum value: zeta_mainnet = 2; - */ - zeta_mainnet = 2, - - /** - * @generated from enum value: btc_mainnet = 3; - */ - btc_mainnet = 3, - - /** - * @generated from enum value: polygon_mainnet = 4; - */ - polygon_mainnet = 4, - - /** - * @generated from enum value: bsc_mainnet = 5; - */ - bsc_mainnet = 5, - - /** - * Testnet - * - * @generated from enum value: goerli_testnet = 6; - */ - goerli_testnet = 6, - - /** - * @generated from enum value: mumbai_testnet = 7; - */ - mumbai_testnet = 7, - - /** - * @generated from enum value: ganache_testnet = 8; - */ - ganache_testnet = 8, - - /** - * @generated from enum value: baobab_testnet = 9; - */ - baobab_testnet = 9, - - /** - * @generated from enum value: bsc_testnet = 10; - */ - bsc_testnet = 10, - - /** - * @generated from enum value: zeta_testnet = 11; - */ - zeta_testnet = 11, - - /** - * @generated from enum value: btc_testnet = 12; - */ - btc_testnet = 12, - - /** - * @generated from enum value: sepolia_testnet = 13; - */ - sepolia_testnet = 13, - - /** - * LocalNet - * zeta_localnet = 13; - * - * @generated from enum value: goerli_localnet = 14; - */ - goerli_localnet = 14, - - /** - * Athens - * zeta_athensnet=15; - * - * @generated from enum value: btc_regtest = 15; - */ - btc_regtest = 15, -} - -/** - * PubKeySet contains two pub keys , secp256k1 and ed25519 - * - * @generated from message common.PubKeySet - */ -export declare class PubKeySet extends Message { - /** - * @generated from field: string secp256k1 = 1; - */ - secp256k1: string; - - /** - * @generated from field: string ed25519 = 2; - */ - ed25519: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "common.PubKeySet"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): PubKeySet; - - static fromJson(jsonValue: JsonValue, options?: Partial): PubKeySet; - - static fromJsonString(jsonString: string, options?: Partial): PubKeySet; - - static equals(a: PubKeySet | PlainMessage | undefined, b: PubKeySet | PlainMessage | undefined): boolean; -} - -/** - * @generated from message common.Chain - */ -export declare class Chain extends Message { - /** - * @generated from field: common.ChainName chain_name = 1; - */ - chainName: ChainName; - - /** - * @generated from field: int64 chain_id = 2; - */ - chainId: bigint; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "common.Chain"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): Chain; - - static fromJson(jsonValue: JsonValue, options?: Partial): Chain; - - static fromJsonString(jsonString: string, options?: Partial): Chain; - - static equals(a: Chain | PlainMessage | undefined, b: Chain | PlainMessage | undefined): boolean; -} - -/** - * @generated from message common.BlockHeader - */ -export declare class BlockHeader extends Message { - /** - * @generated from field: int64 height = 1; - */ - height: bigint; - - /** - * @generated from field: bytes hash = 2; - */ - hash: Uint8Array; - - /** - * @generated from field: bytes parent_hash = 3; - */ - parentHash: Uint8Array; - - /** - * @generated from field: int64 chain_id = 4; - */ - chainId: bigint; - - /** - * chain specific header - * - * @generated from field: common.HeaderData header = 5; - */ - header?: HeaderData; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "common.BlockHeader"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): BlockHeader; - - static fromJson(jsonValue: JsonValue, options?: Partial): BlockHeader; - - static fromJsonString(jsonString: string, options?: Partial): BlockHeader; - - static equals(a: BlockHeader | PlainMessage | undefined, b: BlockHeader | PlainMessage | undefined): boolean; -} - -/** - * @generated from message common.HeaderData - */ -export declare class HeaderData extends Message { - /** - * @generated from oneof common.HeaderData.data - */ - data: { - /** - * binary encoded headers; RLP for ethereum - * - * @generated from field: bytes ethereum_header = 1; - */ - value: Uint8Array; - case: "ethereumHeader"; - } | { - /** - * 80-byte little-endian encoded binary data - * - * @generated from field: bytes bitcoin_header = 2; - */ - value: Uint8Array; - case: "bitcoinHeader"; - } | { case: undefined; value?: undefined }; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "common.HeaderData"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): HeaderData; - - static fromJson(jsonValue: JsonValue, options?: Partial): HeaderData; - - static fromJsonString(jsonString: string, options?: Partial): HeaderData; - - static equals(a: HeaderData | PlainMessage | undefined, b: HeaderData | PlainMessage | undefined): boolean; -} - -/** - * @generated from message common.Proof - */ -export declare class Proof extends Message { - /** - * @generated from oneof common.Proof.proof - */ - proof: { - /** - * @generated from field: ethereum.Proof ethereum_proof = 1; - */ - value: Proof$1; - case: "ethereumProof"; - } | { - /** - * @generated from field: bitcoin.Proof bitcoin_proof = 2; - */ - value: Proof$2; - case: "bitcoinProof"; - } | { case: undefined; value?: undefined }; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "common.Proof"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): Proof; - - static fromJson(jsonValue: JsonValue, options?: Partial): Proof; - - static fromJsonString(jsonString: string, options?: Partial): Proof; - - static equals(a: Proof | PlainMessage | undefined, b: Proof | PlainMessage | undefined): boolean; -} - diff --git a/typescript/common/index.d.ts b/typescript/common/index.d.ts deleted file mode 100644 index 78b610bcc1..0000000000 --- a/typescript/common/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./common_pb"; diff --git a/typescript/crosschain/cross_chain_tx_pb.d.ts b/typescript/crosschain/cross_chain_tx_pb.d.ts index 0157548d54..9aa537b31b 100644 --- a/typescript/crosschain/cross_chain_tx_pb.d.ts +++ b/typescript/crosschain/cross_chain_tx_pb.d.ts @@ -5,7 +5,7 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; -import type { CoinType } from "../common/common_pb.js"; +import type { CoinType } from "../pkg/coin/coin_pb.js"; /** * @generated from enum zetachain.zetacore.crosschain.CctxStatus @@ -104,7 +104,7 @@ export declare class InboundTxParams extends Message { txOrigin: string; /** - * @generated from field: common.CoinType coin_type = 4; + * @generated from field: coin.CoinType coin_type = 4; */ coinType: CoinType; @@ -201,7 +201,7 @@ export declare class OutboundTxParams extends Message { receiverChainId: bigint; /** - * @generated from field: common.CoinType coin_type = 3; + * @generated from field: coin.CoinType coin_type = 3; */ coinType: CoinType; diff --git a/typescript/crosschain/in_tx_tracker_pb.d.ts b/typescript/crosschain/in_tx_tracker_pb.d.ts index d280f82524..9cb101adea 100644 --- a/typescript/crosschain/in_tx_tracker_pb.d.ts +++ b/typescript/crosschain/in_tx_tracker_pb.d.ts @@ -5,7 +5,7 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; -import type { CoinType } from "../common/common_pb.js"; +import type { CoinType } from "../pkg/coin/coin_pb.js"; /** * @generated from message zetachain.zetacore.crosschain.InTxTracker @@ -22,7 +22,7 @@ export declare class InTxTracker extends Message { txHash: string; /** - * @generated from field: common.CoinType coin_type = 3; + * @generated from field: coin.CoinType coin_type = 3; */ coinType: CoinType; diff --git a/typescript/crosschain/tx_pb.d.ts b/typescript/crosschain/tx_pb.d.ts index 2371a9405c..b1900d7c66 100644 --- a/typescript/crosschain/tx_pb.d.ts +++ b/typescript/crosschain/tx_pb.d.ts @@ -5,7 +5,9 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; -import type { CoinType, Proof, ReceiveStatus } from "../common/common_pb.js"; +import type { ReceiveStatus } from "../pkg/chains/chains_pb.js"; +import type { CoinType } from "../pkg/coin/coin_pb.js"; +import type { Proof } from "../pkg/proofs/proofs_pb.js"; /** * @generated from message zetachain.zetacore.crosschain.MsgCreateTSSVoter @@ -27,7 +29,7 @@ export declare class MsgCreateTSSVoter extends Message { keyGenZetaHeight: bigint; /** - * @generated from field: common.ReceiveStatus status = 4; + * @generated from field: chains.ReceiveStatus status = 4; */ status: ReceiveStatus; @@ -186,12 +188,12 @@ export declare class MsgAddToInTxTracker extends Message { txHash: string; /** - * @generated from field: common.CoinType coin_type = 4; + * @generated from field: coin.CoinType coin_type = 4; */ coinType: CoinType; /** - * @generated from field: common.Proof proof = 5; + * @generated from field: proofs.Proof proof = 5; */ proof?: Proof; @@ -347,7 +349,7 @@ export declare class MsgAddToOutTxTracker extends Message txHash: string; /** - * @generated from field: common.Proof proof = 5; + * @generated from field: proofs.Proof proof = 5; */ proof?: Proof; @@ -563,7 +565,7 @@ export declare class MsgVoteOnObservedOutboundTx extends Message { decimals: bigint; /** - * @generated from field: common.CoinType coin_type = 7; + * @generated from field: coin.CoinType coin_type = 7; */ coinType: CoinType; @@ -126,7 +126,7 @@ export declare class EventZRC20WithdrawFeeUpdated extends Message { symbol: string; /** - * @generated from field: common.CoinType coin_type = 8; + * @generated from field: coin.CoinType coin_type = 8; */ coinType: CoinType; diff --git a/typescript/fungible/tx_pb.d.ts b/typescript/fungible/tx_pb.d.ts index e20d4bde71..57ec4bbddc 100644 --- a/typescript/fungible/tx_pb.d.ts +++ b/typescript/fungible/tx_pb.d.ts @@ -5,7 +5,7 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; -import type { CoinType } from "../common/common_pb.js"; +import type { CoinType } from "../pkg/coin/coin_pb.js"; /** * @generated from enum zetachain.zetacore.fungible.UpdatePausedStatusAction @@ -233,7 +233,7 @@ export declare class MsgDeployFungibleCoinZRC20 extends Message { granteeAddress: string; /** - * @generated from field: common.PubKeySet granteePubkey = 3; + * @generated from field: crypto.PubKeySet granteePubkey = 3; */ granteePubkey?: PubKeySet; diff --git a/typescript/observer/observer_pb.d.ts b/typescript/observer/observer_pb.d.ts index cf8f1beb79..79bd712ab5 100644 --- a/typescript/observer/observer_pb.d.ts +++ b/typescript/observer/observer_pb.d.ts @@ -5,7 +5,7 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; -import type { Chain } from "../common/common_pb.js"; +import type { Chain } from "../pkg/chains/chains_pb.js"; /** * @generated from enum zetachain.zetacore.observer.ObservationType @@ -67,7 +67,7 @@ export declare class ObserverMapper extends Message { index: string; /** - * @generated from field: common.Chain observer_chain = 2; + * @generated from field: chains.Chain observer_chain = 2; */ observerChain?: Chain; diff --git a/typescript/observer/params_pb.d.ts b/typescript/observer/params_pb.d.ts index e06b0aebe5..93f7ab74c7 100644 --- a/typescript/observer/params_pb.d.ts +++ b/typescript/observer/params_pb.d.ts @@ -5,7 +5,7 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; -import type { Chain } from "../common/common_pb.js"; +import type { Chain } from "../pkg/chains/chains_pb.js"; /** * Deprecated(v14):Moved into the authority module @@ -144,7 +144,7 @@ export declare class ChainParams extends Message { */ export declare class ObserverParams extends Message { /** - * @generated from field: common.Chain chain = 1; + * @generated from field: chains.Chain chain = 1; */ chain?: Chain; diff --git a/typescript/observer/query_pb.d.ts b/typescript/observer/query_pb.d.ts index b346e34a87..a98680eeb8 100644 --- a/typescript/observer/query_pb.d.ts +++ b/typescript/observer/query_pb.d.ts @@ -9,10 +9,11 @@ import type { ChainNonces } from "./chain_nonces_pb.js"; import type { PageRequest, PageResponse } from "../cosmos/base/query/v1beta1/pagination_pb.js"; import type { PendingNonces } from "./pending_nonces_pb.js"; import type { TSS } from "./tss_pb.js"; -import type { BlockHeader, Chain, Proof } from "../common/common_pb.js"; +import type { BlockHeader, Proof } from "../pkg/proofs/proofs_pb.js"; import type { ChainParams, ChainParamsList, Params } from "./params_pb.js"; import type { BallotStatus, VoteType } from "./ballot_pb.js"; import type { LastObserverCount, ObservationType } from "./observer_pb.js"; +import type { Chain } from "../pkg/chains/chains_pb.js"; import type { NodeAccount } from "./node_account_pb.js"; import type { CrosschainFlags } from "./crosschain_flags_pb.js"; import type { Keygen } from "./keygen_pb.js"; @@ -443,7 +444,7 @@ export declare class QueryProveRequest extends Message { txHash: string; /** - * @generated from field: common.Proof proof = 3; + * @generated from field: proofs.Proof proof = 3; */ proof?: Proof; @@ -755,7 +756,7 @@ export declare class QuerySupportedChains extends Message */ export declare class QuerySupportedChainsResponse extends Message { /** - * @generated from field: repeated common.Chain chains = 1; + * @generated from field: repeated chains.Chain chains = 1; */ chains: Chain[]; @@ -1278,7 +1279,7 @@ export declare class QueryAllBlockHeaderRequest extends Message { /** - * @generated from field: repeated common.BlockHeader block_headers = 1; + * @generated from field: repeated proofs.BlockHeader block_headers = 1; */ blockHeaders: BlockHeader[]; @@ -1331,7 +1332,7 @@ export declare class QueryGetBlockHeaderByHashRequest extends Message { /** - * @generated from field: common.BlockHeader block_header = 1; + * @generated from field: proofs.BlockHeader block_header = 1; */ blockHeader?: BlockHeader; diff --git a/typescript/observer/tx_pb.d.ts b/typescript/observer/tx_pb.d.ts index 4f7a346cc2..4418e5569e 100644 --- a/typescript/observer/tx_pb.d.ts +++ b/typescript/observer/tx_pb.d.ts @@ -6,7 +6,7 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; import type { ObserverUpdateReason } from "./observer_pb.js"; -import type { HeaderData } from "../common/common_pb.js"; +import type { HeaderData } from "../pkg/proofs/proofs_pb.js"; import type { ChainParams } from "./params_pb.js"; import type { Blame } from "./blame_pb.js"; import type { BlockHeaderVerificationFlags, GasPriceIncreaseFlags } from "./crosschain_flags_pb.js"; @@ -94,7 +94,7 @@ export declare class MsgAddBlockHeader extends Message { height: bigint; /** - * @generated from field: common.HeaderData header = 5; + * @generated from field: proofs.HeaderData header = 5; */ header?: HeaderData; diff --git a/typescript/pkg/chains/chains_pb.d.ts b/typescript/pkg/chains/chains_pb.d.ts new file mode 100644 index 0000000000..0a04c14420 --- /dev/null +++ b/typescript/pkg/chains/chains_pb.d.ts @@ -0,0 +1,152 @@ +// @generated by protoc-gen-es v1.3.0 with parameter "target=dts" +// @generated from file pkg/chains/chains.proto (package chains, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * @generated from enum chains.ReceiveStatus + */ +export declare enum ReceiveStatus { + /** + * some observer sees inbound tx + * + * @generated from enum value: Created = 0; + */ + Created = 0, + + /** + * @generated from enum value: Success = 1; + */ + Success = 1, + + /** + * @generated from enum value: Failed = 2; + */ + Failed = 2, +} + +/** + * @generated from enum chains.ChainName + */ +export declare enum ChainName { + /** + * @generated from enum value: empty = 0; + */ + empty = 0, + + /** + * @generated from enum value: eth_mainnet = 1; + */ + eth_mainnet = 1, + + /** + * @generated from enum value: zeta_mainnet = 2; + */ + zeta_mainnet = 2, + + /** + * @generated from enum value: btc_mainnet = 3; + */ + btc_mainnet = 3, + + /** + * @generated from enum value: polygon_mainnet = 4; + */ + polygon_mainnet = 4, + + /** + * @generated from enum value: bsc_mainnet = 5; + */ + bsc_mainnet = 5, + + /** + * Testnet + * + * @generated from enum value: goerli_testnet = 6; + */ + goerli_testnet = 6, + + /** + * @generated from enum value: mumbai_testnet = 7; + */ + mumbai_testnet = 7, + + /** + * @generated from enum value: ganache_testnet = 8; + */ + ganache_testnet = 8, + + /** + * @generated from enum value: baobab_testnet = 9; + */ + baobab_testnet = 9, + + /** + * @generated from enum value: bsc_testnet = 10; + */ + bsc_testnet = 10, + + /** + * @generated from enum value: zeta_testnet = 11; + */ + zeta_testnet = 11, + + /** + * @generated from enum value: btc_testnet = 12; + */ + btc_testnet = 12, + + /** + * @generated from enum value: sepolia_testnet = 13; + */ + sepolia_testnet = 13, + + /** + * LocalNet + * zeta_localnet = 13; + * + * @generated from enum value: goerli_localnet = 14; + */ + goerli_localnet = 14, + + /** + * Athens + * zeta_athensnet=15; + * + * @generated from enum value: btc_regtest = 15; + */ + btc_regtest = 15, +} + +/** + * @generated from message chains.Chain + */ +export declare class Chain extends Message { + /** + * @generated from field: chains.ChainName chain_name = 1; + */ + chainName: ChainName; + + /** + * @generated from field: int64 chain_id = 2; + */ + chainId: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "chains.Chain"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Chain; + + static fromJson(jsonValue: JsonValue, options?: Partial): Chain; + + static fromJsonString(jsonString: string, options?: Partial): Chain; + + static equals(a: Chain | PlainMessage | undefined, b: Chain | PlainMessage | undefined): boolean; +} + diff --git a/typescript/pkg/chains/index.d.ts b/typescript/pkg/chains/index.d.ts new file mode 100644 index 0000000000..1c53d86b35 --- /dev/null +++ b/typescript/pkg/chains/index.d.ts @@ -0,0 +1 @@ +export * from "./chains_pb"; diff --git a/typescript/pkg/coin/coin_pb.d.ts b/typescript/pkg/coin/coin_pb.d.ts new file mode 100644 index 0000000000..394472cf10 --- /dev/null +++ b/typescript/pkg/coin/coin_pb.d.ts @@ -0,0 +1,36 @@ +// @generated by protoc-gen-es v1.3.0 with parameter "target=dts" +// @generated from file pkg/coin/coin.proto (package coin, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +/** + * @generated from enum coin.CoinType + */ +export declare enum CoinType { + /** + * @generated from enum value: Zeta = 0; + */ + Zeta = 0, + + /** + * Ether, BNB, Matic, Klay, BTC, etc + * + * @generated from enum value: Gas = 1; + */ + Gas = 1, + + /** + * ERC20 token + * + * @generated from enum value: ERC20 = 2; + */ + ERC20 = 2, + + /** + * not a real coin, rather a command + * + * @generated from enum value: Cmd = 3; + */ + Cmd = 3, +} + diff --git a/typescript/pkg/coin/index.d.ts b/typescript/pkg/coin/index.d.ts new file mode 100644 index 0000000000..4ca9ff3633 --- /dev/null +++ b/typescript/pkg/coin/index.d.ts @@ -0,0 +1 @@ +export * from "./coin_pb"; diff --git a/typescript/pkg/crypto/crypto_pb.d.ts b/typescript/pkg/crypto/crypto_pb.d.ts new file mode 100644 index 0000000000..2e29039c56 --- /dev/null +++ b/typescript/pkg/crypto/crypto_pb.d.ts @@ -0,0 +1,39 @@ +// @generated by protoc-gen-es v1.3.0 with parameter "target=dts" +// @generated from file pkg/crypto/crypto.proto (package crypto, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * PubKeySet contains two pub keys , secp256k1 and ed25519 + * + * @generated from message crypto.PubKeySet + */ +export declare class PubKeySet extends Message { + /** + * @generated from field: string secp256k1 = 1; + */ + secp256k1: string; + + /** + * @generated from field: string ed25519 = 2; + */ + ed25519: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "crypto.PubKeySet"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): PubKeySet; + + static fromJson(jsonValue: JsonValue, options?: Partial): PubKeySet; + + static fromJsonString(jsonString: string, options?: Partial): PubKeySet; + + static equals(a: PubKeySet | PlainMessage | undefined, b: PubKeySet | PlainMessage | undefined): boolean; +} + diff --git a/typescript/pkg/crypto/index.d.ts b/typescript/pkg/crypto/index.d.ts new file mode 100644 index 0000000000..3e597e1b09 --- /dev/null +++ b/typescript/pkg/crypto/index.d.ts @@ -0,0 +1 @@ +export * from "./crypto_pb"; diff --git a/typescript/common/bitcoin/bitcoin_pb.d.ts b/typescript/pkg/proofs/bitcoin/bitcoin_pb.d.ts similarity index 92% rename from typescript/common/bitcoin/bitcoin_pb.d.ts rename to typescript/pkg/proofs/bitcoin/bitcoin_pb.d.ts index 4ba8f93863..baeeb0f2f0 100644 --- a/typescript/common/bitcoin/bitcoin_pb.d.ts +++ b/typescript/pkg/proofs/bitcoin/bitcoin_pb.d.ts @@ -1,5 +1,5 @@ // @generated by protoc-gen-es v1.3.0 with parameter "target=dts" -// @generated from file common/bitcoin/bitcoin.proto (package bitcoin, syntax proto3) +// @generated from file pkg/proofs/bitcoin/bitcoin.proto (package bitcoin, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/typescript/common/bitcoin/index.d.ts b/typescript/pkg/proofs/bitcoin/index.d.ts similarity index 100% rename from typescript/common/bitcoin/index.d.ts rename to typescript/pkg/proofs/bitcoin/index.d.ts diff --git a/typescript/common/ethereum/ethereum_pb.d.ts b/typescript/pkg/proofs/ethereum/ethereum_pb.d.ts similarity index 92% rename from typescript/common/ethereum/ethereum_pb.d.ts rename to typescript/pkg/proofs/ethereum/ethereum_pb.d.ts index d0d2fa9513..28d7ba9671 100644 --- a/typescript/common/ethereum/ethereum_pb.d.ts +++ b/typescript/pkg/proofs/ethereum/ethereum_pb.d.ts @@ -1,5 +1,5 @@ // @generated by protoc-gen-es v1.3.0 with parameter "target=dts" -// @generated from file common/ethereum/ethereum.proto (package ethereum, syntax proto3) +// @generated from file pkg/proofs/ethereum/ethereum.proto (package ethereum, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/typescript/common/ethereum/index.d.ts b/typescript/pkg/proofs/ethereum/index.d.ts similarity index 100% rename from typescript/common/ethereum/index.d.ts rename to typescript/pkg/proofs/ethereum/index.d.ts diff --git a/typescript/pkg/proofs/index.d.ts b/typescript/pkg/proofs/index.d.ts new file mode 100644 index 0000000000..367acd3a6e --- /dev/null +++ b/typescript/pkg/proofs/index.d.ts @@ -0,0 +1 @@ +export * from "./proofs_pb"; diff --git a/typescript/pkg/proofs/proofs_pb.d.ts b/typescript/pkg/proofs/proofs_pb.d.ts new file mode 100644 index 0000000000..5e0e804c09 --- /dev/null +++ b/typescript/pkg/proofs/proofs_pb.d.ts @@ -0,0 +1,132 @@ +// @generated by protoc-gen-es v1.3.0 with parameter "target=dts" +// @generated from file pkg/proofs/proofs.proto (package proofs, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import type { Proof as Proof$1 } from "./ethereum/ethereum_pb.js"; +import type { Proof as Proof$2 } from "./bitcoin/bitcoin_pb.js"; + +/** + * @generated from message proofs.BlockHeader + */ +export declare class BlockHeader extends Message { + /** + * @generated from field: int64 height = 1; + */ + height: bigint; + + /** + * @generated from field: bytes hash = 2; + */ + hash: Uint8Array; + + /** + * @generated from field: bytes parent_hash = 3; + */ + parentHash: Uint8Array; + + /** + * @generated from field: int64 chain_id = 4; + */ + chainId: bigint; + + /** + * chain specific header + * + * @generated from field: proofs.HeaderData header = 5; + */ + header?: HeaderData; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "proofs.BlockHeader"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): BlockHeader; + + static fromJson(jsonValue: JsonValue, options?: Partial): BlockHeader; + + static fromJsonString(jsonString: string, options?: Partial): BlockHeader; + + static equals(a: BlockHeader | PlainMessage | undefined, b: BlockHeader | PlainMessage | undefined): boolean; +} + +/** + * @generated from message proofs.HeaderData + */ +export declare class HeaderData extends Message { + /** + * @generated from oneof proofs.HeaderData.data + */ + data: { + /** + * binary encoded headers; RLP for ethereum + * + * @generated from field: bytes ethereum_header = 1; + */ + value: Uint8Array; + case: "ethereumHeader"; + } | { + /** + * 80-byte little-endian encoded binary data + * + * @generated from field: bytes bitcoin_header = 2; + */ + value: Uint8Array; + case: "bitcoinHeader"; + } | { case: undefined; value?: undefined }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "proofs.HeaderData"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): HeaderData; + + static fromJson(jsonValue: JsonValue, options?: Partial): HeaderData; + + static fromJsonString(jsonString: string, options?: Partial): HeaderData; + + static equals(a: HeaderData | PlainMessage | undefined, b: HeaderData | PlainMessage | undefined): boolean; +} + +/** + * @generated from message proofs.Proof + */ +export declare class Proof extends Message { + /** + * @generated from oneof proofs.Proof.proof + */ + proof: { + /** + * @generated from field: ethereum.Proof ethereum_proof = 1; + */ + value: Proof$1; + case: "ethereumProof"; + } | { + /** + * @generated from field: bitcoin.Proof bitcoin_proof = 2; + */ + value: Proof$2; + case: "bitcoinProof"; + } | { case: undefined; value?: undefined }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "proofs.Proof"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Proof; + + static fromJson(jsonValue: JsonValue, options?: Partial): Proof; + + static fromJsonString(jsonString: string, options?: Partial): Proof; + + static equals(a: Proof | PlainMessage | undefined, b: Proof | PlainMessage | undefined): boolean; +} + From a1c1d328d0a1f961f6ff7bc067a89dee19cb52d6 Mon Sep 17 00:00:00 2001 From: skosito Date: Mon, 25 Mar 2024 18:57:32 +0100 Subject: [PATCH 35/41] Changelog --- changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog.md b/changelog.md index 255acc2fb7..25c2c8b6ec 100644 --- a/changelog.md +++ b/changelog.md @@ -20,6 +20,7 @@ * [1885](https://github.com/zeta-chain/node/pull/1885) - change important metrics on port 8123 to be prometheus compatible * [1863](https://github.com/zeta-chain/node/pull/1863) - remove duplicate ValidateChainParams function * [1914](https://github.com/zeta-chain/node/pull/1914) - move crosschain flags to core context in zetaclient +* [1936](https://github.com/zeta-chain/node/pull/1936) - refactor common package into subpackages and rename to pkg ### Features From c248954bf2905435c3a538d5bd0eb4ef79c9bc26 Mon Sep 17 00:00:00 2001 From: skosito Date: Mon, 25 Mar 2024 19:30:05 +0100 Subject: [PATCH 36/41] Fix tests --- pkg/proofs/headers_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/proofs/headers_test.go b/pkg/proofs/headers_test.go index f9499a9c2b..9b10450fb0 100644 --- a/pkg/proofs/headers_test.go +++ b/pkg/proofs/headers_test.go @@ -24,7 +24,7 @@ const numHeadersToTest = 100 func TestTrueEthereumHeader(t *testing.T) { var header ethtypes.Header // read file into a byte slice - file, err := os.Open("./testdata/eth_header_18495266.json") + file, err := os.Open("../testdata/eth_header_18495266.json") require.NoError(t, err) defer file.Close() headerBytes := make([]byte, 4096) @@ -51,7 +51,7 @@ func TestTrueEthereumHeader(t *testing.T) { func TestFalseEthereumHeader(t *testing.T) { var header ethtypes.Header // read file into a byte slice - file, err := os.Open("./testdata/eth_header_18495266.json") + file, err := os.Open("../testdata/eth_header_18495266.json") require.NoError(t, err) defer file.Close() headerBytes := make([]byte, 4096) From dcb3b5a9e8f677229ac9b21405c296023c158de1 Mon Sep 17 00:00:00 2001 From: skosito Date: Tue, 26 Mar 2024 16:33:26 +0100 Subject: [PATCH 37/41] Cleanup cosmos pkg --- cmd/zetaclientd/hsm.go | 3 +- cmd/zetaclientd/main.go | 4 +- cmd/zetaclientd/utils.go | 3 +- pkg/cosmos/cosmos.go | 67 ++---------------------- zetaclient/keys/keys.go | 2 +- zetaclient/keys/keys_test.go | 6 +-- zetaclient/zetabridge/broadcast.go | 3 +- zetaclient/zetabridge/zetacore_bridge.go | 4 +- 8 files changed, 15 insertions(+), 77 deletions(-) diff --git a/cmd/zetaclientd/hsm.go b/cmd/zetaclientd/hsm.go index 3ddf2728d8..578d7909cb 100644 --- a/cmd/zetaclientd/hsm.go +++ b/cmd/zetaclientd/hsm.go @@ -3,6 +3,7 @@ package main import ( "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/pkg/errors" "github.com/spf13/cobra" keystone "github.com/zeta-chain/keystone/keys" @@ -63,7 +64,7 @@ func GetHsmAddress(_ *cobra.Command, _ []string) error { return err } - address, err := cosmos.Bech32ifyAddressBytes(cmd.Bech32PrefixAccAddr, pubKey.Address().Bytes()) + address, err := sdk.Bech32ifyAddressBytes(cmd.Bech32PrefixAccAddr, pubKey.Address().Bytes()) if err != nil { return err } diff --git a/cmd/zetaclientd/main.go b/cmd/zetaclientd/main.go index ff45efe7ee..54aa4acc66 100644 --- a/cmd/zetaclientd/main.go +++ b/cmd/zetaclientd/main.go @@ -8,12 +8,12 @@ import ( ecdsakeygen "github.com/binance-chain/tss-lib/ecdsa/keygen" "github.com/cosmos/cosmos-sdk/server" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/rs/zerolog" clientcommon "github.com/zeta-chain/zetacore/zetaclient/common" "github.com/zeta-chain/zetacore/zetaclient/config" "github.com/zeta-chain/zetacore/cmd" - "github.com/zeta-chain/zetacore/pkg/cosmos" //mcconfig "github.com/Meta-Protocol/zetacore/metaclient/config" "github.com/cosmos/cosmos-sdk/types" @@ -46,7 +46,7 @@ func main() { } func SetupConfigForTest() { - config := cosmos.GetConfig() + config := sdk.GetConfig() config.SetBech32PrefixForAccount(cmd.Bech32PrefixAccAddr, cmd.Bech32PrefixAccPub) config.SetBech32PrefixForValidator(cmd.Bech32PrefixValAddr, cmd.Bech32PrefixValPub) config.SetBech32PrefixForConsensusNode(cmd.Bech32PrefixConsAddr, cmd.Bech32PrefixConsPub) diff --git a/cmd/zetaclientd/utils.go b/cmd/zetaclientd/utils.go index 5a1c346619..1ea6eb8c5b 100644 --- a/cmd/zetaclientd/utils.go +++ b/cmd/zetaclientd/utils.go @@ -3,7 +3,6 @@ package main import ( sdk "github.com/cosmos/cosmos-sdk/types" ethcommon "github.com/ethereum/go-ethereum/common" - "github.com/zeta-chain/zetacore/pkg/cosmos" appcontext "github.com/zeta-chain/zetacore/zetaclient/app_context" "github.com/zeta-chain/zetacore/zetaclient/authz" "github.com/zeta-chain/zetacore/zetaclient/bitcoin" @@ -34,7 +33,7 @@ func CreateZetaBridge(cfg config.Config, telemetry *metrics.TelemetryServer, hot return nil, err } - granterAddreess, err := cosmos.AccAddressFromBech32(cfg.AuthzGranter) + granterAddreess, err := sdk.AccAddressFromBech32(cfg.AuthzGranter) if err != nil { return nil, err } diff --git a/pkg/cosmos/cosmos.go b/pkg/cosmos/cosmos.go index 9d0c072a8c..bcaccacf11 100644 --- a/pkg/cosmos/cosmos.go +++ b/pkg/cosmos/cosmos.go @@ -1,72 +1,11 @@ package cosmos import ( - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/bech32/legacybech32" // nolint - se "github.com/cosmos/cosmos-sdk/types/errors" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) -const DefaultCoinDecimals = 18 - var ( - KeyringServiceName = sdk.KeyringServiceName - NewRoute = sdk.NewRoute - NewKVStoreKeys = sdk.NewKVStoreKeys - NewUint = sdk.NewUint - NewInt = sdk.NewInt - NewDec = sdk.NewDec - ZeroDec = sdk.ZeroDec - NewCoin = sdk.NewCoin - NewCoins = sdk.NewCoins - ParseCoins = sdk.ParseCoinsNormalized - NewDecWithPrec = sdk.NewDecWithPrec - NewDecFromBigInt = sdk.NewDecFromBigInt - NewIntFromBigInt = sdk.NewIntFromBigInt - AccAddressFromBech32 = sdk.AccAddressFromBech32 - VerifyAddressFormat = sdk.VerifyAddressFormat - GetFromBech32 = sdk.GetFromBech32 - NewAttribute = sdk.NewAttribute - NewDecFromStr = sdk.NewDecFromStr - GetConfig = sdk.GetConfig - NewEvent = sdk.NewEvent - RegisterCodec = sdk.RegisterLegacyAminoCodec - NewEventManager = sdk.NewEventManager - EventTypeMessage = sdk.EventTypeMessage - AttributeKeyModule = sdk.AttributeKeyModule - KVStorePrefixIterator = sdk.KVStorePrefixIterator - NewKVStoreKey = sdk.NewKVStoreKey - NewTransientStoreKey = sdk.NewTransientStoreKey - NewContext = sdk.NewContext - Bech32ifyAddressBytes = sdk.Bech32ifyAddressBytes - GetPubKeyFromBech32 = legacybech32.UnmarshalPubKey - Bech32ifyPubKey = legacybech32.MarshalPubKey - Bech32PubKeyTypeConsPub = legacybech32.ConsPK - Bech32PubKeyTypeAccPub = legacybech32.AccPK - Wrapf = se.Wrapf - MustSortJSON = sdk.MustSortJSON - CodeUnauthorized = uint32(4) - CodeInsufficientFunds = uint32(5) -) - -type ( - Context = sdk.Context - Route = sdk.Route - Uint = sdk.Uint - Coin = sdk.Coin - Coins = sdk.Coins - AccAddress = sdk.AccAddress - Attribute = sdk.Attribute - Result = sdk.Result - Event = sdk.Event - Events = sdk.Events - Dec = sdk.Dec - Msg = sdk.Msg - Iterator = sdk.Iterator - Handler = sdk.Handler - Querier = sdk.Querier - TxResponse = sdk.TxResponse - Account = authtypes.AccountI + GetPubKeyFromBech32 = legacybech32.UnmarshalPubKey + Bech32ifyPubKey = legacybech32.MarshalPubKey + Bech32PubKeyTypeAccPub = legacybech32.AccPK ) - -var _ sdk.Address = AccAddress{} diff --git a/zetaclient/keys/keys.go b/zetaclient/keys/keys.go index 0f028474e5..1ca248aff9 100644 --- a/zetaclient/keys/keys.go +++ b/zetaclient/keys/keys.go @@ -184,7 +184,7 @@ func (k *Keys) GetHotkeyPassword() string { } func SetupConfigForTest() { - config := cosmos.GetConfig() + config := sdk.GetConfig() config.SetBech32PrefixForAccount(cmd.Bech32PrefixAccAddr, cmd.Bech32PrefixAccPub) config.SetBech32PrefixForValidator(cmd.Bech32PrefixValAddr, cmd.Bech32PrefixValPub) config.SetBech32PrefixForConsensusNode(cmd.Bech32PrefixConsAddr, cmd.Bech32PrefixConsPub) diff --git a/zetaclient/keys/keys_test.go b/zetaclient/keys/keys_test.go index a41f8c90fd..347195869f 100644 --- a/zetaclient/keys/keys_test.go +++ b/zetaclient/keys/keys_test.go @@ -18,8 +18,8 @@ import ( "github.com/zeta-chain/zetacore/zetaclient/config" . "gopkg.in/check.v1" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/zeta-chain/zetacore/cmd" - "github.com/zeta-chain/zetacore/pkg/cosmos" ) type KeysSuite struct{} @@ -53,7 +53,7 @@ func (*KeysSuite) setupKeysForTest(c *C) string { registry := codectypes.NewInterfaceRegistry() cryptocodec.RegisterInterfaces(registry) cdc := codec.NewProtoCodec(registry) - kb, err := cKeys.New(cosmos.KeyringServiceName(), cKeys.BackendTest, metaCliDir, buf, cdc) + kb, err := cKeys.New(sdk.KeyringServiceName(), cKeys.BackendTest, metaCliDir, buf, cdc) c.Assert(err, IsNil) _, _, err = kb.NewMnemonic(GetGranteeKeyName(signerNameForTest), cKeys.English, cmd.ZetaChainHDPath, password, hd.Secp256k1) @@ -91,7 +91,7 @@ func (ks *KeysSuite) TestNewKeys(c *C) { k, _, err := GetKeyringKeybase(cfg, "") c.Assert(err, IsNil) c.Assert(k, NotNil) - granter := cosmos.AccAddress(crypto.AddressHash([]byte("granter"))) + granter := sdk.AccAddress(crypto.AddressHash([]byte("granter"))) ki := NewKeysWithKeybase(k, granter, signerNameForTest, "") kInfo := ki.GetSignerInfo() c.Assert(kInfo, NotNil) diff --git a/zetaclient/zetabridge/broadcast.go b/zetaclient/zetabridge/broadcast.go index f96b6ff035..9c1e620474 100644 --- a/zetaclient/zetabridge/broadcast.go +++ b/zetaclient/zetabridge/broadcast.go @@ -20,7 +20,6 @@ import ( rpchttp "github.com/tendermint/tendermint/rpc/client/http" "github.com/zeta-chain/zetacore/app/ante" "github.com/zeta-chain/zetacore/cmd/zetacored/config" - "github.com/zeta-chain/zetacore/pkg/cosmos" "github.com/zeta-chain/zetacore/zetaclient/hsm" ) @@ -87,7 +86,7 @@ func (b *ZetaCoreBridge) Broadcast(gaslimit uint64, authzWrappedMsg sdktypes.Msg // #nosec G701 always in range fee := sdktypes.NewCoins(sdktypes.NewCoin(config.BaseDenom, - cosmos.NewInt(int64(gaslimit)).Mul(adjustedBaseGasPrice.Ceil().RoundInt()))) + sdktypes.NewInt(int64(gaslimit)).Mul(adjustedBaseGasPrice.Ceil().RoundInt()))) builder.SetFeeAmount(fee) err = b.SignTx(factory, ctx.GetFromName(), builder, true, ctx.TxConfig) if err != nil { diff --git a/zetaclient/zetabridge/zetacore_bridge.go b/zetaclient/zetabridge/zetacore_bridge.go index 9aaa03f228..684092c744 100644 --- a/zetaclient/zetabridge/zetacore_bridge.go +++ b/zetaclient/zetabridge/zetacore_bridge.go @@ -7,6 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/simapp/params" + sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/hashicorp/go-retryablehttp" @@ -15,7 +16,6 @@ import ( "github.com/zeta-chain/zetacore/app" "github.com/zeta-chain/zetacore/pkg/authz" "github.com/zeta-chain/zetacore/pkg/chains" - "github.com/zeta-chain/zetacore/pkg/cosmos" crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" "github.com/zeta-chain/zetacore/zetaclient/config" @@ -113,7 +113,7 @@ func MakeLegacyCodec() *codec.LegacyAmino { cdc := codec.NewLegacyAmino() banktypes.RegisterLegacyAminoCodec(cdc) authtypes.RegisterLegacyAminoCodec(cdc) - cosmos.RegisterCodec(cdc) + sdk.RegisterLegacyAminoCodec(cdc) crosschaintypes.RegisterCodec(cdc) return cdc } From 9ba365f4028b5739cc50333a05ffb819539de219 Mon Sep 17 00:00:00 2001 From: skosito Date: Tue, 26 Mar 2024 16:33:49 +0100 Subject: [PATCH 38/41] Version fixes --- .goreleaser.yaml | 8 ++++---- Makefile | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 0b3917dead..23bf31b912 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -56,10 +56,10 @@ builds: - -X github.com/cosmos/cosmos-sdk/version.ClientName=zetaclientd - -X github.com/cosmos/cosmos-sdk/version.Version={{ .Version }} - -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Env.COMMIT }} - - -X github.com/zeta-chain/zetacore/common.Name=zetacored - - -X github.com/zeta-chain/zetacore/common.Version={{ .Version }} - - -X github.com/zeta-chain/zetacore/common.CommitHash={{ .Env.COMMIT }} - - -X github.com/zeta-chain/zetacore/common.BuildTime=={{ .Env.BUILDTIME }} + - -X github.com/zeta-chain/zetacore/pkg.Name=zetacored + - -X github.com/zeta-chain/zetacore/pkg.Version={{ .Version }} + - -X github.com/zeta-chain/zetacore/pkg.CommitHash={{ .Env.COMMIT }} + - -X github.com/zeta-chain/zetacore/pkg.BuildTime=={{ .Env.BUILDTIME }} - -X github.com/cosmos/cosmos-sdk/types.DBBackend=pebbledb - id: "zetaclientd" diff --git a/Makefile b/Makefile index 9a4ccfe3fa..440a761186 100644 --- a/Makefile +++ b/Makefile @@ -12,10 +12,10 @@ ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=zetacore \ -X github.com/cosmos/cosmos-sdk/version.ClientName=zetaclientd \ -X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \ -X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \ - -X github.com/zeta-chain/zetacore/common.Name=zetacored \ - -X github.com/zeta-chain/zetacore/common.Version=$(VERSION) \ - -X github.com/zeta-chain/zetacore/common.CommitHash=$(COMMIT) \ - -X github.com/zeta-chain/zetacore/common.BuildTime=$(BUILDTIME) \ + -X github.com/zeta-chain/zetacore/pkg.Name=zetacored \ + -X github.com/zeta-chain/zetacore/pkg.Version=$(VERSION) \ + -X github.com/zeta-chain/zetacore/pkg.CommitHash=$(COMMIT) \ + -X github.com/zeta-chain/zetacore/pkg.BuildTime=$(BUILDTIME) \ -X github.com/cosmos/cosmos-sdk/types.DBBackend=pebbledb BUILD_FLAGS := -ldflags '$(ldflags)' -tags pebbledb,ledger From a409b7485688d40aa4e6d38e863d4c30aa698685 Mon Sep 17 00:00:00 2001 From: skosito Date: Tue, 26 Mar 2024 16:38:47 +0100 Subject: [PATCH 39/41] PR comments --- pkg/chains/{utils.go => conversion.go} | 0 pkg/commands.go | 8 -------- pkg/constant.go | 4 ++++ 3 files changed, 4 insertions(+), 8 deletions(-) rename pkg/chains/{utils.go => conversion.go} (100%) delete mode 100644 pkg/commands.go diff --git a/pkg/chains/utils.go b/pkg/chains/conversion.go similarity index 100% rename from pkg/chains/utils.go rename to pkg/chains/conversion.go diff --git a/pkg/commands.go b/pkg/commands.go deleted file mode 100644 index 96900771b6..0000000000 --- a/pkg/commands.go +++ /dev/null @@ -1,8 +0,0 @@ -package pkg - -// commands for the zetaclient; mostly administrative commands/txs - -const ( - CmdWhitelistERC20 = "cmd_whitelist_erc20" - CmdMigrateTssFunds = "cmd_migrate_tss_funds" -) diff --git a/pkg/constant.go b/pkg/constant.go index 11a0bdc151..c52094ac22 100644 --- a/pkg/constant.go +++ b/pkg/constant.go @@ -4,4 +4,8 @@ const ( // DonationMessage is the message for donation transactions // Transaction sent to the TSS or ERC20 Custody address containing this message are considered as a donation DonationMessage = "I am rich!" + // CmdWhitelistERC20 is used for CCTX of type cmd to give the instruction to the TSS to whitelist an ERC20 on an exeternal chain + CmdWhitelistERC20 = "cmd_whitelist_erc20" + // CmdMigrateTssFunds is used for CCTX of type cmd to give the instruction to the TSS to transfer its funds on a new address + CmdMigrateTssFunds = "cmd_migrate_tss_funds" ) From f9683c7726b4ca97ad92eb1bf969e354f9b5a771 Mon Sep 17 00:00:00 2001 From: skosito Date: Tue, 26 Mar 2024 16:45:33 +0100 Subject: [PATCH 40/41] Lint fix --- cmd/zetaclientd/main.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/zetaclientd/main.go b/cmd/zetaclientd/main.go index 54aa4acc66..9502c438f9 100644 --- a/cmd/zetaclientd/main.go +++ b/cmd/zetaclientd/main.go @@ -8,7 +8,6 @@ import ( ecdsakeygen "github.com/binance-chain/tss-lib/ecdsa/keygen" "github.com/cosmos/cosmos-sdk/server" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/rs/zerolog" clientcommon "github.com/zeta-chain/zetacore/zetaclient/common" "github.com/zeta-chain/zetacore/zetaclient/config" @@ -46,7 +45,7 @@ func main() { } func SetupConfigForTest() { - config := sdk.GetConfig() + config := types.GetConfig() config.SetBech32PrefixForAccount(cmd.Bech32PrefixAccAddr, cmd.Bech32PrefixAccPub) config.SetBech32PrefixForValidator(cmd.Bech32PrefixValAddr, cmd.Bech32PrefixValPub) config.SetBech32PrefixForConsensusNode(cmd.Bech32PrefixConsAddr, cmd.Bech32PrefixConsPub) From 222adeb883baa7cebdcffd2650c23f8d30160084 Mon Sep 17 00:00:00 2001 From: skosito Date: Tue, 26 Mar 2024 19:59:07 +0100 Subject: [PATCH 41/41] PR comments --- .goreleaser.yaml | 8 ++++---- Makefile | 8 ++++---- cmd/zetaclientd/start.go | 4 ++-- cmd/zetaclientd/version.go | 4 ++-- cmd/zetatool/filterdeposit/btc.go | 4 ++-- cmd/zetatool/filterdeposit/evm.go | 4 ++-- e2e/e2etests/test_donation.go | 4 ++-- e2e/runner/bitcoin.go | 4 ++-- e2e/runner/setup_evm.go | 4 ++-- pkg/{ => constant}/constant.go | 2 +- pkg/{ => constant}/version.go | 2 +- rpc/namespaces/ethereum/web3/api.go | 4 ++-- x/crosschain/keeper/msg_server_migrate_tss_funds.go | 4 ++-- x/crosschain/keeper/msg_server_whitelist_erc20.go | 4 ++-- x/crosschain/keeper/msg_server_whitelist_erc20_test.go | 4 ++-- zetaclient/bitcoin/bitcoin_client.go | 4 ++-- zetaclient/evm/evm_signer.go | 6 +++--- zetaclient/evm/evm_signer_test.go | 6 +++--- zetaclient/evm/inbounds.go | 6 +++--- zetaclient/evm/inbounds_test.go | 6 +++--- 20 files changed, 46 insertions(+), 46 deletions(-) rename pkg/{ => constant}/constant.go (97%) rename pkg/{ => constant}/version.go (81%) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 23bf31b912..16541f2291 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -56,10 +56,10 @@ builds: - -X github.com/cosmos/cosmos-sdk/version.ClientName=zetaclientd - -X github.com/cosmos/cosmos-sdk/version.Version={{ .Version }} - -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Env.COMMIT }} - - -X github.com/zeta-chain/zetacore/pkg.Name=zetacored - - -X github.com/zeta-chain/zetacore/pkg.Version={{ .Version }} - - -X github.com/zeta-chain/zetacore/pkg.CommitHash={{ .Env.COMMIT }} - - -X github.com/zeta-chain/zetacore/pkg.BuildTime=={{ .Env.BUILDTIME }} + - -X github.com/zeta-chain/zetacore/pkg/constant.Name=zetacored + - -X github.com/zeta-chain/zetacore/pkg/constant.Version={{ .Version }} + - -X github.com/zeta-chain/zetacore/pkg/constant.CommitHash={{ .Env.COMMIT }} + - -X github.com/zeta-chain/zetacore/pkg/constant.BuildTime={{ .Env.BUILDTIME }} - -X github.com/cosmos/cosmos-sdk/types.DBBackend=pebbledb - id: "zetaclientd" diff --git a/Makefile b/Makefile index 440a761186..b8a6d7415f 100644 --- a/Makefile +++ b/Makefile @@ -12,10 +12,10 @@ ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=zetacore \ -X github.com/cosmos/cosmos-sdk/version.ClientName=zetaclientd \ -X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \ -X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \ - -X github.com/zeta-chain/zetacore/pkg.Name=zetacored \ - -X github.com/zeta-chain/zetacore/pkg.Version=$(VERSION) \ - -X github.com/zeta-chain/zetacore/pkg.CommitHash=$(COMMIT) \ - -X github.com/zeta-chain/zetacore/pkg.BuildTime=$(BUILDTIME) \ + -X github.com/zeta-chain/zetacore/pkg/constant.Name=zetacored \ + -X github.com/zeta-chain/zetacore/pkg/constant.Version=$(VERSION) \ + -X github.com/zeta-chain/zetacore/pkg/constant.CommitHash=$(COMMIT) \ + -X github.com/zeta-chain/zetacore/pkg/constant.BuildTime=$(BUILDTIME) \ -X github.com/cosmos/cosmos-sdk/types.DBBackend=pebbledb BUILD_FLAGS := -ldflags '$(ldflags)' -tags pebbledb,ledger diff --git a/cmd/zetaclientd/start.go b/cmd/zetaclientd/start.go index c591cd781c..56d77e0950 100644 --- a/cmd/zetaclientd/start.go +++ b/cmd/zetaclientd/start.go @@ -20,8 +20,8 @@ import ( "github.com/spf13/cobra" "github.com/tendermint/tendermint/crypto/secp256k1" "github.com/zeta-chain/go-tss/p2p" - "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/pkg/authz" + "github.com/zeta-chain/zetacore/pkg/constant" observerTypes "github.com/zeta-chain/zetacore/x/observer/types" mc "github.com/zeta-chain/zetacore/zetaclient" appcontext "github.com/zeta-chain/zetacore/zetaclient/app_context" @@ -170,7 +170,7 @@ func start(_ *cobra.Command, _ []string) error { } m.Start() - metrics.Info.WithLabelValues(pkg.Version).Set(1) + metrics.Info.WithLabelValues(constant.Version).Set(1) metrics.LastStartTime.SetToCurrentTime() var tssHistoricalList []observerTypes.TSS diff --git a/cmd/zetaclientd/version.go b/cmd/zetaclientd/version.go index 5c0c274253..0cdc1ac59e 100644 --- a/cmd/zetaclientd/version.go +++ b/cmd/zetaclientd/version.go @@ -4,7 +4,7 @@ import ( "fmt" "github.com/spf13/cobra" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/constant" ) var VersionCmd = &cobra.Command{ @@ -14,6 +14,6 @@ var VersionCmd = &cobra.Command{ } func Version(_ *cobra.Command, _ []string) error { - fmt.Printf(pkg.Version) + fmt.Printf(constant.Version) return nil } diff --git a/cmd/zetatool/filterdeposit/btc.go b/cmd/zetatool/filterdeposit/btc.go index a8ded3f08b..684bb4b428 100644 --- a/cmd/zetatool/filterdeposit/btc.go +++ b/cmd/zetatool/filterdeposit/btc.go @@ -13,7 +13,7 @@ import ( "github.com/spf13/cobra" "github.com/zeta-chain/zetacore/cmd/zetatool/config" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/constant" ) func NewBtcCmd() *cobra.Command { @@ -162,7 +162,7 @@ func getHashList(cfg *config.Config, tssAddress string) ([]Deposit, error) { if err != nil { continue } - if bytes.Equal(memoBytes, []byte(pkg.DonationMessage)) { + if bytes.Equal(memoBytes, []byte(constant.DonationMessage)) { continue } } else { diff --git a/cmd/zetatool/filterdeposit/evm.go b/cmd/zetatool/filterdeposit/evm.go index 4e26ed1338..e9ed6b3d63 100644 --- a/cmd/zetatool/filterdeposit/evm.go +++ b/cmd/zetatool/filterdeposit/evm.go @@ -18,7 +18,7 @@ import ( "github.com/zeta-chain/protocol-contracts/pkg/contracts/evm/erc20custody.sol" "github.com/zeta-chain/protocol-contracts/pkg/contracts/evm/zetaconnector.non-eth.sol" "github.com/zeta-chain/zetacore/cmd/zetatool/config" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/constant" ) const ( @@ -202,7 +202,7 @@ func getTSSDeposits(tssAddress string, startBlock uint64, endBlock uint64, apiKe for _, tx := range txns { if tx.To == tssAddress { - if strings.Compare(tx.Input, pkg.DonationMessage) == 0 { + if strings.Compare(tx.Input, constant.DonationMessage) == 0 { continue // skip donation tx } if tx.TxReceiptStatus != "1" { diff --git a/e2e/e2etests/test_donation.go b/e2e/e2etests/test_donation.go index 07510df987..f6d9bac3ff 100644 --- a/e2e/e2etests/test_donation.go +++ b/e2e/e2etests/test_donation.go @@ -5,7 +5,7 @@ import ( "github.com/zeta-chain/zetacore/e2e/runner" "github.com/zeta-chain/zetacore/e2e/utils" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/constant" ) // TestDonationEther tests donation of ether to the tss address @@ -19,7 +19,7 @@ func TestDonationEther(r *runner.E2ERunner, args []string) { panic("Invalid amount specified for TestDonationEther.") } - txDonation, err := r.SendEther(r.TSSAddress, amount, []byte(pkg.DonationMessage)) + txDonation, err := r.SendEther(r.TSSAddress, amount, []byte(constant.DonationMessage)) if err != nil { panic(err) } diff --git a/e2e/runner/bitcoin.go b/e2e/runner/bitcoin.go index 687e3aa8f3..df0c2d1a23 100644 --- a/e2e/runner/bitcoin.go +++ b/e2e/runner/bitcoin.go @@ -16,8 +16,8 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/rs/zerolog/log" "github.com/zeta-chain/zetacore/e2e/utils" - "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/constant" "github.com/zeta-chain/zetacore/pkg/proofs" "github.com/zeta-chain/zetacore/pkg/proofs/bitcoin" crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" @@ -119,7 +119,7 @@ func (runner *E2ERunner) DepositBTC(testHeader bool) { 0.11, utxos[4:5], btc, - []byte(pkg.DonationMessage), + []byte(constant.DonationMessage), runner.BTCDeployerAddress, ) if err != nil { diff --git a/e2e/runner/setup_evm.go b/e2e/runner/setup_evm.go index aef39cf338..e8ff909169 100644 --- a/e2e/runner/setup_evm.go +++ b/e2e/runner/setup_evm.go @@ -12,7 +12,7 @@ import ( "github.com/zeta-chain/zetacore/e2e/contracts/erc20" "github.com/zeta-chain/zetacore/e2e/contracts/testdapp" "github.com/zeta-chain/zetacore/e2e/utils" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/constant" ) const ( @@ -62,7 +62,7 @@ func (runner *E2ERunner) SetupEVM(contractsDeployed bool) { // donate to the TSS address to avoid account errors because deploying gas token ZRC20 will automatically mint // gas token on ZetaChain to initialize the pool - txDonation, err := runner.SendEther(runner.TSSAddress, big.NewInt(101000000000000000), []byte(pkg.DonationMessage)) + txDonation, err := runner.SendEther(runner.TSSAddress, big.NewInt(101000000000000000), []byte(constant.DonationMessage)) if err != nil { panic(err) } diff --git a/pkg/constant.go b/pkg/constant/constant.go similarity index 97% rename from pkg/constant.go rename to pkg/constant/constant.go index c52094ac22..447eca98e5 100644 --- a/pkg/constant.go +++ b/pkg/constant/constant.go @@ -1,4 +1,4 @@ -package pkg +package constant const ( // DonationMessage is the message for donation transactions diff --git a/pkg/version.go b/pkg/constant/version.go similarity index 81% rename from pkg/version.go rename to pkg/constant/version.go index 6e1fc343d8..c8bd89866a 100644 --- a/pkg/version.go +++ b/pkg/constant/version.go @@ -1,4 +1,4 @@ -package pkg +package constant var ( Name = "" diff --git a/rpc/namespaces/ethereum/web3/api.go b/rpc/namespaces/ethereum/web3/api.go index 07ecc755e6..de40837ee1 100644 --- a/rpc/namespaces/ethereum/web3/api.go +++ b/rpc/namespaces/ethereum/web3/api.go @@ -21,7 +21,7 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/crypto" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/constant" ) // PublicAPI is the web3_ prefixed set of APIs in the Web3 JSON-RPC spec. @@ -34,7 +34,7 @@ func NewPublicAPI() *PublicAPI { // ClientVersion returns the client version in the Web3 user agent format. func (a *PublicAPI) ClientVersion() string { - return fmt.Sprintf("%s/%s/%s/%s", pkg.Name, pkg.Version, runtime.GOOS+"-"+runtime.GOARCH, runtime.Version()) + return fmt.Sprintf("%s/%s/%s/%s", constant.Name, constant.Version, runtime.GOOS+"-"+runtime.GOARCH, runtime.Version()) } // Sha3 returns the keccak-256 hash of the passed-in input. diff --git a/x/crosschain/keeper/msg_server_migrate_tss_funds.go b/x/crosschain/keeper/msg_server_migrate_tss_funds.go index a9ad02429f..fa0c7fb1f4 100644 --- a/x/crosschain/keeper/msg_server_migrate_tss_funds.go +++ b/x/crosschain/keeper/msg_server_migrate_tss_funds.go @@ -12,8 +12,8 @@ import ( "github.com/ethereum/go-ethereum/crypto" tmbytes "github.com/tendermint/tendermint/libs/bytes" tmtypes "github.com/tendermint/tendermint/types" - "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/constant" zetacrypto "github.com/zeta-chain/zetacore/pkg/crypto" "github.com/zeta-chain/zetacore/pkg/gas" @@ -87,7 +87,7 @@ func (k Keeper) MigrateTSSFundsForChain(ctx sdk.Context, chainID int64, amount s Creator: "", Index: index, ZetaFees: sdkmath.Uint{}, - RelayedMessage: fmt.Sprintf("%s:%s", pkg.CmdMigrateTssFunds, "Funds Migrator Admin Cmd"), + RelayedMessage: fmt.Sprintf("%s:%s", constant.CmdMigrateTssFunds, "Funds Migrator Admin Cmd"), CctxStatus: &types.Status{ Status: types.CctxStatus_PendingOutbound, StatusMessage: "", diff --git a/x/crosschain/keeper/msg_server_whitelist_erc20.go b/x/crosschain/keeper/msg_server_whitelist_erc20.go index 9bc6aba87d..e1b4dc705d 100644 --- a/x/crosschain/keeper/msg_server_whitelist_erc20.go +++ b/x/crosschain/keeper/msg_server_whitelist_erc20.go @@ -6,6 +6,7 @@ import ( "math/big" "github.com/zeta-chain/zetacore/pkg/coin" + "github.com/zeta-chain/zetacore/pkg/constant" authoritytypes "github.com/zeta-chain/zetacore/x/authority/types" errorsmod "cosmossdk.io/errors" @@ -16,7 +17,6 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" - "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/x/crosschain/types" fungibletypes "github.com/zeta-chain/zetacore/x/fungible/types" ) @@ -116,7 +116,7 @@ func (k msgServer) WhitelistERC20(goCtx context.Context, msg *types.MsgWhitelist Creator: msg.Creator, Index: index, ZetaFees: sdk.NewUint(0), - RelayedMessage: fmt.Sprintf("%s:%s", pkg.CmdWhitelistERC20, msg.Erc20Address), + RelayedMessage: fmt.Sprintf("%s:%s", constant.CmdWhitelistERC20, msg.Erc20Address), CctxStatus: &types.Status{ Status: types.CctxStatus_PendingOutbound, StatusMessage: "", diff --git a/x/crosschain/keeper/msg_server_whitelist_erc20_test.go b/x/crosschain/keeper/msg_server_whitelist_erc20_test.go index e208989e5e..66a1bcb0e9 100644 --- a/x/crosschain/keeper/msg_server_whitelist_erc20_test.go +++ b/x/crosschain/keeper/msg_server_whitelist_erc20_test.go @@ -9,7 +9,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ethcommon "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/constant" keepertest "github.com/zeta-chain/zetacore/testutil/keeper" "github.com/zeta-chain/zetacore/testutil/sample" crosschainkeeper "github.com/zeta-chain/zetacore/x/crosschain/keeper" @@ -65,7 +65,7 @@ func TestKeeper_WhitelistERC20(t *testing.T) { require.EqualValues(t, erc20Address, fc.Asset) cctx, found := k.GetCrossChainTx(ctx, cctxIndex) require.True(t, found) - require.EqualValues(t, fmt.Sprintf("%s:%s", pkg.CmdWhitelistERC20, erc20Address), cctx.RelayedMessage) + require.EqualValues(t, fmt.Sprintf("%s:%s", constant.CmdWhitelistERC20, erc20Address), cctx.RelayedMessage) // check gas limit is set gasLimit, err := zk.FungibleKeeper.QueryGasLimit(ctx, ethcommon.HexToAddress(zrc20)) diff --git a/zetaclient/bitcoin/bitcoin_client.go b/zetaclient/bitcoin/bitcoin_client.go index 60f1f83d85..8f9c1f9463 100644 --- a/zetaclient/bitcoin/bitcoin_client.go +++ b/zetaclient/bitcoin/bitcoin_client.go @@ -13,9 +13,9 @@ import ( "sync/atomic" "time" - "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/pkg/coin" + "github.com/zeta-chain/zetacore/pkg/constant" "github.com/zeta-chain/zetacore/pkg/proofs" corecontext "github.com/zeta-chain/zetacore/zetaclient/core_context" @@ -772,7 +772,7 @@ func GetBtcEvent( logger.Warn().Err(err).Msgf("error hex decoding memo") return nil, fmt.Errorf("error hex decoding memo: %s", err) } - if bytes.Equal(memoBytes, []byte(pkg.DonationMessage)) { + if bytes.Equal(memoBytes, []byte(constant.DonationMessage)) { logger.Info().Msgf("donation tx: %s; value %f", tx.Txid, value) return nil, fmt.Errorf("donation tx: %s; value %f", tx.Txid, value) } diff --git a/zetaclient/evm/evm_signer.go b/zetaclient/evm/evm_signer.go index 974d44dbca..a5f6114822 100644 --- a/zetaclient/evm/evm_signer.go +++ b/zetaclient/evm/evm_signer.go @@ -20,9 +20,9 @@ import ( "github.com/rs/zerolog" "github.com/rs/zerolog/log" "github.com/zeta-chain/protocol-contracts/pkg/contracts/evm/erc20custody.sol" - "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/pkg/coin" + "github.com/zeta-chain/zetacore/pkg/constant" crosschainkeeper "github.com/zeta-chain/zetacore/x/crosschain/keeper" "github.com/zeta-chain/zetacore/x/crosschain/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" @@ -297,9 +297,9 @@ func (signer *Signer) SignWithdrawTx(txData *OutBoundTransactionData) (*ethtypes // cmd_migrate_tss_funds func (signer *Signer) SignCommandTx(txData *OutBoundTransactionData, cmd string, params string) (*ethtypes.Transaction, error) { switch cmd { - case pkg.CmdWhitelistERC20: + case constant.CmdWhitelistERC20: return signer.SignWhitelistERC20Cmd(txData, params) - case pkg.CmdMigrateTssFunds: + case constant.CmdMigrateTssFunds: return signer.SignMigrateTssFundsCmd(txData) } return nil, fmt.Errorf("SignCommandTx: unknown command %s", cmd) diff --git a/zetaclient/evm/evm_signer_test.go b/zetaclient/evm/evm_signer_test.go index 5f82d9bf91..b78a3d1c26 100644 --- a/zetaclient/evm/evm_signer_test.go +++ b/zetaclient/evm/evm_signer_test.go @@ -8,8 +8,8 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/rs/zerolog" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/pkg/chains" + "github.com/zeta-chain/zetacore/pkg/constant" "github.com/zeta-chain/zetacore/testutil/sample" "github.com/zeta-chain/zetacore/x/crosschain/types" crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" @@ -225,7 +225,7 @@ func TestSigner_SignCommandTx(t *testing.T) { require.NoError(t, err) t.Run("SignCommandTx CmdWhitelistERC20", func(t *testing.T) { - cmd := pkg.CmdWhitelistERC20 + cmd := constant.CmdWhitelistERC20 params := ConnectorAddress.Hex() // Call SignCommandTx tx, err := evmSigner.SignCommandTx(txData, cmd, params) @@ -242,7 +242,7 @@ func TestSigner_SignCommandTx(t *testing.T) { }) t.Run("SignCommandTx CmdMigrateTssFunds", func(t *testing.T) { - cmd := pkg.CmdMigrateTssFunds + cmd := constant.CmdMigrateTssFunds // Call SignCommandTx tx, err := evmSigner.SignCommandTx(txData, cmd, "") require.NoError(t, err) diff --git a/zetaclient/evm/inbounds.go b/zetaclient/evm/inbounds.go index a8dee66c11..2daa4fc0c1 100644 --- a/zetaclient/evm/inbounds.go +++ b/zetaclient/evm/inbounds.go @@ -20,7 +20,7 @@ import ( clienttypes "github.com/zeta-chain/zetacore/zetaclient/types" ethcommon "github.com/ethereum/go-ethereum/common" - "github.com/zeta-chain/zetacore/pkg" + "github.com/zeta-chain/zetacore/pkg/constant" "github.com/zeta-chain/zetacore/x/crosschain/types" "github.com/zeta-chain/zetacore/zetaclient/zetabridge" "golang.org/x/net/context" @@ -236,7 +236,7 @@ func (ob *ChainClient) BuildInboundVoteMsgForDepositedEvent(event *erc20custody. } // donation check - if bytes.Equal(event.Message, []byte(pkg.DonationMessage)) { + if bytes.Equal(event.Message, []byte(constant.DonationMessage)) { ob.logger.ExternalChainWatcher.Info().Msgf("thank you rich folk for your donation! tx %s chain %d", event.Raw.TxHash.Hex(), ob.chain.ChainId) return nil } @@ -332,7 +332,7 @@ func (ob *ChainClient) BuildInboundVoteMsgForTokenSentToTSS(tx *ethrpc.Transacti // donation check // #nosec G703 err is already checked data, _ := hex.DecodeString(message) - if bytes.Equal(data, []byte(pkg.DonationMessage)) { + if bytes.Equal(data, []byte(constant.DonationMessage)) { ob.logger.ExternalChainWatcher.Info().Msgf("thank you rich folk for your donation! tx %s chain %d", tx.Hash, ob.chain.ChainId) return nil } diff --git a/zetaclient/evm/inbounds_test.go b/zetaclient/evm/inbounds_test.go index e4625177e7..e24c66b4d5 100644 --- a/zetaclient/evm/inbounds_test.go +++ b/zetaclient/evm/inbounds_test.go @@ -10,9 +10,9 @@ import ( lru "github.com/hashicorp/golang-lru" "github.com/onrik/ethrpc" "github.com/stretchr/testify/require" - "github.com/zeta-chain/zetacore/pkg" "github.com/zeta-chain/zetacore/pkg/chains" "github.com/zeta-chain/zetacore/pkg/coin" + "github.com/zeta-chain/zetacore/pkg/constant" observertypes "github.com/zeta-chain/zetacore/x/observer/types" "github.com/zeta-chain/zetacore/zetaclient/config" "github.com/zeta-chain/zetacore/zetaclient/evm" @@ -205,7 +205,7 @@ func TestEVM_CheckAndVoteInboundTokenGas(t *testing.T) { }) t.Run("should not act on nil message", func(t *testing.T) { tx, receipt, _ := testutils.LoadEVMIntxNReceiptNCctx(t, chainID, intxHash, coin.CoinType_Gas) - tx.Input = hex.EncodeToString([]byte(pkg.DonationMessage)) // donation will result in nil message + tx.Input = hex.EncodeToString([]byte(constant.DonationMessage)) // donation will result in nil message require.NoError(t, evm.ValidateEvmTransaction(tx)) lastBlock := receipt.BlockNumber.Uint64() + confirmation @@ -302,7 +302,7 @@ func TestEVM_BuildInboundVoteMsgForDepositedEvent(t *testing.T) { require.Nil(t, msg) }) t.Run("should return nil msg on donation transaction", func(t *testing.T) { - event.Message = []byte(pkg.DonationMessage) + event.Message = []byte(constant.DonationMessage) msg := ob.BuildInboundVoteMsgForDepositedEvent(event, sender) require.Nil(t, msg) })