From 04091ae92cf2c88226c6983709b92b04e0823928 Mon Sep 17 00:00:00 2001 From: Maxim Date: Tue, 20 Apr 2021 02:26:43 +0300 Subject: [PATCH] Peggy types updated --- chain/peggy/types/attestation.pb.go | 5 +- chain/peggy/types/ethereum.go | 2 +- chain/peggy/types/events.go | 42 +- chain/peggy/types/genesis.go | 30 + chain/peggy/types/genesis.pb.go | 352 +++++++++-- chain/peggy/types/key.go | 25 +- chain/peggy/types/msgs.go | 40 ++ chain/peggy/types/msgs.pb.go | 504 +++++++++++++-- chain/peggy/types/pool.pb.go | 410 ++---------- chain/peggy/types/query.pb.go | 933 ++++++++++++++++++++++------ chain/peggy/types/types.go | 13 +- chain/peggy/types/types.pb.go | 244 +++++++- 12 files changed, 1854 insertions(+), 746 deletions(-) diff --git a/chain/peggy/types/attestation.pb.go b/chain/peggy/types/attestation.pb.go index 8a95e018..2bf0428f 100644 --- a/chain/peggy/types/attestation.pb.go +++ b/chain/peggy/types/attestation.pb.go @@ -146,8 +146,9 @@ func (m *Attestation) GetClaim() *types.Any { // ERC20Token unique identifier for an Ethereum ERC20 token. // CONTRACT: -// The contract address on ETH of the token (note: developers should look up -// the token symbol using the address on ETH to display for UI) +// The contract address on ETH of the token, this could be a Cosmos +// originated token, if so it will be the ERC20 address of the representation +// (note: developers should look up the token symbol using the address on ETH to display for UI) type ERC20Token struct { Contract string `protobuf:"bytes,1,opt,name=contract,proto3" json:"contract,omitempty"` Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"` diff --git a/chain/peggy/types/ethereum.go b/chain/peggy/types/ethereum.go index 1f980dbd..dc844c07 100644 --- a/chain/peggy/types/ethereum.go +++ b/chain/peggy/types/ethereum.go @@ -85,7 +85,7 @@ func (p PeggyDenom) TokenContract() (common.Address, error) { func NewPeggyDenom(tokenContract common.Address) PeggyDenom { buf := make([]byte, 0, PeggyDenomLen) - buf = append(buf, (PeggyDenomPrefix + PeggyDenomSeparator)...) + buf = append(buf, PeggyDenomPrefix+PeggyDenomSeparator...) buf = append(buf, tokenContract.Bytes()...) return PeggyDenom(buf) diff --git a/chain/peggy/types/events.go b/chain/peggy/types/events.go index d4359115..29fe5047 100644 --- a/chain/peggy/types/events.go +++ b/chain/peggy/types/events.go @@ -1,26 +1,26 @@ package types const ( - EventTypeObservation = "observation" - EventTypeOutgoingBatch = "outgoing_batch" - EventTypeMultisigBootstrap = "multisig_bootstrap" - EventTypeMultisigUpdateRequest = "multisig_update_request" - EventTypeOutgoingBatchCanceled = "outgoing_batch_canceled" - EventTypeBridgeWithdrawalReceived = "withdrawal_received" - EventTypeBridgeDepositReceived = "deposit_received" + EventTypeObservation = "observation" + EventTypeOutgoingBatch = "outgoing_batch" - AttributeKeyAttestationID = "attestation_id" - AttributeKeyAttestationIDs = "attestation_ids" - AttributeKeyBatchConfirmKey = "batch_confirm_key" - AttributeKeyValsetConfirmKey = "valset_confirm_key" - AttributeKeyMultisigID = "multisig_id" - AttributeKeyOutgoingBatchID = "batch_id" - AttributeKeyOutgoingTXID = "outgoing_tx_id" - AttributeKeyAttestationType = "attestation_type" - AttributeKeyContract = "bridge_contract" - AttributeKeyNonce = "nonce" - AttributeKeyValsetNonce = "valset_nonce" - AttributeKeyBatchNonce = "batch_nonce" - AttributeKeyBridgeChainID = "bridge_chain_id" - AttributeKeySetOperatorAddr = "set_operator_address" + EventTypeMultisigUpdateRequest = "multisig_update_request" + EventTypeOutgoingBatchCanceled = "outgoing_batch_canceled" + EventTypeBridgeWithdrawalReceived = "withdrawal_received" + EventTypeBridgeDepositReceived = "deposit_received" + EventTypeBridgeWithdrawCanceled = "withdraw_canceled" + + AttributeKeyAttestationID = "attestation_id" + AttributeKeyBatchConfirmKey = "batch_confirm_key" + AttributeKeyValsetConfirmKey = "valset_confirm_key" + AttributeKeyMultisigID = "multisig_id" + AttributeKeyOutgoingBatchID = "batch_id" + AttributeKeyOutgoingTXID = "outgoing_tx_id" + AttributeKeyAttestationType = "attestation_type" + AttributeKeyContract = "bridge_contract" + AttributeKeyNonce = "nonce" + AttributeKeyValsetNonce = "valset_nonce" + AttributeKeyBatchNonce = "batch_nonce" + AttributeKeyBridgeChainID = "bridge_chain_id" + AttributeKeySetOperatorAddr = "set_operator_address" ) diff --git a/chain/peggy/types/genesis.go b/chain/peggy/types/genesis.go index ae9a21da..cc5cb836 100644 --- a/chain/peggy/types/genesis.go +++ b/chain/peggy/types/genesis.go @@ -34,6 +34,9 @@ var ( // ParamsStoreKeyBridgeContractAddress stores the contract address ParamsStoreKeyBridgeContractAddress = []byte("BridgeContractAddress") + // ParamsStoreKeyBridgeContractStartHeight stores the bridge contract deployed height + ParamsStoreKeyBridgeContractStartHeight = []byte("BridgeContractChainHeight") + // ParamsStoreKeyBridgeContractChainID stores the bridge chain id ParamsStoreKeyBridgeContractChainID = []byte("BridgeChainID") @@ -76,6 +79,9 @@ var ( // ParamStoreUnbondSlashingValsetsWindow stores unbond slashing valset window ParamStoreUnbondSlashingValsetsWindow = []byte("UnbondSlashingValsetsWindow") + // ParamStoreClaimSlashingEnabled stores ClaimSlashing is enabled or not + ParamStoreClaimSlashingEnabled = []byte("ClaimSlashingEnabled") + // Ensure that params implements the proper interface _ paramtypes.ParamSet = &Params{} ) @@ -113,6 +119,7 @@ func DefaultParams() *Params { SlashFractionConflictingClaim: sdk.NewDec(1).Quo(sdk.NewDec(1000)), CosmosCoinDenom: "inj", UnbondSlashingValsetsWindow: 10000, + ClaimSlashingEnabled: false, } } @@ -127,6 +134,9 @@ func (p Params) ValidateBasic() error { if err := validateBridgeContractAddress(p.BridgeEthereumAddress); err != nil { return sdkerrors.Wrap(err, "bridge contract address") } + if err := validateBridgeContractStartHeight(p.BridgeContractStartHeight); err != nil { + return sdkerrors.Wrap(err, "bridge contract start height") + } if err := validateBridgeChainID(p.BridgeChainId); err != nil { return sdkerrors.Wrap(err, "bridge chain id") } @@ -169,6 +179,9 @@ func (p Params) ValidateBasic() error { if err := validateUnbondSlashingValsetsWindow(p.UnbondSlashingValsetsWindow); err != nil { return sdkerrors.Wrap(err, "unbond Slashing valset window") } + if err := validateClaimSlashingEnabled(p.ClaimSlashingEnabled); err != nil { + return sdkerrors.Wrap(err, "claim slashing enabled") + } return nil } @@ -199,6 +212,8 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { paramtypes.NewParamSetPair(ParamsStoreSlashFractionClaim, &p.SlashFractionClaim, validateSlashFractionClaim), paramtypes.NewParamSetPair(ParamsStoreSlashFractionConflictingClaim, &p.SlashFractionConflictingClaim, validateSlashFractionConflictingClaim), paramtypes.NewParamSetPair(ParamStoreUnbondSlashingValsetsWindow, &p.UnbondSlashingValsetsWindow, validateUnbondSlashingValsetsWindow), + paramtypes.NewParamSetPair(ParamStoreClaimSlashingEnabled, &p.ClaimSlashingEnabled, validateClaimSlashingEnabled), + paramtypes.NewParamSetPair(ParamsStoreKeyBridgeContractStartHeight, &p.BridgeContractStartHeight, validateBridgeContractStartHeight), } } @@ -244,6 +259,13 @@ func validateBridgeChainID(i interface{}) error { return nil } +func validateBridgeContractStartHeight(i interface{}) error { + if _, ok := i.(uint64); !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + return nil +} + func validateTargetBatchTimeout(i interface{}) error { val, ok := i.(uint64) if !ok { @@ -386,3 +408,11 @@ func validateCosmosCoinErc20Contract(i interface{}) error { return ValidateEthAddress(v) } + +func validateClaimSlashingEnabled(i interface{}) error { + _, ok := i.(bool) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + return nil +} diff --git a/chain/peggy/types/genesis.pb.go b/chain/peggy/types/genesis.pb.go index ee3b5f42..83ffff18 100644 --- a/chain/peggy/types/genesis.pb.go +++ b/chain/peggy/types/genesis.pb.go @@ -102,6 +102,8 @@ type Params struct { UnbondSlashingValsetsWindow uint64 `protobuf:"varint,17,opt,name=unbond_slashing_valsets_window,json=unbondSlashingValsetsWindow,proto3" json:"unbond_slashing_valsets_window,omitempty"` CosmosCoinDenom string `protobuf:"bytes,18,opt,name=cosmos_coin_denom,json=cosmosCoinDenom,proto3" json:"cosmos_coin_denom,omitempty"` CosmosCoinErc20Contract string `protobuf:"bytes,19,opt,name=cosmos_coin_erc20_contract,json=cosmosCoinErc20Contract,proto3" json:"cosmos_coin_erc20_contract,omitempty"` + ClaimSlashingEnabled bool `protobuf:"varint,20,opt,name=claim_slashing_enabled,json=claimSlashingEnabled,proto3" json:"claim_slashing_enabled,omitempty"` + BridgeContractStartHeight uint64 `protobuf:"varint,21,opt,name=bridge_contract_start_height,json=bridgeContractStartHeight,proto3" json:"bridge_contract_start_height,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -228,17 +230,34 @@ func (m *Params) GetCosmosCoinErc20Contract() string { return "" } +func (m *Params) GetClaimSlashingEnabled() bool { + if m != nil { + return m.ClaimSlashingEnabled + } + return false +} + +func (m *Params) GetBridgeContractStartHeight() uint64 { + if m != nil { + return m.BridgeContractStartHeight + } + return 0 +} + // GenesisState struct type GenesisState struct { - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` - LastObservedNonce uint64 `protobuf:"varint,2,opt,name=last_observed_nonce,json=lastObservedNonce,proto3" json:"last_observed_nonce,omitempty"` - Valsets []*Valset `protobuf:"bytes,3,rep,name=valsets,proto3" json:"valsets,omitempty"` - ValsetConfirms []*MsgValsetConfirm `protobuf:"bytes,4,rep,name=valset_confirms,json=valsetConfirms,proto3" json:"valset_confirms,omitempty"` - Batches []*OutgoingTxBatch `protobuf:"bytes,5,rep,name=batches,proto3" json:"batches,omitempty"` - BatchConfirms []*MsgConfirmBatch `protobuf:"bytes,6,rep,name=batch_confirms,json=batchConfirms,proto3" json:"batch_confirms,omitempty"` - Attestations []*Attestation `protobuf:"bytes,9,rep,name=attestations,proto3" json:"attestations,omitempty"` - OrchestratorAddresses []*MsgSetOrchestratorAddresses `protobuf:"bytes,10,rep,name=orchestrator_addresses,json=orchestratorAddresses,proto3" json:"orchestrator_addresses,omitempty"` - Erc20ToDenoms []*ERC20ToDenom `protobuf:"bytes,11,rep,name=erc20_to_denoms,json=erc20ToDenoms,proto3" json:"erc20_to_denoms,omitempty"` + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` + LastObservedNonce uint64 `protobuf:"varint,2,opt,name=last_observed_nonce,json=lastObservedNonce,proto3" json:"last_observed_nonce,omitempty"` + Valsets []*Valset `protobuf:"bytes,3,rep,name=valsets,proto3" json:"valsets,omitempty"` + ValsetConfirms []*MsgValsetConfirm `protobuf:"bytes,4,rep,name=valset_confirms,json=valsetConfirms,proto3" json:"valset_confirms,omitempty"` + Batches []*OutgoingTxBatch `protobuf:"bytes,5,rep,name=batches,proto3" json:"batches,omitempty"` + BatchConfirms []*MsgConfirmBatch `protobuf:"bytes,6,rep,name=batch_confirms,json=batchConfirms,proto3" json:"batch_confirms,omitempty"` + Attestations []*Attestation `protobuf:"bytes,9,rep,name=attestations,proto3" json:"attestations,omitempty"` + OrchestratorAddresses []*MsgSetOrchestratorAddresses `protobuf:"bytes,10,rep,name=orchestrator_addresses,json=orchestratorAddresses,proto3" json:"orchestrator_addresses,omitempty"` + Erc20ToDenoms []*ERC20ToDenom `protobuf:"bytes,11,rep,name=erc20_to_denoms,json=erc20ToDenoms,proto3" json:"erc20_to_denoms,omitempty"` + UnbatchedTransfers []*OutgoingTransferTx `protobuf:"bytes,12,rep,name=unbatched_transfers,json=unbatchedTransfers,proto3" json:"unbatched_transfers,omitempty"` + LastObservedEthereumHeight uint64 `protobuf:"varint,13,opt,name=last_observed_ethereum_height,json=lastObservedEthereumHeight,proto3" json:"last_observed_ethereum_height,omitempty"` + LastOutgoingBatchId uint64 `protobuf:"varint,14,opt,name=last_outgoing_batch_id,json=lastOutgoingBatchId,proto3" json:"last_outgoing_batch_id,omitempty"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -337,6 +356,27 @@ func (m *GenesisState) GetErc20ToDenoms() []*ERC20ToDenom { return nil } +func (m *GenesisState) GetUnbatchedTransfers() []*OutgoingTransferTx { + if m != nil { + return m.UnbatchedTransfers + } + return nil +} + +func (m *GenesisState) GetLastObservedEthereumHeight() uint64 { + if m != nil { + return m.LastObservedEthereumHeight + } + return 0 +} + +func (m *GenesisState) GetLastOutgoingBatchId() uint64 { + if m != nil { + return m.LastOutgoingBatchId + } + return 0 +} + func init() { proto.RegisterType((*Params)(nil), "injective.peggy.v1.Params") proto.RegisterType((*GenesisState)(nil), "injective.peggy.v1.GenesisState") @@ -345,63 +385,71 @@ func init() { func init() { proto.RegisterFile("injective/peggy/v1/genesis.proto", fileDescriptor_3b8a70f18b346efa) } var fileDescriptor_3b8a70f18b346efa = []byte{ - // 886 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xb7, 0xa9, 0xeb, 0xa4, 0x93, 0x3f, 0x6e, 0x26, 0x09, 0x1d, 0x5c, 0xd5, 0xb1, 0x4a, 0x55, - 0x45, 0x88, 0xda, 0xa9, 0x41, 0x1c, 0x40, 0x3d, 0x24, 0x6e, 0xa0, 0x01, 0x42, 0xd0, 0x26, 0x02, - 0x89, 0xcb, 0x32, 0xbb, 0xfb, 0xb2, 0x3b, 0xd4, 0x3b, 0x13, 0xed, 0x8c, 0x1d, 0x7a, 0xe3, 0x23, - 0xf0, 0x9d, 0xb8, 0xf4, 0xd8, 0x23, 0x42, 0xa8, 0x42, 0xc9, 0xa7, 0xe0, 0x86, 0xf6, 0xcd, 0xac, - 0xbd, 0x0e, 0x1b, 0x0e, 0x11, 0x27, 0x7b, 0xe6, 0xf7, 0x6f, 0xf4, 0xe6, 0xcd, 0x5b, 0xd2, 0x15, - 0xf2, 0x27, 0x08, 0x8d, 0x98, 0x40, 0xff, 0x0c, 0xe2, 0xf8, 0x55, 0x7f, 0xf2, 0xb4, 0x1f, 0x83, - 0x04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8, 0x83, 0xc2, 0xf4, 0x6b, 0x1e, 0xe8, 0xfe, 0x34, 0xe2, - 0x49, 0xa8, 0x32, 0x28, 0x2f, 0xf3, 0xcf, 0x4b, 0x3f, 0x55, 0xd1, 0x78, 0x04, 0xda, 0x7d, 0x37, - 0xf1, 0xe5, 0x06, 0x4d, 0xfc, 0x5e, 0x7e, 0xf4, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x30, - 0xbb, 0x59, 0x02, 0x08, 0x00, 0x00, + // 1021 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xdf, 0x4e, 0x1b, 0xc7, + 0x1b, 0xc5, 0xbf, 0x38, 0x06, 0x06, 0x1b, 0x87, 0xb1, 0x4d, 0x26, 0xce, 0x0f, 0x63, 0xa5, 0x11, + 0x42, 0x55, 0x63, 0x13, 0x27, 0xea, 0x45, 0xab, 0xa8, 0x02, 0x87, 0x16, 0xda, 0x52, 0xaa, 0x05, + 0x35, 0x52, 0x6f, 0xb6, 0xb3, 0xbb, 0xc3, 0xee, 0x34, 0xde, 0x19, 0xb4, 0x33, 0x36, 0xc9, 0x5d, + 0x1f, 0xa1, 0xcf, 0xd3, 0x27, 0x88, 0x7a, 0x95, 0xcb, 0xaa, 0xaa, 0xa2, 0x0a, 0x5e, 0xa4, 0xda, + 0x6f, 0x66, 0xd7, 0x6b, 0x6a, 0x72, 0x11, 0xf5, 0x0a, 0x76, 0xce, 0x39, 0xdf, 0x99, 0xfd, 0xfe, + 0xad, 0x51, 0x97, 0x8b, 0x9f, 0x99, 0xaf, 0xf9, 0x84, 0xf5, 0xcf, 0x59, 0x18, 0xbe, 0xee, 0x4f, + 0x1e, 0xf7, 0x43, 0x26, 0x98, 0xe2, 0xaa, 0x77, 0x9e, 0x48, 0x2d, 0x31, 0xce, 0x19, 0x3d, 0x60, + 0xf4, 0x26, 0x8f, 0xdb, 0xc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 0x61, 0x4c, 0x9c, + 0x1a, 0x08, 0xed, 0x93, 0xc2, 0x2f, 0x50, 0x63, 0x2c, 0x4c, 0x3e, 0x03, 0x57, 0x27, 0x54, 0xa8, + 0x33, 0x96, 0x28, 0x52, 0x85, 0x68, 0x5b, 0xef, 0xad, 0x86, 0x25, 0x9f, 0xbe, 0x72, 0x70, 0x1e, + 0x22, 0x3b, 0x54, 0x78, 0x17, 0x6d, 0xcc, 0xf6, 0x63, 0xbe, 0xe5, 0xed, 0x70, 0xd4, 0xa0, 0x33, + 0xdb, 0xc5, 0xce, 0xcc, 0xd6, 0xbc, 0x99, 0x0e, 0xfc, 0x04, 0xad, 0x9b, 0x10, 0xd6, 0xd1, 0x7e, + 0x89, 0x78, 0x00, 0x1b, 0xb8, 0xec, 0x40, 0xc3, 0x67, 0xd7, 0x81, 0xa2, 0x1e, 0x06, 0x7b, 0xec, + 0xcd, 0x65, 0xa7, 0xf4, 0xf6, 0xb2, 0x53, 0xfa, 0xfb, 0xb2, 0x53, 0xfa, 0xf5, 0xaa, 0xb3, 0xf0, + 0xf6, 0xaa, 0xb3, 0xf0, 0xc7, 0x55, 0x67, 0xe1, 0xc7, 0x6f, 0x0a, 0x8b, 0xed, 0x30, 0x7b, 0xaf, + 0x6f, 0xa9, 0xa7, 0xfa, 0xf9, 0x5b, 0x3e, 0xf2, 0x65, 0xc2, 0x8a, 0x8f, 0xe9, 0x67, 0xba, 0x1f, + 0xcb, 0x60, 0x3c, 0x62, 0xca, 0xfe, 0xfe, 0x80, 0x0d, 0xe8, 0x55, 0xe0, 0x77, 0xc7, 0x93, 0x7f, + 0x02, 0x00, 0x00, 0xff, 0xff, 0xb3, 0xa1, 0xf1, 0x6b, 0x4a, 0x09, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -424,6 +472,25 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.BridgeContractStartHeight != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.BridgeContractStartHeight)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa8 + } + if m.ClaimSlashingEnabled { + i-- + if m.ClaimSlashingEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa0 + } if len(m.CosmosCoinErc20Contract) > 0 { i -= len(m.CosmosCoinErc20Contract) copy(dAtA[i:], m.CosmosCoinErc20Contract) @@ -570,6 +637,30 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.LastOutgoingBatchId != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.LastOutgoingBatchId)) + i-- + dAtA[i] = 0x70 + } + if m.LastObservedEthereumHeight != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.LastObservedEthereumHeight)) + i-- + dAtA[i] = 0x68 + } + if len(m.UnbatchedTransfers) > 0 { + for iNdEx := len(m.UnbatchedTransfers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.UnbatchedTransfers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + } + } if len(m.Erc20ToDenoms) > 0 { for iNdEx := len(m.Erc20ToDenoms) - 1; iNdEx >= 0; iNdEx-- { { @@ -757,6 +848,12 @@ func (m *Params) Size() (n int) { if l > 0 { n += 2 + l + sovGenesis(uint64(l)) } + if m.ClaimSlashingEnabled { + n += 3 + } + if m.BridgeContractStartHeight != 0 { + n += 2 + sovGenesis(uint64(m.BridgeContractStartHeight)) + } return n } @@ -815,6 +912,18 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } + if len(m.UnbatchedTransfers) > 0 { + for _, e := range m.UnbatchedTransfers { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if m.LastObservedEthereumHeight != 0 { + n += 1 + sovGenesis(uint64(m.LastObservedEthereumHeight)) + } + if m.LastOutgoingBatchId != 0 { + n += 1 + sovGenesis(uint64(m.LastOutgoingBatchId)) + } return n } @@ -1297,6 +1406,45 @@ func (m *Params) Unmarshal(dAtA []byte) error { } m.CosmosCoinErc20Contract = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 20: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ClaimSlashingEnabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ClaimSlashingEnabled = bool(v != 0) + case 21: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BridgeContractStartHeight", wireType) + } + m.BridgeContractStartHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BridgeContractStartHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) @@ -1640,6 +1788,78 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 12: + 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 ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UnbatchedTransfers = append(m.UnbatchedTransfers, &OutgoingTransferTx{}) + if err := m.UnbatchedTransfers[len(m.UnbatchedTransfers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LastObservedEthereumHeight", wireType) + } + m.LastObservedEthereumHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LastObservedEthereumHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LastOutgoingBatchId", wireType) + } + m.LastOutgoingBatchId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LastOutgoingBatchId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/chain/peggy/types/key.go b/chain/peggy/types/key.go index 3668804d..bd81eef0 100644 --- a/chain/peggy/types/key.go +++ b/chain/peggy/types/key.go @@ -69,7 +69,10 @@ var ( SecondIndexNonceByClaimKey = []byte{0xf} // LastEventNonceByValidatorKey indexes lateset event nonce by validator - LastEventNonceByValidatorKey = []byte{0xf1} + LastEventNonceByValidatorKey = []byte{0xe2} + + // LastEventByValidatorKey indexes lateset claim event by validator + LastEventByValidatorKey = []byte{0xf1} // LastObservedEventNonceKey indexes the latest event nonce LastObservedEventNonceKey = []byte{0xf2} @@ -238,7 +241,7 @@ func GetBatchConfirmKey(tokenContract common.Address, batchNonce uint64, validat // GetFeeSecondIndexKey returns the following key format // prefix eth-contract-address fee_amount // [0x9][0xc783df8a850f42e7F7e57013759C285caa701eB6][0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] -func GetFeeSecondIndexKey(tokenContract common.Address, fee sdk.Coin) []byte { +func GetFeeSecondIndexKey(tokenContract common.Address, fee *ERC20Token) []byte { buf := make([]byte, 0, len(SecondIndexOutgoingTXFeeKey)+ETHContractAddressLen+32) buf = append(buf, SecondIndexOutgoingTXFeeKey...) buf = append(buf, tokenContract.Bytes()...) @@ -256,15 +259,27 @@ func GetFeeSecondIndexKey(tokenContract common.Address, fee sdk.Coin) []byte { // prefix cosmos-validator // [0x0][cosmos1ahx7f8wyertuus9r20284ej0asrs085case3kn] func GetLastEventNonceByValidatorKey(validator sdk.ValAddress) []byte { - buf := make([]byte, 0, len(LastEventNonceByValidatorKey) + len(validator)) + buf := make([]byte, 0, len(LastEventNonceByValidatorKey)+len(validator)) buf = append(buf, LastEventNonceByValidatorKey...) buf = append(buf, validator.Bytes()...) return buf } +// GetLastEventByValidatorKey indexes lateset event by validator +// GetLastEventByValidatorKey returns the following key format +// prefix cosmos-validator +// [0x0][cosmos1ahx7f8wyertuus9r20284ej0asrs085case3kn] +func GetLastEventByValidatorKey(validator sdk.ValAddress) []byte { + buf := make([]byte, 0, len(LastEventByValidatorKey)+len(validator)) + buf = append(buf, LastEventByValidatorKey...) + buf = append(buf, validator.Bytes()...) + + return buf +} + func GetCosmosDenomToERC20Key(denom string) []byte { - buf := make([]byte, 0, len(DenomToERC20Key) + len(denom)) + buf := make([]byte, 0, len(DenomToERC20Key)+len(denom)) buf = append(buf, DenomToERC20Key...) buf = append(buf, denom...) @@ -272,7 +287,7 @@ func GetCosmosDenomToERC20Key(denom string) []byte { } func GetERC20ToCosmosDenomKey(tokenContract common.Address) []byte { - buf := make([]byte, 0, len(ERC20ToDenomKey) + ETHContractAddressLen) + buf := make([]byte, 0, len(ERC20ToDenomKey)+ETHContractAddressLen) buf = append(buf, ERC20ToDenomKey...) buf = append(buf, tokenContract.Bytes()...) diff --git a/chain/peggy/types/msgs.go b/chain/peggy/types/msgs.go index 5e34933e..d598b98f 100644 --- a/chain/peggy/types/msgs.go +++ b/chain/peggy/types/msgs.go @@ -16,6 +16,10 @@ var ( _ sdk.Msg = &MsgRequestBatch{} _ sdk.Msg = &MsgConfirmBatch{} _ sdk.Msg = &MsgSetOrchestratorAddresses{} + _ sdk.Msg = &MsgERC20DeployedClaim{} + _ sdk.Msg = &MsgDepositClaim{} + _ sdk.Msg = &MsgWithdrawClaim{} + _ sdk.Msg = &MsgCancelSendToEth{} ) // NewMsgSetOrchestratorAddress returns a new MsgSetOrchestratorAddresses @@ -448,3 +452,39 @@ func (b *MsgERC20DeployedClaim) ClaimHash() []byte { path := fmt.Sprintf("%s/%s/%s/%s/%d/", b.CosmosDenom, b.TokenContract, b.Name, b.Symbol, b.Decimals) return tmhash.Sum([]byte(path)) } + +// NewMsgCancelSendToEth returns a new msgMsgCancelSendToEth +func NewMsgCancelSendToEth(sender sdk.AccAddress, id uint64) *MsgCancelSendToEth { + return &MsgCancelSendToEth{ + TransactionId: id, + Sender: sender.String(), + } +} + +// Route should return the name of the module +func (msg *MsgCancelSendToEth) Route() string { return RouterKey } + +// Type should return the action +func (msg *MsgCancelSendToEth) Type() string { return "cancel_send_to_eth" } + +// ValidateBasic performs stateless checks +func (msg *MsgCancelSendToEth) ValidateBasic() (err error) { + if _, err := sdk.AccAddressFromBech32(msg.Sender); err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender) + } + return nil +} + +// GetSignBytes encodes the message for signing +func (msg *MsgCancelSendToEth) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg)) +} + +// GetSigners defines whose signature is required +func (msg *MsgCancelSendToEth) GetSigners() []sdk.AccAddress { + acc, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{acc} +} diff --git a/chain/peggy/types/msgs.pb.go b/chain/peggy/types/msgs.pb.go index 60e5a065..2af78f7a 100644 --- a/chain/peggy/types/msgs.pb.go +++ b/chain/peggy/types/msgs.pb.go @@ -971,6 +971,97 @@ func (m *MsgERC20DeployedClaimResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgERC20DeployedClaimResponse proto.InternalMessageInfo +// This call allows the sender (and only the sender) +// to cancel a given MsgSendToEth and recieve a refund +// of the tokens +type MsgCancelSendToEth struct { + TransactionId uint64 `protobuf:"varint,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` + Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` +} + +func (m *MsgCancelSendToEth) Reset() { *m = MsgCancelSendToEth{} } +func (m *MsgCancelSendToEth) String() string { return proto.CompactTextString(m) } +func (*MsgCancelSendToEth) ProtoMessage() {} +func (*MsgCancelSendToEth) Descriptor() ([]byte, []int) { + return fileDescriptor_751daa04abed7ef4, []int{16} +} +func (m *MsgCancelSendToEth) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCancelSendToEth) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCancelSendToEth.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 *MsgCancelSendToEth) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCancelSendToEth.Merge(m, src) +} +func (m *MsgCancelSendToEth) XXX_Size() int { + return m.Size() +} +func (m *MsgCancelSendToEth) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCancelSendToEth.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCancelSendToEth proto.InternalMessageInfo + +func (m *MsgCancelSendToEth) GetTransactionId() uint64 { + if m != nil { + return m.TransactionId + } + return 0 +} + +func (m *MsgCancelSendToEth) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +type MsgCancelSendToEthResponse struct { +} + +func (m *MsgCancelSendToEthResponse) Reset() { *m = MsgCancelSendToEthResponse{} } +func (m *MsgCancelSendToEthResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCancelSendToEthResponse) ProtoMessage() {} +func (*MsgCancelSendToEthResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_751daa04abed7ef4, []int{17} +} +func (m *MsgCancelSendToEthResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCancelSendToEthResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCancelSendToEthResponse.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 *MsgCancelSendToEthResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCancelSendToEthResponse.Merge(m, src) +} +func (m *MsgCancelSendToEthResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCancelSendToEthResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCancelSendToEthResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCancelSendToEthResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgSetOrchestratorAddresses)(nil), "injective.peggy.v1.MsgSetOrchestratorAddresses") proto.RegisterType((*MsgSetOrchestratorAddressesResponse)(nil), "injective.peggy.v1.MsgSetOrchestratorAddressesResponse") @@ -988,79 +1079,86 @@ func init() { proto.RegisterType((*MsgWithdrawClaimResponse)(nil), "injective.peggy.v1.MsgWithdrawClaimResponse") proto.RegisterType((*MsgERC20DeployedClaim)(nil), "injective.peggy.v1.MsgERC20DeployedClaim") proto.RegisterType((*MsgERC20DeployedClaimResponse)(nil), "injective.peggy.v1.MsgERC20DeployedClaimResponse") + proto.RegisterType((*MsgCancelSendToEth)(nil), "injective.peggy.v1.MsgCancelSendToEth") + proto.RegisterType((*MsgCancelSendToEthResponse)(nil), "injective.peggy.v1.MsgCancelSendToEthResponse") } func init() { proto.RegisterFile("injective/peggy/v1/msgs.proto", fileDescriptor_751daa04abed7ef4) } var fileDescriptor_751daa04abed7ef4 = []byte{ - // 1070 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x41, 0x6f, 0xdb, 0x46, - 0x13, 0x35, 0x6d, 0xd9, 0xb1, 0x46, 0x4a, 0xfc, 0x81, 0xf0, 0x97, 0xca, 0x6a, 0x2c, 0xc5, 0x74, - 0x52, 0x3b, 0x69, 0x42, 0x5a, 0x6e, 0x81, 0xdc, 0x0a, 0xd4, 0x72, 0x82, 0x06, 0xa9, 0x52, 0x40, - 0x2e, 0x5a, 0xa0, 0x17, 0x82, 0x22, 0x27, 0x24, 0x6b, 0x71, 0x57, 0xe5, 0xae, 0x14, 0xb8, 0xa7, - 0xa2, 0xd7, 0x1c, 0xda, 0xa2, 0x7f, 0xa1, 0xf7, 0xde, 0x7d, 0xec, 0x29, 0xc7, 0x00, 0xbd, 0x14, - 0x3d, 0x04, 0x85, 0xdd, 0x1f, 0x52, 0x70, 0x77, 0x45, 0x53, 0x12, 0xe9, 0xaa, 0x80, 0x4f, 0xd2, - 0xce, 0xce, 0xec, 0xbc, 0xf7, 0x66, 0x76, 0x96, 0xb0, 0x19, 0x92, 0xaf, 0xd1, 0xe5, 0xe1, 0x08, - 0xad, 0x01, 0xfa, 0xfe, 0x89, 0x35, 0x6a, 0x59, 0x11, 0xf3, 0x99, 0x39, 0x88, 0x29, 0xa7, 0xba, - 0x9e, 0x6e, 0x9b, 0x62, 0xdb, 0x1c, 0xb5, 0xea, 0x0d, 0x97, 0xb2, 0x88, 0x32, 0xab, 0xe7, 0x30, - 0xb4, 0x46, 0xad, 0x1e, 0x72, 0xa7, 0x65, 0xb9, 0x34, 0x24, 0x32, 0xa6, 0xbe, 0xee, 0x53, 0x9f, - 0x8a, 0xbf, 0x56, 0xf2, 0x4f, 0x59, 0x6f, 0xf9, 0x94, 0xfa, 0x7d, 0xb4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 0x08, 0xdb, 0x15, 0xc9, 0x93, 0xf6, 0x9d, 0x9c, 0x6c, 0x45, 0xed, 0x3b, - 0xe1, 0x55, 0xd8, 0xbe, 0xf9, 0x13, 0xe6, 0xd2, 0xf6, 0x7d, 0xa9, 0x42, 0x14, 0xa2, 0x5f, 0x34, - 0xd0, 0x73, 0x46, 0xd1, 0xbd, 0x82, 0x84, 0xb3, 0xae, 0xf5, 0xd6, 0xdc, 0xae, 0x29, 0xc0, 0x3d, - 0x01, 0xf0, 0xbe, 0xb1, 0x9b, 0x07, 0x10, 0x63, 0x77, 0x7f, 0xcf, 0xf6, 0x54, 0xa0, 0x82, 0x79, - 0xaa, 0x41, 0xad, 0xf0, 0x13, 0xd6, 0x2a, 0xbc, 0x52, 0xf9, 0x01, 0xf5, 0x47, 0xff, 0x31, 0x20, - 0x05, 0xfe, 0xa1, 0x00, 0x6e, 0x1a, 0x0f, 0xf2, 0xaf, 0x24, 0xb7, 0xb3, 0x53, 0x6d, 0xfc, 0x01, - 0x7a, 0x80, 0xaf, 0xcf, 0x1a, 0xda, 0x9b, 0xb3, 0x86, 0xf6, 0xd7, 0x59, 0x43, 0xfb, 0xf1, 0xbc, - 0xb1, 0xf0, 0xe6, 0xbc, 0xb1, 0xf0, 0xc7, 0x79, 0x63, 0xe1, 0xab, 0x67, 0x99, 0xd7, 0xfa, 0xe9, - 0xf8, 0xc4, 0x4f, 0x9d, 0x1e, 0xbb, 0x38, 0xff, 0xa1, 0x4b, 0x63, 0xcc, 0x2e, 0x03, 0x27, 0x24, - 0x56, 0x44, 0xbd, 0x61, 0x1f, 0x99, 0x4a, 0x2e, 0x9e, 0xf5, 0xde, 0x8a, 0xf8, 0xde, 0xff, 0xe0, - 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xab, 0x77, 0x26, 0x67, 0x78, 0x0c, 0x00, 0x00, + // 1142 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 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 0x40, 0x2b, 0x89, 0xfc, 0x00, 0xdd, 0x67, 0xa8, 0x70, + 0x8f, 0x11, 0x3c, 0xab, 0x42, 0x1e, 0x23, 0x5a, 0x37, 0x61, 0x29, 0x8f, 0x3d, 0x23, 0xf5, 0x04, + 0x16, 0x8f, 0x78, 0xd0, 0xc4, 0xaf, 0xbb, 0xc8, 0xc5, 0x1e, 0x11, 0x5e, 0x38, 0x22, 0xb3, 0x51, + 0x20, 0xf3, 0x12, 0x4c, 0xfb, 0x48, 0x59, 0xac, 0xf9, 0xa9, 0x85, 0xb5, 0x0c, 0xef, 0x0c, 0x6d, + 0x96, 0xe5, 0xf9, 0xd5, 0x90, 0x89, 0xb4, 0xa6, 0x2a, 0x51, 0x71, 0x95, 0xef, 0xc0, 0x0d, 0xc1, + 0x4e, 0x90, 0xba, 0x1e, 0xa3, 0x22, 0x21, 0x5e, 0x5f, 0xc3, 0x05, 0x69, 0xdd, 0xd7, 0x46, 0x73, + 0x15, 0xd2, 0xaa, 0xba, 0x69, 0xe9, 0x30, 0xd1, 0x75, 0x9e, 0x45, 0x11, 0x1e, 0x4b, 0xc3, 0x08, + 0x89, 0x4a, 0x01, 0x89, 0x81, 0x56, 0x98, 0x1e, 0x6e, 0x05, 0x45, 0x26, 0x0f, 0xf8, 0xa2, 0x13, + 0x26, 0x25, 0x99, 0x03, 0xec, 0x30, 0x1e, 0x89, 0xfd, 0x36, 0x89, 0x62, 0xd9, 0x78, 0x3d, 0xa4, + 0xc2, 0xcd, 0x53, 0x02, 0x69, 0x7a, 0x2a, 0x79, 0xad, 0xc1, 0x7c, 0xab, 0xcd, 0xbc, 0x13, 0x37, + 0xc4, 0x28, 0x08, 0x15, 0xab, 0x4a, 0x73, 0x4e, 0xda, 0x3e, 0x96, 0xa6, 0x02, 0xea, 0x53, 0x45, + 0xd4, 0x1f, 0x67, 0x4d, 0x24, 0x59, 0xed, 0xd9, 0x69, 0xb1, 0xff, 0x7a, 0xd3, 0xd8, 0x08, 0x22, +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x78, 0x2c, 0xc1, 0xfc, 0x32, 0x24, 0x11, 0x75, 0x62, 0xe6, 0x77, 0xdb, 0xc8, 0x75, 0x5a, + 0xf9, 0xca, 0x69, 0xcd, 0xc8, 0x7f, 0x7f, 0xde, 0xff, 0x37, 0x00, 0x00, 0xff, 0xff, 0x90, 0x1a, + 0x50, 0x3d, 0x87, 0x0d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1083,6 +1181,7 @@ type MsgClient interface { WithdrawClaim(ctx context.Context, in *MsgWithdrawClaim, opts ...grpc.CallOption) (*MsgWithdrawClaimResponse, error) ERC20DeployedClaim(ctx context.Context, in *MsgERC20DeployedClaim, opts ...grpc.CallOption) (*MsgERC20DeployedClaimResponse, error) SetOrchestratorAddresses(ctx context.Context, in *MsgSetOrchestratorAddresses, opts ...grpc.CallOption) (*MsgSetOrchestratorAddressesResponse, error) + CancelSendToEth(ctx context.Context, in *MsgCancelSendToEth, opts ...grpc.CallOption) (*MsgCancelSendToEthResponse, error) } type msgClient struct { @@ -1165,6 +1264,15 @@ func (c *msgClient) SetOrchestratorAddresses(ctx context.Context, in *MsgSetOrch return out, nil } +func (c *msgClient) CancelSendToEth(ctx context.Context, in *MsgCancelSendToEth, opts ...grpc.CallOption) (*MsgCancelSendToEthResponse, error) { + out := new(MsgCancelSendToEthResponse) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Msg/CancelSendToEth", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { ValsetConfirm(context.Context, *MsgValsetConfirm) (*MsgValsetConfirmResponse, error) @@ -1175,6 +1283,7 @@ type MsgServer interface { WithdrawClaim(context.Context, *MsgWithdrawClaim) (*MsgWithdrawClaimResponse, error) ERC20DeployedClaim(context.Context, *MsgERC20DeployedClaim) (*MsgERC20DeployedClaimResponse, error) SetOrchestratorAddresses(context.Context, *MsgSetOrchestratorAddresses) (*MsgSetOrchestratorAddressesResponse, error) + CancelSendToEth(context.Context, *MsgCancelSendToEth) (*MsgCancelSendToEthResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -1205,6 +1314,9 @@ func (*UnimplementedMsgServer) ERC20DeployedClaim(ctx context.Context, req *MsgE func (*UnimplementedMsgServer) SetOrchestratorAddresses(ctx context.Context, req *MsgSetOrchestratorAddresses) (*MsgSetOrchestratorAddressesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SetOrchestratorAddresses not implemented") } +func (*UnimplementedMsgServer) CancelSendToEth(ctx context.Context, req *MsgCancelSendToEth) (*MsgCancelSendToEthResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CancelSendToEth not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -1354,6 +1466,24 @@ func _Msg_SetOrchestratorAddresses_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _Msg_CancelSendToEth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCancelSendToEth) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CancelSendToEth(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.peggy.v1.Msg/CancelSendToEth", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CancelSendToEth(ctx, req.(*MsgCancelSendToEth)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "injective.peggy.v1.Msg", HandlerType: (*MsgServer)(nil), @@ -1390,6 +1520,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "SetOrchestratorAddresses", Handler: _Msg_SetOrchestratorAddresses_Handler, }, + { + MethodName: "CancelSendToEth", + Handler: _Msg_CancelSendToEth_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "injective/peggy/v1/msgs.proto", @@ -2018,6 +2152,64 @@ func (m *MsgERC20DeployedClaimResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } +func (m *MsgCancelSendToEth) 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 *MsgCancelSendToEth) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCancelSendToEth) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintMsgs(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0x12 + } + if m.TransactionId != 0 { + i = encodeVarintMsgs(dAtA, i, uint64(m.TransactionId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MsgCancelSendToEthResponse) 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 *MsgCancelSendToEthResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCancelSendToEthResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func encodeVarintMsgs(dAtA []byte, offset int, v uint64) int { offset -= sovMsgs(v) base := offset @@ -2309,6 +2501,31 @@ func (m *MsgERC20DeployedClaimResponse) Size() (n int) { return n } +func (m *MsgCancelSendToEth) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TransactionId != 0 { + n += 1 + sovMsgs(uint64(m.TransactionId)) + } + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovMsgs(uint64(l)) + } + return n +} + +func (m *MsgCancelSendToEthResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func sovMsgs(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -4205,6 +4422,157 @@ func (m *MsgERC20DeployedClaimResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgCancelSendToEth) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCancelSendToEth: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCancelSendToEth: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TransactionId", wireType) + } + m.TransactionId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TransactionId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsgs + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsgs + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMsgs(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsgs + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCancelSendToEthResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsgs + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCancelSendToEthResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCancelSendToEthResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMsgs(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsgs + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipMsgs(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/chain/peggy/types/pool.pb.go b/chain/peggy/types/pool.pb.go index 9340e660..741f4eb8 100644 --- a/chain/peggy/types/pool.pb.go +++ b/chain/peggy/types/pool.pb.go @@ -6,7 +6,6 @@ package types import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" @@ -25,76 +24,6 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// OutgoingTx is a withdrawal on the bridged contract -// TODO: can this type be replaced by outgoing transfer tx -type OutgoingTx struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - DestAddr string `protobuf:"bytes,2,opt,name=dest_addr,json=destAddr,proto3" json:"dest_addr,omitempty"` - Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"` - BridgeFee types.Coin `protobuf:"bytes,4,opt,name=bridge_fee,json=bridgeFee,proto3" json:"bridge_fee"` -} - -func (m *OutgoingTx) Reset() { *m = OutgoingTx{} } -func (m *OutgoingTx) String() string { return proto.CompactTextString(m) } -func (*OutgoingTx) ProtoMessage() {} -func (*OutgoingTx) Descriptor() ([]byte, []int) { - return fileDescriptor_36397d69759ce164, []int{0} -} -func (m *OutgoingTx) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *OutgoingTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_OutgoingTx.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 *OutgoingTx) XXX_Merge(src proto.Message) { - xxx_messageInfo_OutgoingTx.Merge(m, src) -} -func (m *OutgoingTx) XXX_Size() int { - return m.Size() -} -func (m *OutgoingTx) XXX_DiscardUnknown() { - xxx_messageInfo_OutgoingTx.DiscardUnknown(m) -} - -var xxx_messageInfo_OutgoingTx proto.InternalMessageInfo - -func (m *OutgoingTx) GetSender() string { - if m != nil { - return m.Sender - } - return "" -} - -func (m *OutgoingTx) GetDestAddr() string { - if m != nil { - return m.DestAddr - } - return "" -} - -func (m *OutgoingTx) GetAmount() types.Coin { - if m != nil { - return m.Amount - } - return types.Coin{} -} - -func (m *OutgoingTx) GetBridgeFee() types.Coin { - if m != nil { - return m.BridgeFee - } - return types.Coin{} -} - // IDSet represents a set of IDs type IDSet struct { Ids []uint64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"` @@ -104,7 +33,7 @@ func (m *IDSet) Reset() { *m = IDSet{} } func (m *IDSet) String() string { return proto.CompactTextString(m) } func (*IDSet) ProtoMessage() {} func (*IDSet) Descriptor() ([]byte, []int) { - return fileDescriptor_36397d69759ce164, []int{1} + return fileDescriptor_36397d69759ce164, []int{0} } func (m *IDSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -141,15 +70,15 @@ func (m *IDSet) GetIds() []uint64 { } type BatchFees struct { - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` - TopOneHundred github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=topOneHundred,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"topOneHundred"` + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + TotalFees github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=total_fees,json=totalFees,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"total_fees"` } func (m *BatchFees) Reset() { *m = BatchFees{} } func (m *BatchFees) String() string { return proto.CompactTextString(m) } func (*BatchFees) ProtoMessage() {} func (*BatchFees) Descriptor() ([]byte, []int) { - return fileDescriptor_36397d69759ce164, []int{2} + return fileDescriptor_36397d69759ce164, []int{1} } func (m *BatchFees) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -186,7 +115,6 @@ func (m *BatchFees) GetToken() string { } func init() { - proto.RegisterType((*OutgoingTx)(nil), "injective.peggy.v1.OutgoingTx") proto.RegisterType((*IDSet)(nil), "injective.peggy.v1.IDSet") proto.RegisterType((*BatchFees)(nil), "injective.peggy.v1.BatchFees") } @@ -194,89 +122,24 @@ func init() { func init() { proto.RegisterFile("injective/peggy/v1/pool.proto", fileDescriptor_36397d69759ce164) } var fileDescriptor_36397d69759ce164 = []byte{ - // 393 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xcd, 0x8e, 0xd3, 0x30, - 0x10, 0x8e, 0x69, 0xb7, 0x22, 0x46, 0x48, 0xc8, 0x5a, 0xa1, 0xec, 0x22, 0xb2, 0x55, 0x0f, 0xa8, - 0x97, 0xb5, 0x15, 0x38, 0x70, 0x43, 0x22, 0xa0, 0x15, 0x15, 0x48, 0x2b, 0x85, 0x3d, 0x71, 0x59, - 0x25, 0xf1, 0xe0, 0x9a, 0xdd, 0x78, 0xa2, 0xd8, 0x09, 0xec, 0x5b, 0xf0, 0x3c, 0x3c, 0x41, 0x8f, - 0x3d, 0x22, 0x0e, 0x15, 0x6a, 0x5f, 0x04, 0xe5, 0x87, 0xaa, 0xdc, 0x38, 0x79, 0x66, 0x3e, 0x7f, - 0x33, 0xdf, 0xf8, 0x33, 0x7d, 0xaa, 0xcd, 0x17, 0xc8, 0x9d, 0x6e, 0x40, 0x94, 0xa0, 0xd4, 0x9d, - 0x68, 0x22, 0x51, 0x22, 0xde, 0xf2, 0xb2, 0x42, 0x87, 0x8c, 0xed, 0x61, 0xde, 0xc1, 0xbc, 0x89, - 0x4e, 0xc3, 0x1c, 0x6d, 0x81, 0x56, 0x64, 0xa9, 0x05, 0xd1, 0x44, 0x19, 0xb8, 0x34, 0x12, 0x39, - 0x6a, 0xd3, 0x73, 0x4e, 0x8f, 0x15, 0x2a, 0xec, 0x42, 0xd1, 0x46, 0x7d, 0x75, 0xf6, 0x83, 0x50, - 0x7a, 0x59, 0x3b, 0x85, 0xda, 0xa8, 0xab, 0x6f, 0xec, 0x31, 0x9d, 0x58, 0x30, 0x12, 0xaa, 0x80, - 0x4c, 0xc9, 0xdc, 0x4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xef, 0x0f, 0x1a, 0x2e, 0xfe, 0xfa, 0xf7, 0x21, - 0xcd, 0xac, 0xd8, 0xbb, 0x79, 0x9e, 0x63, 0x05, 0x87, 0xe9, 0x32, 0xd5, 0x46, 0x14, 0x28, 0xeb, - 0x5b, 0xb0, 0xc3, 0x4f, 0xe8, 0x26, 0x67, 0x93, 0xce, 0xbe, 0x17, 0x7f, 0x02, 0x00, 0x00, 0xff, - 0xff, 0x2a, 0x0f, 0x42, 0xcc, 0x29, 0x02, 0x00, 0x00, -} - -func (m *OutgoingTx) 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 *OutgoingTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OutgoingTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.BridgeFee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - { - size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if len(m.DestAddr) > 0 { - i -= len(m.DestAddr) - copy(dAtA[i:], m.DestAddr) - i = encodeVarintPool(dAtA, i, uint64(len(m.DestAddr))) - i-- - dAtA[i] = 0x12 - } - if len(m.Sender) > 0 { - i -= len(m.Sender) - copy(dAtA[i:], m.Sender) - i = encodeVarintPool(dAtA, i, uint64(len(m.Sender))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + // 271 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x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0x1a, 0xb4, 0xf4, 0x2b, 0x0a, 0x6c, 0x93, 0xd0, 0x97, 0x78, 0xb0, 0x6d, 0x05, 0xdb, + 0xb5, 0x82, 0xfd, 0xb4, 0x82, 0x7d, 0x76, 0xc2, 0xda, 0x75, 0xc2, 0xfa, 0xea, 0x84, 0xf5, 0xfa, + 0x78, 0x16, 0xe6, 0xff, 0x6d, 0x7b, 0x0a, 0x23, 0xad, 0x4e, 0x4b, 0xe7, 0x31, 0xae, 0xe0, 0xdc, + 0x66, 0x61, 0x5e, 0xa9, 0x12, 0x93, 0x75, 0x01, 0xfa, 0x78, 0x25, 0xd3, 0x1a, 0x5d, 0x98, 0xe9, + 0x77, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc8, 0x08, 0x7d, 0xe1, 0x45, 0x01, 0x00, 0x00, } func (m *IDSet) Marshal() (dAtA []byte, err error) { @@ -300,20 +163,20 @@ func (m *IDSet) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l if len(m.Ids) > 0 { - dAtA4 := make([]byte, len(m.Ids)*10) - var j3 int + dAtA2 := make([]byte, len(m.Ids)*10) + var j1 int for _, num := range m.Ids { for num >= 1<<7 { - dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) + dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j3++ + j1++ } - dAtA4[j3] = uint8(num) - j3++ + dAtA2[j1] = uint8(num) + j1++ } - i -= j3 - copy(dAtA[i:], dAtA4[:j3]) - i = encodeVarintPool(dAtA, i, uint64(j3)) + i -= j1 + copy(dAtA[i:], dAtA2[:j1]) + i = encodeVarintPool(dAtA, i, uint64(j1)) i-- dAtA[i] = 0xa } @@ -341,9 +204,9 @@ func (m *BatchFees) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l { - size := m.TopOneHundred.Size() + size := m.TotalFees.Size() i -= size - if _, err := m.TopOneHundred.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.TotalFees.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintPool(dAtA, i, uint64(size)) @@ -371,27 +234,6 @@ func encodeVarintPool(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *OutgoingTx) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Sender) - if l > 0 { - n += 1 + l + sovPool(uint64(l)) - } - l = len(m.DestAddr) - if l > 0 { - n += 1 + l + sovPool(uint64(l)) - } - l = m.Amount.Size() - n += 1 + l + sovPool(uint64(l)) - l = m.BridgeFee.Size() - n += 1 + l + sovPool(uint64(l)) - return n -} - func (m *IDSet) Size() (n int) { if m == nil { return 0 @@ -418,7 +260,7 @@ func (m *BatchFees) Size() (n int) { if l > 0 { n += 1 + l + sovPool(uint64(l)) } - l = m.TopOneHundred.Size() + l = m.TotalFees.Size() n += 1 + l + sovPool(uint64(l)) return n } @@ -429,186 +271,6 @@ func sovPool(x uint64) (n int) { func sozPool(x uint64) (n int) { return sovPool(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *OutgoingTx) 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 ErrIntOverflowPool - } - 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: OutgoingTx: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OutgoingTx: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPool - } - 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 ErrInvalidLengthPool - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DestAddr", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPool - } - 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 ErrInvalidLengthPool - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DestAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BridgeFee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.BridgeFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *IDSet) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -798,7 +460,7 @@ func (m *BatchFees) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TopOneHundred", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TotalFees", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -826,7 +488,7 @@ func (m *BatchFees) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.TopOneHundred.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.TotalFees.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/chain/peggy/types/query.pb.go b/chain/peggy/types/query.pb.go index c155036b..23e343e6 100644 --- a/chain/peggy/types/query.pb.go +++ b/chain/peggy/types/query.pb.go @@ -1085,22 +1085,22 @@ func (m *QueryBatchConfirmsResponse) GetConfirms() []*MsgConfirmBatch { return nil } -type QueryLastEventNonceByAddrRequest struct { +type QueryLastEventByAddrRequest struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` } -func (m *QueryLastEventNonceByAddrRequest) Reset() { *m = QueryLastEventNonceByAddrRequest{} } -func (m *QueryLastEventNonceByAddrRequest) String() string { return proto.CompactTextString(m) } -func (*QueryLastEventNonceByAddrRequest) ProtoMessage() {} -func (*QueryLastEventNonceByAddrRequest) Descriptor() ([]byte, []int) { +func (m *QueryLastEventByAddrRequest) Reset() { *m = QueryLastEventByAddrRequest{} } +func (m *QueryLastEventByAddrRequest) String() string { return proto.CompactTextString(m) } +func (*QueryLastEventByAddrRequest) ProtoMessage() {} +func (*QueryLastEventByAddrRequest) Descriptor() ([]byte, []int) { return fileDescriptor_702b8e5c1503495b, []int{24} } -func (m *QueryLastEventNonceByAddrRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryLastEventByAddrRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryLastEventNonceByAddrRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryLastEventByAddrRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryLastEventNonceByAddrRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryLastEventByAddrRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1110,41 +1110,41 @@ func (m *QueryLastEventNonceByAddrRequest) XXX_Marshal(b []byte, deterministic b return b[:n], nil } } -func (m *QueryLastEventNonceByAddrRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryLastEventNonceByAddrRequest.Merge(m, src) +func (m *QueryLastEventByAddrRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLastEventByAddrRequest.Merge(m, src) } -func (m *QueryLastEventNonceByAddrRequest) XXX_Size() int { +func (m *QueryLastEventByAddrRequest) XXX_Size() int { return m.Size() } -func (m *QueryLastEventNonceByAddrRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryLastEventNonceByAddrRequest.DiscardUnknown(m) +func (m *QueryLastEventByAddrRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLastEventByAddrRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryLastEventNonceByAddrRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryLastEventByAddrRequest proto.InternalMessageInfo -func (m *QueryLastEventNonceByAddrRequest) GetAddress() string { +func (m *QueryLastEventByAddrRequest) GetAddress() string { if m != nil { return m.Address } return "" } -type QueryLastEventNonceByAddrResponse struct { - EventNonce uint64 `protobuf:"varint,1,opt,name=event_nonce,json=eventNonce,proto3" json:"event_nonce,omitempty"` +type QueryLastEventByAddrResponse struct { + LastClaimEvent *LastClaimEvent `protobuf:"bytes,1,opt,name=last_claim_event,json=lastClaimEvent,proto3" json:"last_claim_event,omitempty"` } -func (m *QueryLastEventNonceByAddrResponse) Reset() { *m = QueryLastEventNonceByAddrResponse{} } -func (m *QueryLastEventNonceByAddrResponse) String() string { return proto.CompactTextString(m) } -func (*QueryLastEventNonceByAddrResponse) ProtoMessage() {} -func (*QueryLastEventNonceByAddrResponse) Descriptor() ([]byte, []int) { +func (m *QueryLastEventByAddrResponse) Reset() { *m = QueryLastEventByAddrResponse{} } +func (m *QueryLastEventByAddrResponse) String() string { return proto.CompactTextString(m) } +func (*QueryLastEventByAddrResponse) ProtoMessage() {} +func (*QueryLastEventByAddrResponse) Descriptor() ([]byte, []int) { return fileDescriptor_702b8e5c1503495b, []int{25} } -func (m *QueryLastEventNonceByAddrResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryLastEventByAddrResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryLastEventNonceByAddrResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryLastEventByAddrResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryLastEventNonceByAddrResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryLastEventByAddrResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1154,23 +1154,23 @@ func (m *QueryLastEventNonceByAddrResponse) XXX_Marshal(b []byte, deterministic return b[:n], nil } } -func (m *QueryLastEventNonceByAddrResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryLastEventNonceByAddrResponse.Merge(m, src) +func (m *QueryLastEventByAddrResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLastEventByAddrResponse.Merge(m, src) } -func (m *QueryLastEventNonceByAddrResponse) XXX_Size() int { +func (m *QueryLastEventByAddrResponse) XXX_Size() int { return m.Size() } -func (m *QueryLastEventNonceByAddrResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryLastEventNonceByAddrResponse.DiscardUnknown(m) +func (m *QueryLastEventByAddrResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLastEventByAddrResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryLastEventNonceByAddrResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryLastEventByAddrResponse proto.InternalMessageInfo -func (m *QueryLastEventNonceByAddrResponse) GetEventNonce() uint64 { +func (m *QueryLastEventByAddrResponse) GetLastClaimEvent() *LastClaimEvent { if m != nil { - return m.EventNonce + return m.LastClaimEvent } - return 0 + return nil } type QueryERC20ToDenomRequest struct { @@ -1218,7 +1218,8 @@ func (m *QueryERC20ToDenomRequest) GetErc20() string { } type QueryERC20ToDenomResponse struct { - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + CosmosOriginated bool `protobuf:"varint,2,opt,name=cosmos_originated,json=cosmosOriginated,proto3" json:"cosmos_originated,omitempty"` } func (m *QueryERC20ToDenomResponse) Reset() { *m = QueryERC20ToDenomResponse{} } @@ -1261,6 +1262,13 @@ func (m *QueryERC20ToDenomResponse) GetDenom() string { return "" } +func (m *QueryERC20ToDenomResponse) GetCosmosOriginated() bool { + if m != nil { + return m.CosmosOriginated + } + return false +} + type QueryDenomToERC20Request struct { Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` } @@ -1306,7 +1314,8 @@ func (m *QueryDenomToERC20Request) GetDenom() string { } type QueryDenomToERC20Response struct { - Erc20 string `protobuf:"bytes,1,opt,name=erc20,proto3" json:"erc20,omitempty"` + Erc20 string `protobuf:"bytes,1,opt,name=erc20,proto3" json:"erc20,omitempty"` + CosmosOriginated bool `protobuf:"varint,2,opt,name=cosmos_originated,json=cosmosOriginated,proto3" json:"cosmos_originated,omitempty"` } func (m *QueryDenomToERC20Response) Reset() { *m = QueryDenomToERC20Response{} } @@ -1349,6 +1358,13 @@ func (m *QueryDenomToERC20Response) GetErc20() string { return "" } +func (m *QueryDenomToERC20Response) GetCosmosOriginated() bool { + if m != nil { + return m.CosmosOriginated + } + return false +} + type QueryDelegateKeysByValidatorAddress struct { ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` } @@ -1647,6 +1663,102 @@ func (m *QueryDelegateKeysByOrchestratorAddressResponse) GetEthAddress() string return "" } +type QueryPendingSendToEth struct { + SenderAddress string `protobuf:"bytes,1,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` +} + +func (m *QueryPendingSendToEth) Reset() { *m = QueryPendingSendToEth{} } +func (m *QueryPendingSendToEth) String() string { return proto.CompactTextString(m) } +func (*QueryPendingSendToEth) ProtoMessage() {} +func (*QueryPendingSendToEth) Descriptor() ([]byte, []int) { + return fileDescriptor_702b8e5c1503495b, []int{36} +} +func (m *QueryPendingSendToEth) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPendingSendToEth) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPendingSendToEth.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 *QueryPendingSendToEth) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPendingSendToEth.Merge(m, src) +} +func (m *QueryPendingSendToEth) XXX_Size() int { + return m.Size() +} +func (m *QueryPendingSendToEth) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPendingSendToEth.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPendingSendToEth proto.InternalMessageInfo + +func (m *QueryPendingSendToEth) GetSenderAddress() string { + if m != nil { + return m.SenderAddress + } + return "" +} + +type QueryPendingSendToEthResponse struct { + TransfersInBatches []*OutgoingTransferTx `protobuf:"bytes,1,rep,name=transfers_in_batches,json=transfersInBatches,proto3" json:"transfers_in_batches,omitempty"` + UnbatchedTransfers []*OutgoingTransferTx `protobuf:"bytes,2,rep,name=unbatched_transfers,json=unbatchedTransfers,proto3" json:"unbatched_transfers,omitempty"` +} + +func (m *QueryPendingSendToEthResponse) Reset() { *m = QueryPendingSendToEthResponse{} } +func (m *QueryPendingSendToEthResponse) String() string { return proto.CompactTextString(m) } +func (*QueryPendingSendToEthResponse) ProtoMessage() {} +func (*QueryPendingSendToEthResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_702b8e5c1503495b, []int{37} +} +func (m *QueryPendingSendToEthResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPendingSendToEthResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPendingSendToEthResponse.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 *QueryPendingSendToEthResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPendingSendToEthResponse.Merge(m, src) +} +func (m *QueryPendingSendToEthResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryPendingSendToEthResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPendingSendToEthResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPendingSendToEthResponse proto.InternalMessageInfo + +func (m *QueryPendingSendToEthResponse) GetTransfersInBatches() []*OutgoingTransferTx { + if m != nil { + return m.TransfersInBatches + } + return nil +} + +func (m *QueryPendingSendToEthResponse) GetUnbatchedTransfers() []*OutgoingTransferTx { + if m != nil { + return m.UnbatchedTransfers + } + return nil +} + func init() { proto.RegisterType((*QueryParamsRequest)(nil), "injective.peggy.v1.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "injective.peggy.v1.QueryParamsResponse") @@ -1672,8 +1784,8 @@ func init() { proto.RegisterType((*QueryBatchRequestByNonceResponse)(nil), "injective.peggy.v1.QueryBatchRequestByNonceResponse") proto.RegisterType((*QueryBatchConfirmsRequest)(nil), "injective.peggy.v1.QueryBatchConfirmsRequest") proto.RegisterType((*QueryBatchConfirmsResponse)(nil), "injective.peggy.v1.QueryBatchConfirmsResponse") - proto.RegisterType((*QueryLastEventNonceByAddrRequest)(nil), "injective.peggy.v1.QueryLastEventNonceByAddrRequest") - proto.RegisterType((*QueryLastEventNonceByAddrResponse)(nil), "injective.peggy.v1.QueryLastEventNonceByAddrResponse") + proto.RegisterType((*QueryLastEventByAddrRequest)(nil), "injective.peggy.v1.QueryLastEventByAddrRequest") + proto.RegisterType((*QueryLastEventByAddrResponse)(nil), "injective.peggy.v1.QueryLastEventByAddrResponse") proto.RegisterType((*QueryERC20ToDenomRequest)(nil), "injective.peggy.v1.QueryERC20ToDenomRequest") proto.RegisterType((*QueryERC20ToDenomResponse)(nil), "injective.peggy.v1.QueryERC20ToDenomResponse") proto.RegisterType((*QueryDenomToERC20Request)(nil), "injective.peggy.v1.QueryDenomToERC20Request") @@ -1684,103 +1796,116 @@ func init() { proto.RegisterType((*QueryDelegateKeysByEthAddressResponse)(nil), "injective.peggy.v1.QueryDelegateKeysByEthAddressResponse") proto.RegisterType((*QueryDelegateKeysByOrchestratorAddress)(nil), "injective.peggy.v1.QueryDelegateKeysByOrchestratorAddress") proto.RegisterType((*QueryDelegateKeysByOrchestratorAddressResponse)(nil), "injective.peggy.v1.QueryDelegateKeysByOrchestratorAddressResponse") + proto.RegisterType((*QueryPendingSendToEth)(nil), "injective.peggy.v1.QueryPendingSendToEth") + proto.RegisterType((*QueryPendingSendToEthResponse)(nil), "injective.peggy.v1.QueryPendingSendToEthResponse") } func init() { proto.RegisterFile("injective/peggy/v1/query.proto", fileDescriptor_702b8e5c1503495b) } var fileDescriptor_702b8e5c1503495b = []byte{ - // 1455 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x98, 0x4d, 0x8f, 0xdb, 0x44, - 0x18, 0xc7, 0xd7, 0xa5, 0xbb, 0x4b, 0x9f, 0x52, 0xd1, 0xce, 0x66, 0x69, 0xd6, 0xed, 0x66, 0x53, - 0xf7, 0xfd, 0x65, 0xe3, 0x6e, 0xda, 0x02, 0x05, 0xfa, 0x96, 0x76, 0x8b, 0x50, 0x0b, 0x2d, 0xd1, - 0x0a, 0x24, 0x28, 0x8a, 0x1c, 0x67, 0xea, 0x18, 0x12, 0x4f, 0x6a, 0x4f, 0xa2, 0x46, 0x55, 0x91, - 0xe0, 0x02, 0xc7, 0x4a, 0xdc, 0x79, 0xb9, 0x22, 0x2e, 0xf0, 0x09, 0xe0, 0x56, 0x6e, 0x95, 0x10, - 0x12, 0x27, 0x84, 0xba, 0x7c, 0x10, 0xe4, 0xf1, 0xd8, 0xb1, 0x9d, 0xf1, 0xc4, 0xd9, 0xe5, 0xb4, - 0xeb, 0x99, 0x79, 0x9e, 0xff, 0x6f, 0x1e, 0x8f, 0x1f, 0xff, 0x1d, 0x28, 0xd9, 0xce, 0xa7, 0xd8, - 0xa4, 0xf6, 0x00, 0xeb, 0x3d, 0x6c, 0x59, 0x43, 0x7d, 0xb0, 0xa6, 0x3f, 0xe8, 0x63, 0x77, 0x58, - 0xe9, 0xb9, 0x84, 0x12, 0x84, 0xa2, 0xf9, 0x0a, 0x9b, 0xaf, 0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 0x89, 0x73, 0xdf, 0x76, 0xbb, 0x52, 0x08, 0x54, 0x84, 0x79, 0xa3, 0xd5, 0x72, 0xb1, 0xe7, 0x15, - 0x77, 0x94, 0x95, 0x13, 0xbb, 0xea, 0xe1, 0xa5, 0x76, 0x2f, 0x81, 0x17, 0x25, 0xe3, 0x78, 0x97, - 0x61, 0xde, 0x0c, 0x86, 0x38, 0xdf, 0x11, 0x11, 0xdf, 0xbb, 0x9e, 0x95, 0x0c, 0x0f, 0x83, 0xb4, - 0x8b, 0x70, 0x68, 0x3c, 0xbb, 0x57, 0x1b, 0xbe, 0xe7, 0x53, 0xc9, 0xeb, 0x76, 0x1f, 0x34, 0x59, - 0x28, 0x07, 0xbc, 0x0a, 0x2f, 0x72, 0x2d, 0xff, 0xec, 0xbc, 0x90, 0x9b, 0x30, 0x8a, 0xd2, 0xca, - 0x50, 0x62, 0x3a, 0xb7, 0x0d, 0x2f, 0x79, 0x7c, 0xa2, 0x43, 0xfb, 0x21, 0xac, 0x64, 0xae, 0xe0, - 0x18, 0xe7, 0x61, 0x3e, 0xb8, 0x39, 0x21, 0x85, 0xec, 0x3e, 0x86, 0x4b, 0xb5, 0x9b, 0x70, 0x2a, - 0x4a, 0x7c, 0x17, 0x3b, 0x2d, 0xdb, 0xb1, 0x12, 0xf9, 0x6b, 0xc3, 0x6b, 0xad, 0x96, 0x1b, 0x96, - 0x29, 0x76, 0x0f, 0x95, 0xe4, 0x3d, 0x34, 0xe1, 0x74, 0xae, 0x3c, 0xdb, 0x82, 0x7d, 0x05, 0x0a, - 0x4c, 0xa4, 0xe6, 0x37, 0x86, 0x9b, 0x38, 0xbc, 0x7b, 0xda, 0x06, 0x2c, 0xa6, 0xc6, 0xb9, 0xcc, - 0x9b, 0xb0, 0xab, 0xc9, 0xc7, 0x42, 0xa1, 0x65, 0x91, 0x50, 0x18, 0xe8, 0xd5, 0x47, 0xeb, 0xb5, - 0x75, 0x38, 0x99, 0xde, 0x12, 0x5b, 0x37, 0x65, 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 0x6a, 0x12, 0x17, 0xc7, 0x2f, 0xdb, 0x86, 0xed, - 0xe8, 0x5d, 0xd2, 0xea, 0x77, 0xb0, 0xc7, 0x39, 0xd8, 0xaf, 0xed, 0xcd, 0x39, 0xf6, 0xe3, 0xf6, - 0xb9, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x72, 0xf7, 0x75, 0xe1, 0xe6, 0x17, 0x00, 0x00, + // 1622 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x99, 0xcf, 0x6f, 0xd4, 0x46, + 0x1b, 0xc7, 0xe3, 0xbc, 0x24, 0x81, 0x87, 0x17, 0x08, 0x93, 0x0d, 0x2c, 0x4e, 0xb2, 0x09, 0xe6, + 0xc7, 0x9b, 0x00, 0x59, 0x27, 0x0b, 0xbc, 0xbc, 0xbc, 0x15, 0x01, 0x92, 0x06, 0x84, 0xa0, 0x0d, + 0xdd, 0x46, 0xa5, 0x6a, 0x69, 0x2d, 0xaf, 0x77, 0xe2, 0x75, 0xbb, 0xeb, 0x59, 0x6c, 0xef, 0x8a, + 0x15, 0xa2, 0x52, 0x7b, 0x69, 0x8f, 0x48, 0x3d, 0xb5, 0x07, 0xda, 0x63, 0xd5, 0x5b, 0xef, 0x3d, + 0xf4, 0x48, 0x6f, 0xa8, 0x55, 0xa5, 0x9e, 0xaa, 0x0a, 0xfa, 0x87, 0x54, 0x1e, 0x8f, 0xbd, 0xfe, + 0x31, 0xf6, 0x7a, 0x43, 0x4f, 0x89, 0x67, 0x9e, 0x1f, 0x9f, 0x67, 0x3c, 0x7e, 0x66, 0xbe, 0x09, + 0x94, 0x0c, 0xf3, 0x23, 0xac, 0x39, 0x46, 0x17, 0xcb, 0x6d, 0xac, 0xeb, 0x3d, 0xb9, 0xbb, 0x2a, + 0x3f, 0xe8, 0x60, 0xab, 0x57, 0x6e, 0x5b, 0xc4, 0x21, 0x08, 0x05, 0xf3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55, 0xdc, 0x73, 0x45, 0x71, 0x88, 0x82, 0x9d, 0x06, 0x7a, 0x0c, 0xfb, 0x02, 0xad, + 0x86, 0x16, 0x53, 0xd3, 0xc4, 0x04, 0xa2, 0xb8, 0x94, 0xc3, 0x92, 0x81, 0xcc, 0x50, 0x90, 0x69, + 0x34, 0x15, 0xfb, 0x3b, 0xd4, 0x8e, 0x9b, 0xf1, 0xa9, 0x00, 0x87, 0x13, 0xea, 0x09, 0xa5, 0x97, + 0x9b, 0x26, 0xc5, 0xc4, 0xca, 0x30, 0x2e, 0xe9, 0xdf, 0x30, 0x25, 0x93, 0x09, 0x73, 0x71, 0x1e, + 0xa2, 0x1f, 0x05, 0x98, 0xcb, 0x14, 0x9a, 0xe8, 0x4a, 0x9e, 0xfd, 0x9d, 0xaa, 0x73, 0xc5, 0xb5, + 0xdd, 0xba, 0xb3, 0x22, 0x66, 0x69, 0x11, 0x47, 0x50, 0x21, 0x5e, 0x04, 0xfd, 0x38, 0xbe, 0x12, + 0x60, 0x8a, 0x23, 0xec, 0xd0, 0xf9, 0xec, 0xf7, 0xc7, 0x95, 0x9a, 0xe2, 0x85, 0xe1, 0x9c, 0x18, + 0xe0, 0x51, 0x0a, 0x78, 0x18, 0x1d, 0x8a, 0x01, 0xd2, 0xe3, 0x25, 0xa2, 0xdb, 0x32, 0x8e, 0x17, + 0x9e, 0x7a, 0xcc, 0x38, 0x5e, 0xb8, 0x72, 0x90, 0x77, 0xbc, 0x78, 0x4b, 0xe5, 0x77, 0x6e, 0xf4, + 0x8d, 0x00, 0xff, 0x0e, 0x4b, 0x22, 0x74, 0x2e, 0x35, 0x05, 0x47, 0x6b, 0x89, 0xcb, 0x39, 0xad, + 0x19, 0x4f, 0x85, 0xf2, 0x9c, 0x43, 0x67, 0xc2, 0x67, 0x48, 0x4c, 0xcf, 0xc8, 0x54, 0xea, 0xb8, + 0x5f, 0xab, 0xa7, 0xc2, 0x5c, 0xc2, 0xb0, 0x44, 0xca, 0x20, 0xe4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 0x5e, 0x6a, 0xe3, 0xf4, 0x5f, 0x1d, 0xe7, 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x88, + 0x1e, 0x14, 0xf4, 0x19, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1797,16 +1922,20 @@ const _ = grpc.SupportPackageIsVersion4 type QueryClient interface { // Deployments queries deployments Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // valset CurrentValset(ctx context.Context, in *QueryCurrentValsetRequest, opts ...grpc.CallOption) (*QueryCurrentValsetResponse, error) ValsetRequest(ctx context.Context, in *QueryValsetRequestRequest, opts ...grpc.CallOption) (*QueryValsetRequestResponse, error) ValsetConfirm(ctx context.Context, in *QueryValsetConfirmRequest, opts ...grpc.CallOption) (*QueryValsetConfirmResponse, error) ValsetConfirmsByNonce(ctx context.Context, in *QueryValsetConfirmsByNonceRequest, opts ...grpc.CallOption) (*QueryValsetConfirmsByNonceResponse, error) LastValsetRequests(ctx context.Context, in *QueryLastValsetRequestsRequest, opts ...grpc.CallOption) (*QueryLastValsetRequestsResponse, error) LastPendingValsetRequestByAddr(ctx context.Context, in *QueryLastPendingValsetRequestByAddrRequest, opts ...grpc.CallOption) (*QueryLastPendingValsetRequestByAddrResponse, error) - LastPendingBatchRequestByAddr(ctx context.Context, in *QueryLastPendingBatchRequestByAddrRequest, opts ...grpc.CallOption) (*QueryLastPendingBatchRequestByAddrResponse, error) - LastEventNonceByAddr(ctx context.Context, in *QueryLastEventNonceByAddrRequest, opts ...grpc.CallOption) (*QueryLastEventNonceByAddrResponse, error) + // claim + LastEventByAddr(ctx context.Context, in *QueryLastEventByAddrRequest, opts ...grpc.CallOption) (*QueryLastEventByAddrResponse, error) + // batch + GetPendingSendToEth(ctx context.Context, in *QueryPendingSendToEth, opts ...grpc.CallOption) (*QueryPendingSendToEthResponse, error) BatchFees(ctx context.Context, in *QueryBatchFeeRequest, opts ...grpc.CallOption) (*QueryBatchFeeResponse, error) OutgoingTxBatches(ctx context.Context, in *QueryOutgoingTxBatchesRequest, opts ...grpc.CallOption) (*QueryOutgoingTxBatchesResponse, error) + LastPendingBatchRequestByAddr(ctx context.Context, in *QueryLastPendingBatchRequestByAddrRequest, opts ...grpc.CallOption) (*QueryLastPendingBatchRequestByAddrResponse, error) BatchRequestByNonce(ctx context.Context, in *QueryBatchRequestByNonceRequest, opts ...grpc.CallOption) (*QueryBatchRequestByNonceResponse, error) BatchConfirms(ctx context.Context, in *QueryBatchConfirmsRequest, opts ...grpc.CallOption) (*QueryBatchConfirmsResponse, error) ERC20ToDenom(ctx context.Context, in *QueryERC20ToDenomRequest, opts ...grpc.CallOption) (*QueryERC20ToDenomResponse, error) @@ -1887,18 +2016,18 @@ func (c *queryClient) LastPendingValsetRequestByAddr(ctx context.Context, in *Qu return out, nil } -func (c *queryClient) LastPendingBatchRequestByAddr(ctx context.Context, in *QueryLastPendingBatchRequestByAddrRequest, opts ...grpc.CallOption) (*QueryLastPendingBatchRequestByAddrResponse, error) { - out := new(QueryLastPendingBatchRequestByAddrResponse) - err := c.cc.Invoke(ctx, "/injective.peggy.v1.Query/LastPendingBatchRequestByAddr", in, out, opts...) +func (c *queryClient) LastEventByAddr(ctx context.Context, in *QueryLastEventByAddrRequest, opts ...grpc.CallOption) (*QueryLastEventByAddrResponse, error) { + out := new(QueryLastEventByAddrResponse) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Query/LastEventByAddr", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *queryClient) LastEventNonceByAddr(ctx context.Context, in *QueryLastEventNonceByAddrRequest, opts ...grpc.CallOption) (*QueryLastEventNonceByAddrResponse, error) { - out := new(QueryLastEventNonceByAddrResponse) - err := c.cc.Invoke(ctx, "/injective.peggy.v1.Query/LastEventNonceByAddr", in, out, opts...) +func (c *queryClient) GetPendingSendToEth(ctx context.Context, in *QueryPendingSendToEth, opts ...grpc.CallOption) (*QueryPendingSendToEthResponse, error) { + out := new(QueryPendingSendToEthResponse) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Query/GetPendingSendToEth", in, out, opts...) if err != nil { return nil, err } @@ -1923,6 +2052,15 @@ func (c *queryClient) OutgoingTxBatches(ctx context.Context, in *QueryOutgoingTx return out, nil } +func (c *queryClient) LastPendingBatchRequestByAddr(ctx context.Context, in *QueryLastPendingBatchRequestByAddrRequest, opts ...grpc.CallOption) (*QueryLastPendingBatchRequestByAddrResponse, error) { + out := new(QueryLastPendingBatchRequestByAddrResponse) + err := c.cc.Invoke(ctx, "/injective.peggy.v1.Query/LastPendingBatchRequestByAddr", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) BatchRequestByNonce(ctx context.Context, in *QueryBatchRequestByNonceRequest, opts ...grpc.CallOption) (*QueryBatchRequestByNonceResponse, error) { out := new(QueryBatchRequestByNonceResponse) err := c.cc.Invoke(ctx, "/injective.peggy.v1.Query/BatchRequestByNonce", in, out, opts...) @@ -1990,16 +2128,20 @@ func (c *queryClient) GetDelegateKeyByOrchestrator(ctx context.Context, in *Quer type QueryServer interface { // Deployments queries deployments Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // valset CurrentValset(context.Context, *QueryCurrentValsetRequest) (*QueryCurrentValsetResponse, error) ValsetRequest(context.Context, *QueryValsetRequestRequest) (*QueryValsetRequestResponse, error) ValsetConfirm(context.Context, *QueryValsetConfirmRequest) (*QueryValsetConfirmResponse, error) ValsetConfirmsByNonce(context.Context, *QueryValsetConfirmsByNonceRequest) (*QueryValsetConfirmsByNonceResponse, error) LastValsetRequests(context.Context, *QueryLastValsetRequestsRequest) (*QueryLastValsetRequestsResponse, error) LastPendingValsetRequestByAddr(context.Context, *QueryLastPendingValsetRequestByAddrRequest) (*QueryLastPendingValsetRequestByAddrResponse, error) - LastPendingBatchRequestByAddr(context.Context, *QueryLastPendingBatchRequestByAddrRequest) (*QueryLastPendingBatchRequestByAddrResponse, error) - LastEventNonceByAddr(context.Context, *QueryLastEventNonceByAddrRequest) (*QueryLastEventNonceByAddrResponse, error) + // claim + LastEventByAddr(context.Context, *QueryLastEventByAddrRequest) (*QueryLastEventByAddrResponse, error) + // batch + GetPendingSendToEth(context.Context, *QueryPendingSendToEth) (*QueryPendingSendToEthResponse, error) BatchFees(context.Context, *QueryBatchFeeRequest) (*QueryBatchFeeResponse, error) OutgoingTxBatches(context.Context, *QueryOutgoingTxBatchesRequest) (*QueryOutgoingTxBatchesResponse, error) + LastPendingBatchRequestByAddr(context.Context, *QueryLastPendingBatchRequestByAddrRequest) (*QueryLastPendingBatchRequestByAddrResponse, error) BatchRequestByNonce(context.Context, *QueryBatchRequestByNonceRequest) (*QueryBatchRequestByNonceResponse, error) BatchConfirms(context.Context, *QueryBatchConfirmsRequest) (*QueryBatchConfirmsResponse, error) ERC20ToDenom(context.Context, *QueryERC20ToDenomRequest) (*QueryERC20ToDenomResponse, error) @@ -2034,11 +2176,11 @@ func (*UnimplementedQueryServer) LastValsetRequests(ctx context.Context, req *Qu func (*UnimplementedQueryServer) LastPendingValsetRequestByAddr(ctx context.Context, req *QueryLastPendingValsetRequestByAddrRequest) (*QueryLastPendingValsetRequestByAddrResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method LastPendingValsetRequestByAddr not implemented") } -func (*UnimplementedQueryServer) LastPendingBatchRequestByAddr(ctx context.Context, req *QueryLastPendingBatchRequestByAddrRequest) (*QueryLastPendingBatchRequestByAddrResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LastPendingBatchRequestByAddr not implemented") +func (*UnimplementedQueryServer) LastEventByAddr(ctx context.Context, req *QueryLastEventByAddrRequest) (*QueryLastEventByAddrResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LastEventByAddr not implemented") } -func (*UnimplementedQueryServer) LastEventNonceByAddr(ctx context.Context, req *QueryLastEventNonceByAddrRequest) (*QueryLastEventNonceByAddrResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LastEventNonceByAddr not implemented") +func (*UnimplementedQueryServer) GetPendingSendToEth(ctx context.Context, req *QueryPendingSendToEth) (*QueryPendingSendToEthResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPendingSendToEth not implemented") } func (*UnimplementedQueryServer) BatchFees(ctx context.Context, req *QueryBatchFeeRequest) (*QueryBatchFeeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method BatchFees not implemented") @@ -2046,6 +2188,9 @@ func (*UnimplementedQueryServer) BatchFees(ctx context.Context, req *QueryBatchF func (*UnimplementedQueryServer) OutgoingTxBatches(ctx context.Context, req *QueryOutgoingTxBatchesRequest) (*QueryOutgoingTxBatchesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method OutgoingTxBatches not implemented") } +func (*UnimplementedQueryServer) LastPendingBatchRequestByAddr(ctx context.Context, req *QueryLastPendingBatchRequestByAddrRequest) (*QueryLastPendingBatchRequestByAddrResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LastPendingBatchRequestByAddr not implemented") +} func (*UnimplementedQueryServer) BatchRequestByNonce(ctx context.Context, req *QueryBatchRequestByNonceRequest) (*QueryBatchRequestByNonceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method BatchRequestByNonce not implemented") } @@ -2198,38 +2343,38 @@ func _Query_LastPendingValsetRequestByAddr_Handler(srv interface{}, ctx context. return interceptor(ctx, in, info, handler) } -func _Query_LastPendingBatchRequestByAddr_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryLastPendingBatchRequestByAddrRequest) +func _Query_LastEventByAddr_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryLastEventByAddrRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).LastPendingBatchRequestByAddr(ctx, in) + return srv.(QueryServer).LastEventByAddr(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/injective.peggy.v1.Query/LastPendingBatchRequestByAddr", + FullMethod: "/injective.peggy.v1.Query/LastEventByAddr", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).LastPendingBatchRequestByAddr(ctx, req.(*QueryLastPendingBatchRequestByAddrRequest)) + return srv.(QueryServer).LastEventByAddr(ctx, req.(*QueryLastEventByAddrRequest)) } return interceptor(ctx, in, info, handler) } -func _Query_LastEventNonceByAddr_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryLastEventNonceByAddrRequest) +func _Query_GetPendingSendToEth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPendingSendToEth) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).LastEventNonceByAddr(ctx, in) + return srv.(QueryServer).GetPendingSendToEth(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/injective.peggy.v1.Query/LastEventNonceByAddr", + FullMethod: "/injective.peggy.v1.Query/GetPendingSendToEth", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).LastEventNonceByAddr(ctx, req.(*QueryLastEventNonceByAddrRequest)) + return srv.(QueryServer).GetPendingSendToEth(ctx, req.(*QueryPendingSendToEth)) } return interceptor(ctx, in, info, handler) } @@ -2270,6 +2415,24 @@ func _Query_OutgoingTxBatches_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _Query_LastPendingBatchRequestByAddr_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryLastPendingBatchRequestByAddrRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).LastPendingBatchRequestByAddr(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/injective.peggy.v1.Query/LastPendingBatchRequestByAddr", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).LastPendingBatchRequestByAddr(ctx, req.(*QueryLastPendingBatchRequestByAddrRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_BatchRequestByNonce_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryBatchRequestByNonceRequest) if err := dec(in); err != nil { @@ -2429,12 +2592,12 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Handler: _Query_LastPendingValsetRequestByAddr_Handler, }, { - MethodName: "LastPendingBatchRequestByAddr", - Handler: _Query_LastPendingBatchRequestByAddr_Handler, + MethodName: "LastEventByAddr", + Handler: _Query_LastEventByAddr_Handler, }, { - MethodName: "LastEventNonceByAddr", - Handler: _Query_LastEventNonceByAddr_Handler, + MethodName: "GetPendingSendToEth", + Handler: _Query_GetPendingSendToEth_Handler, }, { MethodName: "BatchFees", @@ -2444,6 +2607,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "OutgoingTxBatches", Handler: _Query_OutgoingTxBatches_Handler, }, + { + MethodName: "LastPendingBatchRequestByAddr", + Handler: _Query_LastPendingBatchRequestByAddr_Handler, + }, { MethodName: "BatchRequestByNonce", Handler: _Query_BatchRequestByNonce_Handler, @@ -3243,7 +3410,7 @@ func (m *QueryBatchConfirmsResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } -func (m *QueryLastEventNonceByAddrRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryLastEventByAddrRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3253,12 +3420,12 @@ func (m *QueryLastEventNonceByAddrRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryLastEventNonceByAddrRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryLastEventByAddrRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryLastEventNonceByAddrRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryLastEventByAddrRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -3273,7 +3440,7 @@ func (m *QueryLastEventNonceByAddrRequest) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } -func (m *QueryLastEventNonceByAddrResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryLastEventByAddrResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3283,20 +3450,27 @@ func (m *QueryLastEventNonceByAddrResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryLastEventNonceByAddrResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryLastEventByAddrResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryLastEventNonceByAddrResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryLastEventByAddrResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.EventNonce != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.EventNonce)) + if m.LastClaimEvent != nil { + { + size, err := m.LastClaimEvent.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } @@ -3351,6 +3525,16 @@ func (m *QueryERC20ToDenomResponse) MarshalToSizedBuffer(dAtA []byte) (int, erro _ = i var l int _ = l + if m.CosmosOriginated { + i-- + if m.CosmosOriginated { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } if len(m.Denom) > 0 { i -= len(m.Denom) copy(dAtA[i:], m.Denom) @@ -3411,6 +3595,16 @@ func (m *QueryDenomToERC20Response) MarshalToSizedBuffer(dAtA []byte) (int, erro _ = i var l int _ = l + if m.CosmosOriginated { + i-- + if m.CosmosOriginated { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } if len(m.Erc20) > 0 { i -= len(m.Erc20) copy(dAtA[i:], m.Erc20) @@ -3622,6 +3816,87 @@ func (m *QueryDelegateKeysByOrchestratorAddressResponse) MarshalToSizedBuffer(dA return len(dAtA) - i, nil } +func (m *QueryPendingSendToEth) 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 *QueryPendingSendToEth) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPendingSendToEth) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SenderAddress) > 0 { + i -= len(m.SenderAddress) + copy(dAtA[i:], m.SenderAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SenderAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryPendingSendToEthResponse) 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 *QueryPendingSendToEthResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPendingSendToEthResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.UnbatchedTransfers) > 0 { + for iNdEx := len(m.UnbatchedTransfers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.UnbatchedTransfers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.TransfersInBatches) > 0 { + for iNdEx := len(m.TransfersInBatches) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TransfersInBatches[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 @@ -3942,7 +4217,7 @@ func (m *QueryBatchConfirmsResponse) Size() (n int) { return n } -func (m *QueryLastEventNonceByAddrRequest) Size() (n int) { +func (m *QueryLastEventByAddrRequest) Size() (n int) { if m == nil { return 0 } @@ -3955,14 +4230,15 @@ func (m *QueryLastEventNonceByAddrRequest) Size() (n int) { return n } -func (m *QueryLastEventNonceByAddrResponse) Size() (n int) { +func (m *QueryLastEventByAddrResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.EventNonce != 0 { - n += 1 + sovQuery(uint64(m.EventNonce)) + if m.LastClaimEvent != nil { + l = m.LastClaimEvent.Size() + n += 1 + l + sovQuery(uint64(l)) } return n } @@ -3990,6 +4266,9 @@ func (m *QueryERC20ToDenomResponse) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } + if m.CosmosOriginated { + n += 2 + } return n } @@ -4016,6 +4295,9 @@ func (m *QueryDenomToERC20Response) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } + if m.CosmosOriginated { + n += 2 + } return n } @@ -4109,6 +4391,40 @@ func (m *QueryDelegateKeysByOrchestratorAddressResponse) Size() (n int) { return n } +func (m *QueryPendingSendToEth) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SenderAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryPendingSendToEthResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.TransfersInBatches) > 0 { + for _, e := range m.TransfersInBatches { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.UnbatchedTransfers) > 0 { + for _, e := range m.UnbatchedTransfers { + 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 } @@ -5987,7 +6303,7 @@ func (m *QueryBatchConfirmsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryLastEventNonceByAddrRequest) Unmarshal(dAtA []byte) error { +func (m *QueryLastEventByAddrRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6010,10 +6326,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: QueryLastEventByAddrRequest: 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: QueryLastEventByAddrRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -6069,7 +6385,7 @@ func (m *QueryLastEventNonceByAddrRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryLastEventNonceByAddrResponse) Unmarshal(dAtA []byte) error { +func (m *QueryLastEventByAddrResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6092,17 +6408,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: QueryLastEventByAddrResponse: 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: QueryLastEventByAddrResponse: 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 LastClaimEvent", wireType) } - m.EventNonce = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -6112,11 +6428,28 @@ func (m *QueryLastEventNonceByAddrResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.EventNonce |= 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.LastClaimEvent == nil { + m.LastClaimEvent = &LastClaimEvent{} + } + if err := m.LastClaimEvent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -6281,6 +6614,26 @@ func (m *QueryERC20ToDenomResponse) Unmarshal(dAtA []byte) error { } m.Denom = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CosmosOriginated", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.CosmosOriginated = bool(v != 0) default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -6445,6 +6798,26 @@ func (m *QueryDenomToERC20Response) Unmarshal(dAtA []byte) error { } m.Erc20 = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CosmosOriginated", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.CosmosOriginated = bool(v != 0) default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -7054,6 +7427,206 @@ func (m *QueryDelegateKeysByOrchestratorAddressResponse) Unmarshal(dAtA []byte) } return nil } +func (m *QueryPendingSendToEth) 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: QueryPendingSendToEth: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPendingSendToEth: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryPendingSendToEthResponse) 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: QueryPendingSendToEthResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPendingSendToEthResponse: 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) + } + 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 + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/chain/peggy/types/types.go b/chain/peggy/types/types.go index 8ecd0c82..d11d5327 100644 --- a/chain/peggy/types/types.go +++ b/chain/peggy/types/types.go @@ -68,11 +68,9 @@ func (b BridgeValidators) Sort() { // TODO: this needs to be potentially refactored func (b BridgeValidators) PowerDiff(c BridgeValidators) float64 { powers := map[string]int64{} - var totalB int64 // loop over b and initialize the map with their powers for _, bv := range b { powers[bv.EthereumAddress] = int64(bv.Power) - totalB += int64(bv.Power) } // subtract c powers from powers in the map, initializing @@ -91,7 +89,7 @@ func (b BridgeValidators) PowerDiff(c BridgeValidators) float64 { delta += math.Abs(float64(v)) } - return math.Abs(delta / float64(totalB)) + return math.Abs(delta / float64(math.MaxUint32)) } // TotalPower returns the total power in the bridge validator set @@ -224,3 +222,12 @@ func (v Valsets) Less(i, j int) bool { func (v Valsets) Swap(i, j int) { v[i], v[j] = v[j], v[i] } + +// GetFees returns the total fees contained within a given batch +func (b OutgoingTxBatch) GetFees() sdk.Int { + sum := sdk.ZeroInt() + for _, t := range b.Transactions { + sum.Add(t.Erc20Fee.Amount) + } + return sum +} diff --git a/chain/peggy/types/types.pb.go b/chain/peggy/types/types.pb.go index cc1d3094..188f7066 100644 --- a/chain/peggy/types/types.pb.go +++ b/chain/peggy/types/types.pb.go @@ -195,6 +195,59 @@ func (m *LastObservedEthereumBlockHeight) GetEthereumBlockHeight() uint64 { return 0 } +// LastClaimEvent stores last claim event details of validator. +type LastClaimEvent struct { + EthereumEventNonce uint64 `protobuf:"varint,1,opt,name=ethereum_event_nonce,json=ethereumEventNonce,proto3" json:"ethereum_event_nonce,omitempty"` + EthereumEventHeight uint64 `protobuf:"varint,2,opt,name=ethereum_event_height,json=ethereumEventHeight,proto3" json:"ethereum_event_height,omitempty"` +} + +func (m *LastClaimEvent) Reset() { *m = LastClaimEvent{} } +func (m *LastClaimEvent) String() string { return proto.CompactTextString(m) } +func (*LastClaimEvent) ProtoMessage() {} +func (*LastClaimEvent) Descriptor() ([]byte, []int) { + return fileDescriptor_b641943ad411b503, []int{3} +} +func (m *LastClaimEvent) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LastClaimEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LastClaimEvent.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 *LastClaimEvent) XXX_Merge(src proto.Message) { + xxx_messageInfo_LastClaimEvent.Merge(m, src) +} +func (m *LastClaimEvent) XXX_Size() int { + return m.Size() +} +func (m *LastClaimEvent) XXX_DiscardUnknown() { + xxx_messageInfo_LastClaimEvent.DiscardUnknown(m) +} + +var xxx_messageInfo_LastClaimEvent proto.InternalMessageInfo + +func (m *LastClaimEvent) GetEthereumEventNonce() uint64 { + if m != nil { + return m.EthereumEventNonce + } + return 0 +} + +func (m *LastClaimEvent) GetEthereumEventHeight() uint64 { + if m != nil { + return m.EthereumEventHeight + } + return 0 +} + // This records the relationship between an ERC20 token and the denom // of the corresponding Cosmos originated asset type ERC20ToDenom struct { @@ -206,7 +259,7 @@ func (m *ERC20ToDenom) Reset() { *m = ERC20ToDenom{} } func (m *ERC20ToDenom) String() string { return proto.CompactTextString(m) } func (*ERC20ToDenom) ProtoMessage() {} func (*ERC20ToDenom) Descriptor() ([]byte, []int) { - return fileDescriptor_b641943ad411b503, []int{3} + return fileDescriptor_b641943ad411b503, []int{4} } func (m *ERC20ToDenom) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -253,37 +306,40 @@ func init() { proto.RegisterType((*BridgeValidator)(nil), "injective.peggy.v1.BridgeValidator") proto.RegisterType((*Valset)(nil), "injective.peggy.v1.Valset") proto.RegisterType((*LastObservedEthereumBlockHeight)(nil), "injective.peggy.v1.LastObservedEthereumBlockHeight") + proto.RegisterType((*LastClaimEvent)(nil), "injective.peggy.v1.LastClaimEvent") proto.RegisterType((*ERC20ToDenom)(nil), "injective.peggy.v1.ERC20ToDenom") } func init() { proto.RegisterFile("injective/peggy/v1/types.proto", fileDescriptor_b641943ad411b503) } var fileDescriptor_b641943ad411b503 = []byte{ - // 369 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x52, 0x4f, 0x4f, 0xfa, 0x40, - 0x14, 0xa4, 0xf0, 0xfb, 0x61, 0x58, 0x4d, 0xd0, 0xa2, 0x86, 0x53, 0x25, 0xf5, 0x82, 0x07, 0x5b, - 0xa8, 0x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0xd1, 0xe5, 0xc0, 0x32, 0xf0, 0xc7, 0x65, 0xac, - 0x51, 0x44, 0xbd, 0xd7, 0x3b, 0xf9, 0x46, 0x35, 0x50, 0xc7, 0xa3, 0x9c, 0x50, 0x3e, 0x73, 0x73, - 0x76, 0x56, 0x1a, 0x15, 0xf1, 0x0e, 0x0a, 0x69, 0xf3, 0xbd, 0x85, 0x8e, 0xd6, 0xbf, 0xfe, 0x35, - 0x51, 0x97, 0x13, 0x1d, 0xd8, 0xde, 0xa1, 0x5f, 0xa2, 0xbd, 0xb1, 0x7d, 0x63, 0x0d, 0x9e, 0xe8, - 0x2d, 0xc4, 0x94, 0xe4, 0x25, 0x00, 0xf3, 0xac, 0x81, 0xdc, 0xd2, 0xb2, 0x0b, 0x90, 0xb3, 0x7e, - 0x2e, 0x97, 0x25, 0x16, 0x60, 0x04, 0x9f, 0x4b, 0x4d, 0x59, 0x2c, 0x35, 0xe5, 0x7b, 0xa9, 0x29, - 0x1f, 0x2b, 0xad, 0xb6, 0x58, 0x69, 0xb5, 0xaf, 0x95, 0x56, 0x7b, 0x7e, 0x08, 0xb0, 0x08, 0x53, - 0xd7, 0xf0, 0x28, 0x31, 0xef, 0xab, 0xb6, 0x26, 0x8e, 0xcb, 0xcd, 0x75, 0x77, 0xe7, 0x1e, 0x65, - 0xb0, 0x09, 0x43, 0x07, 0xc7, 0x26, 0xa1, 0x7e, 0x1a, 0x01, 0x2f, 0x4f, 0x42, 0xde, 0x83, 0xdb, - 0x94, 0x07, 0x71, 0xf1, 0x13, 0x00, 0x00, 0xff, 0xff, 0x30, 0x7c, 0x0b, 0x35, 0x32, 0x02, 0x00, - 0x00, + // 409 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0xbd, 0xae, 0xd3, 0x30, + 0x14, 0x6e, 0xee, 0x85, 0xa2, 0x6b, 0x10, 0x17, 0x7c, 0x0b, 0xea, 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, 0x1a, 0x9b, 0x43, 0x7c, 0xf1, 0x27, 0x00, 0x00, 0xff, + 0xff, 0xfe, 0x4b, 0xea, 0xfc, 0xaa, 0x02, 0x00, 0x00, } func (m *BridgeValidator) Marshal() (dAtA []byte, err error) { @@ -401,6 +457,39 @@ func (m *LastObservedEthereumBlockHeight) MarshalToSizedBuffer(dAtA []byte) (int return len(dAtA) - i, nil } +func (m *LastClaimEvent) 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 *LastClaimEvent) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LastClaimEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.EthereumEventHeight != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.EthereumEventHeight)) + i-- + dAtA[i] = 0x10 + } + if m.EthereumEventNonce != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.EthereumEventNonce)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *ERC20ToDenom) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -501,6 +590,21 @@ func (m *LastObservedEthereumBlockHeight) Size() (n int) { return n } +func (m *LastClaimEvent) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.EthereumEventNonce != 0 { + n += 1 + sovTypes(uint64(m.EthereumEventNonce)) + } + if m.EthereumEventHeight != 0 { + n += 1 + sovTypes(uint64(m.EthereumEventHeight)) + } + return n +} + func (m *ERC20ToDenom) Size() (n int) { if m == nil { return 0 @@ -835,6 +939,94 @@ func (m *LastObservedEthereumBlockHeight) Unmarshal(dAtA []byte) error { } return nil } +func (m *LastClaimEvent) 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 ErrIntOverflowTypes + } + 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: LastClaimEvent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LastClaimEvent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EthereumEventNonce", wireType) + } + m.EthereumEventNonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EthereumEventNonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EthereumEventHeight", wireType) + } + m.EthereumEventHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EthereumEventHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *ERC20ToDenom) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0