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