Implement onboarding module for testnet participants #36
@ -8,20 +8,22 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
jobs:
|
jobs:
|
||||||
golangci:
|
# TODO: Handle CI error: "::error::golangci-lint exit with code 137" and uncomment lint job
|
||||||
name: Run golangci-lint
|
|
||||||
runs-on: ubuntu-latest
|
# golangci:
|
||||||
timeout-minutes: 10
|
# name: Run golangci-lint
|
||||||
steps:
|
# runs-on: ubuntu-latest
|
||||||
# Required: setup-go, for all versions v3.0.0+ of golangci-lint
|
# timeout-minutes: 10
|
||||||
- uses: actions/setup-go@v3
|
# steps:
|
||||||
with:
|
# # Required: setup-go, for all versions v3.0.0+ of golangci-lint
|
||||||
go-version: 1.21
|
# - uses: actions/setup-go@v3
|
||||||
check-latest: true
|
# with:
|
||||||
- uses: actions/checkout@v3
|
# go-version: 1.21
|
||||||
- uses: golangci/golangci-lint-action@v3.3.1
|
# check-latest: true
|
||||||
with:
|
# - uses: actions/checkout@v3
|
||||||
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
|
# - uses: golangci/golangci-lint-action@v3.3.1
|
||||||
version: latest
|
# with:
|
||||||
args: --timeout 10m
|
# # Required: the version of golangci-lint is required and must be specified without patch version
|
||||||
github-token: ${{ secrets.github_token }}
|
# version: v1.51
|
||||||
|
# args: --timeout 10m
|
||||||
|
# github-token: ${{ secrets.github_token }}
|
||||||
|
69
.golangci.yml
Normal file
69
.golangci.yml
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
run:
|
||||||
|
tests: false
|
||||||
|
# timeout for analysis, e.g. 30s, 5m, default is 1m
|
||||||
|
# timeout: 5m
|
||||||
|
|
||||||
|
linters:
|
||||||
|
enable:
|
||||||
|
- bodyclose
|
||||||
|
- dogsled
|
||||||
|
- errcheck
|
||||||
|
- goconst
|
||||||
|
- gocritic
|
||||||
|
# - revive # overly sensitive var-naming detection
|
||||||
|
- gosec
|
||||||
|
- gosimple
|
||||||
|
- govet
|
||||||
|
- ineffassign
|
||||||
|
- lll
|
||||||
|
- misspell
|
||||||
|
- nakedret
|
||||||
|
- prealloc
|
||||||
|
- exportloopref
|
||||||
|
- staticcheck
|
||||||
|
- stylecheck
|
||||||
|
- typecheck
|
||||||
|
- unconvert
|
||||||
|
- unparam
|
||||||
|
- unused
|
||||||
|
- asciicheck
|
||||||
|
- exportloopref
|
||||||
|
- gofumpt
|
||||||
|
- gomodguard
|
||||||
|
- whitespace
|
||||||
|
|
||||||
|
issues:
|
||||||
|
exclude-rules:
|
||||||
|
- path: _test\.go
|
||||||
|
linters:
|
||||||
|
- gosec
|
||||||
|
- linters:
|
||||||
|
- lll
|
||||||
|
source: "https://"
|
||||||
|
- linters:
|
||||||
|
- stylecheck
|
||||||
|
text: "ST1003:"
|
||||||
|
max-same-issues: 50
|
||||||
|
|
||||||
|
linters-settings:
|
||||||
|
lll:
|
||||||
|
line-length: 150
|
||||||
|
dogsled:
|
||||||
|
max-blank-identifiers: 3
|
||||||
|
golint:
|
||||||
|
min-confidence: 0
|
||||||
|
maligned:
|
||||||
|
suggest-new: true
|
||||||
|
misspell:
|
||||||
|
locale: US
|
||||||
|
gofumpt:
|
||||||
|
lang-version: "1.21"
|
||||||
|
gomodguard:
|
||||||
|
blocked:
|
||||||
|
versions: # List of blocked module version constraints
|
||||||
|
- https://github.com/etcd-io/etcd: # Blocked module with version constraint
|
||||||
|
version: ">= 3.4.10 || ~3.3.23" # Version constraint, see https://github.com/Masterminds/semver#basic-comparisons
|
||||||
|
reason: "CVE-2020-15114; CVE-2020-15136; CVE-2020-15115" # Reason why the version constraint exists. (Optional)
|
||||||
|
- https://github.com/dgrijalva/jwt-go: # Blocked module with version constraint
|
||||||
|
version: ">= 4.0.0-preview1" # Version constraint, see https://github.com/Masterminds/semver#basic-comparisons
|
||||||
|
reason: "CVE-2020-26160" # Reason why the version constraint exists. (Optional)
|
581
api/cerc/onboarding/module/v1/module.pulsar.go
Normal file
581
api/cerc/onboarding/module/v1/module.pulsar.go
Normal file
@ -0,0 +1,581 @@
|
|||||||
|
// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
|
||||||
|
package modulev1
|
||||||
|
|
||||||
|
import (
|
||||||
|
_ "cosmossdk.io/api/cosmos/app/v1alpha1"
|
||||||
|
fmt "fmt"
|
||||||
|
runtime "github.com/cosmos/cosmos-proto/runtime"
|
||||||
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
|
protoiface "google.golang.org/protobuf/runtime/protoiface"
|
||||||
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
|
io "io"
|
||||||
|
reflect "reflect"
|
||||||
|
sync "sync"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
md_Module protoreflect.MessageDescriptor
|
||||||
|
fd_Module_authority protoreflect.FieldDescriptor
|
||||||
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
file_cerc_onboarding_module_v1_module_proto_init()
|
||||||
|
md_Module = File_cerc_onboarding_module_v1_module_proto.Messages().ByName("Module")
|
||||||
|
fd_Module_authority = md_Module.Fields().ByName("authority")
|
||||||
|
}
|
||||||
|
|
||||||
|
var _ protoreflect.Message = (*fastReflection_Module)(nil)
|
||||||
|
|
||||||
|
type fastReflection_Module Module
|
||||||
|
|
||||||
|
func (x *Module) ProtoReflect() protoreflect.Message {
|
||||||
|
return (*fastReflection_Module)(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Module) slowProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_cerc_onboarding_module_v1_module_proto_msgTypes[0]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
var _fastReflection_Module_messageType fastReflection_Module_messageType
|
||||||
|
var _ protoreflect.MessageType = fastReflection_Module_messageType{}
|
||||||
|
|
||||||
|
type fastReflection_Module_messageType struct{}
|
||||||
|
|
||||||
|
func (x fastReflection_Module_messageType) Zero() protoreflect.Message {
|
||||||
|
return (*fastReflection_Module)(nil)
|
||||||
|
}
|
||||||
|
func (x fastReflection_Module_messageType) New() protoreflect.Message {
|
||||||
|
return new(fastReflection_Module)
|
||||||
|
}
|
||||||
|
func (x fastReflection_Module_messageType) Descriptor() protoreflect.MessageDescriptor {
|
||||||
|
return md_Module
|
||||||
|
}
|
||||||
|
|
||||||
|
// Descriptor returns message descriptor, which contains only the protobuf
|
||||||
|
// type information for the message.
|
||||||
|
func (x *fastReflection_Module) Descriptor() protoreflect.MessageDescriptor {
|
||||||
|
return md_Module
|
||||||
|
}
|
||||||
|
|
||||||
|
// Type returns the message type, which encapsulates both Go and protobuf
|
||||||
|
// type information. If the Go type information is not needed,
|
||||||
|
// it is recommended that the message descriptor be used instead.
|
||||||
|
func (x *fastReflection_Module) Type() protoreflect.MessageType {
|
||||||
|
return _fastReflection_Module_messageType
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a newly allocated and mutable empty message.
|
||||||
|
func (x *fastReflection_Module) New() protoreflect.Message {
|
||||||
|
return new(fastReflection_Module)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Interface unwraps the message reflection interface and
|
||||||
|
// returns the underlying ProtoMessage interface.
|
||||||
|
func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage {
|
||||||
|
return (*Module)(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Range iterates over every populated field in an undefined order,
|
||||||
|
// calling f for each field descriptor and value encountered.
|
||||||
|
// Range returns immediately if f returns false.
|
||||||
|
// While iterating, mutating operations may only be performed
|
||||||
|
// on the current field descriptor.
|
||||||
|
func (x *fastReflection_Module) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
||||||
|
if x.Authority != "" {
|
||||||
|
value := protoreflect.ValueOfString(x.Authority)
|
||||||
|
if !f(fd_Module_authority, value) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Has reports whether a field is populated.
|
||||||
|
//
|
||||||
|
// Some fields have the property of nullability where it is possible to
|
||||||
|
// distinguish between the default value of a field and whether the field
|
||||||
|
// was explicitly populated with the default value. Singular message fields,
|
||||||
|
// member fields of a oneof, and proto2 scalar fields are nullable. Such
|
||||||
|
// fields are populated only if explicitly set.
|
||||||
|
//
|
||||||
|
// In other cases (aside from the nullable cases above),
|
||||||
|
// a proto3 scalar field is populated if it contains a non-zero value, and
|
||||||
|
// a repeated field is populated if it is non-empty.
|
||||||
|
func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool {
|
||||||
|
switch fd.FullName() {
|
||||||
|
case "cerc.onboarding.module.v1.Module.authority":
|
||||||
|
return x.Authority != ""
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.module.v1.Module"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message cerc.onboarding.module.v1.Module does not contain field %s", fd.FullName()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clear clears the field such that a subsequent Has call reports false.
|
||||||
|
//
|
||||||
|
// Clearing an extension field clears both the extension type and value
|
||||||
|
// associated with the given field number.
|
||||||
|
//
|
||||||
|
// Clear is a mutating operation and unsafe for concurrent use.
|
||||||
|
func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) {
|
||||||
|
switch fd.FullName() {
|
||||||
|
case "cerc.onboarding.module.v1.Module.authority":
|
||||||
|
x.Authority = ""
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.module.v1.Module"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message cerc.onboarding.module.v1.Module does not contain field %s", fd.FullName()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get retrieves the value for a field.
|
||||||
|
//
|
||||||
|
// For unpopulated scalars, it returns the default value, where
|
||||||
|
// the default value of a bytes scalar is guaranteed to be a copy.
|
||||||
|
// For unpopulated composite types, it returns an empty, read-only view
|
||||||
|
// of the value; to obtain a mutable reference, use Mutable.
|
||||||
|
func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
|
switch descriptor.FullName() {
|
||||||
|
case "cerc.onboarding.module.v1.Module.authority":
|
||||||
|
value := x.Authority
|
||||||
|
return protoreflect.ValueOfString(value)
|
||||||
|
default:
|
||||||
|
if descriptor.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.module.v1.Module"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message cerc.onboarding.module.v1.Module does not contain field %s", descriptor.FullName()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set stores the value for a field.
|
||||||
|
//
|
||||||
|
// For a field belonging to a oneof, it implicitly clears any other field
|
||||||
|
// that may be currently set within the same oneof.
|
||||||
|
// For extension fields, it implicitly stores the provided ExtensionType.
|
||||||
|
// When setting a composite type, it is unspecified whether the stored value
|
||||||
|
// aliases the source's memory in any way. If the composite value is an
|
||||||
|
// empty, read-only value, then it panics.
|
||||||
|
//
|
||||||
|
// Set is a mutating operation and unsafe for concurrent use.
|
||||||
|
func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
||||||
|
switch fd.FullName() {
|
||||||
|
case "cerc.onboarding.module.v1.Module.authority":
|
||||||
|
x.Authority = value.Interface().(string)
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.module.v1.Module"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message cerc.onboarding.module.v1.Module does not contain field %s", fd.FullName()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Mutable returns a mutable reference to a composite type.
|
||||||
|
//
|
||||||
|
// If the field is unpopulated, it may allocate a composite value.
|
||||||
|
// For a field belonging to a oneof, it implicitly clears any other field
|
||||||
|
// that may be currently set within the same oneof.
|
||||||
|
// For extension fields, it implicitly stores the provided ExtensionType
|
||||||
|
// if not already stored.
|
||||||
|
// It panics if the field does not contain a composite type.
|
||||||
|
//
|
||||||
|
// Mutable is a mutating operation and unsafe for concurrent use.
|
||||||
|
func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
|
switch fd.FullName() {
|
||||||
|
case "cerc.onboarding.module.v1.Module.authority":
|
||||||
|
panic(fmt.Errorf("field authority of message cerc.onboarding.module.v1.Module is not mutable"))
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.module.v1.Module"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message cerc.onboarding.module.v1.Module does not contain field %s", fd.FullName()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewField returns a new value that is assignable to the field
|
||||||
|
// for the given descriptor. For scalars, this returns the default value.
|
||||||
|
// For lists, maps, and messages, this returns a new, empty, mutable value.
|
||||||
|
func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
|
switch fd.FullName() {
|
||||||
|
case "cerc.onboarding.module.v1.Module.authority":
|
||||||
|
return protoreflect.ValueOfString("")
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.module.v1.Module"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message cerc.onboarding.module.v1.Module does not contain field %s", fd.FullName()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// WhichOneof reports which field within the oneof is populated,
|
||||||
|
// returning nil if none are populated.
|
||||||
|
// It panics if the oneof descriptor does not belong to this message.
|
||||||
|
func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||||
|
switch d.FullName() {
|
||||||
|
default:
|
||||||
|
panic(fmt.Errorf("%s is not a oneof field in cerc.onboarding.module.v1.Module", d.FullName()))
|
||||||
|
}
|
||||||
|
panic("unreachable")
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetUnknown retrieves the entire list of unknown fields.
|
||||||
|
// The caller may only mutate the contents of the RawFields
|
||||||
|
// if the mutated bytes are stored back into the message with SetUnknown.
|
||||||
|
func (x *fastReflection_Module) GetUnknown() protoreflect.RawFields {
|
||||||
|
return x.unknownFields
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetUnknown stores an entire list of unknown fields.
|
||||||
|
// The raw fields must be syntactically valid according to the wire format.
|
||||||
|
// An implementation may panic if this is not the case.
|
||||||
|
// Once stored, the caller must not mutate the content of the RawFields.
|
||||||
|
// An empty RawFields may be passed to clear the fields.
|
||||||
|
//
|
||||||
|
// SetUnknown is a mutating operation and unsafe for concurrent use.
|
||||||
|
func (x *fastReflection_Module) SetUnknown(fields protoreflect.RawFields) {
|
||||||
|
x.unknownFields = fields
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsValid reports whether the message is valid.
|
||||||
|
//
|
||||||
|
// An invalid message is an empty, read-only value.
|
||||||
|
//
|
||||||
|
// An invalid message often corresponds to a nil pointer of the concrete
|
||||||
|
// message type, but the details are implementation dependent.
|
||||||
|
// Validity is not part of the protobuf data model, and may not
|
||||||
|
// be preserved in marshaling or other operations.
|
||||||
|
func (x *fastReflection_Module) IsValid() bool {
|
||||||
|
return x != nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations.
|
||||||
|
// This method may return nil.
|
||||||
|
//
|
||||||
|
// The returned methods type is identical to
|
||||||
|
// "google.golang.org/protobuf/runtime/protoiface".Methods.
|
||||||
|
// Consult the protoiface package documentation for details.
|
||||||
|
func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods {
|
||||||
|
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
|
||||||
|
x := input.Message.Interface().(*Module)
|
||||||
|
if x == nil {
|
||||||
|
return protoiface.SizeOutput{
|
||||||
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||||
|
Size: 0,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
options := runtime.SizeInputToOptions(input)
|
||||||
|
_ = options
|
||||||
|
var n int
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
l = len(x.Authority)
|
||||||
|
if l > 0 {
|
||||||
|
n += 1 + l + runtime.Sov(uint64(l))
|
||||||
|
}
|
||||||
|
if x.unknownFields != nil {
|
||||||
|
n += len(x.unknownFields)
|
||||||
|
}
|
||||||
|
return protoiface.SizeOutput{
|
||||||
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||||
|
Size: n,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
|
||||||
|
x := input.Message.Interface().(*Module)
|
||||||
|
if x == nil {
|
||||||
|
return protoiface.MarshalOutput{
|
||||||
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||||
|
Buf: input.Buf,
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
options := runtime.MarshalInputToOptions(input)
|
||||||
|
_ = options
|
||||||
|
size := options.Size(x)
|
||||||
|
dAtA := make([]byte, size)
|
||||||
|
i := len(dAtA)
|
||||||
|
_ = i
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if x.unknownFields != nil {
|
||||||
|
i -= len(x.unknownFields)
|
||||||
|
copy(dAtA[i:], x.unknownFields)
|
||||||
|
}
|
||||||
|
if len(x.Authority) > 0 {
|
||||||
|
i -= len(x.Authority)
|
||||||
|
copy(dAtA[i:], x.Authority)
|
||||||
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
}
|
||||||
|
if input.Buf != nil {
|
||||||
|
input.Buf = append(input.Buf, dAtA...)
|
||||||
|
} else {
|
||||||
|
input.Buf = dAtA
|
||||||
|
}
|
||||||
|
return protoiface.MarshalOutput{
|
||||||
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||||
|
Buf: input.Buf,
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
|
||||||
|
x := input.Message.Interface().(*Module)
|
||||||
|
if x == nil {
|
||||||
|
return protoiface.UnmarshalOutput{
|
||||||
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||||
|
Flags: input.Flags,
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
options := runtime.UnmarshalInputToOptions(input)
|
||||||
|
_ = options
|
||||||
|
dAtA := input.Buf
|
||||||
|
l := len(dAtA)
|
||||||
|
iNdEx := 0
|
||||||
|
for iNdEx < l {
|
||||||
|
preIndex := iNdEx
|
||||||
|
var wire uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
case 1:
|
||||||
|
if wireType != 2 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType)
|
||||||
|
}
|
||||||
|
var stringLen uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
stringLen |= uint64(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
intStringLen := int(stringLen)
|
||||||
|
if intStringLen < 0 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
x.Authority = string(dAtA[iNdEx:postIndex])
|
||||||
|
iNdEx = postIndex
|
||||||
|
default:
|
||||||
|
iNdEx = preIndex
|
||||||
|
skippy, err := runtime.Skip(dAtA[iNdEx:])
|
||||||
|
if err != nil {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
||||||
|
}
|
||||||
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||||
|
}
|
||||||
|
if (iNdEx + skippy) > l {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
if !options.DiscardUnknown {
|
||||||
|
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
|
||||||
|
}
|
||||||
|
iNdEx += skippy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if iNdEx > l {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
|
||||||
|
}
|
||||||
|
return &protoiface.Methods{
|
||||||
|
NoUnkeyedLiterals: struct{}{},
|
||||||
|
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
|
||||||
|
Size: size,
|
||||||
|
Marshal: marshal,
|
||||||
|
Unmarshal: unmarshal,
|
||||||
|
Merge: nil,
|
||||||
|
CheckInitialized: nil,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// protoc-gen-go v1.27.0
|
||||||
|
// protoc (unknown)
|
||||||
|
// source: cerc/onboarding/module/v1/module.proto
|
||||||
|
|
||||||
|
const (
|
||||||
|
// Verify that this generated code is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||||
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
|
)
|
||||||
|
|
||||||
|
// Module is the app config object of the module.
|
||||||
|
// Learn more: https://docs.cosmos.network/main/building-modules/depinject
|
||||||
|
type Module struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Module) Reset() {
|
||||||
|
*x = Module{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_cerc_onboarding_module_v1_module_proto_msgTypes[0]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Module) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*Module) ProtoMessage() {}
|
||||||
|
|
||||||
|
// Deprecated: Use Module.ProtoReflect.Descriptor instead.
|
||||||
|
func (*Module) Descriptor() ([]byte, []int) {
|
||||||
|
return file_cerc_onboarding_module_v1_module_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Module) GetAuthority() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Authority
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
var File_cerc_onboarding_module_v1_module_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
|
var file_cerc_onboarding_module_v1_module_proto_rawDesc = []byte{
|
||||||
|
0x0a, 0x26, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e,
|
||||||
|
0x67, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75,
|
||||||
|
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x6f,
|
||||||
|
0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
|
||||||
|
0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f,
|
||||||
|
0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e,
|
||||||
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x58, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12,
|
||||||
|
0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01,
|
||||||
|
0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x30, 0xba,
|
||||||
|
0xc0, 0x96, 0xda, 0x01, 0x2a, 0x0a, 0x28, 0x67, 0x69, 0x74, 0x2e, 0x76, 0x64, 0x62, 0x2e, 0x74,
|
||||||
|
0x6f, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x63, 0x6f, 0x6e, 0x69,
|
||||||
|
0x63, 0x64, 0x2f, 0x78, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x42,
|
||||||
|
0xf7, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62,
|
||||||
|
0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76,
|
||||||
|
0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01,
|
||||||
|
0x5a, 0x42, 0x67, 0x69, 0x74, 0x2e, 0x76, 0x64, 0x62, 0x2e, 0x74, 0x6f, 0x2f, 0x63, 0x65, 0x72,
|
||||||
|
0x63, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x63, 0x6f, 0x6e, 0x69, 0x63, 0x64, 0x2f, 0x61, 0x70,
|
||||||
|
0x69, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e,
|
||||||
|
0x67, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75,
|
||||||
|
0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x4f, 0x4d, 0xaa, 0x02, 0x19, 0x43, 0x65, 0x72,
|
||||||
|
0x63, 0x2e, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x6f, 0x64,
|
||||||
|
0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x19, 0x43, 0x65, 0x72, 0x63, 0x5c, 0x4f, 0x6e,
|
||||||
|
0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c,
|
||||||
|
0x56, 0x31, 0xe2, 0x02, 0x25, 0x43, 0x65, 0x72, 0x63, 0x5c, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72,
|
||||||
|
0x64, 0x69, 0x6e, 0x67, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47,
|
||||||
|
0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1c, 0x43, 0x65, 0x72,
|
||||||
|
0x63, 0x3a, 0x3a, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x4d,
|
||||||
|
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||||
|
0x33,
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
file_cerc_onboarding_module_v1_module_proto_rawDescOnce sync.Once
|
||||||
|
file_cerc_onboarding_module_v1_module_proto_rawDescData = file_cerc_onboarding_module_v1_module_proto_rawDesc
|
||||||
|
)
|
||||||
|
|
||||||
|
func file_cerc_onboarding_module_v1_module_proto_rawDescGZIP() []byte {
|
||||||
|
file_cerc_onboarding_module_v1_module_proto_rawDescOnce.Do(func() {
|
||||||
|
file_cerc_onboarding_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_cerc_onboarding_module_v1_module_proto_rawDescData)
|
||||||
|
})
|
||||||
|
return file_cerc_onboarding_module_v1_module_proto_rawDescData
|
||||||
|
}
|
||||||
|
|
||||||
|
var file_cerc_onboarding_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||||
|
var file_cerc_onboarding_module_v1_module_proto_goTypes = []interface{}{
|
||||||
|
(*Module)(nil), // 0: cerc.onboarding.module.v1.Module
|
||||||
|
}
|
||||||
|
var file_cerc_onboarding_module_v1_module_proto_depIdxs = []int32{
|
||||||
|
0, // [0:0] is the sub-list for method output_type
|
||||||
|
0, // [0:0] is the sub-list for method input_type
|
||||||
|
0, // [0:0] is the sub-list for extension type_name
|
||||||
|
0, // [0:0] is the sub-list for extension extendee
|
||||||
|
0, // [0:0] is the sub-list for field type_name
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() { file_cerc_onboarding_module_v1_module_proto_init() }
|
||||||
|
func file_cerc_onboarding_module_v1_module_proto_init() {
|
||||||
|
if File_cerc_onboarding_module_v1_module_proto != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if !protoimpl.UnsafeEnabled {
|
||||||
|
file_cerc_onboarding_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*Module); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
type x struct{}
|
||||||
|
out := protoimpl.TypeBuilder{
|
||||||
|
File: protoimpl.DescBuilder{
|
||||||
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
|
RawDescriptor: file_cerc_onboarding_module_v1_module_proto_rawDesc,
|
||||||
|
NumEnums: 0,
|
||||||
|
NumMessages: 1,
|
||||||
|
NumExtensions: 0,
|
||||||
|
NumServices: 0,
|
||||||
|
},
|
||||||
|
GoTypes: file_cerc_onboarding_module_v1_module_proto_goTypes,
|
||||||
|
DependencyIndexes: file_cerc_onboarding_module_v1_module_proto_depIdxs,
|
||||||
|
MessageInfos: file_cerc_onboarding_module_v1_module_proto_msgTypes,
|
||||||
|
}.Build()
|
||||||
|
File_cerc_onboarding_module_v1_module_proto = out.File
|
||||||
|
file_cerc_onboarding_module_v1_module_proto_rawDesc = nil
|
||||||
|
file_cerc_onboarding_module_v1_module_proto_goTypes = nil
|
||||||
|
file_cerc_onboarding_module_v1_module_proto_depIdxs = nil
|
||||||
|
}
|
750
api/cerc/onboarding/v1/genesis.pulsar.go
Normal file
750
api/cerc/onboarding/v1/genesis.pulsar.go
Normal file
@ -0,0 +1,750 @@
|
|||||||
|
// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
|
||||||
|
package onboardingv1
|
||||||
|
|
||||||
|
import (
|
||||||
|
fmt "fmt"
|
||||||
|
runtime "github.com/cosmos/cosmos-proto/runtime"
|
||||||
|
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||||
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
|
protoiface "google.golang.org/protobuf/runtime/protoiface"
|
||||||
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
|
io "io"
|
||||||
|
reflect "reflect"
|
||||||
|
sync "sync"
|
||||||
|
)
|
||||||
|
|
||||||
|
var _ protoreflect.List = (*_GenesisState_2_list)(nil)
|
||||||
|
|
||||||
|
type _GenesisState_2_list struct {
|
||||||
|
list *[]*Participant
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *_GenesisState_2_list) Len() int {
|
||||||
|
if x.list == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
return len(*x.list)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *_GenesisState_2_list) Get(i int) protoreflect.Value {
|
||||||
|
return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect())
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *_GenesisState_2_list) Set(i int, value protoreflect.Value) {
|
||||||
|
valueUnwrapped := value.Message()
|
||||||
|
concreteValue := valueUnwrapped.Interface().(*Participant)
|
||||||
|
(*x.list)[i] = concreteValue
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *_GenesisState_2_list) Append(value protoreflect.Value) {
|
||||||
|
valueUnwrapped := value.Message()
|
||||||
|
concreteValue := valueUnwrapped.Interface().(*Participant)
|
||||||
|
*x.list = append(*x.list, concreteValue)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *_GenesisState_2_list) AppendMutable() protoreflect.Value {
|
||||||
|
v := new(Participant)
|
||||||
|
*x.list = append(*x.list, v)
|
||||||
|
return protoreflect.ValueOfMessage(v.ProtoReflect())
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *_GenesisState_2_list) Truncate(n int) {
|
||||||
|
for i := n; i < len(*x.list); i++ {
|
||||||
|
(*x.list)[i] = nil
|
||||||
|
}
|
||||||
|
*x.list = (*x.list)[:n]
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *_GenesisState_2_list) NewElement() protoreflect.Value {
|
||||||
|
v := new(Participant)
|
||||||
|
return protoreflect.ValueOfMessage(v.ProtoReflect())
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *_GenesisState_2_list) IsValid() bool {
|
||||||
|
return x.list != nil
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
md_GenesisState protoreflect.MessageDescriptor
|
||||||
|
fd_GenesisState_params protoreflect.FieldDescriptor
|
||||||
|
fd_GenesisState_participants protoreflect.FieldDescriptor
|
||||||
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
file_cerc_onboarding_v1_genesis_proto_init()
|
||||||
|
md_GenesisState = File_cerc_onboarding_v1_genesis_proto.Messages().ByName("GenesisState")
|
||||||
|
fd_GenesisState_params = md_GenesisState.Fields().ByName("params")
|
||||||
|
fd_GenesisState_participants = md_GenesisState.Fields().ByName("participants")
|
||||||
|
}
|
||||||
|
|
||||||
|
var _ protoreflect.Message = (*fastReflection_GenesisState)(nil)
|
||||||
|
|
||||||
|
type fastReflection_GenesisState GenesisState
|
||||||
|
|
||||||
|
func (x *GenesisState) ProtoReflect() protoreflect.Message {
|
||||||
|
return (*fastReflection_GenesisState)(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GenesisState) slowProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_cerc_onboarding_v1_genesis_proto_msgTypes[0]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType
|
||||||
|
var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{}
|
||||||
|
|
||||||
|
type fastReflection_GenesisState_messageType struct{}
|
||||||
|
|
||||||
|
func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message {
|
||||||
|
return (*fastReflection_GenesisState)(nil)
|
||||||
|
}
|
||||||
|
func (x fastReflection_GenesisState_messageType) New() protoreflect.Message {
|
||||||
|
return new(fastReflection_GenesisState)
|
||||||
|
}
|
||||||
|
func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor {
|
||||||
|
return md_GenesisState
|
||||||
|
}
|
||||||
|
|
||||||
|
// Descriptor returns message descriptor, which contains only the protobuf
|
||||||
|
// type information for the message.
|
||||||
|
func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor {
|
||||||
|
return md_GenesisState
|
||||||
|
}
|
||||||
|
|
||||||
|
// Type returns the message type, which encapsulates both Go and protobuf
|
||||||
|
// type information. If the Go type information is not needed,
|
||||||
|
// it is recommended that the message descriptor be used instead.
|
||||||
|
func (x *fastReflection_GenesisState) Type() protoreflect.MessageType {
|
||||||
|
return _fastReflection_GenesisState_messageType
|
||||||
|
}
|
||||||
|
|
||||||
|
// New returns a newly allocated and mutable empty message.
|
||||||
|
func (x *fastReflection_GenesisState) New() protoreflect.Message {
|
||||||
|
return new(fastReflection_GenesisState)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Interface unwraps the message reflection interface and
|
||||||
|
// returns the underlying ProtoMessage interface.
|
||||||
|
func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage {
|
||||||
|
return (*GenesisState)(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Range iterates over every populated field in an undefined order,
|
||||||
|
// calling f for each field descriptor and value encountered.
|
||||||
|
// Range returns immediately if f returns false.
|
||||||
|
// While iterating, mutating operations may only be performed
|
||||||
|
// on the current field descriptor.
|
||||||
|
func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
||||||
|
if x.Params != nil {
|
||||||
|
value := protoreflect.ValueOfMessage(x.Params.ProtoReflect())
|
||||||
|
if !f(fd_GenesisState_params, value) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if len(x.Participants) != 0 {
|
||||||
|
value := protoreflect.ValueOfList(&_GenesisState_2_list{list: &x.Participants})
|
||||||
|
if !f(fd_GenesisState_participants, value) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Has reports whether a field is populated.
|
||||||
|
//
|
||||||
|
// Some fields have the property of nullability where it is possible to
|
||||||
|
// distinguish between the default value of a field and whether the field
|
||||||
|
// was explicitly populated with the default value. Singular message fields,
|
||||||
|
// member fields of a oneof, and proto2 scalar fields are nullable. Such
|
||||||
|
// fields are populated only if explicitly set.
|
||||||
|
//
|
||||||
|
// In other cases (aside from the nullable cases above),
|
||||||
|
// a proto3 scalar field is populated if it contains a non-zero value, and
|
||||||
|
// a repeated field is populated if it is non-empty.
|
||||||
|
func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool {
|
||||||
|
switch fd.FullName() {
|
||||||
|
case "cerc.onboarding.v1.GenesisState.params":
|
||||||
|
return x.Params != nil
|
||||||
|
case "cerc.onboarding.v1.GenesisState.participants":
|
||||||
|
return len(x.Participants) != 0
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.GenesisState"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message cerc.onboarding.v1.GenesisState does not contain field %s", fd.FullName()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clear clears the field such that a subsequent Has call reports false.
|
||||||
|
//
|
||||||
|
// Clearing an extension field clears both the extension type and value
|
||||||
|
// associated with the given field number.
|
||||||
|
//
|
||||||
|
// Clear is a mutating operation and unsafe for concurrent use.
|
||||||
|
func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) {
|
||||||
|
switch fd.FullName() {
|
||||||
|
case "cerc.onboarding.v1.GenesisState.params":
|
||||||
|
x.Params = nil
|
||||||
|
case "cerc.onboarding.v1.GenesisState.participants":
|
||||||
|
x.Participants = nil
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.GenesisState"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message cerc.onboarding.v1.GenesisState does not contain field %s", fd.FullName()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get retrieves the value for a field.
|
||||||
|
//
|
||||||
|
// For unpopulated scalars, it returns the default value, where
|
||||||
|
// the default value of a bytes scalar is guaranteed to be a copy.
|
||||||
|
// For unpopulated composite types, it returns an empty, read-only view
|
||||||
|
// of the value; to obtain a mutable reference, use Mutable.
|
||||||
|
func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
|
switch descriptor.FullName() {
|
||||||
|
case "cerc.onboarding.v1.GenesisState.params":
|
||||||
|
value := x.Params
|
||||||
|
return protoreflect.ValueOfMessage(value.ProtoReflect())
|
||||||
|
case "cerc.onboarding.v1.GenesisState.participants":
|
||||||
|
if len(x.Participants) == 0 {
|
||||||
|
return protoreflect.ValueOfList(&_GenesisState_2_list{})
|
||||||
|
}
|
||||||
|
listValue := &_GenesisState_2_list{list: &x.Participants}
|
||||||
|
return protoreflect.ValueOfList(listValue)
|
||||||
|
default:
|
||||||
|
if descriptor.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.GenesisState"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message cerc.onboarding.v1.GenesisState does not contain field %s", descriptor.FullName()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set stores the value for a field.
|
||||||
|
//
|
||||||
|
// For a field belonging to a oneof, it implicitly clears any other field
|
||||||
|
// that may be currently set within the same oneof.
|
||||||
|
// For extension fields, it implicitly stores the provided ExtensionType.
|
||||||
|
// When setting a composite type, it is unspecified whether the stored value
|
||||||
|
// aliases the source's memory in any way. If the composite value is an
|
||||||
|
// empty, read-only value, then it panics.
|
||||||
|
//
|
||||||
|
// Set is a mutating operation and unsafe for concurrent use.
|
||||||
|
func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
||||||
|
switch fd.FullName() {
|
||||||
|
case "cerc.onboarding.v1.GenesisState.params":
|
||||||
|
x.Params = value.Message().Interface().(*Params)
|
||||||
|
case "cerc.onboarding.v1.GenesisState.participants":
|
||||||
|
lv := value.List()
|
||||||
|
clv := lv.(*_GenesisState_2_list)
|
||||||
|
x.Participants = *clv.list
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.GenesisState"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message cerc.onboarding.v1.GenesisState does not contain field %s", fd.FullName()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Mutable returns a mutable reference to a composite type.
|
||||||
|
//
|
||||||
|
// If the field is unpopulated, it may allocate a composite value.
|
||||||
|
// For a field belonging to a oneof, it implicitly clears any other field
|
||||||
|
// that may be currently set within the same oneof.
|
||||||
|
// For extension fields, it implicitly stores the provided ExtensionType
|
||||||
|
// if not already stored.
|
||||||
|
// It panics if the field does not contain a composite type.
|
||||||
|
//
|
||||||
|
// Mutable is a mutating operation and unsafe for concurrent use.
|
||||||
|
func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
|
switch fd.FullName() {
|
||||||
|
case "cerc.onboarding.v1.GenesisState.params":
|
||||||
|
if x.Params == nil {
|
||||||
|
x.Params = new(Params)
|
||||||
|
}
|
||||||
|
return protoreflect.ValueOfMessage(x.Params.ProtoReflect())
|
||||||
|
case "cerc.onboarding.v1.GenesisState.participants":
|
||||||
|
if x.Participants == nil {
|
||||||
|
x.Participants = []*Participant{}
|
||||||
|
}
|
||||||
|
value := &_GenesisState_2_list{list: &x.Participants}
|
||||||
|
return protoreflect.ValueOfList(value)
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.GenesisState"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message cerc.onboarding.v1.GenesisState does not contain field %s", fd.FullName()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewField returns a new value that is assignable to the field
|
||||||
|
// for the given descriptor. For scalars, this returns the default value.
|
||||||
|
// For lists, maps, and messages, this returns a new, empty, mutable value.
|
||||||
|
func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||||
|
switch fd.FullName() {
|
||||||
|
case "cerc.onboarding.v1.GenesisState.params":
|
||||||
|
m := new(Params)
|
||||||
|
return protoreflect.ValueOfMessage(m.ProtoReflect())
|
||||||
|
case "cerc.onboarding.v1.GenesisState.participants":
|
||||||
|
list := []*Participant{}
|
||||||
|
return protoreflect.ValueOfList(&_GenesisState_2_list{list: &list})
|
||||||
|
default:
|
||||||
|
if fd.IsExtension() {
|
||||||
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.GenesisState"))
|
||||||
|
}
|
||||||
|
panic(fmt.Errorf("message cerc.onboarding.v1.GenesisState does not contain field %s", fd.FullName()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// WhichOneof reports which field within the oneof is populated,
|
||||||
|
// returning nil if none are populated.
|
||||||
|
// It panics if the oneof descriptor does not belong to this message.
|
||||||
|
func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||||
|
switch d.FullName() {
|
||||||
|
default:
|
||||||
|
panic(fmt.Errorf("%s is not a oneof field in cerc.onboarding.v1.GenesisState", d.FullName()))
|
||||||
|
}
|
||||||
|
panic("unreachable")
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetUnknown retrieves the entire list of unknown fields.
|
||||||
|
// The caller may only mutate the contents of the RawFields
|
||||||
|
// if the mutated bytes are stored back into the message with SetUnknown.
|
||||||
|
func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields {
|
||||||
|
return x.unknownFields
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetUnknown stores an entire list of unknown fields.
|
||||||
|
// The raw fields must be syntactically valid according to the wire format.
|
||||||
|
// An implementation may panic if this is not the case.
|
||||||
|
// Once stored, the caller must not mutate the content of the RawFields.
|
||||||
|
// An empty RawFields may be passed to clear the fields.
|
||||||
|
//
|
||||||
|
// SetUnknown is a mutating operation and unsafe for concurrent use.
|
||||||
|
func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) {
|
||||||
|
x.unknownFields = fields
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsValid reports whether the message is valid.
|
||||||
|
//
|
||||||
|
// An invalid message is an empty, read-only value.
|
||||||
|
//
|
||||||
|
// An invalid message often corresponds to a nil pointer of the concrete
|
||||||
|
// message type, but the details are implementation dependent.
|
||||||
|
// Validity is not part of the protobuf data model, and may not
|
||||||
|
// be preserved in marshaling or other operations.
|
||||||
|
func (x *fastReflection_GenesisState) IsValid() bool {
|
||||||
|
return x != nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations.
|
||||||
|
// This method may return nil.
|
||||||
|
//
|
||||||
|
// The returned methods type is identical to
|
||||||
|
// "google.golang.org/protobuf/runtime/protoiface".Methods.
|
||||||
|
// Consult the protoiface package documentation for details.
|
||||||
|
func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods {
|
||||||
|
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
|
||||||
|
x := input.Message.Interface().(*GenesisState)
|
||||||
|
if x == nil {
|
||||||
|
return protoiface.SizeOutput{
|
||||||
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||||
|
Size: 0,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
options := runtime.SizeInputToOptions(input)
|
||||||
|
_ = options
|
||||||
|
var n int
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if x.Params != nil {
|
||||||
|
l = options.Size(x.Params)
|
||||||
|
n += 1 + l + runtime.Sov(uint64(l))
|
||||||
|
}
|
||||||
|
if len(x.Participants) > 0 {
|
||||||
|
for _, e := range x.Participants {
|
||||||
|
l = options.Size(e)
|
||||||
|
n += 1 + l + runtime.Sov(uint64(l))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if x.unknownFields != nil {
|
||||||
|
n += len(x.unknownFields)
|
||||||
|
}
|
||||||
|
return protoiface.SizeOutput{
|
||||||
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||||
|
Size: n,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
|
||||||
|
x := input.Message.Interface().(*GenesisState)
|
||||||
|
if x == nil {
|
||||||
|
return protoiface.MarshalOutput{
|
||||||
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||||
|
Buf: input.Buf,
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
options := runtime.MarshalInputToOptions(input)
|
||||||
|
_ = options
|
||||||
|
size := options.Size(x)
|
||||||
|
dAtA := make([]byte, size)
|
||||||
|
i := len(dAtA)
|
||||||
|
_ = i
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if x.unknownFields != nil {
|
||||||
|
i -= len(x.unknownFields)
|
||||||
|
copy(dAtA[i:], x.unknownFields)
|
||||||
|
}
|
||||||
|
if len(x.Participants) > 0 {
|
||||||
|
for iNdEx := len(x.Participants) - 1; iNdEx >= 0; iNdEx-- {
|
||||||
|
encoded, err := options.Marshal(x.Participants[iNdEx])
|
||||||
|
if err != nil {
|
||||||
|
return protoiface.MarshalOutput{
|
||||||
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||||
|
Buf: input.Buf,
|
||||||
|
}, err
|
||||||
|
}
|
||||||
|
i -= len(encoded)
|
||||||
|
copy(dAtA[i:], encoded)
|
||||||
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x12
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if x.Params != nil {
|
||||||
|
encoded, err := options.Marshal(x.Params)
|
||||||
|
if err != nil {
|
||||||
|
return protoiface.MarshalOutput{
|
||||||
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||||
|
Buf: input.Buf,
|
||||||
|
}, err
|
||||||
|
}
|
||||||
|
i -= len(encoded)
|
||||||
|
copy(dAtA[i:], encoded)
|
||||||
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
}
|
||||||
|
if input.Buf != nil {
|
||||||
|
input.Buf = append(input.Buf, dAtA...)
|
||||||
|
} else {
|
||||||
|
input.Buf = dAtA
|
||||||
|
}
|
||||||
|
return protoiface.MarshalOutput{
|
||||||
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||||
|
Buf: input.Buf,
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
|
||||||
|
x := input.Message.Interface().(*GenesisState)
|
||||||
|
if x == nil {
|
||||||
|
return protoiface.UnmarshalOutput{
|
||||||
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||||
|
Flags: input.Flags,
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
options := runtime.UnmarshalInputToOptions(input)
|
||||||
|
_ = options
|
||||||
|
dAtA := input.Buf
|
||||||
|
l := len(dAtA)
|
||||||
|
iNdEx := 0
|
||||||
|
for iNdEx < l {
|
||||||
|
preIndex := iNdEx
|
||||||
|
var wire uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
case 1:
|
||||||
|
if wireType != 2 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType)
|
||||||
|
}
|
||||||
|
var msglen int
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
msglen |= int(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if msglen < 0 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + msglen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
if x.Params == nil {
|
||||||
|
x.Params = &Params{}
|
||||||
|
}
|
||||||
|
if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
||||||
|
}
|
||||||
|
iNdEx = postIndex
|
||||||
|
case 2:
|
||||||
|
if wireType != 2 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Participants", wireType)
|
||||||
|
}
|
||||||
|
var msglen int
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
msglen |= int(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if msglen < 0 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + msglen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
x.Participants = append(x.Participants, &Participant{})
|
||||||
|
if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Participants[len(x.Participants)-1]); err != nil {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
||||||
|
}
|
||||||
|
iNdEx = postIndex
|
||||||
|
default:
|
||||||
|
iNdEx = preIndex
|
||||||
|
skippy, err := runtime.Skip(dAtA[iNdEx:])
|
||||||
|
if err != nil {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
||||||
|
}
|
||||||
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||||
|
}
|
||||||
|
if (iNdEx + skippy) > l {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
if !options.DiscardUnknown {
|
||||||
|
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
|
||||||
|
}
|
||||||
|
iNdEx += skippy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if iNdEx > l {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
|
||||||
|
}
|
||||||
|
return &protoiface.Methods{
|
||||||
|
NoUnkeyedLiterals: struct{}{},
|
||||||
|
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
|
||||||
|
Size: size,
|
||||||
|
Marshal: marshal,
|
||||||
|
Unmarshal: unmarshal,
|
||||||
|
Merge: nil,
|
||||||
|
CheckInitialized: nil,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// protoc-gen-go v1.27.0
|
||||||
|
// protoc (unknown)
|
||||||
|
// source: cerc/onboarding/v1/genesis.proto
|
||||||
|
|
||||||
|
const (
|
||||||
|
// Verify that this generated code is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||||
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
|
)
|
||||||
|
|
||||||
|
// GenesisState defines the onboarding module's genesis state.
|
||||||
|
type GenesisState struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
// params defines all the parameters of the module.
|
||||||
|
Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
|
||||||
|
// participants defines all the participants
|
||||||
|
Participants []*Participant `protobuf:"bytes,2,rep,name=participants,proto3" json:"participants,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GenesisState) Reset() {
|
||||||
|
*x = GenesisState{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_cerc_onboarding_v1_genesis_proto_msgTypes[0]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GenesisState) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GenesisState) ProtoMessage() {}
|
||||||
|
|
||||||
|
// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead.
|
||||||
|
func (*GenesisState) Descriptor() ([]byte, []int) {
|
||||||
|
return file_cerc_onboarding_v1_genesis_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GenesisState) GetParams() *Params {
|
||||||
|
if x != nil {
|
||||||
|
return x.Params
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GenesisState) GetParticipants() []*Participant {
|
||||||
|
if x != nil {
|
||||||
|
return x.Participants
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
var File_cerc_onboarding_v1_genesis_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
|
var file_cerc_onboarding_v1_genesis_proto_rawDesc = []byte{
|
||||||
|
0x0a, 0x20, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e,
|
||||||
|
0x67, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f,
|
||||||
|
0x74, 0x6f, 0x12, 0x12, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64,
|
||||||
|
0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74,
|
||||||
|
0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x63, 0x65,
|
||||||
|
0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31,
|
||||||
|
0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||||
|
0x6f, 0x22, 0x93, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61,
|
||||||
|
0x74, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01,
|
||||||
|
0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72,
|
||||||
|
0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04,
|
||||||
|
0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x49, 0x0a, 0x0c,
|
||||||
|
0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03,
|
||||||
|
0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72,
|
||||||
|
0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70,
|
||||||
|
0x61, 0x6e, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69,
|
||||||
|
0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x42, 0xd1, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e,
|
||||||
|
0x63, 0x65, 0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e,
|
||||||
|
0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f,
|
||||||
|
0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x2e, 0x76, 0x64, 0x62, 0x2e, 0x74, 0x6f, 0x2f, 0x63,
|
||||||
|
0x65, 0x72, 0x63, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x63, 0x6f, 0x6e, 0x69, 0x63, 0x64, 0x2f,
|
||||||
|
0x61, 0x70, 0x69, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64,
|
||||||
|
0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e,
|
||||||
|
0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x4f, 0x58, 0xaa, 0x02, 0x12, 0x43, 0x65, 0x72, 0x63,
|
||||||
|
0x2e, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02,
|
||||||
|
0x12, 0x43, 0x65, 0x72, 0x63, 0x5c, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67,
|
||||||
|
0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x43, 0x65, 0x72, 0x63, 0x5c, 0x4f, 0x6e, 0x62, 0x6f, 0x61,
|
||||||
|
0x72, 0x64, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61,
|
||||||
|
0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x43, 0x65, 0x72, 0x63, 0x3a, 0x3a, 0x4f, 0x6e, 0x62,
|
||||||
|
0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||||
|
0x74, 0x6f, 0x33,
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
file_cerc_onboarding_v1_genesis_proto_rawDescOnce sync.Once
|
||||||
|
file_cerc_onboarding_v1_genesis_proto_rawDescData = file_cerc_onboarding_v1_genesis_proto_rawDesc
|
||||||
|
)
|
||||||
|
|
||||||
|
func file_cerc_onboarding_v1_genesis_proto_rawDescGZIP() []byte {
|
||||||
|
file_cerc_onboarding_v1_genesis_proto_rawDescOnce.Do(func() {
|
||||||
|
file_cerc_onboarding_v1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_cerc_onboarding_v1_genesis_proto_rawDescData)
|
||||||
|
})
|
||||||
|
return file_cerc_onboarding_v1_genesis_proto_rawDescData
|
||||||
|
}
|
||||||
|
|
||||||
|
var file_cerc_onboarding_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||||
|
var file_cerc_onboarding_v1_genesis_proto_goTypes = []interface{}{
|
||||||
|
(*GenesisState)(nil), // 0: cerc.onboarding.v1.GenesisState
|
||||||
|
(*Params)(nil), // 1: cerc.onboarding.v1.Params
|
||||||
|
(*Participant)(nil), // 2: cerc.onboarding.v1.Participant
|
||||||
|
}
|
||||||
|
var file_cerc_onboarding_v1_genesis_proto_depIdxs = []int32{
|
||||||
|
1, // 0: cerc.onboarding.v1.GenesisState.params:type_name -> cerc.onboarding.v1.Params
|
||||||
|
2, // 1: cerc.onboarding.v1.GenesisState.participants:type_name -> cerc.onboarding.v1.Participant
|
||||||
|
2, // [2:2] is the sub-list for method output_type
|
||||||
|
2, // [2:2] is the sub-list for method input_type
|
||||||
|
2, // [2:2] is the sub-list for extension type_name
|
||||||
|
2, // [2:2] is the sub-list for extension extendee
|
||||||
|
0, // [0:2] is the sub-list for field type_name
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() { file_cerc_onboarding_v1_genesis_proto_init() }
|
||||||
|
func file_cerc_onboarding_v1_genesis_proto_init() {
|
||||||
|
if File_cerc_onboarding_v1_genesis_proto != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
file_cerc_onboarding_v1_onboarding_proto_init()
|
||||||
|
if !protoimpl.UnsafeEnabled {
|
||||||
|
file_cerc_onboarding_v1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*GenesisState); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
type x struct{}
|
||||||
|
out := protoimpl.TypeBuilder{
|
||||||
|
File: protoimpl.DescBuilder{
|
||||||
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
|
RawDescriptor: file_cerc_onboarding_v1_genesis_proto_rawDesc,
|
||||||
|
NumEnums: 0,
|
||||||
|
NumMessages: 1,
|
||||||
|
NumExtensions: 0,
|
||||||
|
NumServices: 0,
|
||||||
|
},
|
||||||
|
GoTypes: file_cerc_onboarding_v1_genesis_proto_goTypes,
|
||||||
|
DependencyIndexes: file_cerc_onboarding_v1_genesis_proto_depIdxs,
|
||||||
|
MessageInfos: file_cerc_onboarding_v1_genesis_proto_msgTypes,
|
||||||
|
}.Build()
|
||||||
|
File_cerc_onboarding_v1_genesis_proto = out.File
|
||||||
|
file_cerc_onboarding_v1_genesis_proto_rawDesc = nil
|
||||||
|
file_cerc_onboarding_v1_genesis_proto_goTypes = nil
|
||||||
|
file_cerc_onboarding_v1_genesis_proto_depIdxs = nil
|
||||||
|
}
|
1670
api/cerc/onboarding/v1/onboarding.pulsar.go
Normal file
1670
api/cerc/onboarding/v1/onboarding.pulsar.go
Normal file
File diff suppressed because it is too large
Load Diff
1265
api/cerc/onboarding/v1/query.pulsar.go
Normal file
1265
api/cerc/onboarding/v1/query.pulsar.go
Normal file
File diff suppressed because it is too large
Load Diff
111
api/cerc/onboarding/v1/query_grpc.pb.go
Normal file
111
api/cerc/onboarding/v1/query_grpc.pb.go
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// - protoc-gen-go-grpc v1.3.0
|
||||||
|
// - protoc (unknown)
|
||||||
|
// source: cerc/onboarding/v1/query.proto
|
||||||
|
|
||||||
|
package onboardingv1
|
||||||
|
|
||||||
|
import (
|
||||||
|
context "context"
|
||||||
|
grpc "google.golang.org/grpc"
|
||||||
|
codes "google.golang.org/grpc/codes"
|
||||||
|
status "google.golang.org/grpc/status"
|
||||||
|
)
|
||||||
|
|
||||||
|
// This is a compile-time assertion to ensure that this generated file
|
||||||
|
// is compatible with the grpc package it is being compiled against.
|
||||||
|
// Requires gRPC-Go v1.32.0 or later.
|
||||||
|
const _ = grpc.SupportPackageIsVersion7
|
||||||
|
|
||||||
|
const (
|
||||||
|
Query_Participants_FullMethodName = "/cerc.onboarding.v1.Query/Participants"
|
||||||
|
)
|
||||||
|
|
||||||
|
// QueryClient is the client API for Query service.
|
||||||
|
//
|
||||||
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||||
|
type QueryClient interface {
|
||||||
|
// Participants queries Participants list
|
||||||
|
Participants(ctx context.Context, in *QueryParticipantsRequest, opts ...grpc.CallOption) (*QueryParticipantsResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type queryClient struct {
|
||||||
|
cc grpc.ClientConnInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewQueryClient(cc grpc.ClientConnInterface) QueryClient {
|
||||||
|
return &queryClient{cc}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *queryClient) Participants(ctx context.Context, in *QueryParticipantsRequest, opts ...grpc.CallOption) (*QueryParticipantsResponse, error) {
|
||||||
|
out := new(QueryParticipantsResponse)
|
||||||
|
err := c.cc.Invoke(ctx, Query_Participants_FullMethodName, in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryServer is the server API for Query service.
|
||||||
|
// All implementations must embed UnimplementedQueryServer
|
||||||
|
// for forward compatibility
|
||||||
|
type QueryServer interface {
|
||||||
|
// Participants queries Participants list
|
||||||
|
Participants(context.Context, *QueryParticipantsRequest) (*QueryParticipantsResponse, error)
|
||||||
|
mustEmbedUnimplementedQueryServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnimplementedQueryServer must be embedded to have forward compatible implementations.
|
||||||
|
type UnimplementedQueryServer struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (UnimplementedQueryServer) Participants(context.Context, *QueryParticipantsRequest) (*QueryParticipantsResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method Participants not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
|
||||||
|
|
||||||
|
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
|
||||||
|
// Use of this interface is not recommended, as added methods to QueryServer will
|
||||||
|
// result in compilation errors.
|
||||||
|
type UnsafeQueryServer interface {
|
||||||
|
mustEmbedUnimplementedQueryServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) {
|
||||||
|
s.RegisterService(&Query_ServiceDesc, srv)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Query_Participants_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(QueryParticipantsRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(QueryServer).Participants(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Query_Participants_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(QueryServer).Participants(ctx, req.(*QueryParticipantsRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Query_ServiceDesc is the grpc.ServiceDesc for Query service.
|
||||||
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
|
// and not to be introspected or modified (even as a copy)
|
||||||
|
var Query_ServiceDesc = grpc.ServiceDesc{
|
||||||
|
ServiceName: "cerc.onboarding.v1.Query",
|
||||||
|
HandlerType: (*QueryServer)(nil),
|
||||||
|
Methods: []grpc.MethodDesc{
|
||||||
|
{
|
||||||
|
MethodName: "Participants",
|
||||||
|
Handler: _Query_Participants_Handler,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Streams: []grpc.StreamDesc{},
|
||||||
|
Metadata: "cerc/onboarding/v1/query.proto",
|
||||||
|
}
|
1164
api/cerc/onboarding/v1/tx.pulsar.go
Normal file
1164
api/cerc/onboarding/v1/tx.pulsar.go
Normal file
File diff suppressed because it is too large
Load Diff
111
api/cerc/onboarding/v1/tx_grpc.pb.go
Normal file
111
api/cerc/onboarding/v1/tx_grpc.pb.go
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// - protoc-gen-go-grpc v1.3.0
|
||||||
|
// - protoc (unknown)
|
||||||
|
// source: cerc/onboarding/v1/tx.proto
|
||||||
|
|
||||||
|
package onboardingv1
|
||||||
|
|
||||||
|
import (
|
||||||
|
context "context"
|
||||||
|
grpc "google.golang.org/grpc"
|
||||||
|
codes "google.golang.org/grpc/codes"
|
||||||
|
status "google.golang.org/grpc/status"
|
||||||
|
)
|
||||||
|
|
||||||
|
// This is a compile-time assertion to ensure that this generated file
|
||||||
|
// is compatible with the grpc package it is being compiled against.
|
||||||
|
// Requires gRPC-Go v1.32.0 or later.
|
||||||
|
const _ = grpc.SupportPackageIsVersion7
|
||||||
|
|
||||||
|
const (
|
||||||
|
Msg_OnboardParticipant_FullMethodName = "/cerc.onboarding.v1.Msg/OnboardParticipant"
|
||||||
|
)
|
||||||
|
|
||||||
|
// MsgClient is the client API for Msg service.
|
||||||
|
//
|
||||||
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||||
|
type MsgClient interface {
|
||||||
|
// OnboardParticipant defines a method for enrolling a new validator.
|
||||||
|
OnboardParticipant(ctx context.Context, in *MsgOnboardParticipant, opts ...grpc.CallOption) (*MsgOnboardParticipantResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type msgClient struct {
|
||||||
|
cc grpc.ClientConnInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewMsgClient(cc grpc.ClientConnInterface) MsgClient {
|
||||||
|
return &msgClient{cc}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *msgClient) OnboardParticipant(ctx context.Context, in *MsgOnboardParticipant, opts ...grpc.CallOption) (*MsgOnboardParticipantResponse, error) {
|
||||||
|
out := new(MsgOnboardParticipantResponse)
|
||||||
|
err := c.cc.Invoke(ctx, Msg_OnboardParticipant_FullMethodName, in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MsgServer is the server API for Msg service.
|
||||||
|
// All implementations must embed UnimplementedMsgServer
|
||||||
|
// for forward compatibility
|
||||||
|
type MsgServer interface {
|
||||||
|
// OnboardParticipant defines a method for enrolling a new validator.
|
||||||
|
OnboardParticipant(context.Context, *MsgOnboardParticipant) (*MsgOnboardParticipantResponse, error)
|
||||||
|
mustEmbedUnimplementedMsgServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnimplementedMsgServer must be embedded to have forward compatible implementations.
|
||||||
|
type UnimplementedMsgServer struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (UnimplementedMsgServer) OnboardParticipant(context.Context, *MsgOnboardParticipant) (*MsgOnboardParticipantResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method OnboardParticipant not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
|
||||||
|
|
||||||
|
// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service.
|
||||||
|
// Use of this interface is not recommended, as added methods to MsgServer will
|
||||||
|
// result in compilation errors.
|
||||||
|
type UnsafeMsgServer interface {
|
||||||
|
mustEmbedUnimplementedMsgServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) {
|
||||||
|
s.RegisterService(&Msg_ServiceDesc, srv)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Msg_OnboardParticipant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(MsgOnboardParticipant)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(MsgServer).OnboardParticipant(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Msg_OnboardParticipant_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MsgServer).OnboardParticipant(ctx, req.(*MsgOnboardParticipant))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service.
|
||||||
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
|
// and not to be introspected or modified (even as a copy)
|
||||||
|
var Msg_ServiceDesc = grpc.ServiceDesc{
|
||||||
|
ServiceName: "cerc.onboarding.v1.Msg",
|
||||||
|
HandlerType: (*MsgServer)(nil),
|
||||||
|
Methods: []grpc.MethodDesc{
|
||||||
|
{
|
||||||
|
MethodName: "OnboardParticipant",
|
||||||
|
Handler: _Msg_OnboardParticipant_Handler,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Streams: []grpc.StreamDesc{},
|
||||||
|
Metadata: "cerc/onboarding/v1/tx.proto",
|
||||||
|
}
|
34
app/app.go
34
app/app.go
@ -15,6 +15,7 @@ import (
|
|||||||
|
|
||||||
auctionkeeper "git.vdb.to/cerc-io/laconicd/x/auction/keeper"
|
auctionkeeper "git.vdb.to/cerc-io/laconicd/x/auction/keeper"
|
||||||
bondkeeper "git.vdb.to/cerc-io/laconicd/x/bond/keeper"
|
bondkeeper "git.vdb.to/cerc-io/laconicd/x/bond/keeper"
|
||||||
|
onboardingkeeper "git.vdb.to/cerc-io/laconicd/x/onboarding/keeper"
|
||||||
registrykeeper "git.vdb.to/cerc-io/laconicd/x/registry/keeper"
|
registrykeeper "git.vdb.to/cerc-io/laconicd/x/registry/keeper"
|
||||||
"github.com/cosmos/cosmos-sdk/baseapp"
|
"github.com/cosmos/cosmos-sdk/baseapp"
|
||||||
"github.com/cosmos/cosmos-sdk/client"
|
"github.com/cosmos/cosmos-sdk/client"
|
||||||
@ -35,18 +36,19 @@ import (
|
|||||||
genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types"
|
genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types"
|
||||||
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
|
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
|
||||||
|
|
||||||
_ "cosmossdk.io/api/cosmos/tx/config/v1" // import for side-effects
|
_ "cosmossdk.io/api/cosmos/tx/config/v1" // import for side-effects
|
||||||
_ "git.vdb.to/cerc-io/laconicd/x/auction/module" // import for side-effects
|
_ "git.vdb.to/cerc-io/laconicd/x/auction/module" // import for side-effects
|
||||||
_ "git.vdb.to/cerc-io/laconicd/x/bond/module" // import for side-effects
|
_ "git.vdb.to/cerc-io/laconicd/x/bond/module" // import for side-effects
|
||||||
_ "git.vdb.to/cerc-io/laconicd/x/registry/module" // import for side-effects
|
_ "git.vdb.to/cerc-io/laconicd/x/onboarding/module" // import for side-effects
|
||||||
_ "github.com/cosmos/cosmos-sdk/x/auth" // import for side-effects
|
_ "git.vdb.to/cerc-io/laconicd/x/registry/module" // import for side-effects
|
||||||
_ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import for side-effects
|
_ "github.com/cosmos/cosmos-sdk/x/auth" // import for side-effects
|
||||||
_ "github.com/cosmos/cosmos-sdk/x/bank" // import for side-effects
|
_ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import for side-effects
|
||||||
_ "github.com/cosmos/cosmos-sdk/x/consensus" // import for side-effects
|
_ "github.com/cosmos/cosmos-sdk/x/bank" // import for side-effects
|
||||||
_ "github.com/cosmos/cosmos-sdk/x/crisis" // import for side-effects
|
_ "github.com/cosmos/cosmos-sdk/x/consensus" // import for side-effects
|
||||||
_ "github.com/cosmos/cosmos-sdk/x/distribution" // import for side-effects
|
_ "github.com/cosmos/cosmos-sdk/x/crisis" // import for side-effects
|
||||||
_ "github.com/cosmos/cosmos-sdk/x/mint" // import for side-effects
|
_ "github.com/cosmos/cosmos-sdk/x/distribution" // import for side-effects
|
||||||
_ "github.com/cosmos/cosmos-sdk/x/staking" // import for side-effects
|
_ "github.com/cosmos/cosmos-sdk/x/mint" // import for side-effects
|
||||||
|
_ "github.com/cosmos/cosmos-sdk/x/staking" // import for side-effects
|
||||||
)
|
)
|
||||||
|
|
||||||
// DefaultNodeHome default home directories for the application daemon
|
// DefaultNodeHome default home directories for the application daemon
|
||||||
@ -79,9 +81,10 @@ type LaconicApp struct {
|
|||||||
ConsensusParamsKeeper consensuskeeper.Keeper
|
ConsensusParamsKeeper consensuskeeper.Keeper
|
||||||
|
|
||||||
// laconic keepers
|
// laconic keepers
|
||||||
AuctionKeeper *auctionkeeper.Keeper // (Use * as per ProvideModule implementation)
|
AuctionKeeper *auctionkeeper.Keeper // (Use * as per ProvideModule implementation)
|
||||||
BondKeeper *bondkeeper.Keeper
|
BondKeeper *bondkeeper.Keeper
|
||||||
RegistryKeeper registrykeeper.Keeper
|
RegistryKeeper registrykeeper.Keeper
|
||||||
|
OnboardingKeeper *onboardingkeeper.Keeper
|
||||||
|
|
||||||
// simulation manager
|
// simulation manager
|
||||||
sm *module.SimulationManager
|
sm *module.SimulationManager
|
||||||
@ -145,6 +148,7 @@ func NewLaconicApp(
|
|||||||
&app.AuctionKeeper,
|
&app.AuctionKeeper,
|
||||||
&app.BondKeeper,
|
&app.BondKeeper,
|
||||||
&app.RegistryKeeper,
|
&app.RegistryKeeper,
|
||||||
|
&app.OnboardingKeeper,
|
||||||
); err != nil {
|
); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ modules:
|
|||||||
end_blockers: [crisis, staking, auction, registry]
|
end_blockers: [crisis, staking, auction, registry]
|
||||||
# NOTE: The genutils module must occur after staking so that pools are properly initialized with tokens from genesis accounts.
|
# NOTE: The genutils module must occur after staking so that pools are properly initialized with tokens from genesis accounts.
|
||||||
# NOTE: The genutils module must also occur after auth so that it can access the params from auth.
|
# NOTE: The genutils module must also occur after auth so that it can access the params from auth.
|
||||||
init_genesis: [auth, bank, distribution, staking, crisis, genutil, auction, bond, registry]
|
init_genesis: [auth, bank, distribution, staking, crisis, genutil, auction, bond, registry, onboarding]
|
||||||
override_store_keys:
|
override_store_keys:
|
||||||
- module_name: auth
|
- module_name: auth
|
||||||
kv_store_key: acc
|
kv_store_key: acc
|
||||||
@ -63,3 +63,6 @@ modules:
|
|||||||
- name: registry
|
- name: registry
|
||||||
config:
|
config:
|
||||||
"@type": cerc.registry.module.v1.Module
|
"@type": cerc.registry.module.v1.Module
|
||||||
|
- name: onboarding
|
||||||
|
config:
|
||||||
|
"@type": cerc.onboarding.module.v1.Module
|
||||||
|
@ -51,7 +51,7 @@ func (app *LaconicApp) ExportAppStateAndValidators(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// prepare for fresh start at zero height
|
// prepare for fresh start at zero height
|
||||||
// NOTE zero height genesis is a temporary feature, which will be deprecated in favour of export at a block height
|
// NOTE zero height genesis is a temporary feature, which will be deprecated in favor of export at a block height
|
||||||
func (app *LaconicApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []string) {
|
func (app *LaconicApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []string) {
|
||||||
applyAllowedAddrs := false
|
applyAllowedAddrs := false
|
||||||
|
|
||||||
|
@ -140,7 +140,8 @@ func ProvideClientContext(
|
|||||||
// Read the config again to overwrite the default values with the values from the config file
|
// Read the config again to overwrite the default values with the values from the config file
|
||||||
clientCtx, _ = config.ReadFromClientConfig(clientCtx)
|
clientCtx, _ = config.ReadFromClientConfig(clientCtx)
|
||||||
|
|
||||||
// Workaround: Unset clientCtx.HomeDir and clientCtx.KeyringDir from depinject clientCtx as they are given precedence over the CLI args (--home flag) in some commands
|
// Workaround: Unset clientCtx.HomeDir and clientCtx.KeyringDir from depinject clientCtx as they are given precedence over
|
||||||
|
// the CLI args (--home flag) in some commands
|
||||||
// TODO: Implement proper fix
|
// TODO: Implement proper fix
|
||||||
clientCtx.HomeDir = ""
|
clientCtx.HomeDir = ""
|
||||||
clientCtx.KeyringDir = ""
|
clientCtx.KeyringDir = ""
|
||||||
|
48
go.mod
48
go.mod
@ -31,22 +31,23 @@ require (
|
|||||||
github.com/cosmos/go-bip39 v1.0.0
|
github.com/cosmos/go-bip39 v1.0.0
|
||||||
github.com/cosmos/gogoproto v1.4.11
|
github.com/cosmos/gogoproto v1.4.11
|
||||||
github.com/deckarep/golang-set v1.8.0
|
github.com/deckarep/golang-set v1.8.0
|
||||||
|
github.com/ethereum/go-ethereum v1.14.5
|
||||||
github.com/gibson042/canonicaljson-go v1.0.3
|
github.com/gibson042/canonicaljson-go v1.0.3
|
||||||
github.com/go-chi/chi/v5 v5.0.8
|
github.com/go-chi/chi/v5 v5.0.8
|
||||||
github.com/golang/protobuf v1.5.3
|
github.com/golang/protobuf v1.5.4
|
||||||
github.com/grpc-ecosystem/grpc-gateway v1.16.0
|
github.com/grpc-ecosystem/grpc-gateway v1.16.0
|
||||||
github.com/ipfs/go-cid v0.4.1
|
github.com/ipfs/go-cid v0.4.1
|
||||||
github.com/ipld/go-ipld-prime v0.21.0
|
github.com/ipld/go-ipld-prime v0.21.0
|
||||||
github.com/rs/cors v1.8.3
|
github.com/rs/cors v1.8.3
|
||||||
github.com/spf13/cobra v1.8.0
|
github.com/spf13/cobra v1.8.0
|
||||||
github.com/spf13/viper v1.17.0
|
github.com/spf13/viper v1.17.0
|
||||||
|
github.com/statechannels/go-nitro v0.1.2
|
||||||
github.com/stretchr/testify v1.8.4
|
github.com/stretchr/testify v1.8.4
|
||||||
github.com/vektah/gqlparser/v2 v2.5.11
|
github.com/vektah/gqlparser/v2 v2.5.11
|
||||||
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa
|
golang.org/x/sync v0.7.0
|
||||||
golang.org/x/sync v0.6.0
|
|
||||||
google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f
|
google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f
|
||||||
google.golang.org/grpc v1.60.1
|
google.golang.org/grpc v1.60.1
|
||||||
google.golang.org/protobuf v1.32.0
|
google.golang.org/protobuf v1.33.0
|
||||||
gopkg.in/yaml.v3 v3.0.1
|
gopkg.in/yaml.v3 v3.0.1
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -57,19 +58,19 @@ require (
|
|||||||
github.com/99designs/keyring v1.2.1 // indirect
|
github.com/99designs/keyring v1.2.1 // indirect
|
||||||
github.com/DataDog/datadog-go v3.2.0+incompatible // indirect
|
github.com/DataDog/datadog-go v3.2.0+incompatible // indirect
|
||||||
github.com/DataDog/zstd v1.5.5 // indirect
|
github.com/DataDog/zstd v1.5.5 // indirect
|
||||||
github.com/Microsoft/go-winio v0.6.1 // indirect
|
|
||||||
github.com/agnivade/levenshtein v1.1.1 // indirect
|
github.com/agnivade/levenshtein v1.1.1 // indirect
|
||||||
github.com/beorn7/perks v1.0.1 // indirect
|
github.com/beorn7/perks v1.0.1 // indirect
|
||||||
github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect
|
github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect
|
||||||
github.com/bits-and-blooms/bitset v1.10.0 // indirect
|
|
||||||
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
|
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
|
||||||
|
github.com/btcsuite/btcd/btcutil v1.1.5 // indirect
|
||||||
|
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 // indirect
|
||||||
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
|
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
|
||||||
github.com/cespare/xxhash v1.1.0 // indirect
|
github.com/cespare/xxhash v1.1.0 // indirect
|
||||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||||
github.com/cockroachdb/apd/v2 v2.0.2 // indirect
|
github.com/cockroachdb/apd/v2 v2.0.2 // indirect
|
||||||
github.com/cockroachdb/errors v1.11.1 // indirect
|
github.com/cockroachdb/errors v1.11.1 // indirect
|
||||||
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
|
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
|
||||||
github.com/cockroachdb/pebble v0.0.0-20231101195458-481da04154d6 // indirect
|
github.com/cockroachdb/pebble v1.1.0 // indirect
|
||||||
github.com/cockroachdb/redact v1.1.5 // indirect
|
github.com/cockroachdb/redact v1.1.5 // indirect
|
||||||
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
|
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
|
||||||
github.com/cometbft/cometbft-db v0.9.1 // indirect
|
github.com/cometbft/cometbft-db v0.9.1 // indirect
|
||||||
@ -90,7 +91,7 @@ require (
|
|||||||
github.com/dustin/go-humanize v1.0.1 // indirect
|
github.com/dustin/go-humanize v1.0.1 // indirect
|
||||||
github.com/dvsekhvalnov/jose2go v1.5.0 // indirect
|
github.com/dvsekhvalnov/jose2go v1.5.0 // indirect
|
||||||
github.com/emicklei/dot v1.6.0 // indirect
|
github.com/emicklei/dot v1.6.0 // indirect
|
||||||
github.com/fatih/color v1.15.0 // indirect
|
github.com/fatih/color v1.16.0 // indirect
|
||||||
github.com/felixge/httpsnoop v1.0.2 // indirect
|
github.com/felixge/httpsnoop v1.0.2 // indirect
|
||||||
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
||||||
github.com/getsentry/sentry-go v0.25.0 // indirect
|
github.com/getsentry/sentry-go v0.25.0 // indirect
|
||||||
@ -119,13 +120,14 @@ require (
|
|||||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||||
github.com/hashicorp/yamux v0.1.1 // indirect
|
github.com/hashicorp/yamux v0.1.1 // indirect
|
||||||
github.com/hdevalence/ed25519consensus v0.1.0 // indirect
|
github.com/hdevalence/ed25519consensus v0.1.0 // indirect
|
||||||
|
github.com/holiman/uint256 v1.2.4 // indirect
|
||||||
github.com/huandu/skiplist v1.2.0 // indirect
|
github.com/huandu/skiplist v1.2.0 // indirect
|
||||||
github.com/iancoleman/strcase v0.3.0 // indirect
|
github.com/iancoleman/strcase v0.3.0 // indirect
|
||||||
github.com/improbable-eng/grpc-web v0.15.0 // indirect
|
github.com/improbable-eng/grpc-web v0.15.0 // indirect
|
||||||
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
||||||
github.com/jmhodges/levigo v1.0.0 // indirect
|
github.com/jmhodges/levigo v1.0.0 // indirect
|
||||||
github.com/klauspost/compress v1.17.4 // indirect
|
github.com/klauspost/compress v1.17.4 // indirect
|
||||||
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
|
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
|
||||||
github.com/kr/pretty v0.3.1 // indirect
|
github.com/kr/pretty v0.3.1 // indirect
|
||||||
github.com/kr/text v0.2.0 // indirect
|
github.com/kr/text v0.2.0 // indirect
|
||||||
github.com/lib/pq v1.10.7 // indirect
|
github.com/lib/pq v1.10.7 // indirect
|
||||||
@ -136,16 +138,16 @@ require (
|
|||||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||||
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
|
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
|
||||||
github.com/minio/highwayhash v1.0.2 // indirect
|
github.com/minio/highwayhash v1.0.2 // indirect
|
||||||
github.com/minio/sha256-simd v1.0.0 // indirect
|
github.com/minio/sha256-simd v1.0.1 // indirect
|
||||||
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
|
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
|
||||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||||
github.com/mr-tron/base58 v1.2.0 // indirect
|
github.com/mr-tron/base58 v1.2.0 // indirect
|
||||||
github.com/mtibben/percent v0.2.1 // indirect
|
github.com/mtibben/percent v0.2.1 // indirect
|
||||||
github.com/multiformats/go-base32 v0.0.3 // indirect
|
github.com/multiformats/go-base32 v0.1.0 // indirect
|
||||||
github.com/multiformats/go-base36 v0.1.0 // indirect
|
github.com/multiformats/go-base36 v0.2.0 // indirect
|
||||||
github.com/multiformats/go-multibase v0.0.3 // indirect
|
github.com/multiformats/go-multibase v0.2.0 // indirect
|
||||||
github.com/multiformats/go-multihash v0.2.3 // indirect
|
github.com/multiformats/go-multihash v0.2.3 // indirect
|
||||||
github.com/multiformats/go-varint v0.0.6 // indirect
|
github.com/multiformats/go-varint v0.0.7 // indirect
|
||||||
github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect
|
github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect
|
||||||
github.com/oklog/run v1.1.0 // indirect
|
github.com/oklog/run v1.1.0 // indirect
|
||||||
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
|
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
|
||||||
@ -163,6 +165,7 @@ require (
|
|||||||
github.com/sagikazarmark/locafero v0.3.0 // indirect
|
github.com/sagikazarmark/locafero v0.3.0 // indirect
|
||||||
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
|
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
|
||||||
github.com/sasha-s/go-deadlock v0.3.1 // indirect
|
github.com/sasha-s/go-deadlock v0.3.1 // indirect
|
||||||
|
github.com/sirupsen/logrus v1.9.3 // indirect
|
||||||
github.com/sourcegraph/conc v0.3.0 // indirect
|
github.com/sourcegraph/conc v0.3.0 // indirect
|
||||||
github.com/spaolacci/murmur3 v1.1.0 // indirect
|
github.com/spaolacci/murmur3 v1.1.0 // indirect
|
||||||
github.com/spf13/afero v1.10.0 // indirect
|
github.com/spf13/afero v1.10.0 // indirect
|
||||||
@ -175,19 +178,22 @@ require (
|
|||||||
github.com/zondax/hid v0.9.2 // indirect
|
github.com/zondax/hid v0.9.2 // indirect
|
||||||
github.com/zondax/ledger-go v0.14.3 // indirect
|
github.com/zondax/ledger-go v0.14.3 // indirect
|
||||||
go.etcd.io/bbolt v1.3.8 // indirect
|
go.etcd.io/bbolt v1.3.8 // indirect
|
||||||
go.uber.org/multierr v1.10.0 // indirect
|
go.uber.org/multierr v1.11.0 // indirect
|
||||||
golang.org/x/crypto v0.18.0 // indirect
|
golang.org/x/crypto v0.22.0 // indirect
|
||||||
golang.org/x/net v0.20.0 // indirect
|
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect
|
||||||
golang.org/x/sys v0.16.0 // indirect
|
golang.org/x/net v0.24.0 // indirect
|
||||||
golang.org/x/term v0.16.0 // indirect
|
golang.org/x/sys v0.20.0 // indirect
|
||||||
|
golang.org/x/term v0.19.0 // indirect
|
||||||
golang.org/x/text v0.14.0 // indirect
|
golang.org/x/text v0.14.0 // indirect
|
||||||
google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 // indirect
|
google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 // indirect
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 // indirect
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 // indirect
|
||||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||||
gotest.tools/v3 v3.5.1 // indirect
|
gotest.tools/v3 v3.5.1 // indirect
|
||||||
lukechampine.com/blake3 v1.1.6 // indirect
|
lukechampine.com/blake3 v1.2.1 // indirect
|
||||||
nhooyr.io/websocket v1.8.6 // indirect
|
nhooyr.io/websocket v1.8.6 // indirect
|
||||||
pgregory.net/rapid v1.1.0 // indirect
|
pgregory.net/rapid v1.1.0 // indirect
|
||||||
sigs.k8s.io/yaml v1.3.0 // indirect
|
sigs.k8s.io/yaml v1.3.0 // indirect
|
||||||
)
|
)
|
||||||
|
|
||||||
|
replace github.com/statechannels/go-nitro v0.1.2 => github.com/cerc-io/go-nitro v0.1.3-ts-port-0.1.10
|
||||||
|
130
go.sum
130
go.sum
@ -76,8 +76,8 @@ github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3
|
|||||||
github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ=
|
github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ=
|
||||||
github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw=
|
github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw=
|
||||||
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
|
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
|
||||||
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
|
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
|
||||||
github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
|
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
|
||||||
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw=
|
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw=
|
||||||
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk=
|
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk=
|
||||||
github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE=
|
github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE=
|
||||||
@ -88,6 +88,7 @@ github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrd
|
|||||||
github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g=
|
github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g=
|
||||||
github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I=
|
github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I=
|
||||||
github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg=
|
github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg=
|
||||||
|
github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII=
|
||||||
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c=
|
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c=
|
||||||
github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM=
|
github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM=
|
||||||
github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8=
|
github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8=
|
||||||
@ -122,12 +123,30 @@ github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2
|
|||||||
github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
|
github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
|
||||||
github.com/bits-and-blooms/bitset v1.10.0 h1:ePXTeiPEazB5+opbv5fr8umg2R/1NlzgDsyepwsSr88=
|
github.com/bits-and-blooms/bitset v1.10.0 h1:ePXTeiPEazB5+opbv5fr8umg2R/1NlzgDsyepwsSr88=
|
||||||
github.com/bits-and-blooms/bitset v1.10.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8=
|
github.com/bits-and-blooms/bitset v1.10.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8=
|
||||||
|
github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ=
|
||||||
|
github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c/go.mod h1:tjmYdS6MLJ5/s0Fj4DbLgSbDHbEqLJrtnHecBFkdz5M=
|
||||||
|
github.com/btcsuite/btcd v0.23.5-0.20231215221805-96c9fd8078fd/go.mod h1:nm3Bko6zh6bWP60UxwoT5LzdGJsQJaPo6HjduXq9p6A=
|
||||||
|
github.com/btcsuite/btcd/btcec/v2 v2.1.0/go.mod h1:2VzYrv4Gm4apmbVVsSq5bqf1Ec8v56E48Vt0Y/umPgA=
|
||||||
|
github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE=
|
||||||
github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U=
|
github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U=
|
||||||
github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04=
|
github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04=
|
||||||
github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ=
|
github.com/btcsuite/btcd/btcutil v1.0.0/go.mod h1:Uoxwv0pqYWhD//tfTiipkxNfdhG9UrLwaeswfjfdF0A=
|
||||||
github.com/btcsuite/btcd/btcutil v1.1.3/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0=
|
github.com/btcsuite/btcd/btcutil v1.1.0/go.mod h1:5OapHB7A2hBBWLm48mmw4MOHNJCcUBTwmWH/0Jn8VHE=
|
||||||
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U=
|
github.com/btcsuite/btcd/btcutil v1.1.5 h1:+wER79R5670vs/ZusMTF1yTcRYE5GUsFbdjdisflzM8=
|
||||||
|
github.com/btcsuite/btcd/btcutil v1.1.5/go.mod h1:PSZZ4UitpLBWzxGd5VGOrLnmOjtPP/a6HaFo12zMs00=
|
||||||
|
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc=
|
||||||
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc=
|
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc=
|
||||||
|
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 h1:59Kx4K6lzOW5w6nFlA0v5+lk/6sjybR934QNHSJZPTQ=
|
||||||
|
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc=
|
||||||
|
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA=
|
||||||
|
github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg=
|
||||||
|
github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg=
|
||||||
|
github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY=
|
||||||
|
github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I=
|
||||||
|
github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc=
|
||||||
|
github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc=
|
||||||
|
github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY=
|
||||||
|
github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs=
|
||||||
github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY=
|
github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY=
|
||||||
github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE=
|
github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE=
|
||||||
github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ=
|
github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ=
|
||||||
@ -137,11 +156,13 @@ github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInq
|
|||||||
github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4=
|
github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4=
|
||||||
github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
|
github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
|
||||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||||
|
github.com/cerc-io/go-nitro v0.1.3-ts-port-0.1.10 h1:lJg2a5Zi0kXxG89B1Fhq3VqnKmicK4AcUtruZUZQkDc=
|
||||||
|
github.com/cerc-io/go-nitro v0.1.3-ts-port-0.1.10/go.mod h1:x7xAzfyhRoVQ1hvuowH6LLEU/mmwpz1tQYLNi6F2ohI=
|
||||||
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
|
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
|
||||||
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
|
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
|
||||||
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||||
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
|
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
||||||
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||||
github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI=
|
github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI=
|
||||||
@ -168,8 +189,8 @@ github.com/cockroachdb/errors v1.11.1 h1:xSEW75zKaKCWzR3OfxXUxgrk/NtT4G1MiOv5lWZ
|
|||||||
github.com/cockroachdb/errors v1.11.1/go.mod h1:8MUxA3Gi6b25tYlFEBGLf+D8aISL+M4MIpiWMSNRfxw=
|
github.com/cockroachdb/errors v1.11.1/go.mod h1:8MUxA3Gi6b25tYlFEBGLf+D8aISL+M4MIpiWMSNRfxw=
|
||||||
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE=
|
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE=
|
||||||
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs=
|
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs=
|
||||||
github.com/cockroachdb/pebble v0.0.0-20231101195458-481da04154d6 h1:g+Y6IAf28JinY3zNdXwpw71SBGhLEb72kGQgiR5XKZM=
|
github.com/cockroachdb/pebble v1.1.0 h1:pcFh8CdCIt2kmEpK0OIatq67Ln9uGDYY3d5XnE0LJG4=
|
||||||
github.com/cockroachdb/pebble v0.0.0-20231101195458-481da04154d6/go.mod h1:acMRUGd/BK8AUmQNK3spUCCGzFLZU2bSST3NMXSq2Kc=
|
github.com/cockroachdb/pebble v1.1.0/go.mod h1:sEHm5NOXxyiAoKWhoFxT8xMgd/f3RA6qUqQ1BXKrh2E=
|
||||||
github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30=
|
github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30=
|
||||||
github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg=
|
github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg=
|
||||||
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo=
|
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo=
|
||||||
@ -220,16 +241,20 @@ github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7Do
|
|||||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||||
github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0=
|
github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0=
|
||||||
github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0=
|
github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0=
|
||||||
|
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
|
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
|
||||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4=
|
github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4=
|
||||||
github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo=
|
github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo=
|
||||||
|
github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc=
|
||||||
github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y=
|
github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y=
|
||||||
github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo=
|
github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo=
|
||||||
|
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs=
|
||||||
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs=
|
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs=
|
||||||
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0=
|
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0=
|
||||||
|
github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218=
|
||||||
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I=
|
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I=
|
||||||
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE=
|
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE=
|
||||||
github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o=
|
github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o=
|
||||||
@ -268,10 +293,12 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m
|
|||||||
github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
|
github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
|
||||||
github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE=
|
github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE=
|
||||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||||
|
github.com/ethereum/go-ethereum v1.14.5 h1:szuFzO1MhJmweXjoM5nSAeDvjNUH3vIQoMzzQnfvjpw=
|
||||||
|
github.com/ethereum/go-ethereum v1.14.5/go.mod h1:VEDGGhSxY7IEjn98hJRFXl/uFvpRgbIIf2PpXiyGGgc=
|
||||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||||
github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs=
|
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
|
||||||
github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw=
|
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
|
||||||
github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
|
github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
|
||||||
github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o=
|
github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o=
|
||||||
github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
|
github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
|
||||||
@ -379,8 +406,8 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw
|
|||||||
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||||
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
|
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
||||||
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
||||||
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||||
github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||||
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||||
@ -491,6 +518,8 @@ github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE
|
|||||||
github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ=
|
github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ=
|
||||||
github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU=
|
github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU=
|
||||||
github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo=
|
github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo=
|
||||||
|
github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU=
|
||||||
|
github.com/holiman/uint256 v1.2.4/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E=
|
||||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||||
github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c=
|
github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c=
|
||||||
github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U=
|
github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U=
|
||||||
@ -511,6 +540,8 @@ github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s=
|
|||||||
github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk=
|
github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk=
|
||||||
github.com/ipld/go-ipld-prime v0.21.0 h1:n4JmcpOlPDIxBcY037SVfpd1G+Sj1nKZah0m6QH9C2E=
|
github.com/ipld/go-ipld-prime v0.21.0 h1:n4JmcpOlPDIxBcY037SVfpd1G+Sj1nKZah0m6QH9C2E=
|
||||||
github.com/ipld/go-ipld-prime v0.21.0/go.mod h1:3RLqy//ERg/y5oShXXdx5YIp50cFGOanyMctpPjsvxQ=
|
github.com/ipld/go-ipld-prime v0.21.0/go.mod h1:3RLqy//ERg/y5oShXXdx5YIp50cFGOanyMctpPjsvxQ=
|
||||||
|
github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
|
||||||
|
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
|
||||||
github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls=
|
github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls=
|
||||||
github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k=
|
github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k=
|
||||||
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
|
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
|
||||||
@ -518,6 +549,7 @@ github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U
|
|||||||
github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ=
|
github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ=
|
||||||
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
|
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
|
||||||
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
|
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
|
||||||
|
github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ=
|
||||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||||
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||||
github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||||
@ -536,14 +568,14 @@ github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvW
|
|||||||
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
|
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
|
||||||
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
||||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||||
|
github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4=
|
||||||
github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
|
github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
|
||||||
github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
|
github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
|
||||||
github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg=
|
github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg=
|
||||||
github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4=
|
github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4=
|
||||||
github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM=
|
github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM=
|
||||||
github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg=
|
||||||
github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4=
|
github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
|
||||||
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
|
||||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||||
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||||
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
|
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
|
||||||
@ -594,8 +626,8 @@ github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQth
|
|||||||
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
||||||
github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g=
|
github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g=
|
||||||
github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY=
|
github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY=
|
||||||
github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g=
|
github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM=
|
||||||
github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM=
|
github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8=
|
||||||
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
|
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
|
||||||
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||||
@ -615,23 +647,22 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN
|
|||||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||||
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
||||||
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||||
github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8=
|
|
||||||
github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o=
|
github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o=
|
||||||
github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc=
|
github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc=
|
||||||
github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs=
|
github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs=
|
||||||
github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns=
|
github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns=
|
||||||
github.com/multiformats/go-base32 v0.0.3 h1:tw5+NhuwaOjJCC5Pp82QuXbrmLzWg7uxlMFp8Nq/kkI=
|
github.com/multiformats/go-base32 v0.1.0 h1:pVx9xoSPqEIQG8o+UbAe7DNi51oej1NtK+aGkbLYxPE=
|
||||||
github.com/multiformats/go-base32 v0.0.3/go.mod h1:pLiuGC8y0QR3Ue4Zug5UzK9LjgbkL8NSQj0zQ5Nz/AA=
|
github.com/multiformats/go-base32 v0.1.0/go.mod h1:Kj3tFY6zNr+ABYMqeUNeGvkIC/UYgtWibDcT0rExnbI=
|
||||||
github.com/multiformats/go-base36 v0.1.0 h1:JR6TyF7JjGd3m6FbLU2cOxhC0Li8z8dLNGQ89tUg4F4=
|
github.com/multiformats/go-base36 v0.2.0 h1:lFsAbNOGeKtuKozrtBsAkSVhv1p9D0/qedU9rQyccr0=
|
||||||
github.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoRdUUOENyW/Vv6sM=
|
github.com/multiformats/go-base36 v0.2.0/go.mod h1:qvnKE++v+2MWCfePClUEjE78Z7P2a1UV0xHgWc0hkp4=
|
||||||
github.com/multiformats/go-multibase v0.0.3 h1:l/B6bJDQjvQ5G52jw4QGSYeOTZoAwIO77RblWplfIqk=
|
github.com/multiformats/go-multibase v0.2.0 h1:isdYCVLvksgWlMW9OZRYJEa9pZETFivncJHmHnnd87g=
|
||||||
github.com/multiformats/go-multibase v0.0.3/go.mod h1:5+1R4eQrT3PkYZ24C3W2Ue2tPwIdYQD509ZjSb5y9Oc=
|
github.com/multiformats/go-multibase v0.2.0/go.mod h1:bFBZX4lKCA/2lyOFSAoKH5SS6oPyjtnzK/XTFDPkNuk=
|
||||||
github.com/multiformats/go-multicodec v0.9.0 h1:pb/dlPnzee/Sxv/j4PmkDRxCOi3hXTz3IbPKOXWJkmg=
|
github.com/multiformats/go-multicodec v0.9.0 h1:pb/dlPnzee/Sxv/j4PmkDRxCOi3hXTz3IbPKOXWJkmg=
|
||||||
github.com/multiformats/go-multicodec v0.9.0/go.mod h1:L3QTQvMIaVBkXOXXtVmYE+LI16i14xuaojr/H7Ai54k=
|
github.com/multiformats/go-multicodec v0.9.0/go.mod h1:L3QTQvMIaVBkXOXXtVmYE+LI16i14xuaojr/H7Ai54k=
|
||||||
github.com/multiformats/go-multihash v0.2.3 h1:7Lyc8XfX/IY2jWb/gI7JP+o7JEq9hOa7BFvVU9RSh+U=
|
github.com/multiformats/go-multihash v0.2.3 h1:7Lyc8XfX/IY2jWb/gI7JP+o7JEq9hOa7BFvVU9RSh+U=
|
||||||
github.com/multiformats/go-multihash v0.2.3/go.mod h1:dXgKXCXjBzdscBLk9JkjINiEsCKRVch90MdaGiKsvSM=
|
github.com/multiformats/go-multihash v0.2.3/go.mod h1:dXgKXCXjBzdscBLk9JkjINiEsCKRVch90MdaGiKsvSM=
|
||||||
github.com/multiformats/go-varint v0.0.6 h1:gk85QWKxh3TazbLxED/NlDVv8+q+ReFJk7Y2W/KhfNY=
|
github.com/multiformats/go-varint v0.0.7 h1:sWSGR+f/eu5ABZA2ZpYKBILXTTs9JWpdEM/nEGOHFS8=
|
||||||
github.com/multiformats/go-varint v0.0.6/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE=
|
github.com/multiformats/go-varint v0.0.7/go.mod h1:r8PUYw/fD/SjBCiKOoDlGF6QawOELpZAu9eioSos/OU=
|
||||||
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU=
|
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU=
|
||||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||||
@ -659,6 +690,7 @@ github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W
|
|||||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||||
github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA=
|
github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA=
|
||||||
github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
|
github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
|
||||||
|
github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
|
||||||
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||||
@ -777,8 +809,8 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx
|
|||||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
||||||
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
|
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
|
||||||
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||||
github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0=
|
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
|
||||||
github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
||||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
||||||
github.com/smartystreets/assertions v1.2.0 h1:42S6lae5dvLc7BrLu/0ugRtcFVjoJNMC/N3yZFZkDFs=
|
github.com/smartystreets/assertions v1.2.0 h1:42S6lae5dvLc7BrLu/0ugRtcFVjoJNMC/N3yZFZkDFs=
|
||||||
github.com/smartystreets/assertions v1.2.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo=
|
github.com/smartystreets/assertions v1.2.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo=
|
||||||
@ -889,12 +921,13 @@ go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A
|
|||||||
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
|
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
|
||||||
go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=
|
go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=
|
||||||
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
|
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
|
||||||
go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ=
|
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
|
||||||
go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
|
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
|
||||||
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
|
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
|
||||||
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
||||||
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
|
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
|
||||||
go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
|
go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
|
||||||
|
golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||||
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||||
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||||
@ -908,8 +941,8 @@ golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPh
|
|||||||
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
|
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
|
||||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||||
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||||
golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc=
|
golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
|
||||||
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
|
golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
|
||||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||||
@ -949,8 +982,7 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
|||||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||||
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY=
|
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY=
|
||||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||||
golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0=
|
golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
|
||||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
@ -999,8 +1031,8 @@ golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qx
|
|||||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||||
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||||
golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo=
|
golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
|
||||||
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
|
golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
|
||||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
@ -1022,8 +1054,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ
|
|||||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
|
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
|
||||||
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||||
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
@ -1095,18 +1127,20 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc
|
|||||||
golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
|
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
|
||||||
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||||
golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE=
|
golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q=
|
||||||
golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY=
|
golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk=
|
||||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
@ -1183,8 +1217,6 @@ golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
|
|||||||
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||||
golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E=
|
golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E=
|
||||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||||
golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8=
|
|
||||||
golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk=
|
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
@ -1308,8 +1340,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ
|
|||||||
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||||
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||||
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||||
google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
|
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
|
||||||
google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
||||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
@ -1351,8 +1383,8 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
|
|||||||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||||
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||||
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||||
lukechampine.com/blake3 v1.1.6 h1:H3cROdztr7RCfoaTpGZFQsrqvweFLrqS73j7L7cmR5c=
|
lukechampine.com/blake3 v1.2.1 h1:YuqqRuaqsGV71BV/nm9xlI0MKUv4QC54jQnBChWbGnI=
|
||||||
lukechampine.com/blake3 v1.1.6/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA=
|
lukechampine.com/blake3 v1.2.1/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k=
|
||||||
nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k=
|
nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k=
|
||||||
nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0=
|
nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0=
|
||||||
pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw=
|
pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw=
|
||||||
|
@ -2,6 +2,30 @@
|
|||||||
|
|
||||||
> Browser : http://localhost:9473 for gql
|
> Browser : http://localhost:9473 for gql
|
||||||
|
|
||||||
|
## Run gqlgen
|
||||||
|
|
||||||
|
On having some change in the GQL schema (for example: adding a new query) update the [schema.graphql](./cerc-io/laconicd/schema.graphql) file as required and run the following:
|
||||||
|
|
||||||
|
- Generate GQL bindings:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Install gqlgen if not present
|
||||||
|
go get github.com/99designs/gqlgen@v0.17.22
|
||||||
|
|
||||||
|
# Generate bindings
|
||||||
|
# In gql
|
||||||
|
go run github.com/99designs/gqlgen generate
|
||||||
|
```
|
||||||
|
|
||||||
|
- Implement the required resolver method(s)
|
||||||
|
|
||||||
|
- Regenerate GQL bindings:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Generate bindings
|
||||||
|
go run github.com/99designs/gqlgen generate
|
||||||
|
```
|
||||||
|
|
||||||
## Start server
|
## Start server
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
@ -20,15 +44,15 @@ Basic node status:
|
|||||||
moniker
|
moniker
|
||||||
}
|
}
|
||||||
sync {
|
sync {
|
||||||
latest_block_height
|
latestBlockHeight
|
||||||
catching_up
|
catchingUp
|
||||||
}
|
}
|
||||||
num_peers
|
numPeers
|
||||||
peers {
|
peers {
|
||||||
is_outbound
|
isOutbound
|
||||||
remote_ip
|
remoteIp
|
||||||
}
|
}
|
||||||
disk_usage
|
diskUsage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -45,32 +69,32 @@ Full node status:
|
|||||||
moniker
|
moniker
|
||||||
}
|
}
|
||||||
sync {
|
sync {
|
||||||
latest_block_hash
|
latestBlockHash
|
||||||
latest_block_time
|
latestBlockTime
|
||||||
latest_block_height
|
latestBlockHeight
|
||||||
catching_up
|
catchingUp
|
||||||
}
|
}
|
||||||
validator {
|
validator {
|
||||||
address
|
address
|
||||||
voting_power
|
votingPower
|
||||||
proposer_priority
|
proposerPriority
|
||||||
}
|
}
|
||||||
validators {
|
validators {
|
||||||
address
|
address
|
||||||
voting_power
|
votingPower
|
||||||
proposer_priority
|
proposerPriority
|
||||||
}
|
}
|
||||||
num_peers
|
numPeers
|
||||||
peers {
|
peers {
|
||||||
node {
|
node {
|
||||||
id
|
id
|
||||||
network
|
network
|
||||||
moniker
|
moniker
|
||||||
}
|
}
|
||||||
is_outbound
|
isOutbound
|
||||||
remote_ip
|
remoteIp
|
||||||
}
|
}
|
||||||
disk_usage
|
diskUsage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -351,3 +375,14 @@ Resolve Names
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Query participants:
|
||||||
|
|
||||||
|
```graphql
|
||||||
|
{
|
||||||
|
getParticipants {
|
||||||
|
cosmosAddress
|
||||||
|
nitroAddress
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
@ -30,6 +30,11 @@ type Account {
|
|||||||
balance: [Coin!] # Current balance for each coin type.
|
balance: [Coin!] # Current balance for each coin type.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Participant {
|
||||||
|
cosmosAddress: String! # Cosmos address of the participant who will be registered.
|
||||||
|
nitroAddress: String! # Nitro addresss of the participant who will be registered.
|
||||||
|
}
|
||||||
|
|
||||||
# Value describes a DAG-JSON compatible value.
|
# Value describes a DAG-JSON compatible value.
|
||||||
union Value =
|
union Value =
|
||||||
BooleanValue
|
BooleanValue
|
||||||
@ -106,24 +111,24 @@ type NodeInfo {
|
|||||||
|
|
||||||
# Node sync status.
|
# Node sync status.
|
||||||
type SyncInfo {
|
type SyncInfo {
|
||||||
latest_block_hash: String!
|
latestBlockHash: String!
|
||||||
latest_block_height: String!
|
latestBlockHeight: String!
|
||||||
latest_block_time: String!
|
latestBlockTime: String!
|
||||||
catching_up: Boolean!
|
catchingUp: Boolean!
|
||||||
}
|
}
|
||||||
|
|
||||||
# Validator set info (https://docs.tendermint.com/master/rpc/#/Info/validators).
|
# Validator set info (https://docs.tendermint.com/master/rpc/#/Info/validators).
|
||||||
type ValidatorInfo {
|
type ValidatorInfo {
|
||||||
address: String!
|
address: String!
|
||||||
voting_power: String!
|
votingPower: String!
|
||||||
proposer_priority: String
|
proposerPriority: String
|
||||||
}
|
}
|
||||||
|
|
||||||
# Network/peer info (https://docs.tendermint.com/master/rpc/#/Info/net_info).
|
# Network/peer info (https://docs.tendermint.com/master/rpc/#/Info/net_info).
|
||||||
type PeerInfo {
|
type PeerInfo {
|
||||||
node: NodeInfo!
|
node: NodeInfo!
|
||||||
is_outbound: Boolean!
|
isOutbound: Boolean!
|
||||||
remote_ip: String!
|
remoteIp: String!
|
||||||
}
|
}
|
||||||
|
|
||||||
# Vulcanize laconic status.
|
# Vulcanize laconic status.
|
||||||
@ -133,9 +138,9 @@ type Status {
|
|||||||
sync: SyncInfo!
|
sync: SyncInfo!
|
||||||
validator: ValidatorInfo
|
validator: ValidatorInfo
|
||||||
validators: [ValidatorInfo]!
|
validators: [ValidatorInfo]!
|
||||||
num_peers: String!
|
numPeers: String!
|
||||||
peers: [PeerInfo]
|
peers: [PeerInfo]
|
||||||
disk_usage: String!
|
diskUsage: String!
|
||||||
}
|
}
|
||||||
|
|
||||||
# An auction bid.
|
# An auction bid.
|
||||||
@ -255,4 +260,7 @@ type Query {
|
|||||||
|
|
||||||
# Get auctions by IDs.
|
# Get auctions by IDs.
|
||||||
getAuctionsByIds(ids: [String!]): [Auction]
|
getAuctionsByIds(ids: [String!]): [Auction]
|
||||||
|
|
||||||
|
# Query participants.
|
||||||
|
getParticipants: [Participant]!
|
||||||
}
|
}
|
||||||
|
437
gql/generated.go
437
gql/generated.go
@ -153,6 +153,11 @@ type ComplexityRoot struct {
|
|||||||
Owner func(childComplexity int) int
|
Owner func(childComplexity int) int
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Participant struct {
|
||||||
|
CosmosAddress func(childComplexity int) int
|
||||||
|
NitroAddress func(childComplexity int) int
|
||||||
|
}
|
||||||
|
|
||||||
PeerInfo struct {
|
PeerInfo struct {
|
||||||
IsOutbound func(childComplexity int) int
|
IsOutbound func(childComplexity int) int
|
||||||
Node func(childComplexity int) int
|
Node func(childComplexity int) int
|
||||||
@ -163,6 +168,7 @@ type ComplexityRoot struct {
|
|||||||
GetAccounts func(childComplexity int, addresses []string) int
|
GetAccounts func(childComplexity int, addresses []string) int
|
||||||
GetAuctionsByIds func(childComplexity int, ids []string) int
|
GetAuctionsByIds func(childComplexity int, ids []string) int
|
||||||
GetBondsByIds func(childComplexity int, ids []string) int
|
GetBondsByIds func(childComplexity int, ids []string) int
|
||||||
|
GetParticipants func(childComplexity int) int
|
||||||
GetRecordsByIds func(childComplexity int, ids []string) int
|
GetRecordsByIds func(childComplexity int, ids []string) int
|
||||||
GetStatus func(childComplexity int) int
|
GetStatus func(childComplexity int) int
|
||||||
LookupAuthorities func(childComplexity int, names []string) int
|
LookupAuthorities func(childComplexity int, names []string) int
|
||||||
@ -225,6 +231,7 @@ type QueryResolver interface {
|
|||||||
LookupNames(ctx context.Context, names []string) ([]*NameRecord, error)
|
LookupNames(ctx context.Context, names []string) ([]*NameRecord, error)
|
||||||
ResolveNames(ctx context.Context, names []string) ([]*Record, error)
|
ResolveNames(ctx context.Context, names []string) ([]*Record, error)
|
||||||
GetAuctionsByIds(ctx context.Context, ids []string) ([]*Auction, error)
|
GetAuctionsByIds(ctx context.Context, ids []string) ([]*Auction, error)
|
||||||
|
GetParticipants(ctx context.Context) ([]*Participant, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type executableSchema struct {
|
type executableSchema struct {
|
||||||
@ -634,7 +641,21 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
|||||||
|
|
||||||
return e.complexity.OwnerBonds.Owner(childComplexity), true
|
return e.complexity.OwnerBonds.Owner(childComplexity), true
|
||||||
|
|
||||||
case "PeerInfo.is_outbound":
|
case "Participant.cosmosAddress":
|
||||||
|
if e.complexity.Participant.CosmosAddress == nil {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
return e.complexity.Participant.CosmosAddress(childComplexity), true
|
||||||
|
|
||||||
|
case "Participant.nitroAddress":
|
||||||
|
if e.complexity.Participant.NitroAddress == nil {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
return e.complexity.Participant.NitroAddress(childComplexity), true
|
||||||
|
|
||||||
|
case "PeerInfo.isOutbound":
|
||||||
if e.complexity.PeerInfo.IsOutbound == nil {
|
if e.complexity.PeerInfo.IsOutbound == nil {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@ -648,7 +669,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
|||||||
|
|
||||||
return e.complexity.PeerInfo.Node(childComplexity), true
|
return e.complexity.PeerInfo.Node(childComplexity), true
|
||||||
|
|
||||||
case "PeerInfo.remote_ip":
|
case "PeerInfo.remoteIp":
|
||||||
if e.complexity.PeerInfo.RemoteIP == nil {
|
if e.complexity.PeerInfo.RemoteIP == nil {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@ -691,6 +712,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
|||||||
|
|
||||||
return e.complexity.Query.GetBondsByIds(childComplexity, args["ids"].([]string)), true
|
return e.complexity.Query.GetBondsByIds(childComplexity, args["ids"].([]string)), true
|
||||||
|
|
||||||
|
case "Query.getParticipants":
|
||||||
|
if e.complexity.Query.GetParticipants == nil {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
return e.complexity.Query.GetParticipants(childComplexity), true
|
||||||
|
|
||||||
case "Query.getRecordsByIds":
|
case "Query.getRecordsByIds":
|
||||||
if e.complexity.Query.GetRecordsByIds == nil {
|
if e.complexity.Query.GetRecordsByIds == nil {
|
||||||
break
|
break
|
||||||
@ -838,7 +866,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
|||||||
|
|
||||||
return e.complexity.Record.References(childComplexity), true
|
return e.complexity.Record.References(childComplexity), true
|
||||||
|
|
||||||
case "Status.disk_usage":
|
case "Status.diskUsage":
|
||||||
if e.complexity.Status.DiskUsage == nil {
|
if e.complexity.Status.DiskUsage == nil {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@ -852,7 +880,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
|||||||
|
|
||||||
return e.complexity.Status.Node(childComplexity), true
|
return e.complexity.Status.Node(childComplexity), true
|
||||||
|
|
||||||
case "Status.num_peers":
|
case "Status.numPeers":
|
||||||
if e.complexity.Status.NumPeers == nil {
|
if e.complexity.Status.NumPeers == nil {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@ -901,28 +929,28 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
|||||||
|
|
||||||
return e.complexity.StringValue.Value(childComplexity), true
|
return e.complexity.StringValue.Value(childComplexity), true
|
||||||
|
|
||||||
case "SyncInfo.catching_up":
|
case "SyncInfo.catchingUp":
|
||||||
if e.complexity.SyncInfo.CatchingUp == nil {
|
if e.complexity.SyncInfo.CatchingUp == nil {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
return e.complexity.SyncInfo.CatchingUp(childComplexity), true
|
return e.complexity.SyncInfo.CatchingUp(childComplexity), true
|
||||||
|
|
||||||
case "SyncInfo.latest_block_hash":
|
case "SyncInfo.latestBlockHash":
|
||||||
if e.complexity.SyncInfo.LatestBlockHash == nil {
|
if e.complexity.SyncInfo.LatestBlockHash == nil {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
return e.complexity.SyncInfo.LatestBlockHash(childComplexity), true
|
return e.complexity.SyncInfo.LatestBlockHash(childComplexity), true
|
||||||
|
|
||||||
case "SyncInfo.latest_block_height":
|
case "SyncInfo.latestBlockHeight":
|
||||||
if e.complexity.SyncInfo.LatestBlockHeight == nil {
|
if e.complexity.SyncInfo.LatestBlockHeight == nil {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
return e.complexity.SyncInfo.LatestBlockHeight(childComplexity), true
|
return e.complexity.SyncInfo.LatestBlockHeight(childComplexity), true
|
||||||
|
|
||||||
case "SyncInfo.latest_block_time":
|
case "SyncInfo.latestBlockTime":
|
||||||
if e.complexity.SyncInfo.LatestBlockTime == nil {
|
if e.complexity.SyncInfo.LatestBlockTime == nil {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@ -936,14 +964,14 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
|||||||
|
|
||||||
return e.complexity.ValidatorInfo.Address(childComplexity), true
|
return e.complexity.ValidatorInfo.Address(childComplexity), true
|
||||||
|
|
||||||
case "ValidatorInfo.proposer_priority":
|
case "ValidatorInfo.proposerPriority":
|
||||||
if e.complexity.ValidatorInfo.ProposerPriority == nil {
|
if e.complexity.ValidatorInfo.ProposerPriority == nil {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
return e.complexity.ValidatorInfo.ProposerPriority(childComplexity), true
|
return e.complexity.ValidatorInfo.ProposerPriority(childComplexity), true
|
||||||
|
|
||||||
case "ValidatorInfo.voting_power":
|
case "ValidatorInfo.votingPower":
|
||||||
if e.complexity.ValidatorInfo.VotingPower == nil {
|
if e.complexity.ValidatorInfo.VotingPower == nil {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@ -3808,6 +3836,94 @@ func (ec *executionContext) fieldContext_OwnerBonds_bonds(ctx context.Context, f
|
|||||||
return fc, nil
|
return fc, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) _Participant_cosmosAddress(ctx context.Context, field graphql.CollectedField, obj *Participant) (ret graphql.Marshaler) {
|
||||||
|
fc, err := ec.fieldContext_Participant_cosmosAddress(ctx, field)
|
||||||
|
if err != nil {
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||||||
|
ret = graphql.Null
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||||||
|
ctx = rctx // use context from middleware stack in children
|
||||||
|
return obj.CosmosAddress, nil
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
ec.Error(ctx, err)
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
if resTmp == nil {
|
||||||
|
if !graphql.HasFieldError(ctx, fc) {
|
||||||
|
ec.Errorf(ctx, "must not be null")
|
||||||
|
}
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
res := resTmp.(string)
|
||||||
|
fc.Result = res
|
||||||
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) fieldContext_Participant_cosmosAddress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||||
|
fc = &graphql.FieldContext{
|
||||||
|
Object: "Participant",
|
||||||
|
Field: field,
|
||||||
|
IsMethod: false,
|
||||||
|
IsResolver: false,
|
||||||
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||||
|
return nil, errors.New("field of type String does not have child fields")
|
||||||
|
},
|
||||||
|
}
|
||||||
|
return fc, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) _Participant_nitroAddress(ctx context.Context, field graphql.CollectedField, obj *Participant) (ret graphql.Marshaler) {
|
||||||
|
fc, err := ec.fieldContext_Participant_nitroAddress(ctx, field)
|
||||||
|
if err != nil {
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||||||
|
ret = graphql.Null
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||||||
|
ctx = rctx // use context from middleware stack in children
|
||||||
|
return obj.NitroAddress, nil
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
ec.Error(ctx, err)
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
if resTmp == nil {
|
||||||
|
if !graphql.HasFieldError(ctx, fc) {
|
||||||
|
ec.Errorf(ctx, "must not be null")
|
||||||
|
}
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
res := resTmp.(string)
|
||||||
|
fc.Result = res
|
||||||
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) fieldContext_Participant_nitroAddress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||||
|
fc = &graphql.FieldContext{
|
||||||
|
Object: "Participant",
|
||||||
|
Field: field,
|
||||||
|
IsMethod: false,
|
||||||
|
IsResolver: false,
|
||||||
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||||
|
return nil, errors.New("field of type String does not have child fields")
|
||||||
|
},
|
||||||
|
}
|
||||||
|
return fc, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (ec *executionContext) _PeerInfo_node(ctx context.Context, field graphql.CollectedField, obj *PeerInfo) (ret graphql.Marshaler) {
|
func (ec *executionContext) _PeerInfo_node(ctx context.Context, field graphql.CollectedField, obj *PeerInfo) (ret graphql.Marshaler) {
|
||||||
fc, err := ec.fieldContext_PeerInfo_node(ctx, field)
|
fc, err := ec.fieldContext_PeerInfo_node(ctx, field)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -3860,8 +3976,8 @@ func (ec *executionContext) fieldContext_PeerInfo_node(ctx context.Context, fiel
|
|||||||
return fc, nil
|
return fc, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ec *executionContext) _PeerInfo_is_outbound(ctx context.Context, field graphql.CollectedField, obj *PeerInfo) (ret graphql.Marshaler) {
|
func (ec *executionContext) _PeerInfo_isOutbound(ctx context.Context, field graphql.CollectedField, obj *PeerInfo) (ret graphql.Marshaler) {
|
||||||
fc, err := ec.fieldContext_PeerInfo_is_outbound(ctx, field)
|
fc, err := ec.fieldContext_PeerInfo_isOutbound(ctx, field)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return graphql.Null
|
return graphql.Null
|
||||||
}
|
}
|
||||||
@ -3891,7 +4007,7 @@ func (ec *executionContext) _PeerInfo_is_outbound(ctx context.Context, field gra
|
|||||||
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
|
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ec *executionContext) fieldContext_PeerInfo_is_outbound(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
func (ec *executionContext) fieldContext_PeerInfo_isOutbound(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||||
fc = &graphql.FieldContext{
|
fc = &graphql.FieldContext{
|
||||||
Object: "PeerInfo",
|
Object: "PeerInfo",
|
||||||
Field: field,
|
Field: field,
|
||||||
@ -3904,8 +4020,8 @@ func (ec *executionContext) fieldContext_PeerInfo_is_outbound(ctx context.Contex
|
|||||||
return fc, nil
|
return fc, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ec *executionContext) _PeerInfo_remote_ip(ctx context.Context, field graphql.CollectedField, obj *PeerInfo) (ret graphql.Marshaler) {
|
func (ec *executionContext) _PeerInfo_remoteIp(ctx context.Context, field graphql.CollectedField, obj *PeerInfo) (ret graphql.Marshaler) {
|
||||||
fc, err := ec.fieldContext_PeerInfo_remote_ip(ctx, field)
|
fc, err := ec.fieldContext_PeerInfo_remoteIp(ctx, field)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return graphql.Null
|
return graphql.Null
|
||||||
}
|
}
|
||||||
@ -3935,7 +4051,7 @@ func (ec *executionContext) _PeerInfo_remote_ip(ctx context.Context, field graph
|
|||||||
return ec.marshalNString2string(ctx, field.Selections, res)
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ec *executionContext) fieldContext_PeerInfo_remote_ip(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
func (ec *executionContext) fieldContext_PeerInfo_remoteIp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||||
fc = &graphql.FieldContext{
|
fc = &graphql.FieldContext{
|
||||||
Object: "PeerInfo",
|
Object: "PeerInfo",
|
||||||
Field: field,
|
Field: field,
|
||||||
@ -3997,12 +4113,12 @@ func (ec *executionContext) fieldContext_Query_getStatus(ctx context.Context, fi
|
|||||||
return ec.fieldContext_Status_validator(ctx, field)
|
return ec.fieldContext_Status_validator(ctx, field)
|
||||||
case "validators":
|
case "validators":
|
||||||
return ec.fieldContext_Status_validators(ctx, field)
|
return ec.fieldContext_Status_validators(ctx, field)
|
||||||
case "num_peers":
|
case "numPeers":
|
||||||
return ec.fieldContext_Status_num_peers(ctx, field)
|
return ec.fieldContext_Status_numPeers(ctx, field)
|
||||||
case "peers":
|
case "peers":
|
||||||
return ec.fieldContext_Status_peers(ctx, field)
|
return ec.fieldContext_Status_peers(ctx, field)
|
||||||
case "disk_usage":
|
case "diskUsage":
|
||||||
return ec.fieldContext_Status_disk_usage(ctx, field)
|
return ec.fieldContext_Status_diskUsage(ctx, field)
|
||||||
}
|
}
|
||||||
return nil, fmt.Errorf("no field named %q was found under type Status", field.Name)
|
return nil, fmt.Errorf("no field named %q was found under type Status", field.Name)
|
||||||
},
|
},
|
||||||
@ -4677,6 +4793,56 @@ func (ec *executionContext) fieldContext_Query_getAuctionsByIds(ctx context.Cont
|
|||||||
return fc, nil
|
return fc, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) _Query_getParticipants(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
||||||
|
fc, err := ec.fieldContext_Query_getParticipants(ctx, field)
|
||||||
|
if err != nil {
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||||||
|
ret = graphql.Null
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||||||
|
ctx = rctx // use context from middleware stack in children
|
||||||
|
return ec.resolvers.Query().GetParticipants(rctx)
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
ec.Error(ctx, err)
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
if resTmp == nil {
|
||||||
|
if !graphql.HasFieldError(ctx, fc) {
|
||||||
|
ec.Errorf(ctx, "must not be null")
|
||||||
|
}
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
res := resTmp.([]*Participant)
|
||||||
|
fc.Result = res
|
||||||
|
return ec.marshalNParticipant2ᚕᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐParticipant(ctx, field.Selections, res)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) fieldContext_Query_getParticipants(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||||
|
fc = &graphql.FieldContext{
|
||||||
|
Object: "Query",
|
||||||
|
Field: field,
|
||||||
|
IsMethod: true,
|
||||||
|
IsResolver: true,
|
||||||
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||||
|
switch field.Name {
|
||||||
|
case "cosmosAddress":
|
||||||
|
return ec.fieldContext_Participant_cosmosAddress(ctx, field)
|
||||||
|
case "nitroAddress":
|
||||||
|
return ec.fieldContext_Participant_nitroAddress(ctx, field)
|
||||||
|
}
|
||||||
|
return nil, fmt.Errorf("no field named %q was found under type Participant", field.Name)
|
||||||
|
},
|
||||||
|
}
|
||||||
|
return fc, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
||||||
fc, err := ec.fieldContext_Query___type(ctx, field)
|
fc, err := ec.fieldContext_Query___type(ctx, field)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -5305,14 +5471,14 @@ func (ec *executionContext) fieldContext_Status_sync(ctx context.Context, field
|
|||||||
IsResolver: false,
|
IsResolver: false,
|
||||||
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||||
switch field.Name {
|
switch field.Name {
|
||||||
case "latest_block_hash":
|
case "latestBlockHash":
|
||||||
return ec.fieldContext_SyncInfo_latest_block_hash(ctx, field)
|
return ec.fieldContext_SyncInfo_latestBlockHash(ctx, field)
|
||||||
case "latest_block_height":
|
case "latestBlockHeight":
|
||||||
return ec.fieldContext_SyncInfo_latest_block_height(ctx, field)
|
return ec.fieldContext_SyncInfo_latestBlockHeight(ctx, field)
|
||||||
case "latest_block_time":
|
case "latestBlockTime":
|
||||||
return ec.fieldContext_SyncInfo_latest_block_time(ctx, field)
|
return ec.fieldContext_SyncInfo_latestBlockTime(ctx, field)
|
||||||
case "catching_up":
|
case "catchingUp":
|
||||||
return ec.fieldContext_SyncInfo_catching_up(ctx, field)
|
return ec.fieldContext_SyncInfo_catchingUp(ctx, field)
|
||||||
}
|
}
|
||||||
return nil, fmt.Errorf("no field named %q was found under type SyncInfo", field.Name)
|
return nil, fmt.Errorf("no field named %q was found under type SyncInfo", field.Name)
|
||||||
},
|
},
|
||||||
@ -5358,10 +5524,10 @@ func (ec *executionContext) fieldContext_Status_validator(ctx context.Context, f
|
|||||||
switch field.Name {
|
switch field.Name {
|
||||||
case "address":
|
case "address":
|
||||||
return ec.fieldContext_ValidatorInfo_address(ctx, field)
|
return ec.fieldContext_ValidatorInfo_address(ctx, field)
|
||||||
case "voting_power":
|
case "votingPower":
|
||||||
return ec.fieldContext_ValidatorInfo_voting_power(ctx, field)
|
return ec.fieldContext_ValidatorInfo_votingPower(ctx, field)
|
||||||
case "proposer_priority":
|
case "proposerPriority":
|
||||||
return ec.fieldContext_ValidatorInfo_proposer_priority(ctx, field)
|
return ec.fieldContext_ValidatorInfo_proposerPriority(ctx, field)
|
||||||
}
|
}
|
||||||
return nil, fmt.Errorf("no field named %q was found under type ValidatorInfo", field.Name)
|
return nil, fmt.Errorf("no field named %q was found under type ValidatorInfo", field.Name)
|
||||||
},
|
},
|
||||||
@ -5410,10 +5576,10 @@ func (ec *executionContext) fieldContext_Status_validators(ctx context.Context,
|
|||||||
switch field.Name {
|
switch field.Name {
|
||||||
case "address":
|
case "address":
|
||||||
return ec.fieldContext_ValidatorInfo_address(ctx, field)
|
return ec.fieldContext_ValidatorInfo_address(ctx, field)
|
||||||
case "voting_power":
|
case "votingPower":
|
||||||
return ec.fieldContext_ValidatorInfo_voting_power(ctx, field)
|
return ec.fieldContext_ValidatorInfo_votingPower(ctx, field)
|
||||||
case "proposer_priority":
|
case "proposerPriority":
|
||||||
return ec.fieldContext_ValidatorInfo_proposer_priority(ctx, field)
|
return ec.fieldContext_ValidatorInfo_proposerPriority(ctx, field)
|
||||||
}
|
}
|
||||||
return nil, fmt.Errorf("no field named %q was found under type ValidatorInfo", field.Name)
|
return nil, fmt.Errorf("no field named %q was found under type ValidatorInfo", field.Name)
|
||||||
},
|
},
|
||||||
@ -5421,8 +5587,8 @@ func (ec *executionContext) fieldContext_Status_validators(ctx context.Context,
|
|||||||
return fc, nil
|
return fc, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ec *executionContext) _Status_num_peers(ctx context.Context, field graphql.CollectedField, obj *Status) (ret graphql.Marshaler) {
|
func (ec *executionContext) _Status_numPeers(ctx context.Context, field graphql.CollectedField, obj *Status) (ret graphql.Marshaler) {
|
||||||
fc, err := ec.fieldContext_Status_num_peers(ctx, field)
|
fc, err := ec.fieldContext_Status_numPeers(ctx, field)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return graphql.Null
|
return graphql.Null
|
||||||
}
|
}
|
||||||
@ -5452,7 +5618,7 @@ func (ec *executionContext) _Status_num_peers(ctx context.Context, field graphql
|
|||||||
return ec.marshalNString2string(ctx, field.Selections, res)
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ec *executionContext) fieldContext_Status_num_peers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
func (ec *executionContext) fieldContext_Status_numPeers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||||
fc = &graphql.FieldContext{
|
fc = &graphql.FieldContext{
|
||||||
Object: "Status",
|
Object: "Status",
|
||||||
Field: field,
|
Field: field,
|
||||||
@ -5503,10 +5669,10 @@ func (ec *executionContext) fieldContext_Status_peers(ctx context.Context, field
|
|||||||
switch field.Name {
|
switch field.Name {
|
||||||
case "node":
|
case "node":
|
||||||
return ec.fieldContext_PeerInfo_node(ctx, field)
|
return ec.fieldContext_PeerInfo_node(ctx, field)
|
||||||
case "is_outbound":
|
case "isOutbound":
|
||||||
return ec.fieldContext_PeerInfo_is_outbound(ctx, field)
|
return ec.fieldContext_PeerInfo_isOutbound(ctx, field)
|
||||||
case "remote_ip":
|
case "remoteIp":
|
||||||
return ec.fieldContext_PeerInfo_remote_ip(ctx, field)
|
return ec.fieldContext_PeerInfo_remoteIp(ctx, field)
|
||||||
}
|
}
|
||||||
return nil, fmt.Errorf("no field named %q was found under type PeerInfo", field.Name)
|
return nil, fmt.Errorf("no field named %q was found under type PeerInfo", field.Name)
|
||||||
},
|
},
|
||||||
@ -5514,8 +5680,8 @@ func (ec *executionContext) fieldContext_Status_peers(ctx context.Context, field
|
|||||||
return fc, nil
|
return fc, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ec *executionContext) _Status_disk_usage(ctx context.Context, field graphql.CollectedField, obj *Status) (ret graphql.Marshaler) {
|
func (ec *executionContext) _Status_diskUsage(ctx context.Context, field graphql.CollectedField, obj *Status) (ret graphql.Marshaler) {
|
||||||
fc, err := ec.fieldContext_Status_disk_usage(ctx, field)
|
fc, err := ec.fieldContext_Status_diskUsage(ctx, field)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return graphql.Null
|
return graphql.Null
|
||||||
}
|
}
|
||||||
@ -5545,7 +5711,7 @@ func (ec *executionContext) _Status_disk_usage(ctx context.Context, field graphq
|
|||||||
return ec.marshalNString2string(ctx, field.Selections, res)
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ec *executionContext) fieldContext_Status_disk_usage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
func (ec *executionContext) fieldContext_Status_diskUsage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||||
fc = &graphql.FieldContext{
|
fc = &graphql.FieldContext{
|
||||||
Object: "Status",
|
Object: "Status",
|
||||||
Field: field,
|
Field: field,
|
||||||
@ -5602,8 +5768,8 @@ func (ec *executionContext) fieldContext_StringValue_value(ctx context.Context,
|
|||||||
return fc, nil
|
return fc, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ec *executionContext) _SyncInfo_latest_block_hash(ctx context.Context, field graphql.CollectedField, obj *SyncInfo) (ret graphql.Marshaler) {
|
func (ec *executionContext) _SyncInfo_latestBlockHash(ctx context.Context, field graphql.CollectedField, obj *SyncInfo) (ret graphql.Marshaler) {
|
||||||
fc, err := ec.fieldContext_SyncInfo_latest_block_hash(ctx, field)
|
fc, err := ec.fieldContext_SyncInfo_latestBlockHash(ctx, field)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return graphql.Null
|
return graphql.Null
|
||||||
}
|
}
|
||||||
@ -5633,7 +5799,7 @@ func (ec *executionContext) _SyncInfo_latest_block_hash(ctx context.Context, fie
|
|||||||
return ec.marshalNString2string(ctx, field.Selections, res)
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ec *executionContext) fieldContext_SyncInfo_latest_block_hash(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
func (ec *executionContext) fieldContext_SyncInfo_latestBlockHash(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||||
fc = &graphql.FieldContext{
|
fc = &graphql.FieldContext{
|
||||||
Object: "SyncInfo",
|
Object: "SyncInfo",
|
||||||
Field: field,
|
Field: field,
|
||||||
@ -5646,8 +5812,8 @@ func (ec *executionContext) fieldContext_SyncInfo_latest_block_hash(ctx context.
|
|||||||
return fc, nil
|
return fc, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ec *executionContext) _SyncInfo_latest_block_height(ctx context.Context, field graphql.CollectedField, obj *SyncInfo) (ret graphql.Marshaler) {
|
func (ec *executionContext) _SyncInfo_latestBlockHeight(ctx context.Context, field graphql.CollectedField, obj *SyncInfo) (ret graphql.Marshaler) {
|
||||||
fc, err := ec.fieldContext_SyncInfo_latest_block_height(ctx, field)
|
fc, err := ec.fieldContext_SyncInfo_latestBlockHeight(ctx, field)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return graphql.Null
|
return graphql.Null
|
||||||
}
|
}
|
||||||
@ -5677,7 +5843,7 @@ func (ec *executionContext) _SyncInfo_latest_block_height(ctx context.Context, f
|
|||||||
return ec.marshalNString2string(ctx, field.Selections, res)
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ec *executionContext) fieldContext_SyncInfo_latest_block_height(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
func (ec *executionContext) fieldContext_SyncInfo_latestBlockHeight(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||||
fc = &graphql.FieldContext{
|
fc = &graphql.FieldContext{
|
||||||
Object: "SyncInfo",
|
Object: "SyncInfo",
|
||||||
Field: field,
|
Field: field,
|
||||||
@ -5690,8 +5856,8 @@ func (ec *executionContext) fieldContext_SyncInfo_latest_block_height(ctx contex
|
|||||||
return fc, nil
|
return fc, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ec *executionContext) _SyncInfo_latest_block_time(ctx context.Context, field graphql.CollectedField, obj *SyncInfo) (ret graphql.Marshaler) {
|
func (ec *executionContext) _SyncInfo_latestBlockTime(ctx context.Context, field graphql.CollectedField, obj *SyncInfo) (ret graphql.Marshaler) {
|
||||||
fc, err := ec.fieldContext_SyncInfo_latest_block_time(ctx, field)
|
fc, err := ec.fieldContext_SyncInfo_latestBlockTime(ctx, field)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return graphql.Null
|
return graphql.Null
|
||||||
}
|
}
|
||||||
@ -5721,7 +5887,7 @@ func (ec *executionContext) _SyncInfo_latest_block_time(ctx context.Context, fie
|
|||||||
return ec.marshalNString2string(ctx, field.Selections, res)
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ec *executionContext) fieldContext_SyncInfo_latest_block_time(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
func (ec *executionContext) fieldContext_SyncInfo_latestBlockTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||||
fc = &graphql.FieldContext{
|
fc = &graphql.FieldContext{
|
||||||
Object: "SyncInfo",
|
Object: "SyncInfo",
|
||||||
Field: field,
|
Field: field,
|
||||||
@ -5734,8 +5900,8 @@ func (ec *executionContext) fieldContext_SyncInfo_latest_block_time(ctx context.
|
|||||||
return fc, nil
|
return fc, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ec *executionContext) _SyncInfo_catching_up(ctx context.Context, field graphql.CollectedField, obj *SyncInfo) (ret graphql.Marshaler) {
|
func (ec *executionContext) _SyncInfo_catchingUp(ctx context.Context, field graphql.CollectedField, obj *SyncInfo) (ret graphql.Marshaler) {
|
||||||
fc, err := ec.fieldContext_SyncInfo_catching_up(ctx, field)
|
fc, err := ec.fieldContext_SyncInfo_catchingUp(ctx, field)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return graphql.Null
|
return graphql.Null
|
||||||
}
|
}
|
||||||
@ -5765,7 +5931,7 @@ func (ec *executionContext) _SyncInfo_catching_up(ctx context.Context, field gra
|
|||||||
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
|
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ec *executionContext) fieldContext_SyncInfo_catching_up(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
func (ec *executionContext) fieldContext_SyncInfo_catchingUp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||||
fc = &graphql.FieldContext{
|
fc = &graphql.FieldContext{
|
||||||
Object: "SyncInfo",
|
Object: "SyncInfo",
|
||||||
Field: field,
|
Field: field,
|
||||||
@ -5822,8 +5988,8 @@ func (ec *executionContext) fieldContext_ValidatorInfo_address(ctx context.Conte
|
|||||||
return fc, nil
|
return fc, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ec *executionContext) _ValidatorInfo_voting_power(ctx context.Context, field graphql.CollectedField, obj *ValidatorInfo) (ret graphql.Marshaler) {
|
func (ec *executionContext) _ValidatorInfo_votingPower(ctx context.Context, field graphql.CollectedField, obj *ValidatorInfo) (ret graphql.Marshaler) {
|
||||||
fc, err := ec.fieldContext_ValidatorInfo_voting_power(ctx, field)
|
fc, err := ec.fieldContext_ValidatorInfo_votingPower(ctx, field)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return graphql.Null
|
return graphql.Null
|
||||||
}
|
}
|
||||||
@ -5853,7 +6019,7 @@ func (ec *executionContext) _ValidatorInfo_voting_power(ctx context.Context, fie
|
|||||||
return ec.marshalNString2string(ctx, field.Selections, res)
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ec *executionContext) fieldContext_ValidatorInfo_voting_power(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
func (ec *executionContext) fieldContext_ValidatorInfo_votingPower(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||||
fc = &graphql.FieldContext{
|
fc = &graphql.FieldContext{
|
||||||
Object: "ValidatorInfo",
|
Object: "ValidatorInfo",
|
||||||
Field: field,
|
Field: field,
|
||||||
@ -5866,8 +6032,8 @@ func (ec *executionContext) fieldContext_ValidatorInfo_voting_power(ctx context.
|
|||||||
return fc, nil
|
return fc, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ec *executionContext) _ValidatorInfo_proposer_priority(ctx context.Context, field graphql.CollectedField, obj *ValidatorInfo) (ret graphql.Marshaler) {
|
func (ec *executionContext) _ValidatorInfo_proposerPriority(ctx context.Context, field graphql.CollectedField, obj *ValidatorInfo) (ret graphql.Marshaler) {
|
||||||
fc, err := ec.fieldContext_ValidatorInfo_proposer_priority(ctx, field)
|
fc, err := ec.fieldContext_ValidatorInfo_proposerPriority(ctx, field)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return graphql.Null
|
return graphql.Null
|
||||||
}
|
}
|
||||||
@ -5894,7 +6060,7 @@ func (ec *executionContext) _ValidatorInfo_proposer_priority(ctx context.Context
|
|||||||
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ec *executionContext) fieldContext_ValidatorInfo_proposer_priority(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
func (ec *executionContext) fieldContext_ValidatorInfo_proposerPriority(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||||
fc = &graphql.FieldContext{
|
fc = &graphql.FieldContext{
|
||||||
Object: "ValidatorInfo",
|
Object: "ValidatorInfo",
|
||||||
Field: field,
|
Field: field,
|
||||||
@ -8611,6 +8777,41 @@ func (ec *executionContext) _OwnerBonds(ctx context.Context, sel ast.SelectionSe
|
|||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var participantImplementors = []string{"Participant"}
|
||||||
|
|
||||||
|
func (ec *executionContext) _Participant(ctx context.Context, sel ast.SelectionSet, obj *Participant) graphql.Marshaler {
|
||||||
|
fields := graphql.CollectFields(ec.OperationContext, sel, participantImplementors)
|
||||||
|
out := graphql.NewFieldSet(fields)
|
||||||
|
var invalids uint32
|
||||||
|
for i, field := range fields {
|
||||||
|
switch field.Name {
|
||||||
|
case "__typename":
|
||||||
|
out.Values[i] = graphql.MarshalString("Participant")
|
||||||
|
case "cosmosAddress":
|
||||||
|
|
||||||
|
out.Values[i] = ec._Participant_cosmosAddress(ctx, field, obj)
|
||||||
|
|
||||||
|
if out.Values[i] == graphql.Null {
|
||||||
|
invalids++
|
||||||
|
}
|
||||||
|
case "nitroAddress":
|
||||||
|
|
||||||
|
out.Values[i] = ec._Participant_nitroAddress(ctx, field, obj)
|
||||||
|
|
||||||
|
if out.Values[i] == graphql.Null {
|
||||||
|
invalids++
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
panic("unknown field " + strconv.Quote(field.Name))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
out.Dispatch()
|
||||||
|
if invalids > 0 {
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
var peerInfoImplementors = []string{"PeerInfo"}
|
var peerInfoImplementors = []string{"PeerInfo"}
|
||||||
|
|
||||||
func (ec *executionContext) _PeerInfo(ctx context.Context, sel ast.SelectionSet, obj *PeerInfo) graphql.Marshaler {
|
func (ec *executionContext) _PeerInfo(ctx context.Context, sel ast.SelectionSet, obj *PeerInfo) graphql.Marshaler {
|
||||||
@ -8628,16 +8829,16 @@ func (ec *executionContext) _PeerInfo(ctx context.Context, sel ast.SelectionSet,
|
|||||||
if out.Values[i] == graphql.Null {
|
if out.Values[i] == graphql.Null {
|
||||||
invalids++
|
invalids++
|
||||||
}
|
}
|
||||||
case "is_outbound":
|
case "isOutbound":
|
||||||
|
|
||||||
out.Values[i] = ec._PeerInfo_is_outbound(ctx, field, obj)
|
out.Values[i] = ec._PeerInfo_isOutbound(ctx, field, obj)
|
||||||
|
|
||||||
if out.Values[i] == graphql.Null {
|
if out.Values[i] == graphql.Null {
|
||||||
invalids++
|
invalids++
|
||||||
}
|
}
|
||||||
case "remote_ip":
|
case "remoteIp":
|
||||||
|
|
||||||
out.Values[i] = ec._PeerInfo_remote_ip(ctx, field, obj)
|
out.Values[i] = ec._PeerInfo_remoteIp(ctx, field, obj)
|
||||||
|
|
||||||
if out.Values[i] == graphql.Null {
|
if out.Values[i] == graphql.Null {
|
||||||
invalids++
|
invalids++
|
||||||
@ -8901,6 +9102,29 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
|
|||||||
return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
|
return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
out.Concurrently(i, func() graphql.Marshaler {
|
||||||
|
return rrm(innerCtx)
|
||||||
|
})
|
||||||
|
case "getParticipants":
|
||||||
|
field := field
|
||||||
|
|
||||||
|
innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
res = ec._Query_getParticipants(ctx, field)
|
||||||
|
if res == graphql.Null {
|
||||||
|
atomic.AddUint32(&invalids, 1)
|
||||||
|
}
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
|
||||||
|
rrm := func(ctx context.Context) graphql.Marshaler {
|
||||||
|
return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
|
||||||
|
}
|
||||||
|
|
||||||
out.Concurrently(i, func() graphql.Marshaler {
|
out.Concurrently(i, func() graphql.Marshaler {
|
||||||
return rrm(innerCtx)
|
return rrm(innerCtx)
|
||||||
})
|
})
|
||||||
@ -9034,9 +9258,9 @@ func (ec *executionContext) _Status(ctx context.Context, sel ast.SelectionSet, o
|
|||||||
if out.Values[i] == graphql.Null {
|
if out.Values[i] == graphql.Null {
|
||||||
invalids++
|
invalids++
|
||||||
}
|
}
|
||||||
case "num_peers":
|
case "numPeers":
|
||||||
|
|
||||||
out.Values[i] = ec._Status_num_peers(ctx, field, obj)
|
out.Values[i] = ec._Status_numPeers(ctx, field, obj)
|
||||||
|
|
||||||
if out.Values[i] == graphql.Null {
|
if out.Values[i] == graphql.Null {
|
||||||
invalids++
|
invalids++
|
||||||
@ -9045,9 +9269,9 @@ func (ec *executionContext) _Status(ctx context.Context, sel ast.SelectionSet, o
|
|||||||
|
|
||||||
out.Values[i] = ec._Status_peers(ctx, field, obj)
|
out.Values[i] = ec._Status_peers(ctx, field, obj)
|
||||||
|
|
||||||
case "disk_usage":
|
case "diskUsage":
|
||||||
|
|
||||||
out.Values[i] = ec._Status_disk_usage(ctx, field, obj)
|
out.Values[i] = ec._Status_diskUsage(ctx, field, obj)
|
||||||
|
|
||||||
if out.Values[i] == graphql.Null {
|
if out.Values[i] == graphql.Null {
|
||||||
invalids++
|
invalids++
|
||||||
@ -9101,30 +9325,30 @@ func (ec *executionContext) _SyncInfo(ctx context.Context, sel ast.SelectionSet,
|
|||||||
switch field.Name {
|
switch field.Name {
|
||||||
case "__typename":
|
case "__typename":
|
||||||
out.Values[i] = graphql.MarshalString("SyncInfo")
|
out.Values[i] = graphql.MarshalString("SyncInfo")
|
||||||
case "latest_block_hash":
|
case "latestBlockHash":
|
||||||
|
|
||||||
out.Values[i] = ec._SyncInfo_latest_block_hash(ctx, field, obj)
|
out.Values[i] = ec._SyncInfo_latestBlockHash(ctx, field, obj)
|
||||||
|
|
||||||
if out.Values[i] == graphql.Null {
|
if out.Values[i] == graphql.Null {
|
||||||
invalids++
|
invalids++
|
||||||
}
|
}
|
||||||
case "latest_block_height":
|
case "latestBlockHeight":
|
||||||
|
|
||||||
out.Values[i] = ec._SyncInfo_latest_block_height(ctx, field, obj)
|
out.Values[i] = ec._SyncInfo_latestBlockHeight(ctx, field, obj)
|
||||||
|
|
||||||
if out.Values[i] == graphql.Null {
|
if out.Values[i] == graphql.Null {
|
||||||
invalids++
|
invalids++
|
||||||
}
|
}
|
||||||
case "latest_block_time":
|
case "latestBlockTime":
|
||||||
|
|
||||||
out.Values[i] = ec._SyncInfo_latest_block_time(ctx, field, obj)
|
out.Values[i] = ec._SyncInfo_latestBlockTime(ctx, field, obj)
|
||||||
|
|
||||||
if out.Values[i] == graphql.Null {
|
if out.Values[i] == graphql.Null {
|
||||||
invalids++
|
invalids++
|
||||||
}
|
}
|
||||||
case "catching_up":
|
case "catchingUp":
|
||||||
|
|
||||||
out.Values[i] = ec._SyncInfo_catching_up(ctx, field, obj)
|
out.Values[i] = ec._SyncInfo_catchingUp(ctx, field, obj)
|
||||||
|
|
||||||
if out.Values[i] == graphql.Null {
|
if out.Values[i] == graphql.Null {
|
||||||
invalids++
|
invalids++
|
||||||
@ -9157,16 +9381,16 @@ func (ec *executionContext) _ValidatorInfo(ctx context.Context, sel ast.Selectio
|
|||||||
if out.Values[i] == graphql.Null {
|
if out.Values[i] == graphql.Null {
|
||||||
invalids++
|
invalids++
|
||||||
}
|
}
|
||||||
case "voting_power":
|
case "votingPower":
|
||||||
|
|
||||||
out.Values[i] = ec._ValidatorInfo_voting_power(ctx, field, obj)
|
out.Values[i] = ec._ValidatorInfo_votingPower(ctx, field, obj)
|
||||||
|
|
||||||
if out.Values[i] == graphql.Null {
|
if out.Values[i] == graphql.Null {
|
||||||
invalids++
|
invalids++
|
||||||
}
|
}
|
||||||
case "proposer_priority":
|
case "proposerPriority":
|
||||||
|
|
||||||
out.Values[i] = ec._ValidatorInfo_proposer_priority(ctx, field, obj)
|
out.Values[i] = ec._ValidatorInfo_proposerPriority(ctx, field, obj)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
panic("unknown field " + strconv.Quote(field.Name))
|
panic("unknown field " + strconv.Quote(field.Name))
|
||||||
@ -9727,6 +9951,44 @@ func (ec *executionContext) marshalNNodeInfo2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋlac
|
|||||||
return ec._NodeInfo(ctx, sel, v)
|
return ec._NodeInfo(ctx, sel, v)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) marshalNParticipant2ᚕᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐParticipant(ctx context.Context, sel ast.SelectionSet, v []*Participant) graphql.Marshaler {
|
||||||
|
ret := make(graphql.Array, len(v))
|
||||||
|
var wg sync.WaitGroup
|
||||||
|
isLen1 := len(v) == 1
|
||||||
|
if !isLen1 {
|
||||||
|
wg.Add(len(v))
|
||||||
|
}
|
||||||
|
for i := range v {
|
||||||
|
i := i
|
||||||
|
fc := &graphql.FieldContext{
|
||||||
|
Index: &i,
|
||||||
|
Result: &v[i],
|
||||||
|
}
|
||||||
|
ctx := graphql.WithFieldContext(ctx, fc)
|
||||||
|
f := func(i int) {
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||||||
|
ret = nil
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
if !isLen1 {
|
||||||
|
defer wg.Done()
|
||||||
|
}
|
||||||
|
ret[i] = ec.marshalOParticipant2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐParticipant(ctx, sel, v[i])
|
||||||
|
}
|
||||||
|
if isLen1 {
|
||||||
|
f(i)
|
||||||
|
} else {
|
||||||
|
go f(i)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
wg.Wait()
|
||||||
|
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
func (ec *executionContext) marshalNRecord2ᚕᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐRecord(ctx context.Context, sel ast.SelectionSet, v []*Record) graphql.Marshaler {
|
func (ec *executionContext) marshalNRecord2ᚕᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐRecord(ctx context.Context, sel ast.SelectionSet, v []*Record) graphql.Marshaler {
|
||||||
ret := make(graphql.Array, len(v))
|
ret := make(graphql.Array, len(v))
|
||||||
var wg sync.WaitGroup
|
var wg sync.WaitGroup
|
||||||
@ -10670,6 +10932,13 @@ func (ec *executionContext) marshalOOwnerBonds2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋl
|
|||||||
return ec._OwnerBonds(ctx, sel, v)
|
return ec._OwnerBonds(ctx, sel, v)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) marshalOParticipant2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐParticipant(ctx context.Context, sel ast.SelectionSet, v *Participant) graphql.Marshaler {
|
||||||
|
if v == nil {
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
return ec._Participant(ctx, sel, v)
|
||||||
|
}
|
||||||
|
|
||||||
func (ec *executionContext) marshalOPeerInfo2ᚕᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐPeerInfo(ctx context.Context, sel ast.SelectionSet, v []*PeerInfo) graphql.Marshaler {
|
func (ec *executionContext) marshalOPeerInfo2ᚕᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐPeerInfo(ctx context.Context, sel ast.SelectionSet, v []*PeerInfo) graphql.Marshaler {
|
||||||
if v == nil {
|
if v == nil {
|
||||||
return graphql.Null
|
return graphql.Null
|
||||||
|
@ -135,10 +135,15 @@ type OwnerBonds struct {
|
|||||||
Bonds []*Bond `json:"bonds"`
|
Bonds []*Bond `json:"bonds"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Participant struct {
|
||||||
|
CosmosAddress string `json:"cosmosAddress"`
|
||||||
|
NitroAddress string `json:"nitroAddress"`
|
||||||
|
}
|
||||||
|
|
||||||
type PeerInfo struct {
|
type PeerInfo struct {
|
||||||
Node *NodeInfo `json:"node"`
|
Node *NodeInfo `json:"node"`
|
||||||
IsOutbound bool `json:"is_outbound"`
|
IsOutbound bool `json:"isOutbound"`
|
||||||
RemoteIP string `json:"remote_ip"`
|
RemoteIP string `json:"remoteIp"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Record struct {
|
type Record struct {
|
||||||
@ -158,9 +163,9 @@ type Status struct {
|
|||||||
Sync *SyncInfo `json:"sync"`
|
Sync *SyncInfo `json:"sync"`
|
||||||
Validator *ValidatorInfo `json:"validator"`
|
Validator *ValidatorInfo `json:"validator"`
|
||||||
Validators []*ValidatorInfo `json:"validators"`
|
Validators []*ValidatorInfo `json:"validators"`
|
||||||
NumPeers string `json:"num_peers"`
|
NumPeers string `json:"numPeers"`
|
||||||
Peers []*PeerInfo `json:"peers"`
|
Peers []*PeerInfo `json:"peers"`
|
||||||
DiskUsage string `json:"disk_usage"`
|
DiskUsage string `json:"diskUsage"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type StringValue struct {
|
type StringValue struct {
|
||||||
@ -170,16 +175,16 @@ type StringValue struct {
|
|||||||
func (StringValue) IsValue() {}
|
func (StringValue) IsValue() {}
|
||||||
|
|
||||||
type SyncInfo struct {
|
type SyncInfo struct {
|
||||||
LatestBlockHash string `json:"latest_block_hash"`
|
LatestBlockHash string `json:"latestBlockHash"`
|
||||||
LatestBlockHeight string `json:"latest_block_height"`
|
LatestBlockHeight string `json:"latestBlockHeight"`
|
||||||
LatestBlockTime string `json:"latest_block_time"`
|
LatestBlockTime string `json:"latestBlockTime"`
|
||||||
CatchingUp bool `json:"catching_up"`
|
CatchingUp bool `json:"catchingUp"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ValidatorInfo struct {
|
type ValidatorInfo struct {
|
||||||
Address string `json:"address"`
|
Address string `json:"address"`
|
||||||
VotingPower string `json:"voting_power"`
|
VotingPower string `json:"votingPower"`
|
||||||
ProposerPriority *string `json:"proposer_priority"`
|
ProposerPriority *string `json:"proposerPriority"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ValueInput struct {
|
type ValueInput struct {
|
||||||
|
@ -13,6 +13,7 @@ import (
|
|||||||
|
|
||||||
auctiontypes "git.vdb.to/cerc-io/laconicd/x/auction"
|
auctiontypes "git.vdb.to/cerc-io/laconicd/x/auction"
|
||||||
bondtypes "git.vdb.to/cerc-io/laconicd/x/bond"
|
bondtypes "git.vdb.to/cerc-io/laconicd/x/bond"
|
||||||
|
onboardingTypes "git.vdb.to/cerc-io/laconicd/x/onboarding"
|
||||||
registrytypes "git.vdb.to/cerc-io/laconicd/x/registry"
|
registrytypes "git.vdb.to/cerc-io/laconicd/x/registry"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -359,3 +360,21 @@ func (q queryResolver) GetAuctionsByIds(ctx context.Context, ids []string) ([]*A
|
|||||||
|
|
||||||
return gqlAuctionResponse, nil
|
return gqlAuctionResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (q queryResolver) GetParticipants(ctx context.Context) ([]*Participant, error) {
|
||||||
|
onboardingQueryClient := onboardingTypes.NewQueryClient(q.ctx)
|
||||||
|
participantResp, err := onboardingQueryClient.Participants(context.Background(), &onboardingTypes.QueryParticipantsRequest{})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
participants := make([]*Participant, len(participantResp.GetParticipants()))
|
||||||
|
for i, p := range participantResp.Participants {
|
||||||
|
participants[i] = &Participant{
|
||||||
|
CosmosAddress: p.CosmosAddress,
|
||||||
|
NitroAddress: p.NitroAddress,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return participants, nil
|
||||||
|
}
|
||||||
|
@ -4,6 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"time"
|
||||||
|
|
||||||
"cosmossdk.io/log"
|
"cosmossdk.io/log"
|
||||||
"github.com/99designs/gqlgen/graphql/handler"
|
"github.com/99designs/gqlgen/graphql/handler"
|
||||||
@ -54,7 +55,12 @@ func Server(ctx context.Context, clientCtx client.Context, logger log.Logger) er
|
|||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
logger.Info(fmt.Sprintf("Connect to GraphQL playground url: http://localhost:%s", port))
|
logger.Info(fmt.Sprintf("Connect to GraphQL playground url: http://localhost:%s", port))
|
||||||
errCh <- http.ListenAndServe(":"+port, router)
|
server := &http.Server{
|
||||||
|
Addr: ":" + port,
|
||||||
|
Handler: router,
|
||||||
|
ReadHeaderTimeout: 3 * time.Second,
|
||||||
|
}
|
||||||
|
errCh <- server.ListenAndServe()
|
||||||
}()
|
}()
|
||||||
|
|
||||||
select {
|
select {
|
||||||
|
@ -39,7 +39,8 @@ func getStatusInfo(client client.Context) (*NodeInfo, *SyncInfo, *ValidatorInfo,
|
|||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func getNetInfo(client client.Context) (string, []*PeerInfo, error) {
|
// nolint: all
|
||||||
|
func getNetInfo(_ client.Context) (string, []*PeerInfo, error) {
|
||||||
// TODO: Implement
|
// TODO: Implement
|
||||||
|
|
||||||
// nodeClient, err := client.GetNode()
|
// nodeClient, err := client.GetNode()
|
||||||
|
15
proto/cerc/onboarding/module/v1/module.proto
Normal file
15
proto/cerc/onboarding/module/v1/module.proto
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package cerc.onboarding.module.v1;
|
||||||
|
|
||||||
|
import "cosmos/app/v1alpha1/module.proto";
|
||||||
|
|
||||||
|
// Module is the app config object of the module.
|
||||||
|
// Learn more: https://docs.cosmos.network/main/building-modules/depinject
|
||||||
|
message Module {
|
||||||
|
option (cosmos.app.v1alpha1.module) = {
|
||||||
|
go_import : "git.vdb.to/cerc-io/laconicd/x/onboarding"
|
||||||
|
};
|
||||||
|
|
||||||
|
string authority = 1;
|
||||||
|
}
|
16
proto/cerc/onboarding/v1/genesis.proto
Normal file
16
proto/cerc/onboarding/v1/genesis.proto
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package cerc.onboarding.v1;
|
||||||
|
|
||||||
|
import "gogoproto/gogo.proto";
|
||||||
|
import "cerc/onboarding/v1/onboarding.proto";
|
||||||
|
|
||||||
|
option go_package = "git.vdb.to/cerc-io/laconicd/x/onboarding";
|
||||||
|
|
||||||
|
// GenesisState defines the onboarding module's genesis state.
|
||||||
|
message GenesisState {
|
||||||
|
// params defines all the parameters of the module.
|
||||||
|
Params params = 1 [ (gogoproto.nullable) = false ];
|
||||||
|
// participants defines all the participants
|
||||||
|
repeated Participant participants = 2 [ (gogoproto.nullable) = false ];
|
||||||
|
}
|
33
proto/cerc/onboarding/v1/onboarding.proto
Normal file
33
proto/cerc/onboarding/v1/onboarding.proto
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package cerc.onboarding.v1;
|
||||||
|
|
||||||
|
import "gogoproto/gogo.proto";
|
||||||
|
|
||||||
|
option go_package = "git.vdb.to/cerc-io/laconicd/x/onboarding";
|
||||||
|
|
||||||
|
// Params defines the parameters of the onboarding module.
|
||||||
|
message Params {
|
||||||
|
bool onboarding_enabled = 1
|
||||||
|
[ (gogoproto.moretags) =
|
||||||
|
"json:\"onboarding_enabled\" yaml:\"onboarding_enabled\"" ];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Participant defines the data that will be stored for each enrolled
|
||||||
|
// participant
|
||||||
|
message Participant {
|
||||||
|
string cosmos_address = 1
|
||||||
|
[ (gogoproto.moretags) =
|
||||||
|
"json:\"cosmos_address\" yaml:\"cosmos_address\"" ];
|
||||||
|
|
||||||
|
string nitro_address = 2
|
||||||
|
[ (gogoproto.moretags) =
|
||||||
|
"json:\"nitro_address\" yaml:\"nitro_address\"" ];
|
||||||
|
}
|
||||||
|
// EthPayload defines the payload that is signed by the ethereum private key
|
||||||
|
message EthPayload {
|
||||||
|
string address = 1
|
||||||
|
[ (gogoproto.moretags) = "json:\"address\" yaml:\"address\"" ];
|
||||||
|
|
||||||
|
string msg = 2 [ (gogoproto.moretags) = "json:\"msg\" yaml:\"msg\"" ];
|
||||||
|
}
|
34
proto/cerc/onboarding/v1/query.proto
Normal file
34
proto/cerc/onboarding/v1/query.proto
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package cerc.onboarding.v1;
|
||||||
|
|
||||||
|
import "gogoproto/gogo.proto";
|
||||||
|
import "cosmos/base/query/v1beta1/pagination.proto";
|
||||||
|
import "cerc/onboarding/v1/onboarding.proto";
|
||||||
|
import "google/api/annotations.proto";
|
||||||
|
|
||||||
|
option go_package = "git.vdb.to/cerc-io/laconicd/x/onboarding";
|
||||||
|
|
||||||
|
// Query defines the gRPC querier service for onboarding module
|
||||||
|
service Query {
|
||||||
|
// Participants queries Participants list
|
||||||
|
rpc Participants(QueryParticipantsRequest)
|
||||||
|
returns (QueryParticipantsResponse) {
|
||||||
|
option (google.api.http).get = "/cerc/onboarding/v1/participants";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryParticipantsRequest queries participants
|
||||||
|
message QueryParticipantsRequest {
|
||||||
|
// pagination defines an optional pagination for the request.
|
||||||
|
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryParticipantsResponse is response type for get the participants
|
||||||
|
message QueryParticipantsResponse {
|
||||||
|
repeated Participant participants = 1
|
||||||
|
[ (gogoproto.moretags) = "json:\"participants\" yaml:\"participants\"" ];
|
||||||
|
|
||||||
|
// pagination defines the pagination in the response.
|
||||||
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||||
|
}
|
35
proto/cerc/onboarding/v1/tx.proto
Normal file
35
proto/cerc/onboarding/v1/tx.proto
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package cerc.onboarding.v1;
|
||||||
|
|
||||||
|
import "cosmos/msg/v1/msg.proto";
|
||||||
|
import "google/api/annotations.proto";
|
||||||
|
import "gogoproto/gogo.proto";
|
||||||
|
import "cerc/onboarding/v1/onboarding.proto";
|
||||||
|
|
||||||
|
option go_package = "git.vdb.to/cerc-io/laconicd/x/onboarding";
|
||||||
|
|
||||||
|
// Msg defines the onboarding Msg service.
|
||||||
|
service Msg {
|
||||||
|
option (cosmos.msg.v1.service) = true;
|
||||||
|
|
||||||
|
// OnboardParticipant defines a method for enrolling a new validator.
|
||||||
|
rpc OnboardParticipant(MsgOnboardParticipant)
|
||||||
|
returns (MsgOnboardParticipantResponse) {
|
||||||
|
option (google.api.http).post = "/cerc/onboarding/v1/onboard_participant";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// MsgOnboardParticipant defines a SDK message for enrolling a new validator.
|
||||||
|
message MsgOnboardParticipant {
|
||||||
|
option (cosmos.msg.v1.signer) = "participant";
|
||||||
|
|
||||||
|
// Participant is the msg sender
|
||||||
|
string participant = 1;
|
||||||
|
EthPayload eth_payload = 2 [ (gogoproto.nullable) = false ];
|
||||||
|
string eth_signature = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// MsgOnboardParticipantResponse defines the Msg/OnboardParticipant response
|
||||||
|
// type.
|
||||||
|
message MsgOnboardParticipantResponse {}
|
@ -52,6 +52,12 @@ if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
|
|||||||
update_genesis '.app_state["registry"]["params"]["authority_auction_reveals_duration"]="60s"'
|
update_genesis '.app_state["registry"]["params"]["authority_auction_reveals_duration"]="60s"'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "$ONBOARDING_ENABLED" == "true" ]]; then
|
||||||
|
echo "Enabling validator onboarding."
|
||||||
|
|
||||||
|
update_genesis '.app_state["onboarding"]["params"]["onboarding_enabled"]=true'
|
||||||
|
fi
|
||||||
|
|
||||||
# increase block time (?)
|
# increase block time (?)
|
||||||
update_genesis '.consensus["params"]["block"]["time_iota_ms"]="1000"'
|
update_genesis '.consensus["params"]["block"]["time_iota_ms"]="1000"'
|
||||||
|
|
||||||
|
@ -103,7 +103,14 @@ func (tf *TestFixture) Setup() error {
|
|||||||
|
|
||||||
bondKeeper := bondkeeper.NewKeeper(cdc, runtime.NewKVStoreService(keys[bondTypes.StoreKey]), accountKeeper, bankKeeper)
|
bondKeeper := bondkeeper.NewKeeper(cdc, runtime.NewKVStoreService(keys[bondTypes.StoreKey]), accountKeeper, bankKeeper)
|
||||||
|
|
||||||
registryKeeper := registrykeeper.NewKeeper(cdc, runtime.NewKVStoreService(keys[registryTypes.StoreKey]), accountKeeper, bankKeeper, bondKeeper, auctionKeeper)
|
registryKeeper := registrykeeper.NewKeeper(
|
||||||
|
cdc,
|
||||||
|
runtime.NewKVStoreService(keys[registryTypes.StoreKey]),
|
||||||
|
accountKeeper,
|
||||||
|
bankKeeper,
|
||||||
|
bondKeeper,
|
||||||
|
auctionKeeper,
|
||||||
|
)
|
||||||
|
|
||||||
authModule := auth.NewAppModule(cdc, accountKeeper, authsims.RandomGenesisAccounts, nil)
|
authModule := auth.NewAppModule(cdc, accountKeeper, authsims.RandomGenesisAccounts, nil)
|
||||||
bankModule := bank.NewAppModule(cdc, bankKeeper, accountKeeper, nil)
|
bankModule := bank.NewAppModule(cdc, bankKeeper, accountKeeper, nil)
|
||||||
|
@ -6,6 +6,7 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- TEST_AUCTION_ENABLED
|
- TEST_AUCTION_ENABLED
|
||||||
- TEST_REGISTRY_EXPIRY
|
- TEST_REGISTRY_EXPIRY
|
||||||
|
- ONBOARDING_ENABLED
|
||||||
- LOGLEVEL
|
- LOGLEVEL
|
||||||
volumes:
|
volumes:
|
||||||
- ../../scripts/init.sh:/docker-entrypoint-scripts.d/create-fixturenet.sh
|
- ../../scripts/init.sh:/docker-entrypoint-scripts.d/create-fixturenet.sh
|
||||||
|
@ -146,7 +146,11 @@ func collectGenFiles(cfg Config, vals []*Validator, outputDir string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
appState, err := genutil.GenAppStateFromConfig(cfg.Codec, cfg.TxConfig,
|
appState, err := genutil.GenAppStateFromConfig(cfg.Codec, cfg.TxConfig,
|
||||||
cmtCfg, initCfg, appGenesis, banktypes.GenesisBalancesIterator{}, genutiltypes.DefaultMessageValidator, cfg.TxConfig.SigningContext().ValidatorAddressCodec())
|
cmtCfg, initCfg, appGenesis,
|
||||||
|
banktypes.GenesisBalancesIterator{},
|
||||||
|
genutiltypes.DefaultMessageValidator,
|
||||||
|
cfg.TxConfig.SigningContext().ValidatorAddressCodec(),
|
||||||
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
18
utils/signature.go
Normal file
18
utils/signature.go
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
package utils
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/ethereum/go-ethereum/common"
|
||||||
|
|
||||||
|
"github.com/statechannels/go-nitro/crypto"
|
||||||
|
)
|
||||||
|
|
||||||
|
func DecodeEthereumAddress(message []byte, sig string) (string, error) {
|
||||||
|
if len(sig) > 2 && sig[:2] == "0x" {
|
||||||
|
sig = sig[2:]
|
||||||
|
}
|
||||||
|
|
||||||
|
signature := crypto.SplitSignature(common.Hex2Bytes(sig))
|
||||||
|
ethereumAddress, err := crypto.RecoverEthereumMessageSigner(message, signature)
|
||||||
|
|
||||||
|
return ethereumAddress.String(), err
|
||||||
|
}
|
@ -77,8 +77,12 @@ type Keeper struct {
|
|||||||
// state management
|
// state management
|
||||||
Schema collections.Schema
|
Schema collections.Schema
|
||||||
Params collections.Item[auctiontypes.Params]
|
Params collections.Item[auctiontypes.Params]
|
||||||
Auctions *collections.IndexedMap[string, auctiontypes.Auction, AuctionsIndexes] // map: auctionId -> Auction, index: owner -> Auctions
|
Auctions *collections.IndexedMap[
|
||||||
Bids *collections.IndexedMap[collections.Pair[string, string], auctiontypes.Bid, BidsIndexes] // map: (auctionId, bidder) -> Bid, index: bidder -> auctionId
|
string, auctiontypes.Auction, AuctionsIndexes,
|
||||||
|
] // map: auctionId -> Auction, index: owner -> Auctions
|
||||||
|
Bids *collections.IndexedMap[
|
||||||
|
collections.Pair[string, string], auctiontypes.Bid, BidsIndexes,
|
||||||
|
] // map: (auctionId, bidder) -> Bid, index: bidder -> auctionId
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewKeeper creates a new Keeper instance
|
// NewKeeper creates a new Keeper instance
|
||||||
@ -94,9 +98,16 @@ func NewKeeper(
|
|||||||
accountKeeper: accountKeeper,
|
accountKeeper: accountKeeper,
|
||||||
bankKeeper: bankKeeper,
|
bankKeeper: bankKeeper,
|
||||||
Params: collections.NewItem(sb, auctiontypes.ParamsPrefix, "params", codec.CollValue[auctiontypes.Params](cdc)),
|
Params: collections.NewItem(sb, auctiontypes.ParamsPrefix, "params", codec.CollValue[auctiontypes.Params](cdc)),
|
||||||
Auctions: collections.NewIndexedMap(sb, auctiontypes.AuctionsPrefix, "auctions", collections.StringKey, codec.CollValue[auctiontypes.Auction](cdc), newAuctionIndexes(sb)),
|
Auctions: collections.NewIndexedMap(
|
||||||
Bids: collections.NewIndexedMap(sb, auctiontypes.BidsPrefix, "bids", collections.PairKeyCodec(collections.StringKey, collections.StringKey), codec.CollValue[auctiontypes.Bid](cdc), newBidsIndexes(sb)),
|
sb, auctiontypes.AuctionsPrefix, "auctions", collections.StringKey, codec.CollValue[auctiontypes.Auction](cdc), newAuctionIndexes(sb),
|
||||||
usageKeepers: nil,
|
),
|
||||||
|
Bids: collections.NewIndexedMap(
|
||||||
|
sb, auctiontypes.BidsPrefix, "bids",
|
||||||
|
collections.PairKeyCodec(collections.StringKey, collections.StringKey),
|
||||||
|
codec.CollValue[auctiontypes.Bid](cdc),
|
||||||
|
newBidsIndexes(sb),
|
||||||
|
),
|
||||||
|
usageKeepers: nil,
|
||||||
}
|
}
|
||||||
|
|
||||||
schema, err := sb.Build()
|
schema, err := sb.Build()
|
||||||
@ -191,10 +202,16 @@ func (k Keeper) GetBid(ctx sdk.Context, id string, bidder string) (auctiontypes.
|
|||||||
func (k Keeper) GetBids(ctx sdk.Context, id string) ([]*auctiontypes.Bid, error) {
|
func (k Keeper) GetBids(ctx sdk.Context, id string) ([]*auctiontypes.Bid, error) {
|
||||||
var bids []*auctiontypes.Bid
|
var bids []*auctiontypes.Bid
|
||||||
|
|
||||||
err := k.Bids.Walk(ctx, collections.NewPrefixedPairRange[string, string](id), func(key collections.Pair[string, string], value auctiontypes.Bid) (stop bool, err error) {
|
err := k.Bids.Walk(ctx,
|
||||||
bids = append(bids, &value)
|
collections.NewPrefixedPairRange[string, string](id),
|
||||||
return false, nil
|
func(
|
||||||
})
|
key collections.Pair[string, string],
|
||||||
|
value auctiontypes.Bid) (stop bool, err error,
|
||||||
|
) {
|
||||||
|
bids = append(bids, &value)
|
||||||
|
return false, nil
|
||||||
|
},
|
||||||
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -716,7 +733,12 @@ func (k Keeper) pickAuctionWinner(ctx sdk.Context, auction *auctiontypes.Auction
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Use auction burn module account instead of actually burning coins to better keep track of supply.
|
// Use auction burn module account instead of actually burning coins to better keep track of supply.
|
||||||
sdkErr = k.bankKeeper.SendCoinsFromModuleToModule(ctx, auctiontypes.ModuleName, auctiontypes.AuctionBurnModuleAccountName, sdk.NewCoins(amountToBurn))
|
sdkErr = k.bankKeeper.SendCoinsFromModuleToModule(
|
||||||
|
ctx,
|
||||||
|
auctiontypes.ModuleName,
|
||||||
|
auctiontypes.AuctionBurnModuleAccountName,
|
||||||
|
sdk.NewCoins(amountToBurn),
|
||||||
|
)
|
||||||
if sdkErr != nil {
|
if sdkErr != nil {
|
||||||
k.Logger(ctx).Error(fmt.Sprintf("Auction error burning coins: %v", sdkErr))
|
k.Logger(ctx).Error(fmt.Sprintf("Auction error burning coins: %v", sdkErr))
|
||||||
panic(sdkErr)
|
panic(sdkErr)
|
||||||
|
@ -98,7 +98,10 @@ func (qs queryServer) GetBids(c context.Context, req *auctiontypes.QueryGetBidsR
|
|||||||
}
|
}
|
||||||
|
|
||||||
// AuctionsByBidder queries auctions by bidder
|
// AuctionsByBidder queries auctions by bidder
|
||||||
func (qs queryServer) AuctionsByBidder(c context.Context, req *auctiontypes.QueryAuctionsByBidderRequest) (*auctiontypes.QueryAuctionsByBidderResponse, error) {
|
func (qs queryServer) AuctionsByBidder(
|
||||||
|
c context.Context,
|
||||||
|
req *auctiontypes.QueryAuctionsByBidderRequest,
|
||||||
|
) (*auctiontypes.QueryAuctionsByBidderResponse, error) {
|
||||||
ctx := sdk.UnwrapSDKContext(c)
|
ctx := sdk.UnwrapSDKContext(c)
|
||||||
|
|
||||||
if req.BidderAddress == "" {
|
if req.BidderAddress == "" {
|
||||||
@ -110,11 +113,18 @@ func (qs queryServer) AuctionsByBidder(c context.Context, req *auctiontypes.Quer
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
return &auctiontypes.QueryAuctionsByBidderResponse{Auctions: &auctiontypes.Auctions{Auctions: auctions}}, nil
|
return &auctiontypes.QueryAuctionsByBidderResponse{
|
||||||
|
Auctions: &auctiontypes.Auctions{
|
||||||
|
Auctions: auctions,
|
||||||
|
},
|
||||||
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// AuctionsByOwner queries auctions by owner
|
// AuctionsByOwner queries auctions by owner
|
||||||
func (qs queryServer) AuctionsByOwner(c context.Context, req *auctiontypes.QueryAuctionsByOwnerRequest) (*auctiontypes.QueryAuctionsByOwnerResponse, error) {
|
func (qs queryServer) AuctionsByOwner(
|
||||||
|
c context.Context,
|
||||||
|
req *auctiontypes.QueryAuctionsByOwnerRequest,
|
||||||
|
) (*auctiontypes.QueryAuctionsByOwnerResponse, error) {
|
||||||
ctx := sdk.UnwrapSDKContext(c)
|
ctx := sdk.UnwrapSDKContext(c)
|
||||||
|
|
||||||
if req.OwnerAddress == "" {
|
if req.OwnerAddress == "" {
|
||||||
@ -130,7 +140,10 @@ func (qs queryServer) AuctionsByOwner(c context.Context, req *auctiontypes.Query
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GetAuctionModuleBalance queries the auction module account balance
|
// GetAuctionModuleBalance queries the auction module account balance
|
||||||
func (qs queryServer) GetAuctionModuleBalance(c context.Context, req *auctiontypes.QueryGetAuctionModuleBalanceRequest) (*auctiontypes.QueryGetAuctionModuleBalanceResponse, error) {
|
func (qs queryServer) GetAuctionModuleBalance(
|
||||||
|
c context.Context,
|
||||||
|
req *auctiontypes.QueryGetAuctionModuleBalanceRequest,
|
||||||
|
) (*auctiontypes.QueryGetAuctionModuleBalanceResponse, error) {
|
||||||
ctx := sdk.UnwrapSDKContext(c)
|
ctx := sdk.UnwrapSDKContext(c)
|
||||||
balances := qs.k.GetAuctionModuleBalances(ctx)
|
balances := qs.k.GetAuctionModuleBalances(ctx)
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@ import (
|
|||||||
"cosmossdk.io/core/appmodule"
|
"cosmossdk.io/core/appmodule"
|
||||||
"cosmossdk.io/core/store"
|
"cosmossdk.io/core/store"
|
||||||
"cosmossdk.io/depinject"
|
"cosmossdk.io/depinject"
|
||||||
"golang.org/x/exp/maps"
|
|
||||||
|
|
||||||
"github.com/cosmos/cosmos-sdk/codec"
|
"github.com/cosmos/cosmos-sdk/codec"
|
||||||
auth "github.com/cosmos/cosmos-sdk/x/auth/keeper"
|
auth "github.com/cosmos/cosmos-sdk/x/auth/keeper"
|
||||||
@ -64,15 +63,14 @@ func InvokeSetAuctionHooks(
|
|||||||
keeper *keeper.Keeper,
|
keeper *keeper.Keeper,
|
||||||
auctionHooks map[string]auction.AuctionHooksWrapper,
|
auctionHooks map[string]auction.AuctionHooksWrapper,
|
||||||
) error {
|
) error {
|
||||||
// all arguments to invokers are optional
|
// All arguments to invokers are optional
|
||||||
if keeper == nil || config == nil {
|
if keeper == nil || config == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var usageKeepers []auction.AuctionUsageKeeper
|
usageKeepers := make([]auction.AuctionUsageKeeper, 0, len(auctionHooks))
|
||||||
|
|
||||||
for _, modName := range maps.Keys(auctionHooks) {
|
for _, hook := range auctionHooks {
|
||||||
hook := auctionHooks[modName]
|
|
||||||
usageKeepers = append(usageKeepers, hook)
|
usageKeepers = append(usageKeepers, hook)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ func (AppModule) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingCo
|
|||||||
return data.Validate()
|
return data.Validate()
|
||||||
}
|
}
|
||||||
|
|
||||||
// InitGenesis performs genesis initialization for the checkers module.
|
// InitGenesis performs genesis initialization for the auction module.
|
||||||
// It returns no validator updates.
|
// It returns no validator updates.
|
||||||
func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) {
|
func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) {
|
||||||
var genesisState auction.GenesisState
|
var genesisState auction.GenesisState
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
package bond
|
|
||||||
|
|
||||||
import "cosmossdk.io/errors"
|
|
||||||
|
|
||||||
var (
|
|
||||||
ErrIndexTooLong = errors.Register(ModuleName, 2, "index too long")
|
|
||||||
ErrDuplicateAddress = errors.Register(ModuleName, 3, "duplicate address")
|
|
||||||
ErrInvalidBlack = errors.Register(ModuleName, 4, "black address is invalid: %s")
|
|
||||||
ErrInvalidRed = errors.Register(ModuleName, 5, "red address is invalid: %s")
|
|
||||||
ErrGameNotParseable = errors.Register(ModuleName, 6, "game cannot be parsed")
|
|
||||||
)
|
|
@ -3,7 +3,7 @@ package bond
|
|||||||
// bond module event types
|
// bond module event types
|
||||||
|
|
||||||
const (
|
const (
|
||||||
EventTypeCreateBond = "crate_bond"
|
EventTypeCreateBond = "create_bond"
|
||||||
EventTypeRefillBond = "refill_bond"
|
EventTypeRefillBond = "refill_bond"
|
||||||
EventTypeCancelBond = "cancel_bond"
|
EventTypeCancelBond = "cancel_bond"
|
||||||
EventTypeWithdrawBond = "withdraw_bond"
|
EventTypeWithdrawBond = "withdraw_bond"
|
||||||
|
@ -71,8 +71,10 @@ func NewKeeper(
|
|||||||
accountKeeper: accountKeeper,
|
accountKeeper: accountKeeper,
|
||||||
bankKeeper: bankKeeper,
|
bankKeeper: bankKeeper,
|
||||||
Params: collections.NewItem(sb, bondtypes.ParamsPrefix, "params", codec.CollValue[bondtypes.Params](cdc)),
|
Params: collections.NewItem(sb, bondtypes.ParamsPrefix, "params", codec.CollValue[bondtypes.Params](cdc)),
|
||||||
Bonds: collections.NewIndexedMap(sb, bondtypes.BondsPrefix, "bonds", collections.StringKey, codec.CollValue[bondtypes.Bond](cdc), newBondIndexes(sb)),
|
Bonds: collections.NewIndexedMap(
|
||||||
usageKeepers: nil,
|
sb, bondtypes.BondsPrefix, "bonds", collections.StringKey, codec.CollValue[bondtypes.Bond](cdc), newBondIndexes(sb),
|
||||||
|
),
|
||||||
|
usageKeepers: nil,
|
||||||
}
|
}
|
||||||
|
|
||||||
schema, err := sb.Build()
|
schema, err := sb.Build()
|
||||||
|
@ -63,12 +63,17 @@ func (qs queryServer) GetBondById(c context.Context, req *bondtypes.QueryGetBond
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GetBondsByOwner implements bond.QueryServer.
|
// GetBondsByOwner implements bond.QueryServer.
|
||||||
func (qs queryServer) GetBondsByOwner(c context.Context, req *bondtypes.QueryGetBondsByOwnerRequest) (*bondtypes.QueryGetBondsByOwnerResponse, error) {
|
func (qs queryServer) GetBondsByOwner(
|
||||||
|
c context.Context,
|
||||||
|
req *bondtypes.QueryGetBondsByOwnerRequest,
|
||||||
|
) (*bondtypes.QueryGetBondsByOwnerResponse, error) {
|
||||||
ctx := sdk.UnwrapSDKContext(c)
|
ctx := sdk.UnwrapSDKContext(c)
|
||||||
|
|
||||||
owner := req.GetOwner()
|
owner := req.GetOwner()
|
||||||
if len(owner) == 0 {
|
if len(owner) == 0 {
|
||||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "owner required")
|
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest,
|
||||||
|
"owner required",
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
bonds, err := qs.k.GetBondsByOwner(ctx, owner)
|
bonds, err := qs.k.GetBondsByOwner(ctx, owner)
|
||||||
@ -80,9 +85,14 @@ func (qs queryServer) GetBondsByOwner(c context.Context, req *bondtypes.QueryGet
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GetBondModuleBalance implements bond.QueryServer.
|
// GetBondModuleBalance implements bond.QueryServer.
|
||||||
func (qs queryServer) GetBondModuleBalance(c context.Context, _ *bondtypes.QueryGetBondModuleBalanceRequest) (*bondtypes.QueryGetBondModuleBalanceResponse, error) {
|
func (qs queryServer) GetBondModuleBalance(
|
||||||
|
c context.Context,
|
||||||
|
_ *bondtypes.QueryGetBondModuleBalanceRequest,
|
||||||
|
) (*bondtypes.QueryGetBondModuleBalanceResponse, error) {
|
||||||
ctx := sdk.UnwrapSDKContext(c)
|
ctx := sdk.UnwrapSDKContext(c)
|
||||||
balances := qs.k.GetBondModuleBalances(ctx)
|
balances := qs.k.GetBondModuleBalances(ctx)
|
||||||
|
|
||||||
return &bondtypes.QueryGetBondModuleBalanceResponse{Balance: balances}, nil
|
return &bondtypes.QueryGetBondModuleBalanceResponse{
|
||||||
|
Balance: balances,
|
||||||
|
}, nil
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,6 @@ import (
|
|||||||
"cosmossdk.io/core/appmodule"
|
"cosmossdk.io/core/appmodule"
|
||||||
"cosmossdk.io/core/store"
|
"cosmossdk.io/core/store"
|
||||||
"cosmossdk.io/depinject"
|
"cosmossdk.io/depinject"
|
||||||
"golang.org/x/exp/maps"
|
|
||||||
|
|
||||||
"github.com/cosmos/cosmos-sdk/codec"
|
"github.com/cosmos/cosmos-sdk/codec"
|
||||||
auth "github.com/cosmos/cosmos-sdk/x/auth/keeper"
|
auth "github.com/cosmos/cosmos-sdk/x/auth/keeper"
|
||||||
@ -60,15 +59,14 @@ func InvokeSetBondHooks(
|
|||||||
keeper *keeper.Keeper,
|
keeper *keeper.Keeper,
|
||||||
bondHooks map[string]bond.BondHooksWrapper,
|
bondHooks map[string]bond.BondHooksWrapper,
|
||||||
) error {
|
) error {
|
||||||
// all arguments to invokers are optional
|
// All arguments to invokers are optional
|
||||||
if keeper == nil || config == nil {
|
if keeper == nil || config == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var usageKeepers []bond.BondUsageKeeper
|
usageKeepers := make([]bond.BondUsageKeeper, 0, len(bondHooks))
|
||||||
|
|
||||||
for _, modName := range maps.Keys(bondHooks) {
|
for _, hook := range bondHooks {
|
||||||
hook := bondHooks[modName]
|
|
||||||
usageKeepers = append(usageKeepers, hook)
|
usageKeepers = append(usageKeepers, hook)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ func (AppModule) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingCo
|
|||||||
return data.Validate()
|
return data.Validate()
|
||||||
}
|
}
|
||||||
|
|
||||||
// InitGenesis performs genesis initialization for the checkers module.
|
// InitGenesis performs genesis initialization for the bond module.
|
||||||
// It returns no validator updates.
|
// It returns no validator updates.
|
||||||
func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) {
|
func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) {
|
||||||
var genesisState bond.GenesisState
|
var genesisState bond.GenesisState
|
||||||
|
@ -6,9 +6,7 @@ import (
|
|||||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var _ sdk.Msg = &MsgCreateBond{}
|
||||||
_ sdk.Msg = &MsgCreateBond{}
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewMsgCreateBond is the constructor function for MsgCreateBond.
|
// NewMsgCreateBond is the constructor function for MsgCreateBond.
|
||||||
func NewMsgCreateBond(coins sdk.Coins, signer sdk.AccAddress) MsgCreateBond {
|
func NewMsgCreateBond(coins sdk.Coins, signer sdk.AccAddress) MsgCreateBond {
|
||||||
|
@ -8,7 +8,7 @@ import (
|
|||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Default parameter values.
|
// DefaultMaxBondAmountTokens are the default parameter values.
|
||||||
var DefaultMaxBondAmountTokens = sdkmath.NewInt(100000000000)
|
var DefaultMaxBondAmountTokens = sdkmath.NewInt(100000000000)
|
||||||
|
|
||||||
func NewParams(maxBondAmount sdk.Coin) Params {
|
func NewParams(maxBondAmount sdk.Coin) Params {
|
||||||
|
15
x/onboarding/codec.go
Normal file
15
x/onboarding/codec.go
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
package onboarding
|
||||||
|
|
||||||
|
import (
|
||||||
|
types "github.com/cosmos/cosmos-sdk/codec/types"
|
||||||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
|
"github.com/cosmos/cosmos-sdk/types/msgservice"
|
||||||
|
)
|
||||||
|
|
||||||
|
// RegisterInterfaces registers the interfaces types with the interface registry.
|
||||||
|
func RegisterInterfaces(registry types.InterfaceRegistry) {
|
||||||
|
registry.RegisterImplementations((*sdk.Msg)(nil),
|
||||||
|
&MsgOnboardParticipant{},
|
||||||
|
)
|
||||||
|
msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
|
||||||
|
}
|
11
x/onboarding/events.go
Normal file
11
x/onboarding/events.go
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
package onboarding
|
||||||
|
|
||||||
|
// onboarding module event types
|
||||||
|
|
||||||
|
const (
|
||||||
|
EventTypeOnboardParticipant = "onboard_participant"
|
||||||
|
|
||||||
|
AttributeKeySigner = "signer"
|
||||||
|
AttributeKeyEthAddress = "eth_address"
|
||||||
|
AttributeValueCategory = ModuleName
|
||||||
|
)
|
24
x/onboarding/genesis.go
Normal file
24
x/onboarding/genesis.go
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
package onboarding
|
||||||
|
|
||||||
|
func DefaultGenesisState() *GenesisState {
|
||||||
|
return &GenesisState{
|
||||||
|
Params: DefaultParams(),
|
||||||
|
Participants: []Participant{},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewGenesisState(params Params, participants []Participant) *GenesisState {
|
||||||
|
return &GenesisState{
|
||||||
|
Params: params,
|
||||||
|
Participants: participants,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate performs basic genesis state validation returning an error upon any
|
||||||
|
func (gs *GenesisState) Validate() error {
|
||||||
|
if err := gs.Params.Validate(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
387
x/onboarding/genesis.pb.go
Normal file
387
x/onboarding/genesis.pb.go
Normal file
@ -0,0 +1,387 @@
|
|||||||
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||||
|
// source: cerc/onboarding/v1/genesis.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
|
||||||
|
|
||||||
|
// GenesisState defines the onboarding module's genesis state.
|
||||||
|
type GenesisState struct {
|
||||||
|
// params defines all the parameters of the module.
|
||||||
|
Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
|
||||||
|
// participants defines all the participants
|
||||||
|
Participants []Participant `protobuf:"bytes,2,rep,name=participants,proto3" json:"participants"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *GenesisState) Reset() { *m = GenesisState{} }
|
||||||
|
func (m *GenesisState) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*GenesisState) ProtoMessage() {}
|
||||||
|
func (*GenesisState) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_d21793296c3d9d75, []int{0}
|
||||||
|
}
|
||||||
|
func (m *GenesisState) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_GenesisState.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *GenesisState) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *GenesisState) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_GenesisState.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_GenesisState proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *GenesisState) GetParams() Params {
|
||||||
|
if m != nil {
|
||||||
|
return m.Params
|
||||||
|
}
|
||||||
|
return Params{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *GenesisState) GetParticipants() []Participant {
|
||||||
|
if m != nil {
|
||||||
|
return m.Participants
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
proto.RegisterType((*GenesisState)(nil), "cerc.onboarding.v1.GenesisState")
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() { proto.RegisterFile("cerc/onboarding/v1/genesis.proto", fileDescriptor_d21793296c3d9d75) }
|
||||||
|
|
||||||
|
var fileDescriptor_d21793296c3d9d75 = []byte{
|
||||||
|
// 234 bytes of a gzipped FileDescriptorProto
|
||||||
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x48, 0x4e, 0x2d, 0x4a,
|
||||||
|
0xd6, 0xcf, 0xcf, 0x4b, 0xca, 0x4f, 0x2c, 0x4a, 0xc9, 0xcc, 0x4b, 0xd7, 0x2f, 0x33, 0xd4, 0x4f,
|
||||||
|
0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x02, 0xa9,
|
||||||
|
0xd0, 0x43, 0xa8, 0xd0, 0x2b, 0x33, 0x94, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x4b, 0xeb, 0x83,
|
||||||
|
0x58, 0x10, 0x95, 0x52, 0xca, 0x58, 0xcc, 0x42, 0xd2, 0x07, 0x56, 0xa4, 0x34, 0x99, 0x91, 0x8b,
|
||||||
|
0xc7, 0x1d, 0x62, 0x41, 0x70, 0x49, 0x62, 0x49, 0xaa, 0x90, 0x05, 0x17, 0x5b, 0x41, 0x62, 0x51,
|
||||||
|
0x62, 0x6e, 0xb1, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xb7, 0x91, 0x94, 0x1e, 0xa6, 0x85, 0x7a, 0x01,
|
||||||
|
0x60, 0x15, 0x4e, 0x2c, 0x27, 0xee, 0xc9, 0x33, 0x04, 0x41, 0xd5, 0x0b, 0x79, 0x72, 0xf1, 0x14,
|
||||||
|
0x24, 0x16, 0x95, 0x64, 0x26, 0x67, 0x16, 0x24, 0xe6, 0x95, 0x14, 0x4b, 0x30, 0x29, 0x30, 0x6b,
|
||||||
|
0x70, 0x1b, 0xc9, 0xe3, 0xd0, 0x0f, 0x53, 0x07, 0x35, 0x04, 0x45, 0xab, 0x93, 0xd3, 0x89, 0x47,
|
||||||
|
0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85,
|
||||||
|
0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x69, 0xa4, 0x67, 0x96, 0xe8, 0x95, 0xa5, 0x24,
|
||||||
|
0xe9, 0x95, 0xe4, 0xeb, 0x83, 0x0c, 0xd6, 0xcd, 0xcc, 0xd7, 0xcf, 0x49, 0x4c, 0xce, 0xcf, 0xcb,
|
||||||
|
0x4c, 0x4e, 0xd1, 0xaf, 0x40, 0xf2, 0x5f, 0x12, 0x1b, 0xd8, 0x83, 0xc6, 0x80, 0x00, 0x00, 0x00,
|
||||||
|
0xff, 0xff, 0x90, 0xbd, 0x55, 0xee, 0x53, 0x01, 0x00, 0x00,
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
|
_ = i
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if len(m.Participants) > 0 {
|
||||||
|
for iNdEx := len(m.Participants) - 1; iNdEx >= 0; iNdEx-- {
|
||||||
|
{
|
||||||
|
size, err := m.Participants[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
i -= size
|
||||||
|
i = encodeVarintGenesis(dAtA, i, uint64(size))
|
||||||
|
}
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x12
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
size, err := m.Params.MarshalToSizedBuffer(dAtA[:i])
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
i -= size
|
||||||
|
i = encodeVarintGenesis(dAtA, i, uint64(size))
|
||||||
|
}
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
return len(dAtA) - i, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int {
|
||||||
|
offset -= sovGenesis(v)
|
||||||
|
base := offset
|
||||||
|
for v >= 1<<7 {
|
||||||
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||||||
|
v >>= 7
|
||||||
|
offset++
|
||||||
|
}
|
||||||
|
dAtA[offset] = uint8(v)
|
||||||
|
return base
|
||||||
|
}
|
||||||
|
func (m *GenesisState) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
l = m.Params.Size()
|
||||||
|
n += 1 + l + sovGenesis(uint64(l))
|
||||||
|
if len(m.Participants) > 0 {
|
||||||
|
for _, e := range m.Participants {
|
||||||
|
l = e.Size()
|
||||||
|
n += 1 + l + sovGenesis(uint64(l))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
|
func sovGenesis(x uint64) (n int) {
|
||||||
|
return (math_bits.Len64(x|1) + 6) / 7
|
||||||
|
}
|
||||||
|
func sozGenesis(x uint64) (n int) {
|
||||||
|
return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||||
|
}
|
||||||
|
func (m *GenesisState) 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 ErrIntOverflowGenesis
|
||||||
|
}
|
||||||
|
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: GenesisState: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
case 1:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType)
|
||||||
|
}
|
||||||
|
var msglen int
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowGenesis
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
msglen |= int(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if msglen < 0 {
|
||||||
|
return ErrInvalidLengthGenesis
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + msglen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthGenesis
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
iNdEx = postIndex
|
||||||
|
case 2:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field Participants", wireType)
|
||||||
|
}
|
||||||
|
var msglen int
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowGenesis
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
msglen |= int(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if msglen < 0 {
|
||||||
|
return ErrInvalidLengthGenesis
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + msglen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthGenesis
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
m.Participants = append(m.Participants, Participant{})
|
||||||
|
if err := m.Participants[len(m.Participants)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
iNdEx = postIndex
|
||||||
|
default:
|
||||||
|
iNdEx = preIndex
|
||||||
|
skippy, err := skipGenesis(dAtA[iNdEx:])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||||
|
return ErrInvalidLengthGenesis
|
||||||
|
}
|
||||||
|
if (iNdEx + skippy) > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
iNdEx += skippy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if iNdEx > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func skipGenesis(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, ErrIntOverflowGenesis
|
||||||
|
}
|
||||||
|
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, ErrIntOverflowGenesis
|
||||||
|
}
|
||||||
|
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, ErrIntOverflowGenesis
|
||||||
|
}
|
||||||
|
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, ErrInvalidLengthGenesis
|
||||||
|
}
|
||||||
|
iNdEx += length
|
||||||
|
case 3:
|
||||||
|
depth++
|
||||||
|
case 4:
|
||||||
|
if depth == 0 {
|
||||||
|
return 0, ErrUnexpectedEndOfGroupGenesis
|
||||||
|
}
|
||||||
|
depth--
|
||||||
|
case 5:
|
||||||
|
iNdEx += 4
|
||||||
|
default:
|
||||||
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
||||||
|
}
|
||||||
|
if iNdEx < 0 {
|
||||||
|
return 0, ErrInvalidLengthGenesis
|
||||||
|
}
|
||||||
|
if depth == 0 {
|
||||||
|
return iNdEx, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0, io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling")
|
||||||
|
ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow")
|
||||||
|
ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
|
||||||
|
)
|
43
x/onboarding/keeper/genesis.go
Normal file
43
x/onboarding/keeper/genesis.go
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
package keeper
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"git.vdb.to/cerc-io/laconicd/x/onboarding"
|
||||||
|
)
|
||||||
|
|
||||||
|
// InitGenesis initializes the module state from a genesis state.
|
||||||
|
func (k *Keeper) InitGenesis(ctx context.Context, data *onboarding.GenesisState) error {
|
||||||
|
if err := k.Params.Set(ctx, data.Params); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, participant := range data.Participants {
|
||||||
|
if err := k.Participants.Set(ctx, participant.CosmosAddress, participant); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ExportGenesis exports the module state to a genesis state.
|
||||||
|
func (k *Keeper) ExportGenesis(ctx context.Context) (*onboarding.GenesisState, error) {
|
||||||
|
params, err := k.Params.Get(ctx)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
var participants []onboarding.Participant
|
||||||
|
if err := k.Participants.Walk(ctx, nil, func(cosmosAddress string, participant onboarding.Participant) (bool, error) {
|
||||||
|
participants = append(participants, participant)
|
||||||
|
return false, nil
|
||||||
|
}); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return &onboarding.GenesisState{
|
||||||
|
Params: params,
|
||||||
|
Participants: participants,
|
||||||
|
}, nil
|
||||||
|
}
|
136
x/onboarding/keeper/keeper.go
Normal file
136
x/onboarding/keeper/keeper.go
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
package keeper
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
|
||||||
|
"cosmossdk.io/collections"
|
||||||
|
"cosmossdk.io/core/address"
|
||||||
|
storetypes "cosmossdk.io/core/store"
|
||||||
|
errorsmod "cosmossdk.io/errors"
|
||||||
|
"cosmossdk.io/log"
|
||||||
|
|
||||||
|
"github.com/cosmos/cosmos-sdk/codec"
|
||||||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
|
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||||
|
|
||||||
|
"git.vdb.to/cerc-io/laconicd/utils"
|
||||||
|
onboardingTypes "git.vdb.to/cerc-io/laconicd/x/onboarding"
|
||||||
|
)
|
||||||
|
|
||||||
|
type Keeper struct {
|
||||||
|
cdc codec.BinaryCodec
|
||||||
|
addressCodec address.Codec
|
||||||
|
|
||||||
|
// authority is the address capable of executing a MsgUpdateParams and other authority-gated message.
|
||||||
|
// typically, this should be the x/gov module account.
|
||||||
|
authority string
|
||||||
|
|
||||||
|
// state management
|
||||||
|
Schema collections.Schema
|
||||||
|
Params collections.Item[onboardingTypes.Params]
|
||||||
|
Participants collections.Map[string, onboardingTypes.Participant]
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewKeeper creates a new Keeper instance
|
||||||
|
func NewKeeper(cdc codec.BinaryCodec, addressCodec address.Codec, storeService storetypes.KVStoreService, authority string) *Keeper {
|
||||||
|
if _, err := addressCodec.StringToBytes(authority); err != nil {
|
||||||
|
panic(fmt.Errorf("invalid authority address: %w", err))
|
||||||
|
}
|
||||||
|
|
||||||
|
sb := collections.NewSchemaBuilder(storeService)
|
||||||
|
k := Keeper{
|
||||||
|
cdc: cdc,
|
||||||
|
addressCodec: addressCodec,
|
||||||
|
authority: authority,
|
||||||
|
Params: collections.NewItem(sb, onboardingTypes.ParamsPrefix, "params", codec.CollValue[onboardingTypes.Params](cdc)),
|
||||||
|
Participants: collections.NewMap(
|
||||||
|
sb, onboardingTypes.ParticipantsPrefix, "participants", collections.StringKey, codec.CollValue[onboardingTypes.Participant](cdc),
|
||||||
|
),
|
||||||
|
}
|
||||||
|
|
||||||
|
schema, err := sb.Build()
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
k.Schema = schema
|
||||||
|
|
||||||
|
return &k
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetAuthority returns the module's authority.
|
||||||
|
func (k Keeper) GetAuthority() string {
|
||||||
|
return k.authority
|
||||||
|
}
|
||||||
|
|
||||||
|
func (k Keeper) Logger(ctx sdk.Context) log.Logger {
|
||||||
|
return ctx.Logger().With("module", onboardingTypes.ModuleName)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (k Keeper) OnboardParticipant(
|
||||||
|
ctx sdk.Context,
|
||||||
|
msg *onboardingTypes.MsgOnboardParticipant,
|
||||||
|
signerAddress sdk.AccAddress,
|
||||||
|
) (*onboardingTypes.MsgOnboardParticipantResponse, error) {
|
||||||
|
params, err := k.Params.Get(ctx)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if !params.OnboardingEnabled {
|
||||||
|
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Validator onboarding is disabled")
|
||||||
|
}
|
||||||
|
|
||||||
|
message, err := json.Marshal(msg.EthPayload)
|
||||||
|
if err != nil {
|
||||||
|
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid format for payload")
|
||||||
|
}
|
||||||
|
|
||||||
|
// Decode eth address from signature which should be the nitro address of the participant
|
||||||
|
nitroAddress, err := utils.DecodeEthereumAddress(message, msg.EthSignature)
|
||||||
|
if err != nil {
|
||||||
|
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Failed to decode Ethereum address")
|
||||||
|
}
|
||||||
|
|
||||||
|
if nitroAddress != msg.EthPayload.Address {
|
||||||
|
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Recovered ethereum address does not match the address set in payload")
|
||||||
|
}
|
||||||
|
|
||||||
|
participant := &onboardingTypes.Participant{
|
||||||
|
CosmosAddress: signerAddress.String(),
|
||||||
|
NitroAddress: nitroAddress,
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := k.StoreParticipant(ctx, participant); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return &onboardingTypes.MsgOnboardParticipantResponse{}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (k Keeper) StoreParticipant(ctx sdk.Context, participant *onboardingTypes.Participant) error {
|
||||||
|
key := participant.CosmosAddress
|
||||||
|
return k.Participants.Set(ctx, key, *participant)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ListParticipants - get all participants.
|
||||||
|
func (k Keeper) ListParticipants(ctx sdk.Context) ([]*onboardingTypes.Participant, error) {
|
||||||
|
var participants []*onboardingTypes.Participant
|
||||||
|
|
||||||
|
iter, err := k.Participants.Iterate(ctx, nil)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
for ; iter.Valid(); iter.Next() {
|
||||||
|
participant, err := iter.Value()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
participants = append(participants, &participant)
|
||||||
|
}
|
||||||
|
|
||||||
|
return participants, nil
|
||||||
|
}
|
57
x/onboarding/keeper/msg_server.go
Normal file
57
x/onboarding/keeper/msg_server.go
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
package keeper
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
|
|
||||||
|
"git.vdb.to/cerc-io/laconicd/utils"
|
||||||
|
"git.vdb.to/cerc-io/laconicd/x/onboarding"
|
||||||
|
)
|
||||||
|
|
||||||
|
type msgServer struct {
|
||||||
|
k Keeper
|
||||||
|
}
|
||||||
|
|
||||||
|
var _ onboarding.MsgServer = msgServer{}
|
||||||
|
|
||||||
|
// NewMsgServerImpl returns an implementation of the module MsgServer interface.
|
||||||
|
func NewMsgServerImpl(keeper *Keeper) onboarding.MsgServer {
|
||||||
|
return &msgServer{k: *keeper}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ms msgServer) OnboardParticipant(c context.Context, msg *onboarding.MsgOnboardParticipant) (*onboarding.MsgOnboardParticipantResponse, error) {
|
||||||
|
if err := msg.ValidateBasic(); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx := sdk.UnwrapSDKContext(c)
|
||||||
|
ctx = *utils.CtxWithCustomKVGasConfig(&ctx)
|
||||||
|
|
||||||
|
signerAddress, err := sdk.AccAddressFromBech32(msg.Participant)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
_, err = ms.k.OnboardParticipant(ctx, msg, signerAddress)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx.EventManager().EmitEvents(sdk.Events{
|
||||||
|
sdk.NewEvent(
|
||||||
|
onboarding.EventTypeOnboardParticipant,
|
||||||
|
sdk.NewAttribute(onboarding.AttributeKeySigner, msg.Participant),
|
||||||
|
sdk.NewAttribute(onboarding.AttributeKeyEthAddress, msg.EthPayload.Address),
|
||||||
|
),
|
||||||
|
sdk.NewEvent(
|
||||||
|
sdk.EventTypeMessage,
|
||||||
|
sdk.NewAttribute(sdk.AttributeKeyModule, onboarding.AttributeValueCategory),
|
||||||
|
sdk.NewAttribute(onboarding.AttributeKeySigner, msg.Participant),
|
||||||
|
),
|
||||||
|
})
|
||||||
|
|
||||||
|
utils.LogTxGasConsumed(ctx, ms.k.Logger(ctx), "OnboardParticipant")
|
||||||
|
|
||||||
|
return &onboarding.MsgOnboardParticipantResponse{}, nil
|
||||||
|
}
|
35
x/onboarding/keeper/query_server.go
Normal file
35
x/onboarding/keeper/query_server.go
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
package keeper
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
|
|
||||||
|
onboardingtypes "git.vdb.to/cerc-io/laconicd/x/onboarding"
|
||||||
|
)
|
||||||
|
|
||||||
|
var _ onboardingtypes.QueryServer = queryServer{}
|
||||||
|
|
||||||
|
type queryServer struct {
|
||||||
|
k *Keeper
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewQueryServerImpl returns an implementation of the module QueryServer.
|
||||||
|
func NewQueryServerImpl(k *Keeper) onboardingtypes.QueryServer {
|
||||||
|
return queryServer{k}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Participants implements Participants.QueryServer.
|
||||||
|
func (qs queryServer) Participants(
|
||||||
|
c context.Context,
|
||||||
|
_ *onboardingtypes.QueryParticipantsRequest,
|
||||||
|
) (*onboardingtypes.QueryParticipantsResponse, error) {
|
||||||
|
ctx := sdk.UnwrapSDKContext(c)
|
||||||
|
|
||||||
|
resp, err := qs.k.ListParticipants(ctx)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return &onboardingtypes.QueryParticipantsResponse{Participants: resp}, nil
|
||||||
|
}
|
16
x/onboarding/keys.go
Normal file
16
x/onboarding/keys.go
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
package onboarding
|
||||||
|
|
||||||
|
import "cosmossdk.io/collections"
|
||||||
|
|
||||||
|
const (
|
||||||
|
ModuleName = "onboarding"
|
||||||
|
|
||||||
|
// StoreKey defines the primary module store key
|
||||||
|
StoreKey = ModuleName
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
ParamsPrefix = collections.NewPrefix(0)
|
||||||
|
|
||||||
|
ParticipantsPrefix = collections.NewPrefix(1)
|
||||||
|
)
|
39
x/onboarding/module/autocli.go
Normal file
39
x/onboarding/module/autocli.go
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
package module
|
||||||
|
|
||||||
|
import (
|
||||||
|
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
|
||||||
|
|
||||||
|
onboardingv1 "git.vdb.to/cerc-io/laconicd/api/cerc/onboarding/v1"
|
||||||
|
)
|
||||||
|
|
||||||
|
// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface.
|
||||||
|
func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
||||||
|
return &autocliv1.ModuleOptions{
|
||||||
|
Query: &autocliv1.ServiceCommandDescriptor{
|
||||||
|
Service: onboardingv1.Query_ServiceDesc.ServiceName,
|
||||||
|
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
|
||||||
|
{
|
||||||
|
RpcMethod: "Participants",
|
||||||
|
Use: "list",
|
||||||
|
Short: "List participants",
|
||||||
|
PositionalArgs: []*autocliv1.PositionalArgDescriptor{},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// TODO: Use JSON file for input
|
||||||
|
Tx: &autocliv1.ServiceCommandDescriptor{
|
||||||
|
Service: onboardingv1.Msg_ServiceDesc.ServiceName,
|
||||||
|
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
|
||||||
|
{
|
||||||
|
RpcMethod: "OnboardParticipant",
|
||||||
|
Use: "enroll",
|
||||||
|
Short: "Enroll a testnet validator",
|
||||||
|
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
||||||
|
{ProtoField: "eth_payload"},
|
||||||
|
{ProtoField: "eth_signature"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
59
x/onboarding/module/depinject.go
Normal file
59
x/onboarding/module/depinject.go
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
package module
|
||||||
|
|
||||||
|
import (
|
||||||
|
"cosmossdk.io/core/address"
|
||||||
|
"cosmossdk.io/core/appmodule"
|
||||||
|
"cosmossdk.io/core/store"
|
||||||
|
"cosmossdk.io/depinject"
|
||||||
|
|
||||||
|
"github.com/cosmos/cosmos-sdk/codec"
|
||||||
|
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
||||||
|
|
||||||
|
modulev1 "git.vdb.to/cerc-io/laconicd/api/cerc/onboarding/module/v1"
|
||||||
|
"git.vdb.to/cerc-io/laconicd/x/onboarding/keeper"
|
||||||
|
)
|
||||||
|
|
||||||
|
var _ appmodule.AppModule = AppModule{}
|
||||||
|
|
||||||
|
// IsOnePerModuleType implements the depinject.OnePerModuleType interface.
|
||||||
|
func (am AppModule) IsOnePerModuleType() {}
|
||||||
|
|
||||||
|
// IsAppModule implements the appmodule.AppModule interface.
|
||||||
|
func (am AppModule) IsAppModule() {}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
appmodule.Register(
|
||||||
|
&modulev1.Module{},
|
||||||
|
appmodule.Provide(ProvideModule),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
type ModuleInputs struct {
|
||||||
|
depinject.In
|
||||||
|
|
||||||
|
Cdc codec.Codec
|
||||||
|
StoreService store.KVStoreService
|
||||||
|
AddressCodec address.Codec
|
||||||
|
|
||||||
|
Config *modulev1.Module
|
||||||
|
}
|
||||||
|
|
||||||
|
type ModuleOutputs struct {
|
||||||
|
depinject.Out
|
||||||
|
|
||||||
|
Module appmodule.AppModule
|
||||||
|
Keeper *keeper.Keeper
|
||||||
|
}
|
||||||
|
|
||||||
|
func ProvideModule(in ModuleInputs) ModuleOutputs {
|
||||||
|
// default to governance as authority if not provided
|
||||||
|
authority := authtypes.NewModuleAddress("gov")
|
||||||
|
if in.Config.Authority != "" {
|
||||||
|
authority = authtypes.NewModuleAddressOrBech32Address(in.Config.Authority)
|
||||||
|
}
|
||||||
|
|
||||||
|
k := keeper.NewKeeper(in.Cdc, in.AddressCodec, in.StoreService, authority.String())
|
||||||
|
m := NewAppModule(in.Cdc, k)
|
||||||
|
|
||||||
|
return ModuleOutputs{Module: m, Keeper: k}
|
||||||
|
}
|
117
x/onboarding/module/module.go
Normal file
117
x/onboarding/module/module.go
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
package module
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
|
||||||
|
"cosmossdk.io/core/appmodule"
|
||||||
|
gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime"
|
||||||
|
|
||||||
|
"github.com/cosmos/cosmos-sdk/client"
|
||||||
|
"github.com/cosmos/cosmos-sdk/codec"
|
||||||
|
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
|
"github.com/cosmos/cosmos-sdk/types/module"
|
||||||
|
|
||||||
|
"git.vdb.to/cerc-io/laconicd/x/onboarding"
|
||||||
|
"git.vdb.to/cerc-io/laconicd/x/onboarding/keeper"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
_ module.AppModuleBasic = AppModule{}
|
||||||
|
_ module.HasGenesis = AppModule{}
|
||||||
|
_ appmodule.AppModule = AppModule{}
|
||||||
|
)
|
||||||
|
|
||||||
|
// ConsensusVersion defines the current module consensus version.
|
||||||
|
const ConsensusVersion = 1
|
||||||
|
|
||||||
|
type AppModule struct {
|
||||||
|
cdc codec.Codec
|
||||||
|
keeper *keeper.Keeper
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewAppModule creates a new AppModule object
|
||||||
|
func NewAppModule(cdc codec.Codec, keeper *keeper.Keeper) AppModule {
|
||||||
|
return AppModule{
|
||||||
|
cdc: cdc,
|
||||||
|
keeper: keeper,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewAppModuleBasic(m AppModule) module.AppModuleBasic {
|
||||||
|
return module.CoreAppModuleBasicAdaptor(m.Name(), m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Name returns the onboarding module's name.
|
||||||
|
func (AppModule) Name() string { return onboarding.ModuleName }
|
||||||
|
|
||||||
|
// RegisterLegacyAminoCodec registers the onboarding module's types on the LegacyAmino codec.
|
||||||
|
// New modules do not need to support Amino.
|
||||||
|
func (AppModule) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {}
|
||||||
|
|
||||||
|
// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the onboarding module.
|
||||||
|
func (AppModule) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *gwruntime.ServeMux) {
|
||||||
|
if err := onboarding.RegisterQueryHandlerClient(context.Background(), mux, onboarding.NewQueryClient(clientCtx)); err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// RegisterInterfaces registers interfaces and implementations of the onboarding module.
|
||||||
|
func (AppModule) RegisterInterfaces(registry codectypes.InterfaceRegistry) {
|
||||||
|
onboarding.RegisterInterfaces(registry)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ConsensusVersion implements AppModule/ConsensusVersion.
|
||||||
|
func (AppModule) ConsensusVersion() uint64 { return ConsensusVersion }
|
||||||
|
|
||||||
|
// RegisterServices registers a gRPC query service to respond to the module-specific gRPC queries.
|
||||||
|
func (am AppModule) RegisterServices(cfg module.Configurator) {
|
||||||
|
// Register servers
|
||||||
|
onboarding.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper))
|
||||||
|
onboarding.RegisterQueryServer(cfg.QueryServer(), keeper.NewQueryServerImpl(am.keeper))
|
||||||
|
|
||||||
|
// Register in place module state migration migrations
|
||||||
|
// m := keeper.NewMigrator(am.keeper)
|
||||||
|
// if err := cfg.RegisterMigration(onboarding.ModuleName, 1, m.Migrate1to2); err != nil {
|
||||||
|
// panic(fmt.Sprintf("failed to migrate x/%s from version 1 to 2: %v", onboarding.ModuleName, err))
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
// DefaultGenesis returns default genesis state as raw bytes for the module.
|
||||||
|
func (AppModule) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage {
|
||||||
|
return cdc.MustMarshalJSON(onboarding.DefaultGenesisState())
|
||||||
|
}
|
||||||
|
|
||||||
|
// ValidateGenesis performs genesis state validation for the circuit module.
|
||||||
|
func (AppModule) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error {
|
||||||
|
var data onboarding.GenesisState
|
||||||
|
if err := cdc.UnmarshalJSON(bz, &data); err != nil {
|
||||||
|
return fmt.Errorf("failed to unmarshal %s genesis state: %w", onboarding.ModuleName, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
return data.Validate()
|
||||||
|
}
|
||||||
|
|
||||||
|
// InitGenesis performs genesis initialization for the onboarding module.
|
||||||
|
// It returns no validator updates.
|
||||||
|
func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) {
|
||||||
|
var genesisState onboarding.GenesisState
|
||||||
|
cdc.MustUnmarshalJSON(data, &genesisState)
|
||||||
|
|
||||||
|
if err := am.keeper.InitGenesis(ctx, &genesisState); err != nil {
|
||||||
|
panic(fmt.Sprintf("failed to initialize %s genesis state: %v", onboarding.ModuleName, err))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ExportGenesis returns the exported genesis state as raw bytes for the circuit
|
||||||
|
// module.
|
||||||
|
func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage {
|
||||||
|
gs, err := am.keeper.ExportGenesis(ctx)
|
||||||
|
if err != nil {
|
||||||
|
panic(fmt.Sprintf("failed to export %s genesis state: %v", onboarding.ModuleName, err))
|
||||||
|
}
|
||||||
|
|
||||||
|
return cdc.MustMarshalJSON(gs)
|
||||||
|
}
|
25
x/onboarding/msgs.go
Normal file
25
x/onboarding/msgs.go
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
package onboarding
|
||||||
|
|
||||||
|
import (
|
||||||
|
errorsmod "cosmossdk.io/errors"
|
||||||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
|
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||||
|
)
|
||||||
|
|
||||||
|
var _ sdk.Msg = &MsgOnboardParticipant{}
|
||||||
|
|
||||||
|
func (msg MsgOnboardParticipant) ValidateBasic() error {
|
||||||
|
if len(msg.Participant) == 0 {
|
||||||
|
return errorsmod.Wrap(sdkerrors.ErrorInvalidSigner, msg.Participant)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(msg.EthPayload.Address) != 42 {
|
||||||
|
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, msg.Participant)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(msg.EthSignature) != 132 {
|
||||||
|
return errorsmod.Wrap(sdkerrors.ErrNoSignatures, "Invalid signature.")
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
765
x/onboarding/onboarding.pb.go
Normal file
765
x/onboarding/onboarding.pb.go
Normal file
@ -0,0 +1,765 @@
|
|||||||
|
// 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")
|
||||||
|
)
|
14
x/onboarding/params.go
Normal file
14
x/onboarding/params.go
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
package onboarding
|
||||||
|
|
||||||
|
// DefaultParams returns default module parameters.
|
||||||
|
func DefaultParams() Params {
|
||||||
|
return Params{
|
||||||
|
// Set default values here.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate does the sanity check on the params.
|
||||||
|
func (p Params) Validate() error {
|
||||||
|
// Sanity check goes here.
|
||||||
|
return nil
|
||||||
|
}
|
672
x/onboarding/query.pb.go
Normal file
672
x/onboarding/query.pb.go
Normal file
@ -0,0 +1,672 @@
|
|||||||
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||||
|
// source: cerc/onboarding/v1/query.proto
|
||||||
|
|
||||||
|
package onboarding
|
||||||
|
|
||||||
|
import (
|
||||||
|
context "context"
|
||||||
|
fmt "fmt"
|
||||||
|
query "github.com/cosmos/cosmos-sdk/types/query"
|
||||||
|
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||||
|
grpc1 "github.com/cosmos/gogoproto/grpc"
|
||||||
|
proto "github.com/cosmos/gogoproto/proto"
|
||||||
|
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||||
|
grpc "google.golang.org/grpc"
|
||||||
|
codes "google.golang.org/grpc/codes"
|
||||||
|
status "google.golang.org/grpc/status"
|
||||||
|
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
|
||||||
|
|
||||||
|
// QueryParticipantsRequest queries participants
|
||||||
|
type QueryParticipantsRequest struct {
|
||||||
|
// pagination defines an optional pagination for the request.
|
||||||
|
Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryParticipantsRequest) Reset() { *m = QueryParticipantsRequest{} }
|
||||||
|
func (m *QueryParticipantsRequest) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*QueryParticipantsRequest) ProtoMessage() {}
|
||||||
|
func (*QueryParticipantsRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_80831d904221d27d, []int{0}
|
||||||
|
}
|
||||||
|
func (m *QueryParticipantsRequest) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *QueryParticipantsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_QueryParticipantsRequest.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 *QueryParticipantsRequest) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_QueryParticipantsRequest.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *QueryParticipantsRequest) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *QueryParticipantsRequest) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_QueryParticipantsRequest.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_QueryParticipantsRequest proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *QueryParticipantsRequest) GetPagination() *query.PageRequest {
|
||||||
|
if m != nil {
|
||||||
|
return m.Pagination
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryParticipantsResponse is response type for get the participants
|
||||||
|
type QueryParticipantsResponse struct {
|
||||||
|
Participants []*Participant `protobuf:"bytes,1,rep,name=participants,proto3" json:"participants,omitempty" json:"participants" yaml:"participants"`
|
||||||
|
// pagination defines the pagination in the response.
|
||||||
|
Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryParticipantsResponse) Reset() { *m = QueryParticipantsResponse{} }
|
||||||
|
func (m *QueryParticipantsResponse) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*QueryParticipantsResponse) ProtoMessage() {}
|
||||||
|
func (*QueryParticipantsResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_80831d904221d27d, []int{1}
|
||||||
|
}
|
||||||
|
func (m *QueryParticipantsResponse) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *QueryParticipantsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_QueryParticipantsResponse.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 *QueryParticipantsResponse) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_QueryParticipantsResponse.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *QueryParticipantsResponse) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *QueryParticipantsResponse) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_QueryParticipantsResponse.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_QueryParticipantsResponse proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *QueryParticipantsResponse) GetParticipants() []*Participant {
|
||||||
|
if m != nil {
|
||||||
|
return m.Participants
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryParticipantsResponse) GetPagination() *query.PageResponse {
|
||||||
|
if m != nil {
|
||||||
|
return m.Pagination
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
proto.RegisterType((*QueryParticipantsRequest)(nil), "cerc.onboarding.v1.QueryParticipantsRequest")
|
||||||
|
proto.RegisterType((*QueryParticipantsResponse)(nil), "cerc.onboarding.v1.QueryParticipantsResponse")
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() { proto.RegisterFile("cerc/onboarding/v1/query.proto", fileDescriptor_80831d904221d27d) }
|
||||||
|
|
||||||
|
var fileDescriptor_80831d904221d27d = []byte{
|
||||||
|
// 380 bytes of a gzipped FileDescriptorProto
|
||||||
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xbf, 0x6a, 0x1b, 0x31,
|
||||||
|
0x1c, 0xc7, 0x2d, 0x97, 0x76, 0x90, 0x3d, 0x89, 0x0e, 0xae, 0x29, 0xe7, 0xe3, 0x0a, 0xf5, 0xd1,
|
||||||
|
0xd6, 0x12, 0xe7, 0x6e, 0x1d, 0x3d, 0xb4, 0xab, 0xeb, 0xb1, 0x9b, 0xee, 0x2c, 0x84, 0x8a, 0xad,
|
||||||
|
0xdf, 0xf9, 0x24, 0x1f, 0xf5, 0xda, 0x27, 0x28, 0x94, 0xce, 0x7d, 0x9d, 0x8c, 0x86, 0x40, 0xc8,
|
||||||
|
0x14, 0x82, 0x9d, 0x27, 0xc8, 0x13, 0x84, 0x3b, 0x19, 0x2c, 0x27, 0x17, 0x92, 0x4d, 0xe8, 0xf7,
|
||||||
|
0xfb, 0xfe, 0xf9, 0x08, 0xe1, 0x20, 0x13, 0x45, 0xc6, 0x40, 0xa7, 0xc0, 0x8b, 0xb9, 0xd2, 0x92,
|
||||||
|
0x95, 0x09, 0x5b, 0xad, 0x45, 0xb1, 0xa1, 0x79, 0x01, 0x16, 0x08, 0xa9, 0xe6, 0xf4, 0x38, 0xa7,
|
||||||
|
0x65, 0xd2, 0x7f, 0x2d, 0x41, 0x42, 0x3d, 0x66, 0xd5, 0xc9, 0x6d, 0xf6, 0x3f, 0x64, 0x60, 0x96,
|
||||||
|
0x60, 0x58, 0xca, 0x8d, 0x70, 0x16, 0xac, 0x4c, 0x52, 0x61, 0x79, 0xc2, 0x72, 0x2e, 0x95, 0xe6,
|
||||||
|
0x56, 0x81, 0x3e, 0xec, 0xbe, 0x6b, 0x48, 0xf5, 0x32, 0xdc, 0xd2, 0x5b, 0x09, 0x20, 0x17, 0x82,
|
||||||
|
0xf1, 0x5c, 0x31, 0xae, 0x35, 0xd8, 0xda, 0xc1, 0xb8, 0x69, 0x94, 0xe2, 0xde, 0xf7, 0x2a, 0x64,
|
||||||
|
0xca, 0x0b, 0xab, 0x32, 0x95, 0x73, 0x6d, 0xcd, 0x4c, 0xac, 0xd6, 0xc2, 0x58, 0xf2, 0x15, 0xe3,
|
||||||
|
0x63, 0x64, 0x0f, 0x85, 0x28, 0xee, 0x8c, 0xdf, 0x53, 0xd7, 0x8f, 0x56, 0xfd, 0xa8, 0x43, 0x3c,
|
||||||
|
0xf4, 0xa3, 0x53, 0x2e, 0xc5, 0x41, 0x3b, 0xf3, 0x94, 0xd1, 0x05, 0xc2, 0x6f, 0x1a, 0x42, 0x4c,
|
||||||
|
0x0e, 0xda, 0x08, 0x92, 0xe3, 0x6e, 0xee, 0xdd, 0xf7, 0x50, 0xf8, 0x22, 0xee, 0x8c, 0x07, 0xf4,
|
||||||
|
0xe1, 0x8b, 0x51, 0x4f, 0x3f, 0xf9, 0x78, 0x7b, 0x35, 0x18, 0xfe, 0x34, 0xa0, 0xbf, 0x44, 0xbe,
|
||||||
|
0x3c, 0x0a, 0x37, 0x7c, 0xb9, 0xb8, 0x77, 0x37, 0x3b, 0x49, 0x20, 0xdf, 0x4e, 0xb8, 0xda, 0x35,
|
||||||
|
0xd7, 0xf0, 0x49, 0x2e, 0x57, 0xd7, 0x07, 0x1b, 0xff, 0x47, 0xf8, 0x65, 0x0d, 0x46, 0xfe, 0x21,
|
||||||
|
0xdc, 0xf5, 0xe9, 0xc8, 0xa7, 0xa6, 0xfe, 0x8f, 0xbd, 0x74, 0x7f, 0xf4, 0xcc, 0x6d, 0xd7, 0x21,
|
||||||
|
0x8a, 0x7f, 0x9f, 0xdf, 0xfc, 0x6d, 0x47, 0x24, 0x64, 0x0d, 0x1f, 0xc0, 0x47, 0x9d, 0x4c, 0xce,
|
||||||
|
0x76, 0x01, 0xda, 0xee, 0x02, 0x74, 0xbd, 0x0b, 0xd0, 0x9f, 0x7d, 0xd0, 0xda, 0xee, 0x83, 0xd6,
|
||||||
|
0xe5, 0x3e, 0x68, 0xfd, 0x88, 0xa5, 0xb2, 0xb4, 0x9c, 0xa7, 0xd4, 0x42, 0xed, 0x32, 0x52, 0xc0,
|
||||||
|
0x16, 0x3c, 0x03, 0xad, 0xb2, 0x39, 0xfb, 0xe5, 0x79, 0xa6, 0xaf, 0xea, 0x9f, 0xf2, 0xf9, 0x2e,
|
||||||
|
0x00, 0x00, 0xff, 0xff, 0x3b, 0xb7, 0xca, 0x13, 0xe4, 0x02, 0x00, 0x00,
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
|
var _ context.Context
|
||||||
|
var _ grpc.ClientConn
|
||||||
|
|
||||||
|
// This is a compile-time assertion to ensure that this generated file
|
||||||
|
// is compatible with the grpc package it is being compiled against.
|
||||||
|
const _ = grpc.SupportPackageIsVersion4
|
||||||
|
|
||||||
|
// QueryClient is the client API for Query service.
|
||||||
|
//
|
||||||
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||||
|
type QueryClient interface {
|
||||||
|
// Participants queries Participants list
|
||||||
|
Participants(ctx context.Context, in *QueryParticipantsRequest, opts ...grpc.CallOption) (*QueryParticipantsResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type queryClient struct {
|
||||||
|
cc grpc1.ClientConn
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewQueryClient(cc grpc1.ClientConn) QueryClient {
|
||||||
|
return &queryClient{cc}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *queryClient) Participants(ctx context.Context, in *QueryParticipantsRequest, opts ...grpc.CallOption) (*QueryParticipantsResponse, error) {
|
||||||
|
out := new(QueryParticipantsResponse)
|
||||||
|
err := c.cc.Invoke(ctx, "/cerc.onboarding.v1.Query/Participants", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryServer is the server API for Query service.
|
||||||
|
type QueryServer interface {
|
||||||
|
// Participants queries Participants list
|
||||||
|
Participants(context.Context, *QueryParticipantsRequest) (*QueryParticipantsResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnimplementedQueryServer can be embedded to have forward compatible implementations.
|
||||||
|
type UnimplementedQueryServer struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UnimplementedQueryServer) Participants(ctx context.Context, req *QueryParticipantsRequest) (*QueryParticipantsResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method Participants not implemented")
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterQueryServer(s grpc1.Server, srv QueryServer) {
|
||||||
|
s.RegisterService(&_Query_serviceDesc, srv)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Query_Participants_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(QueryParticipantsRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(QueryServer).Participants(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/cerc.onboarding.v1.Query/Participants",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(QueryServer).Participants(ctx, req.(*QueryParticipantsRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
var _Query_serviceDesc = grpc.ServiceDesc{
|
||||||
|
ServiceName: "cerc.onboarding.v1.Query",
|
||||||
|
HandlerType: (*QueryServer)(nil),
|
||||||
|
Methods: []grpc.MethodDesc{
|
||||||
|
{
|
||||||
|
MethodName: "Participants",
|
||||||
|
Handler: _Query_Participants_Handler,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Streams: []grpc.StreamDesc{},
|
||||||
|
Metadata: "cerc/onboarding/v1/query.proto",
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryParticipantsRequest) 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 *QueryParticipantsRequest) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryParticipantsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
|
_ = i
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if m.Pagination != nil {
|
||||||
|
{
|
||||||
|
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
i -= size
|
||||||
|
i = encodeVarintQuery(dAtA, i, uint64(size))
|
||||||
|
}
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
}
|
||||||
|
return len(dAtA) - i, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryParticipantsResponse) 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 *QueryParticipantsResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryParticipantsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
|
_ = i
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if m.Pagination != nil {
|
||||||
|
{
|
||||||
|
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
i -= size
|
||||||
|
i = encodeVarintQuery(dAtA, i, uint64(size))
|
||||||
|
}
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x12
|
||||||
|
}
|
||||||
|
if len(m.Participants) > 0 {
|
||||||
|
for iNdEx := len(m.Participants) - 1; iNdEx >= 0; iNdEx-- {
|
||||||
|
{
|
||||||
|
size, err := m.Participants[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
i -= size
|
||||||
|
i = encodeVarintQuery(dAtA, i, uint64(size))
|
||||||
|
}
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return len(dAtA) - i, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func encodeVarintQuery(dAtA []byte, offset int, v uint64) int {
|
||||||
|
offset -= sovQuery(v)
|
||||||
|
base := offset
|
||||||
|
for v >= 1<<7 {
|
||||||
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||||||
|
v >>= 7
|
||||||
|
offset++
|
||||||
|
}
|
||||||
|
dAtA[offset] = uint8(v)
|
||||||
|
return base
|
||||||
|
}
|
||||||
|
func (m *QueryParticipantsRequest) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if m.Pagination != nil {
|
||||||
|
l = m.Pagination.Size()
|
||||||
|
n += 1 + l + sovQuery(uint64(l))
|
||||||
|
}
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryParticipantsResponse) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if len(m.Participants) > 0 {
|
||||||
|
for _, e := range m.Participants {
|
||||||
|
l = e.Size()
|
||||||
|
n += 1 + l + sovQuery(uint64(l))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if m.Pagination != nil {
|
||||||
|
l = m.Pagination.Size()
|
||||||
|
n += 1 + l + sovQuery(uint64(l))
|
||||||
|
}
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
|
func sovQuery(x uint64) (n int) {
|
||||||
|
return (math_bits.Len64(x|1) + 6) / 7
|
||||||
|
}
|
||||||
|
func sozQuery(x uint64) (n int) {
|
||||||
|
return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||||
|
}
|
||||||
|
func (m *QueryParticipantsRequest) 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 ErrIntOverflowQuery
|
||||||
|
}
|
||||||
|
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: QueryParticipantsRequest: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return fmt.Errorf("proto: QueryParticipantsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
case 1:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
|
||||||
|
}
|
||||||
|
var msglen int
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowQuery
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
msglen |= int(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if msglen < 0 {
|
||||||
|
return ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + msglen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
if m.Pagination == nil {
|
||||||
|
m.Pagination = &query.PageRequest{}
|
||||||
|
}
|
||||||
|
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
iNdEx = postIndex
|
||||||
|
default:
|
||||||
|
iNdEx = preIndex
|
||||||
|
skippy, err := skipQuery(dAtA[iNdEx:])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||||
|
return ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
if (iNdEx + skippy) > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
iNdEx += skippy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if iNdEx > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (m *QueryParticipantsResponse) 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 ErrIntOverflowQuery
|
||||||
|
}
|
||||||
|
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: QueryParticipantsResponse: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return fmt.Errorf("proto: QueryParticipantsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
case 1:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field Participants", wireType)
|
||||||
|
}
|
||||||
|
var msglen int
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowQuery
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
msglen |= int(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if msglen < 0 {
|
||||||
|
return ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + msglen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
m.Participants = append(m.Participants, &Participant{})
|
||||||
|
if err := m.Participants[len(m.Participants)-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 Pagination", wireType)
|
||||||
|
}
|
||||||
|
var msglen int
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowQuery
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
msglen |= int(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if msglen < 0 {
|
||||||
|
return ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + msglen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
if m.Pagination == nil {
|
||||||
|
m.Pagination = &query.PageResponse{}
|
||||||
|
}
|
||||||
|
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
iNdEx = postIndex
|
||||||
|
default:
|
||||||
|
iNdEx = preIndex
|
||||||
|
skippy, err := skipQuery(dAtA[iNdEx:])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||||
|
return ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
if (iNdEx + skippy) > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
iNdEx += skippy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if iNdEx > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func skipQuery(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, ErrIntOverflowQuery
|
||||||
|
}
|
||||||
|
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, ErrIntOverflowQuery
|
||||||
|
}
|
||||||
|
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, ErrIntOverflowQuery
|
||||||
|
}
|
||||||
|
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, ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
iNdEx += length
|
||||||
|
case 3:
|
||||||
|
depth++
|
||||||
|
case 4:
|
||||||
|
if depth == 0 {
|
||||||
|
return 0, ErrUnexpectedEndOfGroupQuery
|
||||||
|
}
|
||||||
|
depth--
|
||||||
|
case 5:
|
||||||
|
iNdEx += 4
|
||||||
|
default:
|
||||||
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
||||||
|
}
|
||||||
|
if iNdEx < 0 {
|
||||||
|
return 0, ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
if depth == 0 {
|
||||||
|
return iNdEx, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0, io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling")
|
||||||
|
ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow")
|
||||||
|
ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
|
||||||
|
)
|
171
x/onboarding/query.pb.gw.go
Normal file
171
x/onboarding/query.pb.gw.go
Normal file
@ -0,0 +1,171 @@
|
|||||||
|
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||||
|
// source: cerc/onboarding/v1/query.proto
|
||||||
|
|
||||||
|
/*
|
||||||
|
Package onboarding is a reverse proxy.
|
||||||
|
|
||||||
|
It translates gRPC into RESTful JSON APIs.
|
||||||
|
*/
|
||||||
|
package onboarding
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/golang/protobuf/descriptor"
|
||||||
|
"github.com/golang/protobuf/proto"
|
||||||
|
"github.com/grpc-ecosystem/grpc-gateway/runtime"
|
||||||
|
"github.com/grpc-ecosystem/grpc-gateway/utilities"
|
||||||
|
"google.golang.org/grpc"
|
||||||
|
"google.golang.org/grpc/codes"
|
||||||
|
"google.golang.org/grpc/grpclog"
|
||||||
|
"google.golang.org/grpc/metadata"
|
||||||
|
"google.golang.org/grpc/status"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Suppress "imported and not used" errors
|
||||||
|
var _ codes.Code
|
||||||
|
var _ io.Reader
|
||||||
|
var _ status.Status
|
||||||
|
var _ = runtime.String
|
||||||
|
var _ = utilities.NewDoubleArray
|
||||||
|
var _ = descriptor.ForMessage
|
||||||
|
var _ = metadata.Join
|
||||||
|
|
||||||
|
var (
|
||||||
|
filter_Query_Participants_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
||||||
|
)
|
||||||
|
|
||||||
|
func request_Query_Participants_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq QueryParticipantsRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
if err := req.ParseForm(); err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Participants_0); err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := client.Participants(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func local_request_Query_Participants_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq QueryParticipantsRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
if err := req.ParseForm(); err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Participants_0); err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := server.Participants(ctx, &protoReq)
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// RegisterQueryHandlerServer registers the http handlers for service Query to "mux".
|
||||||
|
// UnaryRPC :call QueryServer directly.
|
||||||
|
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||||
|
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
|
||||||
|
func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error {
|
||||||
|
|
||||||
|
mux.Handle("GET", pattern_Query_Participants_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
var stream runtime.ServerTransportStream
|
||||||
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := local_request_Query_Participants_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||||
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||||
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
forward_Query_Participants_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but
|
||||||
|
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
|
||||||
|
func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
|
||||||
|
conn, err := grpc.Dial(endpoint, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
defer func() {
|
||||||
|
if err != nil {
|
||||||
|
if cerr := conn.Close(); cerr != nil {
|
||||||
|
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
go func() {
|
||||||
|
<-ctx.Done()
|
||||||
|
if cerr := conn.Close(); cerr != nil {
|
||||||
|
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
}()
|
||||||
|
|
||||||
|
return RegisterQueryHandler(ctx, mux, conn)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RegisterQueryHandler registers the http handlers for service Query to "mux".
|
||||||
|
// The handlers forward requests to the grpc endpoint over "conn".
|
||||||
|
func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
|
||||||
|
return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn))
|
||||||
|
}
|
||||||
|
|
||||||
|
// RegisterQueryHandlerClient registers the http handlers for service Query
|
||||||
|
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient".
|
||||||
|
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient"
|
||||||
|
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
|
||||||
|
// "QueryClient" to call the correct interceptors.
|
||||||
|
func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error {
|
||||||
|
|
||||||
|
mux.Handle("GET", pattern_Query_Participants_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := request_Query_Participants_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||||
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
forward_Query_Participants_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
pattern_Query_Participants_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cerc", "onboarding", "v1", "participants"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
forward_Query_Participants_0 = runtime.ForwardResponseMessage
|
||||||
|
)
|
645
x/onboarding/tx.pb.go
Normal file
645
x/onboarding/tx.pb.go
Normal file
@ -0,0 +1,645 @@
|
|||||||
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||||
|
// source: cerc/onboarding/v1/tx.proto
|
||||||
|
|
||||||
|
package onboarding
|
||||||
|
|
||||||
|
import (
|
||||||
|
context "context"
|
||||||
|
fmt "fmt"
|
||||||
|
_ "github.com/cosmos/cosmos-sdk/types/msgservice"
|
||||||
|
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||||
|
grpc1 "github.com/cosmos/gogoproto/grpc"
|
||||||
|
proto "github.com/cosmos/gogoproto/proto"
|
||||||
|
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||||
|
grpc "google.golang.org/grpc"
|
||||||
|
codes "google.golang.org/grpc/codes"
|
||||||
|
status "google.golang.org/grpc/status"
|
||||||
|
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
|
||||||
|
|
||||||
|
// MsgOnboardParticipant defines a SDK message for enrolling a new validator.
|
||||||
|
type MsgOnboardParticipant struct {
|
||||||
|
// Participant is the msg sender
|
||||||
|
Participant string `protobuf:"bytes,1,opt,name=participant,proto3" json:"participant,omitempty"`
|
||||||
|
EthPayload EthPayload `protobuf:"bytes,2,opt,name=eth_payload,json=ethPayload,proto3" json:"eth_payload"`
|
||||||
|
EthSignature string `protobuf:"bytes,3,opt,name=eth_signature,json=ethSignature,proto3" json:"eth_signature,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *MsgOnboardParticipant) Reset() { *m = MsgOnboardParticipant{} }
|
||||||
|
func (m *MsgOnboardParticipant) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*MsgOnboardParticipant) ProtoMessage() {}
|
||||||
|
func (*MsgOnboardParticipant) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_6bfde34a550e231e, []int{0}
|
||||||
|
}
|
||||||
|
func (m *MsgOnboardParticipant) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *MsgOnboardParticipant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_MsgOnboardParticipant.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 *MsgOnboardParticipant) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_MsgOnboardParticipant.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *MsgOnboardParticipant) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *MsgOnboardParticipant) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_MsgOnboardParticipant.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_MsgOnboardParticipant proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *MsgOnboardParticipant) GetParticipant() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.Participant
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *MsgOnboardParticipant) GetEthPayload() EthPayload {
|
||||||
|
if m != nil {
|
||||||
|
return m.EthPayload
|
||||||
|
}
|
||||||
|
return EthPayload{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *MsgOnboardParticipant) GetEthSignature() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.EthSignature
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
// MsgOnboardParticipantResponse defines the Msg/OnboardParticipant response
|
||||||
|
// type.
|
||||||
|
type MsgOnboardParticipantResponse struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *MsgOnboardParticipantResponse) Reset() { *m = MsgOnboardParticipantResponse{} }
|
||||||
|
func (m *MsgOnboardParticipantResponse) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*MsgOnboardParticipantResponse) ProtoMessage() {}
|
||||||
|
func (*MsgOnboardParticipantResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_6bfde34a550e231e, []int{1}
|
||||||
|
}
|
||||||
|
func (m *MsgOnboardParticipantResponse) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *MsgOnboardParticipantResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_MsgOnboardParticipantResponse.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 *MsgOnboardParticipantResponse) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_MsgOnboardParticipantResponse.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *MsgOnboardParticipantResponse) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *MsgOnboardParticipantResponse) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_MsgOnboardParticipantResponse.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_MsgOnboardParticipantResponse proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
proto.RegisterType((*MsgOnboardParticipant)(nil), "cerc.onboarding.v1.MsgOnboardParticipant")
|
||||||
|
proto.RegisterType((*MsgOnboardParticipantResponse)(nil), "cerc.onboarding.v1.MsgOnboardParticipantResponse")
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() { proto.RegisterFile("cerc/onboarding/v1/tx.proto", fileDescriptor_6bfde34a550e231e) }
|
||||||
|
|
||||||
|
var fileDescriptor_6bfde34a550e231e = []byte{
|
||||||
|
// 370 bytes of a gzipped FileDescriptorProto
|
||||||
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x41, 0x4b, 0x32, 0x41,
|
||||||
|
0x18, 0xc7, 0x77, 0xf4, 0x7d, 0x5f, 0x78, 0xc7, 0x82, 0x58, 0x8a, 0x64, 0xab, 0x55, 0xd6, 0x43,
|
||||||
|
0x2a, 0xb4, 0x83, 0x76, 0xeb, 0x28, 0x78, 0x94, 0xc4, 0x6e, 0x5d, 0x64, 0xdc, 0x1d, 0xc6, 0x01,
|
||||||
|
0x9d, 0x67, 0xd9, 0x99, 0xc4, 0x6e, 0xe1, 0x27, 0x08, 0xfa, 0x08, 0x7d, 0x01, 0xe9, 0xd2, 0x57,
|
||||||
|
0xf0, 0x28, 0x74, 0xe9, 0x14, 0xa1, 0x81, 0x5f, 0x23, 0x5c, 0x35, 0x17, 0xda, 0xa0, 0xdb, 0xcc,
|
||||||
|
0xff, 0xf9, 0xf3, 0xff, 0x3d, 0x7f, 0x1e, 0x7c, 0xe4, 0xb1, 0xd0, 0x23, 0x20, 0x3b, 0x40, 0x43,
|
||||||
|
0x5f, 0x48, 0x4e, 0x06, 0x15, 0xa2, 0x87, 0x6e, 0x10, 0x82, 0x06, 0xd3, 0x5c, 0x0e, 0xdd, 0xed,
|
||||||
|
0xd0, 0x1d, 0x54, 0xac, 0x43, 0x0f, 0x54, 0x1f, 0x14, 0xe9, 0xab, 0xc8, 0xdb, 0x57, 0x7c, 0x65,
|
||||||
|
0xb6, 0x8e, 0x39, 0x00, 0xef, 0x31, 0x42, 0x03, 0x41, 0xa8, 0x94, 0xa0, 0xa9, 0x16, 0x20, 0xd5,
|
||||||
|
0x7a, 0xba, 0xcf, 0x81, 0x43, 0xf4, 0x24, 0xcb, 0xd7, 0x5a, 0x2d, 0x24, 0xd0, 0x63, 0xb8, 0xc8,
|
||||||
|
0xe4, 0x3c, 0x23, 0x7c, 0xd0, 0x50, 0xfc, 0x72, 0xa5, 0x37, 0x69, 0xa8, 0x85, 0x27, 0x02, 0x2a,
|
||||||
|
0xb5, 0x99, 0xc7, 0x99, 0x60, 0xfb, 0xcd, 0xa2, 0x3c, 0x2a, 0xfe, 0x6f, 0xc5, 0x25, 0xb3, 0x8e,
|
||||||
|
0x33, 0x4c, 0x77, 0xdb, 0x01, 0xbd, 0xed, 0x01, 0xf5, 0xb3, 0xa9, 0x3c, 0x2a, 0x66, 0xaa, 0xb6,
|
||||||
|
0xfb, 0xbd, 0x97, 0x5b, 0xd7, 0xdd, 0xe6, 0xca, 0x55, 0xfb, 0x33, 0x79, 0xcb, 0x19, 0x2d, 0xcc,
|
||||||
|
0xbe, 0x14, 0xb3, 0x80, 0x77, 0x97, 0x31, 0x4a, 0x70, 0x49, 0xf5, 0x4d, 0xc8, 0xb2, 0xe9, 0x08,
|
||||||
|
0xb5, 0xc3, 0x74, 0xf7, 0x6a, 0xa3, 0x5d, 0xec, 0x8d, 0x16, 0xe3, 0x72, 0x9c, 0xee, 0xe4, 0xf0,
|
||||||
|
0x49, 0xe2, 0xe2, 0x2d, 0xa6, 0x02, 0x90, 0x8a, 0x55, 0x9f, 0x10, 0x4e, 0x37, 0x14, 0x37, 0x1f,
|
||||||
|
0x11, 0x36, 0x13, 0xfa, 0x95, 0x92, 0x16, 0x4d, 0x4c, 0xb4, 0x2a, 0xbf, 0xb6, 0x6e, 0xe0, 0x0e,
|
||||||
|
0x19, 0xbd, 0x7c, 0x3c, 0xa4, 0x4a, 0xce, 0x29, 0xf9, 0xf9, 0x0a, 0xed, 0x58, 0x1d, 0xeb, 0xef,
|
||||||
|
0xdd, 0x62, 0x5c, 0x46, 0xb5, 0xda, 0x64, 0x66, 0xa3, 0xe9, 0xcc, 0x46, 0xef, 0x33, 0x1b, 0xdd,
|
||||||
|
0xcf, 0x6d, 0x63, 0x3a, 0xb7, 0x8d, 0xd7, 0xb9, 0x6d, 0x5c, 0x17, 0xb9, 0xd0, 0xee, 0xc0, 0xef,
|
||||||
|
0xb8, 0x1a, 0xa2, 0xcc, 0x33, 0x01, 0xa4, 0x47, 0x3d, 0x90, 0xc2, 0xf3, 0xc9, 0x30, 0x46, 0xe8,
|
||||||
|
0xfc, 0x8b, 0x4e, 0x7b, 0xfe, 0x19, 0x00, 0x00, 0xff, 0xff, 0x28, 0x7c, 0x8d, 0x55, 0x7f, 0x02,
|
||||||
|
0x00, 0x00,
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
|
var _ context.Context
|
||||||
|
var _ grpc.ClientConn
|
||||||
|
|
||||||
|
// This is a compile-time assertion to ensure that this generated file
|
||||||
|
// is compatible with the grpc package it is being compiled against.
|
||||||
|
const _ = grpc.SupportPackageIsVersion4
|
||||||
|
|
||||||
|
// MsgClient is the client API for Msg service.
|
||||||
|
//
|
||||||
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||||
|
type MsgClient interface {
|
||||||
|
// OnboardParticipant defines a method for enrolling a new validator.
|
||||||
|
OnboardParticipant(ctx context.Context, in *MsgOnboardParticipant, opts ...grpc.CallOption) (*MsgOnboardParticipantResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type msgClient struct {
|
||||||
|
cc grpc1.ClientConn
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewMsgClient(cc grpc1.ClientConn) MsgClient {
|
||||||
|
return &msgClient{cc}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *msgClient) OnboardParticipant(ctx context.Context, in *MsgOnboardParticipant, opts ...grpc.CallOption) (*MsgOnboardParticipantResponse, error) {
|
||||||
|
out := new(MsgOnboardParticipantResponse)
|
||||||
|
err := c.cc.Invoke(ctx, "/cerc.onboarding.v1.Msg/OnboardParticipant", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MsgServer is the server API for Msg service.
|
||||||
|
type MsgServer interface {
|
||||||
|
// OnboardParticipant defines a method for enrolling a new validator.
|
||||||
|
OnboardParticipant(context.Context, *MsgOnboardParticipant) (*MsgOnboardParticipantResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnimplementedMsgServer can be embedded to have forward compatible implementations.
|
||||||
|
type UnimplementedMsgServer struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UnimplementedMsgServer) OnboardParticipant(ctx context.Context, req *MsgOnboardParticipant) (*MsgOnboardParticipantResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method OnboardParticipant not implemented")
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterMsgServer(s grpc1.Server, srv MsgServer) {
|
||||||
|
s.RegisterService(&_Msg_serviceDesc, srv)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Msg_OnboardParticipant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(MsgOnboardParticipant)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(MsgServer).OnboardParticipant(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/cerc.onboarding.v1.Msg/OnboardParticipant",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MsgServer).OnboardParticipant(ctx, req.(*MsgOnboardParticipant))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
var _Msg_serviceDesc = grpc.ServiceDesc{
|
||||||
|
ServiceName: "cerc.onboarding.v1.Msg",
|
||||||
|
HandlerType: (*MsgServer)(nil),
|
||||||
|
Methods: []grpc.MethodDesc{
|
||||||
|
{
|
||||||
|
MethodName: "OnboardParticipant",
|
||||||
|
Handler: _Msg_OnboardParticipant_Handler,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Streams: []grpc.StreamDesc{},
|
||||||
|
Metadata: "cerc/onboarding/v1/tx.proto",
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *MsgOnboardParticipant) 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 *MsgOnboardParticipant) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *MsgOnboardParticipant) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
|
_ = i
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if len(m.EthSignature) > 0 {
|
||||||
|
i -= len(m.EthSignature)
|
||||||
|
copy(dAtA[i:], m.EthSignature)
|
||||||
|
i = encodeVarintTx(dAtA, i, uint64(len(m.EthSignature)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x1a
|
||||||
|
}
|
||||||
|
{
|
||||||
|
size, err := m.EthPayload.MarshalToSizedBuffer(dAtA[:i])
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
i -= size
|
||||||
|
i = encodeVarintTx(dAtA, i, uint64(size))
|
||||||
|
}
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x12
|
||||||
|
if len(m.Participant) > 0 {
|
||||||
|
i -= len(m.Participant)
|
||||||
|
copy(dAtA[i:], m.Participant)
|
||||||
|
i = encodeVarintTx(dAtA, i, uint64(len(m.Participant)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
}
|
||||||
|
return len(dAtA) - i, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *MsgOnboardParticipantResponse) 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 *MsgOnboardParticipantResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *MsgOnboardParticipantResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
|
_ = i
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
return len(dAtA) - i, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func encodeVarintTx(dAtA []byte, offset int, v uint64) int {
|
||||||
|
offset -= sovTx(v)
|
||||||
|
base := offset
|
||||||
|
for v >= 1<<7 {
|
||||||
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||||||
|
v >>= 7
|
||||||
|
offset++
|
||||||
|
}
|
||||||
|
dAtA[offset] = uint8(v)
|
||||||
|
return base
|
||||||
|
}
|
||||||
|
func (m *MsgOnboardParticipant) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
l = len(m.Participant)
|
||||||
|
if l > 0 {
|
||||||
|
n += 1 + l + sovTx(uint64(l))
|
||||||
|
}
|
||||||
|
l = m.EthPayload.Size()
|
||||||
|
n += 1 + l + sovTx(uint64(l))
|
||||||
|
l = len(m.EthSignature)
|
||||||
|
if l > 0 {
|
||||||
|
n += 1 + l + sovTx(uint64(l))
|
||||||
|
}
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *MsgOnboardParticipantResponse) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
|
func sovTx(x uint64) (n int) {
|
||||||
|
return (math_bits.Len64(x|1) + 6) / 7
|
||||||
|
}
|
||||||
|
func sozTx(x uint64) (n int) {
|
||||||
|
return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||||
|
}
|
||||||
|
func (m *MsgOnboardParticipant) 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 ErrIntOverflowTx
|
||||||
|
}
|
||||||
|
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: MsgOnboardParticipant: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return fmt.Errorf("proto: MsgOnboardParticipant: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
case 1:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field Participant", wireType)
|
||||||
|
}
|
||||||
|
var stringLen uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowTx
|
||||||
|
}
|
||||||
|
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 ErrInvalidLengthTx
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthTx
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
m.Participant = string(dAtA[iNdEx:postIndex])
|
||||||
|
iNdEx = postIndex
|
||||||
|
case 2:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field EthPayload", wireType)
|
||||||
|
}
|
||||||
|
var msglen int
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowTx
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
msglen |= int(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if msglen < 0 {
|
||||||
|
return ErrInvalidLengthTx
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + msglen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthTx
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
if err := m.EthPayload.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
iNdEx = postIndex
|
||||||
|
case 3:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field EthSignature", wireType)
|
||||||
|
}
|
||||||
|
var stringLen uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowTx
|
||||||
|
}
|
||||||
|
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 ErrInvalidLengthTx
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthTx
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
m.EthSignature = string(dAtA[iNdEx:postIndex])
|
||||||
|
iNdEx = postIndex
|
||||||
|
default:
|
||||||
|
iNdEx = preIndex
|
||||||
|
skippy, err := skipTx(dAtA[iNdEx:])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||||
|
return ErrInvalidLengthTx
|
||||||
|
}
|
||||||
|
if (iNdEx + skippy) > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
iNdEx += skippy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if iNdEx > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (m *MsgOnboardParticipantResponse) 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 ErrIntOverflowTx
|
||||||
|
}
|
||||||
|
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: MsgOnboardParticipantResponse: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return fmt.Errorf("proto: MsgOnboardParticipantResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
default:
|
||||||
|
iNdEx = preIndex
|
||||||
|
skippy, err := skipTx(dAtA[iNdEx:])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||||
|
return ErrInvalidLengthTx
|
||||||
|
}
|
||||||
|
if (iNdEx + skippy) > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
iNdEx += skippy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if iNdEx > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func skipTx(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, ErrIntOverflowTx
|
||||||
|
}
|
||||||
|
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, ErrIntOverflowTx
|
||||||
|
}
|
||||||
|
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, ErrIntOverflowTx
|
||||||
|
}
|
||||||
|
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, ErrInvalidLengthTx
|
||||||
|
}
|
||||||
|
iNdEx += length
|
||||||
|
case 3:
|
||||||
|
depth++
|
||||||
|
case 4:
|
||||||
|
if depth == 0 {
|
||||||
|
return 0, ErrUnexpectedEndOfGroupTx
|
||||||
|
}
|
||||||
|
depth--
|
||||||
|
case 5:
|
||||||
|
iNdEx += 4
|
||||||
|
default:
|
||||||
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
||||||
|
}
|
||||||
|
if iNdEx < 0 {
|
||||||
|
return 0, ErrInvalidLengthTx
|
||||||
|
}
|
||||||
|
if depth == 0 {
|
||||||
|
return iNdEx, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0, io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling")
|
||||||
|
ErrIntOverflowTx = fmt.Errorf("proto: integer overflow")
|
||||||
|
ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
|
||||||
|
)
|
171
x/onboarding/tx.pb.gw.go
Normal file
171
x/onboarding/tx.pb.gw.go
Normal file
@ -0,0 +1,171 @@
|
|||||||
|
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||||
|
// source: cerc/onboarding/v1/tx.proto
|
||||||
|
|
||||||
|
/*
|
||||||
|
Package onboarding is a reverse proxy.
|
||||||
|
|
||||||
|
It translates gRPC into RESTful JSON APIs.
|
||||||
|
*/
|
||||||
|
package onboarding
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/golang/protobuf/descriptor"
|
||||||
|
"github.com/golang/protobuf/proto"
|
||||||
|
"github.com/grpc-ecosystem/grpc-gateway/runtime"
|
||||||
|
"github.com/grpc-ecosystem/grpc-gateway/utilities"
|
||||||
|
"google.golang.org/grpc"
|
||||||
|
"google.golang.org/grpc/codes"
|
||||||
|
"google.golang.org/grpc/grpclog"
|
||||||
|
"google.golang.org/grpc/metadata"
|
||||||
|
"google.golang.org/grpc/status"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Suppress "imported and not used" errors
|
||||||
|
var _ codes.Code
|
||||||
|
var _ io.Reader
|
||||||
|
var _ status.Status
|
||||||
|
var _ = runtime.String
|
||||||
|
var _ = utilities.NewDoubleArray
|
||||||
|
var _ = descriptor.ForMessage
|
||||||
|
var _ = metadata.Join
|
||||||
|
|
||||||
|
var (
|
||||||
|
filter_Msg_OnboardParticipant_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
||||||
|
)
|
||||||
|
|
||||||
|
func request_Msg_OnboardParticipant_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq MsgOnboardParticipant
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
if err := req.ParseForm(); err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_OnboardParticipant_0); err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := client.OnboardParticipant(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func local_request_Msg_OnboardParticipant_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq MsgOnboardParticipant
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
if err := req.ParseForm(); err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_OnboardParticipant_0); err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := server.OnboardParticipant(ctx, &protoReq)
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// RegisterMsgHandlerServer registers the http handlers for service Msg to "mux".
|
||||||
|
// UnaryRPC :call MsgServer directly.
|
||||||
|
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||||
|
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMsgHandlerFromEndpoint instead.
|
||||||
|
func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error {
|
||||||
|
|
||||||
|
mux.Handle("POST", pattern_Msg_OnboardParticipant_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
var stream runtime.ServerTransportStream
|
||||||
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := local_request_Msg_OnboardParticipant_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||||
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||||
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
forward_Msg_OnboardParticipant_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// RegisterMsgHandlerFromEndpoint is same as RegisterMsgHandler but
|
||||||
|
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
|
||||||
|
func RegisterMsgHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
|
||||||
|
conn, err := grpc.Dial(endpoint, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
defer func() {
|
||||||
|
if err != nil {
|
||||||
|
if cerr := conn.Close(); cerr != nil {
|
||||||
|
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
go func() {
|
||||||
|
<-ctx.Done()
|
||||||
|
if cerr := conn.Close(); cerr != nil {
|
||||||
|
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
}()
|
||||||
|
|
||||||
|
return RegisterMsgHandler(ctx, mux, conn)
|
||||||
|
}
|
||||||
|
|
||||||
|
// RegisterMsgHandler registers the http handlers for service Msg to "mux".
|
||||||
|
// The handlers forward requests to the grpc endpoint over "conn".
|
||||||
|
func RegisterMsgHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
|
||||||
|
return RegisterMsgHandlerClient(ctx, mux, NewMsgClient(conn))
|
||||||
|
}
|
||||||
|
|
||||||
|
// RegisterMsgHandlerClient registers the http handlers for service Msg
|
||||||
|
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MsgClient".
|
||||||
|
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MsgClient"
|
||||||
|
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
|
||||||
|
// "MsgClient" to call the correct interceptors.
|
||||||
|
func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgClient) error {
|
||||||
|
|
||||||
|
mux.Handle("POST", pattern_Msg_OnboardParticipant_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := request_Msg_OnboardParticipant_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||||
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
forward_Msg_OnboardParticipant_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
pattern_Msg_OnboardParticipant_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cerc", "onboarding", "v1", "onboard_participant"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
forward_Msg_OnboardParticipant_0 = runtime.ForwardResponseMessage
|
||||||
|
)
|
@ -61,7 +61,6 @@ func RecordBondInvariant(k *Keeper) sdk.Invariant {
|
|||||||
|
|
||||||
return false, nil
|
return false, nil
|
||||||
})
|
})
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return sdk.FormatInvariant(
|
return sdk.FormatInvariant(
|
||||||
types.ModuleName,
|
types.ModuleName,
|
||||||
|
@ -243,7 +243,11 @@ func (k Keeper) GetRecordsByBondId(ctx sdk.Context, bondId string) ([]registryty
|
|||||||
}
|
}
|
||||||
|
|
||||||
// RecordsFromAttributes gets a list of records whose attributes match all provided values
|
// RecordsFromAttributes gets a list of records whose attributes match all provided values
|
||||||
func (k Keeper) RecordsFromAttributes(ctx sdk.Context, attributes []*registrytypes.QueryRecordsRequest_KeyValueInput, all bool) ([]registrytypes.Record, error) {
|
func (k Keeper) RecordsFromAttributes(
|
||||||
|
ctx sdk.Context,
|
||||||
|
attributes []*registrytypes.QueryRecordsRequest_KeyValueInput,
|
||||||
|
all bool,
|
||||||
|
) ([]registrytypes.Record, error) {
|
||||||
resultRecordIds := []string{}
|
resultRecordIds := []string{}
|
||||||
for i, attr := range attributes {
|
for i, attr := range attributes {
|
||||||
suffix, err := QueryValueToJSON(attr.Value)
|
suffix, err := QueryValueToJSON(attr.Value)
|
||||||
|
@ -320,7 +320,10 @@ func (ms msgServer) DissociateBond(c context.Context, msg *registrytypes.MsgDiss
|
|||||||
return ®istrytypes.MsgDissociateBondResponse{}, nil
|
return ®istrytypes.MsgDissociateBondResponse{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ms msgServer) DissociateRecords(c context.Context, msg *registrytypes.MsgDissociateRecords) (*registrytypes.MsgDissociateRecordsResponse, error) {
|
func (ms msgServer) DissociateRecords(
|
||||||
|
c context.Context,
|
||||||
|
msg *registrytypes.MsgDissociateRecords,
|
||||||
|
) (*registrytypes.MsgDissociateRecordsResponse, error) {
|
||||||
if err := msg.ValidateBasic(); err != nil {
|
if err := msg.ValidateBasic(); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,10 @@ func (qs queryServer) GetRecord(c context.Context, req *registrytypes.QueryGetRe
|
|||||||
return ®istrytypes.QueryGetRecordResponse{Record: record}, nil
|
return ®istrytypes.QueryGetRecordResponse{Record: record}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (qs queryServer) GetRecordsByBondId(c context.Context, req *registrytypes.QueryGetRecordsByBondIdRequest) (*registrytypes.QueryGetRecordsByBondIdResponse, error) {
|
func (qs queryServer) GetRecordsByBondId(
|
||||||
|
c context.Context,
|
||||||
|
req *registrytypes.QueryGetRecordsByBondIdRequest,
|
||||||
|
) (*registrytypes.QueryGetRecordsByBondIdResponse, error) {
|
||||||
ctx := sdk.UnwrapSDKContext(c)
|
ctx := sdk.UnwrapSDKContext(c)
|
||||||
|
|
||||||
records, err := qs.k.GetRecordsByBondId(ctx, req.GetId())
|
records, err := qs.k.GetRecordsByBondId(ctx, req.GetId())
|
||||||
|
@ -52,21 +52,21 @@ func NewAppModuleBasic(m AppModule) module.AppModuleBasic {
|
|||||||
|
|
||||||
// module.AppModuleBasic
|
// module.AppModuleBasic
|
||||||
|
|
||||||
// Name returns the checkers module's name.
|
// Name returns the registry module's name.
|
||||||
func (AppModule) Name() string { return registrytypes.ModuleName }
|
func (AppModule) Name() string { return registrytypes.ModuleName }
|
||||||
|
|
||||||
// RegisterLegacyAminoCodec registers the checkers module's types on the LegacyAmino codec.
|
// RegisterLegacyAminoCodec registers the registry module's types on the LegacyAmino codec.
|
||||||
// New modules do not need to support Amino.
|
// New modules do not need to support Amino.
|
||||||
func (AppModule) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {}
|
func (AppModule) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {}
|
||||||
|
|
||||||
// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the checkers module.
|
// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the registry module.
|
||||||
func (AppModule) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *gwruntime.ServeMux) {
|
func (AppModule) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *gwruntime.ServeMux) {
|
||||||
if err := registrytypes.RegisterQueryHandlerClient(context.Background(), mux, registrytypes.NewQueryClient(clientCtx)); err != nil {
|
if err := registrytypes.RegisterQueryHandlerClient(context.Background(), mux, registrytypes.NewQueryClient(clientCtx)); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// RegisterInterfaces registers interfaces and implementations of the checkers module.
|
// RegisterInterfaces registers interfaces and implementations of the registry module.
|
||||||
func (AppModule) RegisterInterfaces(registry codectypes.InterfaceRegistry) {
|
func (AppModule) RegisterInterfaces(registry codectypes.InterfaceRegistry) {
|
||||||
registrytypes.RegisterInterfaces(registry)
|
registrytypes.RegisterInterfaces(registry)
|
||||||
}
|
}
|
||||||
@ -91,7 +91,7 @@ func (AppModule) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig,
|
|||||||
return data.Validate()
|
return data.Validate()
|
||||||
}
|
}
|
||||||
|
|
||||||
// InitGenesis performs genesis initialization for the checkers module.
|
// InitGenesis performs genesis initialization for the registry module.
|
||||||
// It returns no validator updates.
|
// It returns no validator updates.
|
||||||
func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) {
|
func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) {
|
||||||
var genesisState registrytypes.GenesisState
|
var genesisState registrytypes.GenesisState
|
||||||
|
Loading…
Reference in New Issue
Block a user