Nabarun Gogoi
a8a59ad0c1
Some checks failed
Lint / Run golangci-lint (pull_request) Failing after 5m56s
Unit Tests / test-unit (pull_request) Successful in 2m4s
SDK Tests / sdk_tests_nameservice_expiry (pull_request) Successful in 7m57s
SDK Tests / sdk_tests (pull_request) Failing after 8m51s
SDK Tests / sdk_tests_auctions (pull_request) Successful in 13m26s
Protobuf / lint (pull_request) Successful in 24s
Build / build (pull_request) Successful in 2m49s
Integration Tests / test-integration (pull_request) Successful in 2m33s
E2E Tests / test-e2e (pull_request) Successful in 3m50s
* Rename ethereum_address to nitro_address * Use camel case for variables in gql schema * Fix indentation in proto files * Fix proto lint errors --------- Co-authored-by: IshaVenikar <ishavenikar7@gmail.com>
766 lines
19 KiB
Go
766 lines
19 KiB
Go
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: cerc/onboarding/v1/onboarding.proto
|
|
|
|
package onboarding
|
|
|
|
import (
|
|
fmt "fmt"
|
|
_ "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 onboarding module.
|
|
type Params struct {
|
|
OnboardingEnabled bool `protobuf:"varint,1,opt,name=onboarding_enabled,json=onboardingEnabled,proto3" json:"onboarding_enabled,omitempty" json:"onboarding_enabled" yaml:"onboarding_enabled"`
|
|
}
|
|
|
|
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_59afed779274eaf0, []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) GetOnboardingEnabled() bool {
|
|
if m != nil {
|
|
return m.OnboardingEnabled
|
|
}
|
|
return false
|
|
}
|
|
|
|
// Participant defines the data that will be stored for each enrolled
|
|
// participant
|
|
type Participant struct {
|
|
CosmosAddress string `protobuf:"bytes,1,opt,name=cosmos_address,json=cosmosAddress,proto3" json:"cosmos_address,omitempty" json:"cosmos_address" yaml:"cosmos_address"`
|
|
NitroAddress string `protobuf:"bytes,2,opt,name=nitro_address,json=nitroAddress,proto3" json:"nitro_address,omitempty" json:"nitro_address" yaml:"nitro_address"`
|
|
}
|
|
|
|
func (m *Participant) Reset() { *m = Participant{} }
|
|
func (m *Participant) String() string { return proto.CompactTextString(m) }
|
|
func (*Participant) ProtoMessage() {}
|
|
func (*Participant) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_59afed779274eaf0, []int{1}
|
|
}
|
|
func (m *Participant) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Participant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Participant.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 *Participant) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Participant.Merge(m, src)
|
|
}
|
|
func (m *Participant) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Participant) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Participant.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Participant proto.InternalMessageInfo
|
|
|
|
func (m *Participant) GetCosmosAddress() string {
|
|
if m != nil {
|
|
return m.CosmosAddress
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Participant) GetNitroAddress() string {
|
|
if m != nil {
|
|
return m.NitroAddress
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// EthPayload defines the payload that is signed by the ethereum private key
|
|
type EthPayload struct {
|
|
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" json:"address" yaml:"address"`
|
|
Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty" json:"msg" yaml:"msg"`
|
|
}
|
|
|
|
func (m *EthPayload) Reset() { *m = EthPayload{} }
|
|
func (m *EthPayload) String() string { return proto.CompactTextString(m) }
|
|
func (*EthPayload) ProtoMessage() {}
|
|
func (*EthPayload) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_59afed779274eaf0, []int{2}
|
|
}
|
|
func (m *EthPayload) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *EthPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_EthPayload.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 *EthPayload) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_EthPayload.Merge(m, src)
|
|
}
|
|
func (m *EthPayload) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *EthPayload) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_EthPayload.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_EthPayload proto.InternalMessageInfo
|
|
|
|
func (m *EthPayload) GetAddress() string {
|
|
if m != nil {
|
|
return m.Address
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *EthPayload) GetMsg() string {
|
|
if m != nil {
|
|
return m.Msg
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*Params)(nil), "cerc.onboarding.v1.Params")
|
|
proto.RegisterType((*Participant)(nil), "cerc.onboarding.v1.Participant")
|
|
proto.RegisterType((*EthPayload)(nil), "cerc.onboarding.v1.EthPayload")
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterFile("cerc/onboarding/v1/onboarding.proto", fileDescriptor_59afed779274eaf0)
|
|
}
|
|
|
|
var fileDescriptor_59afed779274eaf0 = []byte{
|
|
// 343 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xcf, 0x4a, 0xc3, 0x30,
|
|
0x1c, 0xc7, 0x57, 0x85, 0xa9, 0xd1, 0x09, 0x06, 0x05, 0x15, 0x6c, 0x67, 0xbd, 0x4c, 0xc6, 0x5a,
|
|
0xc6, 0x0e, 0x82, 0x9e, 0x2c, 0xec, 0x3e, 0x7a, 0xf0, 0xe0, 0x65, 0xa4, 0x7f, 0xac, 0x91, 0x36,
|
|
0xbf, 0x91, 0x84, 0xe2, 0xde, 0xc2, 0xd7, 0xf1, 0x0d, 0x3c, 0xee, 0xe8, 0xa9, 0xc8, 0xf6, 0x06,
|
|
0x7d, 0x02, 0x69, 0xb3, 0x6e, 0xeb, 0xf4, 0x96, 0xdf, 0xf7, 0xcf, 0xe7, 0x17, 0x48, 0xd0, 0x8d,
|
|
0x1f, 0x72, 0xdf, 0x06, 0xe6, 0x01, 0xe1, 0x01, 0x65, 0x91, 0x9d, 0xf6, 0x37, 0x26, 0x6b, 0xc2,
|
|
0x41, 0x02, 0xc6, 0x45, 0xc8, 0xda, 0x90, 0xd3, 0xfe, 0xe5, 0x69, 0x04, 0x11, 0x94, 0xb6, 0x5d,
|
|
0x9c, 0x54, 0xd2, 0x9c, 0xa0, 0xe6, 0x88, 0x70, 0x92, 0x08, 0xfc, 0x82, 0xf0, 0xba, 0x30, 0x0e,
|
|
0x19, 0xf1, 0xe2, 0x30, 0x38, 0xd7, 0xda, 0x5a, 0x67, 0xdf, 0xb9, 0xcb, 0x33, 0x63, 0xf0, 0x26,
|
|
0x80, 0xdd, 0x9b, 0x7f, 0x33, 0x66, 0x7b, 0x4a, 0x92, 0xf8, 0x5f, 0xc7, 0x3d, 0x59, 0x8b, 0xc3,
|
|
0xa5, 0xf6, 0xa9, 0xa1, 0xc3, 0x11, 0xe1, 0x92, 0xfa, 0x74, 0x42, 0x98, 0xc4, 0x4f, 0xe8, 0xd8,
|
|
0x07, 0x91, 0x80, 0x18, 0x93, 0x20, 0xe0, 0xa1, 0x10, 0xe5, 0xce, 0x03, 0xc7, 0xce, 0x33, 0xa3,
|
|
0xab, 0x76, 0xd6, 0xfd, 0x6a, 0xdf, 0x96, 0xea, 0xb6, 0x94, 0xf0, 0xa8, 0x66, 0xec, 0xa2, 0x16,
|
|
0xa3, 0x92, 0xc3, 0x0a, 0xbb, 0x53, 0x62, 0x7b, 0x79, 0x66, 0xdc, 0x2a, 0x6c, 0xcd, 0xae, 0xa8,
|
|
0x75, 0xd1, 0x3d, 0x2a, 0xe7, 0x25, 0xd3, 0x4c, 0x11, 0x1a, 0xca, 0xd7, 0x11, 0x99, 0xc6, 0x40,
|
|
0x02, 0xfc, 0x80, 0xf6, 0xea, 0x57, 0xbe, 0xce, 0x33, 0xe3, 0x4a, 0xb1, 0xb7, 0xa8, 0x2b, 0x5e,
|
|
0xd5, 0xc0, 0x5d, 0xb4, 0x9b, 0x88, 0x68, 0x79, 0xa9, 0x8b, 0x3c, 0x33, 0xce, 0x54, 0x31, 0x11,
|
|
0x51, 0x55, 0x2a, 0x8e, 0x6e, 0x91, 0x72, 0x9c, 0xaf, 0xb9, 0xae, 0xcd, 0xe6, 0xba, 0xf6, 0x33,
|
|
0xd7, 0xb5, 0x8f, 0x85, 0xde, 0x98, 0x2d, 0xf4, 0xc6, 0xf7, 0x42, 0x6f, 0x3c, 0x77, 0x22, 0x2a,
|
|
0xad, 0x34, 0xf0, 0x2c, 0x09, 0x76, 0xf1, 0xe8, 0x3d, 0x0a, 0x76, 0x4c, 0x7c, 0x60, 0xd4, 0x0f,
|
|
0xec, 0xf7, 0x8d, 0x9f, 0xe1, 0x35, 0xcb, 0x07, 0x1f, 0xfc, 0x06, 0x00, 0x00, 0xff, 0xff, 0x91,
|
|
0x47, 0xeb, 0x34, 0x41, 0x02, 0x00, 0x00,
|
|
}
|
|
|
|
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.OnboardingEnabled {
|
|
i--
|
|
if m.OnboardingEnabled {
|
|
dAtA[i] = 1
|
|
} else {
|
|
dAtA[i] = 0
|
|
}
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *Participant) 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 *Participant) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Participant) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.NitroAddress) > 0 {
|
|
i -= len(m.NitroAddress)
|
|
copy(dAtA[i:], m.NitroAddress)
|
|
i = encodeVarintOnboarding(dAtA, i, uint64(len(m.NitroAddress)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.CosmosAddress) > 0 {
|
|
i -= len(m.CosmosAddress)
|
|
copy(dAtA[i:], m.CosmosAddress)
|
|
i = encodeVarintOnboarding(dAtA, i, uint64(len(m.CosmosAddress)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *EthPayload) 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 *EthPayload) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *EthPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Msg) > 0 {
|
|
i -= len(m.Msg)
|
|
copy(dAtA[i:], m.Msg)
|
|
i = encodeVarintOnboarding(dAtA, i, uint64(len(m.Msg)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.Address) > 0 {
|
|
i -= len(m.Address)
|
|
copy(dAtA[i:], m.Address)
|
|
i = encodeVarintOnboarding(dAtA, i, uint64(len(m.Address)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func encodeVarintOnboarding(dAtA []byte, offset int, v uint64) int {
|
|
offset -= sovOnboarding(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 m.OnboardingEnabled {
|
|
n += 2
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Participant) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.CosmosAddress)
|
|
if l > 0 {
|
|
n += 1 + l + sovOnboarding(uint64(l))
|
|
}
|
|
l = len(m.NitroAddress)
|
|
if l > 0 {
|
|
n += 1 + l + sovOnboarding(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *EthPayload) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Address)
|
|
if l > 0 {
|
|
n += 1 + l + sovOnboarding(uint64(l))
|
|
}
|
|
l = len(m.Msg)
|
|
if l > 0 {
|
|
n += 1 + l + sovOnboarding(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func sovOnboarding(x uint64) (n int) {
|
|
return (math_bits.Len64(x|1) + 6) / 7
|
|
}
|
|
func sozOnboarding(x uint64) (n int) {
|
|
return sovOnboarding(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 ErrIntOverflowOnboarding
|
|
}
|
|
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 != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field OnboardingEnabled", wireType)
|
|
}
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowOnboarding
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.OnboardingEnabled = bool(v != 0)
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipOnboarding(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthOnboarding
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *Participant) 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 ErrIntOverflowOnboarding
|
|
}
|
|
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: Participant: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Participant: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field CosmosAddress", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowOnboarding
|
|
}
|
|
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 ErrInvalidLengthOnboarding
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthOnboarding
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.CosmosAddress = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field NitroAddress", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowOnboarding
|
|
}
|
|
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 ErrInvalidLengthOnboarding
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthOnboarding
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.NitroAddress = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipOnboarding(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthOnboarding
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *EthPayload) 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 ErrIntOverflowOnboarding
|
|
}
|
|
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: EthPayload: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: EthPayload: 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 ErrIntOverflowOnboarding
|
|
}
|
|
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 ErrInvalidLengthOnboarding
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthOnboarding
|
|
}
|
|
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 Msg", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowOnboarding
|
|
}
|
|
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 ErrInvalidLengthOnboarding
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthOnboarding
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Msg = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipOnboarding(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthOnboarding
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func skipOnboarding(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, ErrIntOverflowOnboarding
|
|
}
|
|
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, ErrIntOverflowOnboarding
|
|
}
|
|
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, ErrIntOverflowOnboarding
|
|
}
|
|
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, ErrInvalidLengthOnboarding
|
|
}
|
|
iNdEx += length
|
|
case 3:
|
|
depth++
|
|
case 4:
|
|
if depth == 0 {
|
|
return 0, ErrUnexpectedEndOfGroupOnboarding
|
|
}
|
|
depth--
|
|
case 5:
|
|
iNdEx += 4
|
|
default:
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
}
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthOnboarding
|
|
}
|
|
if depth == 0 {
|
|
return iNdEx, nil
|
|
}
|
|
}
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
|
|
var (
|
|
ErrInvalidLengthOnboarding = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowOnboarding = fmt.Errorf("proto: integer overflow")
|
|
ErrUnexpectedEndOfGroupOnboarding = fmt.Errorf("proto: unexpected end of group")
|
|
)
|