diff --git a/app/encoding_test.go b/app/encoding_test.go index 7938ec8a3..d894a7457 100644 --- a/app/encoding_test.go +++ b/app/encoding_test.go @@ -37,13 +37,13 @@ func TestMakeEncodingConfig_RegisterInterfaces(t *testing.T) { count3++ t.Log(typeURLMap.Key()) } - assert.Equal(t, 262, count3) + assert.Equal(t, 264, count3) govContent := encodingConfig.InterfaceRegistry.ListImplementations("cosmos.gov.v1beta1.Content") assert.Equal(t, 14, len(govContent)) msgImplementations := encodingConfig.InterfaceRegistry.ListImplementations(sdk.MsgInterfaceProtoName) - assert.Equal(t, 101, len(msgImplementations)) + assert.Equal(t, 102, len(msgImplementations)) type govProposalMsg interface { GetAuthority() string diff --git a/proto/fx/crosschain/v1/tx.proto b/proto/fx/crosschain/v1/tx.proto index 7abea4634..87d72c61d 100644 --- a/proto/fx/crosschain/v1/tx.proto +++ b/proto/fx/crosschain/v1/tx.proto @@ -24,6 +24,7 @@ service Msg { rpc BridgeTokenClaim(MsgBridgeTokenClaim) returns (MsgBridgeTokenClaimResponse); rpc SendToFxClaim(MsgSendToFxClaim) returns (MsgSendToFxClaimResponse); + rpc BridgeCallClaim(MsgBridgeCallClaim) returns (MsgBridgeCallClaimResponse); rpc SendToExternal(MsgSendToExternal) returns (MsgSendToExternalResponse); rpc CancelSendToExternal(MsgCancelSendToExternal) returns (MsgCancelSendToExternalResponse); @@ -150,6 +151,26 @@ message MsgSendToFxClaim { message MsgSendToFxClaimResponse {} +message MsgBridgeCallClaim { + string dst_chain_id = 1; + uint64 event_nonce = 2; + string sender = 3; + string receiver = 4; + string asset = 5; + string to = 6; + string message = 7; + string value = 8 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; + uint64 gasLimit = 9; + uint64 block_height = 10; + string bridger_address = 11; + string chain_name = 12; +} + +message MsgBridgeCallClaimResponse {} + // MsgSendToExternal // This is the message that a user calls when they want to bridge an asset // it will later be removed when it is included in a batch and successfully diff --git a/proto/fx/staking/v1beta1/tx.proto b/proto/fx/staking/v1beta1/tx.proto index eadb6b43a..c1f6bf3a6 100644 --- a/proto/fx/staking/v1beta1/tx.proto +++ b/proto/fx/staking/v1beta1/tx.proto @@ -1,8 +1,8 @@ syntax = "proto3"; package fx.staking.v1; -import "google/protobuf/any.proto"; import "cosmos_proto/cosmos.proto"; +import "google/protobuf/any.proto"; option go_package = "github.com/functionx/fx-core/x/staking/types"; @@ -30,4 +30,4 @@ message MsgEditConsensusPubKey { google.protobuf.Any pubkey = 3 [(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey"]; } -message MsgEditConsensusPubKeyResponse{} \ No newline at end of file +message MsgEditConsensusPubKeyResponse {} diff --git a/types/address.go b/types/address.go new file mode 100644 index 000000000..b40a9483a --- /dev/null +++ b/types/address.go @@ -0,0 +1,21 @@ +package types + +import ( + "errors" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/bech32" + "github.com/ethereum/go-ethereum/common" +) + +func ParseAddress(addr string) (accAddr sdk.AccAddress, isEvmAddr bool, err error) { + _, bytes, decodeErr := bech32.DecodeAndConvert(addr) + if decodeErr == nil { + return bytes, false, nil + } + ethAddrError := ValidateEthereumAddress(addr) + if ethAddrError == nil { + return common.HexToAddress(addr).Bytes(), true, nil + } + return nil, false, errors.Join(decodeErr, ethAddrError) +} diff --git a/x/crosschain/keeper/msg_server.go b/x/crosschain/keeper/msg_server.go index 0605b9c4e..97cdf70ae 100644 --- a/x/crosschain/keeper/msg_server.go +++ b/x/crosschain/keeper/msg_server.go @@ -535,6 +535,14 @@ func (s MsgServer) SendToFxClaim(c context.Context, msg *types.MsgSendToFxClaim) return &types.MsgSendToFxClaimResponse{}, nil } +func (s MsgServer) BridgeCallClaim(c context.Context, msg *types.MsgBridgeCallClaim) (*types.MsgBridgeCallClaimResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + if err := s.claimHandlerCommon(ctx, msg); err != nil { + return nil, err + } + return &types.MsgBridgeCallClaimResponse{}, nil +} + func (s MsgServer) BridgeTokenClaim(c context.Context, msg *types.MsgBridgeTokenClaim) (*types.MsgBridgeTokenClaimResponse, error) { ctx := sdk.UnwrapSDKContext(c) if err := s.claimHandlerCommon(ctx, msg); err != nil { diff --git a/x/crosschain/keeper/msg_server_router.go b/x/crosschain/keeper/msg_server_router.go index edfb194ba..77dc862ca 100644 --- a/x/crosschain/keeper/msg_server_router.go +++ b/x/crosschain/keeper/msg_server_router.go @@ -102,6 +102,14 @@ func (k msgServer) SendToFxClaim(ctx context.Context, msg *types.MsgSendToFxClai } } +func (k msgServer) BridgeCallClaim(ctx context.Context, msg *types.MsgBridgeCallClaim) (*types.MsgBridgeCallClaimResponse, error) { + if queryServer, err := k.getMsgServerByChainName(msg.GetChainName()); err != nil { + return nil, err + } else { + return queryServer.BridgeCallClaim(ctx, msg) + } +} + func (k msgServer) SendToExternal(ctx context.Context, msg *types.MsgSendToExternal) (*types.MsgSendToExternalResponse, error) { if queryServer, err := k.getMsgServerByChainName(msg.GetChainName()); err != nil { return nil, err diff --git a/x/crosschain/keeper/msg_server_test.go b/x/crosschain/keeper/msg_server_test.go index d02cd1c3b..25c6ceaa3 100644 --- a/x/crosschain/keeper/msg_server_test.go +++ b/x/crosschain/keeper/msg_server_test.go @@ -1095,3 +1095,61 @@ func (suite *KeeperTestSuite) TestMsgUpdateChainOracles() { _, err = suite.MsgServer().UpdateChainOracles(suite.ctx, updateOracle) require.Error(suite.T(), err) } + +func (suite *KeeperTestSuite) TestBridgeCallClaim() { + normalMsg := &types.MsgBondedOracle{ + OracleAddress: suite.oracleAddrs[0].String(), + BridgerAddress: suite.bridgerAddrs[0].String(), + ExternalAddress: suite.PubKeyToExternalAddr(suite.externalPris[0].PublicKey), + ValidatorAddress: suite.valAddrs[0].String(), + DelegateAmount: types.NewDelegateAmount(sdkmath.NewInt((tmrand.Int63n(5) + 1) * 10_000).MulRaw(1e18)), + ChainName: suite.chainName, + } + _, err := suite.MsgServer().BondedOracle(sdk.WrapSDKContext(suite.ctx), normalMsg) + require.NoError(suite.T(), err) + + oracleLastEventNonce := suite.Keeper().GetLastEventNonceByOracle(suite.ctx, suite.oracleAddrs[0]) + require.EqualValues(suite.T(), 0, oracleLastEventNonce) + + sender := helpers.GenerateAddress().String() + if suite.chainName == trontypes.ModuleName { + sender = trontypes.AddressFromHex(sender) + } + + testMsgs := []struct { + name string + msg *types.MsgBridgeCallClaim + err error + errReason string + }{ + { + name: "success", + msg: &types.MsgBridgeCallClaim{ + DstChainId: "123", + EventNonce: oracleLastEventNonce + 1, + Sender: sender, + Asset: "123", + Receiver: helpers.GenerateAddress().String(), + To: helpers.GenerateAddress().String(), + Message: "123", + Value: sdkmath.NewInt(0), + BlockHeight: 1, + BridgerAddress: suite.bridgerAddrs[0].String(), + ChainName: suite.chainName, + }, + err: nil, + errReason: "", + }, + } + + for _, testData := range testMsgs { + err = testData.msg.ValidateBasic() + require.NoError(suite.T(), err) + _, err = suite.MsgServer().BridgeCallClaim(sdk.WrapSDKContext(suite.ctx), testData.msg) + require.ErrorIs(suite.T(), err, testData.err, testData.name) + if err == nil { + continue + } + require.EqualValues(suite.T(), testData.errReason, err.Error(), testData.name) + } +} diff --git a/x/crosschain/types/codec.go b/x/crosschain/types/codec.go index 54f750fa1..e08e2c7d8 100644 --- a/x/crosschain/types/codec.go +++ b/x/crosschain/types/codec.go @@ -40,6 +40,7 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { &MsgBridgeTokenClaim{}, &MsgSendToFxClaim{}, + &MsgBridgeCallClaim{}, &MsgSendToExternal{}, &MsgCancelSendToExternal{}, @@ -58,6 +59,7 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { (*ExternalClaim)(nil), &MsgSendToExternalClaim{}, &MsgSendToFxClaim{}, + &MsgBridgeCallClaim{}, &MsgBridgeTokenClaim{}, &MsgOracleSetUpdatedClaim{}, ) @@ -87,6 +89,7 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgBridgeTokenClaim{}, fmt.Sprintf("%s/%s", ModuleName, "MsgBridgeTokenClaim"), nil) cdc.RegisterConcrete(&MsgSendToFxClaim{}, fmt.Sprintf("%s/%s", ModuleName, "MsgSendToFxClaim"), nil) + cdc.RegisterConcrete(&MsgBridgeCallClaim{}, fmt.Sprintf("%s/%s", ModuleName, "MsgBridgeCallClaim"), nil) cdc.RegisterConcrete(&MsgSendToExternal{}, fmt.Sprintf("%s/%s", ModuleName, "MsgSendToExternal"), nil) cdc.RegisterConcrete(&MsgCancelSendToExternal{}, fmt.Sprintf("%s/%s", ModuleName, "MsgCancelSendToExternal"), nil) diff --git a/x/crosschain/types/msg_validate.go b/x/crosschain/types/msg_validate.go index 661ed4881..eb3cdf39d 100644 --- a/x/crosschain/types/msg_validate.go +++ b/x/crosschain/types/msg_validate.go @@ -191,6 +191,34 @@ func (b MsgValidate) MsgSendToFxClaimValidate(m *MsgSendToFxClaim) (err error) { return nil } +func (b MsgValidate) MsgBridgeCallClaimValidate(m *MsgBridgeCallClaim) (err error) { + if _, err = sdk.AccAddressFromBech32(m.BridgerAddress); err != nil { + return errortypes.ErrInvalidAddress.Wrapf("invalid bridger address: %s", err) + } + if m.DstChainId == "" { + return errortypes.ErrInvalidRequest.Wrap("empty dst chain id") + } + if err = fxtypes.ValidateEthereumAddress(m.Sender); err != nil { + return errortypes.ErrInvalidAddress.Wrapf("invalid sender address: %s", err) + } + if err = fxtypes.ValidateEthereumAddress(m.To); err != nil { + return errortypes.ErrInvalidAddress.Wrapf("invalid to contract: %s", err) + } + if _, _, err := fxtypes.ParseAddress(m.Receiver); err != nil { + return errortypes.ErrInvalidAddress.Wrapf("invalid receiver address: %s", err) + } + if m.Value.IsNil() || m.Value.IsNegative() { + return errortypes.ErrInvalidRequest.Wrap("invalid value") + } + if m.EventNonce == 0 { + return errortypes.ErrInvalidRequest.Wrap("zero event nonce") + } + if m.BlockHeight == 0 { + return errortypes.ErrInvalidRequest.Wrap("zero block height") + } + return nil +} + func (b MsgValidate) MsgSendToExternalValidate(m *MsgSendToExternal) (err error) { if _, err = sdk.AccAddressFromBech32(m.Sender); err != nil { return errortypes.ErrInvalidAddress.Wrapf("invalid sender address: %s", err) diff --git a/x/crosschain/types/msgs.go b/x/crosschain/types/msgs.go index eb6125662..0cb3d0e23 100644 --- a/x/crosschain/types/msgs.go +++ b/x/crosschain/types/msgs.go @@ -28,7 +28,8 @@ const ( TypeMsgBridgeTokenClaim = "bridge_token_claim" - TypeMsgSendToFxClaim = "send_to_fx_claim" + TypeMsgSendToFxClaim = "send_to_fx_claim" + TypeMsgBridgeCallClaim = "bridge_call_claim" TypeMsgSendToExternal = "send_to_external" TypeMsgCancelSendToExternal = "cancel_send_to_external" @@ -74,6 +75,8 @@ var ( _ sdk.Msg = &MsgSendToFxClaim{} _ CrossChainMsg = &MsgSendToFxClaim{} + _ sdk.Msg = &MsgBridgeCallClaim{} + _ CrossChainMsg = &MsgBridgeCallClaim{} _ sdk.Msg = &MsgSendToExternal{} _ CrossChainMsg = &MsgSendToExternal{} @@ -110,6 +113,7 @@ type MsgValidateBasic interface { MsgSendToExternalClaimValidate(m *MsgSendToExternalClaim) (err error) MsgSendToFxClaimValidate(m *MsgSendToFxClaim) (err error) + MsgBridgeCallClaimValidate(m *MsgBridgeCallClaim) (err error) MsgSendToExternalValidate(m *MsgSendToExternal) (err error) MsgCancelSendToExternalValidate(m *MsgCancelSendToExternal) (err error) @@ -526,6 +530,7 @@ type ExternalClaim interface { var ( _ ExternalClaim = &MsgSendToFxClaim{} + _ ExternalClaim = &MsgBridgeCallClaim{} _ ExternalClaim = &MsgBridgeTokenClaim{} _ ExternalClaim = &MsgSendToExternalClaim{} _ ExternalClaim = &MsgOracleSetUpdatedClaim{} @@ -582,6 +587,51 @@ func (m *MsgSendToFxClaim) ClaimHash() []byte { return tmhash.Sum([]byte(path)) } +// MsgBridgeCallClaim + +// GetType returns the type of the claim +func (m *MsgBridgeCallClaim) GetType() ClaimType { + return CLAIM_TYPE_SEND_TO_FX +} + +// ValidateBasic performs stateless checks +func (m *MsgBridgeCallClaim) ValidateBasic() (err error) { + if err = ValidateModuleName(m.ChainName); err != nil { + return errortypes.ErrInvalidRequest.Wrap("invalid chain name") + } + if router, ok := msgValidateBasicRouter[m.ChainName]; !ok { + return errortypes.ErrInvalidRequest.Wrap("unrecognized cross chain name") + } else { + return router.MsgBridgeCallClaimValidate(m) + } +} + +// GetSignBytes encodes the message for signing +func (m *MsgBridgeCallClaim) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(m)) +} + +func (m *MsgBridgeCallClaim) GetClaimer() sdk.AccAddress { + return sdk.MustAccAddressFromBech32(m.BridgerAddress) +} + +// GetSigners defines whose signature is required +func (m *MsgBridgeCallClaim) GetSigners() []sdk.AccAddress { + return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.BridgerAddress)} +} + +// Type should return the action +func (m *MsgBridgeCallClaim) Type() string { return TypeMsgBridgeCallClaim } + +// Route should return the name of the module +func (m *MsgBridgeCallClaim) Route() string { return RouterKey } + +// ClaimHash Hash implements BridgeSendToExternal.Hash +func (m *MsgBridgeCallClaim) ClaimHash() []byte { + path := fmt.Sprintf("%d/%d/%s/%s/%s/%s/%s/%s/%s/%d", m.BlockHeight, m.EventNonce, m.DstChainId, m.Sender, m.Receiver, m.To, m.Asset, m.Message, m.Value.String(), m.GasLimit) + return tmhash.Sum([]byte(path)) +} + // MsgSendToExternalClaim // GetType returns the claim type diff --git a/x/crosschain/types/tx.pb.go b/x/crosschain/types/tx.pb.go index 0493a7650..82e5a157a 100644 --- a/x/crosschain/types/tx.pb.go +++ b/x/crosschain/types/tx.pb.go @@ -1007,6 +1007,167 @@ func (m *MsgSendToFxClaimResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgSendToFxClaimResponse proto.InternalMessageInfo +type MsgBridgeCallClaim struct { + DstChainId string `protobuf:"bytes,1,opt,name=dst_chain_id,json=dstChainId,proto3" json:"dst_chain_id,omitempty"` + EventNonce uint64 `protobuf:"varint,2,opt,name=event_nonce,json=eventNonce,proto3" json:"event_nonce,omitempty"` + Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` + Receiver string `protobuf:"bytes,4,opt,name=receiver,proto3" json:"receiver,omitempty"` + Asset string `protobuf:"bytes,5,opt,name=asset,proto3" json:"asset,omitempty"` + To string `protobuf:"bytes,6,opt,name=to,proto3" json:"to,omitempty"` + Message string `protobuf:"bytes,7,opt,name=message,proto3" json:"message,omitempty"` + Value github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,8,opt,name=value,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"value"` + GasLimit uint64 `protobuf:"varint,9,opt,name=gasLimit,proto3" json:"gasLimit,omitempty"` + BlockHeight uint64 `protobuf:"varint,10,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + BridgerAddress string `protobuf:"bytes,11,opt,name=bridger_address,json=bridgerAddress,proto3" json:"bridger_address,omitempty"` + ChainName string `protobuf:"bytes,12,opt,name=chain_name,json=chainName,proto3" json:"chain_name,omitempty"` +} + +func (m *MsgBridgeCallClaim) Reset() { *m = MsgBridgeCallClaim{} } +func (m *MsgBridgeCallClaim) String() string { return proto.CompactTextString(m) } +func (*MsgBridgeCallClaim) ProtoMessage() {} +func (*MsgBridgeCallClaim) Descriptor() ([]byte, []int) { + return fileDescriptor_ee1a6565f08a339d, []int{18} +} +func (m *MsgBridgeCallClaim) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgBridgeCallClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgBridgeCallClaim.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 *MsgBridgeCallClaim) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgBridgeCallClaim.Merge(m, src) +} +func (m *MsgBridgeCallClaim) XXX_Size() int { + return m.Size() +} +func (m *MsgBridgeCallClaim) XXX_DiscardUnknown() { + xxx_messageInfo_MsgBridgeCallClaim.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgBridgeCallClaim proto.InternalMessageInfo + +func (m *MsgBridgeCallClaim) GetDstChainId() string { + if m != nil { + return m.DstChainId + } + return "" +} + +func (m *MsgBridgeCallClaim) GetEventNonce() uint64 { + if m != nil { + return m.EventNonce + } + return 0 +} + +func (m *MsgBridgeCallClaim) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgBridgeCallClaim) GetReceiver() string { + if m != nil { + return m.Receiver + } + return "" +} + +func (m *MsgBridgeCallClaim) GetAsset() string { + if m != nil { + return m.Asset + } + return "" +} + +func (m *MsgBridgeCallClaim) GetTo() string { + if m != nil { + return m.To + } + return "" +} + +func (m *MsgBridgeCallClaim) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + +func (m *MsgBridgeCallClaim) GetGasLimit() uint64 { + if m != nil { + return m.GasLimit + } + return 0 +} + +func (m *MsgBridgeCallClaim) GetBlockHeight() uint64 { + if m != nil { + return m.BlockHeight + } + return 0 +} + +func (m *MsgBridgeCallClaim) GetBridgerAddress() string { + if m != nil { + return m.BridgerAddress + } + return "" +} + +func (m *MsgBridgeCallClaim) GetChainName() string { + if m != nil { + return m.ChainName + } + return "" +} + +type MsgBridgeCallClaimResponse struct { +} + +func (m *MsgBridgeCallClaimResponse) Reset() { *m = MsgBridgeCallClaimResponse{} } +func (m *MsgBridgeCallClaimResponse) String() string { return proto.CompactTextString(m) } +func (*MsgBridgeCallClaimResponse) ProtoMessage() {} +func (*MsgBridgeCallClaimResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ee1a6565f08a339d, []int{19} +} +func (m *MsgBridgeCallClaimResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgBridgeCallClaimResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgBridgeCallClaimResponse.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 *MsgBridgeCallClaimResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgBridgeCallClaimResponse.Merge(m, src) +} +func (m *MsgBridgeCallClaimResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgBridgeCallClaimResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgBridgeCallClaimResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgBridgeCallClaimResponse proto.InternalMessageInfo + // MsgSendToExternal // This is the message that a user calls when they want to bridge an asset // it will later be removed when it is included in a batch and successfully @@ -1031,7 +1192,7 @@ func (m *MsgSendToExternal) Reset() { *m = MsgSendToExternal{} } func (m *MsgSendToExternal) String() string { return proto.CompactTextString(m) } func (*MsgSendToExternal) ProtoMessage() {} func (*MsgSendToExternal) Descriptor() ([]byte, []int) { - return fileDescriptor_ee1a6565f08a339d, []int{18} + return fileDescriptor_ee1a6565f08a339d, []int{20} } func (m *MsgSendToExternal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1103,7 +1264,7 @@ func (m *MsgSendToExternalResponse) Reset() { *m = MsgSendToExternalResp func (m *MsgSendToExternalResponse) String() string { return proto.CompactTextString(m) } func (*MsgSendToExternalResponse) ProtoMessage() {} func (*MsgSendToExternalResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ee1a6565f08a339d, []int{19} + return fileDescriptor_ee1a6565f08a339d, []int{21} } func (m *MsgSendToExternalResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1152,7 +1313,7 @@ func (m *MsgCancelSendToExternal) Reset() { *m = MsgCancelSendToExternal func (m *MsgCancelSendToExternal) String() string { return proto.CompactTextString(m) } func (*MsgCancelSendToExternal) ProtoMessage() {} func (*MsgCancelSendToExternal) Descriptor() ([]byte, []int) { - return fileDescriptor_ee1a6565f08a339d, []int{20} + return fileDescriptor_ee1a6565f08a339d, []int{22} } func (m *MsgCancelSendToExternal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1209,7 +1370,7 @@ func (m *MsgCancelSendToExternalResponse) Reset() { *m = MsgCancelSendTo func (m *MsgCancelSendToExternalResponse) String() string { return proto.CompactTextString(m) } func (*MsgCancelSendToExternalResponse) ProtoMessage() {} func (*MsgCancelSendToExternalResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ee1a6565f08a339d, []int{21} + return fileDescriptor_ee1a6565f08a339d, []int{23} } func (m *MsgCancelSendToExternalResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1261,7 +1422,7 @@ func (m *MsgRequestBatch) Reset() { *m = MsgRequestBatch{} } func (m *MsgRequestBatch) String() string { return proto.CompactTextString(m) } func (*MsgRequestBatch) ProtoMessage() {} func (*MsgRequestBatch) Descriptor() ([]byte, []int) { - return fileDescriptor_ee1a6565f08a339d, []int{22} + return fileDescriptor_ee1a6565f08a339d, []int{24} } func (m *MsgRequestBatch) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1326,7 +1487,7 @@ func (m *MsgRequestBatchResponse) Reset() { *m = MsgRequestBatchResponse func (m *MsgRequestBatchResponse) String() string { return proto.CompactTextString(m) } func (*MsgRequestBatchResponse) ProtoMessage() {} func (*MsgRequestBatchResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ee1a6565f08a339d, []int{23} + return fileDescriptor_ee1a6565f08a339d, []int{25} } func (m *MsgRequestBatchResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1383,7 +1544,7 @@ func (m *MsgConfirmBatch) Reset() { *m = MsgConfirmBatch{} } func (m *MsgConfirmBatch) String() string { return proto.CompactTextString(m) } func (*MsgConfirmBatch) ProtoMessage() {} func (*MsgConfirmBatch) Descriptor() ([]byte, []int) { - return fileDescriptor_ee1a6565f08a339d, []int{24} + return fileDescriptor_ee1a6565f08a339d, []int{26} } func (m *MsgConfirmBatch) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1461,7 +1622,7 @@ func (m *MsgConfirmBatchResponse) Reset() { *m = MsgConfirmBatchResponse func (m *MsgConfirmBatchResponse) String() string { return proto.CompactTextString(m) } func (*MsgConfirmBatchResponse) ProtoMessage() {} func (*MsgConfirmBatchResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ee1a6565f08a339d, []int{25} + return fileDescriptor_ee1a6565f08a339d, []int{27} } func (m *MsgConfirmBatchResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1505,7 +1666,7 @@ func (m *MsgSendToExternalClaim) Reset() { *m = MsgSendToExternalClaim{} func (m *MsgSendToExternalClaim) String() string { return proto.CompactTextString(m) } func (*MsgSendToExternalClaim) ProtoMessage() {} func (*MsgSendToExternalClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_ee1a6565f08a339d, []int{26} + return fileDescriptor_ee1a6565f08a339d, []int{28} } func (m *MsgSendToExternalClaim) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1583,7 +1744,7 @@ func (m *MsgSendToExternalClaimResponse) Reset() { *m = MsgSendToExterna func (m *MsgSendToExternalClaimResponse) String() string { return proto.CompactTextString(m) } func (*MsgSendToExternalClaimResponse) ProtoMessage() {} func (*MsgSendToExternalClaimResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ee1a6565f08a339d, []int{27} + return fileDescriptor_ee1a6565f08a339d, []int{29} } func (m *MsgSendToExternalClaimResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1628,7 +1789,7 @@ func (m *MsgBridgeTokenClaim) Reset() { *m = MsgBridgeTokenClaim{} } func (m *MsgBridgeTokenClaim) String() string { return proto.CompactTextString(m) } func (*MsgBridgeTokenClaim) ProtoMessage() {} func (*MsgBridgeTokenClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_ee1a6565f08a339d, []int{28} + return fileDescriptor_ee1a6565f08a339d, []int{30} } func (m *MsgBridgeTokenClaim) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1727,7 +1888,7 @@ func (m *MsgBridgeTokenClaimResponse) Reset() { *m = MsgBridgeTokenClaim func (m *MsgBridgeTokenClaimResponse) String() string { return proto.CompactTextString(m) } func (*MsgBridgeTokenClaimResponse) ProtoMessage() {} func (*MsgBridgeTokenClaimResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ee1a6565f08a339d, []int{29} + return fileDescriptor_ee1a6565f08a339d, []int{31} } func (m *MsgBridgeTokenClaimResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1769,7 +1930,7 @@ func (m *MsgSetOrchestratorAddress) Reset() { *m = MsgSetOrchestratorAdd func (m *MsgSetOrchestratorAddress) String() string { return proto.CompactTextString(m) } func (*MsgSetOrchestratorAddress) ProtoMessage() {} func (*MsgSetOrchestratorAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_ee1a6565f08a339d, []int{30} + return fileDescriptor_ee1a6565f08a339d, []int{32} } func (m *MsgSetOrchestratorAddress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1844,7 +2005,7 @@ func (m *MsgAddOracleDeposit) Reset() { *m = MsgAddOracleDeposit{} } func (m *MsgAddOracleDeposit) String() string { return proto.CompactTextString(m) } func (*MsgAddOracleDeposit) ProtoMessage() {} func (*MsgAddOracleDeposit) Descriptor() ([]byte, []int) { - return fileDescriptor_ee1a6565f08a339d, []int{31} + return fileDescriptor_ee1a6565f08a339d, []int{33} } func (m *MsgAddOracleDeposit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1909,7 +2070,7 @@ func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } func (*MsgUpdateParams) ProtoMessage() {} func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return fileDescriptor_ee1a6565f08a339d, []int{32} + return fileDescriptor_ee1a6565f08a339d, []int{34} } func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1968,7 +2129,7 @@ func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateParamsResponse) ProtoMessage() {} func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ee1a6565f08a339d, []int{33} + return fileDescriptor_ee1a6565f08a339d, []int{35} } func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2008,7 +2169,7 @@ func (m *MsgIncreaseBridgeFee) Reset() { *m = MsgIncreaseBridgeFee{} } func (m *MsgIncreaseBridgeFee) String() string { return proto.CompactTextString(m) } func (*MsgIncreaseBridgeFee) ProtoMessage() {} func (*MsgIncreaseBridgeFee) Descriptor() ([]byte, []int) { - return fileDescriptor_ee1a6565f08a339d, []int{34} + return fileDescriptor_ee1a6565f08a339d, []int{36} } func (m *MsgIncreaseBridgeFee) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2072,7 +2233,7 @@ func (m *MsgIncreaseBridgeFeeResponse) Reset() { *m = MsgIncreaseBridgeF func (m *MsgIncreaseBridgeFeeResponse) String() string { return proto.CompactTextString(m) } func (*MsgIncreaseBridgeFeeResponse) ProtoMessage() {} func (*MsgIncreaseBridgeFeeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ee1a6565f08a339d, []int{35} + return fileDescriptor_ee1a6565f08a339d, []int{37} } func (m *MsgIncreaseBridgeFeeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2112,7 +2273,7 @@ func (m *MsgUpdateChainOracles) Reset() { *m = MsgUpdateChainOracles{} } func (m *MsgUpdateChainOracles) String() string { return proto.CompactTextString(m) } func (*MsgUpdateChainOracles) ProtoMessage() {} func (*MsgUpdateChainOracles) Descriptor() ([]byte, []int) { - return fileDescriptor_ee1a6565f08a339d, []int{36} + return fileDescriptor_ee1a6565f08a339d, []int{38} } func (m *MsgUpdateChainOracles) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2169,7 +2330,7 @@ func (m *MsgUpdateChainOraclesResponse) Reset() { *m = MsgUpdateChainOra func (m *MsgUpdateChainOraclesResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateChainOraclesResponse) ProtoMessage() {} func (*MsgUpdateChainOraclesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ee1a6565f08a339d, []int{37} + return fileDescriptor_ee1a6565f08a339d, []int{39} } func (m *MsgUpdateChainOraclesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2217,6 +2378,8 @@ func init() { proto.RegisterType((*MsgOracleSetUpdatedClaimResponse)(nil), "fx.gravity.crosschain.v1.MsgOracleSetUpdatedClaimResponse") proto.RegisterType((*MsgSendToFxClaim)(nil), "fx.gravity.crosschain.v1.MsgSendToFxClaim") proto.RegisterType((*MsgSendToFxClaimResponse)(nil), "fx.gravity.crosschain.v1.MsgSendToFxClaimResponse") + proto.RegisterType((*MsgBridgeCallClaim)(nil), "fx.gravity.crosschain.v1.MsgBridgeCallClaim") + proto.RegisterType((*MsgBridgeCallClaimResponse)(nil), "fx.gravity.crosschain.v1.MsgBridgeCallClaimResponse") proto.RegisterType((*MsgSendToExternal)(nil), "fx.gravity.crosschain.v1.MsgSendToExternal") proto.RegisterType((*MsgSendToExternalResponse)(nil), "fx.gravity.crosschain.v1.MsgSendToExternalResponse") proto.RegisterType((*MsgCancelSendToExternal)(nil), "fx.gravity.crosschain.v1.MsgCancelSendToExternal") @@ -2242,116 +2405,125 @@ func init() { func init() { proto.RegisterFile("fx/crosschain/v1/tx.proto", fileDescriptor_ee1a6565f08a339d) } var fileDescriptor_ee1a6565f08a339d = []byte{ - // 1737 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 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, 0xdf, 0x72, 0x2f, 0xbf, 0xbe, 0x97, 0x60, 0xa5, 0x4e, 0xb4, 0x9a, 0xa9, 0xd8, - 0x18, 0x11, 0x5c, 0x1d, 0x31, 0x31, 0x44, 0x5d, 0x77, 0x42, 0x3d, 0x3d, 0x31, 0xbe, 0xa7, 0x27, - 0x03, 0x5d, 0xf6, 0x0e, 0x64, 0x91, 0xaa, 0x36, 0xa7, 0x9f, 0x69, 0x16, 0x90, 0xaa, 0x7a, 0x46, - 0x96, 0x0a, 0x70, 0x26, 0xca, 0x78, 0xcf, 0xbb, 0x2f, 0x24, 0x76, 0xeb, 0xe5, 0x9e, 0xef, 0x38, - 0xc6, 0xf3, 0x94, 0x7a, 0x63, 0x91, 0xcb, 0xc1, 0x1c, 0xcf, 0x46, 0x27, 0x74, 0xc9, 0xf5, 0xf9, - 0x86, 0xbb, 0x1c, 0x8a, 0x49, 0x11, 0xce, 0x46, 0x5a, 0xe6, 0xda, 0xbe, 0xf5, 0xe3, 0x32, 0x24, - 0xeb, 0x44, 0x93, 0xbb, 0xb0, 0x10, 0x78, 0x25, 0x1a, 0x73, 0x55, 0x09, 0x3d, 0x96, 0xe4, 0x37, - 0x63, 0xb3, 0x7a, 0x1d, 0x5f, 0x87, 0x8c, 0xff, 0x4d, 0x65, 0x7d, 0xec, 0x0e, 0x3e, 0xce, 0xfc, - 0x95, 0xb8, 0x9c, 0x9e, 0xaa, 0x36, 0x80, 0xef, 0x49, 0xe4, 0xc2, 0x58, 0xf9, 0x01, 0x63, 0xbe, - 0x12, 0x93, 0xd1, 0xef, 0x92, 0xff, 0x75, 0x63, 0xbc, 0x4b, 0x3e, 0xce, 0x09, 0x2e, 0x45, 0x3c, - 0x58, 0xc8, 0x36, 0x64, 0x43, 0xaf, 0x06, 0x97, 0xc7, 0xee, 0x11, 0x64, 0xce, 0x5f, 0x9d, 0x82, - 0xd9, 0xaf, 0x33, 0xf4, 0x42, 0x32, 0x5e, 0x67, 0x90, 0x79, 0x82, 0x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xef, 0x29, 0xff, 0x00, 0xe4, 0x88, 0x39, 0xa4, 0x12, 0xc3, 0x0b, 0xbf, 0x40, 0xfe, 0xfa, 0x94, - 0x02, 0xae, 0xfe, 0x6a, 0xed, 0xe9, 0xcb, 0x82, 0xf4, 0xec, 0x65, 0x41, 0x7a, 0xf1, 0xb2, 0x20, - 0x7d, 0xf6, 0xaa, 0x30, 0xf3, 0xec, 0x55, 0x61, 0xe6, 0x97, 0x57, 0x85, 0x99, 0x77, 0x2b, 0xbe, - 0x17, 0x83, 0x76, 0xcf, 0x64, 0xb3, 0x5b, 0xbf, 0xd2, 0xee, 0x6f, 0x28, 0x96, 0x8d, 0x2b, 0x81, - 0xff, 0x6d, 0xb1, 0xe7, 0x83, 0x56, 0x9a, 0xfd, 0x0f, 0xeb, 0xea, 0x5f, 0x01, 0x00, 0x00, 0xff, - 0xff, 0xc3, 0x14, 0xf3, 0xfa, 0x82, 0x1b, 0x00, 0x00, + // 1876 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x59, 0x4f, 0x8f, 0x23, 0x47, + 0x15, 0xdf, 0xb6, 0x3d, 0x9e, 0x9d, 0x67, 0x8f, 0x67, 0xb6, 0x63, 0xb2, 0x9e, 0xce, 0xae, 0x3d, + 0xb1, 0x08, 0x99, 0xcd, 0xb2, 0x76, 0x66, 0x02, 0x09, 0xd9, 0x43, 0xa4, 0xf1, 0xec, 0xae, 0x62, + 0x09, 0x67, 0x91, 0x77, 0x03, 0x82, 0x8b, 0x55, 0xee, 0x2a, 0xb7, 0x5b, 0xdb, 0x7f, 0x86, 0xae, + 0xb2, 0xd7, 0x23, 0x24, 0x10, 0x11, 0xe2, 0x0a, 0x07, 0x0e, 0x48, 0xdc, 0xf8, 0x04, 0x20, 0x71, + 0x40, 0x82, 0x23, 0x87, 0x1c, 0x23, 0x2e, 0x20, 0x0e, 0x21, 0xda, 0x3d, 0x70, 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x9f, 0xd4, 0xc5, 0x49, 0x17, 0xe5, 0x16, 0x5c, 0x34, 0x07, 0x24, 0xbf, + 0x14, 0x90, 0x42, 0x02, 0x90, 0x2a, 0x6c, 0x21, 0x4a, 0x09, 0x93, 0x18, 0x8a, 0x85, 0x5a, 0x81, + 0x1c, 0x73, 0x25, 0x78, 0x39, 0xbf, 0x13, 0xf2, 0x23, 0x9d, 0x52, 0x64, 0x04, 0x21, 0x17, 0x2c, + 0xd5, 0x7b, 0xb0, 0x35, 0x45, 0xd6, 0x84, 0x08, 0x9c, 0x36, 0xf6, 0xa5, 0x10, 0xf6, 0x2d, 0x34, + 0x10, 0xfd, 0xae, 0x69, 0x9b, 0x8c, 0x83, 0x59, 0xe8, 0x87, 0xeb, 0x85, 0xc0, 0x83, 0xc5, 0xc0, + 0x4b, 0x71, 0x5b, 0x29, 0x83, 0xdb, 0xca, 0x49, 0xb7, 0xdd, 0x00, 0x6d, 0xd1, 0x33, 0xa1, 0xe3, + 0xfe, 0xa1, 0xf0, 0x84, 0x2e, 0xbc, 0x7a, 0x5f, 0xa6, 0xbc, 0x08, 0xe8, 0x4a, 0x0c, 0x74, 0x15, + 0x0a, 0x98, 0x50, 0x26, 0x93, 0x29, 0xff, 0xfd, 0xc2, 0x5d, 0x81, 0xfa, 0x01, 0x80, 0x38, 0xc9, + 0x60, 0x44, 0x44, 0x46, 0xcd, 0x20, 0xbc, 0x23, 0x44, 0x1e, 0x90, 0xb5, 0x29, 0xf7, 0x94, 0x97, + 0x93, 0xf8, 0xc1, 0x82, 0x63, 0xab, 0x5f, 0x87, 0x8a, 0x3b, 0x61, 0x86, 0x6b, 0x3a, 0xc6, 0x80, + 0xcd, 0x82, 0xd0, 0x2c, 0xf4, 0xcb, 0x01, 0xf5, 0xf1, 0xac, 0x8b, 0x9b, 0x4f, 0x79, 0x93, 0x75, + 0x86, 0x1c, 0x9d, 0x58, 0x09, 0x84, 0xfc, 0xb4, 0xe0, 0x21, 0x87, 0x22, 0x9d, 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0x8f, 0x98, 0x67, 0x3a, 0x46, 0x7f, 0xce, + 0xaa, 0x7e, 0x00, 0xc5, 0x73, 0xae, 0x40, 0xb6, 0x09, 0x87, 0xcb, 0xc7, 0x0a, 0x61, 0x48, 0x70, + 0x12, 0x21, 0x75, 0xb7, 0xf2, 0xc9, 0x7f, 0xfe, 0xf0, 0xd6, 0x7c, 0x3f, 0x99, 0xc3, 0xa2, 0x96, + 0x87, 0xf1, 0xf5, 0x17, 0x05, 0xaa, 0x3d, 0x6a, 0x74, 0x1d, 0xdd, 0x23, 0x88, 0x92, 0xce, 0x92, + 0x8e, 0x21, 0x6d, 0x4e, 0x4d, 0xd4, 0xf4, 0xdc, 0xea, 0x9a, 0x1e, 0xef, 0x48, 0xef, 0x43, 0x05, + 0x61, 0x3c, 0xd8, 0xbc, 0xa7, 0x29, 0x23, 0x8c, 0x43, 0x23, 0x9b, 0x75, 0xb8, 0x91, 0x66, 0xfc, + 0xbc, 0xd5, 0x56, 0xf8, 0x73, 0x85, 0x38, 0x39, 0x6f, 0xa3, 0x45, 0x48, 0x7d, 0x65, 0x9e, 0xab, + 0xc1, 0xb6, 0x88, 0x46, 0xdf, 0x75, 0x79, 0xbf, 0x4f, 0x96, 0xcb, 0x05, 0x9f, 0x34, 0xe0, 0x66, + 0xaa, 0x65, 0x81, 0xed, 0x27, 0x7f, 0xbb, 0x06, 0xf9, 0x1e, 0x35, 0x54, 0x0b, 0xca, 0xb1, 0xe7, + 0xbd, 0x15, 0x33, 0x66, 0xe2, 0x95, 0x4b, 0x3b, 0xce, 0xcc, 0x1a, 0x56, 0x7c, 0x13, 0x4a, 0xd1, + 0xc7, 0xb0, 0xa3, 0x95, 0x3b, 0x44, 0x38, 0xb5, 0xb7, 0xb3, 0x72, 0x86, 0xaa, 0x46, 0x00, 0x91, + 0xb7, 0xac, 0x37, 0x57, 0xca, 0xcf, 0x19, 0xb5, 0x76, 0x46, 0xc6, 0xe8, 0x91, 0xa2, 0xcf, 0x52, + 0xab, 0x8f, 0x14, 0xe1, 0x5c, 0x73, 0xa4, 0x94, 0x97, 0x26, 0xd5, 0x83, 0x4a, 0xe2, 0xb9, 0xe7, + 0xf6, 0xca, 0x3d, 0xe2, 0xcc, 0xda, 0x3b, 0x1b, 0x30, 0x47, 0x75, 0x26, 0x9e, 0xb6, 0x56, 0xeb, + 0x8c, 0x33, 0xaf, 0xd1, 0x99, 0xfe, 0xb2, 0xa5, 0xce, 0x60, 0x7f, 0xe1, 0x75, 0xe9, 0xce, 0xca, + 0x8d, 0x92, 0xec, 0xda, 0xb7, 0x37, 0x62, 0x0f, 0x35, 0xff, 0x52, 0x81, 0x6a, 0xe2, 0x75, 0x43, + 0xf4, 0x18, 0x27, 0xd9, 0xf6, 0x8b, 0x3e, 0x88, 0x68, 0x77, 0x37, 0x97, 0x89, 0x42, 0xb0, 0xd0, + 0xe7, 0xac, 0x86, 0x20, 0xc9, 0xbe, 0x06, 0x82, 0x65, 0x2d, 0x81, 0xea, 0xc2, 0x6e, 0xfc, 0xe9, + 0xe6, 0xad, 0x95, 0xfb, 0xc4, 0x78, 0xb5, 0x93, 0xec, 0xbc, 0xa1, 0xc2, 0x09, 0xec, 0x25, 0x1f, + 0x2b, 0xbe, 0x99, 0xc1, 0xf4, 0x90, 0x5b, 0xfb, 0xd6, 0x26, 0xdc, 0xd1, 0xc0, 0x4e, 0x0c, 0x92, + 0xb7, 0x33, 0x18, 0x1f, 0x30, 0xaf, 0x09, 0xec, 0x25, 0xb3, 0xee, 0x2f, 0x14, 0xa8, 0xa6, 0xce, + 0xb0, 0xab, 0x53, 0x69, 0x9a, 0x88, 0xf6, 0xfe, 0xc6, 0x22, 0xa1, 0x19, 0x3f, 0x57, 0xe0, 0x95, + 0xb4, 0xb1, 0xe2, 0xed, 0x0d, 0xce, 0x24, 0xa0, 0xff, 0xce, 0xa6, 0x12, 0xa1, 0x0d, 0x16, 0x94, + 0x63, 0x03, 0xf3, 0xad, 0x35, 0x79, 0x77, 0xce, 0xba, 0xa6, 0xee, 0xa4, 0x4e, 0x9a, 0x16, 0x94, + 0x63, 0x43, 0xe4, 0x6a, 0x6d, 0x51, 0xd6, 0x35, 0xda, 0xd2, 0x26, 0x37, 0x5f, 0x5b, 0xac, 0x8f, + 0x5b, 0xad, 0x2d, 0xca, 0xba, 0x46, 0x5b, 0x5a, 0x8f, 0xa5, 0xfe, 0x04, 0xae, 0x2d, 0xf6, 0x57, + 0xad, 0x95, 0xfb, 0x2c, 0xf0, 0x6b, 0xef, 0x6e, 0xc6, 0x1f, 0x2a, 0xff, 0x29, 0xa8, 0x29, 0xed, + 0x4f, 0x3b, 0xc3, 0x29, 0xa2, 0x02, 0xda, 0x7b, 0x1b, 0x0a, 0x04, 0xfa, 0x3b, 0xdd, 0x4f, 0x9f, + 0xd5, 0x95, 0xcf, 0x9e, 0xd5, 0x95, 0x2f, 0x9e, 0xd5, 0x95, 0x5f, 0x3f, 0xaf, 0x5f, 0xf9, 0xec, + 0x79, 0xfd, 0xca, 0x3f, 0x9f, 0xd7, 0xaf, 0xfc, 0xa8, 0x1d, 0x79, 0xa8, 0x18, 0x4d, 0x1c, 0xde, + 0x32, 0xce, 0xda, 0xa3, 0xd9, 0x1d, 0xdd, 0xf5, 0x48, 0x3b, 0xf6, 0xbf, 0x50, 0xfe, 0x6a, 0x31, + 0x2c, 0xf2, 0xff, 0x79, 0xbe, 0xf3, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6b, 0x32, 0xd1, 0x1d, + 0xb2, 0x1d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2376,6 +2548,7 @@ type MsgClient interface { OracleSetUpdateClaim(ctx context.Context, in *MsgOracleSetUpdatedClaim, opts ...grpc.CallOption) (*MsgOracleSetUpdatedClaimResponse, error) BridgeTokenClaim(ctx context.Context, in *MsgBridgeTokenClaim, opts ...grpc.CallOption) (*MsgBridgeTokenClaimResponse, error) SendToFxClaim(ctx context.Context, in *MsgSendToFxClaim, opts ...grpc.CallOption) (*MsgSendToFxClaimResponse, error) + BridgeCallClaim(ctx context.Context, in *MsgBridgeCallClaim, opts ...grpc.CallOption) (*MsgBridgeCallClaimResponse, error) SendToExternal(ctx context.Context, in *MsgSendToExternal, opts ...grpc.CallOption) (*MsgSendToExternalResponse, error) CancelSendToExternal(ctx context.Context, in *MsgCancelSendToExternal, opts ...grpc.CallOption) (*MsgCancelSendToExternalResponse, error) SendToExternalClaim(ctx context.Context, in *MsgSendToExternalClaim, opts ...grpc.CallOption) (*MsgSendToExternalClaimResponse, error) @@ -2486,6 +2659,15 @@ func (c *msgClient) SendToFxClaim(ctx context.Context, in *MsgSendToFxClaim, opt return out, nil } +func (c *msgClient) BridgeCallClaim(ctx context.Context, in *MsgBridgeCallClaim, opts ...grpc.CallOption) (*MsgBridgeCallClaimResponse, error) { + out := new(MsgBridgeCallClaimResponse) + err := c.cc.Invoke(ctx, "/fx.gravity.crosschain.v1.Msg/BridgeCallClaim", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) SendToExternal(ctx context.Context, in *MsgSendToExternal, opts ...grpc.CallOption) (*MsgSendToExternalResponse, error) { out := new(MsgSendToExternalResponse) err := c.cc.Invoke(ctx, "/fx.gravity.crosschain.v1.Msg/SendToExternal", in, out, opts...) @@ -2570,6 +2752,7 @@ type MsgServer interface { OracleSetUpdateClaim(context.Context, *MsgOracleSetUpdatedClaim) (*MsgOracleSetUpdatedClaimResponse, error) BridgeTokenClaim(context.Context, *MsgBridgeTokenClaim) (*MsgBridgeTokenClaimResponse, error) SendToFxClaim(context.Context, *MsgSendToFxClaim) (*MsgSendToFxClaimResponse, error) + BridgeCallClaim(context.Context, *MsgBridgeCallClaim) (*MsgBridgeCallClaimResponse, error) SendToExternal(context.Context, *MsgSendToExternal) (*MsgSendToExternalResponse, error) CancelSendToExternal(context.Context, *MsgCancelSendToExternal) (*MsgCancelSendToExternalResponse, error) SendToExternalClaim(context.Context, *MsgSendToExternalClaim) (*MsgSendToExternalClaimResponse, error) @@ -2616,6 +2799,9 @@ func (*UnimplementedMsgServer) BridgeTokenClaim(ctx context.Context, req *MsgBri func (*UnimplementedMsgServer) SendToFxClaim(ctx context.Context, req *MsgSendToFxClaim) (*MsgSendToFxClaimResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SendToFxClaim not implemented") } +func (*UnimplementedMsgServer) BridgeCallClaim(ctx context.Context, req *MsgBridgeCallClaim) (*MsgBridgeCallClaimResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BridgeCallClaim not implemented") +} func (*UnimplementedMsgServer) SendToExternal(ctx context.Context, req *MsgSendToExternal) (*MsgSendToExternalResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SendToExternal not implemented") } @@ -2825,6 +3011,24 @@ func _Msg_SendToFxClaim_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } +func _Msg_BridgeCallClaim_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgBridgeCallClaim) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).BridgeCallClaim(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/fx.gravity.crosschain.v1.Msg/BridgeCallClaim", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).BridgeCallClaim(ctx, req.(*MsgBridgeCallClaim)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_SendToExternal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgSendToExternal) if err := dec(in); err != nil { @@ -3013,6 +3217,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "SendToFxClaim", Handler: _Msg_SendToFxClaim_Handler, }, + { + MethodName: "BridgeCallClaim", + Handler: _Msg_BridgeCallClaim_Handler, + }, { MethodName: "SendToExternal", Handler: _Msg_SendToExternal_Handler, @@ -3741,7 +3949,7 @@ func (m *MsgSendToFxClaimResponse) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } -func (m *MsgSendToExternal) Marshal() (dAtA []byte, err error) { +func (m *MsgBridgeCallClaim) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3751,12 +3959,12 @@ func (m *MsgSendToExternal) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgSendToExternal) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgBridgeCallClaim) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgSendToExternal) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgBridgeCallClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -3766,46 +3974,86 @@ func (m *MsgSendToExternal) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.ChainName) i = encodeVarintTx(dAtA, i, uint64(len(m.ChainName))) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x62 } - { - size, err := m.BridgeFee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + if len(m.BridgerAddress) > 0 { + i -= len(m.BridgerAddress) + copy(dAtA[i:], m.BridgerAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.BridgerAddress))) + i-- + dAtA[i] = 0x5a + } + if m.BlockHeight != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.BlockHeight)) + i-- + dAtA[i] = 0x50 + } + if m.GasLimit != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.GasLimit)) + i-- + dAtA[i] = 0x48 } - i-- - dAtA[i] = 0x22 { - size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { + size := m.Value.Size() + i -= size + if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { return 0, err } - i -= size i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a - if len(m.Dest) > 0 { - i -= len(m.Dest) - copy(dAtA[i:], m.Dest) - i = encodeVarintTx(dAtA, i, uint64(len(m.Dest))) + dAtA[i] = 0x42 + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintTx(dAtA, i, uint64(len(m.Message))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x3a + } + if len(m.To) > 0 { + i -= len(m.To) + copy(dAtA[i:], m.To) + i = encodeVarintTx(dAtA, i, uint64(len(m.To))) + i-- + dAtA[i] = 0x32 + } + if len(m.Asset) > 0 { + i -= len(m.Asset) + copy(dAtA[i:], m.Asset) + i = encodeVarintTx(dAtA, i, uint64(len(m.Asset))) + i-- + dAtA[i] = 0x2a + } + if len(m.Receiver) > 0 { + i -= len(m.Receiver) + copy(dAtA[i:], m.Receiver) + i = encodeVarintTx(dAtA, i, uint64(len(m.Receiver))) + i-- + dAtA[i] = 0x22 } if len(m.Sender) > 0 { i -= len(m.Sender) copy(dAtA[i:], m.Sender) i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) i-- + dAtA[i] = 0x1a + } + if m.EventNonce != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.EventNonce)) + i-- + dAtA[i] = 0x10 + } + if len(m.DstChainId) > 0 { + i -= len(m.DstChainId) + copy(dAtA[i:], m.DstChainId) + i = encodeVarintTx(dAtA, i, uint64(len(m.DstChainId))) + i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *MsgSendToExternalResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgBridgeCallClaimResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3815,25 +4063,20 @@ func (m *MsgSendToExternalResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgSendToExternalResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgBridgeCallClaimResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgSendToExternalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgBridgeCallClaimResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.OutgoingTxId != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.OutgoingTxId)) - i-- - dAtA[i] = 0x8 - } return len(dAtA) - i, nil } -func (m *MsgCancelSendToExternal) Marshal() (dAtA []byte, err error) { +func (m *MsgSendToExternal) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3843,12 +4086,12 @@ func (m *MsgCancelSendToExternal) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgCancelSendToExternal) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgSendToExternal) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgCancelSendToExternal) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgSendToExternal) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -3858,23 +4101,115 @@ func (m *MsgCancelSendToExternal) MarshalToSizedBuffer(dAtA []byte) (int, error) copy(dAtA[i:], m.ChainName) i = encodeVarintTx(dAtA, i, uint64(len(m.ChainName))) i-- - dAtA[i] = 0x1a - } - if len(m.Sender) > 0 { - i -= len(m.Sender) - copy(dAtA[i:], m.Sender) - i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) - i-- - dAtA[i] = 0x12 + dAtA[i] = 0x2a } - if m.TransactionId != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.TransactionId)) - i-- - dAtA[i] = 0x8 + { + size, err := m.BridgeFee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } - return len(dAtA) - i, nil -} - + i-- + dAtA[i] = 0x22 + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.Dest) > 0 { + i -= len(m.Dest) + copy(dAtA[i:], m.Dest) + i = encodeVarintTx(dAtA, i, uint64(len(m.Dest))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSendToExternalResponse) 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 *MsgSendToExternalResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSendToExternalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.OutgoingTxId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.OutgoingTxId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MsgCancelSendToExternal) 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 *MsgCancelSendToExternal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCancelSendToExternal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ChainName) > 0 { + i -= len(m.ChainName) + copy(dAtA[i:], m.ChainName) + i = encodeVarintTx(dAtA, i, uint64(len(m.ChainName))) + i-- + dAtA[i] = 0x1a + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0x12 + } + if m.TransactionId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.TransactionId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *MsgCancelSendToExternalResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -4909,6 +5244,67 @@ func (m *MsgSendToFxClaimResponse) Size() (n int) { return n } +func (m *MsgBridgeCallClaim) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DstChainId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.EventNonce != 0 { + n += 1 + sovTx(uint64(m.EventNonce)) + } + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Receiver) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Asset) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.To) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Message) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Value.Size() + n += 1 + l + sovTx(uint64(l)) + if m.GasLimit != 0 { + n += 1 + sovTx(uint64(m.GasLimit)) + } + if m.BlockHeight != 0 { + n += 1 + sovTx(uint64(m.BlockHeight)) + } + l = len(m.BridgerAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.ChainName) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgBridgeCallClaimResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func (m *MsgSendToExternal) Size() (n int) { if m == nil { return 0 @@ -7366,6 +7762,453 @@ func (m *MsgSendToFxClaimResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgBridgeCallClaim) 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 ErrIntOverflowTx + } + 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: MsgBridgeCallClaim: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgBridgeCallClaim: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DstChainId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DstChainId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EventNonce", wireType) + } + m.EventNonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EventNonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + 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 ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Receiver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Asset", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Asset = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.To = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasLimit", wireType) + } + m.GasLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GasLimit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) + } + m.BlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BridgerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BridgerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChainName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgBridgeCallClaimResponse) 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 ErrIntOverflowTx + } + 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: MsgBridgeCallClaimResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgBridgeCallClaimResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *MsgSendToExternal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/ibc/applications/transfer/keeper/parse.go b/x/ibc/applications/transfer/keeper/parse.go index f248645e1..c7082af5f 100644 --- a/x/ibc/applications/transfer/keeper/parse.go +++ b/x/ibc/applications/transfer/keeper/parse.go @@ -4,10 +4,8 @@ import ( errorsmod "cosmossdk.io/errors" sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/bech32" transfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" - "github.com/ethereum/go-ethereum/common" fxtypes "github.com/functionx/fx-core/v7/types" "github.com/functionx/fx-core/v7/x/ibc/applications/transfer/types" @@ -64,7 +62,7 @@ func parseReceiveAndAmountByPacket(data types.FungibleTokenPacketData) (sdk.AccA } if data.Router != "" { - addressBytes, _, err := parsePacketAddress(data.Sender) + addressBytes, _, err := fxtypes.ParseAddress(data.Sender) if err != nil { return nil, false, sdkmath.Int{}, sdkmath.Int{}, err } @@ -76,7 +74,7 @@ func parseReceiveAndAmountByPacket(data types.FungibleTokenPacketData) (sdk.AccA } // decode the receiver address - receiverAddr, isEvmAddr, err := parsePacketAddress(data.Receiver) + receiverAddr, isEvmAddr, err := fxtypes.ParseAddress(data.Receiver) return receiverAddr, isEvmAddr, transferAmount, sdkmath.ZeroInt(), err } @@ -97,15 +95,3 @@ func parseAmountAndFeeByPacket(data types.FungibleTokenPacketData) (sdkmath.Int, } return transferAmount, feeAmount, nil } - -func parsePacketAddress(ibcSender string) (addr sdk.AccAddress, isEvmAddr bool, err error) { - _, bytes, decodeErr := bech32.DecodeAndConvert(ibcSender) - if decodeErr == nil { - return bytes, false, nil - } - ethAddrError := fxtypes.ValidateEthereumAddress(ibcSender) - if ethAddrError == nil { - return common.HexToAddress(ibcSender).Bytes(), true, nil - } - return nil, false, decodeErr -} diff --git a/x/ibc/applications/transfer/keeper/parse_test.go b/x/ibc/applications/transfer/keeper/parse_test.go index 5583f1a31..26b68c1a0 100644 --- a/x/ibc/applications/transfer/keeper/parse_test.go +++ b/x/ibc/applications/transfer/keeper/parse_test.go @@ -10,7 +10,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - _ "github.com/functionx/fx-core/v7/types" + fxtypes "github.com/functionx/fx-core/v7/types" "github.com/functionx/fx-core/v7/x/ibc/applications/transfer/types" ) @@ -74,7 +74,7 @@ func TestParseReceiveAndAmountByPacket(t *testing.T) { "error router - expect error, sender eip address is lowercase", types.FungibleTokenPacketData{Sender: "0x50194ffc34db0fb3de90a4ee75db66e868ad7820", Receiver: "0x50194ffc34DB0fb3De90A4eE75dB66e868AD7820", Amount: "1", Fee: "1", Router: "erc20"}, false, false, - fmt.Errorf("decoding bech32 failed: invalid character not part of charset: 98"), + fmt.Errorf("decoding bech32 failed: invalid character not part of charset: 98\nmismatch expected: 0x50194ffc34DB0fb3De90A4eE75dB66e868AD7820, got: 0x50194ffc34db0fb3de90a4ee75db66e868ad7820"), expect{address: []byte{}, amount: sdkmath.Int{}, fee: sdkmath.Int{}}, }, } @@ -171,13 +171,13 @@ func TestParsePacketAddress(t *testing.T) { {"normal fx address", sdk.AccAddress("abc").String(), true, false, nil, sdk.AccAddress("abc")}, {"normal eip address", "0x2652554541Eff910C154fB643d2b167D743434EA", true, true, nil, common.HexToAddress("0x2652554541Eff910C154fB643d2b167D743434EA").Bytes()}, - {"err bech32 address - kc74", "fx1yef9232palu3ps25ldjr62ck046rgd8292kc74", false, false, fmt.Errorf("decoding bech32 failed: invalid checksum (expected 92kc73 got 92kc74)"), []byte{}}, - {"err lowercase eip address", "0x2652554541eff910c154fb643d2b167d743434ea", false, false, fmt.Errorf("decoding bech32 failed: invalid checksum (expected j389ls got 3434ea)"), []byte{}}, + {"err bech32 address - kc74", "fx1yef9232palu3ps25ldjr62ck046rgd8292kc74", false, false, fmt.Errorf("decoding bech32 failed: invalid checksum (expected 92kc73 got 92kc74)\nwrong length"), []byte{}}, + {"err lowercase eip address", "0x2652554541eff910c154fb643d2b167d743434ea", false, false, fmt.Errorf("decoding bech32 failed: invalid checksum (expected j389ls got 3434ea)\nmismatch expected: 0x2652554541Eff910C154fB643d2b167D743434EA, got: 0x2652554541eff910c154fb643d2b167d743434ea"), []byte{}}, } for i, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - actualAddress, isEvmAddr, err := parsePacketAddress(tc.address) + actualAddress, isEvmAddr, err := fxtypes.ParseAddress(tc.address) if tc.expPass { require.EqualValues(t, tc.isEvmAddr, isEvmAddr) require.NoError(t, err, "valid test case %d failed: %v", i, err) diff --git a/x/staking/types/tx.pb.go b/x/staking/types/tx.pb.go index 628274a6a..ad83915f3 100644 --- a/x/staking/types/tx.pb.go +++ b/x/staking/types/tx.pb.go @@ -248,14 +248,14 @@ var fileDescriptor_1c6db236fc9c571c = []byte{ 0xd2, 0x4b, 0x2f, 0xa5, 0x7d, 0x11, 0x69, 0x7e, 0x5a, 0xb4, 0x05, 0x95, 0xbd, 0xcb, 0xf9, 0xbe, 0xef, 0x9c, 0xf3, 0x7d, 0x27, 0x09, 0xbc, 0x48, 0x0a, 0x62, 0x2c, 0x9d, 0x09, 0xc9, 0x49, 0x3e, 0x0c, 0x99, 0xa5, 0x43, 0x62, 0x0b, 0x9c, 0x6a, 0x65, 0x15, 0x7a, 0x98, 0x14, 0xb8, 0x21, 0x71, - 0x3e, 0x74, 0x7b, 0x5c, 0x29, 0x3e, 0x67, 0xa4, 0x22, 0xc3, 0x2c, 0x21, 0x54, 0x96, 0xb5, 0xd2, - 0xed, 0x45, 0xca, 0x2c, 0x94, 0x99, 0x56, 0x15, 0xa9, 0x8b, 0x9a, 0x0a, 0xbe, 0x03, 0x78, 0x36, + 0x3e, 0x74, 0x7b, 0x91, 0x32, 0x0b, 0x65, 0xa6, 0x15, 0x49, 0xea, 0xa2, 0x56, 0xba, 0x3d, 0xae, + 0x14, 0x9f, 0x33, 0x52, 0x55, 0x61, 0x96, 0x10, 0x2a, 0xcb, 0x9a, 0x0a, 0xbe, 0x03, 0x78, 0x36, 0x32, 0xfc, 0x9d, 0xa6, 0xd2, 0x8e, 0xb5, 0xc8, 0xc5, 0x9c, 0x71, 0x86, 0x5e, 0xc2, 0xb3, 0x9c, 0xce, 0x45, 0x4c, 0xad, 0xd2, 0x53, 0x1a, 0xc7, 0x9a, 0x19, 0xe3, 0x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x8a, 0x0b, 0xfb, 0x31, 0x0b, 0x71, 0xa4, 0x16, 0x24, 0xc9, 0x64, 0x64, 0x85, 0x92, 0x05, 0x49, 0x8a, 0x41, 0xa4, 0x34, 0x23, 0xbb, 0xdf, - 0xc3, 0x96, 0x29, 0x33, 0xe1, 0x49, 0x75, 0xec, 0xd7, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x48, - 0x74, 0x03, 0x05, 0x39, 0x03, 0x00, 0x00, + 0xc3, 0x96, 0x29, 0x33, 0xe1, 0x49, 0x75, 0xec, 0xd7, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x0b, + 0x9d, 0x59, 0x21, 0x39, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/tron/types/msg_validate.go b/x/tron/types/msg_validate.go index 7699cddcf..0d656a3d9 100644 --- a/x/tron/types/msg_validate.go +++ b/x/tron/types/msg_validate.go @@ -6,6 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" errortypes "github.com/cosmos/cosmos-sdk/types/errors" + fxtypes "github.com/functionx/fx-core/v7/types" crosschaintypes "github.com/functionx/fx-core/v7/x/crosschain/types" ) @@ -146,6 +147,34 @@ func (b TronMsgValidate) MsgSendToFxClaimValidate(m *crosschaintypes.MsgSendToFx return nil } +func (b TronMsgValidate) MsgBridgeCallClaimValidate(m *crosschaintypes.MsgBridgeCallClaim) (err error) { + if _, err = sdk.AccAddressFromBech32(m.BridgerAddress); err != nil { + return errortypes.ErrInvalidAddress.Wrapf("invalid bridger address: %s", err) + } + if m.DstChainId == "" { + return errortypes.ErrInvalidRequest.Wrap("empty dst chain id") + } + if err = ValidateTronAddress(m.Sender); err != nil { + return errortypes.ErrInvalidAddress.Wrapf("invalid sender address: %s", err) + } + if err = fxtypes.ValidateEthereumAddress(m.To); err != nil { + return errortypes.ErrInvalidAddress.Wrapf("invalid to contract: %s", err) + } + if _, _, err := fxtypes.ParseAddress(m.Receiver); err != nil { + return errortypes.ErrInvalidAddress.Wrapf("invalid receiver address: %s", err) + } + if m.Value.IsNil() || m.Value.IsNegative() { + return errortypes.ErrInvalidRequest.Wrap("invalid value") + } + if m.EventNonce == 0 { + return errortypes.ErrInvalidRequest.Wrap("zero event nonce") + } + if m.BlockHeight == 0 { + return errortypes.ErrInvalidRequest.Wrap("zero block height") + } + return nil +} + func (b TronMsgValidate) MsgSendToExternalValidate(m *crosschaintypes.MsgSendToExternal) (err error) { if _, err = sdk.AccAddressFromBech32(m.Sender); err != nil { return errortypes.ErrInvalidAddress.Wrapf("invalid sender address: %s", err)