cosmos-sdk/x/bank/types/bank.pb.go

2113 lines
49 KiB
Go

// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: cosmos/bank/v1beta1/bank.proto
package types
import (
fmt "fmt"
_ "github.com/cosmos/cosmos-proto"
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
types "github.com/cosmos/cosmos-sdk/types"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
io "io"
math "math"
math_bits "math/bits"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// Params defines the parameters for the bank module.
type Params struct {
SendEnabled []*SendEnabled `protobuf:"bytes,1,rep,name=send_enabled,json=sendEnabled,proto3" json:"send_enabled,omitempty"`
DefaultSendEnabled bool `protobuf:"varint,2,opt,name=default_send_enabled,json=defaultSendEnabled,proto3" json:"default_send_enabled,omitempty"`
}
func (m *Params) Reset() { *m = Params{} }
func (*Params) ProtoMessage() {}
func (*Params) Descriptor() ([]byte, []int) {
return fileDescriptor_dd052eee12edf988, []int{0}
}
func (m *Params) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) {
xxx_messageInfo_Params.Merge(m, src)
}
func (m *Params) XXX_Size() int {
return m.Size()
}
func (m *Params) XXX_DiscardUnknown() {
xxx_messageInfo_Params.DiscardUnknown(m)
}
var xxx_messageInfo_Params proto.InternalMessageInfo
func (m *Params) GetSendEnabled() []*SendEnabled {
if m != nil {
return m.SendEnabled
}
return nil
}
func (m *Params) GetDefaultSendEnabled() bool {
if m != nil {
return m.DefaultSendEnabled
}
return false
}
// SendEnabled maps coin denom to a send_enabled status (whether a denom is
// sendable).
type SendEnabled struct {
Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
Enabled bool `protobuf:"varint,2,opt,name=enabled,proto3" json:"enabled,omitempty"`
}
func (m *SendEnabled) Reset() { *m = SendEnabled{} }
func (*SendEnabled) ProtoMessage() {}
func (*SendEnabled) Descriptor() ([]byte, []int) {
return fileDescriptor_dd052eee12edf988, []int{1}
}
func (m *SendEnabled) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *SendEnabled) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_SendEnabled.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 *SendEnabled) XXX_Merge(src proto.Message) {
xxx_messageInfo_SendEnabled.Merge(m, src)
}
func (m *SendEnabled) XXX_Size() int {
return m.Size()
}
func (m *SendEnabled) XXX_DiscardUnknown() {
xxx_messageInfo_SendEnabled.DiscardUnknown(m)
}
var xxx_messageInfo_SendEnabled proto.InternalMessageInfo
func (m *SendEnabled) GetDenom() string {
if m != nil {
return m.Denom
}
return ""
}
func (m *SendEnabled) GetEnabled() bool {
if m != nil {
return m.Enabled
}
return false
}
// Input models transaction input.
type Input struct {
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins"`
}
func (m *Input) Reset() { *m = Input{} }
func (m *Input) String() string { return proto.CompactTextString(m) }
func (*Input) ProtoMessage() {}
func (*Input) Descriptor() ([]byte, []int) {
return fileDescriptor_dd052eee12edf988, []int{2}
}
func (m *Input) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Input) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Input.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 *Input) XXX_Merge(src proto.Message) {
xxx_messageInfo_Input.Merge(m, src)
}
func (m *Input) XXX_Size() int {
return m.Size()
}
func (m *Input) XXX_DiscardUnknown() {
xxx_messageInfo_Input.DiscardUnknown(m)
}
var xxx_messageInfo_Input proto.InternalMessageInfo
// Output models transaction outputs.
type Output struct {
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins"`
}
func (m *Output) Reset() { *m = Output{} }
func (m *Output) String() string { return proto.CompactTextString(m) }
func (*Output) ProtoMessage() {}
func (*Output) Descriptor() ([]byte, []int) {
return fileDescriptor_dd052eee12edf988, []int{3}
}
func (m *Output) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Output) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Output.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 *Output) XXX_Merge(src proto.Message) {
xxx_messageInfo_Output.Merge(m, src)
}
func (m *Output) XXX_Size() int {
return m.Size()
}
func (m *Output) XXX_DiscardUnknown() {
xxx_messageInfo_Output.DiscardUnknown(m)
}
var xxx_messageInfo_Output proto.InternalMessageInfo
// Supply represents a struct that passively keeps track of the total supply
// amounts in the network.
// This message is deprecated now that supply is indexed by denom.
//
// Deprecated: Do not use.
type Supply struct {
Total github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=total,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"total"`
}
func (m *Supply) Reset() { *m = Supply{} }
func (m *Supply) String() string { return proto.CompactTextString(m) }
func (*Supply) ProtoMessage() {}
func (*Supply) Descriptor() ([]byte, []int) {
return fileDescriptor_dd052eee12edf988, []int{4}
}
func (m *Supply) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Supply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Supply.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 *Supply) XXX_Merge(src proto.Message) {
xxx_messageInfo_Supply.Merge(m, src)
}
func (m *Supply) XXX_Size() int {
return m.Size()
}
func (m *Supply) XXX_DiscardUnknown() {
xxx_messageInfo_Supply.DiscardUnknown(m)
}
var xxx_messageInfo_Supply proto.InternalMessageInfo
// DenomUnit represents a struct that describes a given
// denomination unit of the basic token.
type DenomUnit struct {
// denom represents the string name of the given denom unit (e.g uatom).
Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
// exponent represents power of 10 exponent that one must
// raise the base_denom to in order to equal the given DenomUnit's denom
// 1 denom = 1^exponent base_denom
// (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with
// exponent = 6, thus: 1 atom = 10^6 uatom).
Exponent uint32 `protobuf:"varint,2,opt,name=exponent,proto3" json:"exponent,omitempty"`
// aliases is a list of string aliases for the given denom
Aliases []string `protobuf:"bytes,3,rep,name=aliases,proto3" json:"aliases,omitempty"`
}
func (m *DenomUnit) Reset() { *m = DenomUnit{} }
func (m *DenomUnit) String() string { return proto.CompactTextString(m) }
func (*DenomUnit) ProtoMessage() {}
func (*DenomUnit) Descriptor() ([]byte, []int) {
return fileDescriptor_dd052eee12edf988, []int{5}
}
func (m *DenomUnit) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *DenomUnit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_DenomUnit.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 *DenomUnit) XXX_Merge(src proto.Message) {
xxx_messageInfo_DenomUnit.Merge(m, src)
}
func (m *DenomUnit) XXX_Size() int {
return m.Size()
}
func (m *DenomUnit) XXX_DiscardUnknown() {
xxx_messageInfo_DenomUnit.DiscardUnknown(m)
}
var xxx_messageInfo_DenomUnit proto.InternalMessageInfo
func (m *DenomUnit) GetDenom() string {
if m != nil {
return m.Denom
}
return ""
}
func (m *DenomUnit) GetExponent() uint32 {
if m != nil {
return m.Exponent
}
return 0
}
func (m *DenomUnit) GetAliases() []string {
if m != nil {
return m.Aliases
}
return nil
}
// Metadata represents a struct that describes
// a basic token.
type Metadata struct {
Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
// denom_units represents the list of DenomUnit's for a given coin
DenomUnits []*DenomUnit `protobuf:"bytes,2,rep,name=denom_units,json=denomUnits,proto3" json:"denom_units,omitempty"`
// base represents the base denom (should be the DenomUnit with exponent = 0).
Base string `protobuf:"bytes,3,opt,name=base,proto3" json:"base,omitempty"`
// display indicates the suggested denom that should be
// displayed in clients.
Display string `protobuf:"bytes,4,opt,name=display,proto3" json:"display,omitempty"`
// name defines the name of the token (eg: Cosmos Atom)
//
// Since: cosmos-sdk 0.43
Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`
// symbol is the token symbol usually shown on exchanges (eg: ATOM). This can
// be the same as the display.
//
// Since: cosmos-sdk 0.43
Symbol string `protobuf:"bytes,6,opt,name=symbol,proto3" json:"symbol,omitempty"`
// URI to a document (on or off-chain) that contains additional information. Optional.
//
// Since: cosmos-sdk 0.45
URI string `protobuf:"bytes,7,opt,name=uri,proto3" json:"uri,omitempty"`
// URIHash is a sha256 hash of a document pointed by URI. It's used to verify that
// the document didn't change. Optional.
//
// Since: cosmos-sdk 0.45
URIHash string `protobuf:"bytes,8,opt,name=uri_hash,json=uriHash,proto3" json:"uri_hash,omitempty"`
}
func (m *Metadata) Reset() { *m = Metadata{} }
func (m *Metadata) String() string { return proto.CompactTextString(m) }
func (*Metadata) ProtoMessage() {}
func (*Metadata) Descriptor() ([]byte, []int) {
return fileDescriptor_dd052eee12edf988, []int{6}
}
func (m *Metadata) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Metadata.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 *Metadata) XXX_Merge(src proto.Message) {
xxx_messageInfo_Metadata.Merge(m, src)
}
func (m *Metadata) XXX_Size() int {
return m.Size()
}
func (m *Metadata) XXX_DiscardUnknown() {
xxx_messageInfo_Metadata.DiscardUnknown(m)
}
var xxx_messageInfo_Metadata proto.InternalMessageInfo
func (m *Metadata) GetDescription() string {
if m != nil {
return m.Description
}
return ""
}
func (m *Metadata) GetDenomUnits() []*DenomUnit {
if m != nil {
return m.DenomUnits
}
return nil
}
func (m *Metadata) GetBase() string {
if m != nil {
return m.Base
}
return ""
}
func (m *Metadata) GetDisplay() string {
if m != nil {
return m.Display
}
return ""
}
func (m *Metadata) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Metadata) GetSymbol() string {
if m != nil {
return m.Symbol
}
return ""
}
func (m *Metadata) GetURI() string {
if m != nil {
return m.URI
}
return ""
}
func (m *Metadata) GetURIHash() string {
if m != nil {
return m.URIHash
}
return ""
}
func init() {
proto.RegisterType((*Params)(nil), "cosmos.bank.v1beta1.Params")
proto.RegisterType((*SendEnabled)(nil), "cosmos.bank.v1beta1.SendEnabled")
proto.RegisterType((*Input)(nil), "cosmos.bank.v1beta1.Input")
proto.RegisterType((*Output)(nil), "cosmos.bank.v1beta1.Output")
proto.RegisterType((*Supply)(nil), "cosmos.bank.v1beta1.Supply")
proto.RegisterType((*DenomUnit)(nil), "cosmos.bank.v1beta1.DenomUnit")
proto.RegisterType((*Metadata)(nil), "cosmos.bank.v1beta1.Metadata")
}
func init() { proto.RegisterFile("cosmos/bank/v1beta1/bank.proto", fileDescriptor_dd052eee12edf988) }
var fileDescriptor_dd052eee12edf988 = []byte{
// 626 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x54, 0x41, 0x6b, 0x13, 0x41,
0x14, 0xce, 0x34, 0x4d, 0xb2, 0x9d, 0xe8, 0x65, 0x0c, 0x32, 0xed, 0x61, 0x13, 0x72, 0x90, 0x28,
0x34, 0x49, 0xab, 0xa7, 0x20, 0x88, 0xad, 0xa2, 0x11, 0x44, 0xd9, 0x52, 0x04, 0x2f, 0x61, 0x92,
0x19, 0x93, 0xa1, 0xbb, 0x33, 0xcb, 0xce, 0x6c, 0x69, 0x7e, 0x80, 0x20, 0x9e, 0x3c, 0x7a, 0xec,
0x51, 0x3d, 0x17, 0xfc, 0x0b, 0xc5, 0x53, 0xf1, 0xe4, 0xa9, 0x4a, 0x7a, 0xf1, 0x67, 0xc8, 0xcc,
0xec, 0xa6, 0x29, 0x54, 0xf1, 0xe0, 0xc5, 0xd3, 0xbe, 0xef, 0x7d, 0xef, 0x7d, 0xef, 0xbd, 0x99,
0x37, 0x0b, 0xfd, 0x91, 0x54, 0x91, 0x54, 0x9d, 0x21, 0x11, 0x7b, 0x9d, 0xfd, 0x8d, 0x21, 0xd3,
0x64, 0xc3, 0x82, 0x76, 0x9c, 0x48, 0x2d, 0xd1, 0x35, 0xc7, 0xb7, 0xad, 0x2b, 0xe3, 0xd7, 0x6a,
0x63, 0x39, 0x96, 0x96, 0xef, 0x18, 0xcb, 0x85, 0xae, 0xad, 0xba, 0xd0, 0x81, 0x23, 0xb2, 0x3c,
0x47, 0x9d, 0x57, 0x51, 0x6c, 0x5e, 0x65, 0x24, 0xb9, 0x70, 0x7c, 0xf3, 0x35, 0x80, 0xe5, 0xe7,
0x24, 0x21, 0x91, 0x42, 0xdb, 0xf0, 0x8a, 0x62, 0x82, 0x0e, 0x98, 0x20, 0xc3, 0x90, 0x51, 0x0c,
0x1a, 0xc5, 0x56, 0x75, 0xb3, 0xd1, 0xbe, 0xa4, 0x8f, 0xf6, 0x0e, 0x13, 0xf4, 0xa1, 0x8b, 0x0b,
0xaa, 0xea, 0x1c, 0xa0, 0x2e, 0xac, 0x51, 0xf6, 0x8a, 0xa4, 0xa1, 0x1e, 0x5c, 0x10, 0x5b, 0x6a,
0x80, 0x96, 0x17, 0xa0, 0x8c, 0x5b, 0x48, 0xef, 0x2d, 0xbf, 0x3f, 0xac, 0x17, 0x9a, 0x8f, 0x60,
0x75, 0xc1, 0x89, 0x6a, 0xb0, 0x44, 0x99, 0x90, 0x11, 0x06, 0x0d, 0xd0, 0x5a, 0x09, 0x1c, 0x40,
0x18, 0x56, 0x2e, 0xea, 0xe5, 0xb0, 0xe7, 0x19, 0x91, 0x9f, 0x87, 0x75, 0xd0, 0xfc, 0x00, 0x60,
0xa9, 0x2f, 0xe2, 0x54, 0xa3, 0x4d, 0x58, 0x21, 0x94, 0x26, 0x4c, 0x29, 0xa7, 0xb2, 0x85, 0xbf,
0x1e, 0xad, 0xd7, 0xb2, 0x69, 0xee, 0x3b, 0x66, 0x47, 0x27, 0x5c, 0x8c, 0x83, 0x3c, 0x10, 0x11,
0x58, 0x32, 0x87, 0xa3, 0xf0, 0x92, 0x1d, 0x7e, 0xf5, 0x7c, 0x78, 0xc5, 0xe6, 0xc3, 0x6f, 0x4b,
0x2e, 0xb6, 0xba, 0xc7, 0xa7, 0xf5, 0xc2, 0xa7, 0xef, 0xf5, 0xd6, 0x98, 0xeb, 0x49, 0x3a, 0x6c,
0x8f, 0x64, 0x94, 0x9d, 0x7c, 0xf6, 0x59, 0x57, 0x74, 0xaf, 0xa3, 0xa7, 0x31, 0x53, 0x36, 0x41,
0x05, 0x4e, 0xb9, 0xe7, 0xbd, 0x71, 0xad, 0x16, 0x9a, 0x1f, 0x01, 0x2c, 0x3f, 0x4b, 0xf5, 0x7f,
0xd1, 0xeb, 0x67, 0x00, 0xcb, 0x3b, 0x69, 0x1c, 0x87, 0x53, 0x53, 0x57, 0x4b, 0x4d, 0xc2, 0x6c,
0x41, 0xfe, 0x6d, 0x5d, 0xab, 0xdc, 0x7b, 0x92, 0xd5, 0x05, 0x5f, 0x8e, 0xd6, 0xef, 0xde, 0xfa,
0x63, 0xf6, 0x81, 0x7b, 0x40, 0x11, 0x1f, 0x27, 0x44, 0x73, 0x29, 0x54, 0x67, 0xbf, 0x7b, 0xa7,
0xdb, 0x76, 0xbd, 0xf6, 0x31, 0x68, 0xbe, 0x80, 0x2b, 0x0f, 0xcc, 0xf6, 0xec, 0x0a, 0xae, 0x7f,
0xb3, 0x57, 0x6b, 0xd0, 0x63, 0x07, 0xb1, 0x14, 0x4c, 0x68, 0xbb, 0x58, 0x57, 0x83, 0x39, 0x36,
0x3b, 0x47, 0x42, 0x4e, 0x14, 0x53, 0xb8, 0xd8, 0x28, 0xb6, 0x56, 0x82, 0x1c, 0x36, 0xdf, 0x2e,
0x41, 0xef, 0x29, 0xd3, 0x84, 0x12, 0x4d, 0x50, 0x03, 0x56, 0x29, 0x53, 0xa3, 0x84, 0xc7, 0xa6,
0x89, 0x4c, 0x7e, 0xd1, 0x85, 0xee, 0x99, 0x08, 0x21, 0xa3, 0x41, 0x2a, 0xb8, 0xce, 0x2f, 0xcd,
0xbf, 0xf4, 0x75, 0xcd, 0xfb, 0x0d, 0x20, 0xcd, 0x4d, 0x85, 0x10, 0x5c, 0x36, 0x47, 0x8c, 0x8b,
0x56, 0xdb, 0xda, 0xa6, 0x3b, 0xca, 0x55, 0x1c, 0x92, 0x29, 0x5e, 0xb6, 0xee, 0x1c, 0x9a, 0x68,
0x41, 0x22, 0x86, 0x4b, 0x2e, 0xda, 0xd8, 0xe8, 0x3a, 0x2c, 0xab, 0x69, 0x34, 0x94, 0x21, 0x2e,
0x5b, 0x6f, 0x86, 0xd0, 0x2a, 0x2c, 0xa6, 0x09, 0xc7, 0x15, 0xbb, 0x79, 0x95, 0xd9, 0x69, 0xbd,
0xb8, 0x1b, 0xf4, 0x03, 0xe3, 0x43, 0x37, 0xa0, 0x97, 0x26, 0x7c, 0x30, 0x21, 0x6a, 0x82, 0x3d,
0xcb, 0x57, 0x67, 0xa7, 0xf5, 0xca, 0x6e, 0xd0, 0x7f, 0x4c, 0xd4, 0x24, 0xa8, 0xa4, 0x09, 0x37,
0xc6, 0xd6, 0xf6, 0xf1, 0xcc, 0x07, 0x27, 0x33, 0x1f, 0xfc, 0x98, 0xf9, 0xe0, 0xdd, 0x99, 0x5f,
0x38, 0x39, 0xf3, 0x0b, 0xdf, 0xce, 0xfc, 0xc2, 0xcb, 0x9b, 0x7f, 0x73, 0x7d, 0x76, 0x07, 0x86,
0x65, 0xfb, 0x4f, 0xba, 0xfd, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x5e, 0x80, 0x89, 0x32, 0x1b, 0x05,
0x00, 0x00,
}
func (this *SendEnabled) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*SendEnabled)
if !ok {
that2, ok := that.(SendEnabled)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.Denom != that1.Denom {
return false
}
if this.Enabled != that1.Enabled {
return false
}
return true
}
func (this *Supply) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*Supply)
if !ok {
that2, ok := that.(Supply)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if len(this.Total) != len(that1.Total) {
return false
}
for i := range this.Total {
if !this.Total[i].Equal(&that1.Total[i]) {
return false
}
}
return true
}
func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.DefaultSendEnabled {
i--
if m.DefaultSendEnabled {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x10
}
if len(m.SendEnabled) > 0 {
for iNdEx := len(m.SendEnabled) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.SendEnabled[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintBank(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func (m *SendEnabled) 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 *SendEnabled) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *SendEnabled) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Enabled {
i--
if m.Enabled {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x10
}
if len(m.Denom) > 0 {
i -= len(m.Denom)
copy(dAtA[i:], m.Denom)
i = encodeVarintBank(dAtA, i, uint64(len(m.Denom)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *Input) 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 *Input) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Input) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Coins) > 0 {
for iNdEx := len(m.Coins) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Coins[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintBank(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
}
if len(m.Address) > 0 {
i -= len(m.Address)
copy(dAtA[i:], m.Address)
i = encodeVarintBank(dAtA, i, uint64(len(m.Address)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *Output) 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 *Output) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Output) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Coins) > 0 {
for iNdEx := len(m.Coins) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Coins[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintBank(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
}
if len(m.Address) > 0 {
i -= len(m.Address)
copy(dAtA[i:], m.Address)
i = encodeVarintBank(dAtA, i, uint64(len(m.Address)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *Supply) 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 *Supply) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Supply) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Total) > 0 {
for iNdEx := len(m.Total) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Total[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintBank(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func (m *DenomUnit) 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 *DenomUnit) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *DenomUnit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Aliases) > 0 {
for iNdEx := len(m.Aliases) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Aliases[iNdEx])
copy(dAtA[i:], m.Aliases[iNdEx])
i = encodeVarintBank(dAtA, i, uint64(len(m.Aliases[iNdEx])))
i--
dAtA[i] = 0x1a
}
}
if m.Exponent != 0 {
i = encodeVarintBank(dAtA, i, uint64(m.Exponent))
i--
dAtA[i] = 0x10
}
if len(m.Denom) > 0 {
i -= len(m.Denom)
copy(dAtA[i:], m.Denom)
i = encodeVarintBank(dAtA, i, uint64(len(m.Denom)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *Metadata) 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 *Metadata) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.URIHash) > 0 {
i -= len(m.URIHash)
copy(dAtA[i:], m.URIHash)
i = encodeVarintBank(dAtA, i, uint64(len(m.URIHash)))
i--
dAtA[i] = 0x42
}
if len(m.URI) > 0 {
i -= len(m.URI)
copy(dAtA[i:], m.URI)
i = encodeVarintBank(dAtA, i, uint64(len(m.URI)))
i--
dAtA[i] = 0x3a
}
if len(m.Symbol) > 0 {
i -= len(m.Symbol)
copy(dAtA[i:], m.Symbol)
i = encodeVarintBank(dAtA, i, uint64(len(m.Symbol)))
i--
dAtA[i] = 0x32
}
if len(m.Name) > 0 {
i -= len(m.Name)
copy(dAtA[i:], m.Name)
i = encodeVarintBank(dAtA, i, uint64(len(m.Name)))
i--
dAtA[i] = 0x2a
}
if len(m.Display) > 0 {
i -= len(m.Display)
copy(dAtA[i:], m.Display)
i = encodeVarintBank(dAtA, i, uint64(len(m.Display)))
i--
dAtA[i] = 0x22
}
if len(m.Base) > 0 {
i -= len(m.Base)
copy(dAtA[i:], m.Base)
i = encodeVarintBank(dAtA, i, uint64(len(m.Base)))
i--
dAtA[i] = 0x1a
}
if len(m.DenomUnits) > 0 {
for iNdEx := len(m.DenomUnits) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.DenomUnits[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintBank(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
}
if len(m.Description) > 0 {
i -= len(m.Description)
copy(dAtA[i:], m.Description)
i = encodeVarintBank(dAtA, i, uint64(len(m.Description)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintBank(dAtA []byte, offset int, v uint64) int {
offset -= sovBank(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *Params) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.SendEnabled) > 0 {
for _, e := range m.SendEnabled {
l = e.Size()
n += 1 + l + sovBank(uint64(l))
}
}
if m.DefaultSendEnabled {
n += 2
}
return n
}
func (m *SendEnabled) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Denom)
if l > 0 {
n += 1 + l + sovBank(uint64(l))
}
if m.Enabled {
n += 2
}
return n
}
func (m *Input) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Address)
if l > 0 {
n += 1 + l + sovBank(uint64(l))
}
if len(m.Coins) > 0 {
for _, e := range m.Coins {
l = e.Size()
n += 1 + l + sovBank(uint64(l))
}
}
return n
}
func (m *Output) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Address)
if l > 0 {
n += 1 + l + sovBank(uint64(l))
}
if len(m.Coins) > 0 {
for _, e := range m.Coins {
l = e.Size()
n += 1 + l + sovBank(uint64(l))
}
}
return n
}
func (m *Supply) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.Total) > 0 {
for _, e := range m.Total {
l = e.Size()
n += 1 + l + sovBank(uint64(l))
}
}
return n
}
func (m *DenomUnit) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Denom)
if l > 0 {
n += 1 + l + sovBank(uint64(l))
}
if m.Exponent != 0 {
n += 1 + sovBank(uint64(m.Exponent))
}
if len(m.Aliases) > 0 {
for _, s := range m.Aliases {
l = len(s)
n += 1 + l + sovBank(uint64(l))
}
}
return n
}
func (m *Metadata) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Description)
if l > 0 {
n += 1 + l + sovBank(uint64(l))
}
if len(m.DenomUnits) > 0 {
for _, e := range m.DenomUnits {
l = e.Size()
n += 1 + l + sovBank(uint64(l))
}
}
l = len(m.Base)
if l > 0 {
n += 1 + l + sovBank(uint64(l))
}
l = len(m.Display)
if l > 0 {
n += 1 + l + sovBank(uint64(l))
}
l = len(m.Name)
if l > 0 {
n += 1 + l + sovBank(uint64(l))
}
l = len(m.Symbol)
if l > 0 {
n += 1 + l + sovBank(uint64(l))
}
l = len(m.URI)
if l > 0 {
n += 1 + l + sovBank(uint64(l))
}
l = len(m.URIHash)
if l > 0 {
n += 1 + l + sovBank(uint64(l))
}
return n
}
func sovBank(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozBank(x uint64) (n int) {
return sovBank(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *Params) 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 ErrIntOverflowBank
}
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: Params: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field SendEnabled", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBank
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthBank
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthBank
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.SendEnabled = append(m.SendEnabled, &SendEnabled{})
if err := m.SendEnabled[len(m.SendEnabled)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field DefaultSendEnabled", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBank
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.DefaultSendEnabled = bool(v != 0)
default:
iNdEx = preIndex
skippy, err := skipBank(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthBank
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *SendEnabled) 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 ErrIntOverflowBank
}
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: SendEnabled: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: SendEnabled: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBank
}
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 ErrInvalidLengthBank
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthBank
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Denom = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBank
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.Enabled = bool(v != 0)
default:
iNdEx = preIndex
skippy, err := skipBank(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthBank
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Input) 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 ErrIntOverflowBank
}
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: Input: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Input: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBank
}
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 ErrInvalidLengthBank
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthBank
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Address = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Coins", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBank
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthBank
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthBank
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Coins = append(m.Coins, types.Coin{})
if err := m.Coins[len(m.Coins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipBank(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthBank
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Output) 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 ErrIntOverflowBank
}
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: Output: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Output: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBank
}
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 ErrInvalidLengthBank
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthBank
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Address = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Coins", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBank
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthBank
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthBank
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Coins = append(m.Coins, types.Coin{})
if err := m.Coins[len(m.Coins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipBank(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthBank
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Supply) 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 ErrIntOverflowBank
}
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: Supply: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Supply: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBank
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthBank
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthBank
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Total = append(m.Total, types.Coin{})
if err := m.Total[len(m.Total)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipBank(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthBank
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *DenomUnit) 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 ErrIntOverflowBank
}
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: DenomUnit: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: DenomUnit: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBank
}
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 ErrInvalidLengthBank
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthBank
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Denom = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Exponent", wireType)
}
m.Exponent = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBank
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Exponent |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Aliases", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBank
}
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 ErrInvalidLengthBank
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthBank
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Aliases = append(m.Aliases, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipBank(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthBank
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Metadata) 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 ErrIntOverflowBank
}
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: Metadata: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Metadata: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBank
}
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 ErrInvalidLengthBank
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthBank
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Description = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field DenomUnits", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBank
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthBank
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthBank
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.DenomUnits = append(m.DenomUnits, &DenomUnit{})
if err := m.DenomUnits[len(m.DenomUnits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Base", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBank
}
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 ErrInvalidLengthBank
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthBank
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Base = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Display", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBank
}
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 ErrInvalidLengthBank
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthBank
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Display = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBank
}
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 ErrInvalidLengthBank
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthBank
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Name = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBank
}
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 ErrInvalidLengthBank
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthBank
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Symbol = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 7:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field URI", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBank
}
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 ErrInvalidLengthBank
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthBank
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.URI = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 8:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field URIHash", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBank
}
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 ErrInvalidLengthBank
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthBank
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.URIHash = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipBank(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthBank
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipBank(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowBank
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowBank
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowBank
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthBank
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupBank
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthBank
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthBank = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowBank = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupBank = fmt.Errorf("proto: unexpected end of group")
)