corvidd/x/bond/bond.pb.go
prathamesh0 5ee988ccd8
Setup and integrate bond module into the chain (#2)
* Add common message types and update proto gen script

* Update proto gen script to generate pulsar proto code

* Upgrade direct deps

* Populate params and genesis files

* Setup keeper files

* Setup module files with depinject and autocli

* Add placeholder keeper methods

* Integrate bond module into the chain
2024-02-01 16:28:34 +05:30

621 lines
15 KiB
Go

// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: cerc/bond/v1/bond.proto
package bond
import (
fmt "fmt"
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
types "github.com/cosmos/cosmos-sdk/types"
_ "github.com/cosmos/gogoproto/gogoproto"
proto "github.com/cosmos/gogoproto/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 of the bond module.
type Params struct {
// max_bond_amount is maximum amount to bond
MaxBondAmount types.Coin `protobuf:"bytes,1,opt,name=max_bond_amount,json=maxBondAmount,proto3" json:"max_bond_amount" json:"max_bond_amount" yaml:"max_bond_amount"`
}
func (m *Params) Reset() { *m = Params{} }
func (m *Params) String() string { return proto.CompactTextString(m) }
func (*Params) ProtoMessage() {}
func (*Params) Descriptor() ([]byte, []int) {
return fileDescriptor_a3e353c952ca4df9, []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) GetMaxBondAmount() types.Coin {
if m != nil {
return m.MaxBondAmount
}
return types.Coin{}
}
// Bond represents funds deposited by an account for record rent payments.
type Bond struct {
// id is unique identifier of the bond
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// owner of the bond
Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
// balance of the bond
Balance github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=balance,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"balance" json:"balance" yaml:"balance"`
}
func (m *Bond) Reset() { *m = Bond{} }
func (m *Bond) String() string { return proto.CompactTextString(m) }
func (*Bond) ProtoMessage() {}
func (*Bond) Descriptor() ([]byte, []int) {
return fileDescriptor_a3e353c952ca4df9, []int{1}
}
func (m *Bond) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Bond) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Bond.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 *Bond) XXX_Merge(src proto.Message) {
xxx_messageInfo_Bond.Merge(m, src)
}
func (m *Bond) XXX_Size() int {
return m.Size()
}
func (m *Bond) XXX_DiscardUnknown() {
xxx_messageInfo_Bond.DiscardUnknown(m)
}
var xxx_messageInfo_Bond proto.InternalMessageInfo
func (m *Bond) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *Bond) GetOwner() string {
if m != nil {
return m.Owner
}
return ""
}
func (m *Bond) GetBalance() github_com_cosmos_cosmos_sdk_types.Coins {
if m != nil {
return m.Balance
}
return nil
}
func init() {
proto.RegisterType((*Params)(nil), "cerc.bond.v1.Params")
proto.RegisterType((*Bond)(nil), "cerc.bond.v1.Bond")
}
func init() { proto.RegisterFile("cerc/bond/v1/bond.proto", fileDescriptor_a3e353c952ca4df9) }
var fileDescriptor_a3e353c952ca4df9 = []byte{
// 344 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x51, 0xbd, 0x4e, 0xf3, 0x30,
0x14, 0x8d, 0xdb, 0xef, 0x2b, 0x22, 0xfc, 0x49, 0x51, 0x25, 0x4a, 0x25, 0xd2, 0xaa, 0x2c, 0x5d,
0x6a, 0x2b, 0x45, 0x2c, 0x48, 0x0c, 0x94, 0x17, 0x80, 0x8e, 0x2c, 0x95, 0xe3, 0x44, 0xc1, 0x50,
0xfb, 0x56, 0xb1, 0x1b, 0xd2, 0x95, 0x81, 0x99, 0xe7, 0x60, 0xe7, 0x1d, 0x3a, 0x76, 0x64, 0x2a,
0xa8, 0x7d, 0x03, 0x9e, 0x00, 0xc5, 0x4e, 0x17, 0x90, 0x98, 0x6e, 0xce, 0x39, 0xb9, 0xe7, 0x1e,
0xf9, 0xb8, 0x87, 0x2c, 0x4e, 0x19, 0x09, 0x41, 0x46, 0x24, 0x0b, 0xcc, 0xc4, 0x93, 0x14, 0x34,
0x78, 0xbb, 0x85, 0x80, 0x0d, 0x91, 0x05, 0xcd, 0x7a, 0x02, 0x09, 0x18, 0x81, 0x14, 0x5f, 0xf6,
0x9f, 0xa6, 0xcf, 0x40, 0x09, 0x50, 0x24, 0xa4, 0x2a, 0x26, 0x59, 0x10, 0xc6, 0x9a, 0x06, 0x84,
0x01, 0x97, 0x56, 0xef, 0x3c, 0x21, 0xb7, 0x76, 0x4d, 0x53, 0x2a, 0x94, 0x97, 0xbb, 0x07, 0x82,
0xe6, 0xa3, 0xc2, 0x6f, 0x44, 0x05, 0x4c, 0xa5, 0x6e, 0xa0, 0x36, 0xea, 0xee, 0xf4, 0x8f,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,
}
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
{
size, err := m.MaxBondAmount.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintBond(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
return len(dAtA) - i, nil
}
func (m *Bond) 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 *Bond) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Bond) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Balance) > 0 {
for iNdEx := len(m.Balance) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Balance[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintBond(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
}
}
if len(m.Owner) > 0 {
i -= len(m.Owner)
copy(dAtA[i:], m.Owner)
i = encodeVarintBond(dAtA, i, uint64(len(m.Owner)))
i--
dAtA[i] = 0x12
}
if len(m.Id) > 0 {
i -= len(m.Id)
copy(dAtA[i:], m.Id)
i = encodeVarintBond(dAtA, i, uint64(len(m.Id)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintBond(dAtA []byte, offset int, v uint64) int {
offset -= sovBond(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
l = m.MaxBondAmount.Size()
n += 1 + l + sovBond(uint64(l))
return n
}
func (m *Bond) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Id)
if l > 0 {
n += 1 + l + sovBond(uint64(l))
}
l = len(m.Owner)
if l > 0 {
n += 1 + l + sovBond(uint64(l))
}
if len(m.Balance) > 0 {
for _, e := range m.Balance {
l = e.Size()
n += 1 + l + sovBond(uint64(l))
}
}
return n
}
func sovBond(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozBond(x uint64) (n int) {
return sovBond(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 ErrIntOverflowBond
}
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 MaxBondAmount", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBond
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthBond
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthBond
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.MaxBondAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipBond(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthBond
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Bond) 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 ErrIntOverflowBond
}
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: Bond: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Bond: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBond
}
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 ErrInvalidLengthBond
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthBond
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Id = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBond
}
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 ErrInvalidLengthBond
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthBond
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Owner = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowBond
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthBond
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthBond
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Balance = append(m.Balance, types.Coin{})
if err := m.Balance[len(m.Balance)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipBond(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthBond
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipBond(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, ErrIntOverflowBond
}
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, ErrIntOverflowBond
}
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, ErrIntOverflowBond
}
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, ErrInvalidLengthBond
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupBond
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthBond
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthBond = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowBond = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupBond = fmt.Errorf("proto: unexpected end of group")
)