diff --git a/docs/swagger_test.go b/docs/swagger_test.go index 7e399d54a..70968b28f 100644 --- a/docs/swagger_test.go +++ b/docs/swagger_test.go @@ -54,7 +54,7 @@ func TestSwaggerConfig(t *testing.T) { assert.Equal(t, 2, handler.Value().Len()) } if handler.Key().String() == "GET" { - assert.Equal(t, 205, handler.Value().Len()) + assert.Equal(t, 209, handler.Value().Len()) } } assert.Equal(t, 32, len(route)) diff --git a/proto/fx/crosschain/v1/query.proto b/proto/fx/crosschain/v1/query.proto index 828d15cb9..7c961509c 100644 --- a/proto/fx/crosschain/v1/query.proto +++ b/proto/fx/crosschain/v1/query.proto @@ -78,6 +78,19 @@ service Query { rpc GetPendingSendToExternal(QueryPendingSendToExternalRequest) returns (QueryPendingSendToExternalResponse) { option (google.api.http).get = "/fx/crosschain/v1/pending_send_to_external"; } + rpc RefundRecordByNonce(QueryRefundRecordByNonceRequest) returns (QueryRefundRecordByNonceResponse) { + option (google.api.http).get = "/fx/crosschain/v1/refund_record_by_nonce"; + } + rpc RefundRecordByReceiver(QueryRefundRecordByReceiverRequest) returns (QueryRefundRecordByReceiverResponse) { + option (google.api.http).get = "/fx/crosschain/v1/refund_record_by_receiver"; + } + rpc RefundConfirmByNonce(QueryRefundConfirmByNonceRequest) returns (QueryRefundConfirmByNonceResponse) { + option (google.api.http).get = "/fx/crosschain/v1/refund_confirm_by_nonce"; + } + rpc LastPendingRefundRecordByAddr(QueryLastPendingRefundRecordByAddrRequest) returns (QueryLastPendingRefundRecordByAddrResponse) { + option (google.api.http).get = "/fx/crosschain/v1/last_pending_refund_record_by_addr"; + } + // Validators queries all oracle that match the given status. rpc Oracles(QueryOraclesRequest) returns (QueryOraclesResponse) { option (google.api.http).get = "/fx/crosschain/v1/oracles"; @@ -300,3 +313,37 @@ message QueryBridgeChainListRequest {} message QueryBridgeChainListResponse { repeated string chain_names = 1; } + +message QueryRefundRecordByNonceRequest { + string chain_name = 1; + uint64 event_nonce = 2; +} +message QueryRefundRecordByNonceResponse { + RefundRecord record = 1; +} + +message QueryRefundRecordByReceiverRequest { + string chain_name = 1; + string receiver_address = 2; +} +message QueryRefundRecordByReceiverResponse { + repeated RefundRecord records = 1; +} + +message QueryRefundConfirmByNonceRequest { + string chain_name = 1; + uint64 event_nonce = 2; +} + +message QueryRefundConfirmByNonceResponse { + repeated MsgConfirmRefund confirms = 1; + bool enough_power = 2; +} + +message QueryLastPendingRefundRecordByAddrRequest { + string chain_name = 1; + string external_address = 2; +} +message QueryLastPendingRefundRecordByAddrResponse { + repeated RefundRecord records = 1; +} diff --git a/x/crosschain/client/cli/query.go b/x/crosschain/client/cli/query.go index 4b61dcc0e..ff6589787 100644 --- a/x/crosschain/client/cli/query.go +++ b/x/crosschain/client/cli/query.go @@ -79,6 +79,12 @@ func GetQuerySubCmds(chainName string) []*cobra.Command { // help cmd. CmdCovertBridgeToken(chainName), + + // refund token + CmdRefundRecord(chainName), + CmdRefundRecordByAddr(chainName), + CmdRefundConfirm(chainName), + CmdLastPendingRefundRecord(chainName), } for _, command := range cmds { @@ -821,3 +827,109 @@ func CmdGetBridgeCoinByDenom(chainName string) *cobra.Command { } return cmd } + +func CmdRefundRecord(chainName string) *cobra.Command { + cmd := &cobra.Command{ + Use: "refund-record [nonce]", + Short: "Query refund record by event nonce", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + queryClient := types.NewQueryClient(clientCtx) + + nonce, err := strconv.ParseUint(args[0], 10, 64) + if err != nil { + return err + } + + res, err := queryClient.RefundRecordByNonce(cmd.Context(), &types.QueryRefundRecordByNonceRequest{ + ChainName: chainName, + EventNonce: nonce, + }) + if err != nil { + return err + } + return clientCtx.PrintProto(res) + }, + } + return cmd +} + +func CmdRefundRecordByAddr(chainName string) *cobra.Command { + cmd := &cobra.Command{ + Use: "refund-record-by-receiver [address]", + Short: "Query refund records by receiver", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + queryClient := types.NewQueryClient(clientCtx) + + receiver, err := getContractAddr(args[0]) + if err != nil { + return err + } + res, err := queryClient.RefundRecordByReceiver(cmd.Context(), &types.QueryRefundRecordByReceiverRequest{ + ChainName: chainName, + ReceiverAddress: receiver, + }) + if err != nil { + return err + } + return clientCtx.PrintProto(res) + }, + } + return cmd +} + +func CmdRefundConfirm(chainName string) *cobra.Command { + cmd := &cobra.Command{ + Use: "refund-confirm [nonce]", + Short: "Query refund confirm by event nonce", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + queryClient := types.NewQueryClient(clientCtx) + + nonce, err := strconv.ParseUint(args[0], 10, 64) + if err != nil { + return err + } + + res, err := queryClient.RefundConfirmByNonce(cmd.Context(), &types.QueryRefundConfirmByNonceRequest{ + ChainName: chainName, + EventNonce: nonce, + }) + if err != nil { + return err + } + return clientCtx.PrintProto(res) + }, + } + return cmd +} + +func CmdLastPendingRefundRecord(chainName string) *cobra.Command { + cmd := &cobra.Command{ + Use: "last-pending-refund-record [external-address]", + Short: "Query last pending refund record for bridge address", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + queryClient := types.NewQueryClient(clientCtx) + + externalAddress, err := getContractAddr(args[0]) + if err != nil { + return err + } + res, err := queryClient.LastPendingRefundRecordByAddr(cmd.Context(), &types.QueryLastPendingRefundRecordByAddrRequest{ + ChainName: chainName, + ExternalAddress: externalAddress, + }) + if err != nil { + return err + } + return clientCtx.PrintProto(res) + }, + } + return cmd +} diff --git a/x/crosschain/keeper/bridge_call_refund.go b/x/crosschain/keeper/bridge_call_refund.go index 9ddf622e9..827713630 100644 --- a/x/crosschain/keeper/bridge_call_refund.go +++ b/x/crosschain/keeper/bridge_call_refund.go @@ -87,6 +87,35 @@ func (k Keeper) GetRefundRecord(ctx sdk.Context, eventNonce uint64) (*types.Refu return refundRecord, true } +func (k Keeper) IterRefundRecord(ctx sdk.Context, cb func(record *types.RefundRecord) bool) { + store := ctx.KVStore(k.storeKey) + iterator := sdk.KVStorePrefixIterator(store, types.BridgeCallRefundEventNonceKey) + defer iterator.Close() + for ; iterator.Valid(); iterator.Next() { + record := new(types.RefundRecord) + k.cdc.MustUnmarshal(iterator.Value(), record) + if cb(record) { + break + } + } +} + +func (k Keeper) IterRefundRecordByAddr(ctx sdk.Context, addr string, cb func(record *types.RefundRecord) bool) { + store := ctx.KVStore(k.storeKey) + iterator := sdk.KVStorePrefixIterator(store, types.GetBridgeCallRefundAddressKey(addr)) + defer iterator.Close() + for ; iterator.Valid(); iterator.Next() { + nonce := types.ParseBridgeCallRefundNonce(iterator.Key(), addr) + record, found := k.GetRefundRecord(ctx, nonce) + if !found { + continue + } + if cb(record) { + break + } + } +} + func (k Keeper) SetSnapshotOracle(ctx sdk.Context, snapshotOracleKey *types.SnapshotOracle) { store := ctx.KVStore(k.storeKey) store.Set(types.GetSnapshotOracleKey(snapshotOracleKey.OracleSetNonce), k.cdc.MustMarshal(snapshotOracleKey)) @@ -103,6 +132,11 @@ func (k Keeper) GetSnapshotOracle(ctx sdk.Context, oracleSetNonce uint64) (*type return snapshotOracle, true } +func (k Keeper) HasRefundConfirm(ctx sdk.Context, nonce uint64, addr sdk.AccAddress) bool { + store := ctx.KVStore(k.storeKey) + return store.Has(types.GetRefundConfirmKey(nonce, addr)) +} + func (k Keeper) DeleteSnapshotOracle(ctx sdk.Context, nonce uint64) { store := ctx.KVStore(k.storeKey) store.Delete(types.GetSnapshotOracleKey(nonce)) @@ -124,6 +158,21 @@ func (k Keeper) SetRefundConfirm(ctx sdk.Context, addr sdk.AccAddress, msg *type store.Set(types.GetRefundConfirmKey(msg.Nonce, addr), k.cdc.MustMarshal(msg)) } +func (k Keeper) IterRefundConfirmByNonce(ctx sdk.Context, nonce uint64, cb func(msg *types.MsgConfirmRefund) bool) { + store := ctx.KVStore(k.storeKey) + iter := sdk.KVStorePrefixIterator(store, types.GetRefundConfirmNonceKey(nonce)) + defer iter.Close() + + for ; iter.Valid(); iter.Next() { + confirm := new(types.MsgConfirmRefund) + k.cdc.MustUnmarshal(iter.Value(), confirm) + // cb returns true to stop early + if cb(confirm) { + break + } + } +} + func (k Keeper) DeleteRefundConfirm(ctx sdk.Context, nonce uint64) { store := ctx.KVStore(k.storeKey) iterator := sdk.KVStorePrefixIterator(store, types.GetRefundConfirmKeyByNonce(nonce)) diff --git a/x/crosschain/keeper/grpc_query.go b/x/crosschain/keeper/grpc_query.go index f1037007f..a919595e8 100644 --- a/x/crosschain/keeper/grpc_query.go +++ b/x/crosschain/keeper/grpc_query.go @@ -4,6 +4,7 @@ import ( "context" "sort" + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "google.golang.org/grpc/codes" @@ -433,3 +434,79 @@ func (k Keeper) BridgeChainList(_ context.Context, _ *types.QueryBridgeChainList optimismtypes.ModuleName, }}, nil } + +func (k Keeper) RefundRecordByNonce(c context.Context, req *types.QueryRefundRecordByNonceRequest) (*types.QueryRefundRecordByNonceResponse, error) { + if req.GetEventNonce() == 0 { + return nil, status.Error(codes.InvalidArgument, "event nonce") + } + record, found := k.GetRefundRecord(sdk.UnwrapSDKContext(c), req.GetEventNonce()) + if !found { + return nil, status.Error(codes.NotFound, "refund record") + } + return &types.QueryRefundRecordByNonceResponse{Record: record}, nil +} + +func (k Keeper) RefundRecordByReceiver(c context.Context, req *types.QueryRefundRecordByReceiverRequest) (*types.QueryRefundRecordByReceiverResponse, error) { + if len(req.GetReceiverAddress()) == 0 { + return nil, status.Error(codes.InvalidArgument, "receiver") + } + + refundRecords := make([]*types.RefundRecord, 0) + k.IterRefundRecordByAddr(sdk.UnwrapSDKContext(c), req.GetReceiverAddress(), func(record *types.RefundRecord) bool { + refundRecords = append(refundRecords, record) + return false + }) + return &types.QueryRefundRecordByReceiverResponse{Records: refundRecords}, nil +} + +func (k Keeper) RefundConfirmByNonce(c context.Context, req *types.QueryRefundConfirmByNonceRequest) (*types.QueryRefundConfirmByNonceResponse, error) { + if req.GetEventNonce() == 0 { + return nil, status.Error(codes.InvalidArgument, "event nonce") + } + + ctx := sdk.UnwrapSDKContext(c) + currentOracleSet := k.GetCurrentOracleSet(ctx) + confirmPowers := uint64(0) + refundConfirms := make([]*types.MsgConfirmRefund, 0) + k.IterRefundConfirmByNonce(ctx, req.GetEventNonce(), func(msg *types.MsgConfirmRefund) bool { + power, found := currentOracleSet.GetBridgePower(msg.ExternalAddress) + if !found { + return false + } + confirmPowers += power + refundConfirms = append(refundConfirms, msg) + return false + }) + totalPower := currentOracleSet.GetTotalPower() + requiredPower := types.AttestationVotesPowerThreshold.Mul(sdkmath.NewIntFromUint64(totalPower)).Quo(sdkmath.NewInt(100)) + enoughPower := requiredPower.GTE(sdkmath.NewIntFromUint64(confirmPowers)) + return &types.QueryRefundConfirmByNonceResponse{Confirms: refundConfirms, EnoughPower: enoughPower}, nil +} + +func (k Keeper) LastPendingRefundRecordByAddr(c context.Context, req *types.QueryLastPendingRefundRecordByAddrRequest) (*types.QueryLastPendingRefundRecordByAddrResponse, error) { + if len(req.GetExternalAddress()) == 0 { + return nil, status.Error(codes.InvalidArgument, "empty external address") + } + ctx := sdk.UnwrapSDKContext(c) + pendingRecords := make([]*types.RefundRecord, 0) + + accAddr := types.ExternalAddressToAccAddress(k.moduleName, req.GetExternalAddress()) + snapshotOracleCache := make(map[uint64]*types.SnapshotOracle) + k.IterRefundRecord(ctx, func(record *types.RefundRecord) bool { + snapshotOracle, found := snapshotOracleCache[record.OracleSetNonce] + if !found { + snapshotOracle, found = k.GetSnapshotOracle(ctx, record.OracleSetNonce) + if !found { + return false + } + snapshotOracleCache[record.OracleSetNonce] = snapshotOracle + } + + if !snapshotOracle.HasExternalAddress(req.GetExternalAddress()) || k.HasRefundConfirm(ctx, record.EventNonce, accAddr) { + return false + } + pendingRecords = append(pendingRecords, record) + return false + }) + return &types.QueryLastPendingRefundRecordByAddrResponse{Records: pendingRecords}, nil +} diff --git a/x/crosschain/keeper/grpc_query_router.go b/x/crosschain/keeper/grpc_query_router.go index dad0629ef..692f9635f 100644 --- a/x/crosschain/keeper/grpc_query_router.go +++ b/x/crosschain/keeper/grpc_query_router.go @@ -247,3 +247,35 @@ func (k RouterKeeper) BridgeChainList(c context.Context, req *types.QueryBridgeC return queryServer.BridgeChainList(c, req) } } + +func (k RouterKeeper) RefundRecordByNonce(c context.Context, req *types.QueryRefundRecordByNonceRequest) (*types.QueryRefundRecordByNonceResponse, error) { + if queryServer, err := k.getQueryServerByChainName(ethtypes.ModuleName); err != nil { + return nil, err + } else { + return queryServer.RefundRecordByNonce(c, req) + } +} + +func (k RouterKeeper) RefundRecordByReceiver(c context.Context, req *types.QueryRefundRecordByReceiverRequest) (*types.QueryRefundRecordByReceiverResponse, error) { + if queryServer, err := k.getQueryServerByChainName(ethtypes.ModuleName); err != nil { + return nil, err + } else { + return queryServer.RefundRecordByReceiver(c, req) + } +} + +func (k RouterKeeper) RefundConfirmByNonce(c context.Context, req *types.QueryRefundConfirmByNonceRequest) (*types.QueryRefundConfirmByNonceResponse, error) { + if queryServer, err := k.getQueryServerByChainName(ethtypes.ModuleName); err != nil { + return nil, err + } else { + return queryServer.RefundConfirmByNonce(c, req) + } +} + +func (k RouterKeeper) LastPendingRefundRecordByAddr(c context.Context, req *types.QueryLastPendingRefundRecordByAddrRequest) (*types.QueryLastPendingRefundRecordByAddrResponse, error) { + if queryServer, err := k.getQueryServerByChainName(ethtypes.ModuleName); err != nil { + return nil, err + } else { + return queryServer.LastPendingRefundRecordByAddr(c, req) + } +} diff --git a/x/crosschain/keeper/grpc_query_test.go b/x/crosschain/keeper/grpc_query_test.go index b7bffdd7a..5c4b96e73 100644 --- a/x/crosschain/keeper/grpc_query_test.go +++ b/x/crosschain/keeper/grpc_query_test.go @@ -16,6 +16,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/evmos/ethermint/crypto/ethsecp256k1" + "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" tmrand "github.com/tendermint/tendermint/libs/rand" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" @@ -24,6 +25,7 @@ import ( "github.com/functionx/fx-core/v7/app" "github.com/functionx/fx-core/v7/testutil/helpers" + fxtypes "github.com/functionx/fx-core/v7/types" arbitrumtypes "github.com/functionx/fx-core/v7/x/arbitrum/types" avalanchetypes "github.com/functionx/fx-core/v7/x/avalanche/types" bsctypes "github.com/functionx/fx-core/v7/x/bsc/types" @@ -2420,3 +2422,305 @@ func (suite *CrossChainGrpcTestSuite) TestKeeper_BridgeChainList() { }) } } + +func (suite *CrossChainGrpcTestSuite) TestKeeper_RefundRecordByNonce() { + var ( + request *types.QueryRefundRecordByNonceRequest + response *types.QueryRefundRecordByNonceResponse + expectedError error + ) + testCases := []struct { + name string + malleate func() + expPass bool + }{ + { + name: "ok", + malleate: func() { + eventNonce := uint64(tmrand.Int63n(10000)) + refundRecord := &types.RefundRecord{ + EventNonce: eventNonce, + Receiver: helpers.GenerateAddressByModule(suite.chainName), + Timeout: tmrand.Uint64(), + Tokens: nil, + OracleSetNonce: uint64(tmrand.Int63n(10000)), + } + suite.Keeper().SetRefundRecord(suite.ctx, refundRecord) + request = &types.QueryRefundRecordByNonceRequest{ + ChainName: suite.chainName, + EventNonce: eventNonce, + } + response = &types.QueryRefundRecordByNonceResponse{ + Record: refundRecord, + } + }, + expPass: true, + }, + } + for _, testCase := range testCases { + suite.Run(testCase.name, func() { + suite.SetupTest() + testCase.malleate() + res, err := suite.Keeper().RefundRecordByNonce(sdk.WrapSDKContext(suite.ctx), request) + if testCase.expPass { + suite.Require().NoError(err) + suite.Require().Equal(response.Record, res.Record) + } else { + suite.Require().Error(err) + suite.Require().ErrorIs(err, expectedError) + } + }) + } +} + +func (suite *CrossChainGrpcTestSuite) TestKeeper_RefundRecordByReceiver() { + var ( + request *types.QueryRefundRecordByReceiverRequest + response *types.QueryRefundRecordByReceiverResponse + expectedError error + ) + testCases := []struct { + name string + malleate func() + expPass bool + }{ + { + name: "ok", + malleate: func() { + receiver := helpers.GenerateAddressByModule(suite.chainName) + refundRecord := &types.RefundRecord{ + EventNonce: uint64(tmrand.Int63n(10000)), + Receiver: receiver, + Timeout: tmrand.Uint64(), + Tokens: nil, + OracleSetNonce: uint64(tmrand.Int63n(10000)), + } + suite.Keeper().SetRefundRecord(suite.ctx, refundRecord) + request = &types.QueryRefundRecordByReceiverRequest{ + ChainName: suite.chainName, + ReceiverAddress: receiver, + } + response = &types.QueryRefundRecordByReceiverResponse{ + Records: []*types.RefundRecord{refundRecord}, + } + }, + expPass: true, + }, + } + for _, testCase := range testCases { + suite.Run(testCase.name, func() { + suite.SetupTest() + testCase.malleate() + res, err := suite.Keeper().RefundRecordByReceiver(sdk.WrapSDKContext(suite.ctx), request) + if testCase.expPass { + suite.Require().NoError(err) + suite.Require().Equal(response.Records, res.Records) + } else { + suite.Require().Error(err) + suite.Require().ErrorIs(err, expectedError) + } + }) + } +} + +func (suite *CrossChainGrpcTestSuite) TestKeeper_RefundConfirmByNonce() { + externalKey := helpers.NewEthPrivKey() + externalEcdsaKey, err := crypto.ToECDSA(externalKey.Bytes()) + require.NoError(suite.T(), err) + externalAddr := fxtypes.AddressToStr(externalKey.PubKey().Address().Bytes(), suite.chainName) + + eventNonce := uint64(tmrand.Int63n(10000)) + oracleNonce := uint64(tmrand.Int63n(10000)) + + testCases := []struct { + name string + malleate func([]byte) (*types.QueryRefundConfirmByNonceRequest, *types.QueryRefundConfirmByNonceResponse) + expPass bool + expErr error + }{ + { + name: "ok", + malleate: func(signature []byte) (*types.QueryRefundConfirmByNonceRequest, *types.QueryRefundConfirmByNonceResponse) { + refundConfirm := &types.MsgConfirmRefund{ + Nonce: eventNonce, + BridgerAddress: suite.bridgerAddrs[0].String(), + ExternalAddress: externalAddr, + Signature: hex.EncodeToString(signature), + ChainName: suite.chainName, + } + + suite.Keeper().SetRefundConfirm(suite.ctx, suite.bridgerAddrs[0], refundConfirm) + request := &types.QueryRefundConfirmByNonceRequest{ + ChainName: suite.chainName, + EventNonce: eventNonce, + } + response := &types.QueryRefundConfirmByNonceResponse{ + Confirms: []*types.MsgConfirmRefund{refundConfirm}, + EnoughPower: true, + } + return request, response + }, + expPass: true, + }, + } + for _, testCase := range testCases { + suite.Run(testCase.name, func() { + suite.SetupTest() + + refundRecord := &types.RefundRecord{ + EventNonce: eventNonce, + Receiver: helpers.GenerateAddressByModule(suite.chainName), + Timeout: tmrand.Uint64(), + Tokens: nil, + OracleSetNonce: oracleNonce, + } + suite.Keeper().SetRefundRecord(suite.ctx, refundRecord) + + members := types.BridgeValidators{ + types.BridgeValidator{ + Power: tmrand.Uint64(), + ExternalAddress: externalAddr, + }, + } + + newOracle := types.Oracle{ + OracleAddress: suite.oracleAddrs[0].String(), + BridgerAddress: suite.bridgerAddrs[0].String(), + ExternalAddress: externalAddr, + DelegateAmount: sdkmath.NewIntFromBigInt(big.NewInt(0).Mul(big.NewInt(10000), big.NewInt(1e18))), + StartHeight: 0, + Online: true, + } + suite.Keeper().SetOracle(suite.ctx, newOracle) + + suite.Keeper().SetSnapshotOracle(suite.ctx, &types.SnapshotOracle{ + OracleSetNonce: oracleNonce, + Members: members, + EventNonces: []uint64{eventNonce}, + }) + + var signature []byte + var signatureErr error + if suite.chainName != trontypes.ModuleName { + checkpoint, err := refundRecord.GetCheckpoint(suite.Keeper().GetGravityID(suite.ctx)) + require.NoError(suite.T(), err) + signature, signatureErr = types.NewEthereumSignature(checkpoint, externalEcdsaKey) + } else { + checkpoint, err := trontypes.GetCheckpointConfirmRefund(refundRecord, suite.Keeper().GetGravityID(suite.ctx)) + require.NoError(suite.T(), err) + signature, signatureErr = trontypes.NewTronSignature(checkpoint, externalEcdsaKey) + } + require.NoError(suite.T(), signatureErr) + + request, response := testCase.malleate(signature) + + res, err := suite.Keeper().RefundConfirmByNonce(sdk.WrapSDKContext(suite.ctx), request) + if testCase.expPass { + suite.Require().NoError(err) + suite.Require().Equal(response.Confirms, res.Confirms) + } else { + suite.Require().Error(err) + suite.Require().ErrorIs(err, testCase.expErr) + } + }) + } +} + +func (suite *CrossChainGrpcTestSuite) TestKeeper_LastPendingRefundRecordByAddr() { + var ( + request *types.QueryLastPendingRefundRecordByAddrRequest + response *types.QueryLastPendingRefundRecordByAddrResponse + expectedError error + ) + + externalKey := helpers.NewEthPrivKey() + externalEcdsaKey, err := crypto.ToECDSA(externalKey.Bytes()) + require.NoError(suite.T(), err) + externalAddr := fxtypes.AddressToStr(externalKey.PubKey().Address().Bytes(), suite.chainName) + + oracleNonce := uint64(tmrand.Int63n(10000)) + eventNonce := uint64(tmrand.Int63n(10000)) + refundRecord := &types.RefundRecord{ + EventNonce: eventNonce, + Receiver: helpers.GenerateAddressByModule(suite.chainName), + Timeout: tmrand.Uint64(), + Tokens: nil, + OracleSetNonce: oracleNonce, + } + suite.Keeper().SetRefundRecord(suite.ctx, refundRecord) + + var signature []byte + var signatureErr error + if suite.chainName != trontypes.ModuleName { + checkpoint, err := refundRecord.GetCheckpoint(suite.Keeper().GetGravityID(suite.ctx)) + require.NoError(suite.T(), err) + signature, signatureErr = types.NewEthereumSignature(checkpoint, externalEcdsaKey) + } else { + checkpoint, err := trontypes.GetCheckpointConfirmRefund(refundRecord, suite.Keeper().GetGravityID(suite.ctx)) + require.NoError(suite.T(), err) + signature, signatureErr = trontypes.NewTronSignature(checkpoint, externalEcdsaKey) + } + require.NoError(suite.T(), signatureErr) + + refundConfirm := &types.MsgConfirmRefund{ + Nonce: eventNonce, + BridgerAddress: suite.bridgerAddrs[0].String(), + ExternalAddress: externalAddr, + Signature: hex.EncodeToString(signature), + ChainName: suite.chainName, + } + suite.Keeper().SetRefundConfirm(suite.ctx, suite.bridgerAddrs[0], refundConfirm) + + testCases := []struct { + name string + malleate func() + expPass bool + }{ + { + name: "ok", + malleate: func() { + suite.Keeper().SetSnapshotOracle(suite.ctx, &types.SnapshotOracle{ + OracleSetNonce: oracleNonce, + Members: types.BridgeValidators{ + types.BridgeValidator{ + Power: tmrand.Uint64(), + ExternalAddress: externalAddr, + }, + }, + EventNonces: []uint64{eventNonce, eventNonce + 1}, + }) + + refundRecordNew := &types.RefundRecord{ + EventNonce: eventNonce + 1, + Receiver: helpers.GenerateAddressByModule(suite.chainName), + Timeout: tmrand.Uint64(), + Tokens: nil, + OracleSetNonce: oracleNonce, + } + suite.Keeper().SetRefundRecord(suite.ctx, refundRecordNew) + request = &types.QueryLastPendingRefundRecordByAddrRequest{ + ChainName: suite.chainName, + ExternalAddress: externalAddr, + } + response = &types.QueryLastPendingRefundRecordByAddrResponse{ + Records: []*types.RefundRecord{refundRecordNew}, + } + }, + expPass: true, + }, + } + for _, testCase := range testCases { + suite.Run(testCase.name, func() { + suite.SetupTest() + testCase.malleate() + res, err := suite.Keeper().LastPendingRefundRecordByAddr(sdk.WrapSDKContext(suite.ctx), request) + if testCase.expPass { + suite.Require().NoError(err) + suite.Require().Equal(response.Records, res.Records) + } else { + suite.Require().Error(err) + suite.Require().ErrorIs(err, expectedError) + } + }) + } +} diff --git a/x/crosschain/types/key.go b/x/crosschain/types/key.go index 783273cdc..b8537e34d 100644 --- a/x/crosschain/types/key.go +++ b/x/crosschain/types/key.go @@ -1,6 +1,8 @@ package types import ( + "bytes" + sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -202,6 +204,16 @@ func GetBridgeCallRefundKey(address string, nonce uint64) []byte { return append(BridgeCallRefundKey, append([]byte(address), sdk.Uint64ToBigEndian(nonce)...)...) } +func ParseBridgeCallRefundNonce(key []byte, address string) (nonce uint64) { + addrNonce := bytes.TrimPrefix(key, BridgeCallRefundKey) + nonceBytes := bytes.TrimPrefix(addrNonce, []byte(address)) + return sdk.BigEndianToUint64(nonceBytes) +} + +func GetBridgeCallRefundAddressKey(address string) []byte { + return append(BridgeCallRefundKey, []byte(address)...) +} + func GetBridgeCallRefundEventNonceKey(nonce uint64) []byte { return append(BridgeCallRefundEventNonceKey, sdk.Uint64ToBigEndian(nonce)...) } @@ -217,3 +229,7 @@ func GetRefundConfirmKey(nonce uint64, addr sdk.AccAddress) []byte { func GetRefundConfirmKeyByNonce(nonce uint64) []byte { return append(BridgeCallRefundConfirmKey, sdk.Uint64ToBigEndian(nonce)...) } + +func GetRefundConfirmNonceKey(nonce uint64) []byte { + return append(BridgeCallRefundConfirmKey, sdk.Uint64ToBigEndian(nonce)...) +} diff --git a/x/crosschain/types/query.pb.go b/x/crosschain/types/query.pb.go index 3b04f191d..49250313f 100644 --- a/x/crosschain/types/query.pb.go +++ b/x/crosschain/types/query.pb.go @@ -2535,6 +2535,406 @@ func (m *QueryBridgeChainListResponse) GetChainNames() []string { return nil } +type QueryRefundRecordByNonceRequest struct { + ChainName string `protobuf:"bytes,1,opt,name=chain_name,json=chainName,proto3" json:"chain_name,omitempty"` + EventNonce uint64 `protobuf:"varint,2,opt,name=event_nonce,json=eventNonce,proto3" json:"event_nonce,omitempty"` +} + +func (m *QueryRefundRecordByNonceRequest) Reset() { *m = QueryRefundRecordByNonceRequest{} } +func (m *QueryRefundRecordByNonceRequest) String() string { return proto.CompactTextString(m) } +func (*QueryRefundRecordByNonceRequest) ProtoMessage() {} +func (*QueryRefundRecordByNonceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_7598fd4b72d633b5, []int{52} +} +func (m *QueryRefundRecordByNonceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryRefundRecordByNonceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryRefundRecordByNonceRequest.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 *QueryRefundRecordByNonceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRefundRecordByNonceRequest.Merge(m, src) +} +func (m *QueryRefundRecordByNonceRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryRefundRecordByNonceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRefundRecordByNonceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryRefundRecordByNonceRequest proto.InternalMessageInfo + +func (m *QueryRefundRecordByNonceRequest) GetChainName() string { + if m != nil { + return m.ChainName + } + return "" +} + +func (m *QueryRefundRecordByNonceRequest) GetEventNonce() uint64 { + if m != nil { + return m.EventNonce + } + return 0 +} + +type QueryRefundRecordByNonceResponse struct { + Record *RefundRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` +} + +func (m *QueryRefundRecordByNonceResponse) Reset() { *m = QueryRefundRecordByNonceResponse{} } +func (m *QueryRefundRecordByNonceResponse) String() string { return proto.CompactTextString(m) } +func (*QueryRefundRecordByNonceResponse) ProtoMessage() {} +func (*QueryRefundRecordByNonceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7598fd4b72d633b5, []int{53} +} +func (m *QueryRefundRecordByNonceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryRefundRecordByNonceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryRefundRecordByNonceResponse.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 *QueryRefundRecordByNonceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRefundRecordByNonceResponse.Merge(m, src) +} +func (m *QueryRefundRecordByNonceResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryRefundRecordByNonceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRefundRecordByNonceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryRefundRecordByNonceResponse proto.InternalMessageInfo + +func (m *QueryRefundRecordByNonceResponse) GetRecord() *RefundRecord { + if m != nil { + return m.Record + } + return nil +} + +type QueryRefundRecordByReceiverRequest struct { + ChainName string `protobuf:"bytes,1,opt,name=chain_name,json=chainName,proto3" json:"chain_name,omitempty"` + ReceiverAddress string `protobuf:"bytes,2,opt,name=receiver_address,json=receiverAddress,proto3" json:"receiver_address,omitempty"` +} + +func (m *QueryRefundRecordByReceiverRequest) Reset() { *m = QueryRefundRecordByReceiverRequest{} } +func (m *QueryRefundRecordByReceiverRequest) String() string { return proto.CompactTextString(m) } +func (*QueryRefundRecordByReceiverRequest) ProtoMessage() {} +func (*QueryRefundRecordByReceiverRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_7598fd4b72d633b5, []int{54} +} +func (m *QueryRefundRecordByReceiverRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryRefundRecordByReceiverRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryRefundRecordByReceiverRequest.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 *QueryRefundRecordByReceiverRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRefundRecordByReceiverRequest.Merge(m, src) +} +func (m *QueryRefundRecordByReceiverRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryRefundRecordByReceiverRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRefundRecordByReceiverRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryRefundRecordByReceiverRequest proto.InternalMessageInfo + +func (m *QueryRefundRecordByReceiverRequest) GetChainName() string { + if m != nil { + return m.ChainName + } + return "" +} + +func (m *QueryRefundRecordByReceiverRequest) GetReceiverAddress() string { + if m != nil { + return m.ReceiverAddress + } + return "" +} + +type QueryRefundRecordByReceiverResponse struct { + Records []*RefundRecord `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"` +} + +func (m *QueryRefundRecordByReceiverResponse) Reset() { *m = QueryRefundRecordByReceiverResponse{} } +func (m *QueryRefundRecordByReceiverResponse) String() string { return proto.CompactTextString(m) } +func (*QueryRefundRecordByReceiverResponse) ProtoMessage() {} +func (*QueryRefundRecordByReceiverResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7598fd4b72d633b5, []int{55} +} +func (m *QueryRefundRecordByReceiverResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryRefundRecordByReceiverResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryRefundRecordByReceiverResponse.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 *QueryRefundRecordByReceiverResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRefundRecordByReceiverResponse.Merge(m, src) +} +func (m *QueryRefundRecordByReceiverResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryRefundRecordByReceiverResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRefundRecordByReceiverResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryRefundRecordByReceiverResponse proto.InternalMessageInfo + +func (m *QueryRefundRecordByReceiverResponse) GetRecords() []*RefundRecord { + if m != nil { + return m.Records + } + return nil +} + +type QueryRefundConfirmByNonceRequest struct { + ChainName string `protobuf:"bytes,1,opt,name=chain_name,json=chainName,proto3" json:"chain_name,omitempty"` + EventNonce uint64 `protobuf:"varint,2,opt,name=event_nonce,json=eventNonce,proto3" json:"event_nonce,omitempty"` +} + +func (m *QueryRefundConfirmByNonceRequest) Reset() { *m = QueryRefundConfirmByNonceRequest{} } +func (m *QueryRefundConfirmByNonceRequest) String() string { return proto.CompactTextString(m) } +func (*QueryRefundConfirmByNonceRequest) ProtoMessage() {} +func (*QueryRefundConfirmByNonceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_7598fd4b72d633b5, []int{56} +} +func (m *QueryRefundConfirmByNonceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryRefundConfirmByNonceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryRefundConfirmByNonceRequest.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 *QueryRefundConfirmByNonceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRefundConfirmByNonceRequest.Merge(m, src) +} +func (m *QueryRefundConfirmByNonceRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryRefundConfirmByNonceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRefundConfirmByNonceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryRefundConfirmByNonceRequest proto.InternalMessageInfo + +func (m *QueryRefundConfirmByNonceRequest) GetChainName() string { + if m != nil { + return m.ChainName + } + return "" +} + +func (m *QueryRefundConfirmByNonceRequest) GetEventNonce() uint64 { + if m != nil { + return m.EventNonce + } + return 0 +} + +type QueryRefundConfirmByNonceResponse struct { + Confirms []*MsgConfirmRefund `protobuf:"bytes,1,rep,name=confirms,proto3" json:"confirms,omitempty"` + EnoughPower bool `protobuf:"varint,2,opt,name=enough_power,json=enoughPower,proto3" json:"enough_power,omitempty"` +} + +func (m *QueryRefundConfirmByNonceResponse) Reset() { *m = QueryRefundConfirmByNonceResponse{} } +func (m *QueryRefundConfirmByNonceResponse) String() string { return proto.CompactTextString(m) } +func (*QueryRefundConfirmByNonceResponse) ProtoMessage() {} +func (*QueryRefundConfirmByNonceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7598fd4b72d633b5, []int{57} +} +func (m *QueryRefundConfirmByNonceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryRefundConfirmByNonceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryRefundConfirmByNonceResponse.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 *QueryRefundConfirmByNonceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRefundConfirmByNonceResponse.Merge(m, src) +} +func (m *QueryRefundConfirmByNonceResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryRefundConfirmByNonceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRefundConfirmByNonceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryRefundConfirmByNonceResponse proto.InternalMessageInfo + +func (m *QueryRefundConfirmByNonceResponse) GetConfirms() []*MsgConfirmRefund { + if m != nil { + return m.Confirms + } + return nil +} + +func (m *QueryRefundConfirmByNonceResponse) GetEnoughPower() bool { + if m != nil { + return m.EnoughPower + } + return false +} + +type QueryLastPendingRefundRecordByAddrRequest struct { + ChainName string `protobuf:"bytes,1,opt,name=chain_name,json=chainName,proto3" json:"chain_name,omitempty"` + ExternalAddress string `protobuf:"bytes,2,opt,name=external_address,json=externalAddress,proto3" json:"external_address,omitempty"` +} + +func (m *QueryLastPendingRefundRecordByAddrRequest) Reset() { + *m = QueryLastPendingRefundRecordByAddrRequest{} +} +func (m *QueryLastPendingRefundRecordByAddrRequest) String() string { + return proto.CompactTextString(m) +} +func (*QueryLastPendingRefundRecordByAddrRequest) ProtoMessage() {} +func (*QueryLastPendingRefundRecordByAddrRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_7598fd4b72d633b5, []int{58} +} +func (m *QueryLastPendingRefundRecordByAddrRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryLastPendingRefundRecordByAddrRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLastPendingRefundRecordByAddrRequest.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 *QueryLastPendingRefundRecordByAddrRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLastPendingRefundRecordByAddrRequest.Merge(m, src) +} +func (m *QueryLastPendingRefundRecordByAddrRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryLastPendingRefundRecordByAddrRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLastPendingRefundRecordByAddrRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryLastPendingRefundRecordByAddrRequest proto.InternalMessageInfo + +func (m *QueryLastPendingRefundRecordByAddrRequest) GetChainName() string { + if m != nil { + return m.ChainName + } + return "" +} + +func (m *QueryLastPendingRefundRecordByAddrRequest) GetExternalAddress() string { + if m != nil { + return m.ExternalAddress + } + return "" +} + +type QueryLastPendingRefundRecordByAddrResponse struct { + Records []*RefundRecord `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"` +} + +func (m *QueryLastPendingRefundRecordByAddrResponse) Reset() { + *m = QueryLastPendingRefundRecordByAddrResponse{} +} +func (m *QueryLastPendingRefundRecordByAddrResponse) String() string { + return proto.CompactTextString(m) +} +func (*QueryLastPendingRefundRecordByAddrResponse) ProtoMessage() {} +func (*QueryLastPendingRefundRecordByAddrResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7598fd4b72d633b5, []int{59} +} +func (m *QueryLastPendingRefundRecordByAddrResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryLastPendingRefundRecordByAddrResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLastPendingRefundRecordByAddrResponse.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 *QueryLastPendingRefundRecordByAddrResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLastPendingRefundRecordByAddrResponse.Merge(m, src) +} +func (m *QueryLastPendingRefundRecordByAddrResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryLastPendingRefundRecordByAddrResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLastPendingRefundRecordByAddrResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryLastPendingRefundRecordByAddrResponse proto.InternalMessageInfo + +func (m *QueryLastPendingRefundRecordByAddrResponse) GetRecords() []*RefundRecord { + if m != nil { + return m.Records + } + return nil +} + func init() { proto.RegisterType((*QueryParamsRequest)(nil), "fx.gravity.crosschain.v1.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "fx.gravity.crosschain.v1.QueryParamsResponse") @@ -2588,143 +2988,168 @@ func init() { proto.RegisterType((*QueryBridgeCoinByDenomResponse)(nil), "fx.gravity.crosschain.v1.QueryBridgeCoinByDenomResponse") proto.RegisterType((*QueryBridgeChainListRequest)(nil), "fx.gravity.crosschain.v1.QueryBridgeChainListRequest") proto.RegisterType((*QueryBridgeChainListResponse)(nil), "fx.gravity.crosschain.v1.QueryBridgeChainListResponse") + proto.RegisterType((*QueryRefundRecordByNonceRequest)(nil), "fx.gravity.crosschain.v1.QueryRefundRecordByNonceRequest") + proto.RegisterType((*QueryRefundRecordByNonceResponse)(nil), "fx.gravity.crosschain.v1.QueryRefundRecordByNonceResponse") + proto.RegisterType((*QueryRefundRecordByReceiverRequest)(nil), "fx.gravity.crosschain.v1.QueryRefundRecordByReceiverRequest") + proto.RegisterType((*QueryRefundRecordByReceiverResponse)(nil), "fx.gravity.crosschain.v1.QueryRefundRecordByReceiverResponse") + proto.RegisterType((*QueryRefundConfirmByNonceRequest)(nil), "fx.gravity.crosschain.v1.QueryRefundConfirmByNonceRequest") + proto.RegisterType((*QueryRefundConfirmByNonceResponse)(nil), "fx.gravity.crosschain.v1.QueryRefundConfirmByNonceResponse") + proto.RegisterType((*QueryLastPendingRefundRecordByAddrRequest)(nil), "fx.gravity.crosschain.v1.QueryLastPendingRefundRecordByAddrRequest") + proto.RegisterType((*QueryLastPendingRefundRecordByAddrResponse)(nil), "fx.gravity.crosschain.v1.QueryLastPendingRefundRecordByAddrResponse") } func init() { proto.RegisterFile("fx/crosschain/v1/query.proto", fileDescriptor_7598fd4b72d633b5) } var fileDescriptor_7598fd4b72d633b5 = []byte{ - // 2084 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x9a, 0xcf, 0x73, 0xdc, 0x48, - 0x15, 0xc7, 0xd3, 0xf9, 0x89, 0x5f, 0xec, 0x64, 0xb7, 0xe3, 0x10, 0x5b, 0x49, 0xc6, 0xb6, 0x12, - 0xc7, 0x76, 0x12, 0x8f, 0xb0, 0xbd, 0x2c, 0xfb, 0x83, 0x4d, 0x76, 0xc7, 0x09, 0x49, 0xa8, 0xb0, - 0xc9, 0x4e, 0xbc, 0x55, 0x14, 0x5b, 0x30, 0xab, 0xd1, 0xb4, 0xc7, 0xca, 0x7a, 0xd4, 0x5e, 0x49, - 0xf6, 0x8e, 0xab, 0xd8, 0x0b, 0x07, 0x38, 0x70, 0xa1, 0xe0, 0xc2, 0x09, 0x38, 0x70, 0xa5, 0x28, - 0x8a, 0x5f, 0x27, 0x0e, 0xdc, 0x02, 0xa7, 0x54, 0x51, 0x05, 0x9c, 0x28, 0x88, 0xf9, 0x43, 0x28, - 0x75, 0x3f, 0x69, 0xa4, 0xd1, 0xaf, 0x96, 0xed, 0x70, 0xf3, 0x48, 0xfd, 0xde, 0xfb, 0xbc, 0xee, - 0x56, 0xbf, 0xd7, 0xdf, 0x32, 0x5c, 0x5a, 0xef, 0x1b, 0x96, 0xcb, 0x3d, 0xcf, 0xda, 0x30, 0x6d, - 0xc7, 0xd8, 0x59, 0x32, 0x3e, 0xdd, 0x66, 0xee, 0x6e, 0x7d, 0xcb, 0xe5, 0x3e, 0xa7, 0x13, 0xeb, - 0xfd, 0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x58, 0x4b, - 0xf1, 0x73, 0x02, 0x13, 0x83, 0x28, 0xd5, 0x6a, 0x95, 0x62, 0x76, 0x19, 0xbb, 0xf0, 0x58, 0x71, - 0x49, 0x3b, 0x1e, 0x9f, 0x86, 0x8f, 0x61, 0x32, 0x03, 0x70, 0xb0, 0xce, 0xc9, 0x72, 0xb6, 0x50, - 0x78, 0xfc, 0xa3, 0x39, 0xae, 0x73, 0x58, 0xca, 0x3e, 0xcb, 0x88, 0xe0, 0xfd, 0x7f, 0x56, 0x58, - 0xcb, 0x0a, 0x8c, 0xb9, 0xdd, 0x4d, 0xd5, 0xb6, 0x0a, 0xc9, 0x0d, 0xea, 0xda, 0x53, 0xdc, 0x46, - 0xc1, 0xb7, 0x7d, 0x77, 0x87, 0x39, 0xbe, 0xd8, 0x41, 0x2f, 0xe7, 0x1c, 0xb9, 0x13, 0xab, 0xa1, - 0xe9, 0x58, 0x98, 0xd7, 0x14, 0x9c, 0x66, 0xc1, 0xbb, 0x96, 0x9c, 0x11, 0x22, 0x66, 0x04, 0x58, - 0x34, 0x5c, 0x7f, 0x84, 0x5b, 0x72, 0x2d, 0x98, 0xc2, 0x35, 0x7e, 0x87, 0x39, 0xbc, 0xa7, 0xde, - 0x4e, 0x88, 0x89, 0x47, 0x3e, 0xf9, 0x43, 0x5f, 0xc2, 0x05, 0x4e, 0x3a, 0x44, 0x9c, 0x71, 0x38, - 0xd1, 0x09, 0x1e, 0xa0, 0x33, 0xf9, 0x23, 0x62, 0x10, 0x63, 0xd7, 0xb8, 0xb0, 0x54, 0x67, 0x90, - 0x0e, 0x8f, 0xc6, 0x1d, 0x86, 0x0c, 0x49, 0x87, 0x03, 0x06, 0x89, 0x4d, 0xe2, 0xd8, 0x1f, 0x23, - 0x83, 0x2c, 0x87, 0x95, 0x56, 0x6c, 0x16, 0xce, 0x60, 0xc5, 0x4d, 0x2e, 0xd8, 0x98, 0x7c, 0x1a, - 0xae, 0xd7, 0x23, 0xbc, 0x61, 0xc8, 0x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xed, 0x12, 0x92, 0x22, 0x01, 0x4e, 0xfb, 0xea, 0xfe, - 0x8c, 0x2b, 0xe5, 0xe0, 0x86, 0xa4, 0xff, 0x21, 0x30, 0x53, 0xaa, 0x72, 0xd1, 0x7b, 0x0a, 0x48, - 0x2a, 0x02, 0x9d, 0x76, 0xff, 0xe0, 0x8e, 0x30, 0xcf, 0x05, 0x91, 0xe7, 0x15, 0x3a, 0x53, 0x98, - 0xe7, 0xa6, 0xe9, 0xf9, 0xf4, 0x39, 0x81, 0xcb, 0x85, 0xb2, 0x0f, 0x5d, 0x55, 0xc7, 0xca, 0x55, - 0xaa, 0xb4, 0x3b, 0x07, 0x73, 0x82, 0x79, 0x5d, 0x15, 0x79, 0xd5, 0xe8, 0xa5, 0x74, 0x5e, 0xa2, - 0xc1, 0x94, 0x29, 0xfd, 0x89, 0xc0, 0x78, 0xd6, 0x0d, 0x94, 0xbe, 0xa5, 0x00, 0x91, 0x73, 0x45, - 0xd6, 0xde, 0xde, 0x97, 0xad, 0xea, 0x39, 0x60, 0xc4, 0x6e, 0xc4, 0xf4, 0xef, 0x04, 0xb4, 0xfc, - 0xfe, 0x8e, 0xbe, 0xab, 0x4a, 0x92, 0xd7, 0x8c, 0x6a, 0xef, 0x1d, 0xc0, 0x03, 0x66, 0xb4, 0x22, - 0x32, 0x5a, 0xa4, 0x37, 0x8a, 0x33, 0x32, 0xe2, 0x1d, 0x28, 0xfd, 0x31, 0x81, 0x91, 0x48, 0xf4, - 0xa4, 0xf5, 0x12, 0x8a, 0x21, 0x99, 0x57, 0x33, 0x94, 0xc7, 0x2b, 0xee, 0x16, 0x21, 0xd3, 0xd2, - 0xbf, 0x10, 0xb8, 0x90, 0x73, 0x7d, 0xa0, 0xef, 0xa8, 0x9c, 0x36, 0xb9, 0x97, 0x17, 0xed, 0xd6, - 0x7e, 0xcd, 0x31, 0x01, 0x43, 0x24, 0xb0, 0x40, 0xe7, 0x32, 0x26, 0x19, 0xcd, 0x92, 0x13, 0xfc,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 0xeb, 0x82, 0x78, 0x9e, - 0x5e, 0xcb, 0x25, 0xb6, 0xb8, 0xed, 0x04, 0x9f, 0xa5, 0x2c, 0x1e, 0xbf, 0x22, 0x70, 0x76, 0x48, - 0xbe, 0xa2, 0x5f, 0x56, 0x8b, 0x3e, 0xa4, 0x86, 0x69, 0xaf, 0x57, 0x35, 0x53, 0xe8, 0xc4, 0x10, - 0x59, 0x88, 0x68, 0x9b, 0xb6, 0xe7, 0x37, 0x1e, 0x3c, 0x7b, 0x51, 0x23, 0xcf, 0x5f, 0xd4, 0xc8, - 0xbf, 0x5f, 0xd4, 0xc8, 0x8f, 0xf6, 0x6a, 0x47, 0x9e, 0xef, 0xd5, 0x8e, 0xfc, 0x73, 0xaf, 0x76, - 0xe4, 0x5b, 0x46, 0xd7, 0xf6, 0x37, 0xb6, 0xdb, 0x75, 0x8b, 0xf7, 0x8c, 0xf5, 0x6d, 0xc7, 0xf2, - 0x6d, 0xee, 0xf4, 0x8d, 0xf5, 0xfe, 0xa2, 0xc5, 0x5d, 0x66, 0x24, 0x3c, 0x8b, 0xff, 0x95, 0x6b, - 0x9f, 0x14, 0xff, 0xf8, 0xb6, 0xf2, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x06, 0xf8, 0x86, 0xa0, - 0xbf, 0x27, 0x00, 0x00, + // 2362 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x5a, 0xcd, 0x6f, 0x1c, 0x49, + 0x15, 0x4f, 0xe7, 0x73, 0xfd, 0x6c, 0x27, 0xbb, 0x65, 0x67, 0x63, 0x77, 0x12, 0x7f, 0x74, 0xe2, + 0xd8, 0x4e, 0xe2, 0x19, 0x6c, 0x87, 0xb0, 0x1f, 0xf9, 0xd8, 0x1d, 0x27, 0x9b, 0x04, 0x85, 0x4d, + 0x76, 0xe2, 0x95, 0x10, 0x2b, 0x98, 0xed, 0xe9, 0x29, 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97, 0x9c, 0x05, 0xe0, 0x16, 0x5a, 0x96, 0xde, 0xa3, 0x63, 0xca, 0x94, 0x32, 0x37, 0xd0, 0x1c, + 0xe0, 0x23, 0xef, 0xeb, 0x3d, 0xaa, 0x7d, 0x08, 0x23, 0x31, 0x21, 0x67, 0x93, 0x59, 0x0e, 0x25, + 0x37, 0xe0, 0xe8, 0x26, 0x1f, 0xe1, 0x12, 0x83, 0x4b, 0x53, 0xb5, 0xbc, 0x35, 0xa8, 0x09, 0xc9, + 0xc6, 0xe1, 0xcf, 0xff, 0x39, 0x79, 0xa0, 0x89, 0x52, 0xda, 0x75, 0x38, 0xc3, 0xd5, 0xae, 0xf4, + 0x6d, 0x9b, 0x5a, 0xee, 0x03, 0x5b, 0x37, 0x36, 0xe8, 0x23, 0xea, 0x4a, 0xa2, 0x32, 0xe0, 0x6c, + 0x8e, 0x38, 0xe2, 0x6b, 0x00, 0x30, 0x3e, 0xd8, 0x72, 0xa8, 0x8b, 0x18, 0xcf, 0xe5, 0x63, 0x0c, + 0x15, 0x0c, 0x30, 0xff, 0x4f, 0xed, 0x11, 0x62, 0x4c, 0x82, 0x93, 0xc3, 0x48, 0x46, 0xe1, 0x88, + 0xc5, 0x2c, 0x83, 0x8e, 0x1d, 0x9c, 0x52, 0xe6, 0x0e, 0x37, 0xc5, 0x8f, 0x00, 0x79, 0x5a, 0xe9, + 0x3e, 0x22, 0xff, 0x76, 0x12, 0xf9, 0x0a, 0xb3, 0xd6, 0x4c, 0xbb, 0x27, 0x89, 0x7c, 0x16, 0x4e, + 0xb4, 0x6d, 0xb3, 0xd3, 0xa5, 0x76, 0x4b, 0xef, 0x74, 0x6c, 0xea, 0x38, 0xdc, 0x87, 0x81, 0xe6, + 0x71, 0x1c, 0x7e, 0x57, 0x8c, 0x86, 0x2e, 0x1e, 0x8a, 0xba, 0xb8, 0x9e, 0x74, 0x31, 0xb0, 0x8e, + 0x2e, 0xde, 0x81, 0x63, 0x86, 0x18, 0x42, 0xff, 0x16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, 0xbd, 0x25, 0x5c, 0x65, 0xb7, 0xa8, 0xc5, 0x7a, 0xf2, 0xed, 0x04, + 0x5f, 0x78, 0xc4, 0x27, 0x7e, 0x68, 0x8b, 0x18, 0xe0, 0xb8, 0x42, 0x84, 0x33, 0x0a, 0x47, 0x3a, + 0xde, 0x00, 0x2a, 0x13, 0x3f, 0x02, 0x0c, 0x7c, 0xee, 0x2a, 0xe3, 0x92, 0xf2, 0x18, 0x84, 0xc2, + 0x83, 0x51, 0x85, 0x3e, 0x86, 0xb8, 0xc2, 0x10, 0x83, 0x80, 0xad, 0x44, 0x61, 0x7f, 0x8c, 0x18, + 0x44, 0x39, 0xac, 0x14, 0xb1, 0x19, 0x38, 0x8e, 0x15, 0x37, 0x1e, 0xb0, 0x61, 0x31, 0xea, 0xc7, + 0xeb, 0x01, 0xde, 0x30, 0x84, 0x85, 0x00, 0xce, 0x1b, 0x70, 0x54, 0xcc, 0x2b, 0xbf, 0x61, 0xa0, + 0x24, 0xce, 0xd7, 0x36, 0x70, 0xb3, 0xf9, 0x90, 0x6f, 0x6f, 0xbb, 0xd4, 0xb6, 0xf4, 0x8d, 0x0a, + 0xd0, 0xe7, 0xe1, 0x55, 0x8a, 0x52, 0x09, 0xf0, 0x27, 0x68, 0x44, 0x9b, 0x07, 0xdf, 0xc4, 0x04, + 0xed, 0x5b, 0x6b, 0x84, 0xbb, 0x71, 0xbf, 0x77, 0xb6, 0x89, 0x3b, 0x1b, 0xab, 0xe3, 0x23, 0x6a, + 0x75, 0x56, 0x99, 0xef, 0x9d, 0x7c, 0x50, 0x1c, 0x6a, 0x75, 0x52, 0xb6, 0x86, 0xc5, 0xa8, 0x6f, + 0xea, 0x85, 0x82, 0x5d, 0x64, 0x8e, 0x2d, 0x0c, 0xd2, 0xb7, 0x60, 0xd4, 0xb5, 0x75, 0xcb, 0x59, + 0xa3, 0xb6, 0xd3, 0x32, 0xad, 0x56, 0xbc, 0xde, 0x5d, 0x96, 0xa8, 0x04, 0x28, 0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0xc8, 0x45, 0x6c, 0x30, 0xd3, 0xf2, 0xb6, 0xb0, 0x68, 0xbd, 0x7e, + 0xa9, 0xc0, 0x89, 0xc4, 0xc3, 0x0b, 0xf9, 0xb2, 0x9c, 0xf5, 0xc4, 0x3b, 0x8e, 0x7a, 0xb5, 0xaa, + 0x98, 0xc4, 0x3d, 0x06, 0x21, 0x73, 0x6e, 0x7c, 0xc3, 0x74, 0xdc, 0xc6, 0xbd, 0xcf, 0x9f, 0x4f, + 0x28, 0xcf, 0x9e, 0x4f, 0x28, 0xff, 0x7a, 0x3e, 0xa1, 0xfc, 0xf0, 0xc5, 0xc4, 0x81, 0x67, 0x2f, + 0x26, 0x0e, 0xfc, 0xe3, 0xc5, 0xc4, 0x81, 0x6f, 0xd4, 0xbb, 0xa6, 0xbb, 0xde, 0x6f, 0xd7, 0x0c, + 0xd6, 0xab, 0xaf, 0xf5, 0x2d, 0xc3, 0x35, 0x99, 0xb5, 0x5d, 0x5f, 0xdb, 0x5e, 0x30, 0x98, 0x4d, + 0xeb, 0x31, 0xcd, 0xfc, 0xbf, 0xbc, 0xdb, 0x47, 0xf9, 0xbf, 0x6c, 0x2f, 0xff, 0x3f, 0x00, 0x00, + 0xff, 0xff, 0xd6, 0x91, 0x6d, 0x5e, 0x79, 0x2e, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2762,6 +3187,10 @@ type QueryClient interface { GetOracleByExternalAddr(ctx context.Context, in *QueryOracleByExternalAddrRequest, opts ...grpc.CallOption) (*QueryOracleResponse, error) GetOracleByBridgerAddr(ctx context.Context, in *QueryOracleByBridgerAddrRequest, opts ...grpc.CallOption) (*QueryOracleResponse, error) GetPendingSendToExternal(ctx context.Context, in *QueryPendingSendToExternalRequest, opts ...grpc.CallOption) (*QueryPendingSendToExternalResponse, error) + RefundRecordByNonce(ctx context.Context, in *QueryRefundRecordByNonceRequest, opts ...grpc.CallOption) (*QueryRefundRecordByNonceResponse, error) + RefundRecordByReceiver(ctx context.Context, in *QueryRefundRecordByReceiverRequest, opts ...grpc.CallOption) (*QueryRefundRecordByReceiverResponse, error) + RefundConfirmByNonce(ctx context.Context, in *QueryRefundConfirmByNonceRequest, opts ...grpc.CallOption) (*QueryRefundConfirmByNonceResponse, error) + LastPendingRefundRecordByAddr(ctx context.Context, in *QueryLastPendingRefundRecordByAddrRequest, opts ...grpc.CallOption) (*QueryLastPendingRefundRecordByAddrResponse, error) // Validators queries all oracle that match the given status. Oracles(ctx context.Context, in *QueryOraclesRequest, opts ...grpc.CallOption) (*QueryOraclesResponse, error) ProjectedBatchTimeoutHeight(ctx context.Context, in *QueryProjectedBatchTimeoutHeightRequest, opts ...grpc.CallOption) (*QueryProjectedBatchTimeoutHeightResponse, error) @@ -2976,25 +3405,61 @@ func (c *queryClient) GetPendingSendToExternal(ctx context.Context, in *QueryPen return out, nil } -func (c *queryClient) Oracles(ctx context.Context, in *QueryOraclesRequest, opts ...grpc.CallOption) (*QueryOraclesResponse, error) { - out := new(QueryOraclesResponse) - err := c.cc.Invoke(ctx, "/fx.gravity.crosschain.v1.Query/Oracles", in, out, opts...) +func (c *queryClient) RefundRecordByNonce(ctx context.Context, in *QueryRefundRecordByNonceRequest, opts ...grpc.CallOption) (*QueryRefundRecordByNonceResponse, error) { + out := new(QueryRefundRecordByNonceResponse) + err := c.cc.Invoke(ctx, "/fx.gravity.crosschain.v1.Query/RefundRecordByNonce", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *queryClient) ProjectedBatchTimeoutHeight(ctx context.Context, in *QueryProjectedBatchTimeoutHeightRequest, opts ...grpc.CallOption) (*QueryProjectedBatchTimeoutHeightResponse, error) { - out := new(QueryProjectedBatchTimeoutHeightResponse) - err := c.cc.Invoke(ctx, "/fx.gravity.crosschain.v1.Query/ProjectedBatchTimeoutHeight", in, out, opts...) +func (c *queryClient) RefundRecordByReceiver(ctx context.Context, in *QueryRefundRecordByReceiverRequest, opts ...grpc.CallOption) (*QueryRefundRecordByReceiverResponse, error) { + out := new(QueryRefundRecordByReceiverResponse) + err := c.cc.Invoke(ctx, "/fx.gravity.crosschain.v1.Query/RefundRecordByReceiver", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *queryClient) BridgeTokens(ctx context.Context, in *QueryBridgeTokensRequest, opts ...grpc.CallOption) (*QueryBridgeTokensResponse, error) { +func (c *queryClient) RefundConfirmByNonce(ctx context.Context, in *QueryRefundConfirmByNonceRequest, opts ...grpc.CallOption) (*QueryRefundConfirmByNonceResponse, error) { + out := new(QueryRefundConfirmByNonceResponse) + err := c.cc.Invoke(ctx, "/fx.gravity.crosschain.v1.Query/RefundConfirmByNonce", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) LastPendingRefundRecordByAddr(ctx context.Context, in *QueryLastPendingRefundRecordByAddrRequest, opts ...grpc.CallOption) (*QueryLastPendingRefundRecordByAddrResponse, error) { + out := new(QueryLastPendingRefundRecordByAddrResponse) + err := c.cc.Invoke(ctx, "/fx.gravity.crosschain.v1.Query/LastPendingRefundRecordByAddr", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Oracles(ctx context.Context, in *QueryOraclesRequest, opts ...grpc.CallOption) (*QueryOraclesResponse, error) { + out := new(QueryOraclesResponse) + err := c.cc.Invoke(ctx, "/fx.gravity.crosschain.v1.Query/Oracles", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ProjectedBatchTimeoutHeight(ctx context.Context, in *QueryProjectedBatchTimeoutHeightRequest, opts ...grpc.CallOption) (*QueryProjectedBatchTimeoutHeightResponse, error) { + out := new(QueryProjectedBatchTimeoutHeightResponse) + err := c.cc.Invoke(ctx, "/fx.gravity.crosschain.v1.Query/ProjectedBatchTimeoutHeight", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) BridgeTokens(ctx context.Context, in *QueryBridgeTokensRequest, opts ...grpc.CallOption) (*QueryBridgeTokensResponse, error) { out := new(QueryBridgeTokensResponse) err := c.cc.Invoke(ctx, "/fx.gravity.crosschain.v1.Query/BridgeTokens", in, out, opts...) if err != nil { @@ -3046,6 +3511,10 @@ type QueryServer interface { GetOracleByExternalAddr(context.Context, *QueryOracleByExternalAddrRequest) (*QueryOracleResponse, error) GetOracleByBridgerAddr(context.Context, *QueryOracleByBridgerAddrRequest) (*QueryOracleResponse, error) GetPendingSendToExternal(context.Context, *QueryPendingSendToExternalRequest) (*QueryPendingSendToExternalResponse, error) + RefundRecordByNonce(context.Context, *QueryRefundRecordByNonceRequest) (*QueryRefundRecordByNonceResponse, error) + RefundRecordByReceiver(context.Context, *QueryRefundRecordByReceiverRequest) (*QueryRefundRecordByReceiverResponse, error) + RefundConfirmByNonce(context.Context, *QueryRefundConfirmByNonceRequest) (*QueryRefundConfirmByNonceResponse, error) + LastPendingRefundRecordByAddr(context.Context, *QueryLastPendingRefundRecordByAddrRequest) (*QueryLastPendingRefundRecordByAddrResponse, error) // Validators queries all oracle that match the given status. Oracles(context.Context, *QueryOraclesRequest) (*QueryOraclesResponse, error) ProjectedBatchTimeoutHeight(context.Context, *QueryProjectedBatchTimeoutHeightRequest) (*QueryProjectedBatchTimeoutHeightResponse, error) @@ -3124,6 +3593,18 @@ func (*UnimplementedQueryServer) GetOracleByBridgerAddr(ctx context.Context, req func (*UnimplementedQueryServer) GetPendingSendToExternal(ctx context.Context, req *QueryPendingSendToExternalRequest) (*QueryPendingSendToExternalResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPendingSendToExternal not implemented") } +func (*UnimplementedQueryServer) RefundRecordByNonce(ctx context.Context, req *QueryRefundRecordByNonceRequest) (*QueryRefundRecordByNonceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RefundRecordByNonce not implemented") +} +func (*UnimplementedQueryServer) RefundRecordByReceiver(ctx context.Context, req *QueryRefundRecordByReceiverRequest) (*QueryRefundRecordByReceiverResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RefundRecordByReceiver not implemented") +} +func (*UnimplementedQueryServer) RefundConfirmByNonce(ctx context.Context, req *QueryRefundConfirmByNonceRequest) (*QueryRefundConfirmByNonceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RefundConfirmByNonce not implemented") +} +func (*UnimplementedQueryServer) LastPendingRefundRecordByAddr(ctx context.Context, req *QueryLastPendingRefundRecordByAddrRequest) (*QueryLastPendingRefundRecordByAddrResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LastPendingRefundRecordByAddr not implemented") +} func (*UnimplementedQueryServer) Oracles(ctx context.Context, req *QueryOraclesRequest) (*QueryOraclesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Oracles not implemented") } @@ -3540,6 +4021,78 @@ func _Query_GetPendingSendToExternal_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } +func _Query_RefundRecordByNonce_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryRefundRecordByNonceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).RefundRecordByNonce(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/fx.gravity.crosschain.v1.Query/RefundRecordByNonce", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).RefundRecordByNonce(ctx, req.(*QueryRefundRecordByNonceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_RefundRecordByReceiver_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryRefundRecordByReceiverRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).RefundRecordByReceiver(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/fx.gravity.crosschain.v1.Query/RefundRecordByReceiver", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).RefundRecordByReceiver(ctx, req.(*QueryRefundRecordByReceiverRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_RefundConfirmByNonce_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryRefundConfirmByNonceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).RefundConfirmByNonce(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/fx.gravity.crosschain.v1.Query/RefundConfirmByNonce", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).RefundConfirmByNonce(ctx, req.(*QueryRefundConfirmByNonceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_LastPendingRefundRecordByAddr_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryLastPendingRefundRecordByAddrRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).LastPendingRefundRecordByAddr(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/fx.gravity.crosschain.v1.Query/LastPendingRefundRecordByAddr", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).LastPendingRefundRecordByAddr(ctx, req.(*QueryLastPendingRefundRecordByAddrRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_Oracles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryOraclesRequest) if err := dec(in); err != nil { @@ -3722,6 +4275,22 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "GetPendingSendToExternal", Handler: _Query_GetPendingSendToExternal_Handler, }, + { + MethodName: "RefundRecordByNonce", + Handler: _Query_RefundRecordByNonce_Handler, + }, + { + MethodName: "RefundRecordByReceiver", + Handler: _Query_RefundRecordByReceiver_Handler, + }, + { + MethodName: "RefundConfirmByNonce", + Handler: _Query_RefundConfirmByNonce_Handler, + }, + { + MethodName: "LastPendingRefundRecordByAddr", + Handler: _Query_LastPendingRefundRecordByAddr_Handler, + }, { MethodName: "Oracles", Handler: _Query_Oracles_Handler, @@ -5573,99 +6142,399 @@ func (m *QueryBridgeChainListResponse) MarshalToSizedBuffer(dAtA []byte) (int, e 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++ +func (m *QueryRefundRecordByNonceRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *QueryParamsRequest) Size() (n int) { - if m == nil { - return 0 - } + +func (m *QueryRefundRecordByNonceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryRefundRecordByNonceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.ChainName) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if m.EventNonce != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.EventNonce)) + i-- + dAtA[i] = 0x10 } - return n + if len(m.ChainName) > 0 { + i -= len(m.ChainName) + copy(dAtA[i:], m.ChainName) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ChainName))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 +func (m *QueryRefundRecordByNonceResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - return n + return dAtA[:n], nil } -func (m *QueryCurrentOracleSetRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ChainName) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n +func (m *QueryRefundRecordByNonceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryCurrentOracleSetResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryRefundRecordByNonceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.OracleSet != nil { - l = m.OracleSet.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.Record != nil { + { + size, err := m.Record.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *QueryOracleSetRequestRequest) Size() (n int) { - if m == nil { - return 0 +func (m *QueryRefundRecordByReceiverRequest) 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 *QueryRefundRecordByReceiverRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryRefundRecordByReceiverRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.ChainName) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if len(m.ReceiverAddress) > 0 { + i -= len(m.ReceiverAddress) + copy(dAtA[i:], m.ReceiverAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ReceiverAddress))) + i-- + dAtA[i] = 0x12 } - if m.Nonce != 0 { - n += 1 + sovQuery(uint64(m.Nonce)) + if len(m.ChainName) > 0 { + i -= len(m.ChainName) + copy(dAtA[i:], m.ChainName) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ChainName))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *QueryOracleSetRequestResponse) Size() (n int) { - if m == nil { - return 0 +func (m *QueryRefundRecordByReceiverResponse) 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 *QueryRefundRecordByReceiverResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryRefundRecordByReceiverResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.OracleSet != nil { - l = m.OracleSet.Size() - n += 1 + l + sovQuery(uint64(l)) + if len(m.Records) > 0 { + for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Records[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } } - return n + return len(dAtA) - i, nil } -func (m *QueryOracleSetConfirmRequest) Size() (n int) { - if m == nil { - return 0 +func (m *QueryRefundConfirmByNonceRequest) 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 *QueryRefundConfirmByNonceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryRefundConfirmByNonceRequest) 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] = 0x10 + } + if len(m.ChainName) > 0 { + i -= len(m.ChainName) + copy(dAtA[i:], m.ChainName) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ChainName))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryRefundConfirmByNonceResponse) 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 *QueryRefundConfirmByNonceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryRefundConfirmByNonceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.EnoughPower { + i-- + if m.EnoughPower { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.Confirms) > 0 { + for iNdEx := len(m.Confirms) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Confirms[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 *QueryLastPendingRefundRecordByAddrRequest) 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 *QueryLastPendingRefundRecordByAddrRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryLastPendingRefundRecordByAddrRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ExternalAddress) > 0 { + i -= len(m.ExternalAddress) + copy(dAtA[i:], m.ExternalAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ExternalAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.ChainName) > 0 { + i -= len(m.ChainName) + copy(dAtA[i:], m.ChainName) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ChainName))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryLastPendingRefundRecordByAddrResponse) 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 *QueryLastPendingRefundRecordByAddrResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryLastPendingRefundRecordByAddrResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Records) > 0 { + for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Records[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 *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ChainName) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryParamsResponse) 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 *QueryCurrentOracleSetRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ChainName) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryCurrentOracleSetResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.OracleSet != nil { + l = m.OracleSet.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryOracleSetRequestRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ChainName) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Nonce != 0 { + n += 1 + sovQuery(uint64(m.Nonce)) + } + return n +} + +func (m *QueryOracleSetRequestResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.OracleSet != nil { + l = m.OracleSet.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryOracleSetConfirmRequest) Size() (n int) { + if m == nil { + return 0 } var l int _ = l @@ -6362,16 +7231,882 @@ func (m *QueryBridgeChainListResponse) Size() (n int) { n += 1 + l + sovQuery(uint64(l)) } } - return n -} + return n +} + +func (m *QueryRefundRecordByNonceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ChainName) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.EventNonce != 0 { + n += 1 + sovQuery(uint64(m.EventNonce)) + } + return n +} + +func (m *QueryRefundRecordByNonceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Record != nil { + l = m.Record.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryRefundRecordByReceiverRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ChainName) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.ReceiverAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryRefundRecordByReceiverResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Records) > 0 { + for _, e := range m.Records { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryRefundConfirmByNonceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ChainName) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.EventNonce != 0 { + n += 1 + sovQuery(uint64(m.EventNonce)) + } + return n +} + +func (m *QueryRefundConfirmByNonceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Confirms) > 0 { + for _, e := range m.Confirms { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.EnoughPower { + n += 2 + } + return n +} + +func (m *QueryLastPendingRefundRecordByAddrRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ChainName) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.ExternalAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryLastPendingRefundRecordByAddrResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Records) > 0 { + for _, e := range m.Records { + l = e.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 *QueryParamsRequest) 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: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainName", 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.ChainName = 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 *QueryParamsResponse) 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: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: 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 *QueryCurrentOracleSetRequest) 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: QueryCurrentOracleSetRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCurrentOracleSetRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainName", 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.ChainName = 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 *QueryCurrentOracleSetResponse) 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: QueryCurrentOracleSetResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCurrentOracleSetResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleSet", 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.OracleSet == nil { + m.OracleSet = &OracleSet{} + } + if err := m.OracleSet.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 *QueryOracleSetRequestRequest) 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: QueryOracleSetRequestRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryOracleSetRequestRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainName", 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.ChainName = 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 ErrIntOverflowQuery + } + 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 := 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 *QueryOracleSetRequestResponse) 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: QueryOracleSetRequestResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryOracleSetRequestResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleSet", 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.OracleSet == nil { + m.OracleSet = &OracleSet{} + } + if err := m.OracleSet.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 *QueryOracleSetConfirmRequest) 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: QueryOracleSetConfirmRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryOracleSetConfirmRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainName", 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.ChainName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BridgerAddress", 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.BridgerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + 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 ErrIntOverflowQuery + } + 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 := 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 *QueryOracleSetConfirmResponse) 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: QueryOracleSetConfirmResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryOracleSetConfirmResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Confirm", 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.Confirm == nil { + m.Confirm = &MsgOracleSetConfirm{} + } + if err := m.Confirm.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 + } + } -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)))) + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil } -func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryOracleSetConfirmsByNonceRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6394,10 +8129,10 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryOracleSetConfirmsByNonceRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryOracleSetConfirmsByNonceRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -6432,6 +8167,25 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { } m.ChainName = 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 ErrIntOverflowQuery + } + 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 := skipQuery(dAtA[iNdEx:]) @@ -6453,7 +8207,7 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryOracleSetConfirmsByNonceResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6476,15 +8230,15 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryOracleSetConfirmsByNonceResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryOracleSetConfirmsByNonceResponse: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Confirms", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6511,7 +8265,8 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Confirms = append(m.Confirms, &MsgOracleSetConfirm{}) + if err := m.Confirms[len(m.Confirms)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -6536,7 +8291,7 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryCurrentOracleSetRequest) Unmarshal(dAtA []byte) error { +func (m *QueryLastOracleSetRequestsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6559,10 +8314,10 @@ func (m *QueryCurrentOracleSetRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryCurrentOracleSetRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryLastOracleSetRequestsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCurrentOracleSetRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryLastOracleSetRequestsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -6618,7 +8373,7 @@ func (m *QueryCurrentOracleSetRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryCurrentOracleSetResponse) Unmarshal(dAtA []byte) error { +func (m *QueryLastOracleSetRequestsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6641,15 +8396,15 @@ func (m *QueryCurrentOracleSetResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryCurrentOracleSetResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryLastOracleSetRequestsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCurrentOracleSetResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryLastOracleSetRequestsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OracleSet", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OracleSets", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6676,10 +8431,8 @@ func (m *QueryCurrentOracleSetResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.OracleSet == nil { - m.OracleSet = &OracleSet{} - } - if err := m.OracleSet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.OracleSets = append(m.OracleSets, &OracleSet{}) + if err := m.OracleSets[len(m.OracleSets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -6704,7 +8457,7 @@ func (m *QueryCurrentOracleSetResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryOracleSetRequestRequest) Unmarshal(dAtA []byte) error { +func (m *QueryLastPendingOracleSetRequestByAddrRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6727,10 +8480,10 @@ func (m *QueryOracleSetRequestRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryOracleSetRequestRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryLastPendingOracleSetRequestByAddrRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryOracleSetRequestRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryLastPendingOracleSetRequestByAddrRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -6766,10 +8519,10 @@ func (m *QueryOracleSetRequestRequest) Unmarshal(dAtA []byte) error { m.ChainName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BridgerAddress", wireType) } - m.Nonce = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -6779,11 +8532,24 @@ func (m *QueryOracleSetRequestRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Nonce |= uint64(b&0x7F) << shift + 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.BridgerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -6805,7 +8571,7 @@ func (m *QueryOracleSetRequestRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryOracleSetRequestResponse) Unmarshal(dAtA []byte) error { +func (m *QueryLastPendingOracleSetRequestByAddrResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6828,15 +8594,15 @@ func (m *QueryOracleSetRequestResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryOracleSetRequestResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryLastPendingOracleSetRequestByAddrResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryOracleSetRequestResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryLastPendingOracleSetRequestByAddrResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OracleSet", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OracleSets", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6863,10 +8629,8 @@ func (m *QueryOracleSetRequestResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.OracleSet == nil { - m.OracleSet = &OracleSet{} - } - if err := m.OracleSet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.OracleSets = append(m.OracleSets, &OracleSet{}) + if err := m.OracleSets[len(m.OracleSets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -6891,7 +8655,7 @@ func (m *QueryOracleSetRequestResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryOracleSetConfirmRequest) Unmarshal(dAtA []byte) error { +func (m *QueryBatchFeeRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6914,10 +8678,10 @@ func (m *QueryOracleSetConfirmRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryOracleSetConfirmRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryBatchFeeRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryOracleSetConfirmRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryBatchFeeRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -6954,9 +8718,9 @@ func (m *QueryOracleSetConfirmRequest) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BridgerAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MinBatchFees", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -6966,43 +8730,26 @@ func (m *QueryOracleSetConfirmRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.BridgerAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - 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 ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Nonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + m.MinBatchFees = append(m.MinBatchFees, MinBatchFee{}) + if err := m.MinBatchFees[len(m.MinBatchFees)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -7024,7 +8771,7 @@ func (m *QueryOracleSetConfirmRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryOracleSetConfirmResponse) Unmarshal(dAtA []byte) error { +func (m *QueryBatchFeeResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7047,15 +8794,15 @@ func (m *QueryOracleSetConfirmResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryOracleSetConfirmResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryBatchFeeResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryOracleSetConfirmResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryBatchFeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Confirm", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BatchFees", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7082,10 +8829,8 @@ func (m *QueryOracleSetConfirmResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Confirm == nil { - m.Confirm = &MsgOracleSetConfirm{} - } - if err := m.Confirm.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.BatchFees = append(m.BatchFees, &BatchFees{}) + if err := m.BatchFees[len(m.BatchFees)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -7110,7 +8855,7 @@ func (m *QueryOracleSetConfirmResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryOracleSetConfirmsByNonceRequest) Unmarshal(dAtA []byte) error { +func (m *QueryLastPendingBatchRequestByAddrRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7133,10 +8878,10 @@ func (m *QueryOracleSetConfirmsByNonceRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryOracleSetConfirmsByNonceRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryLastPendingBatchRequestByAddrRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryOracleSetConfirmsByNonceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryLastPendingBatchRequestByAddrRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -7172,10 +8917,10 @@ func (m *QueryOracleSetConfirmsByNonceRequest) Unmarshal(dAtA []byte) error { m.ChainName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BridgerAddress", wireType) } - m.Nonce = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -7185,11 +8930,24 @@ func (m *QueryOracleSetConfirmsByNonceRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Nonce |= uint64(b&0x7F) << shift + 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.BridgerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -7211,7 +8969,7 @@ func (m *QueryOracleSetConfirmsByNonceRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryOracleSetConfirmsByNonceResponse) Unmarshal(dAtA []byte) error { +func (m *QueryLastPendingBatchRequestByAddrResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7234,15 +8992,15 @@ func (m *QueryOracleSetConfirmsByNonceResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryOracleSetConfirmsByNonceResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryLastPendingBatchRequestByAddrResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryOracleSetConfirmsByNonceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryLastPendingBatchRequestByAddrResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Confirms", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Batch", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7269,8 +9027,10 @@ func (m *QueryOracleSetConfirmsByNonceResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Confirms = append(m.Confirms, &MsgOracleSetConfirm{}) - if err := m.Confirms[len(m.Confirms)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Batch == nil { + m.Batch = &OutgoingTxBatch{} + } + if err := m.Batch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -7295,7 +9055,7 @@ func (m *QueryOracleSetConfirmsByNonceResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryLastOracleSetRequestsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryOutgoingTxBatchesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7318,10 +9078,10 @@ func (m *QueryLastOracleSetRequestsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryLastOracleSetRequestsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryOutgoingTxBatchesRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLastOracleSetRequestsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryOutgoingTxBatchesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -7377,7 +9137,7 @@ func (m *QueryLastOracleSetRequestsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryLastOracleSetRequestsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryOutgoingTxBatchesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7400,15 +9160,15 @@ func (m *QueryLastOracleSetRequestsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryLastOracleSetRequestsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryOutgoingTxBatchesResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLastOracleSetRequestsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryOutgoingTxBatchesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OracleSets", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Batches", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7435,8 +9195,8 @@ func (m *QueryLastOracleSetRequestsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.OracleSets = append(m.OracleSets, &OracleSet{}) - if err := m.OracleSets[len(m.OracleSets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Batches = append(m.Batches, &OutgoingTxBatch{}) + if err := m.Batches[len(m.Batches)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -7461,7 +9221,7 @@ func (m *QueryLastOracleSetRequestsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryLastPendingOracleSetRequestByAddrRequest) Unmarshal(dAtA []byte) error { +func (m *QueryBatchRequestByNonceRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7484,10 +9244,10 @@ func (m *QueryLastPendingOracleSetRequestByAddrRequest) Unmarshal(dAtA []byte) e fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryLastPendingOracleSetRequestByAddrRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryBatchRequestByNonceRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLastPendingOracleSetRequestByAddrRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryBatchRequestByNonceRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -7524,7 +9284,7 @@ func (m *QueryLastPendingOracleSetRequestByAddrRequest) Unmarshal(dAtA []byte) e iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BridgerAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TokenContract", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7552,8 +9312,27 @@ func (m *QueryLastPendingOracleSetRequestByAddrRequest) Unmarshal(dAtA []byte) e if postIndex > l { return io.ErrUnexpectedEOF } - m.BridgerAddress = string(dAtA[iNdEx:postIndex]) + m.TokenContract = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 3: + 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 ErrIntOverflowQuery + } + 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 := skipQuery(dAtA[iNdEx:]) @@ -7575,7 +9354,7 @@ func (m *QueryLastPendingOracleSetRequestByAddrRequest) Unmarshal(dAtA []byte) e } return nil } -func (m *QueryLastPendingOracleSetRequestByAddrResponse) Unmarshal(dAtA []byte) error { +func (m *QueryBatchRequestByNonceResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7598,15 +9377,15 @@ func (m *QueryLastPendingOracleSetRequestByAddrResponse) Unmarshal(dAtA []byte) fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryLastPendingOracleSetRequestByAddrResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryBatchRequestByNonceResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLastPendingOracleSetRequestByAddrResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryBatchRequestByNonceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OracleSets", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Batch", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7633,8 +9412,10 @@ func (m *QueryLastPendingOracleSetRequestByAddrResponse) Unmarshal(dAtA []byte) if postIndex > l { return io.ErrUnexpectedEOF } - m.OracleSets = append(m.OracleSets, &OracleSet{}) - if err := m.OracleSets[len(m.OracleSets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Batch == nil { + m.Batch = &OutgoingTxBatch{} + } + if err := m.Batch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -7659,7 +9440,7 @@ func (m *QueryLastPendingOracleSetRequestByAddrResponse) Unmarshal(dAtA []byte) } return nil } -func (m *QueryBatchFeeRequest) Unmarshal(dAtA []byte) error { +func (m *QueryBatchConfirmRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7682,10 +9463,10 @@ func (m *QueryBatchFeeRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryBatchFeeRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryBatchConfirmRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBatchFeeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryBatchConfirmRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -7722,9 +9503,9 @@ func (m *QueryBatchFeeRequest) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinBatchFees", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TokenContract", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -7734,26 +9515,75 @@ func (m *QueryBatchFeeRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.MinBatchFees = append(m.MinBatchFees, MinBatchFee{}) - if err := m.MinBatchFees[len(m.MinBatchFees)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.TokenContract = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BridgerAddress", 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.BridgerAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + 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 ErrIntOverflowQuery + } + 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 := skipQuery(dAtA[iNdEx:]) @@ -7775,7 +9605,7 @@ func (m *QueryBatchFeeRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryBatchFeeResponse) Unmarshal(dAtA []byte) error { +func (m *QueryBatchConfirmResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7798,15 +9628,15 @@ func (m *QueryBatchFeeResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryBatchFeeResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryBatchConfirmResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBatchFeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryBatchConfirmResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchFees", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Confirm", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7833,8 +9663,10 @@ func (m *QueryBatchFeeResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.BatchFees = append(m.BatchFees, &BatchFees{}) - if err := m.BatchFees[len(m.BatchFees)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Confirm == nil { + m.Confirm = &MsgConfirmBatch{} + } + if err := m.Confirm.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -7859,7 +9691,7 @@ func (m *QueryBatchFeeResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryLastPendingBatchRequestByAddrRequest) Unmarshal(dAtA []byte) error { +func (m *QueryBatchConfirmsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7882,10 +9714,10 @@ func (m *QueryLastPendingBatchRequestByAddrRequest) Unmarshal(dAtA []byte) error fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryLastPendingBatchRequestByAddrRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryBatchConfirmsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLastPendingBatchRequestByAddrRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryBatchConfirmsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -7922,7 +9754,7 @@ func (m *QueryLastPendingBatchRequestByAddrRequest) Unmarshal(dAtA []byte) error iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BridgerAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TokenContract", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7950,8 +9782,27 @@ func (m *QueryLastPendingBatchRequestByAddrRequest) Unmarshal(dAtA []byte) error if postIndex > l { return io.ErrUnexpectedEOF } - m.BridgerAddress = string(dAtA[iNdEx:postIndex]) + m.TokenContract = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 3: + 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 ErrIntOverflowQuery + } + 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 := skipQuery(dAtA[iNdEx:]) @@ -7973,7 +9824,7 @@ func (m *QueryLastPendingBatchRequestByAddrRequest) Unmarshal(dAtA []byte) error } return nil } -func (m *QueryLastPendingBatchRequestByAddrResponse) Unmarshal(dAtA []byte) error { +func (m *QueryBatchConfirmsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7996,15 +9847,15 @@ func (m *QueryLastPendingBatchRequestByAddrResponse) Unmarshal(dAtA []byte) erro fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryLastPendingBatchRequestByAddrResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryBatchConfirmsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLastPendingBatchRequestByAddrResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryBatchConfirmsResponse: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Confirms", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8031,10 +9882,8 @@ func (m *QueryLastPendingBatchRequestByAddrResponse) Unmarshal(dAtA []byte) erro if postIndex > l { return io.ErrUnexpectedEOF } - if m.Batch == nil { - m.Batch = &OutgoingTxBatch{} - } - if err := m.Batch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Confirms = append(m.Confirms, &MsgConfirmBatch{}) + if err := m.Confirms[len(m.Confirms)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -8059,7 +9908,7 @@ func (m *QueryLastPendingBatchRequestByAddrResponse) Unmarshal(dAtA []byte) erro } return nil } -func (m *QueryOutgoingTxBatchesRequest) Unmarshal(dAtA []byte) error { +func (m *QueryLastEventNonceByAddrRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8082,10 +9931,10 @@ func (m *QueryOutgoingTxBatchesRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryOutgoingTxBatchesRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryLastEventNonceByAddrRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryOutgoingTxBatchesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryLastEventNonceByAddrRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -8120,6 +9969,38 @@ func (m *QueryOutgoingTxBatchesRequest) Unmarshal(dAtA []byte) error { } m.ChainName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BridgerAddress", 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.BridgerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -8141,7 +10022,7 @@ func (m *QueryOutgoingTxBatchesRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryOutgoingTxBatchesResponse) Unmarshal(dAtA []byte) error { +func (m *QueryLastEventNonceByAddrResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8164,17 +10045,17 @@ func (m *QueryOutgoingTxBatchesResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryOutgoingTxBatchesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryLastEventNonceByAddrResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryOutgoingTxBatchesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryLastEventNonceByAddrResponse: 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) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EventNonce", wireType) } - var msglen int + m.EventNonce = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -8184,26 +10065,11 @@ func (m *QueryOutgoingTxBatchesResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.EventNonce |= uint64(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, &OutgoingTxBatch{}) - 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:]) @@ -8225,7 +10091,7 @@ func (m *QueryOutgoingTxBatchesResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryBatchRequestByNonceRequest) Unmarshal(dAtA []byte) error { +func (m *QueryTokenToDenomRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8248,10 +10114,10 @@ func (m *QueryBatchRequestByNonceRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryBatchRequestByNonceRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryTokenToDenomRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBatchRequestByNonceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryTokenToDenomRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -8288,7 +10154,7 @@ func (m *QueryBatchRequestByNonceRequest) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenContract", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8316,27 +10182,8 @@ func (m *QueryBatchRequestByNonceRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.TokenContract = string(dAtA[iNdEx:postIndex]) + m.Token = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: - 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 ErrIntOverflowQuery - } - 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 := skipQuery(dAtA[iNdEx:]) @@ -8358,7 +10205,7 @@ func (m *QueryBatchRequestByNonceRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryBatchRequestByNonceResponse) Unmarshal(dAtA []byte) error { +func (m *QueryTokenToDenomResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8381,17 +10228,17 @@ func (m *QueryBatchRequestByNonceResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryBatchRequestByNonceResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryTokenToDenomResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBatchRequestByNonceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryTokenToDenomResponse: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -8401,27 +10248,23 @@ func (m *QueryBatchRequestByNonceResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Batch == nil { - m.Batch = &OutgoingTxBatch{} - } - if err := m.Batch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Denom = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -8444,7 +10287,7 @@ func (m *QueryBatchRequestByNonceResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryBatchConfirmRequest) Unmarshal(dAtA []byte) error { +func (m *QueryDenomToTokenRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8467,10 +10310,10 @@ func (m *QueryBatchConfirmRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryBatchConfirmRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryDenomToTokenRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBatchConfirmRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryDenomToTokenRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -8507,39 +10350,7 @@ func (m *QueryBatchConfirmRequest) Unmarshal(dAtA []byte) error { iNdEx = postIndex 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 - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BridgerAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8567,27 +10378,8 @@ func (m *QueryBatchConfirmRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.BridgerAddress = string(dAtA[iNdEx:postIndex]) + m.Denom = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: - 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 ErrIntOverflowQuery - } - 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 := skipQuery(dAtA[iNdEx:]) @@ -8609,7 +10401,7 @@ func (m *QueryBatchConfirmRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryBatchConfirmResponse) Unmarshal(dAtA []byte) error { +func (m *QueryDenomToTokenResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8632,17 +10424,17 @@ func (m *QueryBatchConfirmResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryBatchConfirmResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryDenomToTokenResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBatchConfirmResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryDenomToTokenResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Confirm", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -8652,27 +10444,23 @@ func (m *QueryBatchConfirmResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Confirm == nil { - m.Confirm = &MsgConfirmBatch{} - } - if err := m.Confirm.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Token = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -8695,7 +10483,7 @@ func (m *QueryBatchConfirmResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryBatchConfirmsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryOracleByAddrRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8718,10 +10506,10 @@ func (m *QueryBatchConfirmsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryBatchConfirmsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryOracleByAddrRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBatchConfirmsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryOracleByAddrRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -8758,7 +10546,7 @@ func (m *QueryBatchConfirmsRequest) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenContract", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OracleAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8786,27 +10574,8 @@ func (m *QueryBatchConfirmsRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.TokenContract = string(dAtA[iNdEx:postIndex]) + m.OracleAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: - 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 ErrIntOverflowQuery - } - 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 := skipQuery(dAtA[iNdEx:]) @@ -8828,7 +10597,7 @@ func (m *QueryBatchConfirmsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryBatchConfirmsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryOracleResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8851,15 +10620,15 @@ func (m *QueryBatchConfirmsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryBatchConfirmsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryOracleResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBatchConfirmsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryOracleResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Confirms", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Oracle", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8886,8 +10655,10 @@ func (m *QueryBatchConfirmsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Confirms = append(m.Confirms, &MsgConfirmBatch{}) - if err := m.Confirms[len(m.Confirms)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Oracle == nil { + m.Oracle = &Oracle{} + } + if err := m.Oracle.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -8912,7 +10683,7 @@ func (m *QueryBatchConfirmsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryLastEventNonceByAddrRequest) Unmarshal(dAtA []byte) error { +func (m *QueryOracleByExternalAddrRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8935,10 +10706,10 @@ func (m *QueryLastEventNonceByAddrRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryLastEventNonceByAddrRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryOracleByExternalAddrRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLastEventNonceByAddrRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryOracleByExternalAddrRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -8975,7 +10746,7 @@ func (m *QueryLastEventNonceByAddrRequest) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BridgerAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ExternalAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9003,7 +10774,7 @@ func (m *QueryLastEventNonceByAddrRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.BridgerAddress = string(dAtA[iNdEx:postIndex]) + m.ExternalAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -9026,7 +10797,7 @@ func (m *QueryLastEventNonceByAddrRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryLastEventNonceByAddrResponse) Unmarshal(dAtA []byte) error { +func (m *QueryOracleByBridgerAddrRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9049,17 +10820,17 @@ func (m *QueryLastEventNonceByAddrResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryLastEventNonceByAddrResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryOracleByBridgerAddrRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLastEventNonceByAddrResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryOracleByBridgerAddrRequest: 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) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainName", wireType) } - m.EventNonce = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -9069,11 +10840,56 @@ func (m *QueryLastEventNonceByAddrResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.EventNonce |= uint64(b&0x7F) << shift + 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.ChainName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BridgerAddress", 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.BridgerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -9095,7 +10911,7 @@ func (m *QueryLastEventNonceByAddrResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryTokenToDenomRequest) Unmarshal(dAtA []byte) error { +func (m *QueryPendingSendToExternalRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9118,10 +10934,10 @@ func (m *QueryTokenToDenomRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryTokenToDenomRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryPendingSendToExternalRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryTokenToDenomRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryPendingSendToExternalRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -9158,7 +10974,7 @@ func (m *QueryTokenToDenomRequest) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9186,7 +11002,7 @@ func (m *QueryTokenToDenomRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Token = string(dAtA[iNdEx:postIndex]) + m.SenderAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -9209,7 +11025,7 @@ func (m *QueryTokenToDenomRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryTokenToDenomResponse) Unmarshal(dAtA []byte) error { +func (m *QueryPendingSendToExternalResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9232,17 +11048,17 @@ func (m *QueryTokenToDenomResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryTokenToDenomResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryPendingSendToExternalResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryTokenToDenomResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryPendingSendToExternalResponse: 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) + return fmt.Errorf("proto: wrong wireType = %d for field TransfersInBatches", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -9252,23 +11068,59 @@ func (m *QueryTokenToDenomResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Denom = string(dAtA[iNdEx:postIndex]) + m.TransfersInBatches = append(m.TransfersInBatches, &OutgoingTransferTx{}) + if err := m.TransfersInBatches[len(m.TransfersInBatches)-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 UnbatchedTransfers", 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.UnbatchedTransfers = append(m.UnbatchedTransfers, &OutgoingTransferTx{}) + if err := m.UnbatchedTransfers[len(m.UnbatchedTransfers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -9291,7 +11143,7 @@ func (m *QueryTokenToDenomResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryDenomToTokenRequest) Unmarshal(dAtA []byte) error { +func (m *QueryLastObservedBlockHeightRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9314,10 +11166,10 @@ func (m *QueryDenomToTokenRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryDenomToTokenRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryLastObservedBlockHeightRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDenomToTokenRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryLastObservedBlockHeightRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -9352,38 +11204,6 @@ func (m *QueryDenomToTokenRequest) Unmarshal(dAtA []byte) error { } m.ChainName = 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 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:]) @@ -9405,7 +11225,7 @@ func (m *QueryDenomToTokenRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryDenomToTokenResponse) Unmarshal(dAtA []byte) error { +func (m *QueryLastObservedBlockHeightResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9428,17 +11248,17 @@ func (m *QueryDenomToTokenResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryDenomToTokenResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryLastObservedBlockHeightResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDenomToTokenResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryLastObservedBlockHeightResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExternalBlockHeight", wireType) } - var stringLen uint64 + m.ExternalBlockHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -9448,24 +11268,30 @@ func (m *QueryDenomToTokenResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.ExternalBlockHeight |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) } - if postIndex > l { - return io.ErrUnexpectedEOF + m.BlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - m.Token = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -9487,7 +11313,7 @@ func (m *QueryDenomToTokenResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryOracleByAddrRequest) Unmarshal(dAtA []byte) error { +func (m *QueryLastEventBlockHeightByAddrRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9510,10 +11336,10 @@ func (m *QueryOracleByAddrRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryOracleByAddrRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryLastEventBlockHeightByAddrRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryOracleByAddrRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryLastEventBlockHeightByAddrRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -9550,7 +11376,7 @@ func (m *QueryOracleByAddrRequest) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OracleAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BridgerAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9578,7 +11404,7 @@ func (m *QueryOracleByAddrRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.OracleAddress = string(dAtA[iNdEx:postIndex]) + m.BridgerAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -9601,7 +11427,7 @@ func (m *QueryOracleByAddrRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryOracleResponse) Unmarshal(dAtA []byte) error { +func (m *QueryLastEventBlockHeightByAddrResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9624,17 +11450,17 @@ func (m *QueryOracleResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryOracleResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryLastEventBlockHeightByAddrResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryOracleResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryLastEventBlockHeightByAddrResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Oracle", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) } - var msglen int + m.BlockHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -9644,28 +11470,11 @@ func (m *QueryOracleResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.BlockHeight |= uint64(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.Oracle == nil { - m.Oracle = &Oracle{} - } - if err := m.Oracle.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -9687,7 +11496,7 @@ func (m *QueryOracleResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryOracleByExternalAddrRequest) Unmarshal(dAtA []byte) error { +func (m *QueryOraclesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9710,10 +11519,10 @@ func (m *QueryOracleByExternalAddrRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryOracleByExternalAddrRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryOraclesRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryOracleByExternalAddrRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryOraclesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -9748,38 +11557,6 @@ func (m *QueryOracleByExternalAddrRequest) Unmarshal(dAtA []byte) error { } m.ChainName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExternalAddress", 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.ExternalAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -9801,7 +11578,7 @@ func (m *QueryOracleByExternalAddrRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryOracleByBridgerAddrRequest) Unmarshal(dAtA []byte) error { +func (m *QueryOraclesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9824,49 +11601,17 @@ func (m *QueryOracleByBridgerAddrRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryOracleByBridgerAddrRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryOraclesResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryOracleByBridgerAddrRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryOraclesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainName", 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.ChainName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BridgerAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Oracles", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -9876,23 +11621,25 @@ func (m *QueryOracleByBridgerAddrRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.BridgerAddress = string(dAtA[iNdEx:postIndex]) + m.Oracles = append(m.Oracles, Oracle{}) + if err := m.Oracles[len(m.Oracles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -9915,7 +11662,7 @@ func (m *QueryOracleByBridgerAddrRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryPendingSendToExternalRequest) Unmarshal(dAtA []byte) error { +func (m *QueryProjectedBatchTimeoutHeightRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9938,10 +11685,10 @@ func (m *QueryPendingSendToExternalRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryPendingSendToExternalRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryProjectedBatchTimeoutHeightRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryPendingSendToExternalRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryProjectedBatchTimeoutHeightRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -9976,38 +11723,6 @@ func (m *QueryPendingSendToExternalRequest) Unmarshal(dAtA []byte) error { } m.ChainName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - 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:]) @@ -10029,7 +11744,7 @@ func (m *QueryPendingSendToExternalRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryPendingSendToExternalResponse) Unmarshal(dAtA []byte) error { +func (m *QueryProjectedBatchTimeoutHeightResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10052,51 +11767,17 @@ func (m *QueryPendingSendToExternalResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryPendingSendToExternalResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryProjectedBatchTimeoutHeightResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryPendingSendToExternalResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryProjectedBatchTimeoutHeightResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TransfersInBatches", 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.TransfersInBatches = append(m.TransfersInBatches, &OutgoingTransferTx{}) - if err := m.TransfersInBatches[len(m.TransfersInBatches)-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 UnbatchedTransfers", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeoutHeight", wireType) } - var msglen int + m.TimeoutHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -10106,26 +11787,11 @@ func (m *QueryPendingSendToExternalResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.TimeoutHeight |= uint64(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.UnbatchedTransfers = append(m.UnbatchedTransfers, &OutgoingTransferTx{}) - if err := m.UnbatchedTransfers[len(m.UnbatchedTransfers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -10147,7 +11813,7 @@ func (m *QueryPendingSendToExternalResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryLastObservedBlockHeightRequest) Unmarshal(dAtA []byte) error { +func (m *QueryBridgeTokensRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10170,10 +11836,10 @@ func (m *QueryLastObservedBlockHeightRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryLastObservedBlockHeightRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryBridgeTokensRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLastObservedBlockHeightRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryBridgeTokensRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -10229,7 +11895,7 @@ func (m *QueryLastObservedBlockHeightRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryLastObservedBlockHeightResponse) Unmarshal(dAtA []byte) error { +func (m *QueryBridgeTokensResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10252,17 +11918,17 @@ func (m *QueryLastObservedBlockHeightResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryLastObservedBlockHeightResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryBridgeTokensResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLastObservedBlockHeightResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryBridgeTokensResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExternalBlockHeight", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BridgeTokens", wireType) } - m.ExternalBlockHeight = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -10272,30 +11938,26 @@ func (m *QueryLastObservedBlockHeightResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ExternalBlockHeight |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) + if msglen < 0 { + return ErrInvalidLengthQuery } - m.BlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BridgeTokens = append(m.BridgeTokens, &BridgeToken{}) + if err := m.BridgeTokens[len(m.BridgeTokens)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -10317,7 +11979,7 @@ func (m *QueryLastObservedBlockHeightResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryLastEventBlockHeightByAddrRequest) Unmarshal(dAtA []byte) error { +func (m *QueryBridgeCoinByDenomRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10340,10 +12002,10 @@ func (m *QueryLastEventBlockHeightByAddrRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryLastEventBlockHeightByAddrRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryBridgeCoinByDenomRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLastEventBlockHeightByAddrRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryBridgeCoinByDenomRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -10380,7 +12042,7 @@ func (m *QueryLastEventBlockHeightByAddrRequest) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BridgerAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10408,7 +12070,7 @@ func (m *QueryLastEventBlockHeightByAddrRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.BridgerAddress = string(dAtA[iNdEx:postIndex]) + m.Denom = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -10431,7 +12093,7 @@ func (m *QueryLastEventBlockHeightByAddrRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryLastEventBlockHeightByAddrResponse) Unmarshal(dAtA []byte) error { +func (m *QueryBridgeCoinByDenomResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10454,17 +12116,17 @@ func (m *QueryLastEventBlockHeightByAddrResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryLastEventBlockHeightByAddrResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryBridgeCoinByDenomResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLastEventBlockHeightByAddrResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryBridgeCoinByDenomResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Coin", wireType) } - m.BlockHeight = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -10474,11 +12136,25 @@ func (m *QueryLastEventBlockHeightByAddrResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.BlockHeight |= uint64(b&0x7F) << shift + 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.Coin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -10500,7 +12176,7 @@ func (m *QueryLastEventBlockHeightByAddrResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryOraclesRequest) Unmarshal(dAtA []byte) error { +func (m *QueryBridgeChainListRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10510,57 +12186,25 @@ func (m *QueryOraclesRequest) Unmarshal(dAtA []byte) error { 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: QueryOraclesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryOraclesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainName", 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 { + if iNdEx >= l { return io.ErrUnexpectedEOF } - m.ChainName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex + 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: QueryBridgeChainListRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBridgeChainListRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -10582,7 +12226,7 @@ func (m *QueryOraclesRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryOraclesResponse) Unmarshal(dAtA []byte) error { +func (m *QueryBridgeChainListResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10605,17 +12249,17 @@ func (m *QueryOraclesResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryOraclesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryBridgeChainListResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryOraclesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryBridgeChainListResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Oracles", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ChainNames", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -10625,25 +12269,23 @@ func (m *QueryOraclesResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Oracles = append(m.Oracles, Oracle{}) - if err := m.Oracles[len(m.Oracles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.ChainNames = append(m.ChainNames, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -10666,7 +12308,7 @@ func (m *QueryOraclesResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryProjectedBatchTimeoutHeightRequest) Unmarshal(dAtA []byte) error { +func (m *QueryRefundRecordByNonceRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10689,10 +12331,10 @@ func (m *QueryProjectedBatchTimeoutHeightRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryProjectedBatchTimeoutHeightRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryRefundRecordByNonceRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryProjectedBatchTimeoutHeightRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryRefundRecordByNonceRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -10727,6 +12369,25 @@ func (m *QueryProjectedBatchTimeoutHeightRequest) Unmarshal(dAtA []byte) error { } m.ChainName = 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 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:]) @@ -10748,7 +12409,7 @@ func (m *QueryProjectedBatchTimeoutHeightRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryProjectedBatchTimeoutHeightResponse) Unmarshal(dAtA []byte) error { +func (m *QueryRefundRecordByNonceResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10771,17 +12432,17 @@ func (m *QueryProjectedBatchTimeoutHeightResponse) Unmarshal(dAtA []byte) error fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryProjectedBatchTimeoutHeightResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryRefundRecordByNonceResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryProjectedBatchTimeoutHeightResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryRefundRecordByNonceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeoutHeight", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Record", wireType) } - m.TimeoutHeight = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -10791,11 +12452,28 @@ func (m *QueryProjectedBatchTimeoutHeightResponse) Unmarshal(dAtA []byte) error } b := dAtA[iNdEx] iNdEx++ - m.TimeoutHeight |= uint64(b&0x7F) << shift + 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.Record == nil { + m.Record = &RefundRecord{} + } + if err := m.Record.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -10817,7 +12495,7 @@ func (m *QueryProjectedBatchTimeoutHeightResponse) Unmarshal(dAtA []byte) error } return nil } -func (m *QueryBridgeTokensRequest) Unmarshal(dAtA []byte) error { +func (m *QueryRefundRecordByReceiverRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10840,10 +12518,10 @@ func (m *QueryBridgeTokensRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryBridgeTokensRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryRefundRecordByReceiverRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBridgeTokensRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryRefundRecordByReceiverRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -10878,6 +12556,38 @@ func (m *QueryBridgeTokensRequest) Unmarshal(dAtA []byte) error { } m.ChainName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReceiverAddress", 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.ReceiverAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -10899,7 +12609,7 @@ func (m *QueryBridgeTokensRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryBridgeTokensResponse) Unmarshal(dAtA []byte) error { +func (m *QueryRefundRecordByReceiverResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10922,15 +12632,15 @@ func (m *QueryBridgeTokensResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryBridgeTokensResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryRefundRecordByReceiverResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBridgeTokensResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryRefundRecordByReceiverResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BridgeTokens", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10957,8 +12667,8 @@ func (m *QueryBridgeTokensResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.BridgeTokens = append(m.BridgeTokens, &BridgeToken{}) - if err := m.BridgeTokens[len(m.BridgeTokens)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Records = append(m.Records, &RefundRecord{}) + if err := m.Records[len(m.Records)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -10983,7 +12693,7 @@ func (m *QueryBridgeTokensResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryBridgeCoinByDenomRequest) Unmarshal(dAtA []byte) error { +func (m *QueryRefundConfirmByNonceRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11006,10 +12716,10 @@ func (m *QueryBridgeCoinByDenomRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryBridgeCoinByDenomRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryRefundConfirmByNonceRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBridgeCoinByDenomRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryRefundConfirmByNonceRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -11045,10 +12755,10 @@ func (m *QueryBridgeCoinByDenomRequest) Unmarshal(dAtA []byte) error { m.ChainName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EventNonce", wireType) } - var stringLen uint64 + m.EventNonce = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -11058,24 +12768,11 @@ func (m *QueryBridgeCoinByDenomRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.EventNonce |= 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:]) @@ -11097,7 +12794,7 @@ func (m *QueryBridgeCoinByDenomRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryBridgeCoinByDenomResponse) Unmarshal(dAtA []byte) error { +func (m *QueryRefundConfirmByNonceResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11120,15 +12817,15 @@ func (m *QueryBridgeCoinByDenomResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryBridgeCoinByDenomResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryRefundConfirmByNonceResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBridgeCoinByDenomResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryRefundConfirmByNonceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Coin", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Confirms", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11155,10 +12852,31 @@ func (m *QueryBridgeCoinByDenomResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Coin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Confirms = append(m.Confirms, &MsgConfirmRefund{}) + if err := m.Confirms[len(m.Confirms)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EnoughPower", 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.EnoughPower = bool(v != 0) default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -11180,7 +12898,7 @@ func (m *QueryBridgeCoinByDenomResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryBridgeChainListRequest) Unmarshal(dAtA []byte) error { +func (m *QueryLastPendingRefundRecordByAddrRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11203,12 +12921,76 @@ func (m *QueryBridgeChainListRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryBridgeChainListRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryLastPendingRefundRecordByAddrRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBridgeChainListRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryLastPendingRefundRecordByAddrRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainName", 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.ChainName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExternalAddress", 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.ExternalAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -11230,7 +13012,7 @@ func (m *QueryBridgeChainListRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryBridgeChainListResponse) Unmarshal(dAtA []byte) error { +func (m *QueryLastPendingRefundRecordByAddrResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11253,17 +13035,17 @@ func (m *QueryBridgeChainListResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryBridgeChainListResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryLastPendingRefundRecordByAddrResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBridgeChainListResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryLastPendingRefundRecordByAddrResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainNames", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -11273,23 +13055,25 @@ func (m *QueryBridgeChainListResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.ChainNames = append(m.ChainNames, string(dAtA[iNdEx:postIndex])) + m.Records = append(m.Records, &RefundRecord{}) + if err := m.Records[len(m.Records)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/crosschain/types/query.pb.gw.go b/x/crosschain/types/query.pb.gw.go index 11048f6ff..12cd17281 100644 --- a/x/crosschain/types/query.pb.gw.go +++ b/x/crosschain/types/query.pb.gw.go @@ -825,6 +825,150 @@ func local_request_Query_GetPendingSendToExternal_0(ctx context.Context, marshal } +var ( + filter_Query_RefundRecordByNonce_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_RefundRecordByNonce_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryRefundRecordByNonceRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_RefundRecordByNonce_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.RefundRecordByNonce(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_RefundRecordByNonce_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryRefundRecordByNonceRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_RefundRecordByNonce_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.RefundRecordByNonce(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_RefundRecordByReceiver_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_RefundRecordByReceiver_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryRefundRecordByReceiverRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_RefundRecordByReceiver_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.RefundRecordByReceiver(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_RefundRecordByReceiver_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryRefundRecordByReceiverRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_RefundRecordByReceiver_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.RefundRecordByReceiver(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_RefundConfirmByNonce_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_RefundConfirmByNonce_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryRefundConfirmByNonceRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_RefundConfirmByNonce_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.RefundConfirmByNonce(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_RefundConfirmByNonce_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryRefundConfirmByNonceRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_RefundConfirmByNonce_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.RefundConfirmByNonce(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_LastPendingRefundRecordByAddr_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_LastPendingRefundRecordByAddr_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLastPendingRefundRecordByAddrRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_LastPendingRefundRecordByAddr_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.LastPendingRefundRecordByAddr(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_LastPendingRefundRecordByAddr_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLastPendingRefundRecordByAddrRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_LastPendingRefundRecordByAddr_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.LastPendingRefundRecordByAddr(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_Query_Oracles_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -1499,6 +1643,98 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_RefundRecordByNonce_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_RefundRecordByNonce_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_RefundRecordByNonce_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_RefundRecordByReceiver_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_RefundRecordByReceiver_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_RefundRecordByReceiver_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_RefundConfirmByNonce_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_RefundConfirmByNonce_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_RefundConfirmByNonce_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_LastPendingRefundRecordByAddr_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_LastPendingRefundRecordByAddr_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_LastPendingRefundRecordByAddr_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_Oracles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -2095,6 +2331,86 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_RefundRecordByNonce_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_RefundRecordByNonce_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_RefundRecordByNonce_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_RefundRecordByReceiver_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_RefundRecordByReceiver_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_RefundRecordByReceiver_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_RefundConfirmByNonce_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_RefundConfirmByNonce_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_RefundConfirmByNonce_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_LastPendingRefundRecordByAddr_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_LastPendingRefundRecordByAddr_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_LastPendingRefundRecordByAddr_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_Oracles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -2243,6 +2559,14 @@ var ( pattern_Query_GetPendingSendToExternal_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"fx", "crosschain", "v1", "pending_send_to_external"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_RefundRecordByNonce_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"fx", "crosschain", "v1", "refund_record_by_nonce"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_RefundRecordByReceiver_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"fx", "crosschain", "v1", "refund_record_by_receiver"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_RefundConfirmByNonce_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"fx", "crosschain", "v1", "refund_confirm_by_nonce"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_LastPendingRefundRecordByAddr_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"fx", "crosschain", "v1", "last_pending_refund_record_by_addr"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Oracles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"fx", "crosschain", "v1", "oracles"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_ProjectedBatchTimeoutHeight_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"fx", "crosschain", "v1", "projected_batch_timeout"}, "", runtime.AssumeColonVerbOpt(false))) @@ -2299,6 +2623,14 @@ var ( forward_Query_GetPendingSendToExternal_0 = runtime.ForwardResponseMessage + forward_Query_RefundRecordByNonce_0 = runtime.ForwardResponseMessage + + forward_Query_RefundRecordByReceiver_0 = runtime.ForwardResponseMessage + + forward_Query_RefundConfirmByNonce_0 = runtime.ForwardResponseMessage + + forward_Query_LastPendingRefundRecordByAddr_0 = runtime.ForwardResponseMessage + forward_Query_Oracles_0 = runtime.ForwardResponseMessage forward_Query_ProjectedBatchTimeoutHeight_0 = runtime.ForwardResponseMessage diff --git a/x/crosschain/types/types.go b/x/crosschain/types/types.go index 6db11e059..a9fa6d4df 100644 --- a/x/crosschain/types/types.go +++ b/x/crosschain/types/types.go @@ -231,6 +231,29 @@ func (m *OracleSet) Equal(o *OracleSet) (bool, error) { return true, nil } +func (m *OracleSet) GetTotalPower() uint64 { + if m == nil { + return 0 + } + totalPower := uint64(0) + for _, member := range m.Members { + totalPower += member.Power + } + return totalPower +} + +func (m *OracleSet) GetBridgePower(externalAddress string) (uint64, bool) { + if m == nil { + return 0, false + } + for _, member := range m.Members { + if externalAddress == member.ExternalAddress { + return member.Power, true + } + } + return 0, false +} + type OracleSets []*OracleSet func (v OracleSets) Len() int { @@ -450,3 +473,26 @@ func (m *SnapshotOracle) HasExternalAddress(address string) bool { } return false } + +func (m *SnapshotOracle) GetExternalAddressPower(address string) uint64 { + if m == nil { + return 0 + } + for _, member := range m.Members { + if address == member.ExternalAddress { + return member.Power + } + } + return 0 +} + +func (m *SnapshotOracle) GetTotalPower() uint64 { + if m == nil { + return 0 + } + totalPower := uint64(0) + for _, member := range m.Members { + totalPower = totalPower + member.Power + } + return totalPower +}