From 04d429fe89e4bec35958975768374d466c403ee5 Mon Sep 17 00:00:00 2001 From: Collin Brittain Date: Wed, 1 May 2024 10:51:26 -0500 Subject: [PATCH] Fix unit tests --- module/cmd/gravity/cmd/genaccounts_test.go | 4 +- module/x/gravity/abci_test.go | 6 +- module/x/gravity/client/cli/tx_test.go | 3 +- module/x/gravity/keeper/grpc_query_test.go | 7 +- module/x/gravity/keeper/test_common.go | 48 +- .../x/gravity/migrations/v1/keeper/hooks.go | 88 - .../x/gravity/migrations/v1/keeper/keeper.go | 65 - .../migrations/v1/keeper/test_common.go | 675 - module/x/gravity/migrations/v1/store.go | 85 - module/x/gravity/migrations/v1/store_test.go | 89 - .../x/gravity/migrations/v1/types/abi_json.go | 76 - module/x/gravity/migrations/v1/types/codec.go | 161 - .../x/gravity/migrations/v1/types/ethereum.go | 115 - .../migrations/v1/types/ethereum_event.go | 175 - .../migrations/v1/types/ethereum_signature.go | 94 - .../migrations/v1/types/expected_keepers.go | 50 - .../x/gravity/migrations/v1/types/genesis.go | 378 - .../gravity/migrations/v1/types/genesis.pb.go | 1809 --- .../gravity/migrations/v1/types/gravity.pb.go | 2778 ----- module/x/gravity/migrations/v1/types/hooks.go | 47 - .../gravity/migrations/v1/types/interfaces.go | 40 - module/x/gravity/migrations/v1/types/key.go | 162 - module/x/gravity/migrations/v1/types/msgs.go | 289 - .../x/gravity/migrations/v1/types/msgs.pb.go | 5564 --------- .../migrations/v1/types/outgoing_tx.go | 220 - .../x/gravity/migrations/v1/types/query.pb.go | 10342 ---------------- module/x/gravity/migrations/v1/types/types.go | 132 - module/x/gravity/migrations/v2/store.go | 19 - module/x/gravity/migrations/v2/store_test.go | 37 - 29 files changed, 53 insertions(+), 23505 deletions(-) delete mode 100644 module/x/gravity/migrations/v1/keeper/hooks.go delete mode 100644 module/x/gravity/migrations/v1/keeper/keeper.go delete mode 100644 module/x/gravity/migrations/v1/keeper/test_common.go delete mode 100644 module/x/gravity/migrations/v1/store.go delete mode 100644 module/x/gravity/migrations/v1/store_test.go delete mode 100644 module/x/gravity/migrations/v1/types/abi_json.go delete mode 100644 module/x/gravity/migrations/v1/types/codec.go delete mode 100644 module/x/gravity/migrations/v1/types/ethereum.go delete mode 100644 module/x/gravity/migrations/v1/types/ethereum_event.go delete mode 100644 module/x/gravity/migrations/v1/types/ethereum_signature.go delete mode 100644 module/x/gravity/migrations/v1/types/expected_keepers.go delete mode 100644 module/x/gravity/migrations/v1/types/genesis.go delete mode 100644 module/x/gravity/migrations/v1/types/genesis.pb.go delete mode 100644 module/x/gravity/migrations/v1/types/gravity.pb.go delete mode 100644 module/x/gravity/migrations/v1/types/hooks.go delete mode 100644 module/x/gravity/migrations/v1/types/interfaces.go delete mode 100644 module/x/gravity/migrations/v1/types/key.go delete mode 100644 module/x/gravity/migrations/v1/types/msgs.go delete mode 100644 module/x/gravity/migrations/v1/types/msgs.pb.go delete mode 100644 module/x/gravity/migrations/v1/types/outgoing_tx.go delete mode 100644 module/x/gravity/migrations/v1/types/query.pb.go delete mode 100644 module/x/gravity/migrations/v1/types/types.go delete mode 100644 module/x/gravity/migrations/v2/store.go delete mode 100644 module/x/gravity/migrations/v2/store_test.go diff --git a/module/cmd/gravity/cmd/genaccounts_test.go b/module/cmd/gravity/cmd/genaccounts_test.go index 5224a5016..a00aadcbc 100644 --- a/module/cmd/gravity/cmd/genaccounts_test.go +++ b/module/cmd/gravity/cmd/genaccounts_test.go @@ -18,6 +18,8 @@ import ( "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/testutil/testdata" "github.com/cosmos/cosmos-sdk/types/module" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/auth" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/genutil" genutiltest "github.com/cosmos/cosmos-sdk/x/genutil/client/testutil" @@ -61,7 +63,7 @@ func TestAddGenesisAccountCmd(t *testing.T) { cfg, err := genutiltest.CreateDefaultTendermintConfig(home) require.NoError(t, err) - appCodec := simapp.MakeTestEncodingConfig().Codec + appCodec := moduletestutil.MakeTestEncodingConfig(auth.AppModuleBasic{}).Codec err = genutiltest.ExecInitCmd(testMbm, home, appCodec) require.NoError(t, err) diff --git a/module/x/gravity/abci_test.go b/module/x/gravity/abci_test.go index 6c8417392..611d42454 100644 --- a/module/x/gravity/abci_test.go +++ b/module/x/gravity/abci_test.go @@ -49,7 +49,7 @@ func TestSignerSetTxCreationUponUnbonding(t *testing.T) { require.NoError(t, err) // Run the staking endblocker to ensure signer set tx is set in state - staking.EndBlocker(input.Context, input.StakingKeeper) + staking.EndBlocker(input.Context, &input.StakingKeeper) // power diff should be less than 5% latestSignerSetTx := input.GravityKeeper.GetLatestSignerSetTx(input.Context) @@ -77,7 +77,7 @@ func TestSignerSetTxCreationUponUnbonding(t *testing.T) { ) require.NoError(t, err) - staking.EndBlocker(input.Context, input.StakingKeeper) + staking.EndBlocker(input.Context, &input.StakingKeeper) // last unbonding height should not be the current block lastUnbondingHeight = input.GravityKeeper.GetLastUnbondingBlockHeight(input.Context) @@ -182,7 +182,7 @@ func TestSignerSetTxSlashing_UnbondingValidator_UnbondWindow_NotExpired(t *testi } gravityKeeper.SetEthereumSignature(ctx, &types.SignerSetTxConfirmation{vs.Nonce, keeper.EthAddrs[i].Hex(), []byte("dummySig")}, val) } - staking.EndBlocker(input.Context, input.StakingKeeper) + staking.EndBlocker(input.Context, &input.StakingKeeper) ctx = ctx.WithBlockHeight(currentBlockHeight) gravity.EndBlocker(ctx, gravityKeeper) diff --git a/module/x/gravity/client/cli/tx_test.go b/module/x/gravity/client/cli/tx_test.go index f0e500fdd..ffd891a1d 100644 --- a/module/x/gravity/client/cli/tx_test.go +++ b/module/x/gravity/client/cli/tx_test.go @@ -4,11 +4,12 @@ import ( "testing" "github.com/cosmos/cosmos-sdk/testutil" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/stretchr/testify/require" ) func TestParseCommunityPoolEthereumSpendProposal(t *testing.T) { - encodingConfig := params.MakeTestEncodingConfig() + encodingConfig := moduletestutil.MakeTestEncodingConfig() okJSON := testutil.WriteToNewTempFile(t, ` { diff --git a/module/x/gravity/keeper/grpc_query_test.go b/module/x/gravity/keeper/grpc_query_test.go index e9a5b9b44..a9469f4df 100644 --- a/module/x/gravity/keeper/grpc_query_test.go +++ b/module/x/gravity/keeper/grpc_query_test.go @@ -6,7 +6,6 @@ import ( "github.com/cometbft/cometbft/libs/bytes" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/migrations/v1/keeper" "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" "github.com/stretchr/testify/require" ) @@ -220,7 +219,7 @@ func TestKeeper_UnsignedSignerSetTxs(t *testing.T) { t.Run("read after there's something in state", func(t *testing.T) { env, ctx := SetupFiveValChain(t) gk := env.GravityKeeper - orchAddr := keeper.AccAddrs[0] + orchAddr := AccAddrs[0] signer := orchAddr.String() valAddr, err := sdk.ValAddressFromBech32(env.StakingKeeper.GetValidators(ctx, 5)[0].OperatorAddress) require.NoError(t, err) @@ -257,7 +256,7 @@ func TestKeeper_UnsignedBatchTxs(t *testing.T) { t.Run("read after there's something in state", func(t *testing.T) { env, ctx := SetupFiveValChain(t) gk := env.GravityKeeper - orchAddr := keeper.AccAddrs[0] + orchAddr := AccAddrs[0] signer := orchAddr.String() valAddr, err := sdk.ValAddressFromBech32(env.StakingKeeper.GetValidators(ctx, 5)[0].OperatorAddress) require.NoError(t, err) @@ -309,7 +308,7 @@ func TestKeeper_UnsignedContractCallTxs(t *testing.T) { t.Run("read after there's something in state", func(t *testing.T) { env, ctx := SetupFiveValChain(t) gk := env.GravityKeeper - orchAddr := keeper.AccAddrs[0] + orchAddr := AccAddrs[0] signer := orchAddr.String() valAddr, err := sdk.ValAddressFromBech32(env.StakingKeeper.GetValidators(ctx, 5)[0].OperatorAddress) require.NoError(t, err) diff --git a/module/x/gravity/keeper/test_common.go b/module/x/gravity/keeper/test_common.go index 72ede6eb4..1859f1f64 100644 --- a/module/x/gravity/keeper/test_common.go +++ b/module/x/gravity/keeper/test_common.go @@ -21,6 +21,7 @@ import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/x/auth" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -29,6 +30,7 @@ import ( bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/capability" + "github.com/cosmos/cosmos-sdk/x/consensus" "github.com/cosmos/cosmos-sdk/x/crisis" "github.com/cosmos/cosmos-sdk/x/distribution" distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" @@ -54,7 +56,10 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/cosmos/cosmos-sdk/x/upgrade" upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client" + ibctransfer "github.com/cosmos/ibc-go/v7/modules/apps/transfer" + ibc "github.com/cosmos/ibc-go/v7/modules/core" gethcommon "github.com/ethereum/go-ethereum/common" + gravityclient "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/client" "github.com/stretchr/testify/require" "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" @@ -340,13 +345,15 @@ func CreateTestEnv(t *testing.T) TestInput { types.ModuleName: {authtypes.Minter, authtypes.Burner}, } + authority := authtypes.NewModuleAddress(govtypes.ModuleName).String() + accountKeeper := authkeeper.NewAccountKeeper( marshaler, keyAcc, // target store authtypes.ProtoBaseAccount, // prototype maccPerms, "gravity", - govtypes.ModuleName, + authority, ) blockedAddr := make(map[string]bool, len(maccPerms)) @@ -359,14 +366,14 @@ func CreateTestEnv(t *testing.T) TestInput { keyBank, accountKeeper, blockedAddr, - govtypes.ModuleName, + authority, ) bankKeeper.SetParams(ctx, banktypes.Params{DefaultSendEnabled: true}) - stakingKeeper := stakingkeeper.NewKeeper(marshaler, keyStaking, accountKeeper, bankKeeper, govtypes.ModuleName) + stakingKeeper := stakingkeeper.NewKeeper(marshaler, keyStaking, accountKeeper, bankKeeper, authority) stakingKeeper.SetParams(ctx, TestingStakeParams) - distKeeper := distrkeeper.NewKeeper(marshaler, keyDistro, accountKeeper, bankKeeper, stakingKeeper, authtypes.FeeCollectorName, govtypes.ModuleName) + distKeeper := distrkeeper.NewKeeper(marshaler, keyDistro, accountKeeper, bankKeeper, stakingKeeper, authtypes.FeeCollectorName, authority) distKeeper.SetParams(ctx, distrtypes.DefaultParams()) // set genesis items required for distribution @@ -403,7 +410,7 @@ func CreateTestEnv(t *testing.T) TestInput { router := baseapp.NewMsgServiceRouter() govKeeper := govkeeper.NewKeeper( - marshaler, keyGov, accountKeeper, bankKeeper, stakingKeeper, router, govtypes.DefaultConfig(), govtypes.ModuleName, + marshaler, keyGov, accountKeeper, bankKeeper, stakingKeeper, router, govtypes.DefaultConfig(), authority, ) govKeeper.SetProposalID(ctx, govtypesv1beta1.DefaultStartingProposalID) @@ -413,7 +420,7 @@ func CreateTestEnv(t *testing.T) TestInput { cdc, keySlashing, stakingKeeper, - govtypes.ModuleName, + authority, ) k := NewKeeper( @@ -475,6 +482,35 @@ func MakeTestCodec() *codec.LegacyAmino { return cdc } +func MakeTestEncodingConfig() moduletestutil.TestEncodingConfig { + return moduletestutil.MakeTestEncodingConfig( + auth.AppModuleBasic{}, + genutil.AppModuleBasic{}, + bank.AppModuleBasic{}, + capability.AppModuleBasic{}, + consensus.AppModuleBasic{}, + staking.AppModuleBasic{}, + mint.AppModuleBasic{}, + distribution.AppModuleBasic{}, + gov.NewAppModuleBasic( + []govclient.ProposalHandler{ + paramsclient.ProposalHandler, + upgradeclient.LegacyProposalHandler, + upgradeclient.LegacyCancelProposalHandler, + gravityclient.ProposalHandler, + }, + ), + //params.AppModuleBasic{}, + crisis.AppModuleBasic{}, + slashing.AppModuleBasic{}, + ibc.AppModuleBasic{}, + upgrade.AppModuleBasic{}, + evidence.AppModuleBasic{}, + ibctransfer.AppModuleBasic{}, + vesting.AppModuleBasic{}, + ) +} + // MakeTestMarshaler creates a proto codec for use in testing func MakeTestMarshaler() codec.Codec { interfaceRegistry := codectypes.NewInterfaceRegistry() diff --git a/module/x/gravity/migrations/v1/keeper/hooks.go b/module/x/gravity/migrations/v1/keeper/hooks.go deleted file mode 100644 index 0210843ca..000000000 --- a/module/x/gravity/migrations/v1/keeper/hooks.go +++ /dev/null @@ -1,88 +0,0 @@ -//go:build exclude - -package keeper - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/migrations/v1/types" -) - -type Hooks struct { - k Keeper -} - -var _ stakingtypes.StakingHooks = Hooks{} - -// Hooks Create new gravity hooks -func (k Keeper) Hooks() Hooks { return Hooks{k} } - -func (h Hooks) AfterValidatorBeginUnbonding(ctx sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error { - return nil -} - -func (h Hooks) BeforeDelegationCreated(_ sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { - return nil -} -func (h Hooks) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) error { return nil } -func (h Hooks) BeforeValidatorModified(_ sdk.Context, _ sdk.ValAddress) error { return nil } -func (h Hooks) AfterValidatorBonded(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error { - return nil -} -func (h Hooks) BeforeDelegationRemoved(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) error { - return nil -} -func (h Hooks) AfterValidatorRemoved(ctx sdk.Context, _ sdk.ConsAddress, valAddr sdk.ValAddress) error { - return nil -} -func (h Hooks) BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, fraction sdk.Dec) error { - return nil -} -func (h Hooks) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { - return nil -} -func (h Hooks) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { - return nil -} - -var _ types.GravityHooks = Keeper{} - -func (k Keeper) AfterContractCallExecutedEvent(ctx sdk.Context, event types.ContractCallExecutedEvent) { - if k.hooks != nil { - k.hooks.AfterContractCallExecutedEvent(ctx, event) - } -} - -func (k Keeper) AfterERC20DeployedEvent(ctx sdk.Context, event types.ERC20DeployedEvent) { - if k.hooks != nil { - k.hooks.AfterERC20DeployedEvent(ctx, event) - } -} - -func (k Keeper) AfterSignerSetExecutedEvent(ctx sdk.Context, event types.SignerSetTxExecutedEvent) { - if k.hooks != nil { - k.hooks.AfterSignerSetExecutedEvent(ctx, event) - } -} - -func (k Keeper) AfterBatchExecutedEvent(ctx sdk.Context, event types.BatchExecutedEvent) { - if k.hooks != nil { - k.hooks.AfterBatchExecutedEvent(ctx, event) - } -} - -func (k Keeper) AfterSendToCosmosEvent(ctx sdk.Context, event types.SendToCosmosEvent) { - if k.hooks != nil { - k.hooks.AfterSendToCosmosEvent(ctx, event) - } -} - -func (k *Keeper) SetHooks(sh types.GravityHooks) *Keeper { - if k.hooks != nil { - panic("cannot set gravity hooks twice") - } - - k.hooks = sh - - return k -} diff --git a/module/x/gravity/migrations/v1/keeper/keeper.go b/module/x/gravity/migrations/v1/keeper/keeper.go deleted file mode 100644 index 0a7ddde69..000000000 --- a/module/x/gravity/migrations/v1/keeper/keeper.go +++ /dev/null @@ -1,65 +0,0 @@ -//go:build exclude - -package keeper - -import ( - "github.com/cometbft/cometbft/libs/log" - "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - - "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/migrations/v1/types" -) - -// Keeper maintains the link to storage and exposes getter/setter methods for the various parts of the state machine -type Keeper struct { - StakingKeeper types.StakingKeeper - storeKey storetypes.StoreKey - paramSpace paramtypes.Subspace - cdc codec.Codec - accountKeeper types.AccountKeeper - bankKeeper types.BankKeeper - SlashingKeeper types.SlashingKeeper - PowerReduction sdk.Int - hooks types.GravityHooks -} - -// NewKeeper returns a new instance of the gravity keeper -func NewKeeper( - cdc codec.Codec, - storeKey storetypes.StoreKey, - paramSpace paramtypes.Subspace, - accKeeper types.AccountKeeper, - stakingKeeper types.StakingKeeper, - bankKeeper types.BankKeeper, - slashingKeeper types.SlashingKeeper, - powerReduction sdk.Int, -) Keeper { - // set KeyTable if it has not already been set - if !paramSpace.HasKeyTable() { - paramSpace = paramSpace.WithKeyTable(types.ParamKeyTable()) - } - - k := Keeper{ - cdc: cdc, - paramSpace: paramSpace, - storeKey: storeKey, - accountKeeper: accKeeper, - StakingKeeper: stakingKeeper, - bankKeeper: bankKeeper, - SlashingKeeper: slashingKeeper, - PowerReduction: powerReduction, - } - - return k -} - -func (k Keeper) Logger(ctx sdk.Context) log.Logger { - return ctx.Logger().With("module", "x/"+types.ModuleName) -} - -// setParams sets the parameters in the store -func (k Keeper) setParams(ctx sdk.Context, ps types.Params) { - k.paramSpace.SetParamSet(ctx, &ps) -} diff --git a/module/x/gravity/migrations/v1/keeper/test_common.go b/module/x/gravity/migrations/v1/keeper/test_common.go deleted file mode 100644 index 5a4c45330..000000000 --- a/module/x/gravity/migrations/v1/keeper/test_common.go +++ /dev/null @@ -1,675 +0,0 @@ -//go:build exclude - -package keeper - -import ( - "bytes" - "testing" - "time" - - sdkmath "cosmossdk.io/math" - dbm "github.com/cometbft/cometbft-db" - "github.com/cometbft/cometbft/libs/log" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - "github.com/cosmos/cosmos-sdk/baseapp" - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - ccodec "github.com/cosmos/cosmos-sdk/crypto/codec" - "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" - "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" - ccrypto "github.com/cosmos/cosmos-sdk/crypto/types" - "github.com/cosmos/cosmos-sdk/std" - "github.com/cosmos/cosmos-sdk/store" - storetypes "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - "github.com/cosmos/cosmos-sdk/x/auth" - authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/cosmos/cosmos-sdk/x/auth/vesting" - "github.com/cosmos/cosmos-sdk/x/bank" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/cosmos/cosmos-sdk/x/capability" - "github.com/cosmos/cosmos-sdk/x/crisis" - "github.com/cosmos/cosmos-sdk/x/distribution" - distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" - distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - "github.com/cosmos/cosmos-sdk/x/evidence" - "github.com/cosmos/cosmos-sdk/x/genutil" - "github.com/cosmos/cosmos-sdk/x/gov" - govclient "github.com/cosmos/cosmos-sdk/x/gov/client" - govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - govtypesv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - "github.com/cosmos/cosmos-sdk/x/mint" - "github.com/cosmos/cosmos-sdk/x/params" - paramsclient "github.com/cosmos/cosmos-sdk/x/params/client" - paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - paramsproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal" - "github.com/cosmos/cosmos-sdk/x/slashing" - slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" - slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" - "github.com/cosmos/cosmos-sdk/x/staking" - stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/cosmos/cosmos-sdk/x/upgrade" - upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client" - gethcommon "github.com/ethereum/go-ethereum/common" - "github.com/stretchr/testify/require" - - "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/migrations/v1/types" -) - -var ( - // ModuleBasics is a mock module basic manager for testing - ModuleBasics = module.NewBasicManager( - auth.AppModuleBasic{}, - genutil.AppModuleBasic{}, - bank.AppModuleBasic{}, - capability.AppModuleBasic{}, - staking.AppModuleBasic{}, - mint.AppModuleBasic{}, - distribution.AppModuleBasic{}, - gov.NewAppModuleBasic( - []govclient.ProposalHandler{ - paramsclient.ProposalHandler, upgradeclient.LegacyProposalHandler, upgradeclient.LegacyCancelProposalHandler, - }, - ), - params.AppModuleBasic{}, - crisis.AppModuleBasic{}, - slashing.AppModuleBasic{}, - upgrade.AppModuleBasic{}, - evidence.AppModuleBasic{}, - vesting.AppModuleBasic{}, - ) - - // Ensure that StakingKeeperMock implements required interface - _ types.StakingKeeper = &StakingKeeperMock{} -) - -var ( - // ConsPrivKeys generate ed25519 ConsPrivKeys to be used for validator operator keys - ConsPrivKeys = []ccrypto.PrivKey{ - ed25519.GenPrivKey(), - ed25519.GenPrivKey(), - ed25519.GenPrivKey(), - ed25519.GenPrivKey(), - ed25519.GenPrivKey(), - } - - // ConsPubKeys holds the consensus public keys to be used for validator operator keys - ConsPubKeys = []ccrypto.PubKey{ - ConsPrivKeys[0].PubKey(), - ConsPrivKeys[1].PubKey(), - ConsPrivKeys[2].PubKey(), - ConsPrivKeys[3].PubKey(), - ConsPrivKeys[4].PubKey(), - } - - // AccPrivKeys generate secp256k1 pubkeys to be used for account pub keys - AccPrivKeys = []ccrypto.PrivKey{ - secp256k1.GenPrivKey(), - secp256k1.GenPrivKey(), - secp256k1.GenPrivKey(), - secp256k1.GenPrivKey(), - secp256k1.GenPrivKey(), - } - - // AccPubKeys holds the pub keys for the account keys - AccPubKeys = []ccrypto.PubKey{ - AccPrivKeys[0].PubKey(), - AccPrivKeys[1].PubKey(), - AccPrivKeys[2].PubKey(), - AccPrivKeys[3].PubKey(), - AccPrivKeys[4].PubKey(), - } - - // AccAddrs holds the sdk.AccAddresses - AccAddrs = []sdk.AccAddress{ - sdk.AccAddress(AccPubKeys[0].Address()), - sdk.AccAddress(AccPubKeys[1].Address()), - sdk.AccAddress(AccPubKeys[2].Address()), - sdk.AccAddress(AccPubKeys[3].Address()), - sdk.AccAddress(AccPubKeys[4].Address()), - } - - // ValAddrs holds the sdk.ValAddresses - ValAddrs = []sdk.ValAddress{ - sdk.ValAddress(AccPubKeys[0].Address()), - sdk.ValAddress(AccPubKeys[1].Address()), - sdk.ValAddress(AccPubKeys[2].Address()), - sdk.ValAddress(AccPubKeys[3].Address()), - sdk.ValAddress(AccPubKeys[4].Address()), - } - - // TODO: generate the eth priv keys here and - // derive the address from them. - - // EthAddrs holds etheruem addresses - EthAddrs = []gethcommon.Address{ - gethcommon.BytesToAddress(bytes.Repeat([]byte{byte(1)}, 20)), - gethcommon.BytesToAddress(bytes.Repeat([]byte{byte(2)}, 20)), - gethcommon.BytesToAddress(bytes.Repeat([]byte{byte(3)}, 20)), - gethcommon.BytesToAddress(bytes.Repeat([]byte{byte(4)}, 20)), - gethcommon.BytesToAddress(bytes.Repeat([]byte{byte(5)}, 20)), - } - - // TokenContractAddrs holds example token contract addresses - TokenContractAddrs = []string{ - "0x6b175474e89094c44da98b954eedeac495271d0f", // DAI - "0x0bc529c00c6401aef6d220be8c6ea1667f6ad93e", // YFI - "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984", // UNI - "0xc00e94cb662c3520282e6f5717214004a7f26888", // COMP - "0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f", // SNX - } - - // InitTokens holds the number of tokens to initialize an account with - InitTokens = sdk.TokensFromConsensusPower(110, sdk.DefaultPowerReduction) - - // InitCoins holds the number of coins to initialize an account with - InitCoins = sdk.NewCoins(sdk.NewCoin(TestingStakeParams.BondDenom, InitTokens)) - - // StakingAmount holds the staking power to start a validator with - StakingAmount = sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) - - // StakingCoins holds the staking coins to start a validator with - StakingCoins = sdk.NewCoins(sdk.NewCoin(TestingStakeParams.BondDenom, StakingAmount)) - - // TestingStakeParams is a set of staking params for testing - TestingStakeParams = stakingtypes.Params{ - UnbondingTime: 100, - MaxValidators: 10, - MaxEntries: 10, - HistoricalEntries: 10000, - BondDenom: "stake", - } - - // TestingGravityParams is a set of gravity params for testing - TestingGravityParams = types.Params{ - GravityId: "testgravityid", - ContractSourceHash: "62328f7bc12efb28f86111d08c29b39285680a906ea0e524e0209d6f6657b713", - BridgeEthereumAddress: "0x8858eeb3dfffa017d4bce9801d340d36cf895ccf", - BridgeChainId: 11, - SignedBatchesWindow: 10, - SignedSignerSetTxsWindow: 10, - UnbondSlashingSignerSetTxsWindow: 15, - EthereumSignaturesWindow: 10, - TargetEthTxTimeout: 60001, - AverageBlockTime: 5000, - AverageEthereumBlockTime: 15000, - SlashFractionSignerSetTx: sdk.NewDecWithPrec(1, 2), - SlashFractionBatch: sdk.NewDecWithPrec(1, 2), - SlashFractionEthereumSignature: sdk.NewDecWithPrec(1, 2), - SlashFractionConflictingEthereumSignature: sdk.NewDecWithPrec(1, 2), - } -) - -// TestInput stores the various keepers required to test gravity -type TestInput struct { - GravityKeeper Keeper - AccountKeeper authkeeper.AccountKeeper - StakingKeeper stakingkeeper.Keeper - SlashingKeeper slashingkeeper.Keeper - DistKeeper distrkeeper.Keeper - BankKeeper bankkeeper.BaseKeeper - GovKeeper govkeeper.Keeper - Context sdk.Context - Marshaler codec.Codec - LegacyAmino *codec.LegacyAmino - GravityStoreKey *storetypes.KVStoreKey -} - -func (input TestInput) AddBalanceToBank(ctx sdk.Context, addr sdk.AccAddress, balances sdk.Coins) error { - return fundAccount(ctx, input.BankKeeper, addr, balances) -} - -// CreateTestEnv creates the keeper testing environment for gravity -func CreateTestEnv(t *testing.T) TestInput { - t.Helper() - - // Initialize store keys - gravityKey := sdk.NewKVStoreKey(types.StoreKey) - keyAcc := sdk.NewKVStoreKey(authtypes.StoreKey) - keyStaking := sdk.NewKVStoreKey(stakingtypes.StoreKey) - keyBank := sdk.NewKVStoreKey(banktypes.StoreKey) - keyDistro := sdk.NewKVStoreKey(distrtypes.StoreKey) - keyParams := sdk.NewKVStoreKey(paramstypes.StoreKey) - tkeyParams := sdk.NewTransientStoreKey(paramstypes.TStoreKey) - keyGov := sdk.NewKVStoreKey(govtypes.StoreKey) - keySlashing := sdk.NewKVStoreKey(slashingtypes.StoreKey) - - // Initialize memory database and mount stores on it - db := dbm.NewMemDB() - ms := store.NewCommitMultiStore(db) - ms.MountStoreWithDB(gravityKey, storetypes.StoreTypeIAVL, db) - ms.MountStoreWithDB(keyAcc, storetypes.StoreTypeIAVL, db) - ms.MountStoreWithDB(keyParams, storetypes.StoreTypeIAVL, db) - ms.MountStoreWithDB(keyStaking, storetypes.StoreTypeIAVL, db) - ms.MountStoreWithDB(keyBank, storetypes.StoreTypeIAVL, db) - ms.MountStoreWithDB(keyDistro, storetypes.StoreTypeIAVL, db) - ms.MountStoreWithDB(tkeyParams, storetypes.StoreTypeTransient, db) - ms.MountStoreWithDB(keyGov, storetypes.StoreTypeIAVL, db) - ms.MountStoreWithDB(keySlashing, storetypes.StoreTypeIAVL, db) - err := ms.LoadLatestVersion() - require.Nil(t, err) - - // Create sdk.Context - ctx := sdk.NewContext(ms, tmproto.Header{ - Height: 1234567, - Time: time.Date(2020, time.April, 22, 12, 0, 0, 0, time.UTC), - }, false, log.TestingLogger()) - - cdc := MakeTestCodec() - marshaler := MakeTestMarshaler() - - paramsKeeper := paramskeeper.NewKeeper(marshaler, cdc, keyParams, tkeyParams) - paramsKeeper.Subspace(authtypes.ModuleName) - paramsKeeper.Subspace(banktypes.ModuleName) - paramsKeeper.Subspace(stakingtypes.ModuleName) - paramsKeeper.Subspace(distrtypes.ModuleName) - paramsKeeper.Subspace(govtypes.ModuleName) - paramsKeeper.Subspace(types.DefaultParamspace) - paramsKeeper.Subspace(slashingtypes.ModuleName) - - // this is also used to initialize module accounts for all the map keys - maccPerms := map[string][]string{ - authtypes.FeeCollectorName: nil, - distrtypes.ModuleName: nil, - stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, - stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, - govtypes.ModuleName: {authtypes.Burner}, - types.ModuleName: {authtypes.Minter, authtypes.Burner}, - } - - accountKeeper := authkeeper.NewAccountKeeper( - marshaler, - keyAcc, // target store - getSubspace(paramsKeeper, authtypes.ModuleName), - authtypes.ProtoBaseAccount, // prototype - maccPerms, - "gravity", - ) - - blockedAddr := make(map[string]bool, len(maccPerms)) - for acc := range maccPerms { - blockedAddr[authtypes.NewModuleAddress(acc).String()] = true - } - - bankKeeper := bankkeeper.NewBaseKeeper( - marshaler, - keyBank, - accountKeeper, - getSubspace(paramsKeeper, banktypes.ModuleName), - blockedAddr, - ) - bankKeeper.SetParams(ctx, banktypes.Params{DefaultSendEnabled: true}) - - stakingKeeper := stakingkeeper.NewKeeper(marshaler, keyStaking, accountKeeper, bankKeeper, getSubspace(paramsKeeper, stakingtypes.ModuleName)) - stakingKeeper.SetParams(ctx, TestingStakeParams) - - distKeeper := distrkeeper.NewKeeper(marshaler, keyDistro, getSubspace(paramsKeeper, distrtypes.ModuleName), accountKeeper, bankKeeper, stakingKeeper, authtypes.FeeCollectorName) - distKeeper.SetParams(ctx, distrtypes.DefaultParams()) - - // set genesis items required for distribution - distKeeper.SetFeePool(ctx, distrtypes.InitialFeePool()) - - // total supply to track this - totalSupply := sdk.NewCoins(sdk.NewInt64Coin("stake", 100000000)) - - // set up initial accounts - for name, perms := range maccPerms { - mod := authtypes.NewEmptyModuleAccount(name, perms...) - if name == stakingtypes.NotBondedPoolName { - require.NoError(t, fundModAccount(ctx, bankKeeper, mod.GetName(), totalSupply)) - } else if name == distrtypes.ModuleName { - // some big pot to pay out - amt := sdk.NewCoins(sdk.NewInt64Coin("stake", 500000)) - require.NoError(t, fundModAccount(ctx, bankKeeper, mod.GetName(), amt)) - } - - accountKeeper.SetModuleAccount(ctx, mod) - } - - stakeAddr := authtypes.NewModuleAddress(stakingtypes.BondedPoolName) - moduleAcct := accountKeeper.GetAccount(ctx, stakeAddr) - require.NotNil(t, moduleAcct) - - // Load default wasm config - - router := baseapp.NewMsgServiceRouter() - govRouter := govtypesv1beta1.NewRouter(). - AddRoute(paramsproposal.RouterKey, params.NewParamChangeProposalHandler(paramsKeeper)). - AddRoute(govtypes.RouterKey, govtypesv1beta1.ProposalHandler) - - govKeeper := govkeeper.NewKeeper( - marshaler, keyGov, getSubspace(paramsKeeper, govtypes.ModuleName).WithKeyTable(govtypesv1.ParamKeyTable()), accountKeeper, bankKeeper, stakingKeeper, govRouter, router, govtypes.DefaultConfig(), - ) - - govKeeper.SetProposalID(ctx, govtypesv1beta1.DefaultStartingProposalID) - govKeeper.SetDepositParams(ctx, govtypesv1.DefaultDepositParams()) - govKeeper.SetVotingParams(ctx, govtypesv1.DefaultVotingParams()) - govKeeper.SetTallyParams(ctx, govtypesv1.DefaultTallyParams()) - - slashingKeeper := slashingkeeper.NewKeeper( - marshaler, - keySlashing, - &stakingKeeper, - getSubspace(paramsKeeper, slashingtypes.ModuleName).WithKeyTable(slashingtypes.ParamKeyTable()), - ) - - k := NewKeeper( - marshaler, - gravityKey, - getSubspace(paramsKeeper, types.DefaultParamspace), - accountKeeper, - stakingKeeper, - bankKeeper, - slashingKeeper, - sdk.DefaultPowerReduction, - ) - - stakingKeeper = *stakingKeeper.SetHooks( - stakingtypes.NewMultiStakingHooks( - distKeeper.Hooks(), - slashingKeeper.Hooks(), - k.Hooks(), - ), - ) - - k.setParams(ctx, TestingGravityParams) - - return TestInput{ - GravityKeeper: k, - AccountKeeper: accountKeeper, - BankKeeper: bankKeeper, - StakingKeeper: stakingKeeper, - SlashingKeeper: slashingKeeper, - DistKeeper: distKeeper, - GovKeeper: govKeeper, - Context: ctx, - Marshaler: marshaler, - LegacyAmino: cdc, - GravityStoreKey: gravityKey, - } -} - -// getSubspace returns a param subspace for a given module name. -func getSubspace(k paramskeeper.Keeper, moduleName string) paramstypes.Subspace { - subspace, _ := k.GetSubspace(moduleName) - return subspace -} - -// MakeTestCodec creates a legacy amino codec for testing -func MakeTestCodec() *codec.LegacyAmino { - var cdc = codec.NewLegacyAmino() - auth.AppModuleBasic{}.RegisterLegacyAminoCodec(cdc) - bank.AppModuleBasic{}.RegisterLegacyAminoCodec(cdc) - staking.AppModuleBasic{}.RegisterLegacyAminoCodec(cdc) - distribution.AppModuleBasic{}.RegisterLegacyAminoCodec(cdc) - sdk.RegisterLegacyAminoCodec(cdc) - ccodec.RegisterCrypto(cdc) - params.AppModuleBasic{}.RegisterLegacyAminoCodec(cdc) - //types.RegisterCodec(cdc) - return cdc -} - -// MakeTestMarshaler creates a proto codec for use in testing -func MakeTestMarshaler() codec.Codec { - interfaceRegistry := codectypes.NewInterfaceRegistry() - std.RegisterInterfaces(interfaceRegistry) - ModuleBasics.RegisterInterfaces(interfaceRegistry) - types.RegisterInterfaces(interfaceRegistry) - return codec.NewProtoCodec(interfaceRegistry) -} - -// MintVouchersFromAir creates new gravity vouchers given erc20tokens -func MintVouchersFromAir(t *testing.T, ctx sdk.Context, k Keeper, dest sdk.AccAddress, amount types.ERC20Token) sdk.Coin { - coin := amount.GravityCoin() - vouchers := sdk.Coins{coin} - err := k.bankKeeper.MintCoins(ctx, types.ModuleName, vouchers) - require.NoError(t, err) - err = k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, dest, vouchers) - require.NoError(t, err) - return coin -} - -// NewStakingKeeperMock creates a new mock staking keeper -func NewStakingKeeperMock(operators ...sdk.ValAddress) *StakingKeeperMock { - r := &StakingKeeperMock{ - BondedValidators: make([]stakingtypes.Validator, 0), - ValidatorPower: make(map[string]int64), - } - const defaultTestPower = 100 - for _, a := range operators { - - r.BondedValidators = append(r.BondedValidators, stakingtypes.Validator{ - ConsensusPubkey: codectypes.UnsafePackAny(ed25519.GenPrivKey().PubKey()), - OperatorAddress: a.String(), - Status: stakingtypes.Bonded, - }) - r.ValidatorPower[a.String()] = defaultTestPower - } - return r -} - -// MockStakingValidatorData creates mock validator data -type MockStakingValidatorData struct { - Operator sdk.ValAddress - Power int64 -} - -// NewStakingKeeperWeightedMock creates a new mock staking keeper with some mock validator data -func NewStakingKeeperWeightedMock(t ...MockStakingValidatorData) *StakingKeeperMock { - r := &StakingKeeperMock{ - BondedValidators: make([]stakingtypes.Validator, len(t)), - ValidatorPower: make(map[string]int64, len(t)), - } - - for i, a := range t { - pk, err := codectypes.NewAnyWithValue(ed25519.GenPrivKey().PubKey()) - if err != nil { - panic(err) - } - r.BondedValidators[i] = stakingtypes.Validator{ - ConsensusPubkey: pk, - OperatorAddress: a.Operator.String(), - Status: stakingtypes.Bonded, - } - r.ValidatorPower[a.Operator.String()] = a.Power - } - return r -} - -// StakingKeeperMock is a mock staking keeper for use in the tests -type StakingKeeperMock struct { - BondedValidators []stakingtypes.Validator - ValidatorPower map[string]int64 -} - -// GetBondedValidatorsByPower implements the interface for staking keeper required by gravity -func (s *StakingKeeperMock) GetBondedValidatorsByPower(ctx sdk.Context) []stakingtypes.Validator { - return s.BondedValidators -} - -// GetLastValidatorPower implements the interface for staking keeper required by gravity -func (s *StakingKeeperMock) GetLastValidatorPower(ctx sdk.Context, operator sdk.ValAddress) int64 { - v, ok := s.ValidatorPower[operator.String()] - if !ok { - panic("unknown address") - } - return v -} - -// GetLastTotalPower implements the interface for staking keeper required by gravity -func (s *StakingKeeperMock) GetLastTotalPower(ctx sdk.Context) (power sdkmath.Int) { - var total int64 - for _, v := range s.ValidatorPower { - total += v - } - return sdk.NewInt(total) -} - -// IterateValidators staisfies the interface -func (s *StakingKeeperMock) IterateValidators(ctx sdk.Context, cb func(index int64, validator stakingtypes.ValidatorI) (stop bool)) { - for i, val := range s.BondedValidators { - stop := cb(int64(i), val) - if stop { - break - } - } -} - -// IterateBondedValidatorsByPower staisfies the interface -func (s *StakingKeeperMock) IterateBondedValidatorsByPower(ctx sdk.Context, cb func(index int64, validator stakingtypes.ValidatorI) (stop bool)) { - for i, val := range s.BondedValidators { - stop := cb(int64(i), val) - if stop { - break - } - } -} - -// IterateLastValidators staisfies the interface -func (s *StakingKeeperMock) IterateLastValidators(ctx sdk.Context, cb func(index int64, validator stakingtypes.ValidatorI) (stop bool)) { - for i, val := range s.BondedValidators { - stop := cb(int64(i), val) - if stop { - break - } - } -} - -// Validator staisfies the interface -func (s *StakingKeeperMock) Validator(ctx sdk.Context, addr sdk.ValAddress) stakingtypes.ValidatorI { - for _, val := range s.BondedValidators { - if val.GetOperator().Equals(addr) { - return val - } - } - return nil -} - -// ValidatorByConsAddr staisfies the interface -func (s *StakingKeeperMock) ValidatorByConsAddr(ctx sdk.Context, addr sdk.ConsAddress) stakingtypes.ValidatorI { - for _, val := range s.BondedValidators { - cons, err := val.GetConsAddr() - if err != nil { - panic(err) - } - if cons.Equals(addr) { - return val - } - } - return nil -} - -func (s *StakingKeeperMock) GetParams(ctx sdk.Context) stakingtypes.Params { - return stakingtypes.DefaultParams() -} - -func (s *StakingKeeperMock) GetValidator(ctx sdk.Context, addr sdk.ValAddress) (validator stakingtypes.Validator, found bool) { - panic("unexpected call") -} - -func (s *StakingKeeperMock) ValidatorQueueIterator(ctx sdk.Context, endTime time.Time, endHeight int64) sdk.Iterator { - store := ctx.KVStore(sdk.NewKVStoreKey("staking")) - return store.Iterator(stakingtypes.ValidatorQueueKey, sdk.InclusiveEndBytes(stakingtypes.GetValidatorQueueKey(endTime, endHeight))) - -} - -// Slash staisfies the interface -func (s *StakingKeeperMock) Slash(sdk.Context, sdk.ConsAddress, int64, int64, sdk.Dec) sdkmath.Int { - return sdkmath.NewInt(0) -} - -// Jail staisfies the interface -func (s *StakingKeeperMock) Jail(sdk.Context, sdk.ConsAddress) {} - -// AlwaysPanicStakingMock is a mock staking keeper that panics on usage -type AlwaysPanicStakingMock struct{} - -// GetLastTotalPower implements the interface for staking keeper required by gravity -func (s AlwaysPanicStakingMock) GetLastTotalPower(ctx sdk.Context) (power sdkmath.Int) { - panic("unexpected call") -} - -// GetBondedValidatorsByPower implements the interface for staking keeper required by gravity -func (s AlwaysPanicStakingMock) GetBondedValidatorsByPower(ctx sdk.Context) []stakingtypes.Validator { - panic("unexpected call") -} - -// GetLastValidatorPower implements the interface for staking keeper required by gravity -func (s AlwaysPanicStakingMock) GetLastValidatorPower(ctx sdk.Context, operator sdk.ValAddress) int64 { - panic("unexpected call") -} - -// IterateValidators staisfies the interface -func (s AlwaysPanicStakingMock) IterateValidators(sdk.Context, func(index int64, validator stakingtypes.ValidatorI) (stop bool)) { - panic("unexpected call") -} - -// IterateBondedValidatorsByPower staisfies the interface -func (s AlwaysPanicStakingMock) IterateBondedValidatorsByPower(sdk.Context, func(index int64, validator stakingtypes.ValidatorI) (stop bool)) { - panic("unexpected call") -} - -// IterateLastValidators staisfies the interface -func (s AlwaysPanicStakingMock) IterateLastValidators(sdk.Context, func(index int64, validator stakingtypes.ValidatorI) (stop bool)) { - panic("unexpected call") -} - -// Validator staisfies the interface -func (s AlwaysPanicStakingMock) Validator(sdk.Context, sdk.ValAddress) stakingtypes.ValidatorI { - panic("unexpected call") -} - -// ValidatorByConsAddr staisfies the interface -func (s AlwaysPanicStakingMock) ValidatorByConsAddr(sdk.Context, sdk.ConsAddress) stakingtypes.ValidatorI { - panic("unexpected call") -} - -// Slash staisfies the interface -func (s AlwaysPanicStakingMock) Slash(sdk.Context, sdk.ConsAddress, int64, int64, sdk.Dec) { - panic("unexpected call") -} - -// Jail staisfies the interface -func (s AlwaysPanicStakingMock) Jail(sdk.Context, sdk.ConsAddress) { - panic("unexpected call") -} - -func NewTestMsgCreateValidator(address sdk.ValAddress, pubKey ccrypto.PubKey, amt sdkmath.Int) *stakingtypes.MsgCreateValidator { - commission := stakingtypes.NewCommissionRates(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()) - out, err := stakingtypes.NewMsgCreateValidator( - address, pubKey, sdk.NewCoin("stake", amt), - stakingtypes.Description{}, commission, sdk.OneInt(), - ) - if err != nil { - panic(err) - } - return out -} - -func NewTestMsgUnDelegateValidator(address sdk.ValAddress, amt sdkmath.Int) *stakingtypes.MsgUndelegate { - msg := stakingtypes.NewMsgUndelegate(sdk.AccAddress(address), address, sdk.NewCoin("stake", amt)) - return msg -} - -func fundAccount(ctx sdk.Context, bankKeeper types.BankKeeper, addr sdk.AccAddress, amounts sdk.Coins) error { - if err := bankKeeper.MintCoins(ctx, types.ModuleName, amounts); err != nil { - return err - } - - return bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, addr, amounts) -} - -func fundModAccount(ctx sdk.Context, bankKeeper types.BankKeeper, recipientMod string, amounts sdk.Coins) error { - if err := bankKeeper.MintCoins(ctx, types.ModuleName, amounts); err != nil { - return err - } - - return bankKeeper.SendCoinsFromModuleToModule(ctx, types.ModuleName, recipientMod, amounts) -} diff --git a/module/x/gravity/migrations/v1/store.go b/module/x/gravity/migrations/v1/store.go deleted file mode 100644 index ab24ffe00..000000000 --- a/module/x/gravity/migrations/v1/store.go +++ /dev/null @@ -1,85 +0,0 @@ -//go:build exclude - -package v1 - -import ( - "github.com/cosmos/cosmos-sdk/codec" - cdctypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/store/prefix" - storetypes "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/ethereum/go-ethereum/common" - "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/migrations/v1/types" -) - -func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec) error { - ctx.Logger().Info("Gravity v1 to v2: Beginning store migration") - - store := ctx.KVStore(storeKey) - - migrateCosmosOriginatedERC20ToDenom(store) - migrateContractCallTxTimeouts(store, cdc) - - ctx.Logger().Info("Gravty v1 to v2: Store migration complete") - - return nil -} - -func migrateCosmosOriginatedERC20ToDenom(store storetypes.KVStore) error { - prefixStore := prefix.NewStore(store, []byte{types.ERC20ToDenomKey}) - iter := prefixStore.Iterator(nil, nil) - defer iter.Close() - - for ; iter.Valid(); iter.Next() { - oldKey := iter.Key() - newKey := common.HexToAddress(string(oldKey)).Bytes() - - prefixStore.Delete(oldKey) - prefixStore.Set(newKey, iter.Value()) - } - - return nil -} - -func migrateContractCallTxTimeouts(store storetypes.KVStore, cdc codec.BinaryCodec) error { - lastObservedEthereumBlockHeight := getLastObservedEthereumBlockHeight(store, cdc).EthereumHeight - - prefixStore := prefix.NewStore(store, types.MakeOutgoingTxKey([]byte{types.ContractCallTxPrefixByte})) - iter := prefixStore.Iterator(nil, nil) - defer iter.Close() - for ; iter.Valid(); iter.Next() { - var any cdctypes.Any - cdc.MustUnmarshal(iter.Value(), &any) - var otx types.OutgoingTx - if err := cdc.UnpackAny(&any, &otx); err != nil { - panic(err) - } - - cctx, _ := otx.(*types.ContractCallTx) - // adding 800 blocks to the last observed height to clean all old stuff out in a few hours - cctx.Timeout = lastObservedEthereumBlockHeight + uint64(800) - prefixStore.Delete(iter.Key()) - - newAny, err := types.PackOutgoingTx(otx) - if err != nil { - panic(err) - } - prefixStore.Set(iter.Key(), cdc.MustMarshal(newAny)) - } - return nil -} - -func getLastObservedEthereumBlockHeight(store storetypes.KVStore, cdc codec.BinaryCodec) types.LatestEthereumBlockHeight { - bytes := store.Get([]byte{types.LastEthereumBlockHeightKey}) - - if len(bytes) == 0 { - return types.LatestEthereumBlockHeight{ - CosmosHeight: 0, - EthereumHeight: 0, - } - } - height := types.LatestEthereumBlockHeight{} - cdc.MustUnmarshal(bytes, &height) - - return height -} diff --git a/module/x/gravity/migrations/v1/store_test.go b/module/x/gravity/migrations/v1/store_test.go deleted file mode 100644 index 7d92c41f4..000000000 --- a/module/x/gravity/migrations/v1/store_test.go +++ /dev/null @@ -1,89 +0,0 @@ -//go:build exclude - -package v1_test - -import ( - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/ethereum/go-ethereum/common" - v1 "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/migrations/v1" - "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/migrations/v1/keeper" - "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/migrations/v1/types" - "github.com/stretchr/testify/assert" -) - -const denom string = "cosmos" -const tokenContractString string = "0x2a24af0501a534fca004ee1bd667b783f205a546" - -func TestMigrateCosmosOriginatedERC20ToDenom(t *testing.T) { - input := keeper.CreateTestEnv(t) - ctx := input.Context - storeKey := input.GravityStoreKey - - ctx.KVStore(storeKey).Set(types.MakeERC20ToDenomKey(tokenContractString), []byte(denom)) - - err := v1.MigrateStore(ctx, storeKey, input.Marshaler) - assert.NoError(t, err) - - tokenContract := common.HexToAddress(tokenContractString) - storedDenom := ctx.KVStore(storeKey).Get(types.MakeNewERC20ToDenomKey(tokenContract)) - assert.Equal(t, denom, string(storedDenom)) -} - -func TestMigrateContractCallTxTimeout(t *testing.T) { - input := keeper.CreateTestEnv(t) - ctx := input.Context - storeKey := input.GravityStoreKey - cdc := input.Marshaler - - latestEthereumBlockHeight := &types.LatestEthereumBlockHeight{ - CosmosHeight: 100, - EthereumHeight: 1000, - } - - ctx.KVStore(storeKey).Set([]byte{types.LastEthereumBlockHeightKey}, cdc.MustMarshal(latestEthereumBlockHeight)) - - erc20Token := types.ERC20Token{ - Contract: tokenContractString, - Amount: sdk.NewInt(1), - } - - otx := &types.ContractCallTx{ - InvalidationNonce: uint64(1), - InvalidationScope: []byte("test-scope"), - Address: "0x2a24af0501a534fca004ee1bd667b783f205a546", - Payload: []byte("payload"), - Timeout: uint64(1000), - Tokens: []types.ERC20Token{erc20Token}, - Fees: []types.ERC20Token{erc20Token}, - Height: uint64(100), - } - - any, err := types.PackOutgoingTx(otx) - if err != nil { - panic(err) - } - - ctx.KVStore(storeKey).Set( - types.MakeOutgoingTxKey(otx.GetStoreIndex()), - cdc.MustMarshal(any), - ) - - err = v1.MigrateStore(ctx, storeKey, input.Marshaler) - assert.NoError(t, err) - - var updatedOtx types.OutgoingTx - err = cdc.UnmarshalInterface(ctx.KVStore(storeKey).Get(types.MakeOutgoingTxKey(otx.GetStoreIndex())), &updatedOtx) - assert.NoError(t, err) - - cctx, _ := updatedOtx.(*types.ContractCallTx) - assert.Equal(t, cctx.InvalidationNonce, uint64(1)) - assert.Equal(t, cctx.InvalidationScope, []byte("test-scope")) - assert.Equal(t, cctx.Address, "0x2a24af0501a534fca004ee1bd667b783f205a546") - assert.Equal(t, cctx.Payload, []byte("payload")) - assert.Equal(t, cctx.Timeout, uint64(1800)) // migration added 800 to the latest height of 1000 - assert.Equal(t, cctx.Tokens, []types.ERC20Token{erc20Token}) - assert.Equal(t, cctx.Fees, []types.ERC20Token{erc20Token}) - assert.Equal(t, cctx.Height, uint64(100)) -} diff --git a/module/x/gravity/migrations/v1/types/abi_json.go b/module/x/gravity/migrations/v1/types/abi_json.go deleted file mode 100644 index 94dfaaa1e..000000000 --- a/module/x/gravity/migrations/v1/types/abi_json.go +++ /dev/null @@ -1,76 +0,0 @@ -package types - -// The go-ethereum ABI encoder *only* encodes function calls and then it only encodes -// function calls for which you provide an ABI json just like you would get out of the -// solidity compiler with your compiled contract. -// You are supposed to compile your contract, use abigen to generate an ABI , import -// this generated go module and then use for that for all testing and development. -// This abstraction layer is more trouble than it's worth, because we don't want to -// encode a function call at all, but instead we want to emulate a Solidity encode operation -// which has no equal available from go-ethereum. -// -// In order to work around this absurd series of problems we have to manually write the below -// 'function specification' that will encode the same arguments into a function call. We can then -// truncate the first several bytes where the call name is encoded to finally get the equal of the - -const ( - // OutgoingBatchTxCheckpointABIJSON checks the ETH ABI for compatability of the OutgoingBatchTx message - OutgoingBatchTxCheckpointABIJSON = `[{ - "name": "submitBatch", - "stateMutability": "pure", - "type": "function", - "inputs": [ - { "internalType": "bytes32", "name": "_gravityId", "type": "bytes32" }, - { "internalType": "bytes32", "name": "_methodName", "type": "bytes32" }, - { "internalType": "uint256[]", "name": "_amounts", "type": "uint256[]" }, - { "internalType": "address[]", "name": "_destinations", "type": "address[]" }, - { "internalType": "uint256[]", "name": "_fees", "type": "uint256[]" }, - { "internalType": "uint256", "name": "_batchNonce", "type": "uint256" }, - { "internalType": "address", "name": "_tokenContract", "type": "address" }, - { "internalType": "uint256", "name": "_batchTimeout", "type": "uint256" } - ], - "outputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ] - }]` - - // ValsetCheckpointABIJSON checks the ETH ABI for compatability of the Valset update message - ValsetCheckpointABIJSON = `[{ - "name": "checkpoint", - "stateMutability": "pure", - "type": "function", - "inputs": [ - { "internalType": "bytes32", "name": "_gravityId", "type": "bytes32" }, - { "internalType": "bytes32", "name": "_checkpoint", "type": "bytes32" }, - { "internalType": "uint256", "name": "_valsetNonce", "type": "uint256" }, - { "internalType": "address[]", "name": "_validators", "type": "address[]" }, - { "internalType": "uint256[]", "name": "_powers", "type": "uint256[]" }, - { "internalType": "uint256", "name": "_rewardAmount","type": "uint256" }, - { "internalType": "address", "name": "_rewardToken", "type": "address" } - ], - "outputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ] - }]` - - // OutgoingLogicCallABIJSON checks the ETH ABI for compatability of the logic call message - OutgoingLogicCallABIJSON = `[{ - "name": "checkpoint", - "outputs": [], - "stateMutability": "pure", - "type": "function", - "inputs": [ - { "internalType": "bytes32", "name": "_gravityId", "type": "bytes32" }, - { "internalType": "bytes32", "name": "_methodName", "type": "bytes32" }, - { "internalType": "uint256[]", "name": "_transferAmounts", "type": "uint256[]" }, - { "internalType": "address[]", "name": "_transferTokenContracts", "type": "address[]" }, - { "internalType": "uint256[]", "name": "_feeAmounts", "type": "uint256[]" }, - { "internalType": "address[]", "name": "_feeTokenContracts", "type": "address[]" }, - { "internalType": "address", "name": "_logicContractAddress", "type": "address" }, - { "internalType": "bytes", "name": "_payload", "type": "bytes" }, - { "internalType": "uint256", "name": "_timeout", "type": "uint256" }, - { "internalType": "bytes32", "name": "_invalidationId", "type": "bytes32" }, - { "internalType": "uint256", "name": "_invalidationNonce", "type": "uint256" } - ] - }]` -) diff --git a/module/x/gravity/migrations/v1/types/codec.go b/module/x/gravity/migrations/v1/types/codec.go deleted file mode 100644 index a987a785a..000000000 --- a/module/x/gravity/migrations/v1/types/codec.go +++ /dev/null @@ -1,161 +0,0 @@ -package types - -import ( - "github.com/cosmos/gogoproto/proto" - - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/codec/types" - cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/types/msgservice" -) - -// RegisterLegacyAminoCodec registers the vesting interfaces and concrete types on the -// provided LegacyAmino codec. These types are used for Amino JSON serialization -func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - cdc.RegisterConcrete(&MsgDelegateKeys{}, "gravity-bridge/", nil) -} - -var ( - amino = codec.NewLegacyAmino() - - // ModuleCdc references the global x/bank module codec. Note, the codec should - // ONLY be used in certain instances of tests and for JSON encoding as Amino is - // still used for that purpose. - // - // The actual codec used for serialization should be provided to x/staking and - // defined at the application level. - ModuleCdc = codec.NewAminoCodec(amino) -) - -func init() { - RegisterLegacyAminoCodec(amino) - cryptocodec.RegisterCrypto(amino) - amino.Seal() -} - -// RegisterInterfaces registers the interfaces for the proto stuff -func RegisterInterfaces(registry types.InterfaceRegistry) { - registry.RegisterImplementations((*sdk.Msg)(nil), - &MsgSendToEthereum{}, - &MsgCancelSendToEthereum{}, - &MsgRequestBatchTx{}, - &MsgSubmitEthereumEvent{}, - &MsgSubmitEthereumTxConfirmation{}, - &MsgDelegateKeys{}, - ) - - registry.RegisterInterface( - "gravity.v1.EthereumEvent", - (*EthereumEvent)(nil), - &SendToCosmosEvent{}, - &BatchExecutedEvent{}, - &ERC20DeployedEvent{}, - &ContractCallExecutedEvent{}, - &SignerSetTxExecutedEvent{}, - ) - - registry.RegisterInterface( - "gravity.v1.EthereumSignature", - (*EthereumTxConfirmation)(nil), - &BatchTxConfirmation{}, - &ContractCallTxConfirmation{}, - &SignerSetTxConfirmation{}, - ) - - registry.RegisterInterface( - "gravity.v1.OutgoingTx", - (*OutgoingTx)(nil), - &SignerSetTx{}, - &BatchTx{}, - &ContractCallTx{}, - ) - - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) -} - -func PackEvent(event EthereumEvent) (*types.Any, error) { - msg, ok := event.(proto.Message) - if !ok { - return nil, sdkerrors.Wrapf(sdkerrors.ErrPackAny, "cannot proto marshal %T", event) - } - - anyEvent, err := types.NewAnyWithValue(msg) - if err != nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrPackAny, err.Error()) - } - - return anyEvent, nil -} - -// UnpackEvent unpacks an Any into an EthereumEvent. It returns an error if the -// event can't be unpacked. -func UnpackEvent(any *types.Any) (EthereumEvent, error) { - if any == nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrUnpackAny, "protobuf Any message cannot be nil") - } - - event, ok := any.GetCachedValue().(EthereumEvent) - if !ok { - return nil, sdkerrors.Wrapf(sdkerrors.ErrUnpackAny, "cannot unpack Any into EthereumEvent %T", any) - } - - return event, nil -} - -func PackConfirmation(confirmation EthereumTxConfirmation) (*types.Any, error) { - msg, ok := confirmation.(proto.Message) - if !ok { - return nil, sdkerrors.Wrapf(sdkerrors.ErrPackAny, "cannot proto marshal %T", confirmation) - } - - anyEvent, err := types.NewAnyWithValue(msg) - if err != nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrPackAny, err.Error()) - } - - return anyEvent, nil -} - -// UnpackConfirmation unpacks an Any into a Confirm interface. It returns an error if the -// confirmation can't be unpacked. -func UnpackConfirmation(any *types.Any) (EthereumTxConfirmation, error) { - if any == nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrUnpackAny, "protobuf Any message cannot be nil") - } - - confirm, ok := any.GetCachedValue().(EthereumTxConfirmation) - if !ok { - return nil, sdkerrors.Wrapf(sdkerrors.ErrUnpackAny, "cannot unpack Any into EthereumSignature %T", any) - } - - return confirm, nil -} - -func PackOutgoingTx(outgoing OutgoingTx) (*types.Any, error) { - msg, ok := outgoing.(proto.Message) - if !ok { - return nil, sdkerrors.Wrapf(sdkerrors.ErrPackAny, "cannot proto marshal %T", outgoing) - } - - anyEvent, err := types.NewAnyWithValue(msg) - if err != nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrPackAny, err.Error()) - } - - return anyEvent, nil -} - -func UnpackOutgoingTx(any *types.Any) (OutgoingTx, error) { - if any == nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrUnpackAny, "protobuf Any message cannot be nil") - } - - confirm, ok := any.GetCachedValue().(OutgoingTx) - if !ok { - return nil, sdkerrors.Wrapf(sdkerrors.ErrUnpackAny, "cannot unpack Any into OutgoingTx %T", any) - } - - return confirm, nil -} diff --git a/module/x/gravity/migrations/v1/types/ethereum.go b/module/x/gravity/migrations/v1/types/ethereum.go deleted file mode 100644 index 75af8eadc..000000000 --- a/module/x/gravity/migrations/v1/types/ethereum.go +++ /dev/null @@ -1,115 +0,0 @@ -package types - -import ( - "bytes" - "fmt" - "strings" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/ethereum/go-ethereum/common" -) - -const ( - // GravityDenomPrefix indicates the prefix for all assests minted by this module - GravityDenomPrefix = ModuleName - - // GravityDenomSeparator is the separator for gravity denoms - GravityDenomSeparator = "" - - // EthereumContractAddressLen is the length of contract address strings - EthereumContractAddressLen = 42 - - // GravityDenomLen is the length of the denoms generated by the gravity module - GravityDenomLen = len(GravityDenomPrefix) + len(GravityDenomSeparator) + EthereumContractAddressLen -) - -// EthereumAddrLessThan migrates the Ethereum address less than function -func EthereumAddrLessThan(e, o string) bool { - return bytes.Compare([]byte(e)[:], []byte(o)[:]) == -1 -} - -// ValidateEthereumAddress validates the ethereum address strings -// func ValidateEthereumAddress(a string) error { -// if a == "" { -// return fmt.Errorf("empty") -// } -// if !regexp.MustCompile("^0x[0-9a-fA-F]{40}$").MatchString(a) { -// return fmt.Errorf("address(%s) doesn't pass regex", a) -// } -// if len(a) != EthereumContractAddressLen { -// return fmt.Errorf("address(%s) of the wrong length exp(%d) actual(%d)", a, len(a), EthereumContractAddressLen) -// } -// return nil -// } - -///////////////////////// -// ERC20Token // -///////////////////////// - -// NewERC20Token returns a new instance of an ERC20 -func NewERC20Token(amount uint64, contract common.Address) ERC20Token { - return ERC20Token{ - Amount: sdk.NewIntFromUint64(amount), - Contract: contract.Hex(), - } -} - -func NewSDKIntERC20Token(amount sdk.Int, contract common.Address) ERC20Token { - return ERC20Token{ - Amount: amount, - Contract: contract.Hex(), - } -} - -func GravityDenom(contract common.Address) string { - return strings.Join([]string{GravityDenomPrefix, contract.Hex()}, GravityDenomSeparator) -} - -// GravityCoin returns the gravity representation of the ERC20 -func (e ERC20Token) GravityCoin() sdk.Coin { - return sdk.Coin{Amount: e.Amount, Denom: GravityDenom(common.HexToAddress(e.Contract))} -} - -func GravityDenomToERC20(denom string) (string, error) { - fullPrefix := GravityDenomPrefix + GravityDenomSeparator - if !strings.HasPrefix(denom, fullPrefix) { - return "", fmt.Errorf("denom prefix(%s) not equal to expected(%s)", denom, fullPrefix) - } - contract := strings.TrimPrefix(denom, fullPrefix) - switch { - case !common.IsHexAddress(contract): - return "", fmt.Errorf("error validating ethereum contract address") - case len(denom) != GravityDenomLen: - return "", fmt.Errorf("len(denom)(%d) not equal to GravityDenomLen(%d)", len(denom), GravityDenomLen) - default: - return common.HexToAddress(contract).Hex(), nil - } -} - -func NormalizeCoinDenom(coin *sdk.Coin) { - coin.Denom = NormalizeDenom(coin.Denom) -} - -func NormalizeDenom(denom string) string { - if contract, err := GravityDenomToERC20(denom); err == nil { - return GravityDenom(common.HexToAddress(contract)) - } - - return denom -} - -func NewSendToEthereumTx(id uint64, tokenContract common.Address, sender sdk.AccAddress, recipient common.Address, amount, feeAmount uint64) *SendToEthereum { - return &SendToEthereum{ - Id: id, - Erc20Fee: NewERC20Token(feeAmount, tokenContract), - Sender: sender.String(), - EthereumRecipient: recipient.Hex(), - Erc20Token: NewERC20Token(amount, tokenContract), - } -} - -// Id: 2, -// Erc20Fee: types.NewERC20Token(3, myTokenContractAddr), -// Sender: mySender.String(), -// EthereumRecipient: myReceiver, -// Erc20Token: types.NewERC20Token(101, myTokenContractAddr), diff --git a/module/x/gravity/migrations/v1/types/ethereum_event.go b/module/x/gravity/migrations/v1/types/ethereum_event.go deleted file mode 100644 index 9fc9b1331..000000000 --- a/module/x/gravity/migrations/v1/types/ethereum_event.go +++ /dev/null @@ -1,175 +0,0 @@ -package types - -import ( - "bytes" - "crypto/sha256" - "fmt" - - tmbytes "github.com/cometbft/cometbft/libs/bytes" - "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/ethereum/go-ethereum/common" -) - -var ( - _ EthereumEvent = &SendToCosmosEvent{} - _ EthereumEvent = &BatchExecutedEvent{} - _ EthereumEvent = &ContractCallExecutedEvent{} - _ EthereumEvent = &ERC20DeployedEvent{} - _ EthereumEvent = &SignerSetTxExecutedEvent{} -) - -// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces -func (m *EthereumEventVoteRecord) UnpackInterfaces(unpacker types.AnyUnpacker) error { - var event EthereumEvent - return unpacker.UnpackAny(m.Event, &event) -} - -////////// -// Hash // -////////// - -func (stce *SendToCosmosEvent) Hash() tmbytes.HexBytes { - rcv, _ := sdk.AccAddressFromBech32(stce.CosmosReceiver) - path := bytes.Join( - [][]byte{ - sdk.Uint64ToBigEndian(stce.EventNonce), - common.HexToAddress(stce.TokenContract).Bytes(), - stce.Amount.BigInt().Bytes(), - common.Hex2Bytes(stce.EthereumSender), - rcv.Bytes(), - sdk.Uint64ToBigEndian(stce.EthereumHeight), - }, - []byte{}, - ) - hash := sha256.Sum256([]byte(path)) - return hash[:] -} - -func (bee *BatchExecutedEvent) Hash() tmbytes.HexBytes { - path := bytes.Join( - [][]byte{ - common.HexToAddress(bee.TokenContract).Bytes(), - sdk.Uint64ToBigEndian(bee.EventNonce), - sdk.Uint64ToBigEndian(bee.BatchNonce), - sdk.Uint64ToBigEndian(bee.EthereumHeight), - }, - []byte{}, - ) - hash := sha256.Sum256([]byte(path)) - return hash[:] -} - -func (ccee *ContractCallExecutedEvent) Hash() tmbytes.HexBytes { - path := bytes.Join( - [][]byte{ - sdk.Uint64ToBigEndian(ccee.EventNonce), - ccee.InvalidationScope, - sdk.Uint64ToBigEndian(ccee.InvalidationNonce), - sdk.Uint64ToBigEndian(ccee.EthereumHeight), - }, - []byte{}, - ) - hash := sha256.Sum256([]byte(path)) - return hash[:] -} - -func (e20de *ERC20DeployedEvent) Hash() tmbytes.HexBytes { - path := bytes.Join( - [][]byte{ - sdk.Uint64ToBigEndian(e20de.EventNonce), - []byte(e20de.CosmosDenom), - common.HexToAddress(e20de.TokenContract).Bytes(), - []byte(e20de.Erc20Name), - []byte(e20de.Erc20Symbol), - sdk.Uint64ToBigEndian(e20de.Erc20Decimals), - sdk.Uint64ToBigEndian(e20de.EthereumHeight), - }, - []byte{}, - ) - hash := sha256.Sum256([]byte(path)) - return hash[:] -} - -func (sse *SignerSetTxExecutedEvent) Hash() tmbytes.HexBytes { - path := bytes.Join( - [][]byte{ - sdk.Uint64ToBigEndian(sse.EventNonce), - sdk.Uint64ToBigEndian(sse.SignerSetTxNonce), - sdk.Uint64ToBigEndian(sse.EthereumHeight), - EthereumSigners(sse.Members).Hash(), - }, - []byte{}, - ) - hash := sha256.Sum256(([]byte(path))) - return hash[:] -} - -////////////// -// Validate // -////////////// - -func (stce *SendToCosmosEvent) Validate() error { - if stce.EventNonce == 0 { - return fmt.Errorf("event nonce cannot be 0") - } - if !common.IsHexAddress(stce.TokenContract) { - return fmt.Errorf("ethereum contract address") - } - if stce.Amount.IsNegative() { - return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, "amount must be positive") - } - if !common.IsHexAddress(stce.EthereumSender) { - return fmt.Errorf("ethereum sender") - } - if _, err := sdk.AccAddressFromBech32(stce.CosmosReceiver); err != nil { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, stce.CosmosReceiver) - } - return nil -} - -func (bee *BatchExecutedEvent) Validate() error { - if bee.EventNonce == 0 { - return fmt.Errorf("event nonce cannot be 0") - } - if !common.IsHexAddress(bee.TokenContract) { - return fmt.Errorf("ethereum contract address") - } - return nil -} - -func (ccee *ContractCallExecutedEvent) Validate() error { - if ccee.EventNonce == 0 { - return fmt.Errorf("event nonce cannot be 0") - } - return nil -} - -func (e20de *ERC20DeployedEvent) Validate() error { - if e20de.EventNonce == 0 { - return fmt.Errorf("event nonce cannot be 0") - } - if !common.IsHexAddress(e20de.TokenContract) { - return fmt.Errorf("ethereum contract address") - } - if err := sdk.ValidateDenom(e20de.CosmosDenom); err != nil { - return err - } - return nil -} - -func (sse *SignerSetTxExecutedEvent) Validate() error { - if sse.EventNonce == 0 { - return fmt.Errorf("event nonce cannot be 0") - } - if sse.Members == nil { - return fmt.Errorf("members cannot be nil") - } - for i, member := range sse.Members { - if err := member.ValidateBasic(); err != nil { - return fmt.Errorf("ethereum signer %d error: %w", i, err) - } - } - return nil -} diff --git a/module/x/gravity/migrations/v1/types/ethereum_signature.go b/module/x/gravity/migrations/v1/types/ethereum_signature.go deleted file mode 100644 index 3c21287b8..000000000 --- a/module/x/gravity/migrations/v1/types/ethereum_signature.go +++ /dev/null @@ -1,94 +0,0 @@ -package types - -import ( - "fmt" - - "github.com/ethereum/go-ethereum/common" -) - -var ( - _ EthereumTxConfirmation = &SignerSetTxConfirmation{} - _ EthereumTxConfirmation = &ContractCallTxConfirmation{} - _ EthereumTxConfirmation = &BatchTxConfirmation{} -) - -/////////////// -// GetSigner // -/////////////// - -func (u *SignerSetTxConfirmation) GetSigner() common.Address { - return common.HexToAddress(u.EthereumSigner) -} - -func (u *ContractCallTxConfirmation) GetSigner() common.Address { - return common.HexToAddress(u.EthereumSigner) -} - -func (u *BatchTxConfirmation) GetSigner() common.Address { - return common.HexToAddress(u.EthereumSigner) -} - -/////////////////// -// GetStoreIndex // -/////////////////// - -func (sstx *SignerSetTxConfirmation) GetStoreIndex() []byte { - return MakeSignerSetTxKey(sstx.SignerSetNonce) -} - -func (btx *BatchTxConfirmation) GetStoreIndex() []byte { - return MakeBatchTxKey(common.HexToAddress(btx.TokenContract), btx.BatchNonce) -} - -func (cctx *ContractCallTxConfirmation) GetStoreIndex() []byte { - return MakeContractCallTxKey(cctx.InvalidationScope, cctx.InvalidationNonce) -} - -////////////// -// Validate // -////////////// - -func (u *SignerSetTxConfirmation) Validate() error { - if u.SignerSetNonce == 0 { - return fmt.Errorf("nonce must be set") - } - if !common.IsHexAddress(u.EthereumSigner) { - return fmt.Errorf("ethereum signer must be address") - } - if u.Signature == nil { - return fmt.Errorf("signature must be set") - } - return nil -} - -func (u *ContractCallTxConfirmation) Validate() error { - if u.InvalidationNonce == 0 { - return fmt.Errorf("invalidation nonce must be set") - } - if u.InvalidationScope == nil { - return fmt.Errorf("invalidation scope must be set") - } - if !common.IsHexAddress(u.EthereumSigner) { - return fmt.Errorf("ethereum signer must be address") - } - if u.Signature == nil { - return fmt.Errorf("signature must be set") - } - return nil -} - -func (u *BatchTxConfirmation) Validate() error { - if u.BatchNonce == 0 { - return fmt.Errorf("nonce must be set") - } - if !common.IsHexAddress(u.TokenContract) { - return fmt.Errorf("token contract address must be valid ethereum address") - } - if !common.IsHexAddress(u.EthereumSigner) { - return fmt.Errorf("ethereum signer must be address") - } - if u.Signature == nil { - return fmt.Errorf("signature must be set") - } - return nil -} diff --git a/module/x/gravity/migrations/v1/types/expected_keepers.go b/module/x/gravity/migrations/v1/types/expected_keepers.go deleted file mode 100644 index 421a09594..000000000 --- a/module/x/gravity/migrations/v1/types/expected_keepers.go +++ /dev/null @@ -1,50 +0,0 @@ -package types - -import ( - "time" - - sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - bank "github.com/cosmos/cosmos-sdk/x/bank/types" - slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" -) - -// StakingKeeper defines the expected staking keeper methods -type StakingKeeper interface { - GetBondedValidatorsByPower(ctx sdk.Context) []stakingtypes.Validator - GetLastValidatorPower(ctx sdk.Context, operator sdk.ValAddress) int64 - GetLastTotalPower(ctx sdk.Context) (power sdkmath.Int) - IterateValidators(sdk.Context, func(index int64, validator stakingtypes.ValidatorI) (stop bool)) - ValidatorQueueIterator(ctx sdk.Context, endTime time.Time, endHeight int64) sdk.Iterator - GetParams(ctx sdk.Context) stakingtypes.Params - GetValidator(ctx sdk.Context, addr sdk.ValAddress) (validator stakingtypes.Validator, found bool) - IterateBondedValidatorsByPower(sdk.Context, func(index int64, validator stakingtypes.ValidatorI) (stop bool)) - IterateLastValidators(sdk.Context, func(index int64, validator stakingtypes.ValidatorI) (stop bool)) - Validator(sdk.Context, sdk.ValAddress) stakingtypes.ValidatorI - ValidatorByConsAddr(sdk.Context, sdk.ConsAddress) stakingtypes.ValidatorI - Slash(sdk.Context, sdk.ConsAddress, int64, int64, sdk.Dec) sdkmath.Int - Jail(sdk.Context, sdk.ConsAddress) -} - -// BankKeeper defines the expected bank keeper methods -type BankKeeper interface { - GetSupply(ctx sdk.Context, denom string) sdk.Coin - SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error - SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error - SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error - MintCoins(ctx sdk.Context, name string, amt sdk.Coins) error - BurnCoins(ctx sdk.Context, name string, amt sdk.Coins) error - GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins - GetDenomMetaData(ctx sdk.Context, denom string) (bank.Metadata, bool) -} - -type SlashingKeeper interface { - GetValidatorSigningInfo(ctx sdk.Context, address sdk.ConsAddress) (info slashingtypes.ValidatorSigningInfo, found bool) -} - -// AccountKeeper defines the interface contract required for account -// functionality. -type AccountKeeper interface { - GetSequence(ctx sdk.Context, addr sdk.AccAddress) (uint64, error) -} diff --git a/module/x/gravity/migrations/v1/types/genesis.go b/module/x/gravity/migrations/v1/types/genesis.go deleted file mode 100644 index aa2215b5e..000000000 --- a/module/x/gravity/migrations/v1/types/genesis.go +++ /dev/null @@ -1,378 +0,0 @@ -package types - -import ( - "bytes" - "fmt" - "time" - - cdctypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/ethereum/go-ethereum/common" -) - -// DefaultParamspace defines the default auth module parameter subspace -const ( - // todo: implement oracle constants as params - DefaultParamspace = ModuleName - EventVoteRecordPeriod = 24 * time.Hour // TODO: value???? -) - -var ( - // ParamsStoreKeyGravityID stores the gravity id - ParamsStoreKeyGravityID = []byte("GravityID") - - // ParamsStoreKeyContractHash stores the contract hash - ParamsStoreKeyContractHash = []byte("ContractHash") - - // ParamsStoreKeyBridgeContractAddress stores the contract address - ParamsStoreKeyBridgeContractAddress = []byte("BridgeContractAddress") - - // ParamsStoreKeyBridgeContractChainID stores the bridge chain id - ParamsStoreKeyBridgeContractChainID = []byte("BridgeChainID") - - // ParamsStoreKeySignedSignerSetTxsWindow stores the signed blocks window - ParamsStoreKeySignedSignerSetTxsWindow = []byte("SignedSignerSetTxWindow") - - // ParamsStoreKeySignedBatchesWindow stores the signed blocks window - ParamsStoreKeySignedBatchesWindow = []byte("SignedBatchesWindow") - - // ParamsStoreKeyEthereumSignaturesWindow stores the signed blocks window - ParamsStoreKeyEthereumSignaturesWindow = []byte("EthereumSignaturesWindow") - - // ParamsStoreKeyTargetEthTxTimeout stores the target ethereum transaction timeout - ParamsStoreKeyTargetEthTxTimeout = []byte("TargetEthTxTimeout") - - // ParamsStoreKeyAverageBlockTime stores the signed blocks window - ParamsStoreKeyAverageBlockTime = []byte("AverageBlockTime") - - // ParamsStoreKeyAverageEthereumBlockTime stores the signed blocks window - ParamsStoreKeyAverageEthereumBlockTime = []byte("AverageEthereumBlockTime") - - // ParamsStoreSlashFractionSignerSetTx stores the slash fraction valset - ParamsStoreSlashFractionSignerSetTx = []byte("SlashFractionSignerSetTx") - - // ParamsStoreSlashFractionBatch stores the slash fraction Batch - ParamsStoreSlashFractionBatch = []byte("SlashFractionBatch") - - // ParamsStoreSlashFractionEthereumSignature stores the slash fraction ethereum siganture - ParamsStoreSlashFractionEthereumSignature = []byte("SlashFractionEthereumSignature") - - // ParamsStoreSlashFractionConflictingEthereumSignature stores the slash fraction ConflictingEthereumSignature - ParamsStoreSlashFractionConflictingEthereumSignature = []byte("SlashFractionConflictingEthereumSignature") - - // ParamStoreUnbondSlashingSignerSetTxsWindow stores unbond slashing valset window - ParamStoreUnbondSlashingSignerSetTxsWindow = []byte("UnbondSlashingSignerSetTxsWindow") - - // Ensure that params implements the proper interface - _ paramtypes.ParamSet = &Params{} -) - -func (gs *GenesisState) UnpackInterfaces(unpacker cdctypes.AnyUnpacker) error { - for _, otx := range gs.OutgoingTxs { - var outgoing OutgoingTx - if err := unpacker.UnpackAny(otx, &outgoing); err != nil { - return err - } - } - for _, sig := range gs.Confirmations { - var signature EthereumTxConfirmation - if err := unpacker.UnpackAny(sig, &signature); err != nil { - return err - } - } - for _, evr := range gs.EthereumEventVoteRecords { - if err := evr.UnpackInterfaces(unpacker); err != nil { - return err - } - } - return nil -} - -func EventVoteRecordPowerThreshold(totalPower sdk.Int) sdk.Int { - return sdk.NewInt(66).Mul(totalPower).Quo(sdk.NewInt(100)) -} - -// ValidateBasic validates genesis state by looping through the params and -// calling their validation functions -func (s GenesisState) ValidateBasic() error { - if err := s.Params.ValidateBasic(); err != nil { - return sdkerrors.Wrap(err, "params") - } - if len(s.DelegateKeys) != 0 { - for _, delegateKey := range s.DelegateKeys { - if err := delegateKey.ValidateBasic(); err != nil { - return sdkerrors.Wrap(err, "delegates") - } - } - } - return nil -} - -// DefaultGenesisState returns empty genesis state -// TODO: set some better defaults here -func DefaultGenesisState() *GenesisState { - return &GenesisState{ - Params: DefaultParams(), - } -} - -// DefaultParams returns a copy of the default params -func DefaultParams() *Params { - return &Params{ - GravityId: "defaultgravityid", - BridgeEthereumAddress: "0x0000000000000000000000000000000000000000", - SignedSignerSetTxsWindow: 10000, - SignedBatchesWindow: 10000, - EthereumSignaturesWindow: 10000, - TargetEthTxTimeout: 43200000, - AverageBlockTime: 5000, - AverageEthereumBlockTime: 15000, - SlashFractionSignerSetTx: sdk.NewDec(1).Quo(sdk.NewDec(1000)), - SlashFractionBatch: sdk.NewDec(1).Quo(sdk.NewDec(1000)), - SlashFractionEthereumSignature: sdk.NewDec(1).Quo(sdk.NewDec(1000)), - SlashFractionConflictingEthereumSignature: sdk.NewDec(1).Quo(sdk.NewDec(1000)), - UnbondSlashingSignerSetTxsWindow: 10000, - } -} - -// ValidateBasic checks that the parameters have valid values. -func (p Params) ValidateBasic() error { - if err := validateGravityID(p.GravityId); err != nil { - return sdkerrors.Wrap(err, "gravity id") - } - if err := validateContractHash(p.ContractSourceHash); err != nil { - return sdkerrors.Wrap(err, "contract hash") - } - if err := validateBridgeContractAddress(p.BridgeEthereumAddress); err != nil { - return sdkerrors.Wrap(err, "bridge contract address") - } - if err := validateBridgeChainID(p.BridgeChainId); err != nil { - return sdkerrors.Wrap(err, "bridge chain id") - } - if err := validateTargetEthTxTimeout(p.TargetEthTxTimeout); err != nil { - return sdkerrors.Wrap(err, "Batch timeout") - } - if err := validateAverageBlockTime(p.AverageBlockTime); err != nil { - return sdkerrors.Wrap(err, "Block time") - } - if err := validateAverageEthereumBlockTime(p.AverageEthereumBlockTime); err != nil { - return sdkerrors.Wrap(err, "Ethereum block time") - } - if err := validateSignedSignerSetTxsWindow(p.SignedSignerSetTxsWindow); err != nil { - return sdkerrors.Wrap(err, "signed blocks window") - } - if err := validateSignedBatchesWindow(p.SignedBatchesWindow); err != nil { - return sdkerrors.Wrap(err, "signed blocks window") - } - if err := validateEthereumSignaturesWindow(p.EthereumSignaturesWindow); err != nil { - return sdkerrors.Wrap(err, "signed blocks window") - } - if err := validateSlashFractionSignerSetTx(p.SlashFractionSignerSetTx); err != nil { - return sdkerrors.Wrap(err, "slash fraction signersettx") - } - if err := validateSlashFractionBatch(p.SlashFractionBatch); err != nil { - return sdkerrors.Wrap(err, "slash fraction batch tx") - } - if err := validateSlashFractionEthereumSignature(p.SlashFractionEthereumSignature); err != nil { - return sdkerrors.Wrap(err, "slash fraction ethereum signature") - } - if err := validateSlashFractionConflictingEthereumSignature(p.SlashFractionConflictingEthereumSignature); err != nil { - return sdkerrors.Wrap(err, "slash fraction conflicting ethereum signature") - } - if err := validateUnbondSlashingSignerSetTxsWindow(p.UnbondSlashingSignerSetTxsWindow); err != nil { - return sdkerrors.Wrap(err, "unbond slashing signersettx window") - } - - return nil -} - -// ParamKeyTable for auth module -func ParamKeyTable() paramtypes.KeyTable { - return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) -} - -// ParamSetPairs implements the ParamSet interface and returns all the key/value pairs -// pairs of auth module's parameters. -func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { - return paramtypes.ParamSetPairs{ - paramtypes.NewParamSetPair(ParamsStoreKeyGravityID, &p.GravityId, validateGravityID), - paramtypes.NewParamSetPair(ParamsStoreKeyContractHash, &p.ContractSourceHash, validateContractHash), - paramtypes.NewParamSetPair(ParamsStoreKeyBridgeContractAddress, &p.BridgeEthereumAddress, validateBridgeContractAddress), - paramtypes.NewParamSetPair(ParamsStoreKeyBridgeContractChainID, &p.BridgeChainId, validateBridgeChainID), - paramtypes.NewParamSetPair(ParamsStoreKeySignedSignerSetTxsWindow, &p.SignedSignerSetTxsWindow, validateSignedSignerSetTxsWindow), - paramtypes.NewParamSetPair(ParamsStoreKeySignedBatchesWindow, &p.SignedBatchesWindow, validateSignedBatchesWindow), - paramtypes.NewParamSetPair(ParamsStoreKeyEthereumSignaturesWindow, &p.EthereumSignaturesWindow, validateEthereumSignaturesWindow), - paramtypes.NewParamSetPair(ParamsStoreKeyAverageBlockTime, &p.AverageBlockTime, validateAverageBlockTime), - paramtypes.NewParamSetPair(ParamsStoreKeyTargetEthTxTimeout, &p.TargetEthTxTimeout, validateTargetEthTxTimeout), - paramtypes.NewParamSetPair(ParamsStoreKeyAverageEthereumBlockTime, &p.AverageEthereumBlockTime, validateAverageEthereumBlockTime), - paramtypes.NewParamSetPair(ParamsStoreSlashFractionSignerSetTx, &p.SlashFractionSignerSetTx, validateSlashFractionSignerSetTx), - paramtypes.NewParamSetPair(ParamsStoreSlashFractionBatch, &p.SlashFractionBatch, validateSlashFractionBatch), - paramtypes.NewParamSetPair(ParamsStoreSlashFractionEthereumSignature, &p.SlashFractionEthereumSignature, validateSlashFractionEthereumSignature), - paramtypes.NewParamSetPair(ParamsStoreSlashFractionConflictingEthereumSignature, &p.SlashFractionConflictingEthereumSignature, validateSlashFractionConflictingEthereumSignature), - paramtypes.NewParamSetPair(ParamStoreUnbondSlashingSignerSetTxsWindow, &p.UnbondSlashingSignerSetTxsWindow, validateUnbondSlashingSignerSetTxsWindow), - } -} - -// Equal returns a boolean determining if two Params types are identical. -func (p Params) Equal(p2 Params) bool { - pb, err := p.Marshal() - if err != nil { - panic(err) - } - p2b, err := p2.Marshal() - if err != nil { - panic(err) - } - return bytes.Equal(pb, p2b) -} - -func validateGravityID(i interface{}) error { - v, ok := i.(string) - if !ok { - return fmt.Errorf("invalid parameter type: %T", i) - } - if _, err := strToFixByteArray(v); err != nil { - return err - } - return nil -} - -func validateContractHash(i interface{}) error { - // TODO: should we validate that the input here is a properly formatted - // SHA256 (or other) hash? - if _, ok := i.(string); !ok { - return fmt.Errorf("invalid parameter type: %T", i) - } - return nil -} - -func validateBridgeChainID(i interface{}) error { - if _, ok := i.(uint64); !ok { - return fmt.Errorf("invalid parameter type: %T", i) - } - return nil -} - -func validateTargetEthTxTimeout(i interface{}) error { - val, ok := i.(uint64) - if !ok { - return fmt.Errorf("invalid parameter type: %T", i) - } else if val < 60000 { - return fmt.Errorf("invalid target batch timeout, less than 60 seconds is too short") - } - return nil -} - -func validateAverageBlockTime(i interface{}) error { - val, ok := i.(uint64) - if !ok { - return fmt.Errorf("invalid parameter type: %T", i) - } else if val < 100 { - return fmt.Errorf("invalid average Cosmos block time, too short for latency limitations") - } - return nil -} - -func validateAverageEthereumBlockTime(i interface{}) error { - val, ok := i.(uint64) - if !ok { - return fmt.Errorf("invalid parameter type: %T", i) - } else if val < 100 { - return fmt.Errorf("invalid average Ethereum block time, too short for latency limitations") - } - return nil -} - -func validateBridgeContractAddress(i interface{}) error { - v, ok := i.(string) - if !ok { - return fmt.Errorf("invalid parameter type: %T", i) - } - if !common.IsHexAddress(v) { - return fmt.Errorf("not an ethereum address: %s", v) - } - return nil -} - -func validateSignedSignerSetTxsWindow(i interface{}) error { - // TODO: do we want to set some bounds on this value? - if _, ok := i.(uint64); !ok { - return fmt.Errorf("invalid parameter type: %T", i) - } - return nil -} - -func validateUnbondSlashingSignerSetTxsWindow(i interface{}) error { - // TODO: do we want to set some bounds on this value? - if _, ok := i.(uint64); !ok { - return fmt.Errorf("invalid parameter type: %T", i) - } - return nil -} - -func validateSlashFractionSignerSetTx(i interface{}) error { - // TODO: do we want to set some bounds on this value? - if _, ok := i.(sdk.Dec); !ok { - return fmt.Errorf("invalid parameter type: %T", i) - } - return nil -} - -func validateSignedBatchesWindow(i interface{}) error { - // TODO: do we want to set some bounds on this value? - if _, ok := i.(uint64); !ok { - return fmt.Errorf("invalid parameter type: %T", i) - } - return nil -} - -func validateEthereumSignaturesWindow(i interface{}) error { - // TODO: do we want to set some bounds on this value? - if _, ok := i.(uint64); !ok { - return fmt.Errorf("invalid parameter type: %T", i) - } - return nil -} - -func validateSlashFractionBatch(i interface{}) error { - // TODO: do we want to set some bounds on this value? - if _, ok := i.(sdk.Dec); !ok { - return fmt.Errorf("invalid parameter type: %T", i) - } - return nil -} - -func validateSlashFractionEthereumSignature(i interface{}) error { - // TODO: do we want to set some bounds on this value? - if _, ok := i.(sdk.Dec); !ok { - return fmt.Errorf("invalid parameter type: %T", i) - } - return nil -} - -func validateSlashFractionConflictingEthereumSignature(i interface{}) error { - // TODO: do we want to set some bounds on this value? - if _, ok := i.(sdk.Dec); !ok { - return fmt.Errorf("invalid parameter type: %T", i) - } - return nil -} - -func strToFixByteArray(s string) ([32]byte, error) { - var out [32]byte - if len([]byte(s)) > 32 { - return out, fmt.Errorf("string too long") - } - copy(out[:], s) - return out, nil -} - -func byteArrayToFixByteArray(b []byte) (out [32]byte, err error) { - if len(b) > 32 { - return out, fmt.Errorf("array too long") - } - copy(out[:], b) - return out, nil -} diff --git a/module/x/gravity/migrations/v1/types/genesis.pb.go b/module/x/gravity/migrations/v1/types/genesis.pb.go deleted file mode 100644 index ba1e4ec2a..000000000 --- a/module/x/gravity/migrations/v1/types/genesis.pb.go +++ /dev/null @@ -1,1809 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: gravity/v1migration/genesis.proto - -package types - -import ( - fmt "fmt" - types "github.com/cosmos/cosmos-sdk/codec/types" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// 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 - -// Params represent the Gravity genesis and store parameters -// gravity_id: -// a random 32 byte value to prevent signature reuse, for example if the -// cosmos validators decided to use the same Ethereum keys for another chain -// also running Gravity we would not want it to be possible to play a deposit -// from chain A back on chain B's Gravity. This value IS USED ON ETHEREUM so -// it must be set in your genesis.json before launch and not changed after -// deploying Gravity -// -// contract_hash: -// the code hash of a known good version of the Gravity contract -// solidity code. This can be used to verify the correct version -// of the contract has been deployed. This is a reference value for -// goernance action only it is never read by any Gravity code -// -// bridge_ethereum_address: -// is address of the bridge contract on the Ethereum side, this is a -// reference value for governance only and is not actually used by any -// Gravity code -// -// bridge_chain_id: -// the unique identifier of the Ethereum chain, this is a reference value -// only and is not actually used by any Gravity code -// -// These reference values may be used by future Gravity client implemetnations -// to allow for saftey features or convenience features like the Gravity address -// in your relayer. A relayer would require a configured Gravity address if -// governance had not set the address on the chain it was relaying for. -// -// signed_signer_set_txs_window -// signed_batches_window -// signed_ethereum_signatures_window -// -// These values represent the time in blocks that a validator has to submit -// a signature for a batch or valset, or to submit a ethereum_signature for a -// particular attestation nonce. In the case of attestations this clock starts -// when the attestation is created, but only allows for slashing once the event -// has passed -// -// target_eth_tx_timeout: -// -// This is the 'target' value for when ethereum transactions time out, this is a -// target because Ethereum is a probabilistic chain and you can't say for sure -// what the block frequency is ahead of time. -// -// average_block_time -// average_ethereum_block_time -// -// These values are the average Cosmos block time and Ethereum block time -// respectively and they are used to compute what the target batch timeout is. -// It is important that governance updates these in case of any major, prolonged -// change in the time it takes to produce a block -// -// slash_fraction_signer_set_tx -// slash_fraction_batch -// slash_fraction_ethereum_signature -// slash_fraction_conflicting_ethereum_signature -// -// The slashing fractions for the various gravity related slashing conditions. -// The first three refer to not submitting a particular message, the third for -// submitting a different ethereum_signature for the same Ethereum event -type Params struct { - GravityId string `protobuf:"bytes,1,opt,name=gravity_id,json=gravityId,proto3" json:"gravity_id,omitempty"` - ContractSourceHash string `protobuf:"bytes,2,opt,name=contract_source_hash,json=contractSourceHash,proto3" json:"contract_source_hash,omitempty"` - BridgeEthereumAddress string `protobuf:"bytes,4,opt,name=bridge_ethereum_address,json=bridgeEthereumAddress,proto3" json:"bridge_ethereum_address,omitempty"` - BridgeChainId uint64 `protobuf:"varint,5,opt,name=bridge_chain_id,json=bridgeChainId,proto3" json:"bridge_chain_id,omitempty"` - SignedSignerSetTxsWindow uint64 `protobuf:"varint,6,opt,name=signed_signer_set_txs_window,json=signedSignerSetTxsWindow,proto3" json:"signed_signer_set_txs_window,omitempty"` - SignedBatchesWindow uint64 `protobuf:"varint,7,opt,name=signed_batches_window,json=signedBatchesWindow,proto3" json:"signed_batches_window,omitempty"` - EthereumSignaturesWindow uint64 `protobuf:"varint,8,opt,name=ethereum_signatures_window,json=ethereumSignaturesWindow,proto3" json:"ethereum_signatures_window,omitempty"` - TargetEthTxTimeout uint64 `protobuf:"varint,10,opt,name=target_eth_tx_timeout,json=targetEthTxTimeout,proto3" json:"target_eth_tx_timeout,omitempty"` - AverageBlockTime uint64 `protobuf:"varint,11,opt,name=average_block_time,json=averageBlockTime,proto3" json:"average_block_time,omitempty"` - AverageEthereumBlockTime uint64 `protobuf:"varint,12,opt,name=average_ethereum_block_time,json=averageEthereumBlockTime,proto3" json:"average_ethereum_block_time,omitempty"` - // TODO: slash fraction for contract call txs too - SlashFractionSignerSetTx github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,13,opt,name=slash_fraction_signer_set_tx,json=slashFractionSignerSetTx,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"slash_fraction_signer_set_tx"` - SlashFractionBatch github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,14,opt,name=slash_fraction_batch,json=slashFractionBatch,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"slash_fraction_batch"` - SlashFractionEthereumSignature github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,15,opt,name=slash_fraction_ethereum_signature,json=slashFractionEthereumSignature,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"slash_fraction_ethereum_signature"` - SlashFractionConflictingEthereumSignature github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,16,opt,name=slash_fraction_conflicting_ethereum_signature,json=slashFractionConflictingEthereumSignature,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"slash_fraction_conflicting_ethereum_signature"` - UnbondSlashingSignerSetTxsWindow uint64 `protobuf:"varint,17,opt,name=unbond_slashing_signer_set_txs_window,json=unbondSlashingSignerSetTxsWindow,proto3" json:"unbond_slashing_signer_set_txs_window,omitempty"` -} - -func (m *Params) Reset() { *m = Params{} } -func (m *Params) String() string { return proto.CompactTextString(m) } -func (*Params) ProtoMessage() {} -func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_7bb056d8c0be3189, []int{0} -} -func (m *Params) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) { - xxx_messageInfo_Params.Merge(m, src) -} -func (m *Params) XXX_Size() int { - return m.Size() -} -func (m *Params) XXX_DiscardUnknown() { - xxx_messageInfo_Params.DiscardUnknown(m) -} - -var xxx_messageInfo_Params proto.InternalMessageInfo - -func (m *Params) GetGravityId() string { - if m != nil { - return m.GravityId - } - return "" -} - -func (m *Params) GetContractSourceHash() string { - if m != nil { - return m.ContractSourceHash - } - return "" -} - -func (m *Params) GetBridgeEthereumAddress() string { - if m != nil { - return m.BridgeEthereumAddress - } - return "" -} - -func (m *Params) GetBridgeChainId() uint64 { - if m != nil { - return m.BridgeChainId - } - return 0 -} - -func (m *Params) GetSignedSignerSetTxsWindow() uint64 { - if m != nil { - return m.SignedSignerSetTxsWindow - } - return 0 -} - -func (m *Params) GetSignedBatchesWindow() uint64 { - if m != nil { - return m.SignedBatchesWindow - } - return 0 -} - -func (m *Params) GetEthereumSignaturesWindow() uint64 { - if m != nil { - return m.EthereumSignaturesWindow - } - return 0 -} - -func (m *Params) GetTargetEthTxTimeout() uint64 { - if m != nil { - return m.TargetEthTxTimeout - } - return 0 -} - -func (m *Params) GetAverageBlockTime() uint64 { - if m != nil { - return m.AverageBlockTime - } - return 0 -} - -func (m *Params) GetAverageEthereumBlockTime() uint64 { - if m != nil { - return m.AverageEthereumBlockTime - } - return 0 -} - -func (m *Params) GetUnbondSlashingSignerSetTxsWindow() uint64 { - if m != nil { - return m.UnbondSlashingSignerSetTxsWindow - } - return 0 -} - -// GenesisState struct -// TODO: this need to be audited and potentially simplified using the new -// interfaces -type GenesisState struct { - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` - LastObservedEventNonce uint64 `protobuf:"varint,2,opt,name=last_observed_event_nonce,json=lastObservedEventNonce,proto3" json:"last_observed_event_nonce,omitempty"` - OutgoingTxs []*types.Any `protobuf:"bytes,3,rep,name=outgoing_txs,json=outgoingTxs,proto3" json:"outgoing_txs,omitempty"` - Confirmations []*types.Any `protobuf:"bytes,4,rep,name=confirmations,proto3" json:"confirmations,omitempty"` - EthereumEventVoteRecords []*EthereumEventVoteRecord `protobuf:"bytes,9,rep,name=ethereum_event_vote_records,json=ethereumEventVoteRecords,proto3" json:"ethereum_event_vote_records,omitempty"` - DelegateKeys []*MsgDelegateKeys `protobuf:"bytes,10,rep,name=delegate_keys,json=delegateKeys,proto3" json:"delegate_keys,omitempty"` - Erc20ToDenoms []*ERC20ToDenom `protobuf:"bytes,11,rep,name=erc20_to_denoms,json=erc20ToDenoms,proto3" json:"erc20_to_denoms,omitempty"` - UnbatchedSendToEthereumTxs []*SendToEthereum `protobuf:"bytes,12,rep,name=unbatched_send_to_ethereum_txs,json=unbatchedSendToEthereumTxs,proto3" json:"unbatched_send_to_ethereum_txs,omitempty"` -} - -func (m *GenesisState) Reset() { *m = GenesisState{} } -func (m *GenesisState) String() string { return proto.CompactTextString(m) } -func (*GenesisState) ProtoMessage() {} -func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_7bb056d8c0be3189, []int{1} -} -func (m *GenesisState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisState.Merge(m, src) -} -func (m *GenesisState) XXX_Size() int { - return m.Size() -} -func (m *GenesisState) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisState.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisState proto.InternalMessageInfo - -func (m *GenesisState) GetParams() *Params { - if m != nil { - return m.Params - } - return nil -} - -func (m *GenesisState) GetLastObservedEventNonce() uint64 { - if m != nil { - return m.LastObservedEventNonce - } - return 0 -} - -func (m *GenesisState) GetOutgoingTxs() []*types.Any { - if m != nil { - return m.OutgoingTxs - } - return nil -} - -func (m *GenesisState) GetConfirmations() []*types.Any { - if m != nil { - return m.Confirmations - } - return nil -} - -func (m *GenesisState) GetEthereumEventVoteRecords() []*EthereumEventVoteRecord { - if m != nil { - return m.EthereumEventVoteRecords - } - return nil -} - -func (m *GenesisState) GetDelegateKeys() []*MsgDelegateKeys { - if m != nil { - return m.DelegateKeys - } - return nil -} - -func (m *GenesisState) GetErc20ToDenoms() []*ERC20ToDenom { - if m != nil { - return m.Erc20ToDenoms - } - return nil -} - -func (m *GenesisState) GetUnbatchedSendToEthereumTxs() []*SendToEthereum { - if m != nil { - return m.UnbatchedSendToEthereumTxs - } - return nil -} - -// This records the relationship between an ERC20 token and the denom -// of the corresponding Cosmos originated asset -type ERC20ToDenom struct { - Erc20 string `protobuf:"bytes,1,opt,name=erc20,proto3" json:"erc20,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` -} - -func (m *ERC20ToDenom) Reset() { *m = ERC20ToDenom{} } -func (m *ERC20ToDenom) String() string { return proto.CompactTextString(m) } -func (*ERC20ToDenom) ProtoMessage() {} -func (*ERC20ToDenom) Descriptor() ([]byte, []int) { - return fileDescriptor_7bb056d8c0be3189, []int{2} -} -func (m *ERC20ToDenom) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ERC20ToDenom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ERC20ToDenom.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 *ERC20ToDenom) XXX_Merge(src proto.Message) { - xxx_messageInfo_ERC20ToDenom.Merge(m, src) -} -func (m *ERC20ToDenom) XXX_Size() int { - return m.Size() -} -func (m *ERC20ToDenom) XXX_DiscardUnknown() { - xxx_messageInfo_ERC20ToDenom.DiscardUnknown(m) -} - -var xxx_messageInfo_ERC20ToDenom proto.InternalMessageInfo - -func (m *ERC20ToDenom) GetErc20() string { - if m != nil { - return m.Erc20 - } - return "" -} - -func (m *ERC20ToDenom) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -func init() { - proto.RegisterType((*Params)(nil), "gravity.v1migration.Params") - proto.RegisterType((*GenesisState)(nil), "gravity.v1migration.GenesisState") - proto.RegisterType((*ERC20ToDenom)(nil), "gravity.v1migration.ERC20ToDenom") -} - -func init() { proto.RegisterFile("gravity/v1migration/genesis.proto", fileDescriptor_7bb056d8c0be3189) } - -var fileDescriptor_7bb056d8c0be3189 = []byte{ - // 923 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x5d, 0x6f, 0x1b, 0x45, - 0x14, 0xb5, 0xa9, 0x1b, 0xda, 0xb1, 0x4d, 0xca, 0xd4, 0x81, 0xad, 0x53, 0x5c, 0x27, 0x40, 0x15, - 0xa4, 0x66, 0x37, 0x71, 0x25, 0x10, 0x11, 0x20, 0x35, 0x1f, 0x80, 0x85, 0xa0, 0x68, 0x6d, 0x81, - 0xc4, 0xcb, 0xb0, 0xde, 0xb9, 0x19, 0x2f, 0xf1, 0xce, 0x44, 0x3b, 0xb3, 0xae, 0xfd, 0xc6, 0x4f, - 0xe8, 0x6f, 0xe2, 0xa9, 0x8f, 0x7d, 0x44, 0x08, 0x15, 0x94, 0xfc, 0x11, 0x34, 0x1f, 0xeb, 0xd8, - 0x8e, 0x79, 0xc9, 0x93, 0x3d, 0x73, 0xce, 0xb9, 0xf7, 0xdc, 0xb9, 0x3b, 0x77, 0xd0, 0x16, 0xcb, - 0xa2, 0x71, 0xa2, 0xa6, 0xc1, 0x78, 0x3f, 0x4d, 0x58, 0x16, 0xa9, 0x44, 0xf0, 0x80, 0x01, 0x07, - 0x99, 0x48, 0xff, 0x3c, 0x13, 0x4a, 0xe0, 0xfb, 0x8e, 0xe2, 0xcf, 0x51, 0x9a, 0x0d, 0x26, 0x98, - 0x30, 0x78, 0xa0, 0xff, 0x59, 0x6a, 0x73, 0x75, 0x34, 0x27, 0xb7, 0x94, 0xd6, 0x2a, 0x4a, 0x2a, - 0x99, 0xcb, 0xd6, 0x7c, 0xc0, 0x84, 0x60, 0x23, 0x08, 0xcc, 0x6a, 0x90, 0x9f, 0x06, 0x11, 0x77, - 0xd2, 0xed, 0x3f, 0xee, 0xa0, 0xb5, 0x1f, 0xa3, 0x2c, 0x4a, 0x25, 0xfe, 0x00, 0x21, 0x17, 0x87, - 0x24, 0xd4, 0x2b, 0xb7, 0xcb, 0x3b, 0x77, 0xc3, 0xbb, 0x6e, 0xa7, 0x4b, 0xf1, 0x1e, 0x6a, 0xc4, - 0x82, 0xab, 0x2c, 0x8a, 0x15, 0x91, 0x22, 0xcf, 0x62, 0x20, 0xc3, 0x48, 0x0e, 0xbd, 0xb7, 0x0c, - 0x11, 0x17, 0x58, 0xcf, 0x40, 0xdf, 0x46, 0x72, 0x88, 0x3f, 0x45, 0xef, 0x0f, 0xb2, 0x84, 0x32, - 0x20, 0xa0, 0x86, 0x90, 0x41, 0x9e, 0x92, 0x88, 0xd2, 0x0c, 0xa4, 0xf4, 0x2a, 0x46, 0xb4, 0x61, - 0xe1, 0x13, 0x87, 0x3e, 0xb3, 0x20, 0x7e, 0x8c, 0xd6, 0x9d, 0x2e, 0x1e, 0x46, 0x09, 0xd7, 0x6e, - 0x6e, 0xb7, 0xcb, 0x3b, 0x95, 0xb0, 0x6e, 0xb7, 0x8f, 0xf4, 0x6e, 0x97, 0xe2, 0xaf, 0xd0, 0x43, - 0x99, 0x30, 0x0e, 0x94, 0x98, 0x9f, 0x8c, 0x48, 0x50, 0x44, 0x4d, 0x24, 0x79, 0x91, 0x70, 0x2a, - 0x5e, 0x78, 0x6b, 0x46, 0xe4, 0x59, 0x4e, 0xcf, 0x50, 0x7a, 0xa0, 0xfa, 0x13, 0xf9, 0xb3, 0xc1, - 0x71, 0x07, 0x6d, 0x38, 0xfd, 0x20, 0x52, 0xf1, 0x10, 0x66, 0xc2, 0xb7, 0x8d, 0xf0, 0xbe, 0x05, - 0x0f, 0x2d, 0xe6, 0x34, 0x5f, 0xa0, 0xe6, 0xac, 0x18, 0x8d, 0x47, 0x2a, 0xcf, 0xae, 0x84, 0x77, - 0x6c, 0xc6, 0x82, 0xd1, 0x9b, 0x11, 0x9c, 0x7a, 0x1f, 0x6d, 0xa8, 0x28, 0x63, 0xa0, 0xf4, 0x89, - 0x10, 0x35, 0x21, 0x2a, 0x49, 0x41, 0xe4, 0xca, 0x43, 0x46, 0x88, 0x2d, 0x78, 0xa2, 0x86, 0xfd, - 0x49, 0xdf, 0x22, 0xf8, 0x09, 0xc2, 0xd1, 0x18, 0xb2, 0x88, 0x01, 0x19, 0x8c, 0x44, 0x7c, 0x66, - 0x24, 0x5e, 0xd5, 0xf0, 0xef, 0x39, 0xe4, 0x50, 0x03, 0x5a, 0x80, 0xbf, 0x44, 0x9b, 0x05, 0x7b, - 0x66, 0x73, 0x4e, 0x56, 0xb3, 0xfe, 0x1c, 0xa5, 0x38, 0xf7, 0x2b, 0x39, 0x47, 0x0f, 0xe5, 0x28, - 0x92, 0x43, 0x72, 0xaa, 0x5b, 0x99, 0x08, 0xbe, 0x78, 0xb2, 0x5e, 0xbd, 0x5d, 0xde, 0xa9, 0x1d, - 0xfa, 0xaf, 0xde, 0x3c, 0x2a, 0xfd, 0xf5, 0xe6, 0xd1, 0x63, 0x96, 0xa8, 0x61, 0x3e, 0xf0, 0x63, - 0x91, 0x06, 0xb1, 0x90, 0xa9, 0x90, 0xee, 0x67, 0x57, 0xd2, 0xb3, 0x40, 0x4d, 0xcf, 0x41, 0xfa, - 0xc7, 0x10, 0x87, 0x9e, 0x89, 0xf9, 0xb5, 0x0b, 0x39, 0xd7, 0x08, 0xfc, 0x2b, 0x6a, 0x2c, 0xe5, - 0x33, 0x9d, 0xf0, 0xde, 0xb9, 0x51, 0x1e, 0xbc, 0x90, 0xc7, 0xf4, 0x0d, 0x4f, 0xd1, 0xd6, 0x52, - 0x86, 0xeb, 0xed, 0xf3, 0xd6, 0x6f, 0x94, 0xae, 0xb5, 0x90, 0xee, 0x64, 0xb9, 0xe7, 0xf8, 0x65, - 0x19, 0xed, 0x2e, 0xe5, 0x8e, 0x05, 0x3f, 0x1d, 0x25, 0xb1, 0x4a, 0x38, 0x5b, 0xe5, 0xe3, 0xde, - 0x8d, 0x7c, 0x7c, 0xb2, 0xe0, 0xe3, 0xe8, 0x2a, 0xc5, 0x75, 0x4b, 0xcf, 0xd1, 0xc7, 0x39, 0x1f, - 0x08, 0x4e, 0x89, 0xd1, 0x68, 0x1b, 0xab, 0xaf, 0xce, 0xbb, 0xe6, 0x43, 0x69, 0x5b, 0x72, 0xcf, - 0x71, 0xaf, 0x5f, 0xa1, 0x83, 0xca, 0xef, 0x7f, 0xb7, 0x4b, 0xdb, 0xff, 0x54, 0x50, 0xed, 0x1b, - 0x3b, 0xdf, 0x7a, 0x2a, 0x52, 0x80, 0x9f, 0xa2, 0xb5, 0x73, 0x33, 0x54, 0xcc, 0x18, 0xa9, 0x76, - 0x36, 0xfd, 0x15, 0xf3, 0xce, 0xb7, 0x73, 0x27, 0x74, 0x54, 0xfc, 0x39, 0x7a, 0x30, 0x8a, 0xa4, - 0x22, 0x62, 0x20, 0x21, 0x1b, 0x03, 0x25, 0x30, 0x06, 0xae, 0x08, 0x17, 0x3c, 0x06, 0x33, 0x65, - 0x2a, 0xe1, 0x7b, 0x9a, 0xf0, 0xdc, 0xe1, 0x27, 0x1a, 0xfe, 0x41, 0xa3, 0xf8, 0x33, 0x54, 0x13, - 0xb9, 0x62, 0x42, 0x17, 0xa4, 0x26, 0xd2, 0xbb, 0xd5, 0xbe, 0xb5, 0x53, 0xed, 0x34, 0x7c, 0x3b, - 0xf7, 0xfc, 0x62, 0xee, 0xf9, 0xcf, 0xf8, 0x34, 0xac, 0x16, 0xcc, 0xfe, 0x44, 0xe2, 0x03, 0x54, - 0xd7, 0x3d, 0x49, 0xb2, 0xd4, 0x58, 0xd2, 0x83, 0xe9, 0xff, 0x95, 0x8b, 0x54, 0x7c, 0x86, 0x36, - 0x67, 0x3d, 0xb4, 0x56, 0xc7, 0x42, 0x01, 0xc9, 0x20, 0x16, 0x19, 0x95, 0xde, 0x5d, 0x13, 0xe9, - 0xc9, 0xca, 0xca, 0x8b, 0xce, 0x98, 0x12, 0x7e, 0x12, 0x0a, 0x42, 0x23, 0xba, 0x9a, 0x1c, 0x4b, - 0x80, 0xc4, 0x5d, 0x54, 0xa7, 0x30, 0x02, 0x16, 0x29, 0x20, 0x67, 0x30, 0x95, 0x1e, 0x32, 0xe1, - 0x3f, 0x5a, 0x19, 0xfe, 0x7b, 0xc9, 0x8e, 0x1d, 0xf9, 0x3b, 0x98, 0xca, 0xb0, 0x46, 0xe7, 0x56, - 0xb8, 0x8b, 0xd6, 0x21, 0x8b, 0x3b, 0x7b, 0x44, 0x09, 0x42, 0x81, 0x8b, 0x54, 0x7a, 0x55, 0x13, - 0x6c, 0x6b, 0xb5, 0xd7, 0xf0, 0xa8, 0xb3, 0xd7, 0x17, 0xc7, 0x9a, 0x19, 0xd6, 0x8d, 0xd2, 0xad, - 0x24, 0x66, 0xa8, 0x95, 0x73, 0x3b, 0x3c, 0x29, 0x91, 0xc0, 0xa9, 0x8e, 0x39, 0x3b, 0x14, 0xdd, - 0x89, 0x9a, 0x89, 0xfc, 0xe1, 0xca, 0xc8, 0x3d, 0xe0, 0xb4, 0x2f, 0x8a, 0xb3, 0x08, 0x9b, 0xb3, - 0x50, 0x8b, 0x40, 0x7f, 0x22, 0xb7, 0x0f, 0x50, 0x6d, 0xde, 0x07, 0x6e, 0xa0, 0xdb, 0xc6, 0x89, - 0x7b, 0xa6, 0xec, 0x42, 0xef, 0x9a, 0x82, 0xdc, 0x9b, 0x64, 0x17, 0x87, 0xf1, 0xab, 0x8b, 0x56, - 0xf9, 0xf5, 0x45, 0xab, 0xfc, 0xef, 0x45, 0xab, 0xfc, 0xf2, 0xb2, 0x55, 0x7a, 0x7d, 0xd9, 0x2a, - 0xfd, 0x79, 0xd9, 0x2a, 0xfd, 0xd2, 0x9d, 0xbb, 0x61, 0xe7, 0xc0, 0xd8, 0xf4, 0xb7, 0x71, 0xf1, - 0xb2, 0xee, 0xda, 0xa7, 0x26, 0x48, 0x05, 0xcd, 0x47, 0x10, 0x8c, 0x3b, 0xc1, 0xa4, 0x80, 0x82, - 0x59, 0x05, 0x32, 0x18, 0xef, 0xdb, 0x8b, 0x38, 0x58, 0x33, 0x5f, 0xca, 0xd3, 0xff, 0x02, 0x00, - 0x00, 0xff, 0xff, 0xfb, 0xc7, 0xa8, 0x22, 0xfc, 0x07, 0x00, 0x00, -} - -func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.UnbondSlashingSignerSetTxsWindow != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.UnbondSlashingSignerSetTxsWindow)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x88 - } - { - size := m.SlashFractionConflictingEthereumSignature.Size() - i -= size - if _, err := m.SlashFractionConflictingEthereumSignature.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 - { - size := m.SlashFractionEthereumSignature.Size() - i -= size - if _, err := m.SlashFractionEthereumSignature.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x7a - { - size := m.SlashFractionBatch.Size() - i -= size - if _, err := m.SlashFractionBatch.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x72 - { - size := m.SlashFractionSignerSetTx.Size() - i -= size - if _, err := m.SlashFractionSignerSetTx.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x6a - if m.AverageEthereumBlockTime != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.AverageEthereumBlockTime)) - i-- - dAtA[i] = 0x60 - } - if m.AverageBlockTime != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.AverageBlockTime)) - i-- - dAtA[i] = 0x58 - } - if m.TargetEthTxTimeout != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.TargetEthTxTimeout)) - i-- - dAtA[i] = 0x50 - } - if m.EthereumSignaturesWindow != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.EthereumSignaturesWindow)) - i-- - dAtA[i] = 0x40 - } - if m.SignedBatchesWindow != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.SignedBatchesWindow)) - i-- - dAtA[i] = 0x38 - } - if m.SignedSignerSetTxsWindow != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.SignedSignerSetTxsWindow)) - i-- - dAtA[i] = 0x30 - } - if m.BridgeChainId != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.BridgeChainId)) - i-- - dAtA[i] = 0x28 - } - if len(m.BridgeEthereumAddress) > 0 { - i -= len(m.BridgeEthereumAddress) - copy(dAtA[i:], m.BridgeEthereumAddress) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.BridgeEthereumAddress))) - i-- - dAtA[i] = 0x22 - } - if len(m.ContractSourceHash) > 0 { - i -= len(m.ContractSourceHash) - copy(dAtA[i:], m.ContractSourceHash) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.ContractSourceHash))) - i-- - dAtA[i] = 0x12 - } - if len(m.GravityId) > 0 { - i -= len(m.GravityId) - copy(dAtA[i:], m.GravityId) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.GravityId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.UnbatchedSendToEthereumTxs) > 0 { - for iNdEx := len(m.UnbatchedSendToEthereumTxs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.UnbatchedSendToEthereumTxs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x62 - } - } - if len(m.Erc20ToDenoms) > 0 { - for iNdEx := len(m.Erc20ToDenoms) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Erc20ToDenoms[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - } - } - if len(m.DelegateKeys) > 0 { - for iNdEx := len(m.DelegateKeys) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DelegateKeys[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - } - } - if len(m.EthereumEventVoteRecords) > 0 { - for iNdEx := len(m.EthereumEventVoteRecords) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.EthereumEventVoteRecords[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - } - if len(m.Confirmations) > 0 { - for iNdEx := len(m.Confirmations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Confirmations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.OutgoingTxs) > 0 { - for iNdEx := len(m.OutgoingTxs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.OutgoingTxs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.LastObservedEventNonce != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.LastObservedEventNonce)) - i-- - dAtA[i] = 0x10 - } - if m.Params != nil { - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ERC20ToDenom) 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 *ERC20ToDenom) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ERC20ToDenom) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0x12 - } - if len(m.Erc20) > 0 { - i -= len(m.Erc20) - copy(dAtA[i:], m.Erc20) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Erc20))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { - offset -= sovGenesis(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Params) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.GravityId) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.ContractSourceHash) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.BridgeEthereumAddress) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - if m.BridgeChainId != 0 { - n += 1 + sovGenesis(uint64(m.BridgeChainId)) - } - if m.SignedSignerSetTxsWindow != 0 { - n += 1 + sovGenesis(uint64(m.SignedSignerSetTxsWindow)) - } - if m.SignedBatchesWindow != 0 { - n += 1 + sovGenesis(uint64(m.SignedBatchesWindow)) - } - if m.EthereumSignaturesWindow != 0 { - n += 1 + sovGenesis(uint64(m.EthereumSignaturesWindow)) - } - if m.TargetEthTxTimeout != 0 { - n += 1 + sovGenesis(uint64(m.TargetEthTxTimeout)) - } - if m.AverageBlockTime != 0 { - n += 1 + sovGenesis(uint64(m.AverageBlockTime)) - } - if m.AverageEthereumBlockTime != 0 { - n += 1 + sovGenesis(uint64(m.AverageEthereumBlockTime)) - } - l = m.SlashFractionSignerSetTx.Size() - n += 1 + l + sovGenesis(uint64(l)) - l = m.SlashFractionBatch.Size() - n += 1 + l + sovGenesis(uint64(l)) - l = m.SlashFractionEthereumSignature.Size() - n += 1 + l + sovGenesis(uint64(l)) - l = m.SlashFractionConflictingEthereumSignature.Size() - n += 2 + l + sovGenesis(uint64(l)) - if m.UnbondSlashingSignerSetTxsWindow != 0 { - n += 2 + sovGenesis(uint64(m.UnbondSlashingSignerSetTxsWindow)) - } - return n -} - -func (m *GenesisState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Params != nil { - l = m.Params.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - if m.LastObservedEventNonce != 0 { - n += 1 + sovGenesis(uint64(m.LastObservedEventNonce)) - } - if len(m.OutgoingTxs) > 0 { - for _, e := range m.OutgoingTxs { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if len(m.Confirmations) > 0 { - for _, e := range m.Confirmations { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if len(m.EthereumEventVoteRecords) > 0 { - for _, e := range m.EthereumEventVoteRecords { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if len(m.DelegateKeys) > 0 { - for _, e := range m.DelegateKeys { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if len(m.Erc20ToDenoms) > 0 { - for _, e := range m.Erc20ToDenoms { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if len(m.UnbatchedSendToEthereumTxs) > 0 { - for _, e := range m.UnbatchedSendToEthereumTxs { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - return n -} - -func (m *ERC20ToDenom) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Erc20) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - return n -} - -func sovGenesis(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenesis(x uint64) (n int) { - return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Params) 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 ErrIntOverflowGenesis - } - 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: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GravityId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - 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 ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GravityId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractSourceHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - 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 ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContractSourceHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BridgeEthereumAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - 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 ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BridgeEthereumAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BridgeChainId", wireType) - } - m.BridgeChainId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BridgeChainId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SignedSignerSetTxsWindow", wireType) - } - m.SignedSignerSetTxsWindow = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SignedSignerSetTxsWindow |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SignedBatchesWindow", wireType) - } - m.SignedBatchesWindow = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SignedBatchesWindow |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EthereumSignaturesWindow", wireType) - } - m.EthereumSignaturesWindow = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EthereumSignaturesWindow |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TargetEthTxTimeout", wireType) - } - m.TargetEthTxTimeout = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TargetEthTxTimeout |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AverageBlockTime", wireType) - } - m.AverageBlockTime = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AverageBlockTime |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AverageEthereumBlockTime", wireType) - } - m.AverageEthereumBlockTime = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AverageEthereumBlockTime |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SlashFractionSignerSetTx", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.SlashFractionSignerSetTx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SlashFractionBatch", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.SlashFractionBatch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SlashFractionEthereumSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.SlashFractionEthereumSignature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SlashFractionConflictingEthereumSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.SlashFractionConflictingEthereumSignature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 17: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondSlashingSignerSetTxsWindow", wireType) - } - m.UnbondSlashingSignerSetTxsWindow = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.UnbondSlashingSignerSetTxsWindow |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GenesisState) 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 ErrIntOverflowGenesis - } - 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: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Params == nil { - m.Params = &Params{} - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LastObservedEventNonce", wireType) - } - m.LastObservedEventNonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LastObservedEventNonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutgoingTxs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OutgoingTxs = append(m.OutgoingTxs, &types.Any{}) - if err := m.OutgoingTxs[len(m.OutgoingTxs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Confirmations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Confirmations = append(m.Confirmations, &types.Any{}) - if err := m.Confirmations[len(m.Confirmations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EthereumEventVoteRecords", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EthereumEventVoteRecords = append(m.EthereumEventVoteRecords, &EthereumEventVoteRecord{}) - if err := m.EthereumEventVoteRecords[len(m.EthereumEventVoteRecords)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegateKeys", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DelegateKeys = append(m.DelegateKeys, &MsgDelegateKeys{}) - if err := m.DelegateKeys[len(m.DelegateKeys)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Erc20ToDenoms", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Erc20ToDenoms = append(m.Erc20ToDenoms, &ERC20ToDenom{}) - if err := m.Erc20ToDenoms[len(m.Erc20ToDenoms)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbatchedSendToEthereumTxs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UnbatchedSendToEthereumTxs = append(m.UnbatchedSendToEthereumTxs, &SendToEthereum{}) - if err := m.UnbatchedSendToEthereumTxs[len(m.UnbatchedSendToEthereumTxs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ERC20ToDenom) 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 ErrIntOverflowGenesis - } - 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: ERC20ToDenom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ERC20ToDenom: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Erc20", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - 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 ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Erc20 = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - 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 ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenesis(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, ErrIntOverflowGenesis - } - 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, ErrIntOverflowGenesis - } - 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, ErrIntOverflowGenesis - } - 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, ErrInvalidLengthGenesis - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenesis - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenesis - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") -) diff --git a/module/x/gravity/migrations/v1/types/gravity.pb.go b/module/x/gravity/migrations/v1/types/gravity.pb.go deleted file mode 100644 index 105bf23d7..000000000 --- a/module/x/gravity/migrations/v1/types/gravity.pb.go +++ /dev/null @@ -1,2778 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: gravity/v1migration/gravity.proto - -package types - -import ( - fmt "fmt" - types "github.com/cosmos/cosmos-sdk/codec/types" - _ "github.com/cosmos/cosmos-sdk/types" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - _ "github.com/regen-network/cosmos-proto" - io "io" - math "math" - math_bits "math/bits" -) - -// 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 - -// EthereumEventVoteRecord is an event that is pending of confirmation by 2/3 of -// the signer set. The event is then attested and executed in the state machine -// once the required threshold is met. -type EthereumEventVoteRecord struct { - Event *types.Any `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` - Votes []string `protobuf:"bytes,2,rep,name=votes,proto3" json:"votes,omitempty"` - Accepted bool `protobuf:"varint,3,opt,name=accepted,proto3" json:"accepted,omitempty"` -} - -func (m *EthereumEventVoteRecord) Reset() { *m = EthereumEventVoteRecord{} } -func (m *EthereumEventVoteRecord) String() string { return proto.CompactTextString(m) } -func (*EthereumEventVoteRecord) ProtoMessage() {} -func (*EthereumEventVoteRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_3bdae820b581dbbf, []int{0} -} -func (m *EthereumEventVoteRecord) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EthereumEventVoteRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EthereumEventVoteRecord.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 *EthereumEventVoteRecord) XXX_Merge(src proto.Message) { - xxx_messageInfo_EthereumEventVoteRecord.Merge(m, src) -} -func (m *EthereumEventVoteRecord) XXX_Size() int { - return m.Size() -} -func (m *EthereumEventVoteRecord) XXX_DiscardUnknown() { - xxx_messageInfo_EthereumEventVoteRecord.DiscardUnknown(m) -} - -var xxx_messageInfo_EthereumEventVoteRecord proto.InternalMessageInfo - -func (m *EthereumEventVoteRecord) GetEvent() *types.Any { - if m != nil { - return m.Event - } - return nil -} - -func (m *EthereumEventVoteRecord) GetVotes() []string { - if m != nil { - return m.Votes - } - return nil -} - -func (m *EthereumEventVoteRecord) GetAccepted() bool { - if m != nil { - return m.Accepted - } - return false -} - -// LatestEthereumBlockHeight defines the latest observed ethereum block height -// and the corresponding timestamp value in nanoseconds. -type LatestEthereumBlockHeight struct { - EthereumHeight uint64 `protobuf:"varint,1,opt,name=ethereum_height,json=ethereumHeight,proto3" json:"ethereum_height,omitempty"` - CosmosHeight uint64 `protobuf:"varint,2,opt,name=cosmos_height,json=cosmosHeight,proto3" json:"cosmos_height,omitempty"` -} - -func (m *LatestEthereumBlockHeight) Reset() { *m = LatestEthereumBlockHeight{} } -func (m *LatestEthereumBlockHeight) String() string { return proto.CompactTextString(m) } -func (*LatestEthereumBlockHeight) ProtoMessage() {} -func (*LatestEthereumBlockHeight) Descriptor() ([]byte, []int) { - return fileDescriptor_3bdae820b581dbbf, []int{1} -} -func (m *LatestEthereumBlockHeight) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LatestEthereumBlockHeight) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LatestEthereumBlockHeight.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 *LatestEthereumBlockHeight) XXX_Merge(src proto.Message) { - xxx_messageInfo_LatestEthereumBlockHeight.Merge(m, src) -} -func (m *LatestEthereumBlockHeight) XXX_Size() int { - return m.Size() -} -func (m *LatestEthereumBlockHeight) XXX_DiscardUnknown() { - xxx_messageInfo_LatestEthereumBlockHeight.DiscardUnknown(m) -} - -var xxx_messageInfo_LatestEthereumBlockHeight proto.InternalMessageInfo - -func (m *LatestEthereumBlockHeight) GetEthereumHeight() uint64 { - if m != nil { - return m.EthereumHeight - } - return 0 -} - -func (m *LatestEthereumBlockHeight) GetCosmosHeight() uint64 { - if m != nil { - return m.CosmosHeight - } - return 0 -} - -// EthereumSigner represents a cosmos validator with its corresponding bridge -// operator ethereum address and its staking consensus power. -type EthereumSigner struct { - Power uint64 `protobuf:"varint,1,opt,name=power,proto3" json:"power,omitempty"` - EthereumAddress string `protobuf:"bytes,2,opt,name=ethereum_address,json=ethereumAddress,proto3" json:"ethereum_address,omitempty"` -} - -func (m *EthereumSigner) Reset() { *m = EthereumSigner{} } -func (m *EthereumSigner) String() string { return proto.CompactTextString(m) } -func (*EthereumSigner) ProtoMessage() {} -func (*EthereumSigner) Descriptor() ([]byte, []int) { - return fileDescriptor_3bdae820b581dbbf, []int{2} -} -func (m *EthereumSigner) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EthereumSigner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EthereumSigner.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 *EthereumSigner) XXX_Merge(src proto.Message) { - xxx_messageInfo_EthereumSigner.Merge(m, src) -} -func (m *EthereumSigner) XXX_Size() int { - return m.Size() -} -func (m *EthereumSigner) XXX_DiscardUnknown() { - xxx_messageInfo_EthereumSigner.DiscardUnknown(m) -} - -var xxx_messageInfo_EthereumSigner proto.InternalMessageInfo - -func (m *EthereumSigner) GetPower() uint64 { - if m != nil { - return m.Power - } - return 0 -} - -func (m *EthereumSigner) GetEthereumAddress() string { - if m != nil { - return m.EthereumAddress - } - return "" -} - -// SignerSetTx is the Ethereum Bridge multisig set that relays -// transactions the two chains. The staking validators keep ethereum keys which -// are used to check signatures on Ethereum in order to get significant gas -// savings. -type SignerSetTx struct { - Nonce uint64 `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"` - Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` - Signers EthereumSigners `protobuf:"bytes,3,rep,name=signers,proto3,castrepeated=EthereumSigners" json:"signers,omitempty"` -} - -func (m *SignerSetTx) Reset() { *m = SignerSetTx{} } -func (m *SignerSetTx) String() string { return proto.CompactTextString(m) } -func (*SignerSetTx) ProtoMessage() {} -func (*SignerSetTx) Descriptor() ([]byte, []int) { - return fileDescriptor_3bdae820b581dbbf, []int{3} -} -func (m *SignerSetTx) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignerSetTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignerSetTx.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 *SignerSetTx) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignerSetTx.Merge(m, src) -} -func (m *SignerSetTx) XXX_Size() int { - return m.Size() -} -func (m *SignerSetTx) XXX_DiscardUnknown() { - xxx_messageInfo_SignerSetTx.DiscardUnknown(m) -} - -var xxx_messageInfo_SignerSetTx proto.InternalMessageInfo - -func (m *SignerSetTx) GetNonce() uint64 { - if m != nil { - return m.Nonce - } - return 0 -} - -func (m *SignerSetTx) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *SignerSetTx) GetSigners() EthereumSigners { - if m != nil { - return m.Signers - } - return nil -} - -// BatchTx represents a batch of transactions going from Cosmos to Ethereum. -// Batch txs are are identified by a unique hash and the token contract that is -// shared by all the SendToEthereum -type BatchTx struct { - BatchNonce uint64 `protobuf:"varint,1,opt,name=batch_nonce,json=batchNonce,proto3" json:"batch_nonce,omitempty"` - Timeout uint64 `protobuf:"varint,2,opt,name=timeout,proto3" json:"timeout,omitempty"` - Transactions []*SendToEthereum `protobuf:"bytes,3,rep,name=transactions,proto3" json:"transactions,omitempty"` - TokenContract string `protobuf:"bytes,4,opt,name=token_contract,json=tokenContract,proto3" json:"token_contract,omitempty"` - Height uint64 `protobuf:"varint,5,opt,name=height,proto3" json:"height,omitempty"` -} - -func (m *BatchTx) Reset() { *m = BatchTx{} } -func (m *BatchTx) String() string { return proto.CompactTextString(m) } -func (*BatchTx) ProtoMessage() {} -func (*BatchTx) Descriptor() ([]byte, []int) { - return fileDescriptor_3bdae820b581dbbf, []int{4} -} -func (m *BatchTx) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BatchTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BatchTx.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 *BatchTx) XXX_Merge(src proto.Message) { - xxx_messageInfo_BatchTx.Merge(m, src) -} -func (m *BatchTx) XXX_Size() int { - return m.Size() -} -func (m *BatchTx) XXX_DiscardUnknown() { - xxx_messageInfo_BatchTx.DiscardUnknown(m) -} - -var xxx_messageInfo_BatchTx proto.InternalMessageInfo - -func (m *BatchTx) GetBatchNonce() uint64 { - if m != nil { - return m.BatchNonce - } - return 0 -} - -func (m *BatchTx) GetTimeout() uint64 { - if m != nil { - return m.Timeout - } - return 0 -} - -func (m *BatchTx) GetTransactions() []*SendToEthereum { - if m != nil { - return m.Transactions - } - return nil -} - -func (m *BatchTx) GetTokenContract() string { - if m != nil { - return m.TokenContract - } - return "" -} - -func (m *BatchTx) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -// SendToEthereum represents an individual SendToEthereum from Cosmos to -// Ethereum -type SendToEthereum struct { - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` - EthereumRecipient string `protobuf:"bytes,3,opt,name=ethereum_recipient,json=ethereumRecipient,proto3" json:"ethereum_recipient,omitempty"` - Erc20Token ERC20Token `protobuf:"bytes,4,opt,name=erc20_token,json=erc20Token,proto3" json:"erc20_token"` - Erc20Fee ERC20Token `protobuf:"bytes,5,opt,name=erc20_fee,json=erc20Fee,proto3" json:"erc20_fee"` -} - -func (m *SendToEthereum) Reset() { *m = SendToEthereum{} } -func (m *SendToEthereum) String() string { return proto.CompactTextString(m) } -func (*SendToEthereum) ProtoMessage() {} -func (*SendToEthereum) Descriptor() ([]byte, []int) { - return fileDescriptor_3bdae820b581dbbf, []int{5} -} -func (m *SendToEthereum) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SendToEthereum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SendToEthereum.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 *SendToEthereum) XXX_Merge(src proto.Message) { - xxx_messageInfo_SendToEthereum.Merge(m, src) -} -func (m *SendToEthereum) XXX_Size() int { - return m.Size() -} -func (m *SendToEthereum) XXX_DiscardUnknown() { - xxx_messageInfo_SendToEthereum.DiscardUnknown(m) -} - -var xxx_messageInfo_SendToEthereum proto.InternalMessageInfo - -func (m *SendToEthereum) GetId() uint64 { - if m != nil { - return m.Id - } - return 0 -} - -func (m *SendToEthereum) GetSender() string { - if m != nil { - return m.Sender - } - return "" -} - -func (m *SendToEthereum) GetEthereumRecipient() string { - if m != nil { - return m.EthereumRecipient - } - return "" -} - -func (m *SendToEthereum) GetErc20Token() ERC20Token { - if m != nil { - return m.Erc20Token - } - return ERC20Token{} -} - -func (m *SendToEthereum) GetErc20Fee() ERC20Token { - if m != nil { - return m.Erc20Fee - } - return ERC20Token{} -} - -// ContractCallTx represents an individual arbitrary logic call transaction -// from Cosmos to Ethereum. -type ContractCallTx struct { - InvalidationNonce uint64 `protobuf:"varint,1,opt,name=invalidation_nonce,json=invalidationNonce,proto3" json:"invalidation_nonce,omitempty"` - InvalidationScope []byte `protobuf:"bytes,2,opt,name=invalidation_scope,json=invalidationScope,proto3" json:"invalidation_scope,omitempty"` - Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` - Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"` - Timeout uint64 `protobuf:"varint,5,opt,name=timeout,proto3" json:"timeout,omitempty"` - Tokens []ERC20Token `protobuf:"bytes,6,rep,name=tokens,proto3" json:"tokens"` - Fees []ERC20Token `protobuf:"bytes,7,rep,name=fees,proto3" json:"fees"` - Height uint64 `protobuf:"varint,8,opt,name=height,proto3" json:"height,omitempty"` -} - -func (m *ContractCallTx) Reset() { *m = ContractCallTx{} } -func (m *ContractCallTx) String() string { return proto.CompactTextString(m) } -func (*ContractCallTx) ProtoMessage() {} -func (*ContractCallTx) Descriptor() ([]byte, []int) { - return fileDescriptor_3bdae820b581dbbf, []int{6} -} -func (m *ContractCallTx) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContractCallTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ContractCallTx.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 *ContractCallTx) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContractCallTx.Merge(m, src) -} -func (m *ContractCallTx) XXX_Size() int { - return m.Size() -} -func (m *ContractCallTx) XXX_DiscardUnknown() { - xxx_messageInfo_ContractCallTx.DiscardUnknown(m) -} - -var xxx_messageInfo_ContractCallTx proto.InternalMessageInfo - -func (m *ContractCallTx) GetInvalidationNonce() uint64 { - if m != nil { - return m.InvalidationNonce - } - return 0 -} - -func (m *ContractCallTx) GetInvalidationScope() []byte { - if m != nil { - return m.InvalidationScope - } - return nil -} - -func (m *ContractCallTx) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *ContractCallTx) GetPayload() []byte { - if m != nil { - return m.Payload - } - return nil -} - -func (m *ContractCallTx) GetTimeout() uint64 { - if m != nil { - return m.Timeout - } - return 0 -} - -func (m *ContractCallTx) GetTokens() []ERC20Token { - if m != nil { - return m.Tokens - } - return nil -} - -func (m *ContractCallTx) GetFees() []ERC20Token { - if m != nil { - return m.Fees - } - return nil -} - -func (m *ContractCallTx) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -type ERC20Token struct { - Contract string `protobuf:"bytes,1,opt,name=contract,proto3" json:"contract,omitempty"` - Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"` -} - -func (m *ERC20Token) Reset() { *m = ERC20Token{} } -func (m *ERC20Token) String() string { return proto.CompactTextString(m) } -func (*ERC20Token) ProtoMessage() {} -func (*ERC20Token) Descriptor() ([]byte, []int) { - return fileDescriptor_3bdae820b581dbbf, []int{7} -} -func (m *ERC20Token) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ERC20Token) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ERC20Token.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 *ERC20Token) XXX_Merge(src proto.Message) { - xxx_messageInfo_ERC20Token.Merge(m, src) -} -func (m *ERC20Token) XXX_Size() int { - return m.Size() -} -func (m *ERC20Token) XXX_DiscardUnknown() { - xxx_messageInfo_ERC20Token.DiscardUnknown(m) -} - -var xxx_messageInfo_ERC20Token proto.InternalMessageInfo - -func (m *ERC20Token) GetContract() string { - if m != nil { - return m.Contract - } - return "" -} - -type IDSet struct { - Ids []uint64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"` -} - -func (m *IDSet) Reset() { *m = IDSet{} } -func (m *IDSet) String() string { return proto.CompactTextString(m) } -func (*IDSet) ProtoMessage() {} -func (*IDSet) Descriptor() ([]byte, []int) { - return fileDescriptor_3bdae820b581dbbf, []int{8} -} -func (m *IDSet) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IDSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_IDSet.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 *IDSet) XXX_Merge(src proto.Message) { - xxx_messageInfo_IDSet.Merge(m, src) -} -func (m *IDSet) XXX_Size() int { - return m.Size() -} -func (m *IDSet) XXX_DiscardUnknown() { - xxx_messageInfo_IDSet.DiscardUnknown(m) -} - -var xxx_messageInfo_IDSet proto.InternalMessageInfo - -func (m *IDSet) GetIds() []uint64 { - if m != nil { - return m.Ids - } - return nil -} - -func init() { - proto.RegisterType((*EthereumEventVoteRecord)(nil), "gravity.v1migration.EthereumEventVoteRecord") - proto.RegisterType((*LatestEthereumBlockHeight)(nil), "gravity.v1migration.LatestEthereumBlockHeight") - proto.RegisterType((*EthereumSigner)(nil), "gravity.v1migration.EthereumSigner") - proto.RegisterType((*SignerSetTx)(nil), "gravity.v1migration.SignerSetTx") - proto.RegisterType((*BatchTx)(nil), "gravity.v1migration.BatchTx") - proto.RegisterType((*SendToEthereum)(nil), "gravity.v1migration.SendToEthereum") - proto.RegisterType((*ContractCallTx)(nil), "gravity.v1migration.ContractCallTx") - proto.RegisterType((*ERC20Token)(nil), "gravity.v1migration.ERC20Token") - proto.RegisterType((*IDSet)(nil), "gravity.v1migration.IDSet") -} - -func init() { proto.RegisterFile("gravity/v1migration/gravity.proto", fileDescriptor_3bdae820b581dbbf) } - -var fileDescriptor_3bdae820b581dbbf = []byte{ - // 818 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xcd, 0x6e, 0xe3, 0x54, - 0x14, 0xae, 0xf3, 0xd7, 0xf6, 0xa4, 0xcd, 0x4c, 0xef, 0x54, 0xe0, 0x76, 0x91, 0x84, 0x8c, 0x80, - 0xb0, 0xa8, 0x3d, 0x0d, 0x2b, 0x16, 0xb3, 0x98, 0x94, 0x29, 0x54, 0x42, 0x48, 0x38, 0x11, 0x0b, - 0x36, 0xd1, 0x8d, 0x7d, 0xea, 0x5c, 0x9a, 0xf8, 0x5a, 0xbe, 0x37, 0xa6, 0x79, 0x05, 0x36, 0xf0, - 0x1c, 0xac, 0x79, 0x88, 0x11, 0x42, 0x68, 0x96, 0x88, 0xc5, 0x80, 0xda, 0x47, 0xe0, 0x05, 0x90, - 0xef, 0x4f, 0xb0, 0xd1, 0x08, 0xcd, 0xac, 0xea, 0xef, 0x3b, 0xe7, 0xfb, 0xfc, 0xdd, 0x73, 0x4f, - 0x1d, 0x78, 0x2f, 0xce, 0x68, 0xce, 0xe4, 0xc6, 0xcf, 0xcf, 0x57, 0x2c, 0xce, 0xa8, 0x64, 0x3c, - 0xf1, 0x0d, 0xe7, 0xa5, 0x19, 0x97, 0x9c, 0x3c, 0xb2, 0xb0, 0xd4, 0x72, 0xda, 0x0d, 0xb9, 0x58, - 0x71, 0xe1, 0xcf, 0xa9, 0x40, 0x3f, 0x3f, 0x9f, 0xa3, 0xa4, 0xe7, 0x7e, 0xc8, 0x59, 0xa2, 0x45, - 0xa7, 0x27, 0xba, 0x3e, 0x53, 0xc8, 0xd7, 0xc0, 0x94, 0x8e, 0x63, 0x1e, 0x73, 0xcd, 0x17, 0x4f, - 0x56, 0x10, 0x73, 0x1e, 0x2f, 0xd1, 0x57, 0x68, 0xbe, 0xbe, 0xf6, 0x69, 0x62, 0x02, 0x0c, 0xbe, - 0x77, 0xe0, 0xdd, 0xe7, 0x72, 0x81, 0x19, 0xae, 0x57, 0xcf, 0x73, 0x4c, 0xe4, 0xd7, 0x5c, 0x62, - 0x80, 0x21, 0xcf, 0x22, 0xf2, 0x14, 0x9a, 0x58, 0x50, 0xae, 0xd3, 0x77, 0x86, 0xed, 0xd1, 0xb1, - 0xa7, 0x6d, 0x3c, 0x6b, 0xe3, 0x3d, 0x4b, 0x36, 0xe3, 0xa3, 0x5f, 0x7e, 0x3e, 0x3b, 0xac, 0x38, - 0x04, 0x5a, 0x45, 0x8e, 0xa1, 0x99, 0x73, 0x89, 0xc2, 0xad, 0xf5, 0xeb, 0xc3, 0xfd, 0x40, 0x03, - 0x72, 0x0a, 0x7b, 0x34, 0x0c, 0x31, 0x95, 0x18, 0xb9, 0xf5, 0xbe, 0x33, 0xdc, 0x0b, 0xb6, 0x78, - 0xc0, 0xe0, 0xe4, 0x0b, 0x2a, 0x51, 0x48, 0xeb, 0x37, 0x5e, 0xf2, 0xf0, 0xe6, 0x73, 0x64, 0xf1, - 0x42, 0x92, 0x0f, 0xe1, 0x01, 0x1a, 0x7a, 0xb6, 0x50, 0x94, 0xca, 0xd5, 0x08, 0x3a, 0x96, 0x36, - 0x8d, 0x8f, 0xe1, 0xd0, 0x0c, 0xc8, 0xb4, 0xd5, 0x54, 0xdb, 0x81, 0x26, 0x75, 0xd3, 0xe0, 0x2b, - 0xe8, 0xd8, 0x97, 0x4c, 0x58, 0x9c, 0x60, 0x56, 0xc4, 0x4d, 0xf9, 0x77, 0x98, 0x19, 0x57, 0x0d, - 0xc8, 0x47, 0xf0, 0x70, 0xfb, 0x56, 0x1a, 0x45, 0x19, 0x0a, 0xa1, 0xfc, 0xf6, 0x83, 0x6d, 0x9a, - 0x67, 0x9a, 0x1e, 0xfc, 0xe0, 0x40, 0x5b, 0x7b, 0x4d, 0x50, 0x4e, 0x6f, 0x0b, 0xc3, 0x84, 0x27, - 0x21, 0x5a, 0x43, 0x05, 0xc8, 0x3b, 0xd0, 0xaa, 0xc4, 0x32, 0x88, 0x04, 0xb0, 0x2b, 0x94, 0x58, - 0xb8, 0xf5, 0x7e, 0x7d, 0xd8, 0x1e, 0x3d, 0xf6, 0x5e, 0xb3, 0x1b, 0x5e, 0x35, 0xf4, 0xf8, 0xd1, - 0x4f, 0x7f, 0xf6, 0x1e, 0x54, 0x39, 0x11, 0x58, 0xa3, 0xc1, 0xaf, 0x0e, 0xec, 0x8e, 0xa9, 0x0c, - 0x17, 0xd3, 0x5b, 0xd2, 0x83, 0xf6, 0xbc, 0x78, 0x9c, 0x95, 0x33, 0x81, 0xa2, 0xbe, 0x54, 0xc1, - 0x5c, 0xd8, 0x95, 0x6c, 0x85, 0x7c, 0x6d, 0x93, 0x59, 0x48, 0x3e, 0x83, 0x03, 0x99, 0xd1, 0x44, - 0xd0, 0xb0, 0x88, 0xf0, 0xff, 0xf9, 0x26, 0x98, 0x44, 0x53, 0x6e, 0x13, 0x05, 0x15, 0x21, 0x79, - 0x1f, 0x3a, 0x92, 0xdf, 0x60, 0x32, 0x0b, 0x79, 0x22, 0x33, 0x1a, 0x4a, 0xb7, 0xa1, 0x46, 0x79, - 0xa8, 0xd8, 0x0b, 0x43, 0x96, 0x46, 0xd4, 0x2c, 0x8f, 0x68, 0xf0, 0xb7, 0x03, 0x9d, 0xaa, 0x3f, - 0xe9, 0x40, 0x8d, 0x45, 0xe6, 0x30, 0x35, 0x16, 0x15, 0x52, 0x81, 0x49, 0x84, 0x99, 0xb9, 0x24, - 0x83, 0xc8, 0x19, 0x90, 0xed, 0x35, 0x66, 0x18, 0xb2, 0x94, 0x15, 0x7b, 0x5d, 0x57, 0x3d, 0x47, - 0xb6, 0x12, 0xd8, 0x02, 0xb9, 0x84, 0x36, 0x66, 0xe1, 0xe8, 0xc9, 0x4c, 0x05, 0x53, 0x29, 0xdb, - 0xa3, 0xde, 0xeb, 0x2f, 0x24, 0xb8, 0x18, 0x3d, 0x99, 0x16, 0x6d, 0xe3, 0xc6, 0x8b, 0x57, 0xbd, - 0x9d, 0x00, 0x94, 0x52, 0x31, 0x64, 0x0c, 0xfb, 0xda, 0xe7, 0x1a, 0x51, 0x1d, 0xe6, 0x8d, 0x5d, - 0xf6, 0x94, 0xee, 0x12, 0x71, 0xf0, 0x5b, 0x0d, 0x3a, 0x76, 0x34, 0x17, 0x74, 0xb9, 0x9c, 0xde, - 0x16, 0xa7, 0x61, 0x49, 0x4e, 0x97, 0x2c, 0x52, 0xea, 0xca, 0x95, 0x1e, 0x95, 0x2b, 0xfa, 0x66, - 0xff, 0xdb, 0x2e, 0x42, 0x9e, 0xa2, 0x1a, 0xd0, 0x41, 0xb5, 0x7d, 0x52, 0x14, 0x8a, 0x45, 0xb0, - 0x9b, 0xae, 0x07, 0x64, 0x61, 0x51, 0x49, 0xe9, 0x66, 0xc9, 0x69, 0xa4, 0x46, 0x72, 0x10, 0x58, - 0x58, 0x5e, 0x9e, 0x66, 0x75, 0x79, 0x9e, 0x42, 0x4b, 0x0d, 0x51, 0xb8, 0x2d, 0xb5, 0x36, 0x6f, - 0x78, 0x7e, 0x23, 0x22, 0x9f, 0x40, 0xe3, 0x1a, 0x51, 0xb8, 0xbb, 0x6f, 0x23, 0x56, 0x92, 0xd2, - 0x1a, 0xed, 0x55, 0xd6, 0x28, 0x05, 0xf8, 0x57, 0x51, 0x7c, 0x8f, 0xb6, 0xdb, 0xe8, 0xa8, 0xe3, - 0x6e, 0x31, 0xb9, 0x84, 0x16, 0x5d, 0xf1, 0x75, 0xa2, 0xff, 0x23, 0xf6, 0xc7, 0x5e, 0xe1, 0xfe, - 0xc7, 0xab, 0xde, 0x07, 0x31, 0x93, 0x8b, 0xf5, 0xdc, 0x0b, 0xf9, 0xca, 0x7c, 0x7e, 0xcd, 0x9f, - 0x33, 0x11, 0xdd, 0xf8, 0x72, 0x93, 0xa2, 0xf0, 0xae, 0x12, 0x19, 0x18, 0xf5, 0xe0, 0x04, 0x9a, - 0x57, 0x9f, 0x4e, 0x50, 0x92, 0x87, 0x50, 0x67, 0x91, 0x70, 0x9d, 0x7e, 0x7d, 0xd8, 0x08, 0x8a, - 0xc7, 0x71, 0xf8, 0xe2, 0xae, 0xeb, 0xbc, 0xbc, 0xeb, 0x3a, 0x7f, 0xdd, 0x75, 0x9d, 0x1f, 0xef, - 0xbb, 0x3b, 0x2f, 0xef, 0xbb, 0x3b, 0xbf, 0xdf, 0x77, 0x77, 0xbe, 0xb9, 0x2a, 0xbd, 0x24, 0xc5, - 0x38, 0xde, 0x7c, 0x9b, 0xdb, 0x1f, 0x8f, 0xb3, 0x79, 0xc6, 0xa2, 0x18, 0xfd, 0x15, 0x8f, 0xd6, - 0x4b, 0xf4, 0xf3, 0x91, 0x7f, 0x6b, 0x4b, 0xfe, 0x76, 0x2c, 0xc2, 0xcf, 0xcf, 0x75, 0x96, 0x79, - 0x4b, 0x7d, 0xb1, 0x3f, 0xfe, 0x27, 0x00, 0x00, 0xff, 0xff, 0x6d, 0x1f, 0x5b, 0x3c, 0x91, 0x06, - 0x00, 0x00, -} - -func (m *EthereumEventVoteRecord) 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 *EthereumEventVoteRecord) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EthereumEventVoteRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Accepted { - i-- - if m.Accepted { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if len(m.Votes) > 0 { - for iNdEx := len(m.Votes) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Votes[iNdEx]) - copy(dAtA[i:], m.Votes[iNdEx]) - i = encodeVarintGravity(dAtA, i, uint64(len(m.Votes[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if m.Event != nil { - { - size, err := m.Event.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGravity(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LatestEthereumBlockHeight) 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 *LatestEthereumBlockHeight) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LatestEthereumBlockHeight) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.CosmosHeight != 0 { - i = encodeVarintGravity(dAtA, i, uint64(m.CosmosHeight)) - i-- - dAtA[i] = 0x10 - } - if m.EthereumHeight != 0 { - i = encodeVarintGravity(dAtA, i, uint64(m.EthereumHeight)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *EthereumSigner) 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 *EthereumSigner) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EthereumSigner) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.EthereumAddress) > 0 { - i -= len(m.EthereumAddress) - copy(dAtA[i:], m.EthereumAddress) - i = encodeVarintGravity(dAtA, i, uint64(len(m.EthereumAddress))) - i-- - dAtA[i] = 0x12 - } - if m.Power != 0 { - i = encodeVarintGravity(dAtA, i, uint64(m.Power)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *SignerSetTx) 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 *SignerSetTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignerSetTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signers) > 0 { - for iNdEx := len(m.Signers) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Signers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGravity(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.Height != 0 { - i = encodeVarintGravity(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x10 - } - if m.Nonce != 0 { - i = encodeVarintGravity(dAtA, i, uint64(m.Nonce)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *BatchTx) 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 *BatchTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BatchTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Height != 0 { - i = encodeVarintGravity(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x28 - } - if len(m.TokenContract) > 0 { - i -= len(m.TokenContract) - copy(dAtA[i:], m.TokenContract) - i = encodeVarintGravity(dAtA, i, uint64(len(m.TokenContract))) - i-- - dAtA[i] = 0x22 - } - if len(m.Transactions) > 0 { - for iNdEx := len(m.Transactions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Transactions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGravity(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.Timeout != 0 { - i = encodeVarintGravity(dAtA, i, uint64(m.Timeout)) - i-- - dAtA[i] = 0x10 - } - if m.BatchNonce != 0 { - i = encodeVarintGravity(dAtA, i, uint64(m.BatchNonce)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *SendToEthereum) 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 *SendToEthereum) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SendToEthereum) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Erc20Fee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGravity(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - { - size, err := m.Erc20Token.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGravity(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - if len(m.EthereumRecipient) > 0 { - i -= len(m.EthereumRecipient) - copy(dAtA[i:], m.EthereumRecipient) - i = encodeVarintGravity(dAtA, i, uint64(len(m.EthereumRecipient))) - i-- - dAtA[i] = 0x1a - } - if len(m.Sender) > 0 { - i -= len(m.Sender) - copy(dAtA[i:], m.Sender) - i = encodeVarintGravity(dAtA, i, uint64(len(m.Sender))) - i-- - dAtA[i] = 0x12 - } - if m.Id != 0 { - i = encodeVarintGravity(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ContractCallTx) 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 *ContractCallTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ContractCallTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Height != 0 { - i = encodeVarintGravity(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x40 - } - if len(m.Fees) > 0 { - for iNdEx := len(m.Fees) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Fees[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGravity(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if len(m.Tokens) > 0 { - for iNdEx := len(m.Tokens) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Tokens[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGravity(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - if m.Timeout != 0 { - i = encodeVarintGravity(dAtA, i, uint64(m.Timeout)) - i-- - dAtA[i] = 0x28 - } - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintGravity(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0x22 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintGravity(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0x1a - } - if len(m.InvalidationScope) > 0 { - i -= len(m.InvalidationScope) - copy(dAtA[i:], m.InvalidationScope) - i = encodeVarintGravity(dAtA, i, uint64(len(m.InvalidationScope))) - i-- - dAtA[i] = 0x12 - } - if m.InvalidationNonce != 0 { - i = encodeVarintGravity(dAtA, i, uint64(m.InvalidationNonce)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ERC20Token) 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 *ERC20Token) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ERC20Token) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.Amount.Size() - i -= size - if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintGravity(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Contract) > 0 { - i -= len(m.Contract) - copy(dAtA[i:], m.Contract) - i = encodeVarintGravity(dAtA, i, uint64(len(m.Contract))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *IDSet) 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 *IDSet) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IDSet) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Ids) > 0 { - dAtA5 := make([]byte, len(m.Ids)*10) - var j4 int - for _, num := range m.Ids { - for num >= 1<<7 { - dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j4++ - } - dAtA5[j4] = uint8(num) - j4++ - } - i -= j4 - copy(dAtA[i:], dAtA5[:j4]) - i = encodeVarintGravity(dAtA, i, uint64(j4)) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintGravity(dAtA []byte, offset int, v uint64) int { - offset -= sovGravity(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *EthereumEventVoteRecord) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Event != nil { - l = m.Event.Size() - n += 1 + l + sovGravity(uint64(l)) - } - if len(m.Votes) > 0 { - for _, s := range m.Votes { - l = len(s) - n += 1 + l + sovGravity(uint64(l)) - } - } - if m.Accepted { - n += 2 - } - return n -} - -func (m *LatestEthereumBlockHeight) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.EthereumHeight != 0 { - n += 1 + sovGravity(uint64(m.EthereumHeight)) - } - if m.CosmosHeight != 0 { - n += 1 + sovGravity(uint64(m.CosmosHeight)) - } - return n -} - -func (m *EthereumSigner) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Power != 0 { - n += 1 + sovGravity(uint64(m.Power)) - } - l = len(m.EthereumAddress) - if l > 0 { - n += 1 + l + sovGravity(uint64(l)) - } - return n -} - -func (m *SignerSetTx) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Nonce != 0 { - n += 1 + sovGravity(uint64(m.Nonce)) - } - if m.Height != 0 { - n += 1 + sovGravity(uint64(m.Height)) - } - if len(m.Signers) > 0 { - for _, e := range m.Signers { - l = e.Size() - n += 1 + l + sovGravity(uint64(l)) - } - } - return n -} - -func (m *BatchTx) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BatchNonce != 0 { - n += 1 + sovGravity(uint64(m.BatchNonce)) - } - if m.Timeout != 0 { - n += 1 + sovGravity(uint64(m.Timeout)) - } - if len(m.Transactions) > 0 { - for _, e := range m.Transactions { - l = e.Size() - n += 1 + l + sovGravity(uint64(l)) - } - } - l = len(m.TokenContract) - if l > 0 { - n += 1 + l + sovGravity(uint64(l)) - } - if m.Height != 0 { - n += 1 + sovGravity(uint64(m.Height)) - } - return n -} - -func (m *SendToEthereum) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != 0 { - n += 1 + sovGravity(uint64(m.Id)) - } - l = len(m.Sender) - if l > 0 { - n += 1 + l + sovGravity(uint64(l)) - } - l = len(m.EthereumRecipient) - if l > 0 { - n += 1 + l + sovGravity(uint64(l)) - } - l = m.Erc20Token.Size() - n += 1 + l + sovGravity(uint64(l)) - l = m.Erc20Fee.Size() - n += 1 + l + sovGravity(uint64(l)) - return n -} - -func (m *ContractCallTx) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.InvalidationNonce != 0 { - n += 1 + sovGravity(uint64(m.InvalidationNonce)) - } - l = len(m.InvalidationScope) - if l > 0 { - n += 1 + l + sovGravity(uint64(l)) - } - l = len(m.Address) - if l > 0 { - n += 1 + l + sovGravity(uint64(l)) - } - l = len(m.Payload) - if l > 0 { - n += 1 + l + sovGravity(uint64(l)) - } - if m.Timeout != 0 { - n += 1 + sovGravity(uint64(m.Timeout)) - } - if len(m.Tokens) > 0 { - for _, e := range m.Tokens { - l = e.Size() - n += 1 + l + sovGravity(uint64(l)) - } - } - if len(m.Fees) > 0 { - for _, e := range m.Fees { - l = e.Size() - n += 1 + l + sovGravity(uint64(l)) - } - } - if m.Height != 0 { - n += 1 + sovGravity(uint64(m.Height)) - } - return n -} - -func (m *ERC20Token) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Contract) - if l > 0 { - n += 1 + l + sovGravity(uint64(l)) - } - l = m.Amount.Size() - n += 1 + l + sovGravity(uint64(l)) - return n -} - -func (m *IDSet) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Ids) > 0 { - l = 0 - for _, e := range m.Ids { - l += sovGravity(uint64(e)) - } - n += 1 + sovGravity(uint64(l)) + l - } - return n -} - -func sovGravity(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGravity(x uint64) (n int) { - return sovGravity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *EthereumEventVoteRecord) 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 ErrIntOverflowGravity - } - 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: EthereumEventVoteRecord: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EthereumEventVoteRecord: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Event", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGravity - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGravity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Event == nil { - m.Event = &types.Any{} - } - if err := m.Event.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - 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 ErrInvalidLengthGravity - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGravity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Votes = append(m.Votes, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Accepted", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Accepted = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipGravity(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGravity - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LatestEthereumBlockHeight) 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 ErrIntOverflowGravity - } - 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: LatestEthereumBlockHeight: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LatestEthereumBlockHeight: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EthereumHeight", wireType) - } - m.EthereumHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EthereumHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CosmosHeight", wireType) - } - m.CosmosHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CosmosHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGravity(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGravity - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EthereumSigner) 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 ErrIntOverflowGravity - } - 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: EthereumSigner: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EthereumSigner: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType) - } - m.Power = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Power |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EthereumAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - 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 ErrInvalidLengthGravity - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGravity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EthereumAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGravity(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGravity - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignerSetTx) 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 ErrIntOverflowGravity - } - 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: SignerSetTx: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignerSetTx: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - m.Nonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Nonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGravity - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGravity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signers = append(m.Signers, &EthereumSigner{}) - if err := m.Signers[len(m.Signers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGravity(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGravity - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BatchTx) 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 ErrIntOverflowGravity - } - 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: BatchTx: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BatchTx: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchNonce", wireType) - } - m.BatchNonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BatchNonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) - } - m.Timeout = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Timeout |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Transactions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGravity - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGravity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Transactions = append(m.Transactions, &SendToEthereum{}) - if err := m.Transactions[len(m.Transactions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenContract", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - 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 ErrInvalidLengthGravity - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGravity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TokenContract = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGravity(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGravity - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SendToEthereum) 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 ErrIntOverflowGravity - } - 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: SendToEthereum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SendToEthereum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - m.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - 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 ErrInvalidLengthGravity - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGravity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EthereumRecipient", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - 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 ErrInvalidLengthGravity - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGravity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EthereumRecipient = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Erc20Token", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGravity - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGravity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Erc20Token.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Erc20Fee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGravity - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGravity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Erc20Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGravity(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGravity - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ContractCallTx) 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 ErrIntOverflowGravity - } - 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: ContractCallTx: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ContractCallTx: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InvalidationNonce", wireType) - } - m.InvalidationNonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.InvalidationNonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InvalidationScope", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGravity - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGravity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.InvalidationScope = append(m.InvalidationScope[:0], dAtA[iNdEx:postIndex]...) - if m.InvalidationScope == nil { - m.InvalidationScope = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - 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 ErrInvalidLengthGravity - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGravity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGravity - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGravity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) - } - m.Timeout = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Timeout |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tokens", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGravity - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGravity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Tokens = append(m.Tokens, ERC20Token{}) - if err := m.Tokens[len(m.Tokens)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fees", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGravity - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGravity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Fees = append(m.Fees, ERC20Token{}) - if err := m.Fees[len(m.Fees)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGravity(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGravity - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ERC20Token) 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 ErrIntOverflowGravity - } - 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: ERC20Token: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ERC20Token: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Contract", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - 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 ErrInvalidLengthGravity - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGravity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Contract = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - 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 ErrInvalidLengthGravity - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGravity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGravity(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGravity - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *IDSet) 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 ErrIntOverflowGravity - } - 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: IDSet: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IDSet: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Ids = append(m.Ids, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthGravity - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthGravity - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.Ids) == 0 { - m.Ids = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGravity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Ids = append(m.Ids, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipGravity(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGravity - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGravity(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, ErrIntOverflowGravity - } - 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, ErrIntOverflowGravity - } - 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, ErrIntOverflowGravity - } - 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, ErrInvalidLengthGravity - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGravity - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGravity - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGravity = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGravity = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGravity = fmt.Errorf("proto: unexpected end of group") -) diff --git a/module/x/gravity/migrations/v1/types/hooks.go b/module/x/gravity/migrations/v1/types/hooks.go deleted file mode 100644 index 79b53f7b7..000000000 --- a/module/x/gravity/migrations/v1/types/hooks.go +++ /dev/null @@ -1,47 +0,0 @@ -package types - -import sdk "github.com/cosmos/cosmos-sdk/types" - -type GravityHooks interface { - AfterContractCallExecutedEvent(ctx sdk.Context, event ContractCallExecutedEvent) - AfterERC20DeployedEvent(ctx sdk.Context, event ERC20DeployedEvent) - AfterSignerSetExecutedEvent(ctx sdk.Context, event SignerSetTxExecutedEvent) - AfterBatchExecutedEvent(ctx sdk.Context, event BatchExecutedEvent) - AfterSendToCosmosEvent(ctx sdk.Context, event SendToCosmosEvent) -} - -type MultiGravityHooks []GravityHooks - -func NewMultiGravityHooks(hooks ...GravityHooks) MultiGravityHooks { - return hooks -} - -func (mghs MultiGravityHooks) AfterContractCallExecutedEvent(ctx sdk.Context, event ContractCallExecutedEvent) { - for i := range mghs { - mghs[i].AfterContractCallExecutedEvent(ctx, event) - } -} - -func (mghs MultiGravityHooks) AfterERC20DeployedEvent(ctx sdk.Context, event ERC20DeployedEvent) { - for i := range mghs { - mghs[i].AfterERC20DeployedEvent(ctx, event) - } -} - -func (mghs MultiGravityHooks) AfterSignerSetExecutedEvent(ctx sdk.Context, event SignerSetTxExecutedEvent) { - for i := range mghs { - mghs[i].AfterSignerSetExecutedEvent(ctx, event) - } -} - -func (mghs MultiGravityHooks) AfterBatchExecutedEvent(ctx sdk.Context, event BatchExecutedEvent) { - for i := range mghs { - mghs[i].AfterBatchExecutedEvent(ctx, event) - } -} - -func (mghs MultiGravityHooks) AfterSendToCosmosEvent(ctx sdk.Context, event SendToCosmosEvent) { - for i := range mghs { - mghs[i].AfterSendToCosmosEvent(ctx, event) - } -} diff --git a/module/x/gravity/migrations/v1/types/interfaces.go b/module/x/gravity/migrations/v1/types/interfaces.go deleted file mode 100644 index ffdd58541..000000000 --- a/module/x/gravity/migrations/v1/types/interfaces.go +++ /dev/null @@ -1,40 +0,0 @@ -package types - -import ( - tmbytes "github.com/cometbft/cometbft/libs/bytes" - "github.com/cosmos/gogoproto/proto" - "github.com/ethereum/go-ethereum/common" -) - -// EthereumTxConfirmation represents one validtors signature for a given -// outgoing ethereum transaction -type EthereumTxConfirmation interface { - proto.Message - - GetSigner() common.Address - GetSignature() []byte - GetStoreIndex() []byte - Validate() error -} - -// EthereumEvent represents a event from the gravity contract -// on the counterparty ethereum chain -type EthereumEvent interface { - proto.Message - - GetEventNonce() uint64 - GetEthereumHeight() uint64 - Hash() tmbytes.HexBytes - Validate() error -} - -type OutgoingTx interface { - // NOTE: currently the function signatures here don't match, figure out how to do this proprly - // maybe add an interface arg here and typecheck in each implementation? - - // The only one that will be problematic is BatchTx which needs to pull all the constituent - // transactions before calculating the checkpoint - GetCheckpoint([]byte) []byte - GetStoreIndex() []byte - GetCosmosHeight() uint64 -} diff --git a/module/x/gravity/migrations/v1/types/key.go b/module/x/gravity/migrations/v1/types/key.go deleted file mode 100644 index 615c271e8..000000000 --- a/module/x/gravity/migrations/v1/types/key.go +++ /dev/null @@ -1,162 +0,0 @@ -package types - -import ( - "bytes" - - "github.com/ethereum/go-ethereum/common" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -const ( - // ModuleName is the name of the module - ModuleName = "gravity" - - // StoreKey to be used when creating the KVStore - StoreKey = ModuleName - - // RouterKey is the module name router key - RouterKey = ModuleName - - // QuerierRoute to be used for querierer msgs - QuerierRoute = ModuleName -) - -const ( - _ = byte(iota) - // Key Delegation - ValidatorEthereumAddressKey - OrchestratorValidatorAddressKey - EthereumOrchestratorAddressKey - - // Core types - EthereumSignatureKey - EthereumEventVoteRecordKey - OutgoingTxKey - SendToEthereumKey - - // Latest nonce indexes - LastEventNonceByValidatorKey - LastObservedEventNonceKey - LatestSignerSetTxNonceKey - LastSlashedOutgoingTxBlockKey - LastSlashedSignerSetTxNonceKey - LastOutgoingBatchNonceKey - - // LastSendToEthereumIDKey indexes the lastTxPoolID - LastSendToEthereumIDKey - - // LastEthereumBlockHeightKey indexes the latest Ethereum block height - LastEthereumBlockHeightKey - - // DenomToERC20Key prefixes the index of Cosmos originated asset denoms to ERC20s - DenomToERC20Key - - // ERC20ToDenomKey prefixes the index of Cosmos originated assets ERC20s to denoms - ERC20ToDenomKey - - // LastUnBondingBlockHeightKey indexes the last validator unbonding block height - LastUnBondingBlockHeightKey - - LastObservedSignerSetKey -) - -//////////////////// -// Key Delegation // -//////////////////// - -// MakeOrchestratorValidatorAddressKey returns the following key format -// prefix -// [0xe8][cosmos1ahx7f8wyertuus9r20284ej0asrs085case3kn] -func MakeOrchestratorValidatorAddressKey(orc sdk.AccAddress) []byte { - return append([]byte{OrchestratorValidatorAddressKey}, orc.Bytes()...) -} - -// MakeValidatorEthereumAddressKey returns the following key format -// prefix cosmos-validator -// [0x0][cosmosvaloper1ahx7f8wyertuus9r20284ej0asrs085case3kn] -func MakeValidatorEthereumAddressKey(validator sdk.ValAddress) []byte { - return append([]byte{ValidatorEthereumAddressKey}, validator.Bytes()...) -} - -// MakeEthereumOrchestratorAddressKey returns the following key format -// prefix cosmos-validator -// [0x0][cosmosvaloper1ahx7f8wyertuus9r20284ej0asrs085case3kn] -func MakeEthereumOrchestratorAddressKey(eth common.Address) []byte { - return append([]byte{EthereumOrchestratorAddressKey}, eth.Bytes()...) -} - -///////////////////////// -// Etheruem Signatures // -///////////////////////// - -// MakeEthereumSignatureKey returns the following key format -// prefix nonce validator-address -// [0x0][0 0 0 0 0 0 0 1][cosmos1ahx7f8wyertuus9r20284ej0asrs085case3kn] -func MakeEthereumSignatureKey(storeIndex []byte, validator sdk.ValAddress) []byte { - return bytes.Join([][]byte{{EthereumSignatureKey}, storeIndex, validator.Bytes()}, []byte{}) -} - -///////////////////////////////// -// Etheruem Event Vote Records // -///////////////////////////////// - -// MakeEthereumEventVoteRecordKey returns the following key format -// prefix nonce claim-details-hash -// [0x5][0 0 0 0 0 0 0 1][fd1af8cec6c67fcf156f1b61fdf91ebc04d05484d007436e75342fc05bbff35a] -func MakeEthereumEventVoteRecordKey(eventNonce uint64, claimHash []byte) []byte { - return bytes.Join([][]byte{{EthereumEventVoteRecordKey}, sdk.Uint64ToBigEndian(eventNonce), claimHash}, []byte{}) -} - -////////////////// -// Outgoing Txs // -////////////////// - -// MakeOutgoingTxKey returns the store index passed with a prefix -func MakeOutgoingTxKey(storeIndex []byte) []byte { - return append([]byte{OutgoingTxKey}, storeIndex...) -} - -////////////////////// -// Send To Etheruem // -////////////////////// - -// MakeSendToEthereumKey returns the following key format -// prefix eth-contract-address fee_amount id -// [0x9][0xc783df8a850f42e7F7e57013759C285caa701eB6][1000000000][0 0 0 0 0 0 0 1] -func MakeSendToEthereumKey(id uint64, fee ERC20Token) []byte { - amount := make([]byte, 32) - return bytes.Join([][]byte{{SendToEthereumKey}, common.HexToAddress(fee.Contract).Bytes(), fee.Amount.BigInt().FillBytes(amount), sdk.Uint64ToBigEndian(id)}, []byte{}) -} - -// MakeLastEventNonceByValidatorKey indexes lateset event nonce by validator -// MakeLastEventNonceByValidatorKey returns the following key format -// prefix cosmos-validator -// [0x0][cosmos1ahx7f8wyertuus9r20284ej0asrs085case3kn] -func MakeLastEventNonceByValidatorKey(validator sdk.ValAddress) []byte { - return append([]byte{LastEventNonceByValidatorKey}, validator.Bytes()...) -} - -func MakeDenomToERC20Key(denom string) []byte { - return append([]byte{DenomToERC20Key}, []byte(denom)...) -} - -func MakeERC20ToDenomKey(erc20 string) []byte { - return append([]byte{ERC20ToDenomKey}, []byte(erc20)...) -} - -func MakeSignerSetTxKey(nonce uint64) []byte { - return append([]byte{SignerSetTxPrefixByte}, sdk.Uint64ToBigEndian(nonce)...) -} - -func MakeBatchTxKey(addr common.Address, nonce uint64) []byte { - return bytes.Join([][]byte{{BatchTxPrefixByte}, addr.Bytes(), sdk.Uint64ToBigEndian(nonce)}, []byte{}) -} - -func MakeContractCallTxKey(invalscope []byte, invalnonce uint64) []byte { - return bytes.Join([][]byte{{ContractCallTxPrefixByte}, invalscope, sdk.Uint64ToBigEndian(invalnonce)}, []byte{}) -} - -func MakeNewERC20ToDenomKey(erc20 common.Address) []byte { - return append([]byte{ERC20ToDenomKey}, erc20.Bytes()...) -} diff --git a/module/x/gravity/migrations/v1/types/msgs.go b/module/x/gravity/migrations/v1/types/msgs.go deleted file mode 100644 index 06c0719ca..000000000 --- a/module/x/gravity/migrations/v1/types/msgs.go +++ /dev/null @@ -1,289 +0,0 @@ -package types - -import ( - "fmt" - - cdctypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/ethereum/go-ethereum/common" -) - -var ( - _ sdk.Msg = &MsgDelegateKeys{} - _ sdk.Msg = &MsgSendToEthereum{} - _ sdk.Msg = &MsgCancelSendToEthereum{} - _ sdk.Msg = &MsgRequestBatchTx{} - _ sdk.Msg = &MsgSubmitEthereumEvent{} - _ sdk.Msg = &MsgSubmitEthereumTxConfirmation{} - - _ cdctypes.UnpackInterfacesMessage = &MsgSubmitEthereumEvent{} - _ cdctypes.UnpackInterfacesMessage = &MsgSubmitEthereumTxConfirmation{} - _ cdctypes.UnpackInterfacesMessage = &EthereumEventVoteRecord{} -) - -// NewMsgDelegateKeys returns a reference to a new MsgDelegateKeys. -func NewMsgDelegateKeys(val sdk.ValAddress, orchAddr sdk.AccAddress, ethAddr string, ethSig []byte) *MsgDelegateKeys { - return &MsgDelegateKeys{ - ValidatorAddress: val.String(), - OrchestratorAddress: orchAddr.String(), - EthereumAddress: ethAddr, - EthSignature: ethSig, - } -} - -// Route should return the name of the module -func (msg *MsgDelegateKeys) Route() string { return RouterKey } - -// Type should return the action -func (msg *MsgDelegateKeys) Type() string { return "delegate_keys" } - -// ValidateBasic performs stateless checks -func (msg *MsgDelegateKeys) ValidateBasic() (err error) { - if _, err = sdk.ValAddressFromBech32(msg.ValidatorAddress); err != nil { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.ValidatorAddress) - } - if _, err = sdk.AccAddressFromBech32(msg.OrchestratorAddress); err != nil { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.OrchestratorAddress) - } - if !common.IsHexAddress(msg.EthereumAddress) { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "ethereum address") - } - if len(msg.EthSignature) == 0 { - return fmt.Errorf("empty signature") - } - - return nil -} - -// GetSignBytes encodes the message for signing -func (msg *MsgDelegateKeys) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg)) -} - -// GetSigners defines whose signature is required -func (msg *MsgDelegateKeys) GetSigners() []sdk.AccAddress { - acc, err := sdk.ValAddressFromBech32(msg.ValidatorAddress) - if err != nil { - panic(err) - } - return []sdk.AccAddress{sdk.AccAddress(acc)} -} - -// Route should return the name of the module -func (msg *MsgSubmitEthereumEvent) Route() string { return RouterKey } - -// Type should return the action -func (msg *MsgSubmitEthereumEvent) Type() string { return "submit_ethereum_event" } - -// ValidateBasic performs stateless checks -func (msg *MsgSubmitEthereumEvent) ValidateBasic() (err error) { - if _, err = sdk.AccAddressFromBech32(msg.Signer); err != nil { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Signer) - } - - event, err := UnpackEvent(msg.Event) - if err != nil { - return err - } - return event.Validate() -} - -// GetSignBytes encodes the message for signing -func (msg *MsgSubmitEthereumEvent) GetSignBytes() []byte { - panic(fmt.Errorf("deprecated")) -} - -// GetSigners defines whose signature is required -func (msg *MsgSubmitEthereumEvent) GetSigners() []sdk.AccAddress { - // TODO: figure out how to convert between AccAddress and ValAddress properly - acc, err := sdk.AccAddressFromBech32(msg.Signer) - if err != nil { - panic(err) - } - return []sdk.AccAddress{acc} -} - -func (msg *MsgSubmitEthereumEvent) UnpackInterfaces(unpacker cdctypes.AnyUnpacker) error { - var event EthereumEvent - return unpacker.UnpackAny(msg.Event, &event) -} - -// Route should return the name of the module -func (msg *MsgSubmitEthereumTxConfirmation) Route() string { return RouterKey } - -// Type should return the action -func (msg *MsgSubmitEthereumTxConfirmation) Type() string { return "submit_ethereum_signature" } - -// ValidateBasic performs stateless checks -func (msg *MsgSubmitEthereumTxConfirmation) ValidateBasic() (err error) { - if _, err = sdk.AccAddressFromBech32(msg.Signer); err != nil { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Signer) - } - - event, err := UnpackConfirmation(msg.Confirmation) - - if err != nil { - return err - } - - return event.Validate() -} - -// GetSignBytes encodes the message for signing -func (msg *MsgSubmitEthereumTxConfirmation) GetSignBytes() []byte { - panic(fmt.Errorf("deprecated")) -} - -// GetSigners defines whose signature is required -func (msg *MsgSubmitEthereumTxConfirmation) GetSigners() []sdk.AccAddress { - // TODO: figure out how to convert between AccAddress and ValAddress properly - acc, err := sdk.AccAddressFromBech32(msg.Signer) - if err != nil { - panic(err) - } - return []sdk.AccAddress{acc} -} - -func (msg *MsgSubmitEthereumTxConfirmation) UnpackInterfaces(unpacker cdctypes.AnyUnpacker) error { - var sig EthereumTxConfirmation - return unpacker.UnpackAny(msg.Confirmation, &sig) -} - -// NewMsgSendToEthereum returns a new MsgSendToEthereum -func NewMsgSendToEthereum(sender sdk.AccAddress, destAddress string, send sdk.Coin, bridgeFee sdk.Coin) *MsgSendToEthereum { - return &MsgSendToEthereum{ - Sender: sender.String(), - EthereumRecipient: destAddress, - Amount: send, - BridgeFee: bridgeFee, - } -} - -// Route should return the name of the module -func (msg MsgSendToEthereum) Route() string { return RouterKey } - -// Type should return the action -func (msg MsgSendToEthereum) Type() string { return "send_to_eth" } - -// ValidateBasic runs stateless checks on the message -// Checks if the Eth address is valid -func (msg MsgSendToEthereum) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(msg.Sender); err != nil { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) - } - - // fee and send must be of the same denom - // this check is VERY IMPORTANT - if msg.Amount.Denom != msg.BridgeFee.Denom { - return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, - fmt.Sprintf("fee and amount must be the same type %s != %s", msg.Amount.Denom, msg.BridgeFee.Denom)) - } - - if !msg.Amount.IsValid() || msg.Amount.IsZero() { - return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, "amount") - } - if !msg.BridgeFee.IsValid() { - return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, "fee") - } - if !common.IsHexAddress(msg.EthereumRecipient) { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "ethereum address") - } - - return nil -} - -// GetSignBytes encodes the message for signing -func (msg MsgSendToEthereum) GetSignBytes() []byte { - panic(fmt.Errorf("deprecated")) -} - -// GetSigners defines whose signature is required -func (msg MsgSendToEthereum) GetSigners() []sdk.AccAddress { - acc, err := sdk.AccAddressFromBech32(msg.Sender) - if err != nil { - panic(err) - } - - return []sdk.AccAddress{acc} -} - -// NewMsgRequestBatchTx returns a new msgRequestBatch -func NewMsgRequestBatchTx(denom string, signer sdk.AccAddress) *MsgRequestBatchTx { - return &MsgRequestBatchTx{ - Denom: denom, - Signer: signer.String(), - } -} - -// Route should return the name of the module -func (msg MsgRequestBatchTx) Route() string { return RouterKey } - -// Type should return the action -func (msg MsgRequestBatchTx) Type() string { return "request_batch" } - -// ValidateBasic performs stateless checks -func (msg MsgRequestBatchTx) ValidateBasic() error { - if err := sdk.ValidateDenom(msg.Denom); err != nil { - return sdkerrors.Wrap(err, "denom is invalid") - } - if _, err := sdk.AccAddressFromBech32(msg.Signer); err != nil { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Signer) - } - return nil -} - -// GetSignBytes encodes the message for signing -func (msg MsgRequestBatchTx) GetSignBytes() []byte { - panic(fmt.Errorf("deprecated")) -} - -// GetSigners defines whose signature is required -func (msg MsgRequestBatchTx) GetSigners() []sdk.AccAddress { - acc, err := sdk.AccAddressFromBech32(msg.Signer) - if err != nil { - panic(err) - } - - return []sdk.AccAddress{acc} -} - -// NewMsgCancelSendToEthereum returns a new MsgCancelSendToEthereum -func NewMsgCancelSendToEthereum(id uint64, orchestrator sdk.AccAddress) *MsgCancelSendToEthereum { - return &MsgCancelSendToEthereum{ - Id: id, - Sender: orchestrator.String(), - } -} - -// Route should return the name of the module -func (msg MsgCancelSendToEthereum) Route() string { return RouterKey } - -// Type should return the action -func (msg MsgCancelSendToEthereum) Type() string { return "cancel_send_to_ethereum" } - -// ValidateBasic performs stateless checks -func (msg MsgCancelSendToEthereum) ValidateBasic() error { - if msg.Id == 0 { - return fmt.Errorf("Id cannot be 0") - } - if _, err := sdk.AccAddressFromBech32(msg.Sender); err != nil { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) - } - return nil -} - -// GetSignBytes encodes the message for signing -func (msg MsgCancelSendToEthereum) GetSignBytes() []byte { - panic(fmt.Errorf("deprecated")) -} - -// GetSigners defines whose signature is required -func (msg MsgCancelSendToEthereum) GetSigners() []sdk.AccAddress { - acc, err := sdk.AccAddressFromBech32(msg.Sender) - if err != nil { - panic(err) - } - - return []sdk.AccAddress{acc} -} diff --git a/module/x/gravity/migrations/v1/types/msgs.pb.go b/module/x/gravity/migrations/v1/types/msgs.pb.go deleted file mode 100644 index 33f5fb1d8..000000000 --- a/module/x/gravity/migrations/v1/types/msgs.pb.go +++ /dev/null @@ -1,5564 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: gravity/v1migration/msgs.proto - -package types - -import ( - context "context" - fmt "fmt" - github_com_tendermint_tendermint_libs_bytes "github.com/cometbft/cometbft/libs/bytes" - types1 "github.com/cosmos/cosmos-sdk/codec/types" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - _ "github.com/regen-network/cosmos-proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// 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 - -// MsgSendToEthereum submits a SendToEthereum attempt to bridge an asset over to -// Ethereum. The SendToEthereum will be stored and then included in a batch and -// then submitted to Ethereum. -type MsgSendToEthereum struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - EthereumRecipient string `protobuf:"bytes,2,opt,name=ethereum_recipient,json=ethereumRecipient,proto3" json:"ethereum_recipient,omitempty"` - Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"` - BridgeFee types.Coin `protobuf:"bytes,4,opt,name=bridge_fee,json=bridgeFee,proto3" json:"bridge_fee"` -} - -func (m *MsgSendToEthereum) Reset() { *m = MsgSendToEthereum{} } -func (m *MsgSendToEthereum) String() string { return proto.CompactTextString(m) } -func (*MsgSendToEthereum) ProtoMessage() {} -func (*MsgSendToEthereum) Descriptor() ([]byte, []int) { - return fileDescriptor_be93494c8672e945, []int{0} -} -func (m *MsgSendToEthereum) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSendToEthereum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSendToEthereum.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 *MsgSendToEthereum) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSendToEthereum.Merge(m, src) -} -func (m *MsgSendToEthereum) XXX_Size() int { - return m.Size() -} -func (m *MsgSendToEthereum) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSendToEthereum.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSendToEthereum proto.InternalMessageInfo - -func (m *MsgSendToEthereum) GetSender() string { - if m != nil { - return m.Sender - } - return "" -} - -func (m *MsgSendToEthereum) GetEthereumRecipient() string { - if m != nil { - return m.EthereumRecipient - } - return "" -} - -func (m *MsgSendToEthereum) GetAmount() types.Coin { - if m != nil { - return m.Amount - } - return types.Coin{} -} - -func (m *MsgSendToEthereum) GetBridgeFee() types.Coin { - if m != nil { - return m.BridgeFee - } - return types.Coin{} -} - -// MsgSendToEthereumResponse returns the SendToEthereum transaction ID which -// will be included in the batch tx. -type MsgSendToEthereumResponse struct { - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (m *MsgSendToEthereumResponse) Reset() { *m = MsgSendToEthereumResponse{} } -func (m *MsgSendToEthereumResponse) String() string { return proto.CompactTextString(m) } -func (*MsgSendToEthereumResponse) ProtoMessage() {} -func (*MsgSendToEthereumResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_be93494c8672e945, []int{1} -} -func (m *MsgSendToEthereumResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSendToEthereumResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSendToEthereumResponse.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 *MsgSendToEthereumResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSendToEthereumResponse.Merge(m, src) -} -func (m *MsgSendToEthereumResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgSendToEthereumResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSendToEthereumResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSendToEthereumResponse proto.InternalMessageInfo - -func (m *MsgSendToEthereumResponse) GetId() uint64 { - if m != nil { - return m.Id - } - return 0 -} - -// MsgCancelSendToEthereum allows the sender to cancel its own outgoing -// SendToEthereum tx and recieve a refund of the tokens and bridge fees. This tx -// will only succeed if the SendToEthereum tx hasn't been batched to be -// processed and relayed to Ethereum. -type MsgCancelSendToEthereum struct { - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` -} - -func (m *MsgCancelSendToEthereum) Reset() { *m = MsgCancelSendToEthereum{} } -func (m *MsgCancelSendToEthereum) String() string { return proto.CompactTextString(m) } -func (*MsgCancelSendToEthereum) ProtoMessage() {} -func (*MsgCancelSendToEthereum) Descriptor() ([]byte, []int) { - return fileDescriptor_be93494c8672e945, []int{2} -} -func (m *MsgCancelSendToEthereum) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCancelSendToEthereum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCancelSendToEthereum.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 *MsgCancelSendToEthereum) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCancelSendToEthereum.Merge(m, src) -} -func (m *MsgCancelSendToEthereum) XXX_Size() int { - return m.Size() -} -func (m *MsgCancelSendToEthereum) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCancelSendToEthereum.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCancelSendToEthereum proto.InternalMessageInfo - -func (m *MsgCancelSendToEthereum) GetId() uint64 { - if m != nil { - return m.Id - } - return 0 -} - -func (m *MsgCancelSendToEthereum) GetSender() string { - if m != nil { - return m.Sender - } - return "" -} - -type MsgCancelSendToEthereumResponse struct { -} - -func (m *MsgCancelSendToEthereumResponse) Reset() { *m = MsgCancelSendToEthereumResponse{} } -func (m *MsgCancelSendToEthereumResponse) String() string { return proto.CompactTextString(m) } -func (*MsgCancelSendToEthereumResponse) ProtoMessage() {} -func (*MsgCancelSendToEthereumResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_be93494c8672e945, []int{3} -} -func (m *MsgCancelSendToEthereumResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCancelSendToEthereumResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCancelSendToEthereumResponse.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 *MsgCancelSendToEthereumResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCancelSendToEthereumResponse.Merge(m, src) -} -func (m *MsgCancelSendToEthereumResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgCancelSendToEthereumResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCancelSendToEthereumResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCancelSendToEthereumResponse proto.InternalMessageInfo - -// MsgRequestBatchTx requests a batch of transactions with a given coin -// denomination to send across the bridge to Ethereum. -type MsgRequestBatchTx struct { - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` - Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"` -} - -func (m *MsgRequestBatchTx) Reset() { *m = MsgRequestBatchTx{} } -func (m *MsgRequestBatchTx) String() string { return proto.CompactTextString(m) } -func (*MsgRequestBatchTx) ProtoMessage() {} -func (*MsgRequestBatchTx) Descriptor() ([]byte, []int) { - return fileDescriptor_be93494c8672e945, []int{4} -} -func (m *MsgRequestBatchTx) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRequestBatchTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRequestBatchTx.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 *MsgRequestBatchTx) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRequestBatchTx.Merge(m, src) -} -func (m *MsgRequestBatchTx) XXX_Size() int { - return m.Size() -} -func (m *MsgRequestBatchTx) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRequestBatchTx.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRequestBatchTx proto.InternalMessageInfo - -func (m *MsgRequestBatchTx) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -func (m *MsgRequestBatchTx) GetSigner() string { - if m != nil { - return m.Signer - } - return "" -} - -type MsgRequestBatchTxResponse struct { -} - -func (m *MsgRequestBatchTxResponse) Reset() { *m = MsgRequestBatchTxResponse{} } -func (m *MsgRequestBatchTxResponse) String() string { return proto.CompactTextString(m) } -func (*MsgRequestBatchTxResponse) ProtoMessage() {} -func (*MsgRequestBatchTxResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_be93494c8672e945, []int{5} -} -func (m *MsgRequestBatchTxResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRequestBatchTxResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRequestBatchTxResponse.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 *MsgRequestBatchTxResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRequestBatchTxResponse.Merge(m, src) -} -func (m *MsgRequestBatchTxResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgRequestBatchTxResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRequestBatchTxResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRequestBatchTxResponse proto.InternalMessageInfo - -// MsgSubmitEthereumTxConfirmation submits an ethereum signature for a given -// validator -type MsgSubmitEthereumTxConfirmation struct { - // TODO: can we make this take an array? - Confirmation *types1.Any `protobuf:"bytes,1,opt,name=confirmation,proto3" json:"confirmation,omitempty"` - Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"` -} - -func (m *MsgSubmitEthereumTxConfirmation) Reset() { *m = MsgSubmitEthereumTxConfirmation{} } -func (m *MsgSubmitEthereumTxConfirmation) String() string { return proto.CompactTextString(m) } -func (*MsgSubmitEthereumTxConfirmation) ProtoMessage() {} -func (*MsgSubmitEthereumTxConfirmation) Descriptor() ([]byte, []int) { - return fileDescriptor_be93494c8672e945, []int{6} -} -func (m *MsgSubmitEthereumTxConfirmation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSubmitEthereumTxConfirmation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSubmitEthereumTxConfirmation.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 *MsgSubmitEthereumTxConfirmation) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSubmitEthereumTxConfirmation.Merge(m, src) -} -func (m *MsgSubmitEthereumTxConfirmation) XXX_Size() int { - return m.Size() -} -func (m *MsgSubmitEthereumTxConfirmation) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSubmitEthereumTxConfirmation.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSubmitEthereumTxConfirmation proto.InternalMessageInfo - -// ContractCallTxConfirmation is a signature on behalf of a validator for a -// ContractCallTx. -type ContractCallTxConfirmation struct { - InvalidationScope []byte `protobuf:"bytes,1,opt,name=invalidation_scope,json=invalidationScope,proto3" json:"invalidation_scope,omitempty"` - InvalidationNonce uint64 `protobuf:"varint,2,opt,name=invalidation_nonce,json=invalidationNonce,proto3" json:"invalidation_nonce,omitempty"` - EthereumSigner string `protobuf:"bytes,3,opt,name=ethereum_signer,json=ethereumSigner,proto3" json:"ethereum_signer,omitempty"` - Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (m *ContractCallTxConfirmation) Reset() { *m = ContractCallTxConfirmation{} } -func (m *ContractCallTxConfirmation) String() string { return proto.CompactTextString(m) } -func (*ContractCallTxConfirmation) ProtoMessage() {} -func (*ContractCallTxConfirmation) Descriptor() ([]byte, []int) { - return fileDescriptor_be93494c8672e945, []int{7} -} -func (m *ContractCallTxConfirmation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContractCallTxConfirmation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ContractCallTxConfirmation.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 *ContractCallTxConfirmation) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContractCallTxConfirmation.Merge(m, src) -} -func (m *ContractCallTxConfirmation) XXX_Size() int { - return m.Size() -} -func (m *ContractCallTxConfirmation) XXX_DiscardUnknown() { - xxx_messageInfo_ContractCallTxConfirmation.DiscardUnknown(m) -} - -var xxx_messageInfo_ContractCallTxConfirmation proto.InternalMessageInfo - -func (m *ContractCallTxConfirmation) GetInvalidationScope() []byte { - if m != nil { - return m.InvalidationScope - } - return nil -} - -func (m *ContractCallTxConfirmation) GetInvalidationNonce() uint64 { - if m != nil { - return m.InvalidationNonce - } - return 0 -} - -func (m *ContractCallTxConfirmation) GetEthereumSigner() string { - if m != nil { - return m.EthereumSigner - } - return "" -} - -func (m *ContractCallTxConfirmation) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -// BatchTxConfirmation is a signature on behalf of a validator for a BatchTx. -type BatchTxConfirmation struct { - TokenContract string `protobuf:"bytes,1,opt,name=token_contract,json=tokenContract,proto3" json:"token_contract,omitempty"` - BatchNonce uint64 `protobuf:"varint,2,opt,name=batch_nonce,json=batchNonce,proto3" json:"batch_nonce,omitempty"` - EthereumSigner string `protobuf:"bytes,3,opt,name=ethereum_signer,json=ethereumSigner,proto3" json:"ethereum_signer,omitempty"` - Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (m *BatchTxConfirmation) Reset() { *m = BatchTxConfirmation{} } -func (m *BatchTxConfirmation) String() string { return proto.CompactTextString(m) } -func (*BatchTxConfirmation) ProtoMessage() {} -func (*BatchTxConfirmation) Descriptor() ([]byte, []int) { - return fileDescriptor_be93494c8672e945, []int{8} -} -func (m *BatchTxConfirmation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BatchTxConfirmation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BatchTxConfirmation.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 *BatchTxConfirmation) XXX_Merge(src proto.Message) { - xxx_messageInfo_BatchTxConfirmation.Merge(m, src) -} -func (m *BatchTxConfirmation) XXX_Size() int { - return m.Size() -} -func (m *BatchTxConfirmation) XXX_DiscardUnknown() { - xxx_messageInfo_BatchTxConfirmation.DiscardUnknown(m) -} - -var xxx_messageInfo_BatchTxConfirmation proto.InternalMessageInfo - -func (m *BatchTxConfirmation) GetTokenContract() string { - if m != nil { - return m.TokenContract - } - return "" -} - -func (m *BatchTxConfirmation) GetBatchNonce() uint64 { - if m != nil { - return m.BatchNonce - } - return 0 -} - -func (m *BatchTxConfirmation) GetEthereumSigner() string { - if m != nil { - return m.EthereumSigner - } - return "" -} - -func (m *BatchTxConfirmation) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -// SignerSetTxConfirmation is a signature on behalf of a validator for a -// SignerSetTx -type SignerSetTxConfirmation struct { - SignerSetNonce uint64 `protobuf:"varint,1,opt,name=signer_set_nonce,json=signerSetNonce,proto3" json:"signer_set_nonce,omitempty"` - EthereumSigner string `protobuf:"bytes,2,opt,name=ethereum_signer,json=ethereumSigner,proto3" json:"ethereum_signer,omitempty"` - Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (m *SignerSetTxConfirmation) Reset() { *m = SignerSetTxConfirmation{} } -func (m *SignerSetTxConfirmation) String() string { return proto.CompactTextString(m) } -func (*SignerSetTxConfirmation) ProtoMessage() {} -func (*SignerSetTxConfirmation) Descriptor() ([]byte, []int) { - return fileDescriptor_be93494c8672e945, []int{9} -} -func (m *SignerSetTxConfirmation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignerSetTxConfirmation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignerSetTxConfirmation.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 *SignerSetTxConfirmation) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignerSetTxConfirmation.Merge(m, src) -} -func (m *SignerSetTxConfirmation) XXX_Size() int { - return m.Size() -} -func (m *SignerSetTxConfirmation) XXX_DiscardUnknown() { - xxx_messageInfo_SignerSetTxConfirmation.DiscardUnknown(m) -} - -var xxx_messageInfo_SignerSetTxConfirmation proto.InternalMessageInfo - -func (m *SignerSetTxConfirmation) GetSignerSetNonce() uint64 { - if m != nil { - return m.SignerSetNonce - } - return 0 -} - -func (m *SignerSetTxConfirmation) GetEthereumSigner() string { - if m != nil { - return m.EthereumSigner - } - return "" -} - -func (m *SignerSetTxConfirmation) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -type MsgSubmitEthereumTxConfirmationResponse struct { -} - -func (m *MsgSubmitEthereumTxConfirmationResponse) Reset() { - *m = MsgSubmitEthereumTxConfirmationResponse{} -} -func (m *MsgSubmitEthereumTxConfirmationResponse) String() string { return proto.CompactTextString(m) } -func (*MsgSubmitEthereumTxConfirmationResponse) ProtoMessage() {} -func (*MsgSubmitEthereumTxConfirmationResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_be93494c8672e945, []int{10} -} -func (m *MsgSubmitEthereumTxConfirmationResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSubmitEthereumTxConfirmationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSubmitEthereumTxConfirmationResponse.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 *MsgSubmitEthereumTxConfirmationResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSubmitEthereumTxConfirmationResponse.Merge(m, src) -} -func (m *MsgSubmitEthereumTxConfirmationResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgSubmitEthereumTxConfirmationResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSubmitEthereumTxConfirmationResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSubmitEthereumTxConfirmationResponse proto.InternalMessageInfo - -// MsgSubmitEthereumEvent -type MsgSubmitEthereumEvent struct { - Event *types1.Any `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` - Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"` -} - -func (m *MsgSubmitEthereumEvent) Reset() { *m = MsgSubmitEthereumEvent{} } -func (m *MsgSubmitEthereumEvent) String() string { return proto.CompactTextString(m) } -func (*MsgSubmitEthereumEvent) ProtoMessage() {} -func (*MsgSubmitEthereumEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_be93494c8672e945, []int{11} -} -func (m *MsgSubmitEthereumEvent) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSubmitEthereumEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSubmitEthereumEvent.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 *MsgSubmitEthereumEvent) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSubmitEthereumEvent.Merge(m, src) -} -func (m *MsgSubmitEthereumEvent) XXX_Size() int { - return m.Size() -} -func (m *MsgSubmitEthereumEvent) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSubmitEthereumEvent.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSubmitEthereumEvent proto.InternalMessageInfo - -type MsgSubmitEthereumEventResponse struct { -} - -func (m *MsgSubmitEthereumEventResponse) Reset() { *m = MsgSubmitEthereumEventResponse{} } -func (m *MsgSubmitEthereumEventResponse) String() string { return proto.CompactTextString(m) } -func (*MsgSubmitEthereumEventResponse) ProtoMessage() {} -func (*MsgSubmitEthereumEventResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_be93494c8672e945, []int{12} -} -func (m *MsgSubmitEthereumEventResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSubmitEthereumEventResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSubmitEthereumEventResponse.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 *MsgSubmitEthereumEventResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSubmitEthereumEventResponse.Merge(m, src) -} -func (m *MsgSubmitEthereumEventResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgSubmitEthereumEventResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSubmitEthereumEventResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSubmitEthereumEventResponse proto.InternalMessageInfo - -// MsgDelegateKey allows validators to delegate their voting responsibilities -// to a given orchestrator address. This key is then used as an optional -// authentication method for attesting events from Ethereum. -type MsgDelegateKeys struct { - ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - OrchestratorAddress string `protobuf:"bytes,2,opt,name=orchestrator_address,json=orchestratorAddress,proto3" json:"orchestrator_address,omitempty"` - EthereumAddress string `protobuf:"bytes,3,opt,name=ethereum_address,json=ethereumAddress,proto3" json:"ethereum_address,omitempty"` - EthSignature []byte `protobuf:"bytes,4,opt,name=eth_signature,json=ethSignature,proto3" json:"eth_signature,omitempty"` -} - -func (m *MsgDelegateKeys) Reset() { *m = MsgDelegateKeys{} } -func (m *MsgDelegateKeys) String() string { return proto.CompactTextString(m) } -func (*MsgDelegateKeys) ProtoMessage() {} -func (*MsgDelegateKeys) Descriptor() ([]byte, []int) { - return fileDescriptor_be93494c8672e945, []int{13} -} -func (m *MsgDelegateKeys) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgDelegateKeys) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgDelegateKeys.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 *MsgDelegateKeys) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgDelegateKeys.Merge(m, src) -} -func (m *MsgDelegateKeys) XXX_Size() int { - return m.Size() -} -func (m *MsgDelegateKeys) XXX_DiscardUnknown() { - xxx_messageInfo_MsgDelegateKeys.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgDelegateKeys proto.InternalMessageInfo - -func (m *MsgDelegateKeys) GetValidatorAddress() string { - if m != nil { - return m.ValidatorAddress - } - return "" -} - -func (m *MsgDelegateKeys) GetOrchestratorAddress() string { - if m != nil { - return m.OrchestratorAddress - } - return "" -} - -func (m *MsgDelegateKeys) GetEthereumAddress() string { - if m != nil { - return m.EthereumAddress - } - return "" -} - -func (m *MsgDelegateKeys) GetEthSignature() []byte { - if m != nil { - return m.EthSignature - } - return nil -} - -type MsgDelegateKeysResponse struct { -} - -func (m *MsgDelegateKeysResponse) Reset() { *m = MsgDelegateKeysResponse{} } -func (m *MsgDelegateKeysResponse) String() string { return proto.CompactTextString(m) } -func (*MsgDelegateKeysResponse) ProtoMessage() {} -func (*MsgDelegateKeysResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_be93494c8672e945, []int{14} -} -func (m *MsgDelegateKeysResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgDelegateKeysResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgDelegateKeysResponse.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 *MsgDelegateKeysResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgDelegateKeysResponse.Merge(m, src) -} -func (m *MsgDelegateKeysResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgDelegateKeysResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgDelegateKeysResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgDelegateKeysResponse proto.InternalMessageInfo - -// DelegateKeysSignMsg defines the message structure an operator is expected to -// sign when submitting a MsgDelegateKeys message. The resulting signature -// should populate the eth_signature field. -type DelegateKeysSignMsg struct { - ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` -} - -func (m *DelegateKeysSignMsg) Reset() { *m = DelegateKeysSignMsg{} } -func (m *DelegateKeysSignMsg) String() string { return proto.CompactTextString(m) } -func (*DelegateKeysSignMsg) ProtoMessage() {} -func (*DelegateKeysSignMsg) Descriptor() ([]byte, []int) { - return fileDescriptor_be93494c8672e945, []int{15} -} -func (m *DelegateKeysSignMsg) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DelegateKeysSignMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DelegateKeysSignMsg.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 *DelegateKeysSignMsg) XXX_Merge(src proto.Message) { - xxx_messageInfo_DelegateKeysSignMsg.Merge(m, src) -} -func (m *DelegateKeysSignMsg) XXX_Size() int { - return m.Size() -} -func (m *DelegateKeysSignMsg) XXX_DiscardUnknown() { - xxx_messageInfo_DelegateKeysSignMsg.DiscardUnknown(m) -} - -var xxx_messageInfo_DelegateKeysSignMsg proto.InternalMessageInfo - -func (m *DelegateKeysSignMsg) GetValidatorAddress() string { - if m != nil { - return m.ValidatorAddress - } - return "" -} - -func (m *DelegateKeysSignMsg) GetNonce() uint64 { - if m != nil { - return m.Nonce - } - return 0 -} - -// SendToCosmosEvent is submitted when the SendToCosmosEvent is emitted by they -// gravity contract. ERC20 representation coins are minted to the cosmosreceiver -// address. -type SendToCosmosEvent struct { - EventNonce uint64 `protobuf:"varint,1,opt,name=event_nonce,json=eventNonce,proto3" json:"event_nonce,omitempty"` - TokenContract string `protobuf:"bytes,2,opt,name=token_contract,json=tokenContract,proto3" json:"token_contract,omitempty"` - Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"` - EthereumSender string `protobuf:"bytes,4,opt,name=ethereum_sender,json=ethereumSender,proto3" json:"ethereum_sender,omitempty"` - CosmosReceiver string `protobuf:"bytes,5,opt,name=cosmos_receiver,json=cosmosReceiver,proto3" json:"cosmos_receiver,omitempty"` - EthereumHeight uint64 `protobuf:"varint,6,opt,name=ethereum_height,json=ethereumHeight,proto3" json:"ethereum_height,omitempty"` -} - -func (m *SendToCosmosEvent) Reset() { *m = SendToCosmosEvent{} } -func (m *SendToCosmosEvent) String() string { return proto.CompactTextString(m) } -func (*SendToCosmosEvent) ProtoMessage() {} -func (*SendToCosmosEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_be93494c8672e945, []int{16} -} -func (m *SendToCosmosEvent) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SendToCosmosEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SendToCosmosEvent.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 *SendToCosmosEvent) XXX_Merge(src proto.Message) { - xxx_messageInfo_SendToCosmosEvent.Merge(m, src) -} -func (m *SendToCosmosEvent) XXX_Size() int { - return m.Size() -} -func (m *SendToCosmosEvent) XXX_DiscardUnknown() { - xxx_messageInfo_SendToCosmosEvent.DiscardUnknown(m) -} - -var xxx_messageInfo_SendToCosmosEvent proto.InternalMessageInfo - -func (m *SendToCosmosEvent) GetEventNonce() uint64 { - if m != nil { - return m.EventNonce - } - return 0 -} - -func (m *SendToCosmosEvent) GetTokenContract() string { - if m != nil { - return m.TokenContract - } - return "" -} - -func (m *SendToCosmosEvent) GetEthereumSender() string { - if m != nil { - return m.EthereumSender - } - return "" -} - -func (m *SendToCosmosEvent) GetCosmosReceiver() string { - if m != nil { - return m.CosmosReceiver - } - return "" -} - -func (m *SendToCosmosEvent) GetEthereumHeight() uint64 { - if m != nil { - return m.EthereumHeight - } - return 0 -} - -// BatchExecutedEvent claims that a batch of BatchTxExecutedal operations on the -// bridge contract was executed successfully on ETH -type BatchExecutedEvent struct { - TokenContract string `protobuf:"bytes,1,opt,name=token_contract,json=tokenContract,proto3" json:"token_contract,omitempty"` - EventNonce uint64 `protobuf:"varint,2,opt,name=event_nonce,json=eventNonce,proto3" json:"event_nonce,omitempty"` - EthereumHeight uint64 `protobuf:"varint,3,opt,name=ethereum_height,json=ethereumHeight,proto3" json:"ethereum_height,omitempty"` - BatchNonce uint64 `protobuf:"varint,4,opt,name=batch_nonce,json=batchNonce,proto3" json:"batch_nonce,omitempty"` -} - -func (m *BatchExecutedEvent) Reset() { *m = BatchExecutedEvent{} } -func (m *BatchExecutedEvent) String() string { return proto.CompactTextString(m) } -func (*BatchExecutedEvent) ProtoMessage() {} -func (*BatchExecutedEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_be93494c8672e945, []int{17} -} -func (m *BatchExecutedEvent) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BatchExecutedEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BatchExecutedEvent.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 *BatchExecutedEvent) XXX_Merge(src proto.Message) { - xxx_messageInfo_BatchExecutedEvent.Merge(m, src) -} -func (m *BatchExecutedEvent) XXX_Size() int { - return m.Size() -} -func (m *BatchExecutedEvent) XXX_DiscardUnknown() { - xxx_messageInfo_BatchExecutedEvent.DiscardUnknown(m) -} - -var xxx_messageInfo_BatchExecutedEvent proto.InternalMessageInfo - -func (m *BatchExecutedEvent) GetTokenContract() string { - if m != nil { - return m.TokenContract - } - return "" -} - -func (m *BatchExecutedEvent) GetEventNonce() uint64 { - if m != nil { - return m.EventNonce - } - return 0 -} - -func (m *BatchExecutedEvent) GetEthereumHeight() uint64 { - if m != nil { - return m.EthereumHeight - } - return 0 -} - -func (m *BatchExecutedEvent) GetBatchNonce() uint64 { - if m != nil { - return m.BatchNonce - } - return 0 -} - -// NOTE: bytes.HexBytes is supposed to "help" with json encoding/decoding -// investigate? -type ContractCallExecutedEvent struct { - EventNonce uint64 `protobuf:"varint,1,opt,name=event_nonce,json=eventNonce,proto3" json:"event_nonce,omitempty"` - InvalidationScope github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,2,opt,name=invalidation_scope,json=invalidationScope,proto3,casttype=github.com/cometbft/cometbft/libs/bytes.HexBytes" json:"invalidation_scope,omitempty"` - InvalidationNonce uint64 `protobuf:"varint,3,opt,name=invalidation_nonce,json=invalidationNonce,proto3" json:"invalidation_nonce,omitempty"` - EthereumHeight uint64 `protobuf:"varint,4,opt,name=ethereum_height,json=ethereumHeight,proto3" json:"ethereum_height,omitempty"` -} - -func (m *ContractCallExecutedEvent) Reset() { *m = ContractCallExecutedEvent{} } -func (m *ContractCallExecutedEvent) String() string { return proto.CompactTextString(m) } -func (*ContractCallExecutedEvent) ProtoMessage() {} -func (*ContractCallExecutedEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_be93494c8672e945, []int{18} -} -func (m *ContractCallExecutedEvent) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContractCallExecutedEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ContractCallExecutedEvent.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 *ContractCallExecutedEvent) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContractCallExecutedEvent.Merge(m, src) -} -func (m *ContractCallExecutedEvent) XXX_Size() int { - return m.Size() -} -func (m *ContractCallExecutedEvent) XXX_DiscardUnknown() { - xxx_messageInfo_ContractCallExecutedEvent.DiscardUnknown(m) -} - -var xxx_messageInfo_ContractCallExecutedEvent proto.InternalMessageInfo - -func (m *ContractCallExecutedEvent) GetEventNonce() uint64 { - if m != nil { - return m.EventNonce - } - return 0 -} - -func (m *ContractCallExecutedEvent) GetInvalidationScope() github_com_tendermint_tendermint_libs_bytes.HexBytes { - if m != nil { - return m.InvalidationScope - } - return nil -} - -func (m *ContractCallExecutedEvent) GetInvalidationNonce() uint64 { - if m != nil { - return m.InvalidationNonce - } - return 0 -} - -func (m *ContractCallExecutedEvent) GetEthereumHeight() uint64 { - if m != nil { - return m.EthereumHeight - } - return 0 -} - -// ERC20DeployedEvent is submitted when an ERC20 contract -// for a Cosmos SDK coin has been deployed on Ethereum. -type ERC20DeployedEvent struct { - EventNonce uint64 `protobuf:"varint,1,opt,name=event_nonce,json=eventNonce,proto3" json:"event_nonce,omitempty"` - CosmosDenom string `protobuf:"bytes,2,opt,name=cosmos_denom,json=cosmosDenom,proto3" json:"cosmos_denom,omitempty"` - TokenContract string `protobuf:"bytes,3,opt,name=token_contract,json=tokenContract,proto3" json:"token_contract,omitempty"` - Erc20Name string `protobuf:"bytes,4,opt,name=erc20_name,json=erc20Name,proto3" json:"erc20_name,omitempty"` - Erc20Symbol string `protobuf:"bytes,5,opt,name=erc20_symbol,json=erc20Symbol,proto3" json:"erc20_symbol,omitempty"` - Erc20Decimals uint64 `protobuf:"varint,6,opt,name=erc20_decimals,json=erc20Decimals,proto3" json:"erc20_decimals,omitempty"` - EthereumHeight uint64 `protobuf:"varint,7,opt,name=ethereum_height,json=ethereumHeight,proto3" json:"ethereum_height,omitempty"` -} - -func (m *ERC20DeployedEvent) Reset() { *m = ERC20DeployedEvent{} } -func (m *ERC20DeployedEvent) String() string { return proto.CompactTextString(m) } -func (*ERC20DeployedEvent) ProtoMessage() {} -func (*ERC20DeployedEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_be93494c8672e945, []int{19} -} -func (m *ERC20DeployedEvent) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ERC20DeployedEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ERC20DeployedEvent.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 *ERC20DeployedEvent) XXX_Merge(src proto.Message) { - xxx_messageInfo_ERC20DeployedEvent.Merge(m, src) -} -func (m *ERC20DeployedEvent) XXX_Size() int { - return m.Size() -} -func (m *ERC20DeployedEvent) XXX_DiscardUnknown() { - xxx_messageInfo_ERC20DeployedEvent.DiscardUnknown(m) -} - -var xxx_messageInfo_ERC20DeployedEvent proto.InternalMessageInfo - -func (m *ERC20DeployedEvent) GetEventNonce() uint64 { - if m != nil { - return m.EventNonce - } - return 0 -} - -func (m *ERC20DeployedEvent) GetCosmosDenom() string { - if m != nil { - return m.CosmosDenom - } - return "" -} - -func (m *ERC20DeployedEvent) GetTokenContract() string { - if m != nil { - return m.TokenContract - } - return "" -} - -func (m *ERC20DeployedEvent) GetErc20Name() string { - if m != nil { - return m.Erc20Name - } - return "" -} - -func (m *ERC20DeployedEvent) GetErc20Symbol() string { - if m != nil { - return m.Erc20Symbol - } - return "" -} - -func (m *ERC20DeployedEvent) GetErc20Decimals() uint64 { - if m != nil { - return m.Erc20Decimals - } - return 0 -} - -func (m *ERC20DeployedEvent) GetEthereumHeight() uint64 { - if m != nil { - return m.EthereumHeight - } - return 0 -} - -// This informs the Cosmos module that a validator -// set has been updated. -type SignerSetTxExecutedEvent struct { - EventNonce uint64 `protobuf:"varint,1,opt,name=event_nonce,json=eventNonce,proto3" json:"event_nonce,omitempty"` - SignerSetTxNonce uint64 `protobuf:"varint,2,opt,name=signer_set_tx_nonce,json=signerSetTxNonce,proto3" json:"signer_set_tx_nonce,omitempty"` - EthereumHeight uint64 `protobuf:"varint,3,opt,name=ethereum_height,json=ethereumHeight,proto3" json:"ethereum_height,omitempty"` - Members []*EthereumSigner `protobuf:"bytes,4,rep,name=members,proto3" json:"members,omitempty"` -} - -func (m *SignerSetTxExecutedEvent) Reset() { *m = SignerSetTxExecutedEvent{} } -func (m *SignerSetTxExecutedEvent) String() string { return proto.CompactTextString(m) } -func (*SignerSetTxExecutedEvent) ProtoMessage() {} -func (*SignerSetTxExecutedEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_be93494c8672e945, []int{20} -} -func (m *SignerSetTxExecutedEvent) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignerSetTxExecutedEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignerSetTxExecutedEvent.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 *SignerSetTxExecutedEvent) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignerSetTxExecutedEvent.Merge(m, src) -} -func (m *SignerSetTxExecutedEvent) XXX_Size() int { - return m.Size() -} -func (m *SignerSetTxExecutedEvent) XXX_DiscardUnknown() { - xxx_messageInfo_SignerSetTxExecutedEvent.DiscardUnknown(m) -} - -var xxx_messageInfo_SignerSetTxExecutedEvent proto.InternalMessageInfo - -func (m *SignerSetTxExecutedEvent) GetEventNonce() uint64 { - if m != nil { - return m.EventNonce - } - return 0 -} - -func (m *SignerSetTxExecutedEvent) GetSignerSetTxNonce() uint64 { - if m != nil { - return m.SignerSetTxNonce - } - return 0 -} - -func (m *SignerSetTxExecutedEvent) GetEthereumHeight() uint64 { - if m != nil { - return m.EthereumHeight - } - return 0 -} - -func (m *SignerSetTxExecutedEvent) GetMembers() []*EthereumSigner { - if m != nil { - return m.Members - } - return nil -} - -func init() { - proto.RegisterType((*MsgSendToEthereum)(nil), "gravity.v1migration.MsgSendToEthereum") - proto.RegisterType((*MsgSendToEthereumResponse)(nil), "gravity.v1migration.MsgSendToEthereumResponse") - proto.RegisterType((*MsgCancelSendToEthereum)(nil), "gravity.v1migration.MsgCancelSendToEthereum") - proto.RegisterType((*MsgCancelSendToEthereumResponse)(nil), "gravity.v1migration.MsgCancelSendToEthereumResponse") - proto.RegisterType((*MsgRequestBatchTx)(nil), "gravity.v1migration.MsgRequestBatchTx") - proto.RegisterType((*MsgRequestBatchTxResponse)(nil), "gravity.v1migration.MsgRequestBatchTxResponse") - proto.RegisterType((*MsgSubmitEthereumTxConfirmation)(nil), "gravity.v1migration.MsgSubmitEthereumTxConfirmation") - proto.RegisterType((*ContractCallTxConfirmation)(nil), "gravity.v1migration.ContractCallTxConfirmation") - proto.RegisterType((*BatchTxConfirmation)(nil), "gravity.v1migration.BatchTxConfirmation") - proto.RegisterType((*SignerSetTxConfirmation)(nil), "gravity.v1migration.SignerSetTxConfirmation") - proto.RegisterType((*MsgSubmitEthereumTxConfirmationResponse)(nil), "gravity.v1migration.MsgSubmitEthereumTxConfirmationResponse") - proto.RegisterType((*MsgSubmitEthereumEvent)(nil), "gravity.v1migration.MsgSubmitEthereumEvent") - proto.RegisterType((*MsgSubmitEthereumEventResponse)(nil), "gravity.v1migration.MsgSubmitEthereumEventResponse") - proto.RegisterType((*MsgDelegateKeys)(nil), "gravity.v1migration.MsgDelegateKeys") - proto.RegisterType((*MsgDelegateKeysResponse)(nil), "gravity.v1migration.MsgDelegateKeysResponse") - proto.RegisterType((*DelegateKeysSignMsg)(nil), "gravity.v1migration.DelegateKeysSignMsg") - proto.RegisterType((*SendToCosmosEvent)(nil), "gravity.v1migration.SendToCosmosEvent") - proto.RegisterType((*BatchExecutedEvent)(nil), "gravity.v1migration.BatchExecutedEvent") - proto.RegisterType((*ContractCallExecutedEvent)(nil), "gravity.v1migration.ContractCallExecutedEvent") - proto.RegisterType((*ERC20DeployedEvent)(nil), "gravity.v1migration.ERC20DeployedEvent") - proto.RegisterType((*SignerSetTxExecutedEvent)(nil), "gravity.v1migration.SignerSetTxExecutedEvent") -} - -func init() { proto.RegisterFile("gravity/v1migration/msgs.proto", fileDescriptor_be93494c8672e945) } - -var fileDescriptor_be93494c8672e945 = []byte{ - // 1306 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xcd, 0x6e, 0xdb, 0xc6, - 0x16, 0x16, 0x25, 0xd9, 0x81, 0x8f, 0xfc, 0x4b, 0x1b, 0x89, 0xac, 0x9b, 0x2b, 0x39, 0xca, 0xbd, - 0x89, 0x83, 0x44, 0x64, 0xac, 0x04, 0x68, 0x11, 0x34, 0x05, 0x2c, 0xd9, 0x41, 0x82, 0xc2, 0x59, - 0x50, 0x5e, 0x14, 0xdd, 0x08, 0x14, 0x79, 0x42, 0x31, 0x11, 0x39, 0x2a, 0x67, 0x24, 0x58, 0x40, - 0x1f, 0xa0, 0xe8, 0xaa, 0x05, 0xda, 0x7d, 0x16, 0x41, 0x9f, 0x20, 0x2f, 0x90, 0x5d, 0x90, 0x55, - 0xd0, 0x02, 0x45, 0xd1, 0x45, 0x50, 0x24, 0x9b, 0x3e, 0x43, 0x81, 0x02, 0x05, 0x67, 0x86, 0x0a, - 0x29, 0x51, 0xb1, 0x5c, 0x74, 0x65, 0xce, 0x39, 0xdf, 0xf9, 0x9d, 0x4f, 0xe7, 0x8c, 0xa1, 0xec, - 0x04, 0xe6, 0xd0, 0x65, 0x23, 0x7d, 0xb8, 0xe7, 0xb9, 0x4e, 0x60, 0x32, 0x97, 0xf8, 0xba, 0x47, - 0x1d, 0xaa, 0xf5, 0x03, 0xc2, 0x88, 0xba, 0x29, 0xf5, 0x5a, 0x4c, 0x5f, 0x2a, 0x5b, 0x84, 0x7a, - 0x84, 0xea, 0x1d, 0x93, 0xa2, 0x3e, 0xdc, 0xeb, 0x20, 0x33, 0xf7, 0x74, 0x8b, 0xb8, 0xbe, 0x30, - 0x2a, 0x6d, 0x0b, 0x7d, 0x9b, 0x9f, 0x74, 0x71, 0x90, 0xaa, 0x4b, 0x69, 0xf1, 0xa2, 0x18, 0x02, - 0xb2, 0xe5, 0x10, 0x87, 0x08, 0xd3, 0xf0, 0x4b, 0x4a, 0x2f, 0x3a, 0x84, 0x38, 0x3d, 0xd4, 0xcd, - 0xbe, 0xab, 0x9b, 0xbe, 0x4f, 0x18, 0x37, 0x8d, 0xdc, 0x6e, 0x4b, 0x2d, 0x3f, 0x75, 0x06, 0x8f, - 0x74, 0xd3, 0x97, 0xee, 0xaa, 0x3f, 0x2b, 0xb0, 0x71, 0x44, 0x9d, 0x16, 0xfa, 0xf6, 0x31, 0x39, - 0x64, 0x5d, 0x0c, 0x70, 0xe0, 0xa9, 0xe7, 0x61, 0x91, 0xa2, 0x6f, 0x63, 0x50, 0x54, 0x76, 0x94, - 0xdd, 0x25, 0x43, 0x9e, 0xd4, 0x1a, 0xa8, 0x28, 0x31, 0xed, 0x00, 0x2d, 0xb7, 0xef, 0xa2, 0xcf, - 0x8a, 0x59, 0x8e, 0xd9, 0x88, 0x34, 0x46, 0xa4, 0x50, 0x3f, 0x82, 0x45, 0xd3, 0x23, 0x03, 0x9f, - 0x15, 0x73, 0x3b, 0xca, 0x6e, 0xa1, 0xbe, 0xad, 0xc9, 0x6a, 0xc3, 0xd6, 0x68, 0xb2, 0x35, 0x5a, - 0x93, 0xb8, 0x7e, 0x23, 0xff, 0xf2, 0x4d, 0x25, 0x63, 0x48, 0xb8, 0xfa, 0x29, 0x40, 0x27, 0x70, - 0x6d, 0x07, 0xdb, 0x8f, 0x10, 0x8b, 0xf9, 0xf9, 0x8c, 0x97, 0x84, 0xc9, 0x3d, 0xc4, 0xea, 0x75, - 0xd8, 0x9e, 0x2a, 0xca, 0x40, 0xda, 0x27, 0x3e, 0x45, 0x75, 0x15, 0xb2, 0xae, 0xcd, 0x0b, 0xcb, - 0x1b, 0x59, 0xd7, 0xae, 0xee, 0xc3, 0x85, 0x23, 0xea, 0x34, 0x4d, 0xdf, 0xc2, 0xde, 0x44, 0x1f, - 0x26, 0xa0, 0xb1, 0xbe, 0x64, 0xe3, 0x7d, 0xa9, 0x5e, 0x82, 0xca, 0x0c, 0x17, 0x51, 0xd4, 0xea, - 0x3e, 0xef, 0xb3, 0x81, 0x5f, 0x0e, 0x90, 0xb2, 0x86, 0xc9, 0xac, 0xee, 0xf1, 0x89, 0xba, 0x05, - 0x0b, 0x36, 0xfa, 0xc4, 0x93, 0x6d, 0x16, 0x07, 0x1e, 0xc5, 0x75, 0xfc, 0x58, 0x14, 0x7e, 0xaa, - 0xfe, 0x87, 0x57, 0x95, 0x74, 0x31, 0xf6, 0xff, 0x83, 0xc2, 0x73, 0x68, 0x0d, 0x3a, 0x9e, 0xcb, - 0xa2, 0xe8, 0xc7, 0x27, 0x4d, 0xe2, 0x3f, 0x72, 0x03, 0x8f, 0xd3, 0x41, 0x3d, 0x86, 0x65, 0x2b, - 0x76, 0xe6, 0x51, 0x0b, 0xf5, 0x2d, 0x4d, 0xd0, 0x43, 0x8b, 0xe8, 0xa1, 0xed, 0xfb, 0xa3, 0x46, - 0xe9, 0xd5, 0xf3, 0xda, 0xf9, 0x74, 0x3f, 0x46, 0xc2, 0xcb, 0xac, 0x74, 0xef, 0xe4, 0xbf, 0x7e, - 0x5a, 0xc9, 0x54, 0x5f, 0x28, 0x50, 0x6a, 0x12, 0x9f, 0x05, 0xa6, 0xc5, 0x9a, 0x66, 0xaf, 0x37, - 0x91, 0x52, 0x0d, 0x54, 0xd7, 0x1f, 0x9a, 0x3d, 0xd7, 0xe6, 0xe7, 0x36, 0xb5, 0x48, 0x1f, 0x79, - 0x62, 0xcb, 0xc6, 0x46, 0x5c, 0xd3, 0x0a, 0x15, 0x53, 0x70, 0x9f, 0xf8, 0x16, 0xf2, 0xb8, 0xf9, - 0x24, 0xfc, 0x61, 0xa8, 0x50, 0xaf, 0xc2, 0xda, 0x98, 0xaf, 0x32, 0xc7, 0x1c, 0xcf, 0x71, 0x35, - 0x12, 0xb7, 0xb8, 0x54, 0xbd, 0x08, 0x4b, 0xa1, 0xde, 0x64, 0x83, 0x40, 0xf0, 0x6d, 0xd9, 0x78, - 0x2f, 0xa8, 0x3e, 0x53, 0x60, 0x53, 0xf6, 0x3b, 0x91, 0xfc, 0xff, 0x61, 0x95, 0x91, 0x27, 0xe8, - 0xb7, 0x2d, 0x59, 0xa0, 0xbc, 0xc7, 0x15, 0x2e, 0x8d, 0xaa, 0x56, 0x2b, 0x50, 0xe8, 0x84, 0xd6, - 0x89, 0x6c, 0x81, 0x8b, 0xfe, 0xd5, 0x34, 0xbf, 0x51, 0xe0, 0x82, 0x00, 0xb6, 0x90, 0x4d, 0xa4, - 0xba, 0x0b, 0xeb, 0xc2, 0x73, 0x9b, 0x22, 0x93, 0x89, 0x08, 0x5e, 0xaf, 0xd2, 0xc8, 0x64, 0x66, - 0x32, 0xd9, 0xd3, 0x93, 0xc9, 0x4d, 0x26, 0x73, 0x0d, 0xae, 0x9e, 0x42, 0xc7, 0x31, 0x75, 0x07, - 0x70, 0x7e, 0x0a, 0x7a, 0x38, 0x0c, 0x07, 0xc8, 0x5d, 0x58, 0xc0, 0xf0, 0xe3, 0x83, 0x4c, 0xdd, - 0x78, 0xf5, 0xbc, 0xb6, 0x92, 0xb0, 0x33, 0x84, 0xd5, 0x29, 0xcc, 0xdc, 0x81, 0x72, 0x7a, 0xd8, - 0x71, 0x62, 0x2f, 0x14, 0x58, 0x3b, 0xa2, 0xce, 0x01, 0xf6, 0xd0, 0x31, 0x19, 0x7e, 0x86, 0x23, - 0xaa, 0x5e, 0x87, 0x0d, 0xc9, 0x32, 0x12, 0xb4, 0x4d, 0xdb, 0x0e, 0x90, 0x52, 0x79, 0xed, 0xeb, - 0x63, 0xc5, 0xbe, 0x90, 0xab, 0x7b, 0xb0, 0x45, 0x02, 0xab, 0x8b, 0x94, 0x05, 0x09, 0xbc, 0x48, - 0x67, 0x33, 0xae, 0x8b, 0x4c, 0xae, 0xc1, 0xfa, 0xb8, 0xfd, 0x11, 0x5c, 0x90, 0x61, 0x7c, 0x2d, - 0x11, 0xf4, 0x32, 0xac, 0x20, 0xeb, 0xb6, 0x27, 0x19, 0xb1, 0x8c, 0xac, 0xdb, 0x1a, 0xdf, 0xc3, - 0x36, 0x9f, 0x6e, 0xf1, 0x12, 0xc6, 0xe5, 0x7d, 0x0e, 0x9b, 0x71, 0x79, 0x68, 0x73, 0x44, 0x9d, - 0xb3, 0x55, 0xb8, 0x05, 0x0b, 0x71, 0x56, 0x8b, 0x43, 0xf5, 0x59, 0x16, 0x36, 0xc4, 0x1c, 0x6c, - 0xf2, 0x99, 0x2d, 0x6e, 0xb3, 0x02, 0x05, 0x7e, 0x2f, 0x09, 0xfa, 0x01, 0x17, 0x09, 0xea, 0x4d, - 0xff, 0x9e, 0xb2, 0x69, 0xbf, 0xa7, 0x7b, 0x89, 0xb5, 0xb2, 0xd4, 0xd0, 0xc2, 0xf1, 0xff, 0xdb, - 0x9b, 0xca, 0x15, 0xc7, 0x65, 0xdd, 0x41, 0x47, 0xb3, 0x88, 0x27, 0xd7, 0xaa, 0xfc, 0x53, 0xa3, - 0xf6, 0x13, 0x9d, 0x8d, 0xfa, 0x48, 0xb5, 0x07, 0x3e, 0x1b, 0x6f, 0x99, 0x04, 0xd3, 0xc5, 0x58, - 0xcf, 0x4f, 0x30, 0x5d, 0xac, 0xbd, 0xab, 0xb0, 0x26, 0x77, 0x76, 0x80, 0x16, 0xba, 0x43, 0x0c, - 0x8a, 0x0b, 0x02, 0x28, 0xc4, 0x86, 0x94, 0x26, 0x3c, 0x76, 0xd1, 0x75, 0xba, 0xac, 0xb8, 0x28, - 0x7e, 0x64, 0x91, 0xf8, 0x3e, 0x97, 0xde, 0xc9, 0xff, 0xf1, 0xb4, 0xa2, 0x54, 0x7f, 0x54, 0x40, - 0xe5, 0x73, 0xe5, 0xf0, 0x04, 0xad, 0x01, 0x43, 0x5b, 0xf4, 0x69, 0xfe, 0xb1, 0x12, 0x6f, 0x67, - 0x76, 0xaa, 0x9d, 0x29, 0xd9, 0xe4, 0xd2, 0xb2, 0x99, 0x1c, 0x50, 0xf9, 0xc9, 0x01, 0x55, 0xfd, - 0x4b, 0x81, 0xed, 0xf8, 0x10, 0x4f, 0xe6, 0x7b, 0xea, 0xbd, 0x3a, 0xa9, 0x43, 0x3e, 0x4c, 0x78, - 0xb9, 0xf1, 0xf1, 0x9f, 0x6f, 0x2a, 0xb7, 0x63, 0x17, 0xc7, 0x78, 0xcb, 0x3d, 0xd7, 0x67, 0xf1, - 0xcf, 0x9e, 0xdb, 0xa1, 0x7a, 0x67, 0xc4, 0x90, 0x6a, 0xf7, 0xf1, 0xa4, 0x11, 0x7e, 0xcc, 0xbf, - 0x1e, 0x72, 0xf3, 0xac, 0x07, 0xd9, 0xa0, 0x7c, 0x5a, 0x83, 0xaa, 0xdf, 0x65, 0x41, 0x3d, 0x34, - 0x9a, 0xf5, 0x9b, 0x07, 0xd8, 0xef, 0x91, 0xd1, 0xdc, 0x85, 0x5f, 0x0a, 0x17, 0x2e, 0x27, 0x8e, - 0x58, 0xf3, 0x82, 0xce, 0x05, 0x21, 0x3b, 0xe0, 0xcb, 0x7e, 0xfa, 0xb2, 0x73, 0x69, 0x97, 0xfd, - 0x5f, 0x00, 0x0c, 0xac, 0xfa, 0xcd, 0xb6, 0x6f, 0x7a, 0x28, 0x69, 0xba, 0xc4, 0x25, 0x0f, 0x4d, - 0x8f, 0x07, 0x12, 0x6a, 0x3a, 0xf2, 0x3a, 0xa4, 0x27, 0xe9, 0x59, 0xe0, 0xb2, 0x16, 0x17, 0x85, - 0x81, 0x04, 0xc4, 0x46, 0xcb, 0xf5, 0xcc, 0x1e, 0x95, 0xd4, 0x5c, 0xe1, 0xd2, 0x03, 0x29, 0x4c, - 0xeb, 0xc9, 0xb9, 0xd4, 0x9e, 0xfc, 0xa4, 0x40, 0x31, 0xb6, 0x6d, 0xce, 0x48, 0x89, 0x1a, 0x6c, - 0xc6, 0xf6, 0x11, 0x3b, 0x49, 0x90, 0x78, 0x9d, 0xbe, 0xf7, 0x7b, 0x46, 0x2a, 0xdf, 0x85, 0x73, - 0x1e, 0x7a, 0x1d, 0x0c, 0x68, 0x31, 0xbf, 0x93, 0xdb, 0x2d, 0xd4, 0x2f, 0x6b, 0x29, 0x6f, 0x74, - 0xed, 0x30, 0xb1, 0xca, 0x8c, 0xc8, 0xa6, 0xfe, 0xcb, 0x02, 0xe4, 0xc2, 0x19, 0xf8, 0x18, 0x56, - 0x27, 0x9e, 0x82, 0x57, 0x52, 0xfd, 0x4c, 0xbd, 0x32, 0x4b, 0xda, 0x7c, 0xb8, 0xf1, 0x10, 0xce, - 0xa8, 0x5f, 0xc1, 0x56, 0xea, 0xe3, 0xf3, 0xc6, 0x2c, 0x4f, 0x69, 0xe8, 0xd2, 0xed, 0xb3, 0xa0, - 0x63, 0xd1, 0x1f, 0xc3, 0xea, 0xc4, 0xa3, 0x74, 0x66, 0xa5, 0x49, 0xdc, 0xec, 0x4a, 0x67, 0xbc, - 0x50, 0x33, 0xea, 0xf7, 0x0a, 0x5c, 0xfc, 0xe0, 0x03, 0x75, 0x66, 0x11, 0x1f, 0xb2, 0x2a, 0x7d, - 0xf2, 0x4f, 0xac, 0x62, 0x69, 0x8d, 0x60, 0x33, 0xed, 0xf1, 0x71, 0x7d, 0x3e, 0xb7, 0x1c, 0x5c, - 0xba, 0x75, 0x06, 0x70, 0x2c, 0xb4, 0x03, 0x6b, 0x2d, 0x64, 0x89, 0x07, 0xc6, 0xff, 0x66, 0x79, - 0x8a, 0xa3, 0x4a, 0x37, 0xe6, 0x41, 0xbd, 0x0f, 0xd4, 0xb0, 0x5e, 0xbe, 0x2d, 0x2b, 0xaf, 0xdf, - 0x96, 0x95, 0xdf, 0xdf, 0x96, 0x95, 0x6f, 0xdf, 0x95, 0x33, 0xaf, 0xdf, 0x95, 0x33, 0xbf, 0xbe, - 0x2b, 0x67, 0xbe, 0x78, 0x10, 0x1b, 0xbe, 0x7d, 0x74, 0x9c, 0xd1, 0xe3, 0x61, 0xf4, 0x2f, 0x67, - 0x4d, 0xfc, 0x47, 0xa5, 0x7b, 0xc4, 0x1e, 0xf4, 0x50, 0x1f, 0xd6, 0xf5, 0x93, 0x48, 0xa5, 0x8f, - 0x83, 0x52, 0x7d, 0xb8, 0x27, 0x96, 0x6b, 0x67, 0x91, 0xbf, 0xcb, 0x6e, 0xfd, 0x1d, 0x00, 0x00, - 0xff, 0xff, 0x95, 0x89, 0x8d, 0x4f, 0x37, 0x0f, 0x00, 0x00, -} - -func (this *SendToCosmosEvent) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*SendToCosmosEvent) - if !ok { - that2, ok := that.(SendToCosmosEvent) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.EventNonce != that1.EventNonce { - return false - } - if this.TokenContract != that1.TokenContract { - return false - } - if !this.Amount.Equal(that1.Amount) { - return false - } - if this.EthereumSender != that1.EthereumSender { - return false - } - if this.CosmosReceiver != that1.CosmosReceiver { - return false - } - if this.EthereumHeight != that1.EthereumHeight { - return false - } - return true -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type MsgClient interface { - SendToEthereum(ctx context.Context, in *MsgSendToEthereum, opts ...grpc.CallOption) (*MsgSendToEthereumResponse, error) - CancelSendToEthereum(ctx context.Context, in *MsgCancelSendToEthereum, opts ...grpc.CallOption) (*MsgCancelSendToEthereumResponse, error) - RequestBatchTx(ctx context.Context, in *MsgRequestBatchTx, opts ...grpc.CallOption) (*MsgRequestBatchTxResponse, error) - SubmitEthereumTxConfirmation(ctx context.Context, in *MsgSubmitEthereumTxConfirmation, opts ...grpc.CallOption) (*MsgSubmitEthereumTxConfirmationResponse, error) - SubmitEthereumEvent(ctx context.Context, in *MsgSubmitEthereumEvent, opts ...grpc.CallOption) (*MsgSubmitEthereumEventResponse, error) - SetDelegateKeys(ctx context.Context, in *MsgDelegateKeys, opts ...grpc.CallOption) (*MsgDelegateKeysResponse, error) -} - -type msgClient struct { - cc grpc1.ClientConn -} - -func NewMsgClient(cc grpc1.ClientConn) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) SendToEthereum(ctx context.Context, in *MsgSendToEthereum, opts ...grpc.CallOption) (*MsgSendToEthereumResponse, error) { - out := new(MsgSendToEthereumResponse) - err := c.cc.Invoke(ctx, "/gravity.v1migration.Msg/SendToEthereum", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) CancelSendToEthereum(ctx context.Context, in *MsgCancelSendToEthereum, opts ...grpc.CallOption) (*MsgCancelSendToEthereumResponse, error) { - out := new(MsgCancelSendToEthereumResponse) - err := c.cc.Invoke(ctx, "/gravity.v1migration.Msg/CancelSendToEthereum", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) RequestBatchTx(ctx context.Context, in *MsgRequestBatchTx, opts ...grpc.CallOption) (*MsgRequestBatchTxResponse, error) { - out := new(MsgRequestBatchTxResponse) - err := c.cc.Invoke(ctx, "/gravity.v1migration.Msg/RequestBatchTx", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) SubmitEthereumTxConfirmation(ctx context.Context, in *MsgSubmitEthereumTxConfirmation, opts ...grpc.CallOption) (*MsgSubmitEthereumTxConfirmationResponse, error) { - out := new(MsgSubmitEthereumTxConfirmationResponse) - err := c.cc.Invoke(ctx, "/gravity.v1migration.Msg/SubmitEthereumTxConfirmation", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) SubmitEthereumEvent(ctx context.Context, in *MsgSubmitEthereumEvent, opts ...grpc.CallOption) (*MsgSubmitEthereumEventResponse, error) { - out := new(MsgSubmitEthereumEventResponse) - err := c.cc.Invoke(ctx, "/gravity.v1migration.Msg/SubmitEthereumEvent", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) SetDelegateKeys(ctx context.Context, in *MsgDelegateKeys, opts ...grpc.CallOption) (*MsgDelegateKeysResponse, error) { - out := new(MsgDelegateKeysResponse) - err := c.cc.Invoke(ctx, "/gravity.v1migration.Msg/SetDelegateKeys", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -type MsgServer interface { - SendToEthereum(context.Context, *MsgSendToEthereum) (*MsgSendToEthereumResponse, error) - CancelSendToEthereum(context.Context, *MsgCancelSendToEthereum) (*MsgCancelSendToEthereumResponse, error) - RequestBatchTx(context.Context, *MsgRequestBatchTx) (*MsgRequestBatchTxResponse, error) - SubmitEthereumTxConfirmation(context.Context, *MsgSubmitEthereumTxConfirmation) (*MsgSubmitEthereumTxConfirmationResponse, error) - SubmitEthereumEvent(context.Context, *MsgSubmitEthereumEvent) (*MsgSubmitEthereumEventResponse, error) - SetDelegateKeys(context.Context, *MsgDelegateKeys) (*MsgDelegateKeysResponse, error) -} - -// UnimplementedMsgServer can be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (*UnimplementedMsgServer) SendToEthereum(ctx context.Context, req *MsgSendToEthereum) (*MsgSendToEthereumResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SendToEthereum not implemented") -} -func (*UnimplementedMsgServer) CancelSendToEthereum(ctx context.Context, req *MsgCancelSendToEthereum) (*MsgCancelSendToEthereumResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CancelSendToEthereum not implemented") -} -func (*UnimplementedMsgServer) RequestBatchTx(ctx context.Context, req *MsgRequestBatchTx) (*MsgRequestBatchTxResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RequestBatchTx not implemented") -} -func (*UnimplementedMsgServer) SubmitEthereumTxConfirmation(ctx context.Context, req *MsgSubmitEthereumTxConfirmation) (*MsgSubmitEthereumTxConfirmationResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SubmitEthereumTxConfirmation not implemented") -} -func (*UnimplementedMsgServer) SubmitEthereumEvent(ctx context.Context, req *MsgSubmitEthereumEvent) (*MsgSubmitEthereumEventResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SubmitEthereumEvent not implemented") -} -func (*UnimplementedMsgServer) SetDelegateKeys(ctx context.Context, req *MsgDelegateKeys) (*MsgDelegateKeysResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetDelegateKeys not implemented") -} - -func RegisterMsgServer(s grpc1.Server, srv MsgServer) { - s.RegisterService(&_Msg_serviceDesc, srv) -} - -func _Msg_SendToEthereum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSendToEthereum) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SendToEthereum(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1migration.Msg/SendToEthereum", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SendToEthereum(ctx, req.(*MsgSendToEthereum)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_CancelSendToEthereum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCancelSendToEthereum) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).CancelSendToEthereum(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1migration.Msg/CancelSendToEthereum", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).CancelSendToEthereum(ctx, req.(*MsgCancelSendToEthereum)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_RequestBatchTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgRequestBatchTx) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).RequestBatchTx(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1migration.Msg/RequestBatchTx", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RequestBatchTx(ctx, req.(*MsgRequestBatchTx)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_SubmitEthereumTxConfirmation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSubmitEthereumTxConfirmation) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SubmitEthereumTxConfirmation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1migration.Msg/SubmitEthereumTxConfirmation", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SubmitEthereumTxConfirmation(ctx, req.(*MsgSubmitEthereumTxConfirmation)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_SubmitEthereumEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSubmitEthereumEvent) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SubmitEthereumEvent(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1migration.Msg/SubmitEthereumEvent", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SubmitEthereumEvent(ctx, req.(*MsgSubmitEthereumEvent)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_SetDelegateKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgDelegateKeys) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SetDelegateKeys(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1migration.Msg/SetDelegateKeys", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SetDelegateKeys(ctx, req.(*MsgDelegateKeys)) - } - return interceptor(ctx, in, info, handler) -} - -var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "gravity.v1migration.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "SendToEthereum", - Handler: _Msg_SendToEthereum_Handler, - }, - { - MethodName: "CancelSendToEthereum", - Handler: _Msg_CancelSendToEthereum_Handler, - }, - { - MethodName: "RequestBatchTx", - Handler: _Msg_RequestBatchTx_Handler, - }, - { - MethodName: "SubmitEthereumTxConfirmation", - Handler: _Msg_SubmitEthereumTxConfirmation_Handler, - }, - { - MethodName: "SubmitEthereumEvent", - Handler: _Msg_SubmitEthereumEvent_Handler, - }, - { - MethodName: "SetDelegateKeys", - Handler: _Msg_SetDelegateKeys_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "gravity/v1migration/msgs.proto", -} - -func (m *MsgSendToEthereum) 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 *MsgSendToEthereum) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgSendToEthereum) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.BridgeFee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMsgs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - { - size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMsgs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if len(m.EthereumRecipient) > 0 { - i -= len(m.EthereumRecipient) - copy(dAtA[i:], m.EthereumRecipient) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.EthereumRecipient))) - i-- - dAtA[i] = 0x12 - } - if len(m.Sender) > 0 { - i -= len(m.Sender) - copy(dAtA[i:], m.Sender) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.Sender))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgSendToEthereumResponse) 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 *MsgSendToEthereumResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgSendToEthereumResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Id != 0 { - i = encodeVarintMsgs(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *MsgCancelSendToEthereum) 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 *MsgCancelSendToEthereum) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCancelSendToEthereum) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Sender) > 0 { - i -= len(m.Sender) - copy(dAtA[i:], m.Sender) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.Sender))) - i-- - dAtA[i] = 0x12 - } - if m.Id != 0 { - i = encodeVarintMsgs(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *MsgCancelSendToEthereumResponse) 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 *MsgCancelSendToEthereumResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCancelSendToEthereumResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgRequestBatchTx) 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 *MsgRequestBatchTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRequestBatchTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signer) > 0 { - i -= len(m.Signer) - copy(dAtA[i:], m.Signer) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.Signer))) - i-- - dAtA[i] = 0x12 - } - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgRequestBatchTxResponse) 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 *MsgRequestBatchTxResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRequestBatchTxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgSubmitEthereumTxConfirmation) 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 *MsgSubmitEthereumTxConfirmation) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgSubmitEthereumTxConfirmation) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signer) > 0 { - i -= len(m.Signer) - copy(dAtA[i:], m.Signer) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.Signer))) - i-- - dAtA[i] = 0x12 - } - if m.Confirmation != nil { - { - size, err := m.Confirmation.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMsgs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ContractCallTxConfirmation) 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 *ContractCallTxConfirmation) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ContractCallTxConfirmation) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x22 - } - if len(m.EthereumSigner) > 0 { - i -= len(m.EthereumSigner) - copy(dAtA[i:], m.EthereumSigner) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.EthereumSigner))) - i-- - dAtA[i] = 0x1a - } - if m.InvalidationNonce != 0 { - i = encodeVarintMsgs(dAtA, i, uint64(m.InvalidationNonce)) - i-- - dAtA[i] = 0x10 - } - if len(m.InvalidationScope) > 0 { - i -= len(m.InvalidationScope) - copy(dAtA[i:], m.InvalidationScope) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.InvalidationScope))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BatchTxConfirmation) 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 *BatchTxConfirmation) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BatchTxConfirmation) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x22 - } - if len(m.EthereumSigner) > 0 { - i -= len(m.EthereumSigner) - copy(dAtA[i:], m.EthereumSigner) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.EthereumSigner))) - i-- - dAtA[i] = 0x1a - } - if m.BatchNonce != 0 { - i = encodeVarintMsgs(dAtA, i, uint64(m.BatchNonce)) - i-- - dAtA[i] = 0x10 - } - if len(m.TokenContract) > 0 { - i -= len(m.TokenContract) - copy(dAtA[i:], m.TokenContract) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.TokenContract))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SignerSetTxConfirmation) 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 *SignerSetTxConfirmation) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignerSetTxConfirmation) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x1a - } - if len(m.EthereumSigner) > 0 { - i -= len(m.EthereumSigner) - copy(dAtA[i:], m.EthereumSigner) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.EthereumSigner))) - i-- - dAtA[i] = 0x12 - } - if m.SignerSetNonce != 0 { - i = encodeVarintMsgs(dAtA, i, uint64(m.SignerSetNonce)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *MsgSubmitEthereumTxConfirmationResponse) 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 *MsgSubmitEthereumTxConfirmationResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgSubmitEthereumTxConfirmationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgSubmitEthereumEvent) 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 *MsgSubmitEthereumEvent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgSubmitEthereumEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signer) > 0 { - i -= len(m.Signer) - copy(dAtA[i:], m.Signer) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.Signer))) - i-- - dAtA[i] = 0x12 - } - if m.Event != nil { - { - size, err := m.Event.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMsgs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgSubmitEthereumEventResponse) 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 *MsgSubmitEthereumEventResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgSubmitEthereumEventResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgDelegateKeys) 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 *MsgDelegateKeys) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgDelegateKeys) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.EthSignature) > 0 { - i -= len(m.EthSignature) - copy(dAtA[i:], m.EthSignature) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.EthSignature))) - i-- - dAtA[i] = 0x22 - } - if len(m.EthereumAddress) > 0 { - i -= len(m.EthereumAddress) - copy(dAtA[i:], m.EthereumAddress) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.EthereumAddress))) - i-- - dAtA[i] = 0x1a - } - if len(m.OrchestratorAddress) > 0 { - i -= len(m.OrchestratorAddress) - copy(dAtA[i:], m.OrchestratorAddress) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.OrchestratorAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.ValidatorAddress) > 0 { - i -= len(m.ValidatorAddress) - copy(dAtA[i:], m.ValidatorAddress) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.ValidatorAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgDelegateKeysResponse) 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 *MsgDelegateKeysResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgDelegateKeysResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *DelegateKeysSignMsg) 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 *DelegateKeysSignMsg) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DelegateKeysSignMsg) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Nonce != 0 { - i = encodeVarintMsgs(dAtA, i, uint64(m.Nonce)) - i-- - dAtA[i] = 0x10 - } - if len(m.ValidatorAddress) > 0 { - i -= len(m.ValidatorAddress) - copy(dAtA[i:], m.ValidatorAddress) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.ValidatorAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SendToCosmosEvent) 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 *SendToCosmosEvent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SendToCosmosEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.EthereumHeight != 0 { - i = encodeVarintMsgs(dAtA, i, uint64(m.EthereumHeight)) - i-- - dAtA[i] = 0x30 - } - if len(m.CosmosReceiver) > 0 { - i -= len(m.CosmosReceiver) - copy(dAtA[i:], m.CosmosReceiver) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.CosmosReceiver))) - i-- - dAtA[i] = 0x2a - } - if len(m.EthereumSender) > 0 { - i -= len(m.EthereumSender) - copy(dAtA[i:], m.EthereumSender) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.EthereumSender))) - i-- - dAtA[i] = 0x22 - } - { - size := m.Amount.Size() - i -= size - if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintMsgs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if len(m.TokenContract) > 0 { - i -= len(m.TokenContract) - copy(dAtA[i:], m.TokenContract) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.TokenContract))) - i-- - dAtA[i] = 0x12 - } - if m.EventNonce != 0 { - i = encodeVarintMsgs(dAtA, i, uint64(m.EventNonce)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *BatchExecutedEvent) 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 *BatchExecutedEvent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BatchExecutedEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.BatchNonce != 0 { - i = encodeVarintMsgs(dAtA, i, uint64(m.BatchNonce)) - i-- - dAtA[i] = 0x20 - } - if m.EthereumHeight != 0 { - i = encodeVarintMsgs(dAtA, i, uint64(m.EthereumHeight)) - i-- - dAtA[i] = 0x18 - } - if m.EventNonce != 0 { - i = encodeVarintMsgs(dAtA, i, uint64(m.EventNonce)) - i-- - dAtA[i] = 0x10 - } - if len(m.TokenContract) > 0 { - i -= len(m.TokenContract) - copy(dAtA[i:], m.TokenContract) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.TokenContract))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ContractCallExecutedEvent) 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 *ContractCallExecutedEvent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ContractCallExecutedEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.EthereumHeight != 0 { - i = encodeVarintMsgs(dAtA, i, uint64(m.EthereumHeight)) - i-- - dAtA[i] = 0x20 - } - if m.InvalidationNonce != 0 { - i = encodeVarintMsgs(dAtA, i, uint64(m.InvalidationNonce)) - i-- - dAtA[i] = 0x18 - } - if len(m.InvalidationScope) > 0 { - i -= len(m.InvalidationScope) - copy(dAtA[i:], m.InvalidationScope) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.InvalidationScope))) - i-- - dAtA[i] = 0x12 - } - if m.EventNonce != 0 { - i = encodeVarintMsgs(dAtA, i, uint64(m.EventNonce)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ERC20DeployedEvent) 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 *ERC20DeployedEvent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ERC20DeployedEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.EthereumHeight != 0 { - i = encodeVarintMsgs(dAtA, i, uint64(m.EthereumHeight)) - i-- - dAtA[i] = 0x38 - } - if m.Erc20Decimals != 0 { - i = encodeVarintMsgs(dAtA, i, uint64(m.Erc20Decimals)) - i-- - dAtA[i] = 0x30 - } - if len(m.Erc20Symbol) > 0 { - i -= len(m.Erc20Symbol) - copy(dAtA[i:], m.Erc20Symbol) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.Erc20Symbol))) - i-- - dAtA[i] = 0x2a - } - if len(m.Erc20Name) > 0 { - i -= len(m.Erc20Name) - copy(dAtA[i:], m.Erc20Name) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.Erc20Name))) - i-- - dAtA[i] = 0x22 - } - if len(m.TokenContract) > 0 { - i -= len(m.TokenContract) - copy(dAtA[i:], m.TokenContract) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.TokenContract))) - i-- - dAtA[i] = 0x1a - } - if len(m.CosmosDenom) > 0 { - i -= len(m.CosmosDenom) - copy(dAtA[i:], m.CosmosDenom) - i = encodeVarintMsgs(dAtA, i, uint64(len(m.CosmosDenom))) - i-- - dAtA[i] = 0x12 - } - if m.EventNonce != 0 { - i = encodeVarintMsgs(dAtA, i, uint64(m.EventNonce)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *SignerSetTxExecutedEvent) 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 *SignerSetTxExecutedEvent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignerSetTxExecutedEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Members) > 0 { - for iNdEx := len(m.Members) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Members[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMsgs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if m.EthereumHeight != 0 { - i = encodeVarintMsgs(dAtA, i, uint64(m.EthereumHeight)) - i-- - dAtA[i] = 0x18 - } - if m.SignerSetTxNonce != 0 { - i = encodeVarintMsgs(dAtA, i, uint64(m.SignerSetTxNonce)) - i-- - dAtA[i] = 0x10 - } - if m.EventNonce != 0 { - i = encodeVarintMsgs(dAtA, i, uint64(m.EventNonce)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintMsgs(dAtA []byte, offset int, v uint64) int { - offset -= sovMsgs(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *MsgSendToEthereum) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Sender) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) - } - l = len(m.EthereumRecipient) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) - } - l = m.Amount.Size() - n += 1 + l + sovMsgs(uint64(l)) - l = m.BridgeFee.Size() - n += 1 + l + sovMsgs(uint64(l)) - return n -} - -func (m *MsgSendToEthereumResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != 0 { - n += 1 + sovMsgs(uint64(m.Id)) - } - return n -} - -func (m *MsgCancelSendToEthereum) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != 0 { - n += 1 + sovMsgs(uint64(m.Id)) - } - l = len(m.Sender) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) - } - return n -} - -func (m *MsgCancelSendToEthereumResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgRequestBatchTx) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) - } - l = len(m.Signer) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) - } - return n -} - -func (m *MsgRequestBatchTxResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgSubmitEthereumTxConfirmation) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Confirmation != nil { - l = m.Confirmation.Size() - n += 1 + l + sovMsgs(uint64(l)) - } - l = len(m.Signer) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) - } - return n -} - -func (m *ContractCallTxConfirmation) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.InvalidationScope) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) - } - if m.InvalidationNonce != 0 { - n += 1 + sovMsgs(uint64(m.InvalidationNonce)) - } - l = len(m.EthereumSigner) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) - } - return n -} - -func (m *BatchTxConfirmation) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.TokenContract) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) - } - if m.BatchNonce != 0 { - n += 1 + sovMsgs(uint64(m.BatchNonce)) - } - l = len(m.EthereumSigner) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) - } - return n -} - -func (m *SignerSetTxConfirmation) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SignerSetNonce != 0 { - n += 1 + sovMsgs(uint64(m.SignerSetNonce)) - } - l = len(m.EthereumSigner) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) - } - return n -} - -func (m *MsgSubmitEthereumTxConfirmationResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgSubmitEthereumEvent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Event != nil { - l = m.Event.Size() - n += 1 + l + sovMsgs(uint64(l)) - } - l = len(m.Signer) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) - } - return n -} - -func (m *MsgSubmitEthereumEventResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgDelegateKeys) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ValidatorAddress) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) - } - l = len(m.OrchestratorAddress) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) - } - l = len(m.EthereumAddress) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) - } - l = len(m.EthSignature) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) - } - return n -} - -func (m *MsgDelegateKeysResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *DelegateKeysSignMsg) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ValidatorAddress) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) - } - if m.Nonce != 0 { - n += 1 + sovMsgs(uint64(m.Nonce)) - } - return n -} - -func (m *SendToCosmosEvent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.EventNonce != 0 { - n += 1 + sovMsgs(uint64(m.EventNonce)) - } - l = len(m.TokenContract) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) - } - l = m.Amount.Size() - n += 1 + l + sovMsgs(uint64(l)) - l = len(m.EthereumSender) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) - } - l = len(m.CosmosReceiver) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) - } - if m.EthereumHeight != 0 { - n += 1 + sovMsgs(uint64(m.EthereumHeight)) - } - return n -} - -func (m *BatchExecutedEvent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.TokenContract) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) - } - if m.EventNonce != 0 { - n += 1 + sovMsgs(uint64(m.EventNonce)) - } - if m.EthereumHeight != 0 { - n += 1 + sovMsgs(uint64(m.EthereumHeight)) - } - if m.BatchNonce != 0 { - n += 1 + sovMsgs(uint64(m.BatchNonce)) - } - return n -} - -func (m *ContractCallExecutedEvent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.EventNonce != 0 { - n += 1 + sovMsgs(uint64(m.EventNonce)) - } - l = len(m.InvalidationScope) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) - } - if m.InvalidationNonce != 0 { - n += 1 + sovMsgs(uint64(m.InvalidationNonce)) - } - if m.EthereumHeight != 0 { - n += 1 + sovMsgs(uint64(m.EthereumHeight)) - } - return n -} - -func (m *ERC20DeployedEvent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.EventNonce != 0 { - n += 1 + sovMsgs(uint64(m.EventNonce)) - } - l = len(m.CosmosDenom) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) - } - l = len(m.TokenContract) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) - } - l = len(m.Erc20Name) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) - } - l = len(m.Erc20Symbol) - if l > 0 { - n += 1 + l + sovMsgs(uint64(l)) - } - if m.Erc20Decimals != 0 { - n += 1 + sovMsgs(uint64(m.Erc20Decimals)) - } - if m.EthereumHeight != 0 { - n += 1 + sovMsgs(uint64(m.EthereumHeight)) - } - return n -} - -func (m *SignerSetTxExecutedEvent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.EventNonce != 0 { - n += 1 + sovMsgs(uint64(m.EventNonce)) - } - if m.SignerSetTxNonce != 0 { - n += 1 + sovMsgs(uint64(m.SignerSetTxNonce)) - } - if m.EthereumHeight != 0 { - n += 1 + sovMsgs(uint64(m.EthereumHeight)) - } - if len(m.Members) > 0 { - for _, e := range m.Members { - l = e.Size() - n += 1 + l + sovMsgs(uint64(l)) - } - } - return n -} - -func sovMsgs(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozMsgs(x uint64) (n int) { - return sovMsgs(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MsgSendToEthereum) 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 ErrIntOverflowMsgs - } - 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: MsgSendToEthereum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSendToEthereum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - 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 ErrInvalidLengthMsgs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EthereumRecipient", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - 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 ErrInvalidLengthMsgs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EthereumRecipient = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMsgs - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BridgeFee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMsgs - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.BridgeFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMsgs(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgSendToEthereumResponse) 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 ErrIntOverflowMsgs - } - 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: MsgSendToEthereumResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSendToEthereumResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - m.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipMsgs(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgCancelSendToEthereum) 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 ErrIntOverflowMsgs - } - 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: MsgCancelSendToEthereum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCancelSendToEthereum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - m.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - 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 ErrInvalidLengthMsgs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMsgs(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgCancelSendToEthereumResponse) 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 ErrIntOverflowMsgs - } - 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: MsgCancelSendToEthereumResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCancelSendToEthereumResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipMsgs(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgRequestBatchTx) 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 ErrIntOverflowMsgs - } - 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: MsgRequestBatchTx: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRequestBatchTx: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - 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 ErrInvalidLengthMsgs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - 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 ErrInvalidLengthMsgs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMsgs(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgRequestBatchTxResponse) 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 ErrIntOverflowMsgs - } - 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: MsgRequestBatchTxResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRequestBatchTxResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipMsgs(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgSubmitEthereumTxConfirmation) 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 ErrIntOverflowMsgs - } - 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: MsgSubmitEthereumTxConfirmation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSubmitEthereumTxConfirmation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Confirmation", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMsgs - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Confirmation == nil { - m.Confirmation = &types1.Any{} - } - if err := m.Confirmation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - 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 ErrInvalidLengthMsgs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMsgs(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ContractCallTxConfirmation) 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 ErrIntOverflowMsgs - } - 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: ContractCallTxConfirmation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ContractCallTxConfirmation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InvalidationScope", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMsgs - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.InvalidationScope = append(m.InvalidationScope[:0], dAtA[iNdEx:postIndex]...) - if m.InvalidationScope == nil { - m.InvalidationScope = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InvalidationNonce", wireType) - } - m.InvalidationNonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.InvalidationNonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EthereumSigner", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - 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 ErrInvalidLengthMsgs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EthereumSigner = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMsgs - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMsgs(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BatchTxConfirmation) 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 ErrIntOverflowMsgs - } - 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: BatchTxConfirmation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BatchTxConfirmation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenContract", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - 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 ErrInvalidLengthMsgs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TokenContract = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchNonce", wireType) - } - m.BatchNonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BatchNonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EthereumSigner", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - 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 ErrInvalidLengthMsgs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EthereumSigner = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMsgs - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMsgs(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignerSetTxConfirmation) 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 ErrIntOverflowMsgs - } - 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: SignerSetTxConfirmation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignerSetTxConfirmation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SignerSetNonce", wireType) - } - m.SignerSetNonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SignerSetNonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EthereumSigner", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - 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 ErrInvalidLengthMsgs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EthereumSigner = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMsgs - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMsgs(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgSubmitEthereumTxConfirmationResponse) 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 ErrIntOverflowMsgs - } - 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: MsgSubmitEthereumTxConfirmationResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSubmitEthereumTxConfirmationResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipMsgs(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgSubmitEthereumEvent) 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 ErrIntOverflowMsgs - } - 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: MsgSubmitEthereumEvent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSubmitEthereumEvent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Event", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMsgs - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Event == nil { - m.Event = &types1.Any{} - } - if err := m.Event.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - 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 ErrInvalidLengthMsgs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMsgs(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgSubmitEthereumEventResponse) 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 ErrIntOverflowMsgs - } - 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: MsgSubmitEthereumEventResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSubmitEthereumEventResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipMsgs(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgDelegateKeys) 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 ErrIntOverflowMsgs - } - 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: MsgDelegateKeys: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDelegateKeys: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - 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 ErrInvalidLengthMsgs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OrchestratorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - 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 ErrInvalidLengthMsgs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OrchestratorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EthereumAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - 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 ErrInvalidLengthMsgs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EthereumAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EthSignature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMsgs - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EthSignature = append(m.EthSignature[:0], dAtA[iNdEx:postIndex]...) - if m.EthSignature == nil { - m.EthSignature = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMsgs(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgDelegateKeysResponse) 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 ErrIntOverflowMsgs - } - 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: MsgDelegateKeysResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDelegateKeysResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipMsgs(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DelegateKeysSignMsg) 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 ErrIntOverflowMsgs - } - 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: DelegateKeysSignMsg: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DelegateKeysSignMsg: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - 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 ErrInvalidLengthMsgs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - m.Nonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Nonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipMsgs(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SendToCosmosEvent) 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 ErrIntOverflowMsgs - } - 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: SendToCosmosEvent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SendToCosmosEvent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EventNonce", wireType) - } - m.EventNonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EventNonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenContract", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - 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 ErrInvalidLengthMsgs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TokenContract = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - 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 ErrInvalidLengthMsgs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EthereumSender", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - 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 ErrInvalidLengthMsgs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EthereumSender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CosmosReceiver", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - 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 ErrInvalidLengthMsgs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CosmosReceiver = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EthereumHeight", wireType) - } - m.EthereumHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EthereumHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipMsgs(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BatchExecutedEvent) 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 ErrIntOverflowMsgs - } - 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: BatchExecutedEvent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BatchExecutedEvent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenContract", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - 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 ErrInvalidLengthMsgs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TokenContract = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EventNonce", wireType) - } - m.EventNonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EventNonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EthereumHeight", wireType) - } - m.EthereumHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EthereumHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchNonce", wireType) - } - m.BatchNonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BatchNonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipMsgs(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ContractCallExecutedEvent) 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 ErrIntOverflowMsgs - } - 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: ContractCallExecutedEvent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ContractCallExecutedEvent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EventNonce", wireType) - } - m.EventNonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EventNonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InvalidationScope", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMsgs - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.InvalidationScope = append(m.InvalidationScope[:0], dAtA[iNdEx:postIndex]...) - if m.InvalidationScope == nil { - m.InvalidationScope = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InvalidationNonce", wireType) - } - m.InvalidationNonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.InvalidationNonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EthereumHeight", wireType) - } - m.EthereumHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EthereumHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipMsgs(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ERC20DeployedEvent) 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 ErrIntOverflowMsgs - } - 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: ERC20DeployedEvent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ERC20DeployedEvent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EventNonce", wireType) - } - m.EventNonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EventNonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CosmosDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - 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 ErrInvalidLengthMsgs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CosmosDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenContract", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - 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 ErrInvalidLengthMsgs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TokenContract = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Erc20Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - 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 ErrInvalidLengthMsgs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Erc20Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Erc20Symbol", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - 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 ErrInvalidLengthMsgs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Erc20Symbol = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Erc20Decimals", wireType) - } - m.Erc20Decimals = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Erc20Decimals |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EthereumHeight", wireType) - } - m.EthereumHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EthereumHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipMsgs(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignerSetTxExecutedEvent) 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 ErrIntOverflowMsgs - } - 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: SignerSetTxExecutedEvent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignerSetTxExecutedEvent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EventNonce", wireType) - } - m.EventNonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EventNonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SignerSetTxNonce", wireType) - } - m.SignerSetTxNonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SignerSetTxNonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EthereumHeight", wireType) - } - m.EthereumHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EthereumHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Members", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMsgs - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMsgs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Members = append(m.Members, &EthereumSigner{}) - if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMsgs(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMsgs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMsgs(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, ErrIntOverflowMsgs - } - 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, ErrIntOverflowMsgs - } - 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, ErrIntOverflowMsgs - } - 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, ErrInvalidLengthMsgs - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupMsgs - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthMsgs - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthMsgs = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMsgs = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupMsgs = fmt.Errorf("proto: unexpected end of group") -) diff --git a/module/x/gravity/migrations/v1/types/outgoing_tx.go b/module/x/gravity/migrations/v1/types/outgoing_tx.go deleted file mode 100644 index b9fac385c..000000000 --- a/module/x/gravity/migrations/v1/types/outgoing_tx.go +++ /dev/null @@ -1,220 +0,0 @@ -package types - -import ( - "math/big" - "strings" - - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/ethereum/go-ethereum/accounts/abi" - gethcommon "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" -) - -var ( - _ OutgoingTx = &SignerSetTx{} - _ OutgoingTx = &BatchTx{} - _ OutgoingTx = &ContractCallTx{} -) - -const ( - _ = iota - SignerSetTxPrefixByte - BatchTxPrefixByte - ContractCallTxPrefixByte -) - -type ABIEncodedValsetArgs struct { - Validators []gethcommon.Address `abi:"validators"` - Powers []*big.Int `abi:"powers"` - Nonce *big.Int `abi:"valsetNonce"` - RewardAmount *big.Int `abi:"rewardAmount"` - RewardToken gethcommon.Address `abi:"rewardToken"` -} - -/////////////////// -// GetStoreIndex // -/////////////////// - -// TODO: do we need a prefix byte for the different types? -func (sstx *SignerSetTx) GetStoreIndex() []byte { - return MakeSignerSetTxKey(sstx.Nonce) -} - -func (btx *BatchTx) GetStoreIndex() []byte { - return MakeBatchTxKey(gethcommon.HexToAddress(btx.TokenContract), btx.BatchNonce) -} - -func (cctx *ContractCallTx) GetStoreIndex() []byte { - return MakeContractCallTxKey(cctx.InvalidationScope, cctx.InvalidationNonce) -} - -/////////////////// -// GetCheckpoint // -/////////////////// - -func (sstx *SignerSetTx) GetCosmosHeight() uint64 { - return sstx.Height -} - -func (btx *BatchTx) GetCosmosHeight() uint64 { - return btx.Height -} - -func (cctx *ContractCallTx) GetCosmosHeight() uint64 { - return cctx.Height -} - -/////////////////// -// GetCheckpoint // -/////////////////// - -// GetCheckpoint returns the checkpoint -func (u SignerSetTx) GetCheckpoint(gravityID []byte) []byte { - - // the contract argument is not a arbitrary length array but a fixed length 32 byte - // array, therefore we have to utf8 encode the string (the default in this case) and - // then copy the variable length encoded data into a fixed length array. This function - // will panic if gravityId is too long to fit in 32 bytes - gravityIDFixed, err := byteArrayToFixByteArray(gravityID) - if err != nil { - panic(err) - } - - checkpointBytes := []uint8("checkpoint") - var checkpoint [32]uint8 - copy(checkpoint[:], checkpointBytes[:]) - - u.Signers.Sort() - - memberAddresses := make([]gethcommon.Address, len(u.Signers)) - convertedPowers := make([]*big.Int, len(u.Signers)) - for i, m := range u.Signers { - memberAddresses[i] = gethcommon.HexToAddress(m.EthereumAddress) - convertedPowers[i] = big.NewInt(int64(m.Power)) - } - - // the word 'checkpoint' needs to be the same as the 'name' above in the checkpointAbiJson - // but other than that it's a constant that has no impact on the output. This is because - // it gets encoded as a function name which we must then discard. - args := []interface{}{ - gravityIDFixed, - checkpoint, - big.NewInt(int64(u.Nonce)), - memberAddresses, - convertedPowers, - big.NewInt(0), - gethcommon.HexToAddress("0x0000000000000000000000000000000000000000"), - } - - return packCall(ValsetCheckpointABIJSON, "checkpoint", args) -} - -// GetCheckpoint gets the checkpoint signature from the given outgoing tx batch -func (b BatchTx) GetCheckpoint(gravityID []byte) []byte { - - // the contract argument is not a arbitrary length array but a fixed length 32 byte - // array, therefore we have to utf8 encode the string (the default in this case) and - // then copy the variable length encoded data into a fixed length array. This function - // will panic if gravityId is too long to fit in 32 bytes - gravityIDFixed, err := byteArrayToFixByteArray(gravityID) - if err != nil { - panic(err) - } - - // Create the methodName argument which salts the signature - methodNameBytes := []uint8("transactionBatch") - var batchMethodName [32]uint8 - copy(batchMethodName[:], methodNameBytes[:]) - - // Run through the elements of the batch and serialize them - txAmounts := make([]*big.Int, len(b.Transactions)) - txDestinations := make([]gethcommon.Address, len(b.Transactions)) - txFees := make([]*big.Int, len(b.Transactions)) - for i, tx := range b.Transactions { - txAmounts[i] = tx.Erc20Token.Amount.BigInt() - txDestinations[i] = gethcommon.HexToAddress(tx.EthereumRecipient) - txFees[i] = tx.Erc20Fee.Amount.BigInt() - } - - // the methodName needs to be the same as the 'name' above in the checkpointAbiJson - // but other than that it's a constant that has no impact on the output. This is because - // it gets encoded as a function name which we must then discard. - args := []interface{}{ - gravityIDFixed, - batchMethodName, - txAmounts, - txDestinations, - txFees, - big.NewInt(int64(b.BatchNonce)), - gethcommon.HexToAddress(b.TokenContract), - big.NewInt(int64(b.Timeout)), - } - - return packCall(OutgoingBatchTxCheckpointABIJSON, "submitBatch", args) -} - -// GetCheckpoint gets the checkpoint signature from the given outgoing tx batch -func (c ContractCallTx) GetCheckpoint(gravityID []byte) []byte { - // Create the methodName argument which salts the signature - methodNameBytes := []uint8("logicCall") - var logicCallMethodName [32]uint8 - copy(logicCallMethodName[:], methodNameBytes[:]) - - // the contract argument is not an arbitrary length array but a fixed length 32 byte - // array, therefore we have to utf8 encode the string (the default in this case) and - // then copy the variable length encoded data into a fixed length array. This function - // will panic if gravityId is too long to fit in 32 bytes - gravityIDFixed, err := byteArrayToFixByteArray(gravityID) - if err != nil { - panic(err) - } - - // Run through the elements of the logic call and serialize them - transferAmounts := make([]*big.Int, len(c.Tokens)) - transferTokenContracts := make([]gethcommon.Address, len(c.Tokens)) - feeAmounts := make([]*big.Int, len(c.Fees)) - feeTokenContracts := make([]gethcommon.Address, len(c.Fees)) - for i, coin := range c.Tokens { - transferAmounts[i] = coin.Amount.BigInt() - transferTokenContracts[i] = gethcommon.HexToAddress(coin.Contract) - } - for i, coin := range c.Fees { - feeAmounts[i] = coin.Amount.BigInt() - feeTokenContracts[i] = gethcommon.HexToAddress(coin.Contract) - } - payload := make([]byte, len(c.Payload)) - copy(payload, c.Payload) - var invalidationId [32]byte - copy(invalidationId[:], c.InvalidationScope[:]) - - // the methodName needs to be the same as the 'name' above in the checkpointAbiJson - // but other than that it's a constant that has no impact on the output. This is because - // it gets encoded as a function name which we must then discard. - args := []interface{}{ - gravityIDFixed, - logicCallMethodName, - transferAmounts, - transferTokenContracts, - feeAmounts, - feeTokenContracts, - gethcommon.HexToAddress(c.Address), - payload, - big.NewInt(int64(c.Timeout)), - invalidationId, - big.NewInt(int64(c.InvalidationNonce)), - } - - return packCall(OutgoingLogicCallABIJSON, "checkpoint", args) -} - -func packCall(abiString, method string, args []interface{}) []byte { - encodedCall, err := abi.JSON(strings.NewReader(abiString)) - if err != nil { - panic(sdkerrors.Wrap(err, "bad ABI definition in code")) - } - abiEncodedCall, err := encodedCall.Pack(method, args...) - if err != nil { - panic(sdkerrors.Wrap(err, "packing checkpoint")) - } - return crypto.Keccak256Hash(abiEncodedCall[4:]).Bytes() -} diff --git a/module/x/gravity/migrations/v1/types/query.pb.go b/module/x/gravity/migrations/v1/types/query.pb.go deleted file mode 100644 index a5a374641..000000000 --- a/module/x/gravity/migrations/v1/types/query.pb.go +++ /dev/null @@ -1,10342 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: gravity/v1migration/query.proto - -package types - -import ( - context "context" - fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - types "github.com/cosmos/cosmos-sdk/types" - query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// 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 - -// rpc Params -type ParamsRequest struct { -} - -func (m *ParamsRequest) Reset() { *m = ParamsRequest{} } -func (m *ParamsRequest) String() string { return proto.CompactTextString(m) } -func (*ParamsRequest) ProtoMessage() {} -func (*ParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{0} -} -func (m *ParamsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ParamsRequest.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 *ParamsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ParamsRequest.Merge(m, src) -} -func (m *ParamsRequest) XXX_Size() int { - return m.Size() -} -func (m *ParamsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ParamsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ParamsRequest proto.InternalMessageInfo - -type ParamsResponse struct { - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` -} - -func (m *ParamsResponse) Reset() { *m = ParamsResponse{} } -func (m *ParamsResponse) String() string { return proto.CompactTextString(m) } -func (*ParamsResponse) ProtoMessage() {} -func (*ParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{1} -} -func (m *ParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ParamsResponse.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 *ParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ParamsResponse.Merge(m, src) -} -func (m *ParamsResponse) XXX_Size() int { - return m.Size() -} -func (m *ParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ParamsResponse proto.InternalMessageInfo - -func (m *ParamsResponse) GetParams() Params { - if m != nil { - return m.Params - } - return Params{} -} - -// rpc SignerSetTx -type SignerSetTxRequest struct { - SignerSetNonce uint64 `protobuf:"varint,1,opt,name=signer_set_nonce,json=signerSetNonce,proto3" json:"signer_set_nonce,omitempty"` -} - -func (m *SignerSetTxRequest) Reset() { *m = SignerSetTxRequest{} } -func (m *SignerSetTxRequest) String() string { return proto.CompactTextString(m) } -func (*SignerSetTxRequest) ProtoMessage() {} -func (*SignerSetTxRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{2} -} -func (m *SignerSetTxRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignerSetTxRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignerSetTxRequest.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 *SignerSetTxRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignerSetTxRequest.Merge(m, src) -} -func (m *SignerSetTxRequest) XXX_Size() int { - return m.Size() -} -func (m *SignerSetTxRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SignerSetTxRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SignerSetTxRequest proto.InternalMessageInfo - -func (m *SignerSetTxRequest) GetSignerSetNonce() uint64 { - if m != nil { - return m.SignerSetNonce - } - return 0 -} - -type LatestSignerSetTxRequest struct { -} - -func (m *LatestSignerSetTxRequest) Reset() { *m = LatestSignerSetTxRequest{} } -func (m *LatestSignerSetTxRequest) String() string { return proto.CompactTextString(m) } -func (*LatestSignerSetTxRequest) ProtoMessage() {} -func (*LatestSignerSetTxRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{3} -} -func (m *LatestSignerSetTxRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LatestSignerSetTxRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LatestSignerSetTxRequest.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 *LatestSignerSetTxRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LatestSignerSetTxRequest.Merge(m, src) -} -func (m *LatestSignerSetTxRequest) XXX_Size() int { - return m.Size() -} -func (m *LatestSignerSetTxRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LatestSignerSetTxRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_LatestSignerSetTxRequest proto.InternalMessageInfo - -type SignerSetTxResponse struct { - SignerSet *SignerSetTx `protobuf:"bytes,1,opt,name=signer_set,json=signerSet,proto3" json:"signer_set,omitempty"` -} - -func (m *SignerSetTxResponse) Reset() { *m = SignerSetTxResponse{} } -func (m *SignerSetTxResponse) String() string { return proto.CompactTextString(m) } -func (*SignerSetTxResponse) ProtoMessage() {} -func (*SignerSetTxResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{4} -} -func (m *SignerSetTxResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignerSetTxResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignerSetTxResponse.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 *SignerSetTxResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignerSetTxResponse.Merge(m, src) -} -func (m *SignerSetTxResponse) XXX_Size() int { - return m.Size() -} -func (m *SignerSetTxResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SignerSetTxResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_SignerSetTxResponse proto.InternalMessageInfo - -func (m *SignerSetTxResponse) GetSignerSet() *SignerSetTx { - if m != nil { - return m.SignerSet - } - return nil -} - -// rpc BatchTx -type BatchTxRequest struct { - TokenContract string `protobuf:"bytes,1,opt,name=token_contract,json=tokenContract,proto3" json:"token_contract,omitempty"` - BatchNonce uint64 `protobuf:"varint,2,opt,name=batch_nonce,json=batchNonce,proto3" json:"batch_nonce,omitempty"` -} - -func (m *BatchTxRequest) Reset() { *m = BatchTxRequest{} } -func (m *BatchTxRequest) String() string { return proto.CompactTextString(m) } -func (*BatchTxRequest) ProtoMessage() {} -func (*BatchTxRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{5} -} -func (m *BatchTxRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BatchTxRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BatchTxRequest.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 *BatchTxRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BatchTxRequest.Merge(m, src) -} -func (m *BatchTxRequest) XXX_Size() int { - return m.Size() -} -func (m *BatchTxRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BatchTxRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_BatchTxRequest proto.InternalMessageInfo - -func (m *BatchTxRequest) GetTokenContract() string { - if m != nil { - return m.TokenContract - } - return "" -} - -func (m *BatchTxRequest) GetBatchNonce() uint64 { - if m != nil { - return m.BatchNonce - } - return 0 -} - -type BatchTxResponse struct { - Batch *BatchTx `protobuf:"bytes,1,opt,name=batch,proto3" json:"batch,omitempty"` -} - -func (m *BatchTxResponse) Reset() { *m = BatchTxResponse{} } -func (m *BatchTxResponse) String() string { return proto.CompactTextString(m) } -func (*BatchTxResponse) ProtoMessage() {} -func (*BatchTxResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{6} -} -func (m *BatchTxResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BatchTxResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BatchTxResponse.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 *BatchTxResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BatchTxResponse.Merge(m, src) -} -func (m *BatchTxResponse) XXX_Size() int { - return m.Size() -} -func (m *BatchTxResponse) XXX_DiscardUnknown() { - xxx_messageInfo_BatchTxResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_BatchTxResponse proto.InternalMessageInfo - -func (m *BatchTxResponse) GetBatch() *BatchTx { - if m != nil { - return m.Batch - } - return nil -} - -// rpc ContractCallTx -type ContractCallTxRequest struct { - InvalidationScope []byte `protobuf:"bytes,1,opt,name=invalidation_scope,json=invalidationScope,proto3" json:"invalidation_scope,omitempty"` - InvalidationNonce uint64 `protobuf:"varint,2,opt,name=invalidation_nonce,json=invalidationNonce,proto3" json:"invalidation_nonce,omitempty"` -} - -func (m *ContractCallTxRequest) Reset() { *m = ContractCallTxRequest{} } -func (m *ContractCallTxRequest) String() string { return proto.CompactTextString(m) } -func (*ContractCallTxRequest) ProtoMessage() {} -func (*ContractCallTxRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{7} -} -func (m *ContractCallTxRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContractCallTxRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ContractCallTxRequest.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 *ContractCallTxRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContractCallTxRequest.Merge(m, src) -} -func (m *ContractCallTxRequest) XXX_Size() int { - return m.Size() -} -func (m *ContractCallTxRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ContractCallTxRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ContractCallTxRequest proto.InternalMessageInfo - -func (m *ContractCallTxRequest) GetInvalidationScope() []byte { - if m != nil { - return m.InvalidationScope - } - return nil -} - -func (m *ContractCallTxRequest) GetInvalidationNonce() uint64 { - if m != nil { - return m.InvalidationNonce - } - return 0 -} - -type ContractCallTxResponse struct { - LogicCall *ContractCallTx `protobuf:"bytes,1,opt,name=logic_call,json=logicCall,proto3" json:"logic_call,omitempty"` -} - -func (m *ContractCallTxResponse) Reset() { *m = ContractCallTxResponse{} } -func (m *ContractCallTxResponse) String() string { return proto.CompactTextString(m) } -func (*ContractCallTxResponse) ProtoMessage() {} -func (*ContractCallTxResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{8} -} -func (m *ContractCallTxResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContractCallTxResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ContractCallTxResponse.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 *ContractCallTxResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContractCallTxResponse.Merge(m, src) -} -func (m *ContractCallTxResponse) XXX_Size() int { - return m.Size() -} -func (m *ContractCallTxResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ContractCallTxResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ContractCallTxResponse proto.InternalMessageInfo - -func (m *ContractCallTxResponse) GetLogicCall() *ContractCallTx { - if m != nil { - return m.LogicCall - } - return nil -} - -// rpc SignerSetTxConfirmations -type SignerSetTxConfirmationsRequest struct { - SignerSetNonce uint64 `protobuf:"varint,1,opt,name=signer_set_nonce,json=signerSetNonce,proto3" json:"signer_set_nonce,omitempty"` -} - -func (m *SignerSetTxConfirmationsRequest) Reset() { *m = SignerSetTxConfirmationsRequest{} } -func (m *SignerSetTxConfirmationsRequest) String() string { return proto.CompactTextString(m) } -func (*SignerSetTxConfirmationsRequest) ProtoMessage() {} -func (*SignerSetTxConfirmationsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{9} -} -func (m *SignerSetTxConfirmationsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignerSetTxConfirmationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignerSetTxConfirmationsRequest.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 *SignerSetTxConfirmationsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignerSetTxConfirmationsRequest.Merge(m, src) -} -func (m *SignerSetTxConfirmationsRequest) XXX_Size() int { - return m.Size() -} -func (m *SignerSetTxConfirmationsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SignerSetTxConfirmationsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SignerSetTxConfirmationsRequest proto.InternalMessageInfo - -func (m *SignerSetTxConfirmationsRequest) GetSignerSetNonce() uint64 { - if m != nil { - return m.SignerSetNonce - } - return 0 -} - -type SignerSetTxConfirmationsResponse struct { - Signatures []*SignerSetTxConfirmation `protobuf:"bytes,1,rep,name=signatures,proto3" json:"signatures,omitempty"` -} - -func (m *SignerSetTxConfirmationsResponse) Reset() { *m = SignerSetTxConfirmationsResponse{} } -func (m *SignerSetTxConfirmationsResponse) String() string { return proto.CompactTextString(m) } -func (*SignerSetTxConfirmationsResponse) ProtoMessage() {} -func (*SignerSetTxConfirmationsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{10} -} -func (m *SignerSetTxConfirmationsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignerSetTxConfirmationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignerSetTxConfirmationsResponse.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 *SignerSetTxConfirmationsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignerSetTxConfirmationsResponse.Merge(m, src) -} -func (m *SignerSetTxConfirmationsResponse) XXX_Size() int { - return m.Size() -} -func (m *SignerSetTxConfirmationsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SignerSetTxConfirmationsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_SignerSetTxConfirmationsResponse proto.InternalMessageInfo - -func (m *SignerSetTxConfirmationsResponse) GetSignatures() []*SignerSetTxConfirmation { - if m != nil { - return m.Signatures - } - return nil -} - -// rpc SignerSetTxs -type SignerSetTxsRequest struct { - Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *SignerSetTxsRequest) Reset() { *m = SignerSetTxsRequest{} } -func (m *SignerSetTxsRequest) String() string { return proto.CompactTextString(m) } -func (*SignerSetTxsRequest) ProtoMessage() {} -func (*SignerSetTxsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{11} -} -func (m *SignerSetTxsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignerSetTxsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignerSetTxsRequest.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 *SignerSetTxsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignerSetTxsRequest.Merge(m, src) -} -func (m *SignerSetTxsRequest) XXX_Size() int { - return m.Size() -} -func (m *SignerSetTxsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SignerSetTxsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SignerSetTxsRequest proto.InternalMessageInfo - -func (m *SignerSetTxsRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -type SignerSetTxsResponse struct { - SignerSets []*SignerSetTx `protobuf:"bytes,1,rep,name=signer_sets,json=signerSets,proto3" json:"signer_sets,omitempty"` - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *SignerSetTxsResponse) Reset() { *m = SignerSetTxsResponse{} } -func (m *SignerSetTxsResponse) String() string { return proto.CompactTextString(m) } -func (*SignerSetTxsResponse) ProtoMessage() {} -func (*SignerSetTxsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{12} -} -func (m *SignerSetTxsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignerSetTxsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignerSetTxsResponse.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 *SignerSetTxsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignerSetTxsResponse.Merge(m, src) -} -func (m *SignerSetTxsResponse) XXX_Size() int { - return m.Size() -} -func (m *SignerSetTxsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SignerSetTxsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_SignerSetTxsResponse proto.InternalMessageInfo - -func (m *SignerSetTxsResponse) GetSignerSets() []*SignerSetTx { - if m != nil { - return m.SignerSets - } - return nil -} - -func (m *SignerSetTxsResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -// rpc BatchTxs -type BatchTxsRequest struct { - Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *BatchTxsRequest) Reset() { *m = BatchTxsRequest{} } -func (m *BatchTxsRequest) String() string { return proto.CompactTextString(m) } -func (*BatchTxsRequest) ProtoMessage() {} -func (*BatchTxsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{13} -} -func (m *BatchTxsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BatchTxsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BatchTxsRequest.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 *BatchTxsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BatchTxsRequest.Merge(m, src) -} -func (m *BatchTxsRequest) XXX_Size() int { - return m.Size() -} -func (m *BatchTxsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BatchTxsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_BatchTxsRequest proto.InternalMessageInfo - -func (m *BatchTxsRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -type BatchTxsResponse struct { - Batches []*BatchTx `protobuf:"bytes,1,rep,name=batches,proto3" json:"batches,omitempty"` - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *BatchTxsResponse) Reset() { *m = BatchTxsResponse{} } -func (m *BatchTxsResponse) String() string { return proto.CompactTextString(m) } -func (*BatchTxsResponse) ProtoMessage() {} -func (*BatchTxsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{14} -} -func (m *BatchTxsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BatchTxsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BatchTxsResponse.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 *BatchTxsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BatchTxsResponse.Merge(m, src) -} -func (m *BatchTxsResponse) XXX_Size() int { - return m.Size() -} -func (m *BatchTxsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_BatchTxsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_BatchTxsResponse proto.InternalMessageInfo - -func (m *BatchTxsResponse) GetBatches() []*BatchTx { - if m != nil { - return m.Batches - } - return nil -} - -func (m *BatchTxsResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -// rpc ContractCallTxs -type ContractCallTxsRequest struct { - Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *ContractCallTxsRequest) Reset() { *m = ContractCallTxsRequest{} } -func (m *ContractCallTxsRequest) String() string { return proto.CompactTextString(m) } -func (*ContractCallTxsRequest) ProtoMessage() {} -func (*ContractCallTxsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{15} -} -func (m *ContractCallTxsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContractCallTxsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ContractCallTxsRequest.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 *ContractCallTxsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContractCallTxsRequest.Merge(m, src) -} -func (m *ContractCallTxsRequest) XXX_Size() int { - return m.Size() -} -func (m *ContractCallTxsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ContractCallTxsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ContractCallTxsRequest proto.InternalMessageInfo - -func (m *ContractCallTxsRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -type ContractCallTxsResponse struct { - Calls []*ContractCallTx `protobuf:"bytes,1,rep,name=calls,proto3" json:"calls,omitempty"` - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *ContractCallTxsResponse) Reset() { *m = ContractCallTxsResponse{} } -func (m *ContractCallTxsResponse) String() string { return proto.CompactTextString(m) } -func (*ContractCallTxsResponse) ProtoMessage() {} -func (*ContractCallTxsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{16} -} -func (m *ContractCallTxsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContractCallTxsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ContractCallTxsResponse.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 *ContractCallTxsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContractCallTxsResponse.Merge(m, src) -} -func (m *ContractCallTxsResponse) XXX_Size() int { - return m.Size() -} -func (m *ContractCallTxsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ContractCallTxsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ContractCallTxsResponse proto.InternalMessageInfo - -func (m *ContractCallTxsResponse) GetCalls() []*ContractCallTx { - if m != nil { - return m.Calls - } - return nil -} - -func (m *ContractCallTxsResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -// rpc UnsignedSignerSetTxs -type UnsignedSignerSetTxsRequest struct { - // NOTE: this is an sdk.AccAddress and can represent either the - // orchestrator address or the corresponding validator address - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (m *UnsignedSignerSetTxsRequest) Reset() { *m = UnsignedSignerSetTxsRequest{} } -func (m *UnsignedSignerSetTxsRequest) String() string { return proto.CompactTextString(m) } -func (*UnsignedSignerSetTxsRequest) ProtoMessage() {} -func (*UnsignedSignerSetTxsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{17} -} -func (m *UnsignedSignerSetTxsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UnsignedSignerSetTxsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UnsignedSignerSetTxsRequest.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 *UnsignedSignerSetTxsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UnsignedSignerSetTxsRequest.Merge(m, src) -} -func (m *UnsignedSignerSetTxsRequest) XXX_Size() int { - return m.Size() -} -func (m *UnsignedSignerSetTxsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_UnsignedSignerSetTxsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_UnsignedSignerSetTxsRequest proto.InternalMessageInfo - -func (m *UnsignedSignerSetTxsRequest) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -type UnsignedSignerSetTxsResponse struct { - SignerSets []*SignerSetTx `protobuf:"bytes,1,rep,name=signer_sets,json=signerSets,proto3" json:"signer_sets,omitempty"` -} - -func (m *UnsignedSignerSetTxsResponse) Reset() { *m = UnsignedSignerSetTxsResponse{} } -func (m *UnsignedSignerSetTxsResponse) String() string { return proto.CompactTextString(m) } -func (*UnsignedSignerSetTxsResponse) ProtoMessage() {} -func (*UnsignedSignerSetTxsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{18} -} -func (m *UnsignedSignerSetTxsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UnsignedSignerSetTxsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UnsignedSignerSetTxsResponse.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 *UnsignedSignerSetTxsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_UnsignedSignerSetTxsResponse.Merge(m, src) -} -func (m *UnsignedSignerSetTxsResponse) XXX_Size() int { - return m.Size() -} -func (m *UnsignedSignerSetTxsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_UnsignedSignerSetTxsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_UnsignedSignerSetTxsResponse proto.InternalMessageInfo - -func (m *UnsignedSignerSetTxsResponse) GetSignerSets() []*SignerSetTx { - if m != nil { - return m.SignerSets - } - return nil -} - -type UnsignedBatchTxsRequest struct { - // NOTE: this is an sdk.AccAddress and can represent either the - // orchestrator address or the corresponding validator address - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (m *UnsignedBatchTxsRequest) Reset() { *m = UnsignedBatchTxsRequest{} } -func (m *UnsignedBatchTxsRequest) String() string { return proto.CompactTextString(m) } -func (*UnsignedBatchTxsRequest) ProtoMessage() {} -func (*UnsignedBatchTxsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{19} -} -func (m *UnsignedBatchTxsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UnsignedBatchTxsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UnsignedBatchTxsRequest.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 *UnsignedBatchTxsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UnsignedBatchTxsRequest.Merge(m, src) -} -func (m *UnsignedBatchTxsRequest) XXX_Size() int { - return m.Size() -} -func (m *UnsignedBatchTxsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_UnsignedBatchTxsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_UnsignedBatchTxsRequest proto.InternalMessageInfo - -func (m *UnsignedBatchTxsRequest) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -type UnsignedBatchTxsResponse struct { - // Note these are returned with the signature empty - Batches []*BatchTx `protobuf:"bytes,1,rep,name=batches,proto3" json:"batches,omitempty"` -} - -func (m *UnsignedBatchTxsResponse) Reset() { *m = UnsignedBatchTxsResponse{} } -func (m *UnsignedBatchTxsResponse) String() string { return proto.CompactTextString(m) } -func (*UnsignedBatchTxsResponse) ProtoMessage() {} -func (*UnsignedBatchTxsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{20} -} -func (m *UnsignedBatchTxsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UnsignedBatchTxsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UnsignedBatchTxsResponse.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 *UnsignedBatchTxsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_UnsignedBatchTxsResponse.Merge(m, src) -} -func (m *UnsignedBatchTxsResponse) XXX_Size() int { - return m.Size() -} -func (m *UnsignedBatchTxsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_UnsignedBatchTxsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_UnsignedBatchTxsResponse proto.InternalMessageInfo - -func (m *UnsignedBatchTxsResponse) GetBatches() []*BatchTx { - if m != nil { - return m.Batches - } - return nil -} - -// rpc UnsignedContractCallTxs -type UnsignedContractCallTxsRequest struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (m *UnsignedContractCallTxsRequest) Reset() { *m = UnsignedContractCallTxsRequest{} } -func (m *UnsignedContractCallTxsRequest) String() string { return proto.CompactTextString(m) } -func (*UnsignedContractCallTxsRequest) ProtoMessage() {} -func (*UnsignedContractCallTxsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{21} -} -func (m *UnsignedContractCallTxsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UnsignedContractCallTxsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UnsignedContractCallTxsRequest.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 *UnsignedContractCallTxsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UnsignedContractCallTxsRequest.Merge(m, src) -} -func (m *UnsignedContractCallTxsRequest) XXX_Size() int { - return m.Size() -} -func (m *UnsignedContractCallTxsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_UnsignedContractCallTxsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_UnsignedContractCallTxsRequest proto.InternalMessageInfo - -func (m *UnsignedContractCallTxsRequest) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -type UnsignedContractCallTxsResponse struct { - Calls []*ContractCallTx `protobuf:"bytes,1,rep,name=calls,proto3" json:"calls,omitempty"` -} - -func (m *UnsignedContractCallTxsResponse) Reset() { *m = UnsignedContractCallTxsResponse{} } -func (m *UnsignedContractCallTxsResponse) String() string { return proto.CompactTextString(m) } -func (*UnsignedContractCallTxsResponse) ProtoMessage() {} -func (*UnsignedContractCallTxsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{22} -} -func (m *UnsignedContractCallTxsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UnsignedContractCallTxsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UnsignedContractCallTxsResponse.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 *UnsignedContractCallTxsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_UnsignedContractCallTxsResponse.Merge(m, src) -} -func (m *UnsignedContractCallTxsResponse) XXX_Size() int { - return m.Size() -} -func (m *UnsignedContractCallTxsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_UnsignedContractCallTxsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_UnsignedContractCallTxsResponse proto.InternalMessageInfo - -func (m *UnsignedContractCallTxsResponse) GetCalls() []*ContractCallTx { - if m != nil { - return m.Calls - } - return nil -} - -type BatchTxFeesRequest struct { -} - -func (m *BatchTxFeesRequest) Reset() { *m = BatchTxFeesRequest{} } -func (m *BatchTxFeesRequest) String() string { return proto.CompactTextString(m) } -func (*BatchTxFeesRequest) ProtoMessage() {} -func (*BatchTxFeesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{23} -} -func (m *BatchTxFeesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BatchTxFeesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BatchTxFeesRequest.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 *BatchTxFeesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BatchTxFeesRequest.Merge(m, src) -} -func (m *BatchTxFeesRequest) XXX_Size() int { - return m.Size() -} -func (m *BatchTxFeesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BatchTxFeesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_BatchTxFeesRequest proto.InternalMessageInfo - -type BatchTxFeesResponse struct { - Fees github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=fees,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"fees"` -} - -func (m *BatchTxFeesResponse) Reset() { *m = BatchTxFeesResponse{} } -func (m *BatchTxFeesResponse) String() string { return proto.CompactTextString(m) } -func (*BatchTxFeesResponse) ProtoMessage() {} -func (*BatchTxFeesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{24} -} -func (m *BatchTxFeesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BatchTxFeesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BatchTxFeesResponse.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 *BatchTxFeesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BatchTxFeesResponse.Merge(m, src) -} -func (m *BatchTxFeesResponse) XXX_Size() int { - return m.Size() -} -func (m *BatchTxFeesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_BatchTxFeesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_BatchTxFeesResponse proto.InternalMessageInfo - -func (m *BatchTxFeesResponse) GetFees() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.Fees - } - return nil -} - -type ContractCallTxConfirmationsRequest struct { - InvalidationScope []byte `protobuf:"bytes,1,opt,name=invalidation_scope,json=invalidationScope,proto3" json:"invalidation_scope,omitempty"` - InvalidationNonce uint64 `protobuf:"varint,2,opt,name=invalidation_nonce,json=invalidationNonce,proto3" json:"invalidation_nonce,omitempty"` -} - -func (m *ContractCallTxConfirmationsRequest) Reset() { *m = ContractCallTxConfirmationsRequest{} } -func (m *ContractCallTxConfirmationsRequest) String() string { return proto.CompactTextString(m) } -func (*ContractCallTxConfirmationsRequest) ProtoMessage() {} -func (*ContractCallTxConfirmationsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{25} -} -func (m *ContractCallTxConfirmationsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContractCallTxConfirmationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ContractCallTxConfirmationsRequest.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 *ContractCallTxConfirmationsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContractCallTxConfirmationsRequest.Merge(m, src) -} -func (m *ContractCallTxConfirmationsRequest) XXX_Size() int { - return m.Size() -} -func (m *ContractCallTxConfirmationsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ContractCallTxConfirmationsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ContractCallTxConfirmationsRequest proto.InternalMessageInfo - -func (m *ContractCallTxConfirmationsRequest) GetInvalidationScope() []byte { - if m != nil { - return m.InvalidationScope - } - return nil -} - -func (m *ContractCallTxConfirmationsRequest) GetInvalidationNonce() uint64 { - if m != nil { - return m.InvalidationNonce - } - return 0 -} - -type ContractCallTxConfirmationsResponse struct { - Signatures []*ContractCallTxConfirmation `protobuf:"bytes,1,rep,name=signatures,proto3" json:"signatures,omitempty"` -} - -func (m *ContractCallTxConfirmationsResponse) Reset() { *m = ContractCallTxConfirmationsResponse{} } -func (m *ContractCallTxConfirmationsResponse) String() string { return proto.CompactTextString(m) } -func (*ContractCallTxConfirmationsResponse) ProtoMessage() {} -func (*ContractCallTxConfirmationsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{26} -} -func (m *ContractCallTxConfirmationsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContractCallTxConfirmationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ContractCallTxConfirmationsResponse.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 *ContractCallTxConfirmationsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContractCallTxConfirmationsResponse.Merge(m, src) -} -func (m *ContractCallTxConfirmationsResponse) XXX_Size() int { - return m.Size() -} -func (m *ContractCallTxConfirmationsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ContractCallTxConfirmationsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ContractCallTxConfirmationsResponse proto.InternalMessageInfo - -func (m *ContractCallTxConfirmationsResponse) GetSignatures() []*ContractCallTxConfirmation { - if m != nil { - return m.Signatures - } - return nil -} - -type BatchTxConfirmationsRequest struct { - BatchNonce uint64 `protobuf:"varint,1,opt,name=batch_nonce,json=batchNonce,proto3" json:"batch_nonce,omitempty"` - TokenContract string `protobuf:"bytes,2,opt,name=token_contract,json=tokenContract,proto3" json:"token_contract,omitempty"` -} - -func (m *BatchTxConfirmationsRequest) Reset() { *m = BatchTxConfirmationsRequest{} } -func (m *BatchTxConfirmationsRequest) String() string { return proto.CompactTextString(m) } -func (*BatchTxConfirmationsRequest) ProtoMessage() {} -func (*BatchTxConfirmationsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{27} -} -func (m *BatchTxConfirmationsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BatchTxConfirmationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BatchTxConfirmationsRequest.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 *BatchTxConfirmationsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BatchTxConfirmationsRequest.Merge(m, src) -} -func (m *BatchTxConfirmationsRequest) XXX_Size() int { - return m.Size() -} -func (m *BatchTxConfirmationsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BatchTxConfirmationsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_BatchTxConfirmationsRequest proto.InternalMessageInfo - -func (m *BatchTxConfirmationsRequest) GetBatchNonce() uint64 { - if m != nil { - return m.BatchNonce - } - return 0 -} - -func (m *BatchTxConfirmationsRequest) GetTokenContract() string { - if m != nil { - return m.TokenContract - } - return "" -} - -type BatchTxConfirmationsResponse struct { - Signatures []*BatchTxConfirmation `protobuf:"bytes,1,rep,name=signatures,proto3" json:"signatures,omitempty"` -} - -func (m *BatchTxConfirmationsResponse) Reset() { *m = BatchTxConfirmationsResponse{} } -func (m *BatchTxConfirmationsResponse) String() string { return proto.CompactTextString(m) } -func (*BatchTxConfirmationsResponse) ProtoMessage() {} -func (*BatchTxConfirmationsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{28} -} -func (m *BatchTxConfirmationsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BatchTxConfirmationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BatchTxConfirmationsResponse.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 *BatchTxConfirmationsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BatchTxConfirmationsResponse.Merge(m, src) -} -func (m *BatchTxConfirmationsResponse) XXX_Size() int { - return m.Size() -} -func (m *BatchTxConfirmationsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_BatchTxConfirmationsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_BatchTxConfirmationsResponse proto.InternalMessageInfo - -func (m *BatchTxConfirmationsResponse) GetSignatures() []*BatchTxConfirmation { - if m != nil { - return m.Signatures - } - return nil -} - -type LastSubmittedEthereumEventRequest struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (m *LastSubmittedEthereumEventRequest) Reset() { *m = LastSubmittedEthereumEventRequest{} } -func (m *LastSubmittedEthereumEventRequest) String() string { return proto.CompactTextString(m) } -func (*LastSubmittedEthereumEventRequest) ProtoMessage() {} -func (*LastSubmittedEthereumEventRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{29} -} -func (m *LastSubmittedEthereumEventRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LastSubmittedEthereumEventRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LastSubmittedEthereumEventRequest.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 *LastSubmittedEthereumEventRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LastSubmittedEthereumEventRequest.Merge(m, src) -} -func (m *LastSubmittedEthereumEventRequest) XXX_Size() int { - return m.Size() -} -func (m *LastSubmittedEthereumEventRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LastSubmittedEthereumEventRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_LastSubmittedEthereumEventRequest proto.InternalMessageInfo - -func (m *LastSubmittedEthereumEventRequest) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -type LastSubmittedEthereumEventResponse struct { - EventNonce uint64 `protobuf:"varint,1,opt,name=event_nonce,json=eventNonce,proto3" json:"event_nonce,omitempty"` -} - -func (m *LastSubmittedEthereumEventResponse) Reset() { *m = LastSubmittedEthereumEventResponse{} } -func (m *LastSubmittedEthereumEventResponse) String() string { return proto.CompactTextString(m) } -func (*LastSubmittedEthereumEventResponse) ProtoMessage() {} -func (*LastSubmittedEthereumEventResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{30} -} -func (m *LastSubmittedEthereumEventResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LastSubmittedEthereumEventResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LastSubmittedEthereumEventResponse.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 *LastSubmittedEthereumEventResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_LastSubmittedEthereumEventResponse.Merge(m, src) -} -func (m *LastSubmittedEthereumEventResponse) XXX_Size() int { - return m.Size() -} -func (m *LastSubmittedEthereumEventResponse) XXX_DiscardUnknown() { - xxx_messageInfo_LastSubmittedEthereumEventResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_LastSubmittedEthereumEventResponse proto.InternalMessageInfo - -func (m *LastSubmittedEthereumEventResponse) GetEventNonce() uint64 { - if m != nil { - return m.EventNonce - } - return 0 -} - -type ERC20ToDenomRequest struct { - Erc20 string `protobuf:"bytes,1,opt,name=erc20,proto3" json:"erc20,omitempty"` -} - -func (m *ERC20ToDenomRequest) Reset() { *m = ERC20ToDenomRequest{} } -func (m *ERC20ToDenomRequest) String() string { return proto.CompactTextString(m) } -func (*ERC20ToDenomRequest) ProtoMessage() {} -func (*ERC20ToDenomRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{31} -} -func (m *ERC20ToDenomRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ERC20ToDenomRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ERC20ToDenomRequest.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 *ERC20ToDenomRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ERC20ToDenomRequest.Merge(m, src) -} -func (m *ERC20ToDenomRequest) XXX_Size() int { - return m.Size() -} -func (m *ERC20ToDenomRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ERC20ToDenomRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ERC20ToDenomRequest proto.InternalMessageInfo - -func (m *ERC20ToDenomRequest) GetErc20() string { - if m != nil { - return m.Erc20 - } - return "" -} - -type ERC20ToDenomResponse struct { - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` - CosmosOriginated bool `protobuf:"varint,2,opt,name=cosmos_originated,json=cosmosOriginated,proto3" json:"cosmos_originated,omitempty"` -} - -func (m *ERC20ToDenomResponse) Reset() { *m = ERC20ToDenomResponse{} } -func (m *ERC20ToDenomResponse) String() string { return proto.CompactTextString(m) } -func (*ERC20ToDenomResponse) ProtoMessage() {} -func (*ERC20ToDenomResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{32} -} -func (m *ERC20ToDenomResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ERC20ToDenomResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ERC20ToDenomResponse.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 *ERC20ToDenomResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ERC20ToDenomResponse.Merge(m, src) -} -func (m *ERC20ToDenomResponse) XXX_Size() int { - return m.Size() -} -func (m *ERC20ToDenomResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ERC20ToDenomResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ERC20ToDenomResponse proto.InternalMessageInfo - -func (m *ERC20ToDenomResponse) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -func (m *ERC20ToDenomResponse) GetCosmosOriginated() bool { - if m != nil { - return m.CosmosOriginated - } - return false -} - -type DenomToERC20ParamsRequest struct { - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` -} - -func (m *DenomToERC20ParamsRequest) Reset() { *m = DenomToERC20ParamsRequest{} } -func (m *DenomToERC20ParamsRequest) String() string { return proto.CompactTextString(m) } -func (*DenomToERC20ParamsRequest) ProtoMessage() {} -func (*DenomToERC20ParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{33} -} -func (m *DenomToERC20ParamsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DenomToERC20ParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DenomToERC20ParamsRequest.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 *DenomToERC20ParamsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DenomToERC20ParamsRequest.Merge(m, src) -} -func (m *DenomToERC20ParamsRequest) XXX_Size() int { - return m.Size() -} -func (m *DenomToERC20ParamsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DenomToERC20ParamsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DenomToERC20ParamsRequest proto.InternalMessageInfo - -func (m *DenomToERC20ParamsRequest) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -type DenomToERC20ParamsResponse struct { - BaseDenom string `protobuf:"bytes,1,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty"` - Erc20Name string `protobuf:"bytes,2,opt,name=erc20_name,json=erc20Name,proto3" json:"erc20_name,omitempty"` - Erc20Symbol string `protobuf:"bytes,3,opt,name=erc20_symbol,json=erc20Symbol,proto3" json:"erc20_symbol,omitempty"` - Erc20Decimals uint64 `protobuf:"varint,4,opt,name=erc20_decimals,json=erc20Decimals,proto3" json:"erc20_decimals,omitempty"` -} - -func (m *DenomToERC20ParamsResponse) Reset() { *m = DenomToERC20ParamsResponse{} } -func (m *DenomToERC20ParamsResponse) String() string { return proto.CompactTextString(m) } -func (*DenomToERC20ParamsResponse) ProtoMessage() {} -func (*DenomToERC20ParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{34} -} -func (m *DenomToERC20ParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DenomToERC20ParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DenomToERC20ParamsResponse.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 *DenomToERC20ParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DenomToERC20ParamsResponse.Merge(m, src) -} -func (m *DenomToERC20ParamsResponse) XXX_Size() int { - return m.Size() -} -func (m *DenomToERC20ParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DenomToERC20ParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DenomToERC20ParamsResponse proto.InternalMessageInfo - -func (m *DenomToERC20ParamsResponse) GetBaseDenom() string { - if m != nil { - return m.BaseDenom - } - return "" -} - -func (m *DenomToERC20ParamsResponse) GetErc20Name() string { - if m != nil { - return m.Erc20Name - } - return "" -} - -func (m *DenomToERC20ParamsResponse) GetErc20Symbol() string { - if m != nil { - return m.Erc20Symbol - } - return "" -} - -func (m *DenomToERC20ParamsResponse) GetErc20Decimals() uint64 { - if m != nil { - return m.Erc20Decimals - } - return 0 -} - -type DenomToERC20Request struct { - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` -} - -func (m *DenomToERC20Request) Reset() { *m = DenomToERC20Request{} } -func (m *DenomToERC20Request) String() string { return proto.CompactTextString(m) } -func (*DenomToERC20Request) ProtoMessage() {} -func (*DenomToERC20Request) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{35} -} -func (m *DenomToERC20Request) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DenomToERC20Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DenomToERC20Request.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 *DenomToERC20Request) XXX_Merge(src proto.Message) { - xxx_messageInfo_DenomToERC20Request.Merge(m, src) -} -func (m *DenomToERC20Request) XXX_Size() int { - return m.Size() -} -func (m *DenomToERC20Request) XXX_DiscardUnknown() { - xxx_messageInfo_DenomToERC20Request.DiscardUnknown(m) -} - -var xxx_messageInfo_DenomToERC20Request proto.InternalMessageInfo - -func (m *DenomToERC20Request) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -type DenomToERC20Response struct { - Erc20 string `protobuf:"bytes,1,opt,name=erc20,proto3" json:"erc20,omitempty"` - CosmosOriginated bool `protobuf:"varint,2,opt,name=cosmos_originated,json=cosmosOriginated,proto3" json:"cosmos_originated,omitempty"` -} - -func (m *DenomToERC20Response) Reset() { *m = DenomToERC20Response{} } -func (m *DenomToERC20Response) String() string { return proto.CompactTextString(m) } -func (*DenomToERC20Response) ProtoMessage() {} -func (*DenomToERC20Response) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{36} -} -func (m *DenomToERC20Response) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DenomToERC20Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DenomToERC20Response.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 *DenomToERC20Response) XXX_Merge(src proto.Message) { - xxx_messageInfo_DenomToERC20Response.Merge(m, src) -} -func (m *DenomToERC20Response) XXX_Size() int { - return m.Size() -} -func (m *DenomToERC20Response) XXX_DiscardUnknown() { - xxx_messageInfo_DenomToERC20Response.DiscardUnknown(m) -} - -var xxx_messageInfo_DenomToERC20Response proto.InternalMessageInfo - -func (m *DenomToERC20Response) GetErc20() string { - if m != nil { - return m.Erc20 - } - return "" -} - -func (m *DenomToERC20Response) GetCosmosOriginated() bool { - if m != nil { - return m.CosmosOriginated - } - return false -} - -type DelegateKeysByValidatorRequest struct { - ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` -} - -func (m *DelegateKeysByValidatorRequest) Reset() { *m = DelegateKeysByValidatorRequest{} } -func (m *DelegateKeysByValidatorRequest) String() string { return proto.CompactTextString(m) } -func (*DelegateKeysByValidatorRequest) ProtoMessage() {} -func (*DelegateKeysByValidatorRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{37} -} -func (m *DelegateKeysByValidatorRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DelegateKeysByValidatorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DelegateKeysByValidatorRequest.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 *DelegateKeysByValidatorRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DelegateKeysByValidatorRequest.Merge(m, src) -} -func (m *DelegateKeysByValidatorRequest) XXX_Size() int { - return m.Size() -} -func (m *DelegateKeysByValidatorRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DelegateKeysByValidatorRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DelegateKeysByValidatorRequest proto.InternalMessageInfo - -func (m *DelegateKeysByValidatorRequest) GetValidatorAddress() string { - if m != nil { - return m.ValidatorAddress - } - return "" -} - -type DelegateKeysByValidatorResponse struct { - EthAddress string `protobuf:"bytes,1,opt,name=eth_address,json=ethAddress,proto3" json:"eth_address,omitempty"` - OrchestratorAddress string `protobuf:"bytes,2,opt,name=orchestrator_address,json=orchestratorAddress,proto3" json:"orchestrator_address,omitempty"` -} - -func (m *DelegateKeysByValidatorResponse) Reset() { *m = DelegateKeysByValidatorResponse{} } -func (m *DelegateKeysByValidatorResponse) String() string { return proto.CompactTextString(m) } -func (*DelegateKeysByValidatorResponse) ProtoMessage() {} -func (*DelegateKeysByValidatorResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{38} -} -func (m *DelegateKeysByValidatorResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DelegateKeysByValidatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DelegateKeysByValidatorResponse.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 *DelegateKeysByValidatorResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DelegateKeysByValidatorResponse.Merge(m, src) -} -func (m *DelegateKeysByValidatorResponse) XXX_Size() int { - return m.Size() -} -func (m *DelegateKeysByValidatorResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DelegateKeysByValidatorResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DelegateKeysByValidatorResponse proto.InternalMessageInfo - -func (m *DelegateKeysByValidatorResponse) GetEthAddress() string { - if m != nil { - return m.EthAddress - } - return "" -} - -func (m *DelegateKeysByValidatorResponse) GetOrchestratorAddress() string { - if m != nil { - return m.OrchestratorAddress - } - return "" -} - -type DelegateKeysByEthereumSignerRequest struct { - EthereumSigner string `protobuf:"bytes,1,opt,name=ethereum_signer,json=ethereumSigner,proto3" json:"ethereum_signer,omitempty"` -} - -func (m *DelegateKeysByEthereumSignerRequest) Reset() { *m = DelegateKeysByEthereumSignerRequest{} } -func (m *DelegateKeysByEthereumSignerRequest) String() string { return proto.CompactTextString(m) } -func (*DelegateKeysByEthereumSignerRequest) ProtoMessage() {} -func (*DelegateKeysByEthereumSignerRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{39} -} -func (m *DelegateKeysByEthereumSignerRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DelegateKeysByEthereumSignerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DelegateKeysByEthereumSignerRequest.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 *DelegateKeysByEthereumSignerRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DelegateKeysByEthereumSignerRequest.Merge(m, src) -} -func (m *DelegateKeysByEthereumSignerRequest) XXX_Size() int { - return m.Size() -} -func (m *DelegateKeysByEthereumSignerRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DelegateKeysByEthereumSignerRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DelegateKeysByEthereumSignerRequest proto.InternalMessageInfo - -func (m *DelegateKeysByEthereumSignerRequest) GetEthereumSigner() string { - if m != nil { - return m.EthereumSigner - } - return "" -} - -type DelegateKeysByEthereumSignerResponse struct { - ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - OrchestratorAddress string `protobuf:"bytes,2,opt,name=orchestrator_address,json=orchestratorAddress,proto3" json:"orchestrator_address,omitempty"` -} - -func (m *DelegateKeysByEthereumSignerResponse) Reset() { *m = DelegateKeysByEthereumSignerResponse{} } -func (m *DelegateKeysByEthereumSignerResponse) String() string { return proto.CompactTextString(m) } -func (*DelegateKeysByEthereumSignerResponse) ProtoMessage() {} -func (*DelegateKeysByEthereumSignerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{40} -} -func (m *DelegateKeysByEthereumSignerResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DelegateKeysByEthereumSignerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DelegateKeysByEthereumSignerResponse.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 *DelegateKeysByEthereumSignerResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DelegateKeysByEthereumSignerResponse.Merge(m, src) -} -func (m *DelegateKeysByEthereumSignerResponse) XXX_Size() int { - return m.Size() -} -func (m *DelegateKeysByEthereumSignerResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DelegateKeysByEthereumSignerResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DelegateKeysByEthereumSignerResponse proto.InternalMessageInfo - -func (m *DelegateKeysByEthereumSignerResponse) GetValidatorAddress() string { - if m != nil { - return m.ValidatorAddress - } - return "" -} - -func (m *DelegateKeysByEthereumSignerResponse) GetOrchestratorAddress() string { - if m != nil { - return m.OrchestratorAddress - } - return "" -} - -type DelegateKeysByOrchestratorRequest struct { - OrchestratorAddress string `protobuf:"bytes,1,opt,name=orchestrator_address,json=orchestratorAddress,proto3" json:"orchestrator_address,omitempty"` -} - -func (m *DelegateKeysByOrchestratorRequest) Reset() { *m = DelegateKeysByOrchestratorRequest{} } -func (m *DelegateKeysByOrchestratorRequest) String() string { return proto.CompactTextString(m) } -func (*DelegateKeysByOrchestratorRequest) ProtoMessage() {} -func (*DelegateKeysByOrchestratorRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{41} -} -func (m *DelegateKeysByOrchestratorRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DelegateKeysByOrchestratorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DelegateKeysByOrchestratorRequest.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 *DelegateKeysByOrchestratorRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DelegateKeysByOrchestratorRequest.Merge(m, src) -} -func (m *DelegateKeysByOrchestratorRequest) XXX_Size() int { - return m.Size() -} -func (m *DelegateKeysByOrchestratorRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DelegateKeysByOrchestratorRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DelegateKeysByOrchestratorRequest proto.InternalMessageInfo - -func (m *DelegateKeysByOrchestratorRequest) GetOrchestratorAddress() string { - if m != nil { - return m.OrchestratorAddress - } - return "" -} - -type DelegateKeysByOrchestratorResponse struct { - ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - EthereumSigner string `protobuf:"bytes,2,opt,name=ethereum_signer,json=ethereumSigner,proto3" json:"ethereum_signer,omitempty"` -} - -func (m *DelegateKeysByOrchestratorResponse) Reset() { *m = DelegateKeysByOrchestratorResponse{} } -func (m *DelegateKeysByOrchestratorResponse) String() string { return proto.CompactTextString(m) } -func (*DelegateKeysByOrchestratorResponse) ProtoMessage() {} -func (*DelegateKeysByOrchestratorResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{42} -} -func (m *DelegateKeysByOrchestratorResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DelegateKeysByOrchestratorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DelegateKeysByOrchestratorResponse.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 *DelegateKeysByOrchestratorResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DelegateKeysByOrchestratorResponse.Merge(m, src) -} -func (m *DelegateKeysByOrchestratorResponse) XXX_Size() int { - return m.Size() -} -func (m *DelegateKeysByOrchestratorResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DelegateKeysByOrchestratorResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DelegateKeysByOrchestratorResponse proto.InternalMessageInfo - -func (m *DelegateKeysByOrchestratorResponse) GetValidatorAddress() string { - if m != nil { - return m.ValidatorAddress - } - return "" -} - -func (m *DelegateKeysByOrchestratorResponse) GetEthereumSigner() string { - if m != nil { - return m.EthereumSigner - } - return "" -} - -type DelegateKeysRequest struct { -} - -func (m *DelegateKeysRequest) Reset() { *m = DelegateKeysRequest{} } -func (m *DelegateKeysRequest) String() string { return proto.CompactTextString(m) } -func (*DelegateKeysRequest) ProtoMessage() {} -func (*DelegateKeysRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{43} -} -func (m *DelegateKeysRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DelegateKeysRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DelegateKeysRequest.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 *DelegateKeysRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DelegateKeysRequest.Merge(m, src) -} -func (m *DelegateKeysRequest) XXX_Size() int { - return m.Size() -} -func (m *DelegateKeysRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DelegateKeysRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DelegateKeysRequest proto.InternalMessageInfo - -type DelegateKeysResponse struct { - DelegateKeys []*MsgDelegateKeys `protobuf:"bytes,1,rep,name=delegate_keys,json=delegateKeys,proto3" json:"delegate_keys,omitempty"` -} - -func (m *DelegateKeysResponse) Reset() { *m = DelegateKeysResponse{} } -func (m *DelegateKeysResponse) String() string { return proto.CompactTextString(m) } -func (*DelegateKeysResponse) ProtoMessage() {} -func (*DelegateKeysResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{44} -} -func (m *DelegateKeysResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DelegateKeysResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DelegateKeysResponse.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 *DelegateKeysResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DelegateKeysResponse.Merge(m, src) -} -func (m *DelegateKeysResponse) XXX_Size() int { - return m.Size() -} -func (m *DelegateKeysResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DelegateKeysResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DelegateKeysResponse proto.InternalMessageInfo - -func (m *DelegateKeysResponse) GetDelegateKeys() []*MsgDelegateKeys { - if m != nil { - return m.DelegateKeys - } - return nil -} - -// NOTE: if there is no sender address, return all -type BatchedSendToEthereumsRequest struct { - SenderAddress string `protobuf:"bytes,1,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` -} - -func (m *BatchedSendToEthereumsRequest) Reset() { *m = BatchedSendToEthereumsRequest{} } -func (m *BatchedSendToEthereumsRequest) String() string { return proto.CompactTextString(m) } -func (*BatchedSendToEthereumsRequest) ProtoMessage() {} -func (*BatchedSendToEthereumsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{45} -} -func (m *BatchedSendToEthereumsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BatchedSendToEthereumsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BatchedSendToEthereumsRequest.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 *BatchedSendToEthereumsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BatchedSendToEthereumsRequest.Merge(m, src) -} -func (m *BatchedSendToEthereumsRequest) XXX_Size() int { - return m.Size() -} -func (m *BatchedSendToEthereumsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BatchedSendToEthereumsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_BatchedSendToEthereumsRequest proto.InternalMessageInfo - -func (m *BatchedSendToEthereumsRequest) GetSenderAddress() string { - if m != nil { - return m.SenderAddress - } - return "" -} - -type BatchedSendToEthereumsResponse struct { - SendToEthereums []*SendToEthereum `protobuf:"bytes,1,rep,name=send_to_ethereums,json=sendToEthereums,proto3" json:"send_to_ethereums,omitempty"` -} - -func (m *BatchedSendToEthereumsResponse) Reset() { *m = BatchedSendToEthereumsResponse{} } -func (m *BatchedSendToEthereumsResponse) String() string { return proto.CompactTextString(m) } -func (*BatchedSendToEthereumsResponse) ProtoMessage() {} -func (*BatchedSendToEthereumsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{46} -} -func (m *BatchedSendToEthereumsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BatchedSendToEthereumsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BatchedSendToEthereumsResponse.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 *BatchedSendToEthereumsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BatchedSendToEthereumsResponse.Merge(m, src) -} -func (m *BatchedSendToEthereumsResponse) XXX_Size() int { - return m.Size() -} -func (m *BatchedSendToEthereumsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_BatchedSendToEthereumsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_BatchedSendToEthereumsResponse proto.InternalMessageInfo - -func (m *BatchedSendToEthereumsResponse) GetSendToEthereums() []*SendToEthereum { - if m != nil { - return m.SendToEthereums - } - return nil -} - -type UnbatchedSendToEthereumsRequest struct { - SenderAddress string `protobuf:"bytes,1,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` - Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *UnbatchedSendToEthereumsRequest) Reset() { *m = UnbatchedSendToEthereumsRequest{} } -func (m *UnbatchedSendToEthereumsRequest) String() string { return proto.CompactTextString(m) } -func (*UnbatchedSendToEthereumsRequest) ProtoMessage() {} -func (*UnbatchedSendToEthereumsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{47} -} -func (m *UnbatchedSendToEthereumsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UnbatchedSendToEthereumsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UnbatchedSendToEthereumsRequest.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 *UnbatchedSendToEthereumsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UnbatchedSendToEthereumsRequest.Merge(m, src) -} -func (m *UnbatchedSendToEthereumsRequest) XXX_Size() int { - return m.Size() -} -func (m *UnbatchedSendToEthereumsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_UnbatchedSendToEthereumsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_UnbatchedSendToEthereumsRequest proto.InternalMessageInfo - -func (m *UnbatchedSendToEthereumsRequest) GetSenderAddress() string { - if m != nil { - return m.SenderAddress - } - return "" -} - -func (m *UnbatchedSendToEthereumsRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -type UnbatchedSendToEthereumsResponse struct { - SendToEthereums []*SendToEthereum `protobuf:"bytes,1,rep,name=send_to_ethereums,json=sendToEthereums,proto3" json:"send_to_ethereums,omitempty"` - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *UnbatchedSendToEthereumsResponse) Reset() { *m = UnbatchedSendToEthereumsResponse{} } -func (m *UnbatchedSendToEthereumsResponse) String() string { return proto.CompactTextString(m) } -func (*UnbatchedSendToEthereumsResponse) ProtoMessage() {} -func (*UnbatchedSendToEthereumsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_52ac3aa5b09dcaf2, []int{48} -} -func (m *UnbatchedSendToEthereumsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UnbatchedSendToEthereumsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UnbatchedSendToEthereumsResponse.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 *UnbatchedSendToEthereumsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_UnbatchedSendToEthereumsResponse.Merge(m, src) -} -func (m *UnbatchedSendToEthereumsResponse) XXX_Size() int { - return m.Size() -} -func (m *UnbatchedSendToEthereumsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_UnbatchedSendToEthereumsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_UnbatchedSendToEthereumsResponse proto.InternalMessageInfo - -func (m *UnbatchedSendToEthereumsResponse) GetSendToEthereums() []*SendToEthereum { - if m != nil { - return m.SendToEthereums - } - return nil -} - -func (m *UnbatchedSendToEthereumsResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -func init() { - proto.RegisterType((*ParamsRequest)(nil), "gravity.v1migration.ParamsRequest") - proto.RegisterType((*ParamsResponse)(nil), "gravity.v1migration.ParamsResponse") - proto.RegisterType((*SignerSetTxRequest)(nil), "gravity.v1migration.SignerSetTxRequest") - proto.RegisterType((*LatestSignerSetTxRequest)(nil), "gravity.v1migration.LatestSignerSetTxRequest") - proto.RegisterType((*SignerSetTxResponse)(nil), "gravity.v1migration.SignerSetTxResponse") - proto.RegisterType((*BatchTxRequest)(nil), "gravity.v1migration.BatchTxRequest") - proto.RegisterType((*BatchTxResponse)(nil), "gravity.v1migration.BatchTxResponse") - proto.RegisterType((*ContractCallTxRequest)(nil), "gravity.v1migration.ContractCallTxRequest") - proto.RegisterType((*ContractCallTxResponse)(nil), "gravity.v1migration.ContractCallTxResponse") - proto.RegisterType((*SignerSetTxConfirmationsRequest)(nil), "gravity.v1migration.SignerSetTxConfirmationsRequest") - proto.RegisterType((*SignerSetTxConfirmationsResponse)(nil), "gravity.v1migration.SignerSetTxConfirmationsResponse") - proto.RegisterType((*SignerSetTxsRequest)(nil), "gravity.v1migration.SignerSetTxsRequest") - proto.RegisterType((*SignerSetTxsResponse)(nil), "gravity.v1migration.SignerSetTxsResponse") - proto.RegisterType((*BatchTxsRequest)(nil), "gravity.v1migration.BatchTxsRequest") - proto.RegisterType((*BatchTxsResponse)(nil), "gravity.v1migration.BatchTxsResponse") - proto.RegisterType((*ContractCallTxsRequest)(nil), "gravity.v1migration.ContractCallTxsRequest") - proto.RegisterType((*ContractCallTxsResponse)(nil), "gravity.v1migration.ContractCallTxsResponse") - proto.RegisterType((*UnsignedSignerSetTxsRequest)(nil), "gravity.v1migration.UnsignedSignerSetTxsRequest") - proto.RegisterType((*UnsignedSignerSetTxsResponse)(nil), "gravity.v1migration.UnsignedSignerSetTxsResponse") - proto.RegisterType((*UnsignedBatchTxsRequest)(nil), "gravity.v1migration.UnsignedBatchTxsRequest") - proto.RegisterType((*UnsignedBatchTxsResponse)(nil), "gravity.v1migration.UnsignedBatchTxsResponse") - proto.RegisterType((*UnsignedContractCallTxsRequest)(nil), "gravity.v1migration.UnsignedContractCallTxsRequest") - proto.RegisterType((*UnsignedContractCallTxsResponse)(nil), "gravity.v1migration.UnsignedContractCallTxsResponse") - proto.RegisterType((*BatchTxFeesRequest)(nil), "gravity.v1migration.BatchTxFeesRequest") - proto.RegisterType((*BatchTxFeesResponse)(nil), "gravity.v1migration.BatchTxFeesResponse") - proto.RegisterType((*ContractCallTxConfirmationsRequest)(nil), "gravity.v1migration.ContractCallTxConfirmationsRequest") - proto.RegisterType((*ContractCallTxConfirmationsResponse)(nil), "gravity.v1migration.ContractCallTxConfirmationsResponse") - proto.RegisterType((*BatchTxConfirmationsRequest)(nil), "gravity.v1migration.BatchTxConfirmationsRequest") - proto.RegisterType((*BatchTxConfirmationsResponse)(nil), "gravity.v1migration.BatchTxConfirmationsResponse") - proto.RegisterType((*LastSubmittedEthereumEventRequest)(nil), "gravity.v1migration.LastSubmittedEthereumEventRequest") - proto.RegisterType((*LastSubmittedEthereumEventResponse)(nil), "gravity.v1migration.LastSubmittedEthereumEventResponse") - proto.RegisterType((*ERC20ToDenomRequest)(nil), "gravity.v1migration.ERC20ToDenomRequest") - proto.RegisterType((*ERC20ToDenomResponse)(nil), "gravity.v1migration.ERC20ToDenomResponse") - proto.RegisterType((*DenomToERC20ParamsRequest)(nil), "gravity.v1migration.DenomToERC20ParamsRequest") - proto.RegisterType((*DenomToERC20ParamsResponse)(nil), "gravity.v1migration.DenomToERC20ParamsResponse") - proto.RegisterType((*DenomToERC20Request)(nil), "gravity.v1migration.DenomToERC20Request") - proto.RegisterType((*DenomToERC20Response)(nil), "gravity.v1migration.DenomToERC20Response") - proto.RegisterType((*DelegateKeysByValidatorRequest)(nil), "gravity.v1migration.DelegateKeysByValidatorRequest") - proto.RegisterType((*DelegateKeysByValidatorResponse)(nil), "gravity.v1migration.DelegateKeysByValidatorResponse") - proto.RegisterType((*DelegateKeysByEthereumSignerRequest)(nil), "gravity.v1migration.DelegateKeysByEthereumSignerRequest") - proto.RegisterType((*DelegateKeysByEthereumSignerResponse)(nil), "gravity.v1migration.DelegateKeysByEthereumSignerResponse") - proto.RegisterType((*DelegateKeysByOrchestratorRequest)(nil), "gravity.v1migration.DelegateKeysByOrchestratorRequest") - proto.RegisterType((*DelegateKeysByOrchestratorResponse)(nil), "gravity.v1migration.DelegateKeysByOrchestratorResponse") - proto.RegisterType((*DelegateKeysRequest)(nil), "gravity.v1migration.DelegateKeysRequest") - proto.RegisterType((*DelegateKeysResponse)(nil), "gravity.v1migration.DelegateKeysResponse") - proto.RegisterType((*BatchedSendToEthereumsRequest)(nil), "gravity.v1migration.BatchedSendToEthereumsRequest") - proto.RegisterType((*BatchedSendToEthereumsResponse)(nil), "gravity.v1migration.BatchedSendToEthereumsResponse") - proto.RegisterType((*UnbatchedSendToEthereumsRequest)(nil), "gravity.v1migration.UnbatchedSendToEthereumsRequest") - proto.RegisterType((*UnbatchedSendToEthereumsResponse)(nil), "gravity.v1migration.UnbatchedSendToEthereumsResponse") -} - -func init() { proto.RegisterFile("gravity/v1migration/query.proto", fileDescriptor_52ac3aa5b09dcaf2) } - -var fileDescriptor_52ac3aa5b09dcaf2 = []byte{ - // 1797 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0x4b, 0x6f, 0xdb, 0xc6, - 0x13, 0x17, 0x1d, 0x3b, 0x89, 0xc7, 0xef, 0xb5, 0x92, 0x38, 0xb2, 0x23, 0xd9, 0xeb, 0xe4, 0x1f, - 0xff, 0xe3, 0x58, 0xb4, 0xe5, 0x34, 0x8f, 0x02, 0x6d, 0x11, 0x3b, 0x4e, 0x1b, 0xe4, 0x59, 0xd9, - 0x35, 0xea, 0x22, 0x85, 0x4a, 0x89, 0x1b, 0x9a, 0xb5, 0x44, 0xca, 0x24, 0xa5, 0x46, 0x05, 0x7a, - 0x69, 0x81, 0x00, 0x3d, 0x35, 0x68, 0xd1, 0x63, 0x2f, 0x45, 0x4f, 0xed, 0x57, 0xe8, 0x07, 0xc8, - 0x31, 0xc7, 0x9e, 0xda, 0x22, 0xf9, 0x22, 0x05, 0x97, 0x4b, 0x8a, 0x94, 0x76, 0x29, 0xc9, 0x51, - 0x4e, 0x36, 0x67, 0x67, 0x7e, 0xf3, 0xd8, 0xd9, 0xd9, 0x99, 0x15, 0x64, 0x34, 0x4b, 0xa9, 0xeb, - 0x4e, 0x43, 0xae, 0xaf, 0x55, 0x74, 0xcd, 0x52, 0x1c, 0xdd, 0x34, 0xe4, 0xc3, 0x1a, 0xb1, 0x1a, - 0xd9, 0xaa, 0x65, 0x3a, 0x26, 0x9a, 0x66, 0x0c, 0xd9, 0x10, 0x43, 0xea, 0x52, 0xc9, 0xb4, 0x2b, - 0xa6, 0x2d, 0x17, 0x15, 0x9b, 0x78, 0xdc, 0x72, 0x7d, 0xad, 0x48, 0x1c, 0x65, 0x4d, 0xae, 0x2a, - 0x9a, 0x6e, 0x50, 0x2e, 0x0f, 0x20, 0x95, 0x0e, 0xf3, 0xfa, 0x5c, 0x25, 0x53, 0xf7, 0xd7, 0x93, - 0x9a, 0xa9, 0x99, 0xf4, 0x5f, 0xd9, 0xfd, 0x8f, 0x51, 0xe7, 0x34, 0xd3, 0xd4, 0xca, 0x44, 0x56, - 0xaa, 0xba, 0xac, 0x18, 0x86, 0xe9, 0x50, 0x48, 0x9b, 0xad, 0x2e, 0xf0, 0xac, 0xd6, 0x88, 0x41, - 0x6c, 0x3d, 0x9e, 0x85, 0xf9, 0xc2, 0x2c, 0xe3, 0xb1, 0x54, 0x6c, 0x8d, 0x41, 0xe0, 0x09, 0x18, - 0x7b, 0xa4, 0x58, 0x4a, 0xc5, 0xce, 0x93, 0xc3, 0x1a, 0xb1, 0x1d, 0x7c, 0x17, 0xc6, 0x7d, 0x82, - 0x5d, 0x35, 0x0d, 0x9b, 0xa0, 0x1b, 0x70, 0xbc, 0x4a, 0x29, 0x33, 0xd2, 0xbc, 0xb4, 0x34, 0x92, - 0x9b, 0xcd, 0x72, 0xc2, 0x95, 0xf5, 0x84, 0x36, 0x06, 0x5f, 0xfc, 0x9d, 0x49, 0xe4, 0x99, 0x00, - 0x7e, 0x1f, 0xd0, 0xb6, 0xae, 0x19, 0xc4, 0xda, 0x26, 0xce, 0xce, 0x53, 0xa6, 0x02, 0x2d, 0xc1, - 0xa4, 0x4d, 0xa9, 0x05, 0x9b, 0x38, 0x05, 0xc3, 0x34, 0x4a, 0x84, 0x42, 0x0f, 0xe6, 0xc7, 0x6d, - 0x9f, 0xfb, 0x81, 0x4b, 0xc5, 0x29, 0x98, 0xb9, 0xa7, 0x38, 0xc4, 0x76, 0xda, 0x51, 0xf0, 0x2e, - 0x4c, 0x47, 0xa8, 0xcc, 0xda, 0x0f, 0x00, 0x9a, 0xe0, 0xcc, 0xe2, 0x79, 0xae, 0xc5, 0x61, 0xe9, - 0xe1, 0x40, 0x31, 0xfe, 0x14, 0xc6, 0x37, 0x14, 0xa7, 0xb4, 0xdf, 0xb4, 0xf7, 0x02, 0x8c, 0x3b, - 0xe6, 0x01, 0x31, 0x0a, 0x25, 0xd3, 0x70, 0x2c, 0xa5, 0xe4, 0xc1, 0x0e, 0xe7, 0xc7, 0x28, 0x75, - 0x93, 0x11, 0x51, 0x06, 0x46, 0x8a, 0xae, 0x20, 0xf3, 0x68, 0x80, 0x7a, 0x04, 0x94, 0xe4, 0x79, - 0xb3, 0x05, 0x13, 0x01, 0x32, 0xb3, 0x36, 0x07, 0x43, 0x94, 0x81, 0x19, 0x3a, 0xc7, 0x35, 0xd4, - 0x17, 0xf2, 0x58, 0x71, 0x0d, 0x4e, 0xf9, 0x3a, 0x37, 0x95, 0x72, 0xb9, 0x69, 0xe7, 0x0a, 0x20, - 0xdd, 0xa8, 0x2b, 0x65, 0x5d, 0xa5, 0x72, 0x05, 0xbb, 0x64, 0x56, 0xbd, 0xc8, 0x8e, 0xe6, 0xa7, - 0xc2, 0x2b, 0xdb, 0xee, 0x42, 0x1b, 0x7b, 0xd8, 0xec, 0x08, 0xbb, 0x67, 0xfd, 0x63, 0x38, 0xdd, - 0xaa, 0x96, 0x39, 0xb1, 0x01, 0x50, 0x36, 0x35, 0xbd, 0x54, 0x28, 0x29, 0xe5, 0x32, 0xf3, 0x64, - 0x91, 0xeb, 0x49, 0x0b, 0xc0, 0x30, 0x15, 0x73, 0x3f, 0xf0, 0x5d, 0xc8, 0x84, 0xf6, 0x63, 0xd3, - 0x34, 0x9e, 0xe8, 0x56, 0xc5, 0x3b, 0x0f, 0xbd, 0xa7, 0x4d, 0x15, 0xe6, 0xc5, 0x60, 0xcc, 0xe8, - 0x7b, 0x5e, 0x9e, 0x28, 0x4e, 0xcd, 0x22, 0x6e, 0x66, 0x1f, 0x5b, 0x1a, 0xc9, 0x5d, 0xee, 0x94, - 0x27, 0x61, 0xa8, 0x7c, 0x48, 0x1e, 0x7f, 0x1e, 0x49, 0xc6, 0xc0, 0xe4, 0xdb, 0x00, 0xcd, 0x5a, - 0xc1, 0x22, 0xf3, 0xbf, 0xac, 0x57, 0x2c, 0xb2, 0x6e, 0xb1, 0xc8, 0x7a, 0x65, 0x88, 0x95, 0x8c, - 0xec, 0x23, 0x45, 0x23, 0x4c, 0x36, 0x1f, 0x92, 0xc4, 0xbf, 0x4a, 0x90, 0x8c, 0xe2, 0x33, 0x2f, - 0x6e, 0xc2, 0x48, 0x33, 0x26, 0xbe, 0x1b, 0x9d, 0xd3, 0x1d, 0x82, 0x80, 0xd9, 0xe8, 0xc3, 0x88, - 0x8d, 0x03, 0xd4, 0xc6, 0x8b, 0x1d, 0x6d, 0xf4, 0xf4, 0x47, 0x8c, 0xdc, 0x0b, 0xd2, 0xbb, 0xef, - 0xfe, 0xff, 0x24, 0xc1, 0x64, 0x13, 0x9b, 0xf9, 0x7e, 0x15, 0x4e, 0xd0, 0x03, 0x11, 0x6c, 0x5f, - 0xfc, 0xe9, 0xf1, 0x99, 0xfb, 0xe7, 0xf0, 0x17, 0xad, 0x27, 0xa2, 0xef, 0x7e, 0xff, 0x22, 0xc1, - 0x99, 0x36, 0x15, 0x41, 0x59, 0x1e, 0x72, 0xcf, 0x9b, 0xef, 0x7c, 0x57, 0x07, 0xce, 0x93, 0xe8, - 0x5f, 0x04, 0xae, 0xc1, 0xec, 0x27, 0x06, 0xcd, 0x25, 0x95, 0x97, 0xfe, 0x33, 0x70, 0x42, 0x51, - 0x55, 0x8b, 0xd8, 0x36, 0xab, 0x98, 0xfe, 0x27, 0x56, 0x60, 0x8e, 0x2f, 0xd8, 0xb7, 0xbc, 0xc6, - 0xeb, 0x70, 0xc6, 0x57, 0xd1, 0x9a, 0x96, 0x62, 0xbb, 0xf2, 0x30, 0xd3, 0x2e, 0xf4, 0x66, 0xf9, - 0x86, 0xdf, 0x85, 0xb4, 0x8f, 0x29, 0x48, 0x17, 0xb1, 0x3d, 0x8f, 0x21, 0x23, 0x94, 0x7d, 0xe3, - 0x3c, 0xc0, 0x49, 0x40, 0xcc, 0xda, 0xdb, 0x84, 0x04, 0x1d, 0x40, 0x1d, 0xa6, 0x23, 0x54, 0xa6, - 0xa7, 0x00, 0x83, 0x4f, 0x48, 0xe0, 0xfb, 0xd9, 0x48, 0xba, 0xf8, 0x89, 0xb2, 0x69, 0xea, 0xc6, - 0xc6, 0xaa, 0xdb, 0x02, 0xfc, 0xfe, 0x4f, 0x66, 0x49, 0xd3, 0x9d, 0xfd, 0x5a, 0x31, 0x5b, 0x32, - 0x2b, 0x32, 0xeb, 0x8f, 0xbc, 0x3f, 0x2b, 0xb6, 0x7a, 0x20, 0x3b, 0x8d, 0x2a, 0xb1, 0xa9, 0x80, - 0x9d, 0xa7, 0xc0, 0xf8, 0x5b, 0x09, 0x70, 0xd4, 0x4e, 0xee, 0x35, 0xf0, 0x76, 0x6f, 0xb9, 0x3a, - 0x2c, 0xc6, 0xda, 0xc0, 0x82, 0xf1, 0x90, 0x73, 0x7b, 0xc8, 0x5d, 0x44, 0x5e, 0x78, 0x81, 0x10, - 0x98, 0x65, 0x41, 0xe7, 0x3a, 0xdd, 0xd2, 0x5b, 0x48, 0xad, 0xbd, 0x05, 0xa7, 0x47, 0x19, 0xe0, - 0xf4, 0x28, 0x78, 0x1f, 0xe6, 0xf8, 0x6a, 0x98, 0x5f, 0x1f, 0x71, 0xfc, 0x5a, 0x8a, 0x4b, 0x73, - 0xa1, 0x43, 0xef, 0xc1, 0xc2, 0x3d, 0xc5, 0x76, 0xb6, 0x6b, 0xc5, 0x8a, 0xee, 0x38, 0x44, 0xdd, - 0x72, 0xf6, 0x89, 0x45, 0x6a, 0x95, 0xad, 0x3a, 0x31, 0x9c, 0xce, 0x89, 0xbf, 0x05, 0x38, 0x4e, - 0x9c, 0x99, 0x9b, 0x81, 0x11, 0xe2, 0x12, 0xa2, 0x61, 0xa1, 0x24, 0x6f, 0x3b, 0x97, 0x61, 0x7a, - 0x2b, 0xbf, 0x99, 0x5b, 0xdd, 0x31, 0x6f, 0x11, 0xc3, 0xac, 0xf8, 0x7a, 0x93, 0x30, 0x44, 0xac, - 0x52, 0x6e, 0x95, 0x69, 0xf5, 0x3e, 0xf0, 0x1e, 0x24, 0xa3, 0xcc, 0x4c, 0x4b, 0x12, 0x86, 0x54, - 0x97, 0xe0, 0x73, 0xd3, 0x0f, 0xb4, 0x0c, 0x53, 0x5e, 0x3a, 0x17, 0x4c, 0x4b, 0xa7, 0x15, 0x91, - 0xa8, 0x34, 0xe8, 0x27, 0xf3, 0x93, 0xde, 0xc2, 0xc3, 0x80, 0x8e, 0xd7, 0xe0, 0x2c, 0xc5, 0xdc, - 0x31, 0xa9, 0x86, 0x48, 0xcb, 0xcd, 0xc7, 0xc7, 0xbf, 0x49, 0x90, 0xe2, 0xc9, 0x30, 0xa3, 0xce, - 0x01, 0xb8, 0x47, 0xaf, 0x10, 0x96, 0x1c, 0x76, 0x29, 0x54, 0xc6, 0x5d, 0xa6, 0x4e, 0x15, 0x0c, - 0xa5, 0x42, 0x58, 0x2e, 0x0c, 0x53, 0xca, 0x03, 0xa5, 0x42, 0xd0, 0x02, 0x8c, 0x7a, 0xcb, 0x76, - 0xa3, 0x52, 0x34, 0xcb, 0x33, 0xc7, 0x28, 0xc3, 0x08, 0xa5, 0x6d, 0x53, 0x92, 0x9b, 0x51, 0x1e, - 0x8b, 0x4a, 0x4a, 0x7a, 0x45, 0x29, 0xdb, 0x33, 0x83, 0x34, 0xbc, 0x63, 0x94, 0x7a, 0x8b, 0x11, - 0xdd, 0x08, 0x87, 0xad, 0x8c, 0xf7, 0x69, 0x0f, 0x92, 0x51, 0xe6, 0x66, 0x84, 0xdb, 0xf7, 0xa3, - 0xb7, 0x08, 0xdf, 0x87, 0xf4, 0x2d, 0x52, 0x26, 0x9a, 0xe2, 0x90, 0xbb, 0xa4, 0x61, 0x6f, 0x34, - 0x76, 0xbd, 0x93, 0x6d, 0x5a, 0xbe, 0x49, 0xcb, 0x30, 0x55, 0xf7, 0x69, 0x85, 0x68, 0xda, 0x4d, - 0x06, 0x0b, 0x37, 0x59, 0xfe, 0xd5, 0x20, 0x23, 0x84, 0x0b, 0x25, 0x9f, 0xb3, 0xdf, 0x82, 0x04, - 0xc4, 0xd9, 0x67, 0x18, 0x68, 0x0d, 0x92, 0xa6, 0xe5, 0x5e, 0x01, 0x8e, 0x15, 0xd1, 0xe9, 0xed, - 0xc6, 0x74, 0x78, 0xcd, 0x57, 0xfb, 0x00, 0x16, 0xa3, 0x6a, 0xfd, 0xbc, 0xf7, 0x6e, 0x39, 0xdf, - 0x95, 0x8b, 0x30, 0x41, 0xd8, 0x42, 0xc1, 0xbb, 0xf2, 0x98, 0xfa, 0x71, 0x12, 0xe1, 0xc7, 0xcf, - 0x24, 0x38, 0x1f, 0x0f, 0xc8, 0x9c, 0xe9, 0x25, 0x38, 0x47, 0x71, 0x6c, 0x17, 0x16, 0xa2, 0x76, - 0x3c, 0x0c, 0x31, 0xf9, 0x6e, 0x89, 0x70, 0x25, 0x31, 0xee, 0xd7, 0x80, 0xe3, 0x70, 0x8f, 0xe2, - 0x1d, 0x27, 0xb8, 0x03, 0xdc, 0xe0, 0x9e, 0x72, 0x53, 0xbf, 0xa9, 0xdb, 0xbf, 0x3f, 0x15, 0x37, - 0xc9, 0xc3, 0x64, 0x66, 0xc4, 0x1d, 0x18, 0x53, 0x19, 0xbd, 0x70, 0x40, 0x1a, 0x7e, 0x79, 0x3d, - 0xcf, 0x2d, 0xaf, 0xf7, 0x6d, 0x2d, 0x02, 0x32, 0xaa, 0x86, 0xbe, 0xf0, 0x6d, 0x38, 0x47, 0xeb, - 0x2f, 0x51, 0xb7, 0x89, 0xa1, 0xee, 0x98, 0xfe, 0xa6, 0xda, 0xa1, 0x91, 0xd5, 0x26, 0x86, 0x4a, - 0x5a, 0xbd, 0x1d, 0xf3, 0xa8, 0x7e, 0xf4, 0x0e, 0x21, 0x2d, 0xc2, 0x09, 0x2e, 0xba, 0x29, 0x57, - 0xa4, 0xe0, 0x98, 0x05, 0xdf, 0xfb, 0xf8, 0x4e, 0x23, 0x0a, 0x94, 0x9f, 0xb0, 0xa3, 0xc0, 0xf8, - 0xb9, 0xe4, 0xb6, 0x34, 0xc5, 0x3e, 0x58, 0xdf, 0xd2, 0x65, 0x0f, 0x1c, 0xb9, 0xcb, 0xfe, 0x53, - 0x82, 0x79, 0xb1, 0x49, 0x6f, 0x29, 0x10, 0x7d, 0x6b, 0xc2, 0x73, 0x7f, 0x9c, 0x81, 0xa1, 0x8f, - 0x5d, 0x56, 0xb4, 0x0d, 0xc7, 0xbd, 0x5b, 0x02, 0xe1, 0x98, 0x37, 0x1a, 0x16, 0x82, 0xd4, 0x62, - 0x2c, 0x8f, 0xa7, 0x08, 0x27, 0x50, 0x11, 0x46, 0x42, 0x2d, 0x36, 0xba, 0xd8, 0xb1, 0x09, 0x67, - 0xf0, 0x4b, 0x9d, 0x19, 0x03, 0x1d, 0x06, 0x4c, 0xb5, 0xbd, 0xf3, 0xa0, 0x15, 0x2e, 0x80, 0xe8, - 0x3d, 0xa8, 0x27, 0x7d, 0xbb, 0x70, 0x82, 0xf5, 0x2f, 0x68, 0x31, 0xb6, 0x89, 0x67, 0xd8, 0xe7, - 0xe3, 0x99, 0x02, 0xdc, 0x03, 0x18, 0x8f, 0xf6, 0x7b, 0xe8, 0x52, 0x37, 0xed, 0x38, 0xd3, 0xb2, - 0xdc, 0x15, 0x6f, 0xa0, 0x8c, 0xc0, 0x68, 0x78, 0x76, 0x42, 0x1d, 0x03, 0x10, 0xec, 0xfc, 0xff, - 0xbb, 0xe0, 0x0c, 0xd4, 0xec, 0xc1, 0x49, 0x7f, 0x14, 0x42, 0xb1, 0x71, 0x08, 0xe0, 0x2f, 0x74, - 0xe0, 0x0a, 0x6d, 0xfb, 0x44, 0xcb, 0x54, 0x83, 0xba, 0x89, 0x41, 0xa0, 0xe8, 0x72, 0x77, 0xcc, - 0x81, 0xbe, 0xef, 0x25, 0x98, 0x11, 0x3d, 0x0c, 0xa1, 0x2b, 0xbd, 0x3c, 0xfe, 0x04, 0x26, 0xbc, - 0xd3, 0xa3, 0x54, 0x60, 0xcb, 0x37, 0x90, 0xe4, 0x75, 0xe2, 0x68, 0xb5, 0xdb, 0x6e, 0x3b, 0x30, - 0x61, 0xad, 0x07, 0x89, 0x40, 0xfd, 0x8f, 0x12, 0xcc, 0xc6, 0x0c, 0x3a, 0xe8, 0x5a, 0x8f, 0xc3, - 0x4c, 0x60, 0xcd, 0xf5, 0xde, 0x05, 0xc3, 0x31, 0xe1, 0xbd, 0x0a, 0x08, 0x62, 0x12, 0xf3, 0xf2, - 0x20, 0x88, 0x49, 0xdc, 0x93, 0x03, 0x4e, 0xa0, 0x43, 0x98, 0x6c, 0x1d, 0xfe, 0xd1, 0xe5, 0x58, - 0xa0, 0xd6, 0xcc, 0x5f, 0xe9, 0x92, 0x3b, 0x50, 0xf9, 0x4c, 0x6a, 0xbe, 0x52, 0xb4, 0x1e, 0x85, - 0xf5, 0x58, 0x30, 0xc1, 0x91, 0xb8, 0xd2, 0x9b, 0x50, 0x60, 0xc8, 0x0f, 0x12, 0xa4, 0xc4, 0x03, - 0x17, 0xba, 0x2a, 0xa8, 0xc5, 0x1d, 0x06, 0xbc, 0xd4, 0xb5, 0x9e, 0xe5, 0xc2, 0xf7, 0x4e, 0xe8, - 0x19, 0x42, 0x70, 0xef, 0xb4, 0x3f, 0x5f, 0xa4, 0x96, 0x3a, 0x33, 0x86, 0x4b, 0x68, 0x78, 0xe2, - 0x13, 0x94, 0x50, 0xce, 0x04, 0x29, 0x28, 0xa1, 0xbc, 0xf1, 0x11, 0x27, 0xd0, 0x57, 0x80, 0xda, - 0x27, 0x39, 0x94, 0xe5, 0x42, 0x08, 0xc7, 0xc4, 0x94, 0xdc, 0x35, 0x7f, 0xd8, 0xbf, 0xf0, 0xba, - 0xc0, 0x3f, 0xce, 0xfc, 0x26, 0xf0, 0x8f, 0x37, 0xbc, 0xe1, 0x04, 0xfa, 0x4e, 0x82, 0xd3, 0xfc, - 0x3e, 0x12, 0xe5, 0xc4, 0xbb, 0x21, 0x6a, 0xff, 0x52, 0xeb, 0x3d, 0xc9, 0x44, 0xaa, 0xbb, 0xa8, - 0x8d, 0x43, 0xa2, 0x73, 0x11, 0xdb, 0x88, 0x0a, 0xaa, 0x7b, 0xa7, 0x5e, 0x91, 0x9d, 0x6b, 0xc1, - 0xfc, 0x28, 0x38, 0xd7, 0xf1, 0xc3, 0xab, 0xe0, 0x5c, 0x77, 0x18, 0x51, 0x71, 0x02, 0xfd, 0x2c, - 0xc1, 0x5c, 0xdc, 0x00, 0x88, 0xae, 0x77, 0x01, 0xcc, 0x1d, 0x42, 0x53, 0x37, 0x8e, 0x20, 0x19, - 0xa9, 0x37, 0xe2, 0xc1, 0x4d, 0x50, 0x6f, 0x3a, 0x4e, 0x90, 0x82, 0x7a, 0xd3, 0x79, 0x42, 0xf4, - 0xcf, 0x4a, 0x93, 0x4f, 0x78, 0x56, 0xda, 0x06, 0x3e, 0xe1, 0x59, 0x69, 0x9f, 0x01, 0x71, 0x62, - 0xa3, 0xf4, 0xe2, 0x55, 0x5a, 0x7a, 0xf9, 0x2a, 0x2d, 0xfd, 0xfb, 0x2a, 0x2d, 0x3d, 0x7f, 0x9d, - 0x4e, 0xbc, 0x7c, 0x9d, 0x4e, 0xfc, 0xf5, 0x3a, 0x9d, 0xf8, 0xec, 0x4e, 0xe8, 0xbd, 0xb4, 0x4a, - 0x34, 0xad, 0xf1, 0x65, 0xdd, 0xff, 0x31, 0x77, 0xa5, 0x68, 0xe9, 0xaa, 0x46, 0xe4, 0x8a, 0xa9, - 0xd6, 0xca, 0x44, 0xae, 0xe7, 0xe4, 0xa7, 0xfe, 0x92, 0x1c, 0x68, 0xb4, 0xe5, 0xfa, 0x9a, 0xf7, - 0xac, 0x5a, 0x3c, 0x4e, 0x7f, 0xdc, 0x5d, 0xff, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xa2, 0x1e, 0x35, - 0x25, 0xfa, 0x1e, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryClient interface { - // Module parameters query - Params(ctx context.Context, in *ParamsRequest, opts ...grpc.CallOption) (*ParamsResponse, error) - // get info on individual outgoing data - SignerSetTx(ctx context.Context, in *SignerSetTxRequest, opts ...grpc.CallOption) (*SignerSetTxResponse, error) - LatestSignerSetTx(ctx context.Context, in *LatestSignerSetTxRequest, opts ...grpc.CallOption) (*SignerSetTxResponse, error) - BatchTx(ctx context.Context, in *BatchTxRequest, opts ...grpc.CallOption) (*BatchTxResponse, error) - ContractCallTx(ctx context.Context, in *ContractCallTxRequest, opts ...grpc.CallOption) (*ContractCallTxResponse, error) - // get collections of outgoing traffic from the bridge - SignerSetTxs(ctx context.Context, in *SignerSetTxsRequest, opts ...grpc.CallOption) (*SignerSetTxsResponse, error) - BatchTxs(ctx context.Context, in *BatchTxsRequest, opts ...grpc.CallOption) (*BatchTxsResponse, error) - ContractCallTxs(ctx context.Context, in *ContractCallTxsRequest, opts ...grpc.CallOption) (*ContractCallTxsResponse, error) - // TODO: can/should we group these into one endpoint? - SignerSetTxConfirmations(ctx context.Context, in *SignerSetTxConfirmationsRequest, opts ...grpc.CallOption) (*SignerSetTxConfirmationsResponse, error) - BatchTxConfirmations(ctx context.Context, in *BatchTxConfirmationsRequest, opts ...grpc.CallOption) (*BatchTxConfirmationsResponse, error) - ContractCallTxConfirmations(ctx context.Context, in *ContractCallTxConfirmationsRequest, opts ...grpc.CallOption) (*ContractCallTxConfirmationsResponse, error) - // pending ethereum signature queries for orchestrators to figure out which - // signatures they are missing - // TODO: can/should we group this into one endpoint? - UnsignedSignerSetTxs(ctx context.Context, in *UnsignedSignerSetTxsRequest, opts ...grpc.CallOption) (*UnsignedSignerSetTxsResponse, error) - UnsignedBatchTxs(ctx context.Context, in *UnsignedBatchTxsRequest, opts ...grpc.CallOption) (*UnsignedBatchTxsResponse, error) - UnsignedContractCallTxs(ctx context.Context, in *UnsignedContractCallTxsRequest, opts ...grpc.CallOption) (*UnsignedContractCallTxsResponse, error) - LastSubmittedEthereumEvent(ctx context.Context, in *LastSubmittedEthereumEventRequest, opts ...grpc.CallOption) (*LastSubmittedEthereumEventResponse, error) - // Queries the fees for all pending batches, results are returned in sdk.Coin - // (fee_amount_int)(contract_address) style - BatchTxFees(ctx context.Context, in *BatchTxFeesRequest, opts ...grpc.CallOption) (*BatchTxFeesResponse, error) - // Query for info about denoms tracked by gravity - ERC20ToDenom(ctx context.Context, in *ERC20ToDenomRequest, opts ...grpc.CallOption) (*ERC20ToDenomResponse, error) - // DenomToERC20Params implements a query that allows ERC-20 parameter - // information to be retrieved by a Cosmos base denomination. - DenomToERC20Params(ctx context.Context, in *DenomToERC20ParamsRequest, opts ...grpc.CallOption) (*DenomToERC20ParamsResponse, error) - // Query for info about denoms tracked by gravity - DenomToERC20(ctx context.Context, in *DenomToERC20Request, opts ...grpc.CallOption) (*DenomToERC20Response, error) - // Query for batch send to ethereums - BatchedSendToEthereums(ctx context.Context, in *BatchedSendToEthereumsRequest, opts ...grpc.CallOption) (*BatchedSendToEthereumsResponse, error) - // Query for unbatched send to ethereums - UnbatchedSendToEthereums(ctx context.Context, in *UnbatchedSendToEthereumsRequest, opts ...grpc.CallOption) (*UnbatchedSendToEthereumsResponse, error) - // delegate keys - DelegateKeysByValidator(ctx context.Context, in *DelegateKeysByValidatorRequest, opts ...grpc.CallOption) (*DelegateKeysByValidatorResponse, error) - DelegateKeysByEthereumSigner(ctx context.Context, in *DelegateKeysByEthereumSignerRequest, opts ...grpc.CallOption) (*DelegateKeysByEthereumSignerResponse, error) - DelegateKeysByOrchestrator(ctx context.Context, in *DelegateKeysByOrchestratorRequest, opts ...grpc.CallOption) (*DelegateKeysByOrchestratorResponse, error) - DelegateKeys(ctx context.Context, in *DelegateKeysRequest, opts ...grpc.CallOption) (*DelegateKeysResponse, error) -} - -type queryClient struct { - cc grpc1.ClientConn -} - -func NewQueryClient(cc grpc1.ClientConn) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Params(ctx context.Context, in *ParamsRequest, opts ...grpc.CallOption) (*ParamsResponse, error) { - out := new(ParamsResponse) - err := c.cc.Invoke(ctx, "/gravity.v1migration.Query/Params", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) SignerSetTx(ctx context.Context, in *SignerSetTxRequest, opts ...grpc.CallOption) (*SignerSetTxResponse, error) { - out := new(SignerSetTxResponse) - err := c.cc.Invoke(ctx, "/gravity.v1migration.Query/SignerSetTx", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) LatestSignerSetTx(ctx context.Context, in *LatestSignerSetTxRequest, opts ...grpc.CallOption) (*SignerSetTxResponse, error) { - out := new(SignerSetTxResponse) - err := c.cc.Invoke(ctx, "/gravity.v1migration.Query/LatestSignerSetTx", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) BatchTx(ctx context.Context, in *BatchTxRequest, opts ...grpc.CallOption) (*BatchTxResponse, error) { - out := new(BatchTxResponse) - err := c.cc.Invoke(ctx, "/gravity.v1migration.Query/BatchTx", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ContractCallTx(ctx context.Context, in *ContractCallTxRequest, opts ...grpc.CallOption) (*ContractCallTxResponse, error) { - out := new(ContractCallTxResponse) - err := c.cc.Invoke(ctx, "/gravity.v1migration.Query/ContractCallTx", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) SignerSetTxs(ctx context.Context, in *SignerSetTxsRequest, opts ...grpc.CallOption) (*SignerSetTxsResponse, error) { - out := new(SignerSetTxsResponse) - err := c.cc.Invoke(ctx, "/gravity.v1migration.Query/SignerSetTxs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) BatchTxs(ctx context.Context, in *BatchTxsRequest, opts ...grpc.CallOption) (*BatchTxsResponse, error) { - out := new(BatchTxsResponse) - err := c.cc.Invoke(ctx, "/gravity.v1migration.Query/BatchTxs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ContractCallTxs(ctx context.Context, in *ContractCallTxsRequest, opts ...grpc.CallOption) (*ContractCallTxsResponse, error) { - out := new(ContractCallTxsResponse) - err := c.cc.Invoke(ctx, "/gravity.v1migration.Query/ContractCallTxs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) SignerSetTxConfirmations(ctx context.Context, in *SignerSetTxConfirmationsRequest, opts ...grpc.CallOption) (*SignerSetTxConfirmationsResponse, error) { - out := new(SignerSetTxConfirmationsResponse) - err := c.cc.Invoke(ctx, "/gravity.v1migration.Query/SignerSetTxConfirmations", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) BatchTxConfirmations(ctx context.Context, in *BatchTxConfirmationsRequest, opts ...grpc.CallOption) (*BatchTxConfirmationsResponse, error) { - out := new(BatchTxConfirmationsResponse) - err := c.cc.Invoke(ctx, "/gravity.v1migration.Query/BatchTxConfirmations", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ContractCallTxConfirmations(ctx context.Context, in *ContractCallTxConfirmationsRequest, opts ...grpc.CallOption) (*ContractCallTxConfirmationsResponse, error) { - out := new(ContractCallTxConfirmationsResponse) - err := c.cc.Invoke(ctx, "/gravity.v1migration.Query/ContractCallTxConfirmations", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) UnsignedSignerSetTxs(ctx context.Context, in *UnsignedSignerSetTxsRequest, opts ...grpc.CallOption) (*UnsignedSignerSetTxsResponse, error) { - out := new(UnsignedSignerSetTxsResponse) - err := c.cc.Invoke(ctx, "/gravity.v1migration.Query/UnsignedSignerSetTxs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) UnsignedBatchTxs(ctx context.Context, in *UnsignedBatchTxsRequest, opts ...grpc.CallOption) (*UnsignedBatchTxsResponse, error) { - out := new(UnsignedBatchTxsResponse) - err := c.cc.Invoke(ctx, "/gravity.v1migration.Query/UnsignedBatchTxs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) UnsignedContractCallTxs(ctx context.Context, in *UnsignedContractCallTxsRequest, opts ...grpc.CallOption) (*UnsignedContractCallTxsResponse, error) { - out := new(UnsignedContractCallTxsResponse) - err := c.cc.Invoke(ctx, "/gravity.v1migration.Query/UnsignedContractCallTxs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) LastSubmittedEthereumEvent(ctx context.Context, in *LastSubmittedEthereumEventRequest, opts ...grpc.CallOption) (*LastSubmittedEthereumEventResponse, error) { - out := new(LastSubmittedEthereumEventResponse) - err := c.cc.Invoke(ctx, "/gravity.v1migration.Query/LastSubmittedEthereumEvent", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) BatchTxFees(ctx context.Context, in *BatchTxFeesRequest, opts ...grpc.CallOption) (*BatchTxFeesResponse, error) { - out := new(BatchTxFeesResponse) - err := c.cc.Invoke(ctx, "/gravity.v1migration.Query/BatchTxFees", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ERC20ToDenom(ctx context.Context, in *ERC20ToDenomRequest, opts ...grpc.CallOption) (*ERC20ToDenomResponse, error) { - out := new(ERC20ToDenomResponse) - err := c.cc.Invoke(ctx, "/gravity.v1migration.Query/ERC20ToDenom", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) DenomToERC20Params(ctx context.Context, in *DenomToERC20ParamsRequest, opts ...grpc.CallOption) (*DenomToERC20ParamsResponse, error) { - out := new(DenomToERC20ParamsResponse) - err := c.cc.Invoke(ctx, "/gravity.v1migration.Query/DenomToERC20Params", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) DenomToERC20(ctx context.Context, in *DenomToERC20Request, opts ...grpc.CallOption) (*DenomToERC20Response, error) { - out := new(DenomToERC20Response) - err := c.cc.Invoke(ctx, "/gravity.v1migration.Query/DenomToERC20", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) BatchedSendToEthereums(ctx context.Context, in *BatchedSendToEthereumsRequest, opts ...grpc.CallOption) (*BatchedSendToEthereumsResponse, error) { - out := new(BatchedSendToEthereumsResponse) - err := c.cc.Invoke(ctx, "/gravity.v1migration.Query/BatchedSendToEthereums", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) UnbatchedSendToEthereums(ctx context.Context, in *UnbatchedSendToEthereumsRequest, opts ...grpc.CallOption) (*UnbatchedSendToEthereumsResponse, error) { - out := new(UnbatchedSendToEthereumsResponse) - err := c.cc.Invoke(ctx, "/gravity.v1migration.Query/UnbatchedSendToEthereums", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) DelegateKeysByValidator(ctx context.Context, in *DelegateKeysByValidatorRequest, opts ...grpc.CallOption) (*DelegateKeysByValidatorResponse, error) { - out := new(DelegateKeysByValidatorResponse) - err := c.cc.Invoke(ctx, "/gravity.v1migration.Query/DelegateKeysByValidator", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) DelegateKeysByEthereumSigner(ctx context.Context, in *DelegateKeysByEthereumSignerRequest, opts ...grpc.CallOption) (*DelegateKeysByEthereumSignerResponse, error) { - out := new(DelegateKeysByEthereumSignerResponse) - err := c.cc.Invoke(ctx, "/gravity.v1migration.Query/DelegateKeysByEthereumSigner", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) DelegateKeysByOrchestrator(ctx context.Context, in *DelegateKeysByOrchestratorRequest, opts ...grpc.CallOption) (*DelegateKeysByOrchestratorResponse, error) { - out := new(DelegateKeysByOrchestratorResponse) - err := c.cc.Invoke(ctx, "/gravity.v1migration.Query/DelegateKeysByOrchestrator", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) DelegateKeys(ctx context.Context, in *DelegateKeysRequest, opts ...grpc.CallOption) (*DelegateKeysResponse, error) { - out := new(DelegateKeysResponse) - err := c.cc.Invoke(ctx, "/gravity.v1migration.Query/DelegateKeys", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -type QueryServer interface { - // Module parameters query - Params(context.Context, *ParamsRequest) (*ParamsResponse, error) - // get info on individual outgoing data - SignerSetTx(context.Context, *SignerSetTxRequest) (*SignerSetTxResponse, error) - LatestSignerSetTx(context.Context, *LatestSignerSetTxRequest) (*SignerSetTxResponse, error) - BatchTx(context.Context, *BatchTxRequest) (*BatchTxResponse, error) - ContractCallTx(context.Context, *ContractCallTxRequest) (*ContractCallTxResponse, error) - // get collections of outgoing traffic from the bridge - SignerSetTxs(context.Context, *SignerSetTxsRequest) (*SignerSetTxsResponse, error) - BatchTxs(context.Context, *BatchTxsRequest) (*BatchTxsResponse, error) - ContractCallTxs(context.Context, *ContractCallTxsRequest) (*ContractCallTxsResponse, error) - // TODO: can/should we group these into one endpoint? - SignerSetTxConfirmations(context.Context, *SignerSetTxConfirmationsRequest) (*SignerSetTxConfirmationsResponse, error) - BatchTxConfirmations(context.Context, *BatchTxConfirmationsRequest) (*BatchTxConfirmationsResponse, error) - ContractCallTxConfirmations(context.Context, *ContractCallTxConfirmationsRequest) (*ContractCallTxConfirmationsResponse, error) - // pending ethereum signature queries for orchestrators to figure out which - // signatures they are missing - // TODO: can/should we group this into one endpoint? - UnsignedSignerSetTxs(context.Context, *UnsignedSignerSetTxsRequest) (*UnsignedSignerSetTxsResponse, error) - UnsignedBatchTxs(context.Context, *UnsignedBatchTxsRequest) (*UnsignedBatchTxsResponse, error) - UnsignedContractCallTxs(context.Context, *UnsignedContractCallTxsRequest) (*UnsignedContractCallTxsResponse, error) - LastSubmittedEthereumEvent(context.Context, *LastSubmittedEthereumEventRequest) (*LastSubmittedEthereumEventResponse, error) - // Queries the fees for all pending batches, results are returned in sdk.Coin - // (fee_amount_int)(contract_address) style - BatchTxFees(context.Context, *BatchTxFeesRequest) (*BatchTxFeesResponse, error) - // Query for info about denoms tracked by gravity - ERC20ToDenom(context.Context, *ERC20ToDenomRequest) (*ERC20ToDenomResponse, error) - // DenomToERC20Params implements a query that allows ERC-20 parameter - // information to be retrieved by a Cosmos base denomination. - DenomToERC20Params(context.Context, *DenomToERC20ParamsRequest) (*DenomToERC20ParamsResponse, error) - // Query for info about denoms tracked by gravity - DenomToERC20(context.Context, *DenomToERC20Request) (*DenomToERC20Response, error) - // Query for batch send to ethereums - BatchedSendToEthereums(context.Context, *BatchedSendToEthereumsRequest) (*BatchedSendToEthereumsResponse, error) - // Query for unbatched send to ethereums - UnbatchedSendToEthereums(context.Context, *UnbatchedSendToEthereumsRequest) (*UnbatchedSendToEthereumsResponse, error) - // delegate keys - DelegateKeysByValidator(context.Context, *DelegateKeysByValidatorRequest) (*DelegateKeysByValidatorResponse, error) - DelegateKeysByEthereumSigner(context.Context, *DelegateKeysByEthereumSignerRequest) (*DelegateKeysByEthereumSignerResponse, error) - DelegateKeysByOrchestrator(context.Context, *DelegateKeysByOrchestratorRequest) (*DelegateKeysByOrchestratorResponse, error) - DelegateKeys(context.Context, *DelegateKeysRequest) (*DelegateKeysResponse, error) -} - -// UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (*UnimplementedQueryServer) Params(ctx context.Context, req *ParamsRequest) (*ParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") -} -func (*UnimplementedQueryServer) SignerSetTx(ctx context.Context, req *SignerSetTxRequest) (*SignerSetTxResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SignerSetTx not implemented") -} -func (*UnimplementedQueryServer) LatestSignerSetTx(ctx context.Context, req *LatestSignerSetTxRequest) (*SignerSetTxResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LatestSignerSetTx not implemented") -} -func (*UnimplementedQueryServer) BatchTx(ctx context.Context, req *BatchTxRequest) (*BatchTxResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BatchTx not implemented") -} -func (*UnimplementedQueryServer) ContractCallTx(ctx context.Context, req *ContractCallTxRequest) (*ContractCallTxResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ContractCallTx not implemented") -} -func (*UnimplementedQueryServer) SignerSetTxs(ctx context.Context, req *SignerSetTxsRequest) (*SignerSetTxsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SignerSetTxs not implemented") -} -func (*UnimplementedQueryServer) BatchTxs(ctx context.Context, req *BatchTxsRequest) (*BatchTxsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BatchTxs not implemented") -} -func (*UnimplementedQueryServer) ContractCallTxs(ctx context.Context, req *ContractCallTxsRequest) (*ContractCallTxsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ContractCallTxs not implemented") -} -func (*UnimplementedQueryServer) SignerSetTxConfirmations(ctx context.Context, req *SignerSetTxConfirmationsRequest) (*SignerSetTxConfirmationsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SignerSetTxConfirmations not implemented") -} -func (*UnimplementedQueryServer) BatchTxConfirmations(ctx context.Context, req *BatchTxConfirmationsRequest) (*BatchTxConfirmationsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BatchTxConfirmations not implemented") -} -func (*UnimplementedQueryServer) ContractCallTxConfirmations(ctx context.Context, req *ContractCallTxConfirmationsRequest) (*ContractCallTxConfirmationsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ContractCallTxConfirmations not implemented") -} -func (*UnimplementedQueryServer) UnsignedSignerSetTxs(ctx context.Context, req *UnsignedSignerSetTxsRequest) (*UnsignedSignerSetTxsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnsignedSignerSetTxs not implemented") -} -func (*UnimplementedQueryServer) UnsignedBatchTxs(ctx context.Context, req *UnsignedBatchTxsRequest) (*UnsignedBatchTxsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnsignedBatchTxs not implemented") -} -func (*UnimplementedQueryServer) UnsignedContractCallTxs(ctx context.Context, req *UnsignedContractCallTxsRequest) (*UnsignedContractCallTxsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnsignedContractCallTxs not implemented") -} -func (*UnimplementedQueryServer) LastSubmittedEthereumEvent(ctx context.Context, req *LastSubmittedEthereumEventRequest) (*LastSubmittedEthereumEventResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LastSubmittedEthereumEvent not implemented") -} -func (*UnimplementedQueryServer) BatchTxFees(ctx context.Context, req *BatchTxFeesRequest) (*BatchTxFeesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BatchTxFees not implemented") -} -func (*UnimplementedQueryServer) ERC20ToDenom(ctx context.Context, req *ERC20ToDenomRequest) (*ERC20ToDenomResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ERC20ToDenom not implemented") -} -func (*UnimplementedQueryServer) DenomToERC20Params(ctx context.Context, req *DenomToERC20ParamsRequest) (*DenomToERC20ParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DenomToERC20Params not implemented") -} -func (*UnimplementedQueryServer) DenomToERC20(ctx context.Context, req *DenomToERC20Request) (*DenomToERC20Response, error) { - return nil, status.Errorf(codes.Unimplemented, "method DenomToERC20 not implemented") -} -func (*UnimplementedQueryServer) BatchedSendToEthereums(ctx context.Context, req *BatchedSendToEthereumsRequest) (*BatchedSendToEthereumsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BatchedSendToEthereums not implemented") -} -func (*UnimplementedQueryServer) UnbatchedSendToEthereums(ctx context.Context, req *UnbatchedSendToEthereumsRequest) (*UnbatchedSendToEthereumsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnbatchedSendToEthereums not implemented") -} -func (*UnimplementedQueryServer) DelegateKeysByValidator(ctx context.Context, req *DelegateKeysByValidatorRequest) (*DelegateKeysByValidatorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DelegateKeysByValidator not implemented") -} -func (*UnimplementedQueryServer) DelegateKeysByEthereumSigner(ctx context.Context, req *DelegateKeysByEthereumSignerRequest) (*DelegateKeysByEthereumSignerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DelegateKeysByEthereumSigner not implemented") -} -func (*UnimplementedQueryServer) DelegateKeysByOrchestrator(ctx context.Context, req *DelegateKeysByOrchestratorRequest) (*DelegateKeysByOrchestratorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DelegateKeysByOrchestrator not implemented") -} -func (*UnimplementedQueryServer) DelegateKeys(ctx context.Context, req *DelegateKeysRequest) (*DelegateKeysResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DelegateKeys not implemented") -} - -func RegisterQueryServer(s grpc1.Server, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) -} - -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1migration.Query/Params", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*ParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_SignerSetTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignerSetTxRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).SignerSetTx(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1migration.Query/SignerSetTx", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).SignerSetTx(ctx, req.(*SignerSetTxRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_LatestSignerSetTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LatestSignerSetTxRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).LatestSignerSetTx(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1migration.Query/LatestSignerSetTx", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).LatestSignerSetTx(ctx, req.(*LatestSignerSetTxRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_BatchTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BatchTxRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).BatchTx(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1migration.Query/BatchTx", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).BatchTx(ctx, req.(*BatchTxRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ContractCallTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ContractCallTxRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ContractCallTx(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1migration.Query/ContractCallTx", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ContractCallTx(ctx, req.(*ContractCallTxRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_SignerSetTxs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignerSetTxsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).SignerSetTxs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1migration.Query/SignerSetTxs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).SignerSetTxs(ctx, req.(*SignerSetTxsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_BatchTxs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BatchTxsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).BatchTxs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1migration.Query/BatchTxs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).BatchTxs(ctx, req.(*BatchTxsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ContractCallTxs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ContractCallTxsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ContractCallTxs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1migration.Query/ContractCallTxs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ContractCallTxs(ctx, req.(*ContractCallTxsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_SignerSetTxConfirmations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignerSetTxConfirmationsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).SignerSetTxConfirmations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1migration.Query/SignerSetTxConfirmations", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).SignerSetTxConfirmations(ctx, req.(*SignerSetTxConfirmationsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_BatchTxConfirmations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BatchTxConfirmationsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).BatchTxConfirmations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1migration.Query/BatchTxConfirmations", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).BatchTxConfirmations(ctx, req.(*BatchTxConfirmationsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ContractCallTxConfirmations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ContractCallTxConfirmationsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ContractCallTxConfirmations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1migration.Query/ContractCallTxConfirmations", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ContractCallTxConfirmations(ctx, req.(*ContractCallTxConfirmationsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_UnsignedSignerSetTxs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UnsignedSignerSetTxsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).UnsignedSignerSetTxs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1migration.Query/UnsignedSignerSetTxs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).UnsignedSignerSetTxs(ctx, req.(*UnsignedSignerSetTxsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_UnsignedBatchTxs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UnsignedBatchTxsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).UnsignedBatchTxs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1migration.Query/UnsignedBatchTxs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).UnsignedBatchTxs(ctx, req.(*UnsignedBatchTxsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_UnsignedContractCallTxs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UnsignedContractCallTxsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).UnsignedContractCallTxs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1migration.Query/UnsignedContractCallTxs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).UnsignedContractCallTxs(ctx, req.(*UnsignedContractCallTxsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_LastSubmittedEthereumEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LastSubmittedEthereumEventRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).LastSubmittedEthereumEvent(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1migration.Query/LastSubmittedEthereumEvent", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).LastSubmittedEthereumEvent(ctx, req.(*LastSubmittedEthereumEventRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_BatchTxFees_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BatchTxFeesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).BatchTxFees(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1migration.Query/BatchTxFees", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).BatchTxFees(ctx, req.(*BatchTxFeesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ERC20ToDenom_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ERC20ToDenomRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ERC20ToDenom(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1migration.Query/ERC20ToDenom", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ERC20ToDenom(ctx, req.(*ERC20ToDenomRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_DenomToERC20Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DenomToERC20ParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).DenomToERC20Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1migration.Query/DenomToERC20Params", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DenomToERC20Params(ctx, req.(*DenomToERC20ParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_DenomToERC20_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DenomToERC20Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).DenomToERC20(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1migration.Query/DenomToERC20", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DenomToERC20(ctx, req.(*DenomToERC20Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_BatchedSendToEthereums_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BatchedSendToEthereumsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).BatchedSendToEthereums(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1migration.Query/BatchedSendToEthereums", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).BatchedSendToEthereums(ctx, req.(*BatchedSendToEthereumsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_UnbatchedSendToEthereums_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UnbatchedSendToEthereumsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).UnbatchedSendToEthereums(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1migration.Query/UnbatchedSendToEthereums", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).UnbatchedSendToEthereums(ctx, req.(*UnbatchedSendToEthereumsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_DelegateKeysByValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DelegateKeysByValidatorRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).DelegateKeysByValidator(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1migration.Query/DelegateKeysByValidator", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DelegateKeysByValidator(ctx, req.(*DelegateKeysByValidatorRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_DelegateKeysByEthereumSigner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DelegateKeysByEthereumSignerRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).DelegateKeysByEthereumSigner(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1migration.Query/DelegateKeysByEthereumSigner", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DelegateKeysByEthereumSigner(ctx, req.(*DelegateKeysByEthereumSignerRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_DelegateKeysByOrchestrator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DelegateKeysByOrchestratorRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).DelegateKeysByOrchestrator(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1migration.Query/DelegateKeysByOrchestrator", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DelegateKeysByOrchestrator(ctx, req.(*DelegateKeysByOrchestratorRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_DelegateKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DelegateKeysRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).DelegateKeys(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gravity.v1migration.Query/DelegateKeys", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DelegateKeys(ctx, req.(*DelegateKeysRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "gravity.v1migration.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, - { - MethodName: "SignerSetTx", - Handler: _Query_SignerSetTx_Handler, - }, - { - MethodName: "LatestSignerSetTx", - Handler: _Query_LatestSignerSetTx_Handler, - }, - { - MethodName: "BatchTx", - Handler: _Query_BatchTx_Handler, - }, - { - MethodName: "ContractCallTx", - Handler: _Query_ContractCallTx_Handler, - }, - { - MethodName: "SignerSetTxs", - Handler: _Query_SignerSetTxs_Handler, - }, - { - MethodName: "BatchTxs", - Handler: _Query_BatchTxs_Handler, - }, - { - MethodName: "ContractCallTxs", - Handler: _Query_ContractCallTxs_Handler, - }, - { - MethodName: "SignerSetTxConfirmations", - Handler: _Query_SignerSetTxConfirmations_Handler, - }, - { - MethodName: "BatchTxConfirmations", - Handler: _Query_BatchTxConfirmations_Handler, - }, - { - MethodName: "ContractCallTxConfirmations", - Handler: _Query_ContractCallTxConfirmations_Handler, - }, - { - MethodName: "UnsignedSignerSetTxs", - Handler: _Query_UnsignedSignerSetTxs_Handler, - }, - { - MethodName: "UnsignedBatchTxs", - Handler: _Query_UnsignedBatchTxs_Handler, - }, - { - MethodName: "UnsignedContractCallTxs", - Handler: _Query_UnsignedContractCallTxs_Handler, - }, - { - MethodName: "LastSubmittedEthereumEvent", - Handler: _Query_LastSubmittedEthereumEvent_Handler, - }, - { - MethodName: "BatchTxFees", - Handler: _Query_BatchTxFees_Handler, - }, - { - MethodName: "ERC20ToDenom", - Handler: _Query_ERC20ToDenom_Handler, - }, - { - MethodName: "DenomToERC20Params", - Handler: _Query_DenomToERC20Params_Handler, - }, - { - MethodName: "DenomToERC20", - Handler: _Query_DenomToERC20_Handler, - }, - { - MethodName: "BatchedSendToEthereums", - Handler: _Query_BatchedSendToEthereums_Handler, - }, - { - MethodName: "UnbatchedSendToEthereums", - Handler: _Query_UnbatchedSendToEthereums_Handler, - }, - { - MethodName: "DelegateKeysByValidator", - Handler: _Query_DelegateKeysByValidator_Handler, - }, - { - MethodName: "DelegateKeysByEthereumSigner", - Handler: _Query_DelegateKeysByEthereumSigner_Handler, - }, - { - MethodName: "DelegateKeysByOrchestrator", - Handler: _Query_DelegateKeysByOrchestrator_Handler, - }, - { - MethodName: "DelegateKeys", - Handler: _Query_DelegateKeys_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "gravity/v1migration/query.proto", -} - -func (m *ParamsRequest) 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 *ParamsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *ParamsResponse) 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 *ParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *SignerSetTxRequest) 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 *SignerSetTxRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignerSetTxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SignerSetNonce != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.SignerSetNonce)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *LatestSignerSetTxRequest) 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 *LatestSignerSetTxRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LatestSignerSetTxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *SignerSetTxResponse) 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 *SignerSetTxResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignerSetTxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SignerSet != nil { - { - size, err := m.SignerSet.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BatchTxRequest) 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 *BatchTxRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BatchTxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.BatchNonce != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.BatchNonce)) - i-- - dAtA[i] = 0x10 - } - if len(m.TokenContract) > 0 { - i -= len(m.TokenContract) - copy(dAtA[i:], m.TokenContract) - i = encodeVarintQuery(dAtA, i, uint64(len(m.TokenContract))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BatchTxResponse) 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 *BatchTxResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BatchTxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Batch != nil { - { - size, err := m.Batch.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ContractCallTxRequest) 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 *ContractCallTxRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ContractCallTxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.InvalidationNonce != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.InvalidationNonce)) - i-- - dAtA[i] = 0x10 - } - if len(m.InvalidationScope) > 0 { - i -= len(m.InvalidationScope) - copy(dAtA[i:], m.InvalidationScope) - i = encodeVarintQuery(dAtA, i, uint64(len(m.InvalidationScope))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ContractCallTxResponse) 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 *ContractCallTxResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ContractCallTxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.LogicCall != nil { - { - size, err := m.LogicCall.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SignerSetTxConfirmationsRequest) 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 *SignerSetTxConfirmationsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignerSetTxConfirmationsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SignerSetNonce != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.SignerSetNonce)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *SignerSetTxConfirmationsResponse) 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 *SignerSetTxConfirmationsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignerSetTxConfirmationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signatures) > 0 { - for iNdEx := len(m.Signatures) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Signatures[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *SignerSetTxsRequest) 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 *SignerSetTxsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignerSetTxsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SignerSetTxsResponse) 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 *SignerSetTxsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignerSetTxsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.SignerSets) > 0 { - for iNdEx := len(m.SignerSets) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.SignerSets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *BatchTxsRequest) 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 *BatchTxsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BatchTxsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BatchTxsResponse) 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 *BatchTxsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BatchTxsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Batches) > 0 { - for iNdEx := len(m.Batches) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Batches[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ContractCallTxsRequest) 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 *ContractCallTxsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ContractCallTxsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ContractCallTxsResponse) 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 *ContractCallTxsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ContractCallTxsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Calls) > 0 { - for iNdEx := len(m.Calls) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Calls[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *UnsignedSignerSetTxsRequest) 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 *UnsignedSignerSetTxsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UnsignedSignerSetTxsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *UnsignedSignerSetTxsResponse) 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 *UnsignedSignerSetTxsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UnsignedSignerSetTxsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SignerSets) > 0 { - for iNdEx := len(m.SignerSets) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.SignerSets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *UnsignedBatchTxsRequest) 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 *UnsignedBatchTxsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UnsignedBatchTxsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *UnsignedBatchTxsResponse) 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 *UnsignedBatchTxsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UnsignedBatchTxsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Batches) > 0 { - for iNdEx := len(m.Batches) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Batches[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *UnsignedContractCallTxsRequest) 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 *UnsignedContractCallTxsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UnsignedContractCallTxsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *UnsignedContractCallTxsResponse) 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 *UnsignedContractCallTxsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UnsignedContractCallTxsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Calls) > 0 { - for iNdEx := len(m.Calls) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Calls[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *BatchTxFeesRequest) 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 *BatchTxFeesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BatchTxFeesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *BatchTxFeesResponse) 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 *BatchTxFeesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BatchTxFeesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Fees) > 0 { - for iNdEx := len(m.Fees) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Fees[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ContractCallTxConfirmationsRequest) 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 *ContractCallTxConfirmationsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ContractCallTxConfirmationsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.InvalidationNonce != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.InvalidationNonce)) - i-- - dAtA[i] = 0x10 - } - if len(m.InvalidationScope) > 0 { - i -= len(m.InvalidationScope) - copy(dAtA[i:], m.InvalidationScope) - i = encodeVarintQuery(dAtA, i, uint64(len(m.InvalidationScope))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ContractCallTxConfirmationsResponse) 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 *ContractCallTxConfirmationsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ContractCallTxConfirmationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signatures) > 0 { - for iNdEx := len(m.Signatures) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Signatures[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *BatchTxConfirmationsRequest) 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 *BatchTxConfirmationsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BatchTxConfirmationsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.TokenContract) > 0 { - i -= len(m.TokenContract) - copy(dAtA[i:], m.TokenContract) - i = encodeVarintQuery(dAtA, i, uint64(len(m.TokenContract))) - i-- - dAtA[i] = 0x12 - } - if m.BatchNonce != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.BatchNonce)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *BatchTxConfirmationsResponse) 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 *BatchTxConfirmationsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BatchTxConfirmationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signatures) > 0 { - for iNdEx := len(m.Signatures) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Signatures[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *LastSubmittedEthereumEventRequest) 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 *LastSubmittedEthereumEventRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LastSubmittedEthereumEventRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LastSubmittedEthereumEventResponse) 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 *LastSubmittedEthereumEventResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LastSubmittedEthereumEventResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.EventNonce != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.EventNonce)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ERC20ToDenomRequest) 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 *ERC20ToDenomRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ERC20ToDenomRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Erc20) > 0 { - i -= len(m.Erc20) - copy(dAtA[i:], m.Erc20) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Erc20))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ERC20ToDenomResponse) 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 *ERC20ToDenomResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ERC20ToDenomResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.CosmosOriginated { - i-- - if m.CosmosOriginated { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DenomToERC20ParamsRequest) 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 *DenomToERC20ParamsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DenomToERC20ParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DenomToERC20ParamsResponse) 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 *DenomToERC20ParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DenomToERC20ParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Erc20Decimals != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Erc20Decimals)) - i-- - dAtA[i] = 0x20 - } - if len(m.Erc20Symbol) > 0 { - i -= len(m.Erc20Symbol) - copy(dAtA[i:], m.Erc20Symbol) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Erc20Symbol))) - i-- - dAtA[i] = 0x1a - } - if len(m.Erc20Name) > 0 { - i -= len(m.Erc20Name) - copy(dAtA[i:], m.Erc20Name) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Erc20Name))) - i-- - dAtA[i] = 0x12 - } - if len(m.BaseDenom) > 0 { - i -= len(m.BaseDenom) - copy(dAtA[i:], m.BaseDenom) - i = encodeVarintQuery(dAtA, i, uint64(len(m.BaseDenom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DenomToERC20Request) 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 *DenomToERC20Request) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DenomToERC20Request) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DenomToERC20Response) 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 *DenomToERC20Response) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DenomToERC20Response) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.CosmosOriginated { - i-- - if m.CosmosOriginated { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(m.Erc20) > 0 { - i -= len(m.Erc20) - copy(dAtA[i:], m.Erc20) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Erc20))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DelegateKeysByValidatorRequest) 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 *DelegateKeysByValidatorRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DelegateKeysByValidatorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ValidatorAddress) > 0 { - i -= len(m.ValidatorAddress) - copy(dAtA[i:], m.ValidatorAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DelegateKeysByValidatorResponse) 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 *DelegateKeysByValidatorResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DelegateKeysByValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.OrchestratorAddress) > 0 { - i -= len(m.OrchestratorAddress) - copy(dAtA[i:], m.OrchestratorAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.OrchestratorAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.EthAddress) > 0 { - i -= len(m.EthAddress) - copy(dAtA[i:], m.EthAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.EthAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DelegateKeysByEthereumSignerRequest) 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 *DelegateKeysByEthereumSignerRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DelegateKeysByEthereumSignerRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.EthereumSigner) > 0 { - i -= len(m.EthereumSigner) - copy(dAtA[i:], m.EthereumSigner) - i = encodeVarintQuery(dAtA, i, uint64(len(m.EthereumSigner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DelegateKeysByEthereumSignerResponse) 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 *DelegateKeysByEthereumSignerResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DelegateKeysByEthereumSignerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.OrchestratorAddress) > 0 { - i -= len(m.OrchestratorAddress) - copy(dAtA[i:], m.OrchestratorAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.OrchestratorAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.ValidatorAddress) > 0 { - i -= len(m.ValidatorAddress) - copy(dAtA[i:], m.ValidatorAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DelegateKeysByOrchestratorRequest) 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 *DelegateKeysByOrchestratorRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DelegateKeysByOrchestratorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.OrchestratorAddress) > 0 { - i -= len(m.OrchestratorAddress) - copy(dAtA[i:], m.OrchestratorAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.OrchestratorAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DelegateKeysByOrchestratorResponse) 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 *DelegateKeysByOrchestratorResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DelegateKeysByOrchestratorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.EthereumSigner) > 0 { - i -= len(m.EthereumSigner) - copy(dAtA[i:], m.EthereumSigner) - i = encodeVarintQuery(dAtA, i, uint64(len(m.EthereumSigner))) - i-- - dAtA[i] = 0x12 - } - if len(m.ValidatorAddress) > 0 { - i -= len(m.ValidatorAddress) - copy(dAtA[i:], m.ValidatorAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DelegateKeysRequest) 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 *DelegateKeysRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DelegateKeysRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *DelegateKeysResponse) 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 *DelegateKeysResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DelegateKeysResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.DelegateKeys) > 0 { - for iNdEx := len(m.DelegateKeys) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DelegateKeys[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *BatchedSendToEthereumsRequest) 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 *BatchedSendToEthereumsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BatchedSendToEthereumsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SenderAddress) > 0 { - i -= len(m.SenderAddress) - copy(dAtA[i:], m.SenderAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.SenderAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BatchedSendToEthereumsResponse) 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 *BatchedSendToEthereumsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BatchedSendToEthereumsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SendToEthereums) > 0 { - for iNdEx := len(m.SendToEthereums) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.SendToEthereums[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *UnbatchedSendToEthereumsRequest) 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 *UnbatchedSendToEthereumsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UnbatchedSendToEthereumsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.SenderAddress) > 0 { - i -= len(m.SenderAddress) - copy(dAtA[i:], m.SenderAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.SenderAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *UnbatchedSendToEthereumsResponse) 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 *UnbatchedSendToEthereumsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UnbatchedSendToEthereumsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.SendToEthereums) > 0 { - for iNdEx := len(m.SendToEthereums) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.SendToEthereums[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ParamsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *ParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *SignerSetTxRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SignerSetNonce != 0 { - n += 1 + sovQuery(uint64(m.SignerSetNonce)) - } - return n -} - -func (m *LatestSignerSetTxRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *SignerSetTxResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SignerSet != nil { - l = m.SignerSet.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *BatchTxRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.TokenContract) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.BatchNonce != 0 { - n += 1 + sovQuery(uint64(m.BatchNonce)) - } - return n -} - -func (m *BatchTxResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Batch != nil { - l = m.Batch.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *ContractCallTxRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.InvalidationScope) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.InvalidationNonce != 0 { - n += 1 + sovQuery(uint64(m.InvalidationNonce)) - } - return n -} - -func (m *ContractCallTxResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.LogicCall != nil { - l = m.LogicCall.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *SignerSetTxConfirmationsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SignerSetNonce != 0 { - n += 1 + sovQuery(uint64(m.SignerSetNonce)) - } - return n -} - -func (m *SignerSetTxConfirmationsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Signatures) > 0 { - for _, e := range m.Signatures { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func (m *SignerSetTxsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *SignerSetTxsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.SignerSets) > 0 { - for _, e := range m.SignerSets { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *BatchTxsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *BatchTxsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Batches) > 0 { - for _, e := range m.Batches { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *ContractCallTxsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *ContractCallTxsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Calls) > 0 { - for _, e := range m.Calls { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *UnsignedSignerSetTxsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *UnsignedSignerSetTxsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.SignerSets) > 0 { - for _, e := range m.SignerSets { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func (m *UnsignedBatchTxsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *UnsignedBatchTxsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Batches) > 0 { - for _, e := range m.Batches { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func (m *UnsignedContractCallTxsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *UnsignedContractCallTxsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Calls) > 0 { - for _, e := range m.Calls { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func (m *BatchTxFeesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *BatchTxFeesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Fees) > 0 { - for _, e := range m.Fees { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func (m *ContractCallTxConfirmationsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.InvalidationScope) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.InvalidationNonce != 0 { - n += 1 + sovQuery(uint64(m.InvalidationNonce)) - } - return n -} - -func (m *ContractCallTxConfirmationsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Signatures) > 0 { - for _, e := range m.Signatures { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func (m *BatchTxConfirmationsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BatchNonce != 0 { - n += 1 + sovQuery(uint64(m.BatchNonce)) - } - l = len(m.TokenContract) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *BatchTxConfirmationsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Signatures) > 0 { - for _, e := range m.Signatures { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func (m *LastSubmittedEthereumEventRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *LastSubmittedEthereumEventResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.EventNonce != 0 { - n += 1 + sovQuery(uint64(m.EventNonce)) - } - return n -} - -func (m *ERC20ToDenomRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Erc20) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *ERC20ToDenomResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.CosmosOriginated { - n += 2 - } - return n -} - -func (m *DenomToERC20ParamsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *DenomToERC20ParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.BaseDenom) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Erc20Name) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Erc20Symbol) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.Erc20Decimals != 0 { - n += 1 + sovQuery(uint64(m.Erc20Decimals)) - } - return n -} - -func (m *DenomToERC20Request) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *DenomToERC20Response) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Erc20) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.CosmosOriginated { - n += 2 - } - return n -} - -func (m *DelegateKeysByValidatorRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ValidatorAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *DelegateKeysByValidatorResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.EthAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.OrchestratorAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *DelegateKeysByEthereumSignerRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.EthereumSigner) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *DelegateKeysByEthereumSignerResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ValidatorAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.OrchestratorAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *DelegateKeysByOrchestratorRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.OrchestratorAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *DelegateKeysByOrchestratorResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ValidatorAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.EthereumSigner) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *DelegateKeysRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *DelegateKeysResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.DelegateKeys) > 0 { - for _, e := range m.DelegateKeys { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func (m *BatchedSendToEthereumsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SenderAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *BatchedSendToEthereumsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.SendToEthereums) > 0 { - for _, e := range m.SendToEthereums { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func (m *UnbatchedSendToEthereumsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SenderAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *UnbatchedSendToEthereumsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.SendToEthereums) > 0 { - for _, e := range m.SendToEthereums { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ParamsRequest) 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 ErrIntOverflowQuery - } - 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: ParamsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ParamsResponse) 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 ErrIntOverflowQuery - } - 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: ParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignerSetTxRequest) 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 ErrIntOverflowQuery - } - 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: SignerSetTxRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignerSetTxRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SignerSetNonce", wireType) - } - m.SignerSetNonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SignerSetNonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LatestSignerSetTxRequest) 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 ErrIntOverflowQuery - } - 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: LatestSignerSetTxRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LatestSignerSetTxRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignerSetTxResponse) 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 ErrIntOverflowQuery - } - 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: SignerSetTxResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignerSetTxResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SignerSet", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SignerSet == nil { - m.SignerSet = &SignerSetTx{} - } - if err := m.SignerSet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BatchTxRequest) 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 ErrIntOverflowQuery - } - 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: BatchTxRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BatchTxRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenContract", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TokenContract = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchNonce", wireType) - } - m.BatchNonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BatchNonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BatchTxResponse) 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 ErrIntOverflowQuery - } - 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: BatchTxResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BatchTxResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Batch", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Batch == nil { - m.Batch = &BatchTx{} - } - if err := m.Batch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ContractCallTxRequest) 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 ErrIntOverflowQuery - } - 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: ContractCallTxRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ContractCallTxRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InvalidationScope", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.InvalidationScope = append(m.InvalidationScope[:0], dAtA[iNdEx:postIndex]...) - if m.InvalidationScope == nil { - m.InvalidationScope = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InvalidationNonce", wireType) - } - m.InvalidationNonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.InvalidationNonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ContractCallTxResponse) 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 ErrIntOverflowQuery - } - 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: ContractCallTxResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ContractCallTxResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LogicCall", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LogicCall == nil { - m.LogicCall = &ContractCallTx{} - } - if err := m.LogicCall.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignerSetTxConfirmationsRequest) 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 ErrIntOverflowQuery - } - 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: SignerSetTxConfirmationsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignerSetTxConfirmationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SignerSetNonce", wireType) - } - m.SignerSetNonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SignerSetNonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignerSetTxConfirmationsResponse) 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 ErrIntOverflowQuery - } - 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: SignerSetTxConfirmationsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignerSetTxConfirmationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signatures = append(m.Signatures, &SignerSetTxConfirmation{}) - if err := m.Signatures[len(m.Signatures)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignerSetTxsRequest) 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 ErrIntOverflowQuery - } - 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: SignerSetTxsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignerSetTxsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignerSetTxsResponse) 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 ErrIntOverflowQuery - } - 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: SignerSetTxsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignerSetTxsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SignerSets", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SignerSets = append(m.SignerSets, &SignerSetTx{}) - if err := m.SignerSets[len(m.SignerSets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BatchTxsRequest) 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 ErrIntOverflowQuery - } - 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: BatchTxsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BatchTxsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BatchTxsResponse) 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 ErrIntOverflowQuery - } - 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: BatchTxsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BatchTxsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Batches", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Batches = append(m.Batches, &BatchTx{}) - if err := m.Batches[len(m.Batches)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ContractCallTxsRequest) 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 ErrIntOverflowQuery - } - 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: ContractCallTxsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ContractCallTxsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ContractCallTxsResponse) 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 ErrIntOverflowQuery - } - 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: ContractCallTxsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ContractCallTxsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Calls", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Calls = append(m.Calls, &ContractCallTx{}) - if err := m.Calls[len(m.Calls)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnsignedSignerSetTxsRequest) 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 ErrIntOverflowQuery - } - 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: UnsignedSignerSetTxsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnsignedSignerSetTxsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnsignedSignerSetTxsResponse) 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 ErrIntOverflowQuery - } - 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: UnsignedSignerSetTxsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnsignedSignerSetTxsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SignerSets", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SignerSets = append(m.SignerSets, &SignerSetTx{}) - if err := m.SignerSets[len(m.SignerSets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnsignedBatchTxsRequest) 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 ErrIntOverflowQuery - } - 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: UnsignedBatchTxsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnsignedBatchTxsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnsignedBatchTxsResponse) 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 ErrIntOverflowQuery - } - 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: UnsignedBatchTxsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnsignedBatchTxsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Batches", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Batches = append(m.Batches, &BatchTx{}) - if err := m.Batches[len(m.Batches)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnsignedContractCallTxsRequest) 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 ErrIntOverflowQuery - } - 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: UnsignedContractCallTxsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnsignedContractCallTxsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnsignedContractCallTxsResponse) 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 ErrIntOverflowQuery - } - 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: UnsignedContractCallTxsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnsignedContractCallTxsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Calls", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Calls = append(m.Calls, &ContractCallTx{}) - if err := m.Calls[len(m.Calls)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BatchTxFeesRequest) 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 ErrIntOverflowQuery - } - 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: BatchTxFeesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BatchTxFeesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BatchTxFeesResponse) 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 ErrIntOverflowQuery - } - 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: BatchTxFeesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BatchTxFeesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fees", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Fees = append(m.Fees, types.Coin{}) - if err := m.Fees[len(m.Fees)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ContractCallTxConfirmationsRequest) 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 ErrIntOverflowQuery - } - 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: ContractCallTxConfirmationsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ContractCallTxConfirmationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InvalidationScope", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.InvalidationScope = append(m.InvalidationScope[:0], dAtA[iNdEx:postIndex]...) - if m.InvalidationScope == nil { - m.InvalidationScope = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InvalidationNonce", wireType) - } - m.InvalidationNonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.InvalidationNonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ContractCallTxConfirmationsResponse) 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 ErrIntOverflowQuery - } - 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: ContractCallTxConfirmationsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ContractCallTxConfirmationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signatures = append(m.Signatures, &ContractCallTxConfirmation{}) - if err := m.Signatures[len(m.Signatures)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BatchTxConfirmationsRequest) 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 ErrIntOverflowQuery - } - 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: BatchTxConfirmationsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BatchTxConfirmationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchNonce", wireType) - } - m.BatchNonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BatchNonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenContract", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TokenContract = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BatchTxConfirmationsResponse) 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 ErrIntOverflowQuery - } - 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: BatchTxConfirmationsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BatchTxConfirmationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signatures = append(m.Signatures, &BatchTxConfirmation{}) - if err := m.Signatures[len(m.Signatures)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LastSubmittedEthereumEventRequest) 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 ErrIntOverflowQuery - } - 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: LastSubmittedEthereumEventRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LastSubmittedEthereumEventRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LastSubmittedEthereumEventResponse) 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 ErrIntOverflowQuery - } - 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: LastSubmittedEthereumEventResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LastSubmittedEthereumEventResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EventNonce", wireType) - } - m.EventNonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EventNonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ERC20ToDenomRequest) 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 ErrIntOverflowQuery - } - 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: ERC20ToDenomRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ERC20ToDenomRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Erc20", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Erc20 = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ERC20ToDenomResponse) 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 ErrIntOverflowQuery - } - 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: ERC20ToDenomResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ERC20ToDenomResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CosmosOriginated", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.CosmosOriginated = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DenomToERC20ParamsRequest) 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 ErrIntOverflowQuery - } - 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: DenomToERC20ParamsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DenomToERC20ParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DenomToERC20ParamsResponse) 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 ErrIntOverflowQuery - } - 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: DenomToERC20ParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DenomToERC20ParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BaseDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BaseDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Erc20Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Erc20Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Erc20Symbol", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Erc20Symbol = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Erc20Decimals", wireType) - } - m.Erc20Decimals = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Erc20Decimals |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DenomToERC20Request) 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 ErrIntOverflowQuery - } - 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: DenomToERC20Request: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DenomToERC20Request: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DenomToERC20Response) 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 ErrIntOverflowQuery - } - 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: DenomToERC20Response: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DenomToERC20Response: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Erc20", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Erc20 = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CosmosOriginated", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.CosmosOriginated = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DelegateKeysByValidatorRequest) 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 ErrIntOverflowQuery - } - 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: DelegateKeysByValidatorRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DelegateKeysByValidatorRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DelegateKeysByValidatorResponse) 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 ErrIntOverflowQuery - } - 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: DelegateKeysByValidatorResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DelegateKeysByValidatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EthAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EthAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OrchestratorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OrchestratorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DelegateKeysByEthereumSignerRequest) 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 ErrIntOverflowQuery - } - 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: DelegateKeysByEthereumSignerRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DelegateKeysByEthereumSignerRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EthereumSigner", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EthereumSigner = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DelegateKeysByEthereumSignerResponse) 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 ErrIntOverflowQuery - } - 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: DelegateKeysByEthereumSignerResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DelegateKeysByEthereumSignerResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OrchestratorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OrchestratorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DelegateKeysByOrchestratorRequest) 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 ErrIntOverflowQuery - } - 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: DelegateKeysByOrchestratorRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DelegateKeysByOrchestratorRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OrchestratorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OrchestratorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DelegateKeysByOrchestratorResponse) 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 ErrIntOverflowQuery - } - 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: DelegateKeysByOrchestratorResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DelegateKeysByOrchestratorResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EthereumSigner", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EthereumSigner = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DelegateKeysRequest) 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 ErrIntOverflowQuery - } - 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: DelegateKeysRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DelegateKeysRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DelegateKeysResponse) 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 ErrIntOverflowQuery - } - 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: DelegateKeysResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DelegateKeysResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegateKeys", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DelegateKeys = append(m.DelegateKeys, &MsgDelegateKeys{}) - if err := m.DelegateKeys[len(m.DelegateKeys)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BatchedSendToEthereumsRequest) 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 ErrIntOverflowQuery - } - 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: BatchedSendToEthereumsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BatchedSendToEthereumsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SenderAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BatchedSendToEthereumsResponse) 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 ErrIntOverflowQuery - } - 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: BatchedSendToEthereumsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BatchedSendToEthereumsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SendToEthereums", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SendToEthereums = append(m.SendToEthereums, &SendToEthereum{}) - if err := m.SendToEthereums[len(m.SendToEthereums)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnbatchedSendToEthereumsRequest) 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 ErrIntOverflowQuery - } - 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: UnbatchedSendToEthereumsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnbatchedSendToEthereumsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SenderAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnbatchedSendToEthereumsResponse) 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 ErrIntOverflowQuery - } - 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: UnbatchedSendToEthereumsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnbatchedSendToEthereumsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SendToEthereums", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SendToEthereums = append(m.SendToEthereums, &SendToEthereum{}) - if err := m.SendToEthereums[len(m.SendToEthereums)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipQuery(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, ErrIntOverflowQuery - } - 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, ErrIntOverflowQuery - } - 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, ErrIntOverflowQuery - } - 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, ErrInvalidLengthQuery - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupQuery - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthQuery - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") -) diff --git a/module/x/gravity/migrations/v1/types/types.go b/module/x/gravity/migrations/v1/types/types.go deleted file mode 100644 index a940cd706..000000000 --- a/module/x/gravity/migrations/v1/types/types.go +++ /dev/null @@ -1,132 +0,0 @@ -package types - -import ( - "bytes" - "crypto/sha256" - "fmt" - "math" - "sort" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/ethereum/go-ethereum/common" -) - -////////////////////////////////////// -// Ethereum Signer(S) // -////////////////////////////////////// - -// ValidateBasic performs stateless checks on validity -func (b *EthereumSigner) ValidateBasic() error { - if !common.IsHexAddress(b.EthereumAddress) { - return fmt.Errorf("invalid ethereum address") - } - return nil -} - -// EthereumSigners is the sorted set of validator data for Ethereum bridge MultiSig set -type EthereumSigners []*EthereumSigner - -// Sort sorts the validators by power -func (b EthereumSigners) Sort() { - sort.Slice(b, func(i, j int) bool { - if b[i].Power == b[j].Power { - // Secondary sort on eth address in case powers are equal - return EthereumAddrLessThan(b[i].EthereumAddress, b[j].EthereumAddress) - } - return b[i].Power > b[j].Power - }) -} - -// Hash takes the sha256sum of a representation of the signer set -func (b EthereumSigners) Hash() []byte { - b.Sort() - var out bytes.Buffer - for _, s := range b { - out.Write(append(common.HexToAddress(s.EthereumAddress).Bytes(), sdk.Uint64ToBigEndian(s.Power)...)) - } - hash := sha256.Sum256(out.Bytes()) - return hash[:] -} - -// PowerDiff returns the difference in power between two bridge validator sets -// note this is Gravity bridge power *not* Cosmos voting power. Cosmos voting -// power is based on the absolute number of tokens in the staking pool at any given -// time Gravity bridge power is normalized using the equation. -// -// validators cosmos voting power / total cosmos voting power in this block = gravity bridge power / u32_max -// -// As an example if someone has 52% of the Cosmos voting power when a validator set is created their Gravity -// bridge voting power is u32_max * .52 -// -// Normalized voting power dramatically reduces how often we have to produce new validator set updates. For example -// if the total on chain voting power increases by 1% due to inflation, we shouldn't have to generate a new validator -// set, after all the validators retained their relative percentages during inflation and normalized Gravity bridge power -// shows no difference. -func (b EthereumSigners) PowerDiff(c EthereumSigners) float64 { - // loop over b and initialize the map with their powers - powers := map[string]int64{} - for _, bv := range b { - powers[bv.EthereumAddress] = int64(bv.Power) - } - - // subtract c powers from powers in the map, initializing - // uninitialized keys with negative numbers - for _, es := range c { - if val, ok := powers[es.EthereumAddress]; ok { - powers[es.EthereumAddress] = val - int64(es.Power) - } else { - powers[es.EthereumAddress] = -int64(es.Power) - } - } - - var delta int64 - for _, v := range powers { - // NOTE: we care about the absolute value of the changes - delta += absInt(v) - } - - return math.Abs(float64(delta) / float64(math.MaxUint32)) -} - -func absInt(x int64) int64 { - if x < 0 { - x = -x - } - return x -} - -// TotalPower returns the total power in the bridge validator set -func (b EthereumSigners) TotalPower() (out uint64) { - for _, v := range b { - out += v.Power - } - return -} - -// GetPowers returns only the power values for all members -func (b EthereumSigners) GetPowers() []uint64 { - r := make([]uint64, len(b)) - for i := range b { - r[i] = b[i].Power - } - return r -} - -// NewSignerSetTx returns a new valset -func NewSignerSetTx(nonce, height uint64, members EthereumSigners) *SignerSetTx { - members.Sort() - var mem []*EthereumSigner - for _, val := range members { - mem = append(mem, val) - } - return &SignerSetTx{Nonce: nonce, Height: height, Signers: mem} -} - -// GetFees returns the total fees contained within a given batch -func (b BatchTx) GetFees() sdk.Int { - sum := sdk.ZeroInt() - for _, t := range b.Transactions { - sum.Add(t.Erc20Fee.Amount) - } - return sum -} diff --git a/module/x/gravity/migrations/v2/store.go b/module/x/gravity/migrations/v2/store.go deleted file mode 100644 index 9c16a6510..000000000 --- a/module/x/gravity/migrations/v2/store.go +++ /dev/null @@ -1,19 +0,0 @@ -package v2 - -import ( - sdktypes "github.com/cosmos/cosmos-sdk/types" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" -) - -func MigrateParamStore(ctx sdktypes.Context, subspace paramstypes.Subspace) error { - // Don't want to overwrite values if they were set in an upgrade handler - if !subspace.Has(ctx, types.ParamStoreConfirmedOutgoingTxWindow) { - subspace.Set(ctx, types.ParamStoreConfirmedOutgoingTxWindow, types.DefaultParams().ConfirmedOutgoingTxWindow) - } - if !subspace.Has(ctx, types.ParamStoreEthereumEventVoteWindow) { - subspace.Set(ctx, types.ParamStoreEthereumEventVoteWindow, types.DefaultParams().EthereumEventVoteWindow) - } - - return nil -} diff --git a/module/x/gravity/migrations/v2/store_test.go b/module/x/gravity/migrations/v2/store_test.go deleted file mode 100644 index 1dfe1d6b3..000000000 --- a/module/x/gravity/migrations/v2/store_test.go +++ /dev/null @@ -1,37 +0,0 @@ -package v2_test - -import ( - "testing" - - "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" - "github.com/cosmos/cosmos-sdk/testutil" - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - v2 "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/migrations/v2" - "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" - "github.com/stretchr/testify/require" -) - -const ( - ModuleName = "gravity" -) - -func TestStoreMigration(t *testing.T) { - gravityKey := storetypes.NewKVStoreKey(ModuleName) - tGravityKey := storetypes.NewTransientStoreKey("transient_test") - ctx := testutil.DefaultContext(gravityKey, tGravityKey) - aminoCodec := codec.NewLegacyAmino() - paramstore := paramtypes.NewSubspace(nil, aminoCodec, gravityKey, tGravityKey, ModuleName) - - // Check no params - require.False(t, paramstore.Has(ctx, types.ParamStoreConfirmedOutgoingTxWindow)) - require.False(t, paramstore.Has(ctx, types.ParamStoreEventVoteWindow)) - - // Run migrations. - err := v2.MigrateParamStore(ctx, paramstore) - require.NoError(t, err) - - // Make sure the new params are set. - require.True(t, paramstore.Has(ctx, types.ParamStoreConfirmedOutgoingTxWindow)) - require.True(t, paramstore.Has(ctx, types.ParamStoreEventVoteWindow)) -}