diff --git a/api/band/tunnel/v1beta1/params.pulsar.go b/api/band/tunnel/v1beta1/params.pulsar.go index fda01cd06..00c45b6c9 100644 --- a/api/band/tunnel/v1beta1/params.pulsar.go +++ b/api/band/tunnel/v1beta1/params.pulsar.go @@ -127,6 +127,9 @@ var ( fd_Params_base_packet_fee protoreflect.FieldDescriptor fd_Params_router_ibc_channel protoreflect.FieldDescriptor fd_Params_router_integration_contract protoreflect.FieldDescriptor + fd_Params_axelar_ibc_channel protoreflect.FieldDescriptor + fd_Params_axelar_gmp_account protoreflect.FieldDescriptor + fd_Params_axelar_fee_recipient protoreflect.FieldDescriptor ) func init() { @@ -141,6 +144,9 @@ func init() { fd_Params_base_packet_fee = md_Params.Fields().ByName("base_packet_fee") fd_Params_router_ibc_channel = md_Params.Fields().ByName("router_ibc_channel") fd_Params_router_integration_contract = md_Params.Fields().ByName("router_integration_contract") + fd_Params_axelar_ibc_channel = md_Params.Fields().ByName("axelar_ibc_channel") + fd_Params_axelar_gmp_account = md_Params.Fields().ByName("axelar_gmp_account") + fd_Params_axelar_fee_recipient = md_Params.Fields().ByName("axelar_fee_recipient") } var _ protoreflect.Message = (*fastReflection_Params)(nil) @@ -262,6 +268,24 @@ func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, proto return } } + if x.AxelarIbcChannel != "" { + value := protoreflect.ValueOfString(x.AxelarIbcChannel) + if !f(fd_Params_axelar_ibc_channel, value) { + return + } + } + if x.AxelarGmpAccount != "" { + value := protoreflect.ValueOfString(x.AxelarGmpAccount) + if !f(fd_Params_axelar_gmp_account, value) { + return + } + } + if x.AxelarFeeRecipient != "" { + value := protoreflect.ValueOfString(x.AxelarFeeRecipient) + if !f(fd_Params_axelar_fee_recipient, value) { + return + } + } } // Has reports whether a field is populated. @@ -295,6 +319,12 @@ func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { return x.RouterIbcChannel != "" case "band.tunnel.v1beta1.Params.router_integration_contract": return x.RouterIntegrationContract != "" + case "band.tunnel.v1beta1.Params.axelar_ibc_channel": + return x.AxelarIbcChannel != "" + case "band.tunnel.v1beta1.Params.axelar_gmp_account": + return x.AxelarGmpAccount != "" + case "band.tunnel.v1beta1.Params.axelar_fee_recipient": + return x.AxelarFeeRecipient != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Params")) @@ -329,6 +359,12 @@ func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { x.RouterIbcChannel = "" case "band.tunnel.v1beta1.Params.router_integration_contract": x.RouterIntegrationContract = "" + case "band.tunnel.v1beta1.Params.axelar_ibc_channel": + x.AxelarIbcChannel = "" + case "band.tunnel.v1beta1.Params.axelar_gmp_account": + x.AxelarGmpAccount = "" + case "band.tunnel.v1beta1.Params.axelar_fee_recipient": + x.AxelarFeeRecipient = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Params")) @@ -378,6 +414,15 @@ func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) pro case "band.tunnel.v1beta1.Params.router_integration_contract": value := x.RouterIntegrationContract return protoreflect.ValueOfString(value) + case "band.tunnel.v1beta1.Params.axelar_ibc_channel": + value := x.AxelarIbcChannel + return protoreflect.ValueOfString(value) + case "band.tunnel.v1beta1.Params.axelar_gmp_account": + value := x.AxelarGmpAccount + return protoreflect.ValueOfString(value) + case "band.tunnel.v1beta1.Params.axelar_fee_recipient": + value := x.AxelarFeeRecipient + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Params")) @@ -420,6 +465,12 @@ func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value proto x.RouterIbcChannel = value.Interface().(string) case "band.tunnel.v1beta1.Params.router_integration_contract": x.RouterIntegrationContract = value.Interface().(string) + case "band.tunnel.v1beta1.Params.axelar_ibc_channel": + x.AxelarIbcChannel = value.Interface().(string) + case "band.tunnel.v1beta1.Params.axelar_gmp_account": + x.AxelarGmpAccount = value.Interface().(string) + case "band.tunnel.v1beta1.Params.axelar_fee_recipient": + x.AxelarFeeRecipient = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Params")) @@ -466,6 +517,12 @@ func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protore panic(fmt.Errorf("field router_ibc_channel of message band.tunnel.v1beta1.Params is not mutable")) case "band.tunnel.v1beta1.Params.router_integration_contract": panic(fmt.Errorf("field router_integration_contract of message band.tunnel.v1beta1.Params is not mutable")) + case "band.tunnel.v1beta1.Params.axelar_ibc_channel": + panic(fmt.Errorf("field axelar_ibc_channel of message band.tunnel.v1beta1.Params is not mutable")) + case "band.tunnel.v1beta1.Params.axelar_gmp_account": + panic(fmt.Errorf("field axelar_gmp_account of message band.tunnel.v1beta1.Params is not mutable")) + case "band.tunnel.v1beta1.Params.axelar_fee_recipient": + panic(fmt.Errorf("field axelar_fee_recipient of message band.tunnel.v1beta1.Params is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Params")) @@ -499,6 +556,12 @@ func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protor return protoreflect.ValueOfString("") case "band.tunnel.v1beta1.Params.router_integration_contract": return protoreflect.ValueOfString("") + case "band.tunnel.v1beta1.Params.axelar_ibc_channel": + return protoreflect.ValueOfString("") + case "band.tunnel.v1beta1.Params.axelar_gmp_account": + return protoreflect.ValueOfString("") + case "band.tunnel.v1beta1.Params.axelar_fee_recipient": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Params")) @@ -603,6 +666,18 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + l = len(x.AxelarIbcChannel) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.AxelarGmpAccount) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.AxelarFeeRecipient) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -632,6 +707,27 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.AxelarFeeRecipient) > 0 { + i -= len(x.AxelarFeeRecipient) + copy(dAtA[i:], x.AxelarFeeRecipient) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AxelarFeeRecipient))) + i-- + dAtA[i] = 0x62 + } + if len(x.AxelarGmpAccount) > 0 { + i -= len(x.AxelarGmpAccount) + copy(dAtA[i:], x.AxelarGmpAccount) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AxelarGmpAccount))) + i-- + dAtA[i] = 0x5a + } + if len(x.AxelarIbcChannel) > 0 { + i -= len(x.AxelarIbcChannel) + copy(dAtA[i:], x.AxelarIbcChannel) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AxelarIbcChannel))) + i-- + dAtA[i] = 0x52 + } if len(x.RouterIntegrationContract) > 0 { i -= len(x.RouterIntegrationContract) copy(dAtA[i:], x.RouterIntegrationContract) @@ -979,6 +1075,102 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { } x.RouterIntegrationContract = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 10: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AxelarIbcChannel", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.AxelarIbcChannel = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AxelarGmpAccount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.AxelarGmpAccount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 12: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AxelarFeeRecipient", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.AxelarFeeRecipient = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1052,6 +1244,12 @@ type Params struct { // router_integration_contract specifies the address of the Router integration contract on the Router chain // that the tunnel module will interact with. RouterIntegrationContract string `protobuf:"bytes,9,opt,name=router_integration_contract,json=routerIntegrationContract,proto3" json:"router_integration_contract,omitempty"` + // axelar_ibc_channel specifies the IBC channel used by the tunnel to communicate with the axelar chain. + AxelarIbcChannel string `protobuf:"bytes,10,opt,name=axelar_ibc_channel,json=axelarIbcChannel,proto3" json:"axelar_ibc_channel,omitempty"` + // axelar_gmp_account is the account address on axelar chain that processes and verifies Axelar GMP transactions. + AxelarGmpAccount string `protobuf:"bytes,11,opt,name=axelar_gmp_account,json=axelarGmpAccount,proto3" json:"axelar_gmp_account,omitempty"` + // axelar_fee_recipient is the account address on axelar chain that receive fee from tunnel. + AxelarFeeRecipient string `protobuf:"bytes,12,opt,name=axelar_fee_recipient,json=axelarFeeRecipient,proto3" json:"axelar_fee_recipient,omitempty"` } func (x *Params) Reset() { @@ -1137,6 +1335,27 @@ func (x *Params) GetRouterIntegrationContract() string { return "" } +func (x *Params) GetAxelarIbcChannel() string { + if x != nil { + return x.AxelarIbcChannel + } + return "" +} + +func (x *Params) GetAxelarGmpAccount() string { + if x != nil { + return x.AxelarGmpAccount + } + return "" +} + +func (x *Params) GetAxelarFeeRecipient() string { + if x != nil { + return x.AxelarFeeRecipient + } + return "" +} + var File_band_tunnel_v1beta1_params_proto protoreflect.FileDescriptor var file_band_tunnel_v1beta1_params_proto_rawDesc = []byte{ @@ -1146,7 +1365,7 @@ var file_band_tunnel_v1beta1_params_proto_rawDesc = []byte{ 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xde, 0x04, + 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x98, 0x06, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x6c, 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, @@ -1184,22 +1403,33 @@ var file_band_tunnel_v1beta1_params_proto_rawDesc = []byte{ 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x19, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x42, 0xdc, - 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0b, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xa2, 0x02, 0x03, 0x42, 0x54, 0x58, 0xaa, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x42, 0x0a, 0x12, 0x61, 0x78, 0x65, 0x6c, + 0x61, 0x72, 0x5f, 0x69, 0x62, 0x63, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xe2, 0xde, 0x1f, 0x10, 0x41, 0x78, 0x65, 0x6c, 0x61, 0x72, + 0x49, 0x42, 0x43, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x10, 0x61, 0x78, 0x65, 0x6c, + 0x61, 0x72, 0x49, 0x62, 0x63, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x42, 0x0a, 0x12, + 0x61, 0x78, 0x65, 0x6c, 0x61, 0x72, 0x5f, 0x67, 0x6d, 0x70, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xe2, 0xde, 0x1f, 0x10, 0x41, 0x78, + 0x65, 0x6c, 0x61, 0x72, 0x47, 0x4d, 0x50, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x10, + 0x61, 0x78, 0x65, 0x6c, 0x61, 0x72, 0x47, 0x6d, 0x70, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x30, 0x0a, 0x14, 0x61, 0x78, 0x65, 0x6c, 0x61, 0x72, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x72, + 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, + 0x61, 0x78, 0x65, 0x6c, 0x61, 0x72, 0x46, 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, + 0x6e, 0x74, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x42, 0xdc, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, + 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x42, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x54, + 0x58, 0xaa, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x15, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/band/tunnel/v1beta1/route.pulsar.go b/api/band/tunnel/v1beta1/route.pulsar.go index fa9cae4e9..c7bcfb5a3 100644 --- a/api/band/tunnel/v1beta1/route.pulsar.go +++ b/api/band/tunnel/v1beta1/route.pulsar.go @@ -2,6 +2,7 @@ package tunnelv1beta1 import ( + v1beta11 "cosmossdk.io/api/cosmos/base/v1beta1" fmt "fmt" v1beta1 "github.com/bandprotocol/chain/v3/api/band/feeds/v1beta1" _ "github.com/cosmos/cosmos-proto" @@ -3758,7 +3759,7 @@ func (x *IBCHookMemo_Payload) ProtoReflect() protoreflect.Message { } func (x *IBCHookMemo_Payload) slowProtoReflect() protoreflect.Message { - mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[11] + mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4255,7 +4256,7 @@ func (x *IBCHookMemo_Payload_Msg) ProtoReflect() protoreflect.Message { } func (x *IBCHookMemo_Payload_Msg) slowProtoReflect() protoreflect.Message { - mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[12] + mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4690,7 +4691,7 @@ func (x *IBCHookMemo_Payload_Msg_ReceivePacket) ProtoReflect() protoreflect.Mess } func (x *IBCHookMemo_Payload_Msg_ReceivePacket) slowProtoReflect() protoreflect.Message { - mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[13] + mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6498,7 +6499,7 @@ func (x *RouterMemo_Payload) ProtoReflect() protoreflect.Message { } func (x *RouterMemo_Payload) slowProtoReflect() protoreflect.Message { - mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[14] + mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6995,7 +6996,7 @@ func (x *RouterMemo_Payload_Msg) ProtoReflect() protoreflect.Message { } func (x *RouterMemo_Payload_Msg) slowProtoReflect() protoreflect.Message { - mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[15] + mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7436,7 +7437,7 @@ func (x *RouterMemo_Payload_Msg_ReceiveBandDataArgs) ProtoReflect() protoreflect } func (x *RouterMemo_Payload_Msg_ReceiveBandDataArgs) slowProtoReflect() protoreflect.Message { - mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[16] + mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8006,161 +8007,1128 @@ func (x *fastReflection_RouterMemo_Payload_Msg_ReceiveBandDataArgs) ProtoMethods } } -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: band/tunnel/v1beta1/route.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +var ( + md_AxelarRoute protoreflect.MessageDescriptor + fd_AxelarRoute_destination_chain_id protoreflect.FieldDescriptor + fd_AxelarRoute_destination_contract_address protoreflect.FieldDescriptor + fd_AxelarRoute_fee protoreflect.FieldDescriptor ) -// TSSRoute represents a route for TSS packets and implements the RouteI interface. -type TSSRoute struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func init() { + file_band_tunnel_v1beta1_route_proto_init() + md_AxelarRoute = File_band_tunnel_v1beta1_route_proto.Messages().ByName("AxelarRoute") + fd_AxelarRoute_destination_chain_id = md_AxelarRoute.Fields().ByName("destination_chain_id") + fd_AxelarRoute_destination_contract_address = md_AxelarRoute.Fields().ByName("destination_contract_address") + fd_AxelarRoute_fee = md_AxelarRoute.Fields().ByName("fee") +} - // destination_chain_id is the destination chain ID - DestinationChainId string `protobuf:"bytes,1,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` - // destination_contract_address is the destination contract address - DestinationContractAddress string `protobuf:"bytes,2,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` - // encoder is the mode of encoding packet data. - Encoder v1beta1.Encoder `protobuf:"varint,3,opt,name=encoder,proto3,enum=band.feeds.v1beta1.Encoder" json:"encoder,omitempty"` +var _ protoreflect.Message = (*fastReflection_AxelarRoute)(nil) + +type fastReflection_AxelarRoute AxelarRoute + +func (x *AxelarRoute) ProtoReflect() protoreflect.Message { + return (*fastReflection_AxelarRoute)(x) } -func (x *TSSRoute) Reset() { - *x = TSSRoute{} - if protoimpl.UnsafeEnabled { - mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[0] +func (x *AxelarRoute) slowProtoReflect() protoreflect.Message { + mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } + return mi.MessageOf(x) } -func (x *TSSRoute) String() string { - return protoimpl.X.MessageStringOf(x) -} +var _fastReflection_AxelarRoute_messageType fastReflection_AxelarRoute_messageType +var _ protoreflect.MessageType = fastReflection_AxelarRoute_messageType{} -func (*TSSRoute) ProtoMessage() {} +type fastReflection_AxelarRoute_messageType struct{} -// Deprecated: Use TSSRoute.ProtoReflect.Descriptor instead. -func (*TSSRoute) Descriptor() ([]byte, []int) { - return file_band_tunnel_v1beta1_route_proto_rawDescGZIP(), []int{0} +func (x fastReflection_AxelarRoute_messageType) Zero() protoreflect.Message { + return (*fastReflection_AxelarRoute)(nil) } - -func (x *TSSRoute) GetDestinationChainId() string { - if x != nil { - return x.DestinationChainId - } - return "" +func (x fastReflection_AxelarRoute_messageType) New() protoreflect.Message { + return new(fastReflection_AxelarRoute) } - -func (x *TSSRoute) GetDestinationContractAddress() string { - if x != nil { - return x.DestinationContractAddress - } - return "" +func (x fastReflection_AxelarRoute_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_AxelarRoute } -func (x *TSSRoute) GetEncoder() v1beta1.Encoder { - if x != nil { - return x.Encoder - } - return v1beta1.Encoder(0) +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_AxelarRoute) Descriptor() protoreflect.MessageDescriptor { + return md_AxelarRoute } -// TSSPacketReceipt represents a receipt for a TSS packet and implements the PacketReceiptI interface. -type TSSPacketReceipt struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // signing_id is the signing ID - SigningId uint64 `protobuf:"varint,1,opt,name=signing_id,json=signingId,proto3" json:"signing_id,omitempty"` +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_AxelarRoute) Type() protoreflect.MessageType { + return _fastReflection_AxelarRoute_messageType } -func (x *TSSPacketReceipt) Reset() { - *x = TSSPacketReceipt{} - if protoimpl.UnsafeEnabled { - mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_AxelarRoute) New() protoreflect.Message { + return new(fastReflection_AxelarRoute) } -func (x *TSSPacketReceipt) String() string { - return protoimpl.X.MessageStringOf(x) +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_AxelarRoute) Interface() protoreflect.ProtoMessage { + return (*AxelarRoute)(x) } -func (*TSSPacketReceipt) ProtoMessage() {} - -// Deprecated: Use TSSPacketReceipt.ProtoReflect.Descriptor instead. -func (*TSSPacketReceipt) Descriptor() ([]byte, []int) { - return file_band_tunnel_v1beta1_route_proto_rawDescGZIP(), []int{1} +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_AxelarRoute) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.DestinationChainId != "" { + value := protoreflect.ValueOfString(x.DestinationChainId) + if !f(fd_AxelarRoute_destination_chain_id, value) { + return + } + } + if x.DestinationContractAddress != "" { + value := protoreflect.ValueOfString(x.DestinationContractAddress) + if !f(fd_AxelarRoute_destination_contract_address, value) { + return + } + } + if x.Fee != nil { + value := protoreflect.ValueOfMessage(x.Fee.ProtoReflect()) + if !f(fd_AxelarRoute_fee, value) { + return + } + } } -func (x *TSSPacketReceipt) GetSigningId() uint64 { - if x != nil { - return x.SigningId +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_AxelarRoute) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "band.tunnel.v1beta1.AxelarRoute.destination_chain_id": + return x.DestinationChainId != "" + case "band.tunnel.v1beta1.AxelarRoute.destination_contract_address": + return x.DestinationContractAddress != "" + case "band.tunnel.v1beta1.AxelarRoute.fee": + return x.Fee != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.AxelarRoute")) + } + panic(fmt.Errorf("message band.tunnel.v1beta1.AxelarRoute does not contain field %s", fd.FullName())) } - return 0 } -// IBCRoute represents a route for IBC packets and implements the RouteI interface. -type IBCRoute struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // channel_id is the IBC channel ID - ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_AxelarRoute) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "band.tunnel.v1beta1.AxelarRoute.destination_chain_id": + x.DestinationChainId = "" + case "band.tunnel.v1beta1.AxelarRoute.destination_contract_address": + x.DestinationContractAddress = "" + case "band.tunnel.v1beta1.AxelarRoute.fee": + x.Fee = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.AxelarRoute")) + } + panic(fmt.Errorf("message band.tunnel.v1beta1.AxelarRoute does not contain field %s", fd.FullName())) + } } -func (x *IBCRoute) Reset() { - *x = IBCRoute{} - if protoimpl.UnsafeEnabled { - mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_AxelarRoute) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "band.tunnel.v1beta1.AxelarRoute.destination_chain_id": + value := x.DestinationChainId + return protoreflect.ValueOfString(value) + case "band.tunnel.v1beta1.AxelarRoute.destination_contract_address": + value := x.DestinationContractAddress + return protoreflect.ValueOfString(value) + case "band.tunnel.v1beta1.AxelarRoute.fee": + value := x.Fee + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.AxelarRoute")) + } + panic(fmt.Errorf("message band.tunnel.v1beta1.AxelarRoute does not contain field %s", descriptor.FullName())) } } -func (x *IBCRoute) String() string { - return protoimpl.X.MessageStringOf(x) +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_AxelarRoute) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "band.tunnel.v1beta1.AxelarRoute.destination_chain_id": + x.DestinationChainId = value.Interface().(string) + case "band.tunnel.v1beta1.AxelarRoute.destination_contract_address": + x.DestinationContractAddress = value.Interface().(string) + case "band.tunnel.v1beta1.AxelarRoute.fee": + x.Fee = value.Message().Interface().(*v1beta11.Coin) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.AxelarRoute")) + } + panic(fmt.Errorf("message band.tunnel.v1beta1.AxelarRoute does not contain field %s", fd.FullName())) + } } -func (*IBCRoute) ProtoMessage() {} - -// Deprecated: Use IBCRoute.ProtoReflect.Descriptor instead. -func (*IBCRoute) Descriptor() ([]byte, []int) { - return file_band_tunnel_v1beta1_route_proto_rawDescGZIP(), []int{2} +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_AxelarRoute) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "band.tunnel.v1beta1.AxelarRoute.fee": + if x.Fee == nil { + x.Fee = new(v1beta11.Coin) + } + return protoreflect.ValueOfMessage(x.Fee.ProtoReflect()) + case "band.tunnel.v1beta1.AxelarRoute.destination_chain_id": + panic(fmt.Errorf("field destination_chain_id of message band.tunnel.v1beta1.AxelarRoute is not mutable")) + case "band.tunnel.v1beta1.AxelarRoute.destination_contract_address": + panic(fmt.Errorf("field destination_contract_address of message band.tunnel.v1beta1.AxelarRoute is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.AxelarRoute")) + } + panic(fmt.Errorf("message band.tunnel.v1beta1.AxelarRoute does not contain field %s", fd.FullName())) + } } -func (x *IBCRoute) GetChannelId() string { - if x != nil { - return x.ChannelId +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_AxelarRoute) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "band.tunnel.v1beta1.AxelarRoute.destination_chain_id": + return protoreflect.ValueOfString("") + case "band.tunnel.v1beta1.AxelarRoute.destination_contract_address": + return protoreflect.ValueOfString("") + case "band.tunnel.v1beta1.AxelarRoute.fee": + m := new(v1beta11.Coin) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.AxelarRoute")) + } + panic(fmt.Errorf("message band.tunnel.v1beta1.AxelarRoute does not contain field %s", fd.FullName())) } - return "" } -// IBCPacketReceipt represents a receipt for a IBC packet and implements the PacketReceiptI interface. -type IBCPacketReceipt struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // sequence is representing the sequence of the IBC packet. - Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"` +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_AxelarRoute) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.AxelarRoute", d.FullName())) + } + panic("unreachable") } -func (x *IBCPacketReceipt) Reset() { - *x = IBCPacketReceipt{} - if protoimpl.UnsafeEnabled { +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_AxelarRoute) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_AxelarRoute) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_AxelarRoute) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_AxelarRoute) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*AxelarRoute) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.DestinationChainId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.DestinationContractAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Fee != nil { + l = options.Size(x.Fee) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*AxelarRoute) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Fee != nil { + encoded, err := options.Marshal(x.Fee) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if len(x.DestinationContractAddress) > 0 { + i -= len(x.DestinationContractAddress) + copy(dAtA[i:], x.DestinationContractAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestinationContractAddress))) + i-- + dAtA[i] = 0x12 + } + if len(x.DestinationChainId) > 0 { + i -= len(x.DestinationChainId) + copy(dAtA[i:], x.DestinationChainId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestinationChainId))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*AxelarRoute) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AxelarRoute: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AxelarRoute: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DestinationChainId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.DestinationChainId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DestinationContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.DestinationContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Fee == nil { + x.Fee = &v1beta11.Coin{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Fee); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_AxelarPacketReceipt protoreflect.MessageDescriptor + fd_AxelarPacketReceipt_sequence protoreflect.FieldDescriptor +) + +func init() { + file_band_tunnel_v1beta1_route_proto_init() + md_AxelarPacketReceipt = File_band_tunnel_v1beta1_route_proto.Messages().ByName("AxelarPacketReceipt") + fd_AxelarPacketReceipt_sequence = md_AxelarPacketReceipt.Fields().ByName("sequence") +} + +var _ protoreflect.Message = (*fastReflection_AxelarPacketReceipt)(nil) + +type fastReflection_AxelarPacketReceipt AxelarPacketReceipt + +func (x *AxelarPacketReceipt) ProtoReflect() protoreflect.Message { + return (*fastReflection_AxelarPacketReceipt)(x) +} + +func (x *AxelarPacketReceipt) slowProtoReflect() protoreflect.Message { + mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_AxelarPacketReceipt_messageType fastReflection_AxelarPacketReceipt_messageType +var _ protoreflect.MessageType = fastReflection_AxelarPacketReceipt_messageType{} + +type fastReflection_AxelarPacketReceipt_messageType struct{} + +func (x fastReflection_AxelarPacketReceipt_messageType) Zero() protoreflect.Message { + return (*fastReflection_AxelarPacketReceipt)(nil) +} +func (x fastReflection_AxelarPacketReceipt_messageType) New() protoreflect.Message { + return new(fastReflection_AxelarPacketReceipt) +} +func (x fastReflection_AxelarPacketReceipt_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_AxelarPacketReceipt +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_AxelarPacketReceipt) Descriptor() protoreflect.MessageDescriptor { + return md_AxelarPacketReceipt +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_AxelarPacketReceipt) Type() protoreflect.MessageType { + return _fastReflection_AxelarPacketReceipt_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_AxelarPacketReceipt) New() protoreflect.Message { + return new(fastReflection_AxelarPacketReceipt) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_AxelarPacketReceipt) Interface() protoreflect.ProtoMessage { + return (*AxelarPacketReceipt)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_AxelarPacketReceipt) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Sequence != uint64(0) { + value := protoreflect.ValueOfUint64(x.Sequence) + if !f(fd_AxelarPacketReceipt_sequence, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_AxelarPacketReceipt) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "band.tunnel.v1beta1.AxelarPacketReceipt.sequence": + return x.Sequence != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.AxelarPacketReceipt")) + } + panic(fmt.Errorf("message band.tunnel.v1beta1.AxelarPacketReceipt does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_AxelarPacketReceipt) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "band.tunnel.v1beta1.AxelarPacketReceipt.sequence": + x.Sequence = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.AxelarPacketReceipt")) + } + panic(fmt.Errorf("message band.tunnel.v1beta1.AxelarPacketReceipt does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_AxelarPacketReceipt) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "band.tunnel.v1beta1.AxelarPacketReceipt.sequence": + value := x.Sequence + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.AxelarPacketReceipt")) + } + panic(fmt.Errorf("message band.tunnel.v1beta1.AxelarPacketReceipt does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_AxelarPacketReceipt) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "band.tunnel.v1beta1.AxelarPacketReceipt.sequence": + x.Sequence = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.AxelarPacketReceipt")) + } + panic(fmt.Errorf("message band.tunnel.v1beta1.AxelarPacketReceipt does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_AxelarPacketReceipt) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "band.tunnel.v1beta1.AxelarPacketReceipt.sequence": + panic(fmt.Errorf("field sequence of message band.tunnel.v1beta1.AxelarPacketReceipt is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.AxelarPacketReceipt")) + } + panic(fmt.Errorf("message band.tunnel.v1beta1.AxelarPacketReceipt does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_AxelarPacketReceipt) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "band.tunnel.v1beta1.AxelarPacketReceipt.sequence": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.AxelarPacketReceipt")) + } + panic(fmt.Errorf("message band.tunnel.v1beta1.AxelarPacketReceipt does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_AxelarPacketReceipt) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.AxelarPacketReceipt", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_AxelarPacketReceipt) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_AxelarPacketReceipt) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_AxelarPacketReceipt) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_AxelarPacketReceipt) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*AxelarPacketReceipt) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Sequence != 0 { + n += 1 + runtime.Sov(uint64(x.Sequence)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*AxelarPacketReceipt) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Sequence != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Sequence)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*AxelarPacketReceipt) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AxelarPacketReceipt: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AxelarPacketReceipt: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + x.Sequence = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: band/tunnel/v1beta1/route.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// TSSRoute represents a route for TSS packets and implements the RouteI interface. +type TSSRoute struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // destination_chain_id is the destination chain ID + DestinationChainId string `protobuf:"bytes,1,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` + // destination_contract_address is the destination contract address + DestinationContractAddress string `protobuf:"bytes,2,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` + // encoder is the mode of encoding packet data. + Encoder v1beta1.Encoder `protobuf:"varint,3,opt,name=encoder,proto3,enum=band.feeds.v1beta1.Encoder" json:"encoder,omitempty"` +} + +func (x *TSSRoute) Reset() { + *x = TSSRoute{} + if protoimpl.UnsafeEnabled { + mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TSSRoute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TSSRoute) ProtoMessage() {} + +// Deprecated: Use TSSRoute.ProtoReflect.Descriptor instead. +func (*TSSRoute) Descriptor() ([]byte, []int) { + return file_band_tunnel_v1beta1_route_proto_rawDescGZIP(), []int{0} +} + +func (x *TSSRoute) GetDestinationChainId() string { + if x != nil { + return x.DestinationChainId + } + return "" +} + +func (x *TSSRoute) GetDestinationContractAddress() string { + if x != nil { + return x.DestinationContractAddress + } + return "" +} + +func (x *TSSRoute) GetEncoder() v1beta1.Encoder { + if x != nil { + return x.Encoder + } + return v1beta1.Encoder(0) +} + +// TSSPacketReceipt represents a receipt for a TSS packet and implements the PacketReceiptI interface. +type TSSPacketReceipt struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // signing_id is the signing ID + SigningId uint64 `protobuf:"varint,1,opt,name=signing_id,json=signingId,proto3" json:"signing_id,omitempty"` +} + +func (x *TSSPacketReceipt) Reset() { + *x = TSSPacketReceipt{} + if protoimpl.UnsafeEnabled { + mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TSSPacketReceipt) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TSSPacketReceipt) ProtoMessage() {} + +// Deprecated: Use TSSPacketReceipt.ProtoReflect.Descriptor instead. +func (*TSSPacketReceipt) Descriptor() ([]byte, []int) { + return file_band_tunnel_v1beta1_route_proto_rawDescGZIP(), []int{1} +} + +func (x *TSSPacketReceipt) GetSigningId() uint64 { + if x != nil { + return x.SigningId + } + return 0 +} + +// IBCRoute represents a route for IBC packets and implements the RouteI interface. +type IBCRoute struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // channel_id is the IBC channel ID + ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` +} + +func (x *IBCRoute) Reset() { + *x = IBCRoute{} + if protoimpl.UnsafeEnabled { + mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IBCRoute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IBCRoute) ProtoMessage() {} + +// Deprecated: Use IBCRoute.ProtoReflect.Descriptor instead. +func (*IBCRoute) Descriptor() ([]byte, []int) { + return file_band_tunnel_v1beta1_route_proto_rawDescGZIP(), []int{2} +} + +func (x *IBCRoute) GetChannelId() string { + if x != nil { + return x.ChannelId + } + return "" +} + +// IBCPacketReceipt represents a receipt for a IBC packet and implements the PacketReceiptI interface. +type IBCPacketReceipt struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // sequence is representing the sequence of the IBC packet. + Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"` +} + +func (x *IBCPacketReceipt) Reset() { + *x = IBCPacketReceipt{} + if protoimpl.UnsafeEnabled { mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) @@ -8498,6 +9466,98 @@ func (x *RouterMemo) GetWasm() *RouterMemo_Payload { return nil } +// AxelarRoute represents a route for Axelar packets and implements the RouteI interface. +type AxelarRoute struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // destination_chain_id is the destination chain ID + DestinationChainId string `protobuf:"bytes,1,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` + // destination_contract_address is the destination contract address + DestinationContractAddress string `protobuf:"bytes,2,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` + // fee is the fee for each packet in the Axelar network. + Fee *v1beta11.Coin `protobuf:"bytes,3,opt,name=fee,proto3" json:"fee,omitempty"` +} + +func (x *AxelarRoute) Reset() { + *x = AxelarRoute{} + if protoimpl.UnsafeEnabled { + mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AxelarRoute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AxelarRoute) ProtoMessage() {} + +// Deprecated: Use AxelarRoute.ProtoReflect.Descriptor instead. +func (*AxelarRoute) Descriptor() ([]byte, []int) { + return file_band_tunnel_v1beta1_route_proto_rawDescGZIP(), []int{11} +} + +func (x *AxelarRoute) GetDestinationChainId() string { + if x != nil { + return x.DestinationChainId + } + return "" +} + +func (x *AxelarRoute) GetDestinationContractAddress() string { + if x != nil { + return x.DestinationContractAddress + } + return "" +} + +func (x *AxelarRoute) GetFee() *v1beta11.Coin { + if x != nil { + return x.Fee + } + return nil +} + +// AxelarPacketReceipt represents a receipt for a Axelar packet and implements the PacketReceiptI interface. +type AxelarPacketReceipt struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // sequence is representing the sequence of the Axelar packet. + Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"` +} + +func (x *AxelarPacketReceipt) Reset() { + *x = AxelarPacketReceipt{} + if protoimpl.UnsafeEnabled { + mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AxelarPacketReceipt) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AxelarPacketReceipt) ProtoMessage() {} + +// Deprecated: Use AxelarPacketReceipt.ProtoReflect.Descriptor instead. +func (*AxelarPacketReceipt) Descriptor() ([]byte, []int) { + return file_band_tunnel_v1beta1_route_proto_rawDescGZIP(), []int{12} +} + +func (x *AxelarPacketReceipt) GetSequence() uint64 { + if x != nil { + return x.Sequence + } + return 0 +} + // Payload defines target contract and detail of function call (msg). type IBCHookMemo_Payload struct { state protoimpl.MessageState @@ -8513,7 +9573,7 @@ type IBCHookMemo_Payload struct { func (x *IBCHookMemo_Payload) Reset() { *x = IBCHookMemo_Payload{} if protoimpl.UnsafeEnabled { - mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[11] + mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8557,7 +9617,7 @@ type IBCHookMemo_Payload_Msg struct { func (x *IBCHookMemo_Payload_Msg) Reset() { *x = IBCHookMemo_Payload_Msg{} if protoimpl.UnsafeEnabled { - mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[12] + mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8594,7 +9654,7 @@ type IBCHookMemo_Payload_Msg_ReceivePacket struct { func (x *IBCHookMemo_Payload_Msg_ReceivePacket) Reset() { *x = IBCHookMemo_Payload_Msg_ReceivePacket{} if protoimpl.UnsafeEnabled { - mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[13] + mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8633,7 +9693,7 @@ type RouterMemo_Payload struct { func (x *RouterMemo_Payload) Reset() { *x = RouterMemo_Payload{} if protoimpl.UnsafeEnabled { - mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[14] + mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8677,7 +9737,7 @@ type RouterMemo_Payload_Msg struct { func (x *RouterMemo_Payload_Msg) Reset() { *x = RouterMemo_Payload_Msg{} if protoimpl.UnsafeEnabled { - mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[15] + mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8720,7 +9780,7 @@ type RouterMemo_Payload_Msg_ReceiveBandDataArgs struct { func (x *RouterMemo_Payload_Msg_ReceiveBandDataArgs) Reset() { *x = RouterMemo_Payload_Msg_ReceiveBandDataArgs{} if protoimpl.UnsafeEnabled { - mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[16] + mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8773,6 +9833,8 @@ var file_band_tunnel_v1beta1_route_proto_rawDesc = []byte{ 0x6f, 0x12, 0x13, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x6e, 0x63, 0x6f, @@ -8909,22 +9971,40 @@ var file_band_tunnel_v1beta1_route_proto_rawDesc = []byte{ 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0xdf, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, - 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x42, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, - 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x54, 0x58, 0xaa, - 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x42, 0x61, - 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, - 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0xe5, 0x01, 0x0a, 0x0b, 0x41, 0x78, 0x65, 0x6c, + 0x61, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x55, 0x0a, 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x23, 0xe2, 0xde, 0x1f, 0x12, 0x44, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0xfa, 0xde, 0x1f, + 0x09, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x40, + 0x0a, 0x1c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x31, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x03, + 0x66, 0x65, 0x65, 0x3a, 0x0a, 0xca, 0xb4, 0x2d, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x22, + 0x45, 0x0a, 0x13, 0x41, 0x78, 0x65, 0x6c, 0x61, 0x72, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, + 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, + 0x63, 0x65, 0x3a, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, + 0x63, 0x65, 0x69, 0x70, 0x74, 0x49, 0x42, 0xdf, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x62, + 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x42, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, + 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, + 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x54, 0x58, 0xaa, 0x02, + 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x42, 0x61, 0x6e, + 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x42, + 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -8939,7 +10019,7 @@ func file_band_tunnel_v1beta1_route_proto_rawDescGZIP() []byte { return file_band_tunnel_v1beta1_route_proto_rawDescData } -var file_band_tunnel_v1beta1_route_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_band_tunnel_v1beta1_route_proto_msgTypes = make([]protoimpl.MessageInfo, 19) var file_band_tunnel_v1beta1_route_proto_goTypes = []interface{}{ (*TSSRoute)(nil), // 0: band.tunnel.v1beta1.TSSRoute (*TSSPacketReceipt)(nil), // 1: band.tunnel.v1beta1.TSSPacketReceipt @@ -8952,30 +10032,34 @@ var file_band_tunnel_v1beta1_route_proto_goTypes = []interface{}{ (*RouterRoute)(nil), // 8: band.tunnel.v1beta1.RouterRoute (*RouterPacketReceipt)(nil), // 9: band.tunnel.v1beta1.RouterPacketReceipt (*RouterMemo)(nil), // 10: band.tunnel.v1beta1.RouterMemo - (*IBCHookMemo_Payload)(nil), // 11: band.tunnel.v1beta1.IBCHookMemo.Payload - (*IBCHookMemo_Payload_Msg)(nil), // 12: band.tunnel.v1beta1.IBCHookMemo.Payload.Msg - (*IBCHookMemo_Payload_Msg_ReceivePacket)(nil), // 13: band.tunnel.v1beta1.IBCHookMemo.Payload.Msg.ReceivePacket - (*RouterMemo_Payload)(nil), // 14: band.tunnel.v1beta1.RouterMemo.Payload - (*RouterMemo_Payload_Msg)(nil), // 15: band.tunnel.v1beta1.RouterMemo.Payload.Msg - (*RouterMemo_Payload_Msg_ReceiveBandDataArgs)(nil), // 16: band.tunnel.v1beta1.RouterMemo.Payload.Msg.ReceiveBandDataArgs - (v1beta1.Encoder)(0), // 17: band.feeds.v1beta1.Encoder - (*v1beta1.Price)(nil), // 18: band.feeds.v1beta1.Price + (*AxelarRoute)(nil), // 11: band.tunnel.v1beta1.AxelarRoute + (*AxelarPacketReceipt)(nil), // 12: band.tunnel.v1beta1.AxelarPacketReceipt + (*IBCHookMemo_Payload)(nil), // 13: band.tunnel.v1beta1.IBCHookMemo.Payload + (*IBCHookMemo_Payload_Msg)(nil), // 14: band.tunnel.v1beta1.IBCHookMemo.Payload.Msg + (*IBCHookMemo_Payload_Msg_ReceivePacket)(nil), // 15: band.tunnel.v1beta1.IBCHookMemo.Payload.Msg.ReceivePacket + (*RouterMemo_Payload)(nil), // 16: band.tunnel.v1beta1.RouterMemo.Payload + (*RouterMemo_Payload_Msg)(nil), // 17: band.tunnel.v1beta1.RouterMemo.Payload.Msg + (*RouterMemo_Payload_Msg_ReceiveBandDataArgs)(nil), // 18: band.tunnel.v1beta1.RouterMemo.Payload.Msg.ReceiveBandDataArgs + (v1beta1.Encoder)(0), // 19: band.feeds.v1beta1.Encoder + (*v1beta1.Price)(nil), // 20: band.feeds.v1beta1.Price + (*v1beta11.Coin)(nil), // 21: cosmos.base.v1beta1.Coin } var file_band_tunnel_v1beta1_route_proto_depIdxs = []int32{ - 17, // 0: band.tunnel.v1beta1.TSSRoute.encoder:type_name -> band.feeds.v1beta1.Encoder - 18, // 1: band.tunnel.v1beta1.TunnelPricesPacketData.prices:type_name -> band.feeds.v1beta1.Price - 11, // 2: band.tunnel.v1beta1.IBCHookMemo.wasm:type_name -> band.tunnel.v1beta1.IBCHookMemo.Payload - 14, // 3: band.tunnel.v1beta1.RouterMemo.wasm:type_name -> band.tunnel.v1beta1.RouterMemo.Payload - 12, // 4: band.tunnel.v1beta1.IBCHookMemo.Payload.msg:type_name -> band.tunnel.v1beta1.IBCHookMemo.Payload.Msg - 13, // 5: band.tunnel.v1beta1.IBCHookMemo.Payload.Msg.receive_packet:type_name -> band.tunnel.v1beta1.IBCHookMemo.Payload.Msg.ReceivePacket - 4, // 6: band.tunnel.v1beta1.IBCHookMemo.Payload.Msg.ReceivePacket.packet:type_name -> band.tunnel.v1beta1.TunnelPricesPacketData - 15, // 7: band.tunnel.v1beta1.RouterMemo.Payload.msg:type_name -> band.tunnel.v1beta1.RouterMemo.Payload.Msg - 16, // 8: band.tunnel.v1beta1.RouterMemo.Payload.Msg.receive_band_data:type_name -> band.tunnel.v1beta1.RouterMemo.Payload.Msg.ReceiveBandDataArgs - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 19, // 0: band.tunnel.v1beta1.TSSRoute.encoder:type_name -> band.feeds.v1beta1.Encoder + 20, // 1: band.tunnel.v1beta1.TunnelPricesPacketData.prices:type_name -> band.feeds.v1beta1.Price + 13, // 2: band.tunnel.v1beta1.IBCHookMemo.wasm:type_name -> band.tunnel.v1beta1.IBCHookMemo.Payload + 16, // 3: band.tunnel.v1beta1.RouterMemo.wasm:type_name -> band.tunnel.v1beta1.RouterMemo.Payload + 21, // 4: band.tunnel.v1beta1.AxelarRoute.fee:type_name -> cosmos.base.v1beta1.Coin + 14, // 5: band.tunnel.v1beta1.IBCHookMemo.Payload.msg:type_name -> band.tunnel.v1beta1.IBCHookMemo.Payload.Msg + 15, // 6: band.tunnel.v1beta1.IBCHookMemo.Payload.Msg.receive_packet:type_name -> band.tunnel.v1beta1.IBCHookMemo.Payload.Msg.ReceivePacket + 4, // 7: band.tunnel.v1beta1.IBCHookMemo.Payload.Msg.ReceivePacket.packet:type_name -> band.tunnel.v1beta1.TunnelPricesPacketData + 17, // 8: band.tunnel.v1beta1.RouterMemo.Payload.msg:type_name -> band.tunnel.v1beta1.RouterMemo.Payload.Msg + 18, // 9: band.tunnel.v1beta1.RouterMemo.Payload.Msg.receive_band_data:type_name -> band.tunnel.v1beta1.RouterMemo.Payload.Msg.ReceiveBandDataArgs + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_band_tunnel_v1beta1_route_proto_init() } @@ -9117,7 +10201,7 @@ func file_band_tunnel_v1beta1_route_proto_init() { } } file_band_tunnel_v1beta1_route_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IBCHookMemo_Payload); i { + switch v := v.(*AxelarRoute); i { case 0: return &v.state case 1: @@ -9129,7 +10213,7 @@ func file_band_tunnel_v1beta1_route_proto_init() { } } file_band_tunnel_v1beta1_route_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IBCHookMemo_Payload_Msg); i { + switch v := v.(*AxelarPacketReceipt); i { case 0: return &v.state case 1: @@ -9141,7 +10225,7 @@ func file_band_tunnel_v1beta1_route_proto_init() { } } file_band_tunnel_v1beta1_route_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IBCHookMemo_Payload_Msg_ReceivePacket); i { + switch v := v.(*IBCHookMemo_Payload); i { case 0: return &v.state case 1: @@ -9153,7 +10237,7 @@ func file_band_tunnel_v1beta1_route_proto_init() { } } file_band_tunnel_v1beta1_route_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouterMemo_Payload); i { + switch v := v.(*IBCHookMemo_Payload_Msg); i { case 0: return &v.state case 1: @@ -9165,7 +10249,7 @@ func file_band_tunnel_v1beta1_route_proto_init() { } } file_band_tunnel_v1beta1_route_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouterMemo_Payload_Msg); i { + switch v := v.(*IBCHookMemo_Payload_Msg_ReceivePacket); i { case 0: return &v.state case 1: @@ -9177,6 +10261,30 @@ func file_band_tunnel_v1beta1_route_proto_init() { } } file_band_tunnel_v1beta1_route_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RouterMemo_Payload); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_band_tunnel_v1beta1_route_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RouterMemo_Payload_Msg); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_band_tunnel_v1beta1_route_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RouterMemo_Payload_Msg_ReceiveBandDataArgs); i { case 0: return &v.state @@ -9195,7 +10303,7 @@ func file_band_tunnel_v1beta1_route_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_band_tunnel_v1beta1_route_proto_rawDesc, NumEnums: 0, - NumMessages: 17, + NumMessages: 19, NumExtensions: 0, NumServices: 0, }, diff --git a/go.mod b/go.mod index 42a7a9281..15cdd4bf9 100644 --- a/go.mod +++ b/go.mod @@ -17,6 +17,7 @@ require ( cosmossdk.io/x/tx v0.13.8 cosmossdk.io/x/upgrade v0.1.4 github.com/Masterminds/semver/v3 v3.3.1 + github.com/axelarnetwork/utils v0.0.0-20230706045331-b7aacc1f4a2f github.com/bandprotocol/bothan/bothan-api/client/go-client v0.0.1-alpha.6 github.com/bandprotocol/go-owasm v0.3.1 github.com/bytecodealliance/wasmtime-go/v20 v20.0.0 @@ -47,6 +48,7 @@ require ( github.com/stretchr/testify v1.10.0 go.uber.org/mock v0.5.1 golang.org/x/crypto v0.27.0 + golang.org/x/text v0.18.0 google.golang.org/genproto/googleapis/api v0.0.0-20241021214115-324edc3d5d38 google.golang.org/grpc v1.67.1 google.golang.org/protobuf v1.36.6 @@ -205,7 +207,6 @@ require ( golang.org/x/sync v0.8.0 // indirect golang.org/x/sys v0.25.0 // indirect golang.org/x/term v0.24.0 // indirect - golang.org/x/text v0.18.0 // indirect golang.org/x/time v0.5.0 // indirect google.golang.org/api v0.186.0 // indirect google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 // indirect diff --git a/go.sum b/go.sum index c4fb488b1..51146aaf4 100644 --- a/go.sum +++ b/go.sum @@ -266,6 +266,8 @@ github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX github.com/aws/aws-sdk-go v1.44.224 h1:09CiaaF35nRmxrzWZ2uRq5v6Ghg/d2RiPjZnSgtt+RQ= github.com/aws/aws-sdk-go v1.44.224/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/axelarnetwork/utils v0.0.0-20230706045331-b7aacc1f4a2f h1:Q0Qh79MuZ/PWKzytqU8/4dt+S2QemdYYPXkjwp/i4l0= +github.com/axelarnetwork/utils v0.0.0-20230706045331-b7aacc1f4a2f/go.mod h1:7N7/Qo5WOm8HnwCtWvQs7T5QQLwVoLU/v+KkMLrvxiA= github.com/bandprotocol/bothan/bothan-api/client/go-client v0.0.1-alpha.6 h1:xq2Pf48GQwxxzNFt7URfzDKIJL2ITC5lbMluG0g0H3M= github.com/bandprotocol/bothan/bothan-api/client/go-client v0.0.1-alpha.6/go.mod h1:Qt5LDLwrFhLDQbLVBRd/yKyf2CNzHJlT+F+DEhnyqVE= github.com/bandprotocol/go-owasm v0.3.1 h1:L38qAEmb0KyTICHBHJaBoo6yy5+BlbOzQeQ+ioUV5Uw= diff --git a/proto/band/tunnel/v1beta1/params.proto b/proto/band/tunnel/v1beta1/params.proto index 21a3c66e8..4dc74361c 100644 --- a/proto/band/tunnel/v1beta1/params.proto +++ b/proto/band/tunnel/v1beta1/params.proto @@ -31,4 +31,10 @@ message Params { // router_integration_contract specifies the address of the Router integration contract on the Router chain // that the tunnel module will interact with. string router_integration_contract = 9; + // axelar_ibc_channel specifies the IBC channel used by the tunnel to communicate with the axelar chain. + string axelar_ibc_channel = 10 [(gogoproto.customname) = "AxelarIBCChannel"]; + // axelar_gmp_account is the account address on axelar chain that processes and verifies Axelar GMP transactions. + string axelar_gmp_account = 11 [(gogoproto.customname) = "AxelarGMPAccount"]; + // axelar_fee_recipient is the account address on axelar chain that receive fee from tunnel. + string axelar_fee_recipient = 12; } diff --git a/proto/band/tunnel/v1beta1/route.proto b/proto/band/tunnel/v1beta1/route.proto index 73ae10dce..63ba40143 100644 --- a/proto/band/tunnel/v1beta1/route.proto +++ b/proto/band/tunnel/v1beta1/route.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package band.tunnel.v1beta1; import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; import "gogoproto/gogo.proto"; import "band/feeds/v1beta1/encoder.proto"; @@ -150,3 +151,23 @@ message RouterMemo { // wasm is the payload for calling detination contract Payload wasm = 1 [(gogoproto.nullable) = false]; } + +// AxelarRoute represents a route for Axelar packets and implements the RouteI interface. +message AxelarRoute { + option (cosmos_proto.implements_interface) = "RouteI"; + + // destination_chain_id is the destination chain ID + string destination_chain_id = 1 [(gogoproto.customname) = "DestinationChainID", (gogoproto.casttype) = "ChainName"]; + // destination_contract_address is the destination contract address + string destination_contract_address = 2; + // fee is the fee for each packet in the Axelar network. + cosmos.base.v1beta1.Coin fee = 3 [(gogoproto.nullable) = false]; +} + +// AxelarPacketReceipt represents a receipt for a Axelar packet and implements the PacketReceiptI interface. +message AxelarPacketReceipt { + option (cosmos_proto.implements_interface) = "PacketReceiptI"; + + // sequence is representing the sequence of the Axelar packet. + uint64 sequence = 1; +} diff --git a/scripts/tunnel/create_axelar_tunnel.sh b/scripts/tunnel/create_axelar_tunnel.sh new file mode 100644 index 000000000..38858890c --- /dev/null +++ b/scripts/tunnel/create_axelar_tunnel.sh @@ -0,0 +1 @@ +bandd tx tunnel create-tunnel axelar base-sepolia 0xa20810c9d56316EC3033D96D557433613A559d21 113747ibc/BF3B4F53F3694B66E13C23107C84B6485BD2B96296BB7EC680EA77BBA75B4801 1000000000uband 3000 ./scripts/tunnel/signal_deviations.json --from requester --keyring-backend test --gas-prices 0.0025uband -y --chain-id bandchain diff --git a/scripts/tunnel/proposal_update_params.json b/scripts/tunnel/proposal_update_params.json index 41d4ff22d..50dfa67de 100644 --- a/scripts/tunnel/proposal_update_params.json +++ b/scripts/tunnel/proposal_update_params.json @@ -21,7 +21,10 @@ } ], "router_ibc_channel": "channel-0", - "router_integration_contract": "router1v8evlcrtu4peer2fk5tnkau3qd0r0vtn8ll86qep4sgp89t6l9fqkvsue6" + "router_integration_contract": "router1v8evlcrtu4peer2fk5tnkau3qd0r0vtn8ll86qep4sgp89t6l9fqkvsue6", + "axelar_ibc_channel": "channel-1", + "axelar_gmp_account": "axelar1dv4u5k73pzqrxlzujxg3qp8kvc3pje7jtdvu72npnt5zhq05ejcsn5qme5", + "axelar_fee_recipient": "axelar1aythygn6z5thymj6tmzfwekzh05ewg3l7d6y89" }, "authority": "band10d07y265gmmuvt4z0w9aw880jnsr700jrdn8wm" } diff --git a/scripts/tunnel/update_axelar_route.sh b/scripts/tunnel/update_axelar_route.sh new file mode 100644 index 000000000..f14147cca --- /dev/null +++ b/scripts/tunnel/update_axelar_route.sh @@ -0,0 +1 @@ +bandd tx tunnel update-route axelar 1 base-sepolia 0x75F01b3a2352bdc6e0D3983e40E09E9A8AAf4DF6 113747ibc/BF3B4F53F3694B66E13C23107C84B6485BD2B96296BB7EC680EA77BBA75B4801 --from requester --keyring-backend test --gas-prices 0.0025uband -y --chain-id bandchain diff --git a/x/tunnel/client/cli/tx.go b/x/tunnel/client/cli/tx.go index c38a21c44..cc3e37a67 100644 --- a/x/tunnel/client/cli/tx.go +++ b/x/tunnel/client/cli/tx.go @@ -53,6 +53,7 @@ func GetTxCmdCreateTunnel() *cobra.Command { GetTxCmdCreateIBCTunnel(), GetTxCmdCreateIBCHookTunnel(), GetTxCmdCreateRouterTunnel(), + GetTxCmdCreateAxelarTunnel(), ) return txCmd @@ -262,6 +263,61 @@ func GetTxCmdCreateRouterTunnel() *cobra.Command { return cmd } +func GetTxCmdCreateAxelarTunnel() *cobra.Command { + cmd := &cobra.Command{ + Use: "axelar [destination-chain-id] [destination-contract-address] [axelar-fee] [initial-deposit] [interval] [signal-deviations-json-file]", + Short: "Create a new Axelar tunnel", + Args: cobra.ExactArgs(6), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + destinationChainID := args[0] + destinationContractAddress := args[1] + + axelarFee, err := sdk.ParseCoinNormalized(args[2]) + if err != nil { + return err + } + + initialDeposit, err := sdk.ParseCoinsNormalized(args[3]) + if err != nil { + return err + } + + interval, err := strconv.ParseUint(args[4], 10, 64) + if err != nil { + return err + } + + signalInfos, err := parseSignalDeviations(args[5]) + if err != nil { + return err + } + + msg, err := types.NewMsgCreateAxelarTunnel( + signalInfos.ToSignalDeviations(), + interval, + destinationChainID, + destinationContractAddress, + axelarFee, + initialDeposit, + clientCtx.GetFromAddress().String(), + ) + if err != nil { + return err + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + return cmd +} + func GetTxCmdUpdateRoute() *cobra.Command { txCmd := &cobra.Command{ Use: "update-route", @@ -275,6 +331,7 @@ func GetTxCmdUpdateRoute() *cobra.Command { GetTxCmdUpdateIBCRoute(), GetTxCmdUpdateIBCHookRoute(), GetTxCmdUpdateRouterRoute(), + GetTxCmdUpdateAxelarRoute(), ) return txCmd @@ -396,6 +453,50 @@ func GetTxCmdUpdateRouterRoute() *cobra.Command { return cmd } +func GetTxCmdUpdateAxelarRoute() *cobra.Command { + cmd := &cobra.Command{ + Use: "axelar [tunnel-id] [destination-chain-id] [destination-contract-address] [axelar-fee]", + Short: "Update Axelar route of a Axelar tunnel", + Args: cobra.ExactArgs(4), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + id, err := strconv.ParseUint(args[0], 10, 64) + if err != nil { + return err + } + + destinationChainID := args[1] + destinationContractAddress := args[2] + + axelarFee, err := sdk.ParseCoinNormalized(args[3]) + if err != nil { + return err + } + + msg, err := types.NewMsgUpdateAxelarRoute( + id, + destinationChainID, + destinationContractAddress, + axelarFee, + clientCtx.GetFromAddress().String(), + ) + if err != nil { + return err + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + func GetTxCmdUpdateSignalsAndInterval() *cobra.Command { cmd := &cobra.Command{ Use: "update-signals-and-interval [tunnel-id] [interval] [signalDeviations-json-file] ", diff --git a/x/tunnel/keeper/keeper_packet.go b/x/tunnel/keeper/keeper_packet.go index fe18e0786..8b26cd6b7 100644 --- a/x/tunnel/keeper/keeper_packet.go +++ b/x/tunnel/keeper/keeper_packet.go @@ -212,6 +212,8 @@ func (k Keeper) SendPacket(ctx sdk.Context, packet types.Packet) (err error) { receipt, err = k.SendIBCHookPacket(ctx, r, packet, sdk.MustAccAddressFromBech32(tunnel.FeePayer), tunnel.Interval) case *types.RouterRoute: receipt, err = k.SendRouterPacket(ctx, r, packet, sdk.MustAccAddressFromBech32(tunnel.FeePayer), tunnel.Interval) + case *types.AxelarRoute: + receipt, err = k.SendAxelarPacket(ctx, r, packet, sdk.MustAccAddressFromBech32(tunnel.FeePayer), tunnel.Interval) default: return types.ErrInvalidRoute.Wrapf("no route found for tunnel ID: %d", tunnel.ID) } diff --git a/x/tunnel/keeper/keeper_packet_axelar.go b/x/tunnel/keeper/keeper_packet_axelar.go new file mode 100644 index 000000000..01b07e597 --- /dev/null +++ b/x/tunnel/keeper/keeper_packet_axelar.go @@ -0,0 +1,69 @@ +package keeper + +import ( + "time" + + ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" + clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/bandprotocol/chain/v3/x/tunnel/types" +) + +// SendAxelarPacket sends a packet to the destination chain using Axelar +func (k Keeper) SendAxelarPacket( + ctx sdk.Context, + route *types.AxelarRoute, + packet types.Packet, + feePayer sdk.AccAddress, + interval uint64, +) (types.PacketReceiptI, error) { + // get axelar params + params := k.GetParams(ctx) + ibcChannel := params.AxelarIBCChannel + feeRecipient := params.AxelarFeeRecipient + gmpAccount := params.AxelarGMPAccount + + // encode packet to abi format + payload, err := types.EncodingPacketABI(packet) + if err != nil { + return nil, err + } + + // create axelar fee + feePayerStr := feePayer.String() + axelarFee := types.NewAxelarFee(route.Fee.Amount.String(), feeRecipient, &feePayerStr) + + // create memo string for ibc transfer + memoStr, err := types.NewAxelarMemo( + route.DestinationChainID, + route.DestinationContractAddress, + payload, + types.AxelarMessageTypeGeneralMessage, + &axelarFee, + ).String() + if err != nil { + return nil, err + } + + // create ibc transfer message with the memo string + msg := ibctransfertypes.NewMsgTransfer( + ibctransfertypes.PortID, + ibcChannel, + route.Fee, + feePayer.String(), + gmpAccount, + clienttypes.ZeroHeight(), + uint64(ctx.BlockTime().UnixNano())+interval*uint64(time.Second)*2, + memoStr, + ) + + // send packet + res, err := k.transferKeeper.Transfer(ctx, msg) + if err != nil { + return nil, err + } + + return types.NewAxelarPacketReceipt(res.Sequence), nil +} diff --git a/x/tunnel/keeper/keeper_packet_axelar_test.go b/x/tunnel/keeper/keeper_packet_axelar_test.go new file mode 100644 index 000000000..77a27b4fc --- /dev/null +++ b/x/tunnel/keeper/keeper_packet_axelar_test.go @@ -0,0 +1,56 @@ +package keeper_test + +import ( + "time" + + "go.uber.org/mock/gomock" + + ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" + + sdk "github.com/cosmos/cosmos-sdk/types" + + feedstypes "github.com/bandprotocol/chain/v3/x/feeds/types" + "github.com/bandprotocol/chain/v3/x/tunnel/types" +) + +func (s *KeeperTestSuite) TestSendAxelarPacket() { + ctx, k := s.ctx, s.keeper + + axelarFee := sdk.NewInt64Coin("uband", 100) + + tunnelID := uint64(1) + route := &types.AxelarRoute{ + DestinationChainID: "mock-chain", + DestinationContractAddress: "0x1234567890", + Fee: axelarFee, + } + packet := types.Packet{ + TunnelID: tunnelID, + Sequence: 1, + Prices: []feedstypes.Price{}, + CreatedAt: time.Now().Unix(), + } + interval := uint64(60) + feePayer := sdk.AccAddress([]byte("feePayer")) + + expectedPacketReceipt := types.AxelarPacketReceipt{ + Sequence: 1, + } + + s.transferKeeper.EXPECT().Transfer(ctx, gomock.Any()).Return(&ibctransfertypes.MsgTransferResponse{ + Sequence: 1, + }, nil) + + content, err := k.SendAxelarPacket( + ctx, + route, + packet, + feePayer, + interval, + ) + s.Require().NoError(err) + + receipt, ok := content.(*types.AxelarPacketReceipt) + s.Require().True(ok) + s.Require().Equal(expectedPacketReceipt, *receipt) +} diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 920ff9995..04a75fa30 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -143,7 +143,8 @@ func (k msgServer) UpdateRoute( tunnel.Route = msg.Route case *types.RouterRoute: tunnel.Route = msg.Route - + case *types.AxelarRoute: + tunnel.Route = msg.Route default: return nil, types.ErrInvalidRoute.Wrap("cannot update route on this route type") } diff --git a/x/tunnel/types/axelar.go b/x/tunnel/types/axelar.go new file mode 100644 index 000000000..717838636 --- /dev/null +++ b/x/tunnel/types/axelar.go @@ -0,0 +1,125 @@ +package types + +import ( + "encoding/json" + fmt "fmt" + "strings" + "unicode/utf8" + + "github.com/axelarnetwork/utils/slices" + "golang.org/x/text/unicode/norm" + + errorsmod "cosmossdk.io/errors" +) + +// Note: This code is derived from github.com/axelarnetwork/axelar-core/x/nexus/exported + +// DefaultDelimiter represents the default delimiter used for the KV store keys +const DefaultDelimiter = "_" + +type AxelarMessageType int + +const ( + // AxelarMessageTypeUnrecognized means coin type is unrecognized by axelar + AxelarMessageTypeUnrecognized AxelarMessageType = iota + // AxelarMessageTypeGeneralMessage is a pure axelar message + AxelarMessageTypeGeneralMessage + // AxelarMessageTypeGeneralMessageWithToken is a general axelar message with token + AxelarMessageTypeGeneralMessageWithToken + // AxelarMessageTypeSendToken is a direct token transfer + AxelarMessageTypeSendToken +) + +// AxelarFee is used to pay relayer for executing cross chain message +type AxelarFee struct { + Amount string `json:"amount"` + Recipient string `json:"recipient"` + RefundRecipient *string `json:"refund_recipient"` +} + +// NewAxelarFee creates a new AxelarFee instance. +func NewAxelarFee( + amount string, + recipient string, + refundRecipient *string, +) AxelarFee { + return AxelarFee{ + Amount: amount, + Recipient: recipient, + RefundRecipient: refundRecipient, + } +} + +// WasmBytes is a wrapper around []byte that gets JSON marshalized as an array +// of numbers instead of base64-encoded string +type WasmBytes []byte + +// MarshalJSON implements json.Marshaler +func (bz WasmBytes) MarshalJSON() ([]byte, error) { + return json.Marshal(slices.Map(bz, func(b byte) uint16 { return uint16(b) })) +} + +// ChainNameLengthMax bounds the max chain name length +const ChainNameLengthMax = 20 + +// ChainName ensures a correctly formatted EVM chain name +type ChainName string + +// Validate returns an error, if the chain name is empty or too long +func (c ChainName) Validate() error { + if err := ValidateString(string(c)); err != nil { + return errorsmod.Wrap(err, "invalid chain name") + } + + if len(c) > ChainNameLengthMax { + return fmt.Errorf("chain name length %d is greater than %d", len(c), ChainNameLengthMax) + } + + return nil +} + +func (c ChainName) String() string { + return string(c) +} + +// ValidateString checks if the given string is: +// +// 1. non-empty +// 2. entirely composed of utf8 runes +// 3. normalized as NFKC +// 4. does not contain any forbidden Unicode code points +func ValidateString(str string, forbidden ...string) error { + var f string + if len(forbidden) == 0 { + f = DefaultDelimiter + } else { + f = strings.Join(forbidden, "") + } + + return validateString(str, false, f) +} + +func validateString(str string, canBeEmpty bool, forbidden string) error { + if !canBeEmpty && len(str) == 0 { + return fmt.Errorf("string is empty") + } + + if !utf8.ValidString(str) { + return fmt.Errorf("not an utf8 string") + } + + if !norm.NFKC.IsNormalString(str) { + return fmt.Errorf("wrong normalization") + } + + if len(forbidden) == 0 { + return nil + } + + forbidden = norm.NFKC.String(forbidden) + if strings.ContainsAny(str, forbidden) { + return fmt.Errorf("string '%s' must not contain any of '%s'", str, forbidden) + } + + return nil +} diff --git a/x/tunnel/types/codec.go b/x/tunnel/types/codec.go index 45bd071ed..2958e04d2 100644 --- a/x/tunnel/types/codec.go +++ b/x/tunnel/types/codec.go @@ -34,12 +34,14 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&IBCRoute{}, "tunnel/IBCRoute", nil) cdc.RegisterConcrete(&IBCHookRoute{}, "tunnel/IBCHookRoute", nil) cdc.RegisterConcrete(&RouterRoute{}, "tunnel/RouterRoute", nil) + cdc.RegisterConcrete(&AxelarRoute{}, "tunnel/AxelarRoute", nil) cdc.RegisterInterface((*PacketReceiptI)(nil), nil) cdc.RegisterConcrete(&TSSPacketReceipt{}, "tunnel/TSSPacketReceipt", nil) cdc.RegisterConcrete(&IBCPacketReceipt{}, "tunnel/IBCPacketReceipt", nil) cdc.RegisterConcrete(&IBCHookPacketReceipt{}, "tunnel/IBCHookPacketReceipt", nil) cdc.RegisterConcrete(&RouterPacketReceipt{}, "tunnel/RouterPacketReceipt", nil) + cdc.RegisterConcrete(&AxelarPacketReceipt{}, "tunnel/AxelarPacketReceipt", nil) cdc.RegisterConcrete(Params{}, "tunnel/Params", nil) } @@ -67,6 +69,7 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { &IBCRoute{}, &IBCHookRoute{}, &RouterRoute{}, + &AxelarRoute{}, ) registry.RegisterInterface( @@ -76,6 +79,7 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { &IBCPacketReceipt{}, &IBCHookPacketReceipt{}, &RouterPacketReceipt{}, + &AxelarPacketReceipt{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) diff --git a/x/tunnel/types/memo_axelar.go b/x/tunnel/types/memo_axelar.go new file mode 100644 index 000000000..361063326 --- /dev/null +++ b/x/tunnel/types/memo_axelar.go @@ -0,0 +1,48 @@ +package types + +import ( + "encoding/json" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// AxelarMemo is attached in ICS20 packet memo field for axelar cross chain message +type AxelarMemo struct { + DestinationChain ChainName `json:"destination_chain"` + DestinationAddress string `json:"destination_address"` + Payload WasmBytes `json:"payload"` + Type AxelarMessageType `json:"type"` + Fee *AxelarFee `json:"fee"` // Optional +} + +// NewAxelarMemo creates a new AxelarMemo instance. +func NewAxelarMemo( + destinationChain ChainName, + destinationAddress string, + payload []byte, + messageType AxelarMessageType, + fee *AxelarFee, +) AxelarMemo { + return AxelarMemo{ + DestinationChain: destinationChain, + DestinationAddress: destinationAddress, + Payload: payload, + Type: messageType, + Fee: fee, + } +} + +// String marshals the AxelarMemo into a JSON string. +func (r AxelarMemo) String() (string, error) { + j, err := json.Marshal(r) + if err != nil { + return "", err + } + + sj, err := sdk.SortJSON(j) + if err != nil { + return "", err + } + + return string(sj), nil +} diff --git a/x/tunnel/types/memo_axelar_test.go b/x/tunnel/types/memo_axelar_test.go new file mode 100644 index 000000000..588ff20b1 --- /dev/null +++ b/x/tunnel/types/memo_axelar_test.go @@ -0,0 +1,35 @@ +package types_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/bandprotocol/chain/v3/x/tunnel/types" +) + +func TestStringAxelarMemo(t *testing.T) { + mockPayload := []byte{1, 2, 3} + + refundRecipient := "band1m5lq9u533qaya4q3nfyl6ulzqkpkhge9q8tpzs" + + memo := types.NewAxelarMemo( + "mock-chain", + "0x75F01b3a2352bdc6e0D3983e40E09E9A8AAf4DF6", + mockPayload, + types.AxelarMessageTypeGeneralMessage, + &types.AxelarFee{ + Amount: "100", + Recipient: "axelar1aythygn6z5thymj6tmzfwekzh05ewg3l7d6y89", + RefundRecipient: &refundRecipient, + }, + ) + + memoStr, err := memo.String() + require.NoError(t, err) + require.Equal( + t, + `{"destination_address":"0x75F01b3a2352bdc6e0D3983e40E09E9A8AAf4DF6","destination_chain":"mock-chain","fee":{"amount":"100","recipient":"axelar1aythygn6z5thymj6tmzfwekzh05ewg3l7d6y89","refund_recipient":"band1m5lq9u533qaya4q3nfyl6ulzqkpkhge9q8tpzs"},"payload":[1,2,3],"type":1}`, + memoStr, + ) +} diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index 9318eebde..242772e62 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -103,6 +103,25 @@ func NewMsgCreateRouterTunnel( return m, nil } +// NewMsgCreateAxelarTunnel creates a new MsgCreateTunnel instance for Axelar tunnel. +func NewMsgCreateAxelarTunnel( + signalDeviations []SignalDeviation, + interval uint64, + destinationChainID string, + destinationContractAddress string, + fee sdk.Coin, + initialDeposit sdk.Coins, + creator string, +) (*MsgCreateTunnel, error) { + r := NewAxelarRoute(destinationChainID, destinationContractAddress, fee) + m, err := NewMsgCreateTunnel(signalDeviations, interval, r, initialDeposit, creator) + if err != nil { + return nil, err + } + + return m, nil +} + // GetRouteValue returns the route of the tunnel. func (m MsgCreateTunnel) GetRouteValue() (RouteI, error) { r, ok := m.Route.GetCachedValue().(RouteI) @@ -210,6 +229,21 @@ func NewMsgUpdateRouterRoute( ) } +// NewMsgUpdateAxelarRoute creates a new MsgUpdateRoute instance. +func NewMsgUpdateAxelarRoute( + tunnelID uint64, + destinationChainID string, + destinationContractAddress string, + fee sdk.Coin, + creator string, +) (*MsgUpdateRoute, error) { + return NewMsgUpdateRoute( + tunnelID, + NewAxelarRoute(destinationChainID, destinationContractAddress, fee), + creator, + ) +} + // GetRouteValue returns the route of the message. func (m MsgUpdateRoute) GetRouteValue() (RouteI, error) { r, ok := m.Route.GetCachedValue().(RouteI) diff --git a/x/tunnel/types/params.go b/x/tunnel/types/params.go index 5cefaa95a..b7c83d4bc 100644 --- a/x/tunnel/types/params.go +++ b/x/tunnel/types/params.go @@ -20,6 +20,9 @@ var ( DefaultBasePacketFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 500)) DefaultRouterIBCChannel = "" DefaultRouterIntegrationContract = "" + DefaultAxelarIBCChannel = "" + DefaultAxelarGMPAccount = "axelar1dv4u5k73pzqrxlzujxg3qp8kvc3pje7jtdvu72npnt5zhq05ejcsn5qme5" + DefaultAxelarFeeRecipient = "" ) // NewParams creates a new Params instance @@ -33,6 +36,9 @@ func NewParams( basePacketFee sdk.Coins, routerIBCChannel string, routerIntegrationContract string, + axelarIBCChannel string, + axelarGMPAccount string, + axelarFeeRecipient string, ) Params { return Params{ MinDeposit: minDeposit, @@ -44,6 +50,9 @@ func NewParams( BasePacketFee: basePacketFee, RouterIBCChannel: routerIBCChannel, RouterIntegrationContract: routerIntegrationContract, + AxelarIBCChannel: axelarIBCChannel, + AxelarGMPAccount: axelarGMPAccount, + AxelarFeeRecipient: axelarFeeRecipient, } } @@ -59,6 +68,9 @@ func DefaultParams() Params { DefaultBasePacketFee, DefaultRouterIBCChannel, DefaultRouterIntegrationContract, + DefaultAxelarIBCChannel, + DefaultAxelarGMPAccount, + DefaultAxelarFeeRecipient, ) } @@ -119,7 +131,12 @@ func (p Params) Validate() error { // validate RouterIBCChannel if p.RouterIBCChannel != "" && !channeltypes.IsChannelIDFormat(p.RouterIBCChannel) { - return fmt.Errorf("channel identifier is not in the format: `channel-{N}` or be empty string") + return fmt.Errorf("channel router identifier is not in the format: `channel-{N}` or be empty string") + } + + // validate AxelarIBCChannel + if p.AxelarIBCChannel != "" && !channeltypes.IsChannelIDFormat(p.AxelarIBCChannel) { + return fmt.Errorf("channel axelar identifier is not in the format: `channel-{N}` or be empty string") } return nil diff --git a/x/tunnel/types/params.pb.go b/x/tunnel/types/params.pb.go index 5969db0e9..6b30fffdc 100644 --- a/x/tunnel/types/params.pb.go +++ b/x/tunnel/types/params.pb.go @@ -46,6 +46,12 @@ type Params struct { // router_integration_contract specifies the address of the Router integration contract on the Router chain // that the tunnel module will interact with. RouterIntegrationContract string `protobuf:"bytes,9,opt,name=router_integration_contract,json=routerIntegrationContract,proto3" json:"router_integration_contract,omitempty"` + // axelar_ibc_channel specifies the IBC channel used by the tunnel to communicate with the axelar chain. + AxelarIBCChannel string `protobuf:"bytes,10,opt,name=axelar_ibc_channel,json=axelarIbcChannel,proto3" json:"axelar_ibc_channel,omitempty"` + // axelar_gmp_account is the account address on axelar chain that processes and verifies Axelar GMP transactions. + AxelarGMPAccount string `protobuf:"bytes,11,opt,name=axelar_gmp_account,json=axelarGmpAccount,proto3" json:"axelar_gmp_account,omitempty"` + // axelar_fee_recipient is the account address on axelar chain that receive fee from tunnel. + AxelarFeeRecipient string `protobuf:"bytes,12,opt,name=axelar_fee_recipient,json=axelarFeeRecipient,proto3" json:"axelar_fee_recipient,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -144,6 +150,27 @@ func (m *Params) GetRouterIntegrationContract() string { return "" } +func (m *Params) GetAxelarIBCChannel() string { + if m != nil { + return m.AxelarIBCChannel + } + return "" +} + +func (m *Params) GetAxelarGMPAccount() string { + if m != nil { + return m.AxelarGMPAccount + } + return "" +} + +func (m *Params) GetAxelarFeeRecipient() string { + if m != nil { + return m.AxelarFeeRecipient + } + return "" +} + func init() { proto.RegisterType((*Params)(nil), "band.tunnel.v1beta1.Params") } @@ -151,37 +178,41 @@ func init() { func init() { proto.RegisterFile("band/tunnel/v1beta1/params.proto", fileDescriptor_842b3bf03f22bf82) } var fileDescriptor_842b3bf03f22bf82 = []byte{ - // 467 bytes of a gzipped FileDescriptorProto + // 535 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0x3f, 0x6f, 0xd3, 0x40, - 0x14, 0xc0, 0x63, 0x1a, 0x02, 0xbd, 0x82, 0x52, 0xdc, 0x0e, 0x6e, 0x91, 0xec, 0xc0, 0x94, 0x05, - 0x1f, 0xa5, 0x1b, 0x03, 0x48, 0x0e, 0x42, 0xca, 0x80, 0x14, 0xb9, 0x1b, 0x8b, 0xf5, 0x7c, 0x39, - 0x9c, 0x53, 0xed, 0x3b, 0xcb, 0x77, 0x89, 0xcc, 0xb7, 0xe0, 0x23, 0x30, 0xf3, 0x49, 0x3a, 0x76, - 0x64, 0x0a, 0xc8, 0x59, 0xf8, 0x18, 0xe8, 0xfe, 0xa4, 0x8d, 0x32, 0x77, 0xb2, 0xf5, 0xde, 0xef, - 0x7e, 0xef, 0xdd, 0xd3, 0x3b, 0x34, 0xca, 0x81, 0xcf, 0xb1, 0x5a, 0x72, 0x4e, 0x4b, 0xbc, 0xba, - 0xc8, 0xa9, 0x82, 0x0b, 0x5c, 0x43, 0x03, 0x95, 0x8c, 0xeb, 0x46, 0x28, 0xe1, 0x9f, 0x68, 0x22, - 0xb6, 0x44, 0xec, 0x88, 0xf3, 0xd3, 0x42, 0x14, 0xc2, 0xe4, 0xb1, 0xfe, 0xb3, 0xe8, 0x79, 0x48, - 0x84, 0xac, 0x84, 0xc4, 0x39, 0x48, 0x7a, 0x27, 0x23, 0x82, 0x71, 0x9b, 0x7f, 0xbd, 0xee, 0xa3, - 0xc1, 0xcc, 0xb8, 0xfd, 0x12, 0x1d, 0x55, 0x8c, 0x67, 0x73, 0x5a, 0x0b, 0xc9, 0x54, 0xe0, 0x8d, - 0x0e, 0xc6, 0x47, 0xef, 0xce, 0x62, 0x2b, 0x88, 0xb5, 0x60, 0x5b, 0x2b, 0x9e, 0x08, 0xc6, 0x93, - 0xb7, 0x37, 0xeb, 0xa8, 0xf7, 0xeb, 0x4f, 0x34, 0x2e, 0x98, 0x5a, 0x2c, 0xf3, 0x98, 0x88, 0x0a, - 0xbb, 0x6a, 0xf6, 0xf3, 0x46, 0xce, 0xaf, 0xb1, 0xfa, 0x5e, 0x53, 0x69, 0x0e, 0xc8, 0x14, 0x55, - 0x8c, 0x7f, 0xb2, 0x7a, 0xff, 0x15, 0x7a, 0xa6, 0xab, 0x31, 0xae, 0x68, 0xb3, 0x82, 0x32, 0x78, - 0x34, 0xf2, 0xc6, 0xfd, 0x54, 0x77, 0x30, 0x75, 0x21, 0x83, 0x40, 0x7b, 0x8f, 0x1c, 0x38, 0x04, - 0xda, 0x3b, 0xe4, 0x23, 0x7a, 0x61, 0x7b, 0x5e, 0x31, 0x50, 0x4c, 0xf0, 0x2c, 0xaf, 0x65, 0xd0, - 0xd7, 0x5c, 0x72, 0xd2, 0xad, 0xa3, 0xe1, 0x17, 0x5d, 0xd0, 0xe5, 0x92, 0xd9, 0x55, 0x3a, 0xac, - 0x76, 0x03, 0xb5, 0x34, 0x02, 0x68, 0xf7, 0x04, 0x8f, 0x77, 0x04, 0xd0, 0xee, 0x09, 0x76, 0x03, - 0xb5, 0xf4, 0x23, 0xa4, 0x1b, 0xca, 0x24, 0x2b, 0x38, 0x94, 0x32, 0x18, 0x98, 0x1e, 0x51, 0x05, - 0xed, 0x95, 0x8d, 0xf8, 0x12, 0x0d, 0xf5, 0xec, 0xb2, 0x1a, 0xc8, 0x35, 0x55, 0xd9, 0x37, 0x4a, - 0x83, 0x27, 0x0f, 0x3f, 0xda, 0xe7, 0x5a, 0x32, 0x33, 0x25, 0x3e, 0x53, 0xea, 0x27, 0xc8, 0x6f, - 0xc4, 0x52, 0xd1, 0x26, 0x63, 0x39, 0xc9, 0xc8, 0x02, 0xf4, 0xaa, 0x04, 0x4f, 0x47, 0xde, 0xf8, - 0x30, 0x39, 0xed, 0xd6, 0xd1, 0x71, 0x6a, 0xb2, 0xd3, 0x64, 0x32, 0xb1, 0xb9, 0x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 0x4d, + 0xf2, 0xbe, 0xfd, 0xe7, 0x7b, 0xe0, 0xc4, 0xe3, 0xfb, 0x95, 0xef, 0x3c, 0xac, 0x7c, 0xe7, 0xf7, + 0xca, 0x77, 0xbe, 0xae, 0xfd, 0xd6, 0xc3, 0xda, 0x6f, 0xfd, 0x5c, 0xfb, 0xad, 0xcf, 0x51, 0xe3, + 0xb5, 0xa8, 0xab, 0xa8, 0xaf, 0x12, 0x62, 0x45, 0x84, 0x66, 0x90, 0xd0, 0x68, 0x71, 0x1e, 0xd5, + 0x9b, 0xfb, 0xab, 0xdf, 0x51, 0xd6, 0xd1, 0xc4, 0xf9, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc2, + 0xa8, 0x22, 0x47, 0xdb, 0x03, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -240,6 +271,15 @@ func (this *Params) Equal(that interface{}) bool { if this.RouterIntegrationContract != that1.RouterIntegrationContract { return false } + if this.AxelarIBCChannel != that1.AxelarIBCChannel { + return false + } + if this.AxelarGMPAccount != that1.AxelarGMPAccount { + return false + } + if this.AxelarFeeRecipient != that1.AxelarFeeRecipient { + return false + } return true } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -262,6 +302,27 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.AxelarFeeRecipient) > 0 { + i -= len(m.AxelarFeeRecipient) + copy(dAtA[i:], m.AxelarFeeRecipient) + i = encodeVarintParams(dAtA, i, uint64(len(m.AxelarFeeRecipient))) + i-- + dAtA[i] = 0x62 + } + if len(m.AxelarGMPAccount) > 0 { + i -= len(m.AxelarGMPAccount) + copy(dAtA[i:], m.AxelarGMPAccount) + i = encodeVarintParams(dAtA, i, uint64(len(m.AxelarGMPAccount))) + i-- + dAtA[i] = 0x5a + } + if len(m.AxelarIBCChannel) > 0 { + i -= len(m.AxelarIBCChannel) + copy(dAtA[i:], m.AxelarIBCChannel) + i = encodeVarintParams(dAtA, i, uint64(len(m.AxelarIBCChannel))) + i-- + dAtA[i] = 0x52 + } if len(m.RouterIntegrationContract) > 0 { i -= len(m.RouterIntegrationContract) copy(dAtA[i:], m.RouterIntegrationContract) @@ -384,6 +445,18 @@ func (m *Params) Size() (n int) { if l > 0 { n += 1 + l + sovParams(uint64(l)) } + l = len(m.AxelarIBCChannel) + if l > 0 { + n += 1 + l + sovParams(uint64(l)) + } + l = len(m.AxelarGMPAccount) + if l > 0 { + n += 1 + l + sovParams(uint64(l)) + } + l = len(m.AxelarFeeRecipient) + if l > 0 { + n += 1 + l + sovParams(uint64(l)) + } return n } @@ -649,6 +722,102 @@ func (m *Params) Unmarshal(dAtA []byte) error { } m.RouterIntegrationContract = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AxelarIBCChannel", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AxelarIBCChannel = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AxelarGMPAccount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AxelarGMPAccount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AxelarFeeRecipient", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AxelarFeeRecipient = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipParams(dAtA[iNdEx:]) diff --git a/x/tunnel/types/route.pb.go b/x/tunnel/types/route.pb.go index 511f375ff..07c7005ec 100644 --- a/x/tunnel/types/route.pb.go +++ b/x/tunnel/types/route.pb.go @@ -8,6 +8,7 @@ import ( github_com_bandprotocol_chain_v3_x_bandtss_types "github.com/bandprotocol/chain/v3/x/bandtss/types" types "github.com/bandprotocol/chain/v3/x/feeds/types" _ "github.com/cosmos/cosmos-proto" + types1 "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" @@ -929,6 +930,116 @@ func (m *RouterMemo_Payload_Msg_ReceiveBandDataArgs) GetPayload() string { return "" } +// AxelarRoute represents a route for Axelar packets and implements the RouteI interface. +type AxelarRoute struct { + // destination_chain_id is the destination chain ID + DestinationChainID ChainName `protobuf:"bytes,1,opt,name=destination_chain_id,json=destinationChainId,proto3,casttype=ChainName" json:"destination_chain_id,omitempty"` + // destination_contract_address is the destination contract address + DestinationContractAddress string `protobuf:"bytes,2,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` + // fee is the fee for each packet in the Axelar network. + Fee types1.Coin `protobuf:"bytes,3,opt,name=fee,proto3" json:"fee"` +} + +func (m *AxelarRoute) Reset() { *m = AxelarRoute{} } +func (m *AxelarRoute) String() string { return proto.CompactTextString(m) } +func (*AxelarRoute) ProtoMessage() {} +func (*AxelarRoute) Descriptor() ([]byte, []int) { + return fileDescriptor_543238289d94b7a6, []int{11} +} +func (m *AxelarRoute) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AxelarRoute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AxelarRoute.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 *AxelarRoute) XXX_Merge(src proto.Message) { + xxx_messageInfo_AxelarRoute.Merge(m, src) +} +func (m *AxelarRoute) XXX_Size() int { + return m.Size() +} +func (m *AxelarRoute) XXX_DiscardUnknown() { + xxx_messageInfo_AxelarRoute.DiscardUnknown(m) +} + +var xxx_messageInfo_AxelarRoute proto.InternalMessageInfo + +func (m *AxelarRoute) GetDestinationChainID() ChainName { + if m != nil { + return m.DestinationChainID + } + return "" +} + +func (m *AxelarRoute) GetDestinationContractAddress() string { + if m != nil { + return m.DestinationContractAddress + } + return "" +} + +func (m *AxelarRoute) GetFee() types1.Coin { + if m != nil { + return m.Fee + } + return types1.Coin{} +} + +// AxelarPacketReceipt represents a receipt for a Axelar packet and implements the PacketReceiptI interface. +type AxelarPacketReceipt struct { + // sequence is representing the sequence of the Axelar packet. + Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"` +} + +func (m *AxelarPacketReceipt) Reset() { *m = AxelarPacketReceipt{} } +func (m *AxelarPacketReceipt) String() string { return proto.CompactTextString(m) } +func (*AxelarPacketReceipt) ProtoMessage() {} +func (*AxelarPacketReceipt) Descriptor() ([]byte, []int) { + return fileDescriptor_543238289d94b7a6, []int{12} +} +func (m *AxelarPacketReceipt) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AxelarPacketReceipt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AxelarPacketReceipt.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 *AxelarPacketReceipt) XXX_Merge(src proto.Message) { + xxx_messageInfo_AxelarPacketReceipt.Merge(m, src) +} +func (m *AxelarPacketReceipt) XXX_Size() int { + return m.Size() +} +func (m *AxelarPacketReceipt) XXX_DiscardUnknown() { + xxx_messageInfo_AxelarPacketReceipt.DiscardUnknown(m) +} + +var xxx_messageInfo_AxelarPacketReceipt proto.InternalMessageInfo + +func (m *AxelarPacketReceipt) GetSequence() uint64 { + if m != nil { + return m.Sequence + } + return 0 +} + func init() { proto.RegisterType((*TSSRoute)(nil), "band.tunnel.v1beta1.TSSRoute") proto.RegisterType((*TSSPacketReceipt)(nil), "band.tunnel.v1beta1.TSSPacketReceipt") @@ -947,68 +1058,74 @@ func init() { proto.RegisterType((*RouterMemo_Payload)(nil), "band.tunnel.v1beta1.RouterMemo.Payload") proto.RegisterType((*RouterMemo_Payload_Msg)(nil), "band.tunnel.v1beta1.RouterMemo.Payload.Msg") proto.RegisterType((*RouterMemo_Payload_Msg_ReceiveBandDataArgs)(nil), "band.tunnel.v1beta1.RouterMemo.Payload.Msg.ReceiveBandDataArgs") + proto.RegisterType((*AxelarRoute)(nil), "band.tunnel.v1beta1.AxelarRoute") + proto.RegisterType((*AxelarPacketReceipt)(nil), "band.tunnel.v1beta1.AxelarPacketReceipt") } func init() { proto.RegisterFile("band/tunnel/v1beta1/route.proto", fileDescriptor_543238289d94b7a6) } var fileDescriptor_543238289d94b7a6 = []byte{ - // 881 bytes of a gzipped FileDescriptorProto + // 958 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xcf, 0x6f, 0x1b, 0x45, - 0x18, 0xcd, 0x66, 0xad, 0xc4, 0xfe, 0xdc, 0xa4, 0x65, 0x12, 0x2a, 0xd7, 0x05, 0xdb, 0xf2, 0x05, - 0xa3, 0xb6, 0xbb, 0xaa, 0x23, 0x84, 0x94, 0x0b, 0x64, 0xed, 0x42, 0x57, 0x10, 0x29, 0x5a, 0xe7, - 0xd4, 0x8b, 0x35, 0xd9, 0x19, 0x36, 0x4b, 0xe3, 0x1d, 0x77, 0x67, 0x12, 0xe8, 0xbf, 0x80, 0x38, - 0x20, 0xee, 0xdc, 0x39, 0x72, 0x28, 0x82, 0x3f, 0xa1, 0xca, 0xa9, 0x47, 0xb8, 0x58, 0x68, 0xf3, - 0x07, 0x70, 0xe7, 0x84, 0xe6, 0xc7, 0x3a, 0x5e, 0x6b, 0x91, 0xdc, 0xf6, 0xc2, 0xcd, 0xf3, 0x7d, - 0x6f, 0xde, 0x9b, 0xf7, 0xcd, 0xd3, 0xac, 0xa1, 0x7d, 0x82, 0x13, 0xe2, 0x8a, 0xf3, 0x24, 0xa1, - 0x67, 0xee, 0xc5, 0xc3, 0x13, 0x2a, 0xf0, 0x43, 0x37, 0x65, 0xe7, 0x82, 0x3a, 0xd3, 0x94, 0x09, - 0x86, 0x76, 0x24, 0xc0, 0xd1, 0x00, 0xc7, 0x00, 0x9a, 0x77, 0x42, 0xc6, 0x27, 0x8c, 0x8f, 0x15, - 0xc4, 0xd5, 0x0b, 0x8d, 0x6f, 0xee, 0x46, 0x2c, 0x62, 0xba, 0x2e, 0x7f, 0x99, 0x6a, 0x47, 0xc9, - 0x7c, 0x45, 0x29, 0xe1, 0x73, 0x15, 0x9a, 0x84, 0x8c, 0xd0, 0xd4, 0x20, 0x5a, 0x25, 0x08, 0xb5, - 0xd2, 0xfd, 0xee, 0x9f, 0x16, 0x54, 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, 0xd7, 0x93, 0x6c, 0xaa, 0xfa, + 0x8b, 0x01, 0x5b, 0x39, 0x70, 0x6b, 0x17, 0x36, 0xc4, 0xdd, 0x2d, 0xbb, 0xeb, 0xfa, 0x6c, 0x5a, + 0x2f, 0x0b, 0x77, 0xa5, 0xb6, 0x2a, 0xe3, 0xf9, 0x02, 0xa7, 0x6e, 0xf8, 0x37, 0x23, 0x49, 0x37, + 0x2c, 0x3b, 0xe8, 0x36, 0x94, 0x96, 0x5d, 0x53, 0x0c, 0xb5, 0x55, 0xac, 0x0a, 0xac, 0x4f, 0x94, + 0x2e, 0x39, 0x7a, 0x4b, 0x7e, 0xba, 0x6c, 0xfe, 0x65, 0x40, 0xb9, 0xf3, 0x84, 0x8c, 0x90, 0x7e, + 0x14, 0x5f, 0xfd, 0xe7, 0xa3, 0x78, 0x2f, 0xff, 0x51, 0xbc, 0x54, 0x73, 0x39, 0x8a, 0xbf, 0x44, + 0x63, 0xf2, 0x3f, 0xbd, 0x90, 0x1d, 0x30, 0x8f, 0x08, 0x91, 0xca, 0xc4, 0xdf, 0x8e, 0xfe, 0xd4, + 0x12, 0x1f, 0x57, 0xf3, 0x5b, 0xec, 0xd2, 0x28, 0x4e, 0xed, 0x70, 0x44, 0xc8, 0xf2, 0x03, 0x51, + 0x32, 0xaf, 0xf4, 0x40, 0xdc, 0xfd, 0x9f, 0x66, 0x35, 0xe3, 0xf9, 0xac, 0x66, 0xbc, 0x98, 0xd5, + 0x8c, 0x3f, 0x67, 0x35, 0xe3, 0xfb, 0xf3, 0xda, 0xca, 0x8b, 0xf3, 0xda, 0xca, 0xef, 0xe7, 0xb5, + 0x95, 0x87, 0xce, 0x25, 0x3e, 0x32, 0xf4, 0x17, 0xa6, 0xfc, 0xc6, 0x18, 0xae, 0x49, 0xc4, 0xee, + 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x43, 0x69, 0xbb, 0xf6, 0x7d, 0x0a, 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -1463,6 +1580,60 @@ func (this *RouterMemo_Payload_Msg_ReceiveBandDataArgs) Equal(that interface{}) } return true } +func (this *AxelarRoute) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AxelarRoute) + if !ok { + that2, ok := that.(AxelarRoute) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.DestinationChainID != that1.DestinationChainID { + return false + } + if this.DestinationContractAddress != that1.DestinationContractAddress { + return false + } + if !this.Fee.Equal(&that1.Fee) { + return false + } + return true +} +func (this *AxelarPacketReceipt) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AxelarPacketReceipt) + if !ok { + that2, ok := that.(AxelarPacketReceipt) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Sequence != that1.Sequence { + return false + } + return true +} func (m *TSSRoute) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2072,6 +2243,81 @@ func (m *RouterMemo_Payload_Msg_ReceiveBandDataArgs) MarshalToSizedBuffer(dAtA [ return len(dAtA) - i, nil } +func (m *AxelarRoute) 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 *AxelarRoute) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AxelarRoute) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRoute(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.DestinationContractAddress) > 0 { + i -= len(m.DestinationContractAddress) + copy(dAtA[i:], m.DestinationContractAddress) + i = encodeVarintRoute(dAtA, i, uint64(len(m.DestinationContractAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.DestinationChainID) > 0 { + i -= len(m.DestinationChainID) + copy(dAtA[i:], m.DestinationChainID) + i = encodeVarintRoute(dAtA, i, uint64(len(m.DestinationChainID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AxelarPacketReceipt) 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 *AxelarPacketReceipt) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AxelarPacketReceipt) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Sequence != 0 { + i = encodeVarintRoute(dAtA, i, uint64(m.Sequence)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func encodeVarintRoute(dAtA []byte, offset int, v uint64) int { offset -= sovRoute(v) base := offset @@ -2334,6 +2580,37 @@ func (m *RouterMemo_Payload_Msg_ReceiveBandDataArgs) Size() (n int) { return n } +func (m *AxelarRoute) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DestinationChainID) + if l > 0 { + n += 1 + l + sovRoute(uint64(l)) + } + l = len(m.DestinationContractAddress) + if l > 0 { + n += 1 + l + sovRoute(uint64(l)) + } + l = m.Fee.Size() + n += 1 + l + sovRoute(uint64(l)) + return n +} + +func (m *AxelarPacketReceipt) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Sequence != 0 { + n += 1 + sovRoute(uint64(m.Sequence)) + } + return n +} + func sovRoute(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -4029,6 +4306,222 @@ func (m *RouterMemo_Payload_Msg_ReceiveBandDataArgs) Unmarshal(dAtA []byte) erro } return nil } +func (m *AxelarRoute) 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 ErrIntOverflowRoute + } + 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: AxelarRoute: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AxelarRoute: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationChainID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoute + } + 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 ErrInvalidLengthRoute + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRoute + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationChainID = ChainName(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoute + } + 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 ErrInvalidLengthRoute + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRoute + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoute + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRoute + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRoute + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRoute(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRoute + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AxelarPacketReceipt) 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 ErrIntOverflowRoute + } + 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: AxelarPacketReceipt: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AxelarPacketReceipt: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + m.Sequence = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoute + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipRoute(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRoute + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipRoute(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/tunnel/types/route_axelar.go b/x/tunnel/types/route_axelar.go new file mode 100644 index 000000000..c430ea9bb --- /dev/null +++ b/x/tunnel/types/route_axelar.go @@ -0,0 +1,46 @@ +package types + +import ( + "fmt" + + errorsmod "cosmossdk.io/errors" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// NewAxelarRoute creates a new AxelarRoute instance. +func NewAxelarRoute( + destinationChainID string, + destinationContractAddress string, + fee sdk.Coin, +) *AxelarRoute { + return &AxelarRoute{ + DestinationChainID: ChainName(destinationChainID), + DestinationContractAddress: destinationContractAddress, + Fee: fee, + } +} + +// ValidateBasic validates the AxelarRoute. +func (r *AxelarRoute) ValidateBasic() error { + if !r.Fee.IsValid() || !r.Fee.IsPositive() { + return fmt.Errorf("invalid fee: %s", r.Fee) + } + + if err := r.DestinationChainID.Validate(); err != nil { + return errorsmod.Wrap(err, "invalid destination chain ID") + } + + if err := ValidateString(r.DestinationContractAddress); err != nil { + return errorsmod.Wrap(err, "invalid destination address") + } + + return nil +} + +// NewAxelarPacketReceipt creates a new AxelarPacketReceipt instance. +func NewAxelarPacketReceipt(sequence uint64) *AxelarPacketReceipt { + return &AxelarPacketReceipt{ + Sequence: sequence, + } +}