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

1526 lines
35 KiB
Go

// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: cosmos/bank/bank.proto
package types
import (
bytes "bytes"
fmt "fmt"
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"
_ "github.com/regen-network/cosmos-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
// MsgSend - high level transaction of the coin module
type MsgSend struct {
FromAddress github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"from_address,omitempty" yaml:"from_address"`
ToAddress github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"to_address,omitempty" yaml:"to_address"`
Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"`
}
func (m *MsgSend) Reset() { *m = MsgSend{} }
func (m *MsgSend) String() string { return proto.CompactTextString(m) }
func (*MsgSend) ProtoMessage() {}
func (*MsgSend) Descriptor() ([]byte, []int) {
return fileDescriptor_717c78e54d4b5794, []int{0}
}
func (m *MsgSend) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *MsgSend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_MsgSend.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 *MsgSend) XXX_Merge(src proto.Message) {
xxx_messageInfo_MsgSend.Merge(m, src)
}
func (m *MsgSend) XXX_Size() int {
return m.Size()
}
func (m *MsgSend) XXX_DiscardUnknown() {
xxx_messageInfo_MsgSend.DiscardUnknown(m)
}
var xxx_messageInfo_MsgSend proto.InternalMessageInfo
func (m *MsgSend) GetFromAddress() github_com_cosmos_cosmos_sdk_types.AccAddress {
if m != nil {
return m.FromAddress
}
return nil
}
func (m *MsgSend) GetToAddress() github_com_cosmos_cosmos_sdk_types.AccAddress {
if m != nil {
return m.ToAddress
}
return nil
}
func (m *MsgSend) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins {
if m != nil {
return m.Amount
}
return nil
}
// Input models transaction input
type Input struct {
Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" 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_717c78e54d4b5794, []int{1}
}
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
func (m *Input) GetAddress() github_com_cosmos_cosmos_sdk_types.AccAddress {
if m != nil {
return m.Address
}
return nil
}
func (m *Input) GetCoins() github_com_cosmos_cosmos_sdk_types.Coins {
if m != nil {
return m.Coins
}
return nil
}
// Output models transaction outputs
type Output struct {
Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" 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_717c78e54d4b5794, []int{2}
}
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
func (m *Output) GetAddress() github_com_cosmos_cosmos_sdk_types.AccAddress {
if m != nil {
return m.Address
}
return nil
}
func (m *Output) GetCoins() github_com_cosmos_cosmos_sdk_types.Coins {
if m != nil {
return m.Coins
}
return nil
}
// MsgMultiSend - high level transaction of the coin module
type MsgMultiSend struct {
Inputs []Input `protobuf:"bytes,1,rep,name=inputs,proto3" json:"inputs"`
Outputs []Output `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs"`
}
func (m *MsgMultiSend) Reset() { *m = MsgMultiSend{} }
func (m *MsgMultiSend) String() string { return proto.CompactTextString(m) }
func (*MsgMultiSend) ProtoMessage() {}
func (*MsgMultiSend) Descriptor() ([]byte, []int) {
return fileDescriptor_717c78e54d4b5794, []int{3}
}
func (m *MsgMultiSend) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *MsgMultiSend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_MsgMultiSend.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 *MsgMultiSend) XXX_Merge(src proto.Message) {
xxx_messageInfo_MsgMultiSend.Merge(m, src)
}
func (m *MsgMultiSend) XXX_Size() int {
return m.Size()
}
func (m *MsgMultiSend) XXX_DiscardUnknown() {
xxx_messageInfo_MsgMultiSend.DiscardUnknown(m)
}
var xxx_messageInfo_MsgMultiSend proto.InternalMessageInfo
func (m *MsgMultiSend) GetInputs() []Input {
if m != nil {
return m.Inputs
}
return nil
}
func (m *MsgMultiSend) GetOutputs() []Output {
if m != nil {
return m.Outputs
}
return nil
}
// Supply represents a struct that passively keeps track of the total supply
// amounts in the network.
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 (*Supply) ProtoMessage() {}
func (*Supply) Descriptor() ([]byte, []int) {
return fileDescriptor_717c78e54d4b5794, []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
func init() {
proto.RegisterType((*MsgSend)(nil), "cosmos.bank.MsgSend")
proto.RegisterType((*Input)(nil), "cosmos.bank.Input")
proto.RegisterType((*Output)(nil), "cosmos.bank.Output")
proto.RegisterType((*MsgMultiSend)(nil), "cosmos.bank.MsgMultiSend")
proto.RegisterType((*Supply)(nil), "cosmos.bank.Supply")
}
func init() { proto.RegisterFile("cosmos/bank/bank.proto", fileDescriptor_717c78e54d4b5794) }
var fileDescriptor_717c78e54d4b5794 = []byte{
// 457 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4b, 0xce, 0x2f, 0xce,
0xcd, 0x2f, 0xd6, 0x4f, 0x4a, 0xcc, 0xcb, 0x06, 0x13, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42,
0xdc, 0x10, 0x71, 0x3d, 0x90, 0x90, 0x94, 0x48, 0x7a, 0x7e, 0x7a, 0x3e, 0x58, 0x5c, 0x1f, 0xc4,
0x82, 0x28, 0x91, 0x92, 0x84, 0x28, 0x89, 0x87, 0x48, 0x40, 0xd5, 0x43, 0xa4, 0x84, 0xa1, 0xa6,
0x22, 0x0b, 0x2a, 0xed, 0x66, 0xe2, 0x62, 0xf7, 0x2d, 0x4e, 0x0f, 0x4e, 0xcd, 0x4b, 0x11, 0xca,
0xe6, 0xe2, 0x49, 0x2b, 0xca, 0xcf, 0x8d, 0x4f, 0x4c, 0x49, 0x29, 0x4a, 0x2d, 0x2e, 0x96, 0x60,
0x54, 0x60, 0xd4, 0xe0, 0x71, 0xf2, 0xf8, 0x74, 0x4f, 0x5e, 0xb8, 0x32, 0x31, 0x37, 0xc7, 0x4a,
0x09, 0x59, 0x56, 0xe9, 0xd7, 0x3d, 0x79, 0xdd, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4,
0xfc, 0x5c, 0x7d, 0x14, 0xc3, 0x75, 0x8b, 0x53, 0xb2, 0xf5, 0x4b, 0x2a, 0x0b, 0x52, 0x8b, 0xf5,
0x1c, 0x93, 0x93, 0x1d, 0x21, 0x3a, 0x82, 0xb8, 0x41, 0xfa, 0xa1, 0x1c, 0xa1, 0x54, 0x2e, 0xae,
0x92, 0x7c, 0xb8, 0x55, 0x4c, 0x60, 0xab, 0xdc, 0x3e, 0xdd, 0x93, 0x17, 0x84, 0x58, 0x85, 0x90,
0x23, 0xc3, 0x22, 0xce, 0x92, 0x7c, 0x98, 0x35, 0x61, 0x5c, 0x6c, 0x89, 0xb9, 0xf9, 0xa5, 0x79,
0x25, 0x12, 0xcc, 0x0a, 0xcc, 0x1a, 0xdc, 0x46, 0x3c, 0x7a, 0x50, 0xef, 0x3b, 0xe7, 0x67, 0xe6,
0x39, 0x19, 0x9c, 0xb8, 0x27, 0xcf, 0xb0, 0xea, 0xbe, 0xbc, 0x06, 0x11, 0xe6, 0x83, 0x34, 0x14,
0x07, 0x41, 0x4d, 0xb3, 0x62, 0x79, 0xb1, 0x40, 0x9e, 0x51, 0x69, 0x03, 0x23, 0x17, 0xab, 0x67,
0x5e, 0x41, 0x69, 0x89, 0x90, 0x37, 0x17, 0x3b, 0x6a, 0xb0, 0x19, 0x92, 0xee, 0x6c, 0x98, 0x09,
0x42, 0x21, 0x5c, 0xac, 0xc9, 0x20, 0xdb, 0x24, 0x98, 0xa8, 0xe2, 0x66, 0x88, 0x61, 0x50, 0x27,
0x6f, 0x64, 0xe4, 0x62, 0xf3, 0x2f, 0x2d, 0x19, 0x52, 0x6e, 0xae, 0xe6, 0xe2, 0xf1, 0x2d, 0x4e,
0xf7, 0x2d, 0xcd, 0x29, 0xc9, 0x04, 0x27, 0x54, 0x03, 0x2e, 0xb6, 0x4c, 0x50, 0xa8, 0x83, 0xdc,
0x0d, 0xb2, 0x4c, 0x48, 0x0f, 0x29, 0x63, 0xe8, 0x81, 0x23, 0xc4, 0x89, 0x05, 0x64, 0x65, 0x10,
0x54, 0x9d, 0x90, 0x31, 0x17, 0x7b, 0x3e, 0xd8, 0xd3, 0x30, 0xf7, 0x09, 0xa3, 0x68, 0x81, 0x04,
0x08, 0x54, 0x0f, 0x4c, 0x25, 0xd4, 0xf2, 0xa5, 0x8c, 0x5c, 0x6c, 0xc1, 0xa5, 0x05, 0x05, 0x39,
0x95, 0x20, 0x3f, 0x96, 0xe4, 0x97, 0x24, 0xe6, 0x40, 0xad, 0xa5, 0xd8, 0x8f, 0x60, 0xc3, 0xac,
0x5c, 0x3b, 0x16, 0xc8, 0x33, 0xcc, 0x58, 0x20, 0xcf, 0x00, 0xb2, 0xee, 0xd2, 0x16, 0x5d, 0x53,
0x2d, 0xbc, 0x26, 0x54, 0x40, 0x8a, 0x85, 0xd4, 0x8a, 0x82, 0xfc, 0xa2, 0x92, 0xd4, 0x14, 0x3d,
0x88, 0xdb, 0x3c, 0x9d, 0x9c, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23,
0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x4a,
0x93, 0x18, 0xf3, 0xc0, 0x0e, 0x4b, 0x62, 0x03, 0x97, 0x0a, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff,
0xff, 0xa5, 0xa6, 0xc2, 0x41, 0x82, 0x04, 0x00, 0x00,
}
func (this *MsgSend) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*MsgSend)
if !ok {
that2, ok := that.(MsgSend)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if !bytes.Equal(this.FromAddress, that1.FromAddress) {
return false
}
if !bytes.Equal(this.ToAddress, that1.ToAddress) {
return false
}
if len(this.Amount) != len(that1.Amount) {
return false
}
for i := range this.Amount {
if !this.Amount[i].Equal(&that1.Amount[i]) {
return false
}
}
return true
}
func (this *Input) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*Input)
if !ok {
that2, ok := that.(Input)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if !bytes.Equal(this.Address, that1.Address) {
return false
}
if len(this.Coins) != len(that1.Coins) {
return false
}
for i := range this.Coins {
if !this.Coins[i].Equal(&that1.Coins[i]) {
return false
}
}
return true
}
func (this *Output) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*Output)
if !ok {
that2, ok := that.(Output)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if !bytes.Equal(this.Address, that1.Address) {
return false
}
if len(this.Coins) != len(that1.Coins) {
return false
}
for i := range this.Coins {
if !this.Coins[i].Equal(&that1.Coins[i]) {
return false
}
}
return true
}
func (this *MsgMultiSend) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*MsgMultiSend)
if !ok {
that2, ok := that.(MsgMultiSend)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if len(this.Inputs) != len(that1.Inputs) {
return false
}
for i := range this.Inputs {
if !this.Inputs[i].Equal(&that1.Inputs[i]) {
return false
}
}
if len(this.Outputs) != len(that1.Outputs) {
return false
}
for i := range this.Outputs {
if !this.Outputs[i].Equal(&that1.Outputs[i]) {
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 *MsgSend) 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 *MsgSend) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *MsgSend) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Amount) > 0 {
for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintBank(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
}
}
if len(m.ToAddress) > 0 {
i -= len(m.ToAddress)
copy(dAtA[i:], m.ToAddress)
i = encodeVarintBank(dAtA, i, uint64(len(m.ToAddress)))
i--
dAtA[i] = 0x12
}
if len(m.FromAddress) > 0 {
i -= len(m.FromAddress)
copy(dAtA[i:], m.FromAddress)
i = encodeVarintBank(dAtA, i, uint64(len(m.FromAddress)))
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 *MsgMultiSend) 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 *MsgMultiSend) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *MsgMultiSend) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Outputs) > 0 {
for iNdEx := len(m.Outputs) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Outputs[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.Inputs) > 0 {
for iNdEx := len(m.Inputs) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Inputs[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 *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 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 *MsgSend) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.FromAddress)
if l > 0 {
n += 1 + l + sovBank(uint64(l))
}
l = len(m.ToAddress)
if l > 0 {
n += 1 + l + sovBank(uint64(l))
}
if len(m.Amount) > 0 {
for _, e := range m.Amount {
l = e.Size()
n += 1 + l + sovBank(uint64(l))
}
}
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 *MsgMultiSend) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.Inputs) > 0 {
for _, e := range m.Inputs {
l = e.Size()
n += 1 + l + sovBank(uint64(l))
}
}
if len(m.Outputs) > 0 {
for _, e := range m.Outputs {
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 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 *MsgSend) 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: MsgSend: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: MsgSend: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field FromAddress", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBank
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthBank
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthBank
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.FromAddress = append(m.FromAddress[:0], dAtA[iNdEx:postIndex]...)
if m.FromAddress == nil {
m.FromAddress = []byte{}
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ToAddress", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBank
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthBank
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthBank
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ToAddress = append(m.ToAddress[:0], dAtA[iNdEx:postIndex]...)
if m.ToAddress == nil {
m.ToAddress = []byte{}
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Amount", 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.Amount = append(m.Amount, types.Coin{})
if err := m.Amount[len(m.Amount)-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 {
return ErrInvalidLengthBank
}
if (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 byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBank
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthBank
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthBank
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...)
if m.Address == nil {
m.Address = []byte{}
}
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 {
return ErrInvalidLengthBank
}
if (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 byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBank
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthBank
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthBank
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...)
if m.Address == nil {
m.Address = []byte{}
}
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 {
return ErrInvalidLengthBank
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthBank
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *MsgMultiSend) 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: MsgMultiSend: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: MsgMultiSend: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Inputs", 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.Inputs = append(m.Inputs, Input{})
if err := m.Inputs[len(m.Inputs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Outputs", 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.Outputs = append(m.Outputs, Output{})
if err := m.Outputs[len(m.Outputs)-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 {
return ErrInvalidLengthBank
}
if (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 {
return ErrInvalidLengthBank
}
if (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")
)