github.com/Finschia/finschia-sdk@v0.49.1/x/feegrant/tx.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: cosmos/feegrant/v1beta1/tx.proto 3 4 package feegrant 5 6 import ( 7 context "context" 8 fmt "fmt" 9 types "github.com/Finschia/finschia-sdk/codec/types" 10 _ "github.com/gogo/protobuf/gogoproto" 11 grpc1 "github.com/gogo/protobuf/grpc" 12 proto "github.com/gogo/protobuf/proto" 13 _ "github.com/regen-network/cosmos-proto" 14 grpc "google.golang.org/grpc" 15 codes "google.golang.org/grpc/codes" 16 status "google.golang.org/grpc/status" 17 io "io" 18 math "math" 19 math_bits "math/bits" 20 ) 21 22 // Reference imports to suppress errors if they are not otherwise used. 23 var _ = proto.Marshal 24 var _ = fmt.Errorf 25 var _ = math.Inf 26 27 // This is a compile-time assertion to ensure that this generated file 28 // is compatible with the proto package it is being compiled against. 29 // A compilation error at this line likely means your copy of the 30 // proto package needs to be updated. 31 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 32 33 // MsgGrantAllowance adds permission for Grantee to spend up to Allowance 34 // of fees from the account of Granter. 35 type MsgGrantAllowance struct { 36 // granter is the address of the user granting an allowance of their funds. 37 Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty" yaml:"granter_address"` 38 // grantee is the address of the user being granted an allowance of another user's funds. 39 Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty" yaml:"grantee_address"` 40 // allowance can be any of basic and filtered fee allowance. 41 Allowance *types.Any `protobuf:"bytes,3,opt,name=allowance,proto3" json:"allowance,omitempty"` 42 } 43 44 func (m *MsgGrantAllowance) Reset() { *m = MsgGrantAllowance{} } 45 func (m *MsgGrantAllowance) String() string { return proto.CompactTextString(m) } 46 func (*MsgGrantAllowance) ProtoMessage() {} 47 func (*MsgGrantAllowance) Descriptor() ([]byte, []int) { 48 return fileDescriptor_dd44ad7946dad783, []int{0} 49 } 50 func (m *MsgGrantAllowance) XXX_Unmarshal(b []byte) error { 51 return m.Unmarshal(b) 52 } 53 func (m *MsgGrantAllowance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 54 if deterministic { 55 return xxx_messageInfo_MsgGrantAllowance.Marshal(b, m, deterministic) 56 } else { 57 b = b[:cap(b)] 58 n, err := m.MarshalToSizedBuffer(b) 59 if err != nil { 60 return nil, err 61 } 62 return b[:n], nil 63 } 64 } 65 func (m *MsgGrantAllowance) XXX_Merge(src proto.Message) { 66 xxx_messageInfo_MsgGrantAllowance.Merge(m, src) 67 } 68 func (m *MsgGrantAllowance) XXX_Size() int { 69 return m.Size() 70 } 71 func (m *MsgGrantAllowance) XXX_DiscardUnknown() { 72 xxx_messageInfo_MsgGrantAllowance.DiscardUnknown(m) 73 } 74 75 var xxx_messageInfo_MsgGrantAllowance proto.InternalMessageInfo 76 77 func (m *MsgGrantAllowance) GetGranter() string { 78 if m != nil { 79 return m.Granter 80 } 81 return "" 82 } 83 84 func (m *MsgGrantAllowance) GetGrantee() string { 85 if m != nil { 86 return m.Grantee 87 } 88 return "" 89 } 90 91 func (m *MsgGrantAllowance) GetAllowance() *types.Any { 92 if m != nil { 93 return m.Allowance 94 } 95 return nil 96 } 97 98 // MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. 99 type MsgGrantAllowanceResponse struct { 100 } 101 102 func (m *MsgGrantAllowanceResponse) Reset() { *m = MsgGrantAllowanceResponse{} } 103 func (m *MsgGrantAllowanceResponse) String() string { return proto.CompactTextString(m) } 104 func (*MsgGrantAllowanceResponse) ProtoMessage() {} 105 func (*MsgGrantAllowanceResponse) Descriptor() ([]byte, []int) { 106 return fileDescriptor_dd44ad7946dad783, []int{1} 107 } 108 func (m *MsgGrantAllowanceResponse) XXX_Unmarshal(b []byte) error { 109 return m.Unmarshal(b) 110 } 111 func (m *MsgGrantAllowanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 112 if deterministic { 113 return xxx_messageInfo_MsgGrantAllowanceResponse.Marshal(b, m, deterministic) 114 } else { 115 b = b[:cap(b)] 116 n, err := m.MarshalToSizedBuffer(b) 117 if err != nil { 118 return nil, err 119 } 120 return b[:n], nil 121 } 122 } 123 func (m *MsgGrantAllowanceResponse) XXX_Merge(src proto.Message) { 124 xxx_messageInfo_MsgGrantAllowanceResponse.Merge(m, src) 125 } 126 func (m *MsgGrantAllowanceResponse) XXX_Size() int { 127 return m.Size() 128 } 129 func (m *MsgGrantAllowanceResponse) XXX_DiscardUnknown() { 130 xxx_messageInfo_MsgGrantAllowanceResponse.DiscardUnknown(m) 131 } 132 133 var xxx_messageInfo_MsgGrantAllowanceResponse proto.InternalMessageInfo 134 135 // MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. 136 type MsgRevokeAllowance struct { 137 // granter is the address of the user granting an allowance of their funds. 138 Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty" yaml:"granter_address"` 139 // grantee is the address of the user being granted an allowance of another user's funds. 140 Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty" yaml:"grantee_address"` 141 } 142 143 func (m *MsgRevokeAllowance) Reset() { *m = MsgRevokeAllowance{} } 144 func (m *MsgRevokeAllowance) String() string { return proto.CompactTextString(m) } 145 func (*MsgRevokeAllowance) ProtoMessage() {} 146 func (*MsgRevokeAllowance) Descriptor() ([]byte, []int) { 147 return fileDescriptor_dd44ad7946dad783, []int{2} 148 } 149 func (m *MsgRevokeAllowance) XXX_Unmarshal(b []byte) error { 150 return m.Unmarshal(b) 151 } 152 func (m *MsgRevokeAllowance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 153 if deterministic { 154 return xxx_messageInfo_MsgRevokeAllowance.Marshal(b, m, deterministic) 155 } else { 156 b = b[:cap(b)] 157 n, err := m.MarshalToSizedBuffer(b) 158 if err != nil { 159 return nil, err 160 } 161 return b[:n], nil 162 } 163 } 164 func (m *MsgRevokeAllowance) XXX_Merge(src proto.Message) { 165 xxx_messageInfo_MsgRevokeAllowance.Merge(m, src) 166 } 167 func (m *MsgRevokeAllowance) XXX_Size() int { 168 return m.Size() 169 } 170 func (m *MsgRevokeAllowance) XXX_DiscardUnknown() { 171 xxx_messageInfo_MsgRevokeAllowance.DiscardUnknown(m) 172 } 173 174 var xxx_messageInfo_MsgRevokeAllowance proto.InternalMessageInfo 175 176 func (m *MsgRevokeAllowance) GetGranter() string { 177 if m != nil { 178 return m.Granter 179 } 180 return "" 181 } 182 183 func (m *MsgRevokeAllowance) GetGrantee() string { 184 if m != nil { 185 return m.Grantee 186 } 187 return "" 188 } 189 190 // MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. 191 type MsgRevokeAllowanceResponse struct { 192 } 193 194 func (m *MsgRevokeAllowanceResponse) Reset() { *m = MsgRevokeAllowanceResponse{} } 195 func (m *MsgRevokeAllowanceResponse) String() string { return proto.CompactTextString(m) } 196 func (*MsgRevokeAllowanceResponse) ProtoMessage() {} 197 func (*MsgRevokeAllowanceResponse) Descriptor() ([]byte, []int) { 198 return fileDescriptor_dd44ad7946dad783, []int{3} 199 } 200 func (m *MsgRevokeAllowanceResponse) XXX_Unmarshal(b []byte) error { 201 return m.Unmarshal(b) 202 } 203 func (m *MsgRevokeAllowanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 204 if deterministic { 205 return xxx_messageInfo_MsgRevokeAllowanceResponse.Marshal(b, m, deterministic) 206 } else { 207 b = b[:cap(b)] 208 n, err := m.MarshalToSizedBuffer(b) 209 if err != nil { 210 return nil, err 211 } 212 return b[:n], nil 213 } 214 } 215 func (m *MsgRevokeAllowanceResponse) XXX_Merge(src proto.Message) { 216 xxx_messageInfo_MsgRevokeAllowanceResponse.Merge(m, src) 217 } 218 func (m *MsgRevokeAllowanceResponse) XXX_Size() int { 219 return m.Size() 220 } 221 func (m *MsgRevokeAllowanceResponse) XXX_DiscardUnknown() { 222 xxx_messageInfo_MsgRevokeAllowanceResponse.DiscardUnknown(m) 223 } 224 225 var xxx_messageInfo_MsgRevokeAllowanceResponse proto.InternalMessageInfo 226 227 func init() { 228 proto.RegisterType((*MsgGrantAllowance)(nil), "cosmos.feegrant.v1beta1.MsgGrantAllowance") 229 proto.RegisterType((*MsgGrantAllowanceResponse)(nil), "cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse") 230 proto.RegisterType((*MsgRevokeAllowance)(nil), "cosmos.feegrant.v1beta1.MsgRevokeAllowance") 231 proto.RegisterType((*MsgRevokeAllowanceResponse)(nil), "cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse") 232 } 233 234 func init() { proto.RegisterFile("cosmos/feegrant/v1beta1/tx.proto", fileDescriptor_dd44ad7946dad783) } 235 236 var fileDescriptor_dd44ad7946dad783 = []byte{ 237 // 376 bytes of a gzipped FileDescriptorProto 238 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x48, 0xce, 0x2f, 0xce, 239 0xcd, 0x2f, 0xd6, 0x4f, 0x4b, 0x4d, 0x4d, 0x2f, 0x4a, 0xcc, 0x2b, 0xd1, 0x2f, 0x33, 0x4c, 0x4a, 240 0x2d, 0x49, 0x34, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x87, 0xa8, 241 0xd0, 0x83, 0xa9, 0xd0, 0x83, 0xaa, 0x90, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xab, 0xd1, 0x07, 242 0xb1, 0x20, 0xca, 0xa5, 0x24, 0xd3, 0xf3, 0xf3, 0xd3, 0x73, 0x52, 0xf5, 0xc1, 0xbc, 0xa4, 0xd2, 243 0x34, 0xfd, 0xc4, 0xbc, 0x4a, 0x98, 0x14, 0xc4, 0xa4, 0x78, 0x88, 0x1e, 0xa8, 0xb1, 0x60, 0x8e, 244 0xd2, 0x31, 0x46, 0x2e, 0x41, 0xdf, 0xe2, 0x74, 0x77, 0x90, 0x05, 0x8e, 0x39, 0x39, 0xf9, 0xe5, 245 0x89, 0x79, 0xc9, 0xa9, 0x42, 0x26, 0x5c, 0xec, 0x60, 0x2b, 0x53, 0x8b, 0x24, 0x18, 0x15, 0x18, 246 0x35, 0x38, 0x9d, 0xa4, 0x3e, 0xdd, 0x93, 0x17, 0xab, 0x4c, 0xcc, 0xcd, 0xb1, 0x52, 0x82, 0x4a, 247 0xc4, 0x27, 0xa6, 0xa4, 0x14, 0xa5, 0x16, 0x17, 0x2b, 0x05, 0xc1, 0x94, 0x22, 0x74, 0xa5, 0x4a, 248 0x30, 0x61, 0xd7, 0x95, 0x8a, 0xa1, 0x2b, 0x55, 0xc8, 0x95, 0x8b, 0x33, 0x11, 0x66, 0xb1, 0x04, 249 0xb3, 0x02, 0xa3, 0x06, 0xb7, 0x91, 0x88, 0x1e, 0xc4, 0x2f, 0x7a, 0x30, 0xbf, 0xe8, 0x39, 0xe6, 250 0x55, 0x3a, 0x09, 0x9e, 0xda, 0xa2, 0xcb, 0xeb, 0x96, 0x9a, 0x0a, 0x77, 0xa6, 0x67, 0x10, 0x42, 251 0xa7, 0x92, 0x34, 0x97, 0x24, 0x86, 0x3f, 0x82, 0x52, 0x8b, 0x0b, 0xf2, 0xf3, 0x8a, 0x53, 0x95, 252 0x1a, 0x18, 0xb9, 0x84, 0x7c, 0x8b, 0xd3, 0x83, 0x52, 0xcb, 0xf2, 0xb3, 0x53, 0x07, 0xc4, 0x9b, 253 0x4a, 0x32, 0x5c, 0x52, 0x98, 0x2e, 0x80, 0x39, 0xd0, 0xe8, 0x0d, 0x23, 0x17, 0xb3, 0x6f, 0x71, 254 0xba, 0x50, 0x01, 0x17, 0x1f, 0x5a, 0x54, 0x68, 0xe9, 0xe1, 0x48, 0x06, 0x7a, 0x18, 0xde, 0x95, 255 0x32, 0x22, 0x5e, 0x2d, 0xcc, 0x66, 0xa1, 0x62, 0x2e, 0x7e, 0xf4, 0x60, 0xd1, 0xc6, 0x67, 0x0c, 256 0x9a, 0x62, 0x29, 0x63, 0x12, 0x14, 0xc3, 0x2c, 0x75, 0x72, 0x3d, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 257 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 258 0xc6, 0x63, 0x39, 0x86, 0x28, 0xed, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 259 0x7d, 0xb7, 0xcc, 0xbc, 0xe2, 0xe4, 0x8c, 0xcc, 0x44, 0xfd, 0x34, 0x28, 0x43, 0xb7, 0x38, 0x25, 260 0x5b, 0xbf, 0x02, 0x9e, 0x65, 0x92, 0xd8, 0xc0, 0xe9, 0xc3, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 261 0x36, 0x91, 0x94, 0xa3, 0x4c, 0x03, 0x00, 0x00, 262 } 263 264 // Reference imports to suppress errors if they are not otherwise used. 265 var _ context.Context 266 var _ grpc.ClientConn 267 268 // This is a compile-time assertion to ensure that this generated file 269 // is compatible with the grpc package it is being compiled against. 270 const _ = grpc.SupportPackageIsVersion4 271 272 // MsgClient is the client API for Msg service. 273 // 274 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 275 type MsgClient interface { 276 // GrantAllowance grants fee allowance to the grantee on the granter's 277 // account with the provided expiration time. 278 GrantAllowance(ctx context.Context, in *MsgGrantAllowance, opts ...grpc.CallOption) (*MsgGrantAllowanceResponse, error) 279 // RevokeAllowance revokes any fee allowance of granter's account that 280 // has been granted to the grantee. 281 RevokeAllowance(ctx context.Context, in *MsgRevokeAllowance, opts ...grpc.CallOption) (*MsgRevokeAllowanceResponse, error) 282 } 283 284 type msgClient struct { 285 cc grpc1.ClientConn 286 } 287 288 func NewMsgClient(cc grpc1.ClientConn) MsgClient { 289 return &msgClient{cc} 290 } 291 292 func (c *msgClient) GrantAllowance(ctx context.Context, in *MsgGrantAllowance, opts ...grpc.CallOption) (*MsgGrantAllowanceResponse, error) { 293 out := new(MsgGrantAllowanceResponse) 294 err := c.cc.Invoke(ctx, "/cosmos.feegrant.v1beta1.Msg/GrantAllowance", in, out, opts...) 295 if err != nil { 296 return nil, err 297 } 298 return out, nil 299 } 300 301 func (c *msgClient) RevokeAllowance(ctx context.Context, in *MsgRevokeAllowance, opts ...grpc.CallOption) (*MsgRevokeAllowanceResponse, error) { 302 out := new(MsgRevokeAllowanceResponse) 303 err := c.cc.Invoke(ctx, "/cosmos.feegrant.v1beta1.Msg/RevokeAllowance", in, out, opts...) 304 if err != nil { 305 return nil, err 306 } 307 return out, nil 308 } 309 310 // MsgServer is the server API for Msg service. 311 type MsgServer interface { 312 // GrantAllowance grants fee allowance to the grantee on the granter's 313 // account with the provided expiration time. 314 GrantAllowance(context.Context, *MsgGrantAllowance) (*MsgGrantAllowanceResponse, error) 315 // RevokeAllowance revokes any fee allowance of granter's account that 316 // has been granted to the grantee. 317 RevokeAllowance(context.Context, *MsgRevokeAllowance) (*MsgRevokeAllowanceResponse, error) 318 } 319 320 // UnimplementedMsgServer can be embedded to have forward compatible implementations. 321 type UnimplementedMsgServer struct { 322 } 323 324 func (*UnimplementedMsgServer) GrantAllowance(ctx context.Context, req *MsgGrantAllowance) (*MsgGrantAllowanceResponse, error) { 325 return nil, status.Errorf(codes.Unimplemented, "method GrantAllowance not implemented") 326 } 327 func (*UnimplementedMsgServer) RevokeAllowance(ctx context.Context, req *MsgRevokeAllowance) (*MsgRevokeAllowanceResponse, error) { 328 return nil, status.Errorf(codes.Unimplemented, "method RevokeAllowance not implemented") 329 } 330 331 func RegisterMsgServer(s grpc1.Server, srv MsgServer) { 332 s.RegisterService(&_Msg_serviceDesc, srv) 333 } 334 335 func _Msg_GrantAllowance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 336 in := new(MsgGrantAllowance) 337 if err := dec(in); err != nil { 338 return nil, err 339 } 340 if interceptor == nil { 341 return srv.(MsgServer).GrantAllowance(ctx, in) 342 } 343 info := &grpc.UnaryServerInfo{ 344 Server: srv, 345 FullMethod: "/cosmos.feegrant.v1beta1.Msg/GrantAllowance", 346 } 347 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 348 return srv.(MsgServer).GrantAllowance(ctx, req.(*MsgGrantAllowance)) 349 } 350 return interceptor(ctx, in, info, handler) 351 } 352 353 func _Msg_RevokeAllowance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 354 in := new(MsgRevokeAllowance) 355 if err := dec(in); err != nil { 356 return nil, err 357 } 358 if interceptor == nil { 359 return srv.(MsgServer).RevokeAllowance(ctx, in) 360 } 361 info := &grpc.UnaryServerInfo{ 362 Server: srv, 363 FullMethod: "/cosmos.feegrant.v1beta1.Msg/RevokeAllowance", 364 } 365 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 366 return srv.(MsgServer).RevokeAllowance(ctx, req.(*MsgRevokeAllowance)) 367 } 368 return interceptor(ctx, in, info, handler) 369 } 370 371 var _Msg_serviceDesc = grpc.ServiceDesc{ 372 ServiceName: "cosmos.feegrant.v1beta1.Msg", 373 HandlerType: (*MsgServer)(nil), 374 Methods: []grpc.MethodDesc{ 375 { 376 MethodName: "GrantAllowance", 377 Handler: _Msg_GrantAllowance_Handler, 378 }, 379 { 380 MethodName: "RevokeAllowance", 381 Handler: _Msg_RevokeAllowance_Handler, 382 }, 383 }, 384 Streams: []grpc.StreamDesc{}, 385 Metadata: "cosmos/feegrant/v1beta1/tx.proto", 386 } 387 388 func (m *MsgGrantAllowance) Marshal() (dAtA []byte, err error) { 389 size := m.Size() 390 dAtA = make([]byte, size) 391 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 392 if err != nil { 393 return nil, err 394 } 395 return dAtA[:n], nil 396 } 397 398 func (m *MsgGrantAllowance) MarshalTo(dAtA []byte) (int, error) { 399 size := m.Size() 400 return m.MarshalToSizedBuffer(dAtA[:size]) 401 } 402 403 func (m *MsgGrantAllowance) MarshalToSizedBuffer(dAtA []byte) (int, error) { 404 i := len(dAtA) 405 _ = i 406 var l int 407 _ = l 408 if m.Allowance != nil { 409 { 410 size, err := m.Allowance.MarshalToSizedBuffer(dAtA[:i]) 411 if err != nil { 412 return 0, err 413 } 414 i -= size 415 i = encodeVarintTx(dAtA, i, uint64(size)) 416 } 417 i-- 418 dAtA[i] = 0x1a 419 } 420 if len(m.Grantee) > 0 { 421 i -= len(m.Grantee) 422 copy(dAtA[i:], m.Grantee) 423 i = encodeVarintTx(dAtA, i, uint64(len(m.Grantee))) 424 i-- 425 dAtA[i] = 0x12 426 } 427 if len(m.Granter) > 0 { 428 i -= len(m.Granter) 429 copy(dAtA[i:], m.Granter) 430 i = encodeVarintTx(dAtA, i, uint64(len(m.Granter))) 431 i-- 432 dAtA[i] = 0xa 433 } 434 return len(dAtA) - i, nil 435 } 436 437 func (m *MsgGrantAllowanceResponse) Marshal() (dAtA []byte, err error) { 438 size := m.Size() 439 dAtA = make([]byte, size) 440 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 441 if err != nil { 442 return nil, err 443 } 444 return dAtA[:n], nil 445 } 446 447 func (m *MsgGrantAllowanceResponse) MarshalTo(dAtA []byte) (int, error) { 448 size := m.Size() 449 return m.MarshalToSizedBuffer(dAtA[:size]) 450 } 451 452 func (m *MsgGrantAllowanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 453 i := len(dAtA) 454 _ = i 455 var l int 456 _ = l 457 return len(dAtA) - i, nil 458 } 459 460 func (m *MsgRevokeAllowance) Marshal() (dAtA []byte, err error) { 461 size := m.Size() 462 dAtA = make([]byte, size) 463 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 464 if err != nil { 465 return nil, err 466 } 467 return dAtA[:n], nil 468 } 469 470 func (m *MsgRevokeAllowance) MarshalTo(dAtA []byte) (int, error) { 471 size := m.Size() 472 return m.MarshalToSizedBuffer(dAtA[:size]) 473 } 474 475 func (m *MsgRevokeAllowance) MarshalToSizedBuffer(dAtA []byte) (int, error) { 476 i := len(dAtA) 477 _ = i 478 var l int 479 _ = l 480 if len(m.Grantee) > 0 { 481 i -= len(m.Grantee) 482 copy(dAtA[i:], m.Grantee) 483 i = encodeVarintTx(dAtA, i, uint64(len(m.Grantee))) 484 i-- 485 dAtA[i] = 0x12 486 } 487 if len(m.Granter) > 0 { 488 i -= len(m.Granter) 489 copy(dAtA[i:], m.Granter) 490 i = encodeVarintTx(dAtA, i, uint64(len(m.Granter))) 491 i-- 492 dAtA[i] = 0xa 493 } 494 return len(dAtA) - i, nil 495 } 496 497 func (m *MsgRevokeAllowanceResponse) Marshal() (dAtA []byte, err error) { 498 size := m.Size() 499 dAtA = make([]byte, size) 500 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 501 if err != nil { 502 return nil, err 503 } 504 return dAtA[:n], nil 505 } 506 507 func (m *MsgRevokeAllowanceResponse) MarshalTo(dAtA []byte) (int, error) { 508 size := m.Size() 509 return m.MarshalToSizedBuffer(dAtA[:size]) 510 } 511 512 func (m *MsgRevokeAllowanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 513 i := len(dAtA) 514 _ = i 515 var l int 516 _ = l 517 return len(dAtA) - i, nil 518 } 519 520 func encodeVarintTx(dAtA []byte, offset int, v uint64) int { 521 offset -= sovTx(v) 522 base := offset 523 for v >= 1<<7 { 524 dAtA[offset] = uint8(v&0x7f | 0x80) 525 v >>= 7 526 offset++ 527 } 528 dAtA[offset] = uint8(v) 529 return base 530 } 531 func (m *MsgGrantAllowance) Size() (n int) { 532 if m == nil { 533 return 0 534 } 535 var l int 536 _ = l 537 l = len(m.Granter) 538 if l > 0 { 539 n += 1 + l + sovTx(uint64(l)) 540 } 541 l = len(m.Grantee) 542 if l > 0 { 543 n += 1 + l + sovTx(uint64(l)) 544 } 545 if m.Allowance != nil { 546 l = m.Allowance.Size() 547 n += 1 + l + sovTx(uint64(l)) 548 } 549 return n 550 } 551 552 func (m *MsgGrantAllowanceResponse) Size() (n int) { 553 if m == nil { 554 return 0 555 } 556 var l int 557 _ = l 558 return n 559 } 560 561 func (m *MsgRevokeAllowance) Size() (n int) { 562 if m == nil { 563 return 0 564 } 565 var l int 566 _ = l 567 l = len(m.Granter) 568 if l > 0 { 569 n += 1 + l + sovTx(uint64(l)) 570 } 571 l = len(m.Grantee) 572 if l > 0 { 573 n += 1 + l + sovTx(uint64(l)) 574 } 575 return n 576 } 577 578 func (m *MsgRevokeAllowanceResponse) Size() (n int) { 579 if m == nil { 580 return 0 581 } 582 var l int 583 _ = l 584 return n 585 } 586 587 func sovTx(x uint64) (n int) { 588 return (math_bits.Len64(x|1) + 6) / 7 589 } 590 func sozTx(x uint64) (n int) { 591 return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 592 } 593 func (m *MsgGrantAllowance) Unmarshal(dAtA []byte) error { 594 l := len(dAtA) 595 iNdEx := 0 596 for iNdEx < l { 597 preIndex := iNdEx 598 var wire uint64 599 for shift := uint(0); ; shift += 7 { 600 if shift >= 64 { 601 return ErrIntOverflowTx 602 } 603 if iNdEx >= l { 604 return io.ErrUnexpectedEOF 605 } 606 b := dAtA[iNdEx] 607 iNdEx++ 608 wire |= uint64(b&0x7F) << shift 609 if b < 0x80 { 610 break 611 } 612 } 613 fieldNum := int32(wire >> 3) 614 wireType := int(wire & 0x7) 615 if wireType == 4 { 616 return fmt.Errorf("proto: MsgGrantAllowance: wiretype end group for non-group") 617 } 618 if fieldNum <= 0 { 619 return fmt.Errorf("proto: MsgGrantAllowance: illegal tag %d (wire type %d)", fieldNum, wire) 620 } 621 switch fieldNum { 622 case 1: 623 if wireType != 2 { 624 return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) 625 } 626 var stringLen uint64 627 for shift := uint(0); ; shift += 7 { 628 if shift >= 64 { 629 return ErrIntOverflowTx 630 } 631 if iNdEx >= l { 632 return io.ErrUnexpectedEOF 633 } 634 b := dAtA[iNdEx] 635 iNdEx++ 636 stringLen |= uint64(b&0x7F) << shift 637 if b < 0x80 { 638 break 639 } 640 } 641 intStringLen := int(stringLen) 642 if intStringLen < 0 { 643 return ErrInvalidLengthTx 644 } 645 postIndex := iNdEx + intStringLen 646 if postIndex < 0 { 647 return ErrInvalidLengthTx 648 } 649 if postIndex > l { 650 return io.ErrUnexpectedEOF 651 } 652 m.Granter = string(dAtA[iNdEx:postIndex]) 653 iNdEx = postIndex 654 case 2: 655 if wireType != 2 { 656 return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) 657 } 658 var stringLen uint64 659 for shift := uint(0); ; shift += 7 { 660 if shift >= 64 { 661 return ErrIntOverflowTx 662 } 663 if iNdEx >= l { 664 return io.ErrUnexpectedEOF 665 } 666 b := dAtA[iNdEx] 667 iNdEx++ 668 stringLen |= uint64(b&0x7F) << shift 669 if b < 0x80 { 670 break 671 } 672 } 673 intStringLen := int(stringLen) 674 if intStringLen < 0 { 675 return ErrInvalidLengthTx 676 } 677 postIndex := iNdEx + intStringLen 678 if postIndex < 0 { 679 return ErrInvalidLengthTx 680 } 681 if postIndex > l { 682 return io.ErrUnexpectedEOF 683 } 684 m.Grantee = string(dAtA[iNdEx:postIndex]) 685 iNdEx = postIndex 686 case 3: 687 if wireType != 2 { 688 return fmt.Errorf("proto: wrong wireType = %d for field Allowance", wireType) 689 } 690 var msglen int 691 for shift := uint(0); ; shift += 7 { 692 if shift >= 64 { 693 return ErrIntOverflowTx 694 } 695 if iNdEx >= l { 696 return io.ErrUnexpectedEOF 697 } 698 b := dAtA[iNdEx] 699 iNdEx++ 700 msglen |= int(b&0x7F) << shift 701 if b < 0x80 { 702 break 703 } 704 } 705 if msglen < 0 { 706 return ErrInvalidLengthTx 707 } 708 postIndex := iNdEx + msglen 709 if postIndex < 0 { 710 return ErrInvalidLengthTx 711 } 712 if postIndex > l { 713 return io.ErrUnexpectedEOF 714 } 715 if m.Allowance == nil { 716 m.Allowance = &types.Any{} 717 } 718 if err := m.Allowance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 719 return err 720 } 721 iNdEx = postIndex 722 default: 723 iNdEx = preIndex 724 skippy, err := skipTx(dAtA[iNdEx:]) 725 if err != nil { 726 return err 727 } 728 if (skippy < 0) || (iNdEx+skippy) < 0 { 729 return ErrInvalidLengthTx 730 } 731 if (iNdEx + skippy) > l { 732 return io.ErrUnexpectedEOF 733 } 734 iNdEx += skippy 735 } 736 } 737 738 if iNdEx > l { 739 return io.ErrUnexpectedEOF 740 } 741 return nil 742 } 743 func (m *MsgGrantAllowanceResponse) Unmarshal(dAtA []byte) error { 744 l := len(dAtA) 745 iNdEx := 0 746 for iNdEx < l { 747 preIndex := iNdEx 748 var wire uint64 749 for shift := uint(0); ; shift += 7 { 750 if shift >= 64 { 751 return ErrIntOverflowTx 752 } 753 if iNdEx >= l { 754 return io.ErrUnexpectedEOF 755 } 756 b := dAtA[iNdEx] 757 iNdEx++ 758 wire |= uint64(b&0x7F) << shift 759 if b < 0x80 { 760 break 761 } 762 } 763 fieldNum := int32(wire >> 3) 764 wireType := int(wire & 0x7) 765 if wireType == 4 { 766 return fmt.Errorf("proto: MsgGrantAllowanceResponse: wiretype end group for non-group") 767 } 768 if fieldNum <= 0 { 769 return fmt.Errorf("proto: MsgGrantAllowanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) 770 } 771 switch fieldNum { 772 default: 773 iNdEx = preIndex 774 skippy, err := skipTx(dAtA[iNdEx:]) 775 if err != nil { 776 return err 777 } 778 if (skippy < 0) || (iNdEx+skippy) < 0 { 779 return ErrInvalidLengthTx 780 } 781 if (iNdEx + skippy) > l { 782 return io.ErrUnexpectedEOF 783 } 784 iNdEx += skippy 785 } 786 } 787 788 if iNdEx > l { 789 return io.ErrUnexpectedEOF 790 } 791 return nil 792 } 793 func (m *MsgRevokeAllowance) Unmarshal(dAtA []byte) error { 794 l := len(dAtA) 795 iNdEx := 0 796 for iNdEx < l { 797 preIndex := iNdEx 798 var wire uint64 799 for shift := uint(0); ; shift += 7 { 800 if shift >= 64 { 801 return ErrIntOverflowTx 802 } 803 if iNdEx >= l { 804 return io.ErrUnexpectedEOF 805 } 806 b := dAtA[iNdEx] 807 iNdEx++ 808 wire |= uint64(b&0x7F) << shift 809 if b < 0x80 { 810 break 811 } 812 } 813 fieldNum := int32(wire >> 3) 814 wireType := int(wire & 0x7) 815 if wireType == 4 { 816 return fmt.Errorf("proto: MsgRevokeAllowance: wiretype end group for non-group") 817 } 818 if fieldNum <= 0 { 819 return fmt.Errorf("proto: MsgRevokeAllowance: illegal tag %d (wire type %d)", fieldNum, wire) 820 } 821 switch fieldNum { 822 case 1: 823 if wireType != 2 { 824 return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) 825 } 826 var stringLen uint64 827 for shift := uint(0); ; shift += 7 { 828 if shift >= 64 { 829 return ErrIntOverflowTx 830 } 831 if iNdEx >= l { 832 return io.ErrUnexpectedEOF 833 } 834 b := dAtA[iNdEx] 835 iNdEx++ 836 stringLen |= uint64(b&0x7F) << shift 837 if b < 0x80 { 838 break 839 } 840 } 841 intStringLen := int(stringLen) 842 if intStringLen < 0 { 843 return ErrInvalidLengthTx 844 } 845 postIndex := iNdEx + intStringLen 846 if postIndex < 0 { 847 return ErrInvalidLengthTx 848 } 849 if postIndex > l { 850 return io.ErrUnexpectedEOF 851 } 852 m.Granter = string(dAtA[iNdEx:postIndex]) 853 iNdEx = postIndex 854 case 2: 855 if wireType != 2 { 856 return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) 857 } 858 var stringLen uint64 859 for shift := uint(0); ; shift += 7 { 860 if shift >= 64 { 861 return ErrIntOverflowTx 862 } 863 if iNdEx >= l { 864 return io.ErrUnexpectedEOF 865 } 866 b := dAtA[iNdEx] 867 iNdEx++ 868 stringLen |= uint64(b&0x7F) << shift 869 if b < 0x80 { 870 break 871 } 872 } 873 intStringLen := int(stringLen) 874 if intStringLen < 0 { 875 return ErrInvalidLengthTx 876 } 877 postIndex := iNdEx + intStringLen 878 if postIndex < 0 { 879 return ErrInvalidLengthTx 880 } 881 if postIndex > l { 882 return io.ErrUnexpectedEOF 883 } 884 m.Grantee = string(dAtA[iNdEx:postIndex]) 885 iNdEx = postIndex 886 default: 887 iNdEx = preIndex 888 skippy, err := skipTx(dAtA[iNdEx:]) 889 if err != nil { 890 return err 891 } 892 if (skippy < 0) || (iNdEx+skippy) < 0 { 893 return ErrInvalidLengthTx 894 } 895 if (iNdEx + skippy) > l { 896 return io.ErrUnexpectedEOF 897 } 898 iNdEx += skippy 899 } 900 } 901 902 if iNdEx > l { 903 return io.ErrUnexpectedEOF 904 } 905 return nil 906 } 907 func (m *MsgRevokeAllowanceResponse) Unmarshal(dAtA []byte) error { 908 l := len(dAtA) 909 iNdEx := 0 910 for iNdEx < l { 911 preIndex := iNdEx 912 var wire uint64 913 for shift := uint(0); ; shift += 7 { 914 if shift >= 64 { 915 return ErrIntOverflowTx 916 } 917 if iNdEx >= l { 918 return io.ErrUnexpectedEOF 919 } 920 b := dAtA[iNdEx] 921 iNdEx++ 922 wire |= uint64(b&0x7F) << shift 923 if b < 0x80 { 924 break 925 } 926 } 927 fieldNum := int32(wire >> 3) 928 wireType := int(wire & 0x7) 929 if wireType == 4 { 930 return fmt.Errorf("proto: MsgRevokeAllowanceResponse: wiretype end group for non-group") 931 } 932 if fieldNum <= 0 { 933 return fmt.Errorf("proto: MsgRevokeAllowanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) 934 } 935 switch fieldNum { 936 default: 937 iNdEx = preIndex 938 skippy, err := skipTx(dAtA[iNdEx:]) 939 if err != nil { 940 return err 941 } 942 if (skippy < 0) || (iNdEx+skippy) < 0 { 943 return ErrInvalidLengthTx 944 } 945 if (iNdEx + skippy) > l { 946 return io.ErrUnexpectedEOF 947 } 948 iNdEx += skippy 949 } 950 } 951 952 if iNdEx > l { 953 return io.ErrUnexpectedEOF 954 } 955 return nil 956 } 957 func skipTx(dAtA []byte) (n int, err error) { 958 l := len(dAtA) 959 iNdEx := 0 960 depth := 0 961 for iNdEx < l { 962 var wire uint64 963 for shift := uint(0); ; shift += 7 { 964 if shift >= 64 { 965 return 0, ErrIntOverflowTx 966 } 967 if iNdEx >= l { 968 return 0, io.ErrUnexpectedEOF 969 } 970 b := dAtA[iNdEx] 971 iNdEx++ 972 wire |= (uint64(b) & 0x7F) << shift 973 if b < 0x80 { 974 break 975 } 976 } 977 wireType := int(wire & 0x7) 978 switch wireType { 979 case 0: 980 for shift := uint(0); ; shift += 7 { 981 if shift >= 64 { 982 return 0, ErrIntOverflowTx 983 } 984 if iNdEx >= l { 985 return 0, io.ErrUnexpectedEOF 986 } 987 iNdEx++ 988 if dAtA[iNdEx-1] < 0x80 { 989 break 990 } 991 } 992 case 1: 993 iNdEx += 8 994 case 2: 995 var length int 996 for shift := uint(0); ; shift += 7 { 997 if shift >= 64 { 998 return 0, ErrIntOverflowTx 999 } 1000 if iNdEx >= l { 1001 return 0, io.ErrUnexpectedEOF 1002 } 1003 b := dAtA[iNdEx] 1004 iNdEx++ 1005 length |= (int(b) & 0x7F) << shift 1006 if b < 0x80 { 1007 break 1008 } 1009 } 1010 if length < 0 { 1011 return 0, ErrInvalidLengthTx 1012 } 1013 iNdEx += length 1014 case 3: 1015 depth++ 1016 case 4: 1017 if depth == 0 { 1018 return 0, ErrUnexpectedEndOfGroupTx 1019 } 1020 depth-- 1021 case 5: 1022 iNdEx += 4 1023 default: 1024 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1025 } 1026 if iNdEx < 0 { 1027 return 0, ErrInvalidLengthTx 1028 } 1029 if depth == 0 { 1030 return iNdEx, nil 1031 } 1032 } 1033 return 0, io.ErrUnexpectedEOF 1034 } 1035 1036 var ( 1037 ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") 1038 ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") 1039 ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") 1040 )