feat(x/accounts): Add new lockup account type (#19048)
Co-authored-by: testinginprod <frojdi@faulttolerance.net> Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
parent
5424b55c57
commit
3ce9224f00
761
api/cosmos/accounts/defaults/lockup/lockup.pulsar.go
Normal file
761
api/cosmos/accounts/defaults/lockup/lockup.pulsar.go
Normal file
@ -0,0 +1,761 @@
|
||||
// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
|
||||
package lockup
|
||||
|
||||
import (
|
||||
_ "cosmossdk.io/api/amino"
|
||||
v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1"
|
||||
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"
|
||||
durationpb "google.golang.org/protobuf/types/known/durationpb"
|
||||
io "io"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
var _ protoreflect.List = (*_Period_2_list)(nil)
|
||||
|
||||
type _Period_2_list struct {
|
||||
list *[]*v1beta1.Coin
|
||||
}
|
||||
|
||||
func (x *_Period_2_list) Len() int {
|
||||
if x.list == nil {
|
||||
return 0
|
||||
}
|
||||
return len(*x.list)
|
||||
}
|
||||
|
||||
func (x *_Period_2_list) Get(i int) protoreflect.Value {
|
||||
return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect())
|
||||
}
|
||||
|
||||
func (x *_Period_2_list) Set(i int, value protoreflect.Value) {
|
||||
valueUnwrapped := value.Message()
|
||||
concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin)
|
||||
(*x.list)[i] = concreteValue
|
||||
}
|
||||
|
||||
func (x *_Period_2_list) Append(value protoreflect.Value) {
|
||||
valueUnwrapped := value.Message()
|
||||
concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin)
|
||||
*x.list = append(*x.list, concreteValue)
|
||||
}
|
||||
|
||||
func (x *_Period_2_list) AppendMutable() protoreflect.Value {
|
||||
v := new(v1beta1.Coin)
|
||||
*x.list = append(*x.list, v)
|
||||
return protoreflect.ValueOfMessage(v.ProtoReflect())
|
||||
}
|
||||
|
||||
func (x *_Period_2_list) Truncate(n int) {
|
||||
for i := n; i < len(*x.list); i++ {
|
||||
(*x.list)[i] = nil
|
||||
}
|
||||
*x.list = (*x.list)[:n]
|
||||
}
|
||||
|
||||
func (x *_Period_2_list) NewElement() protoreflect.Value {
|
||||
v := new(v1beta1.Coin)
|
||||
return protoreflect.ValueOfMessage(v.ProtoReflect())
|
||||
}
|
||||
|
||||
func (x *_Period_2_list) IsValid() bool {
|
||||
return x.list != nil
|
||||
}
|
||||
|
||||
var (
|
||||
md_Period protoreflect.MessageDescriptor
|
||||
fd_Period_length protoreflect.FieldDescriptor
|
||||
fd_Period_amount protoreflect.FieldDescriptor
|
||||
)
|
||||
|
||||
func init() {
|
||||
file_cosmos_accounts_defaults_lockup_lockup_proto_init()
|
||||
md_Period = File_cosmos_accounts_defaults_lockup_lockup_proto.Messages().ByName("Period")
|
||||
fd_Period_length = md_Period.Fields().ByName("length")
|
||||
fd_Period_amount = md_Period.Fields().ByName("amount")
|
||||
}
|
||||
|
||||
var _ protoreflect.Message = (*fastReflection_Period)(nil)
|
||||
|
||||
type fastReflection_Period Period
|
||||
|
||||
func (x *Period) ProtoReflect() protoreflect.Message {
|
||||
return (*fastReflection_Period)(x)
|
||||
}
|
||||
|
||||
func (x *Period) slowProtoReflect() protoreflect.Message {
|
||||
mi := &file_cosmos_accounts_defaults_lockup_lockup_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_Period_messageType fastReflection_Period_messageType
|
||||
var _ protoreflect.MessageType = fastReflection_Period_messageType{}
|
||||
|
||||
type fastReflection_Period_messageType struct{}
|
||||
|
||||
func (x fastReflection_Period_messageType) Zero() protoreflect.Message {
|
||||
return (*fastReflection_Period)(nil)
|
||||
}
|
||||
func (x fastReflection_Period_messageType) New() protoreflect.Message {
|
||||
return new(fastReflection_Period)
|
||||
}
|
||||
func (x fastReflection_Period_messageType) Descriptor() protoreflect.MessageDescriptor {
|
||||
return md_Period
|
||||
}
|
||||
|
||||
// Descriptor returns message descriptor, which contains only the protobuf
|
||||
// type information for the message.
|
||||
func (x *fastReflection_Period) Descriptor() protoreflect.MessageDescriptor {
|
||||
return md_Period
|
||||
}
|
||||
|
||||
// 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_Period) Type() protoreflect.MessageType {
|
||||
return _fastReflection_Period_messageType
|
||||
}
|
||||
|
||||
// New returns a newly allocated and mutable empty message.
|
||||
func (x *fastReflection_Period) New() protoreflect.Message {
|
||||
return new(fastReflection_Period)
|
||||
}
|
||||
|
||||
// Interface unwraps the message reflection interface and
|
||||
// returns the underlying ProtoMessage interface.
|
||||
func (x *fastReflection_Period) Interface() protoreflect.ProtoMessage {
|
||||
return (*Period)(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_Period) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
||||
if x.Length != nil {
|
||||
value := protoreflect.ValueOfMessage(x.Length.ProtoReflect())
|
||||
if !f(fd_Period_length, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
if len(x.Amount) != 0 {
|
||||
value := protoreflect.ValueOfList(&_Period_2_list{list: &x.Amount})
|
||||
if !f(fd_Period_amount, 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_Period) Has(fd protoreflect.FieldDescriptor) bool {
|
||||
switch fd.FullName() {
|
||||
case "cosmos.accounts.defaults.lockup.Period.length":
|
||||
return x.Length != nil
|
||||
case "cosmos.accounts.defaults.lockup.Period.amount":
|
||||
return len(x.Amount) != 0
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.Period"))
|
||||
}
|
||||
panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.Period 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_Period) Clear(fd protoreflect.FieldDescriptor) {
|
||||
switch fd.FullName() {
|
||||
case "cosmos.accounts.defaults.lockup.Period.length":
|
||||
x.Length = nil
|
||||
case "cosmos.accounts.defaults.lockup.Period.amount":
|
||||
x.Amount = nil
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.Period"))
|
||||
}
|
||||
panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.Period 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_Period) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch descriptor.FullName() {
|
||||
case "cosmos.accounts.defaults.lockup.Period.length":
|
||||
value := x.Length
|
||||
return protoreflect.ValueOfMessage(value.ProtoReflect())
|
||||
case "cosmos.accounts.defaults.lockup.Period.amount":
|
||||
if len(x.Amount) == 0 {
|
||||
return protoreflect.ValueOfList(&_Period_2_list{})
|
||||
}
|
||||
listValue := &_Period_2_list{list: &x.Amount}
|
||||
return protoreflect.ValueOfList(listValue)
|
||||
default:
|
||||
if descriptor.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.Period"))
|
||||
}
|
||||
panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.Period 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_Period) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
||||
switch fd.FullName() {
|
||||
case "cosmos.accounts.defaults.lockup.Period.length":
|
||||
x.Length = value.Message().Interface().(*durationpb.Duration)
|
||||
case "cosmos.accounts.defaults.lockup.Period.amount":
|
||||
lv := value.List()
|
||||
clv := lv.(*_Period_2_list)
|
||||
x.Amount = *clv.list
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.Period"))
|
||||
}
|
||||
panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.Period 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_Period) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
case "cosmos.accounts.defaults.lockup.Period.length":
|
||||
if x.Length == nil {
|
||||
x.Length = new(durationpb.Duration)
|
||||
}
|
||||
return protoreflect.ValueOfMessage(x.Length.ProtoReflect())
|
||||
case "cosmos.accounts.defaults.lockup.Period.amount":
|
||||
if x.Amount == nil {
|
||||
x.Amount = []*v1beta1.Coin{}
|
||||
}
|
||||
value := &_Period_2_list{list: &x.Amount}
|
||||
return protoreflect.ValueOfList(value)
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.Period"))
|
||||
}
|
||||
panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.Period 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_Period) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
case "cosmos.accounts.defaults.lockup.Period.length":
|
||||
m := new(durationpb.Duration)
|
||||
return protoreflect.ValueOfMessage(m.ProtoReflect())
|
||||
case "cosmos.accounts.defaults.lockup.Period.amount":
|
||||
list := []*v1beta1.Coin{}
|
||||
return protoreflect.ValueOfList(&_Period_2_list{list: &list})
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.Period"))
|
||||
}
|
||||
panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.Period 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_Period) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||
switch d.FullName() {
|
||||
default:
|
||||
panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.lockup.Period", 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_Period) 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_Period) 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_Period) 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_Period) ProtoMethods() *protoiface.Methods {
|
||||
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
|
||||
x := input.Message.Interface().(*Period)
|
||||
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.Length != nil {
|
||||
l = options.Size(x.Length)
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
if len(x.Amount) > 0 {
|
||||
for _, e := range x.Amount {
|
||||
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().(*Period)
|
||||
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.Amount) > 0 {
|
||||
for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- {
|
||||
encoded, err := options.Marshal(x.Amount[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.Length != nil {
|
||||
encoded, err := options.Marshal(x.Length)
|
||||
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().(*Period)
|
||||
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: Period: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Period: 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 Length", 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.Length == nil {
|
||||
x.Length = &durationpb.Duration{}
|
||||
}
|
||||
if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Length); 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 Amount", 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.Amount = append(x.Amount, &v1beta1.Coin{})
|
||||
if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-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: cosmos/accounts/defaults/lockup/lockup.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)
|
||||
)
|
||||
|
||||
// Period defines a length of time and amount of coins that will be lock.
|
||||
type Period struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Period duration
|
||||
Length *durationpb.Duration `protobuf:"bytes,1,opt,name=length,proto3" json:"length,omitempty"`
|
||||
Amount []*v1beta1.Coin `protobuf:"bytes,2,rep,name=amount,proto3" json:"amount,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Period) Reset() {
|
||||
*x = Period{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_cosmos_accounts_defaults_lockup_lockup_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Period) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Period) ProtoMessage() {}
|
||||
|
||||
// Deprecated: Use Period.ProtoReflect.Descriptor instead.
|
||||
func (*Period) Descriptor() ([]byte, []int) {
|
||||
return file_cosmos_accounts_defaults_lockup_lockup_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Period) GetLength() *durationpb.Duration {
|
||||
if x != nil {
|
||||
return x.Length
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Period) GetAmount() []*v1beta1.Coin {
|
||||
if x != nil {
|
||||
return x.Amount
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_cosmos_accounts_defaults_lockup_lockup_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_cosmos_accounts_defaults_lockup_lockup_proto_rawDesc = []byte{
|
||||
0x0a, 0x2c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x73, 0x2f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75,
|
||||
0x70, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1f,
|
||||
0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e,
|
||||
0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x1a,
|
||||
0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f,
|
||||
0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f,
|
||||
0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
|
||||
0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc5, 0x01, 0x0a, 0x06, 0x50, 0x65, 0x72,
|
||||
0x69, 0x6f, 0x64, 0x12, 0x40, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d,
|
||||
0xc8, 0xde, 0x1f, 0x00, 0x98, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x6c,
|
||||
0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x79, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18,
|
||||
0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62,
|
||||
0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e,
|
||||
0x42, 0x46, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
|
||||
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d,
|
||||
0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69,
|
||||
0x6e, 0x73, 0x9a, 0xe7, 0xb0, 0x2a, 0x0c, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f,
|
||||
0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x42, 0x84, 0x02, 0x0a, 0x23, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74,
|
||||
0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x42, 0x0b, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70,
|
||||
0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73,
|
||||
0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73,
|
||||
0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c,
|
||||
0x74, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0xa2, 0x02, 0x04, 0x43, 0x41, 0x44, 0x4c,
|
||||
0xaa, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x73, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x4c, 0x6f, 0x63, 0x6b,
|
||||
0x75, 0x70, 0xca, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x73, 0x5c, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x5c, 0x4c, 0x6f,
|
||||
0x63, 0x6b, 0x75, 0x70, 0xe2, 0x02, 0x2b, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x5c,
|
||||
0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
|
||||
0x74, 0x61, 0xea, 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x63, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x73, 0x3a, 0x3a, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x3a,
|
||||
0x3a, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_cosmos_accounts_defaults_lockup_lockup_proto_rawDescOnce sync.Once
|
||||
file_cosmos_accounts_defaults_lockup_lockup_proto_rawDescData = file_cosmos_accounts_defaults_lockup_lockup_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_cosmos_accounts_defaults_lockup_lockup_proto_rawDescGZIP() []byte {
|
||||
file_cosmos_accounts_defaults_lockup_lockup_proto_rawDescOnce.Do(func() {
|
||||
file_cosmos_accounts_defaults_lockup_lockup_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_accounts_defaults_lockup_lockup_proto_rawDescData)
|
||||
})
|
||||
return file_cosmos_accounts_defaults_lockup_lockup_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_cosmos_accounts_defaults_lockup_lockup_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_cosmos_accounts_defaults_lockup_lockup_proto_goTypes = []interface{}{
|
||||
(*Period)(nil), // 0: cosmos.accounts.defaults.lockup.Period
|
||||
(*durationpb.Duration)(nil), // 1: google.protobuf.Duration
|
||||
(*v1beta1.Coin)(nil), // 2: cosmos.base.v1beta1.Coin
|
||||
}
|
||||
var file_cosmos_accounts_defaults_lockup_lockup_proto_depIdxs = []int32{
|
||||
1, // 0: cosmos.accounts.defaults.lockup.Period.length:type_name -> google.protobuf.Duration
|
||||
2, // 1: cosmos.accounts.defaults.lockup.Period.amount:type_name -> cosmos.base.v1beta1.Coin
|
||||
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_cosmos_accounts_defaults_lockup_lockup_proto_init() }
|
||||
func file_cosmos_accounts_defaults_lockup_lockup_proto_init() {
|
||||
if File_cosmos_accounts_defaults_lockup_lockup_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_cosmos_accounts_defaults_lockup_lockup_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Period); 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_cosmos_accounts_defaults_lockup_lockup_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_cosmos_accounts_defaults_lockup_lockup_proto_goTypes,
|
||||
DependencyIndexes: file_cosmos_accounts_defaults_lockup_lockup_proto_depIdxs,
|
||||
MessageInfos: file_cosmos_accounts_defaults_lockup_lockup_proto_msgTypes,
|
||||
}.Build()
|
||||
File_cosmos_accounts_defaults_lockup_lockup_proto = out.File
|
||||
file_cosmos_accounts_defaults_lockup_lockup_proto_rawDesc = nil
|
||||
file_cosmos_accounts_defaults_lockup_lockup_proto_goTypes = nil
|
||||
file_cosmos_accounts_defaults_lockup_lockup_proto_depIdxs = nil
|
||||
}
|
||||
2903
api/cosmos/accounts/defaults/lockup/query.pulsar.go
Normal file
2903
api/cosmos/accounts/defaults/lockup/query.pulsar.go
Normal file
File diff suppressed because it is too large
Load Diff
6174
api/cosmos/accounts/defaults/lockup/tx.pulsar.go
Normal file
6174
api/cosmos/accounts/defaults/lockup/tx.pulsar.go
Normal file
File diff suppressed because it is too large
Load Diff
752
api/cosmos/lockup/lockup.pulsar.go
Normal file
752
api/cosmos/lockup/lockup.pulsar.go
Normal file
@ -0,0 +1,752 @@
|
||||
// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
|
||||
package lockup
|
||||
|
||||
import (
|
||||
_ "cosmossdk.io/api/amino"
|
||||
v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1"
|
||||
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"
|
||||
durationpb "google.golang.org/protobuf/types/known/durationpb"
|
||||
io "io"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
var _ protoreflect.List = (*_Period_2_list)(nil)
|
||||
|
||||
type _Period_2_list struct {
|
||||
list *[]*v1beta1.Coin
|
||||
}
|
||||
|
||||
func (x *_Period_2_list) Len() int {
|
||||
if x.list == nil {
|
||||
return 0
|
||||
}
|
||||
return len(*x.list)
|
||||
}
|
||||
|
||||
func (x *_Period_2_list) Get(i int) protoreflect.Value {
|
||||
return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect())
|
||||
}
|
||||
|
||||
func (x *_Period_2_list) Set(i int, value protoreflect.Value) {
|
||||
valueUnwrapped := value.Message()
|
||||
concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin)
|
||||
(*x.list)[i] = concreteValue
|
||||
}
|
||||
|
||||
func (x *_Period_2_list) Append(value protoreflect.Value) {
|
||||
valueUnwrapped := value.Message()
|
||||
concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin)
|
||||
*x.list = append(*x.list, concreteValue)
|
||||
}
|
||||
|
||||
func (x *_Period_2_list) AppendMutable() protoreflect.Value {
|
||||
v := new(v1beta1.Coin)
|
||||
*x.list = append(*x.list, v)
|
||||
return protoreflect.ValueOfMessage(v.ProtoReflect())
|
||||
}
|
||||
|
||||
func (x *_Period_2_list) Truncate(n int) {
|
||||
for i := n; i < len(*x.list); i++ {
|
||||
(*x.list)[i] = nil
|
||||
}
|
||||
*x.list = (*x.list)[:n]
|
||||
}
|
||||
|
||||
func (x *_Period_2_list) NewElement() protoreflect.Value {
|
||||
v := new(v1beta1.Coin)
|
||||
return protoreflect.ValueOfMessage(v.ProtoReflect())
|
||||
}
|
||||
|
||||
func (x *_Period_2_list) IsValid() bool {
|
||||
return x.list != nil
|
||||
}
|
||||
|
||||
var (
|
||||
md_Period protoreflect.MessageDescriptor
|
||||
fd_Period_length protoreflect.FieldDescriptor
|
||||
fd_Period_amount protoreflect.FieldDescriptor
|
||||
)
|
||||
|
||||
func init() {
|
||||
file_cosmos_lockup_lockup_proto_init()
|
||||
md_Period = File_cosmos_lockup_lockup_proto.Messages().ByName("Period")
|
||||
fd_Period_length = md_Period.Fields().ByName("length")
|
||||
fd_Period_amount = md_Period.Fields().ByName("amount")
|
||||
}
|
||||
|
||||
var _ protoreflect.Message = (*fastReflection_Period)(nil)
|
||||
|
||||
type fastReflection_Period Period
|
||||
|
||||
func (x *Period) ProtoReflect() protoreflect.Message {
|
||||
return (*fastReflection_Period)(x)
|
||||
}
|
||||
|
||||
func (x *Period) slowProtoReflect() protoreflect.Message {
|
||||
mi := &file_cosmos_lockup_lockup_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_Period_messageType fastReflection_Period_messageType
|
||||
var _ protoreflect.MessageType = fastReflection_Period_messageType{}
|
||||
|
||||
type fastReflection_Period_messageType struct{}
|
||||
|
||||
func (x fastReflection_Period_messageType) Zero() protoreflect.Message {
|
||||
return (*fastReflection_Period)(nil)
|
||||
}
|
||||
func (x fastReflection_Period_messageType) New() protoreflect.Message {
|
||||
return new(fastReflection_Period)
|
||||
}
|
||||
func (x fastReflection_Period_messageType) Descriptor() protoreflect.MessageDescriptor {
|
||||
return md_Period
|
||||
}
|
||||
|
||||
// Descriptor returns message descriptor, which contains only the protobuf
|
||||
// type information for the message.
|
||||
func (x *fastReflection_Period) Descriptor() protoreflect.MessageDescriptor {
|
||||
return md_Period
|
||||
}
|
||||
|
||||
// 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_Period) Type() protoreflect.MessageType {
|
||||
return _fastReflection_Period_messageType
|
||||
}
|
||||
|
||||
// New returns a newly allocated and mutable empty message.
|
||||
func (x *fastReflection_Period) New() protoreflect.Message {
|
||||
return new(fastReflection_Period)
|
||||
}
|
||||
|
||||
// Interface unwraps the message reflection interface and
|
||||
// returns the underlying ProtoMessage interface.
|
||||
func (x *fastReflection_Period) Interface() protoreflect.ProtoMessage {
|
||||
return (*Period)(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_Period) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
||||
if x.Length != nil {
|
||||
value := protoreflect.ValueOfMessage(x.Length.ProtoReflect())
|
||||
if !f(fd_Period_length, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
if len(x.Amount) != 0 {
|
||||
value := protoreflect.ValueOfList(&_Period_2_list{list: &x.Amount})
|
||||
if !f(fd_Period_amount, 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_Period) Has(fd protoreflect.FieldDescriptor) bool {
|
||||
switch fd.FullName() {
|
||||
case "cosmos.lockup.Period.length":
|
||||
return x.Length != nil
|
||||
case "cosmos.lockup.Period.amount":
|
||||
return len(x.Amount) != 0
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.Period"))
|
||||
}
|
||||
panic(fmt.Errorf("message cosmos.lockup.Period 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_Period) Clear(fd protoreflect.FieldDescriptor) {
|
||||
switch fd.FullName() {
|
||||
case "cosmos.lockup.Period.length":
|
||||
x.Length = nil
|
||||
case "cosmos.lockup.Period.amount":
|
||||
x.Amount = nil
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.Period"))
|
||||
}
|
||||
panic(fmt.Errorf("message cosmos.lockup.Period 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_Period) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch descriptor.FullName() {
|
||||
case "cosmos.lockup.Period.length":
|
||||
value := x.Length
|
||||
return protoreflect.ValueOfMessage(value.ProtoReflect())
|
||||
case "cosmos.lockup.Period.amount":
|
||||
if len(x.Amount) == 0 {
|
||||
return protoreflect.ValueOfList(&_Period_2_list{})
|
||||
}
|
||||
listValue := &_Period_2_list{list: &x.Amount}
|
||||
return protoreflect.ValueOfList(listValue)
|
||||
default:
|
||||
if descriptor.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.Period"))
|
||||
}
|
||||
panic(fmt.Errorf("message cosmos.lockup.Period 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_Period) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
||||
switch fd.FullName() {
|
||||
case "cosmos.lockup.Period.length":
|
||||
x.Length = value.Message().Interface().(*durationpb.Duration)
|
||||
case "cosmos.lockup.Period.amount":
|
||||
lv := value.List()
|
||||
clv := lv.(*_Period_2_list)
|
||||
x.Amount = *clv.list
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.Period"))
|
||||
}
|
||||
panic(fmt.Errorf("message cosmos.lockup.Period 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_Period) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
case "cosmos.lockup.Period.length":
|
||||
if x.Length == nil {
|
||||
x.Length = new(durationpb.Duration)
|
||||
}
|
||||
return protoreflect.ValueOfMessage(x.Length.ProtoReflect())
|
||||
case "cosmos.lockup.Period.amount":
|
||||
if x.Amount == nil {
|
||||
x.Amount = []*v1beta1.Coin{}
|
||||
}
|
||||
value := &_Period_2_list{list: &x.Amount}
|
||||
return protoreflect.ValueOfList(value)
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.Period"))
|
||||
}
|
||||
panic(fmt.Errorf("message cosmos.lockup.Period 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_Period) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
case "cosmos.lockup.Period.length":
|
||||
m := new(durationpb.Duration)
|
||||
return protoreflect.ValueOfMessage(m.ProtoReflect())
|
||||
case "cosmos.lockup.Period.amount":
|
||||
list := []*v1beta1.Coin{}
|
||||
return protoreflect.ValueOfList(&_Period_2_list{list: &list})
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.Period"))
|
||||
}
|
||||
panic(fmt.Errorf("message cosmos.lockup.Period 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_Period) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||
switch d.FullName() {
|
||||
default:
|
||||
panic(fmt.Errorf("%s is not a oneof field in cosmos.lockup.Period", 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_Period) 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_Period) 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_Period) 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_Period) ProtoMethods() *protoiface.Methods {
|
||||
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
|
||||
x := input.Message.Interface().(*Period)
|
||||
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.Length != nil {
|
||||
l = options.Size(x.Length)
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
if len(x.Amount) > 0 {
|
||||
for _, e := range x.Amount {
|
||||
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().(*Period)
|
||||
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.Amount) > 0 {
|
||||
for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- {
|
||||
encoded, err := options.Marshal(x.Amount[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.Length != nil {
|
||||
encoded, err := options.Marshal(x.Length)
|
||||
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().(*Period)
|
||||
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: Period: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Period: 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 Length", 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.Length == nil {
|
||||
x.Length = &durationpb.Duration{}
|
||||
}
|
||||
if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Length); 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 Amount", 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.Amount = append(x.Amount, &v1beta1.Coin{})
|
||||
if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-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: cosmos/lockup/lockup.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)
|
||||
)
|
||||
|
||||
// Period defines a length of time and amount of coins that will be lock.
|
||||
type Period struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Period duration
|
||||
Length *durationpb.Duration `protobuf:"bytes,1,opt,name=length,proto3" json:"length,omitempty"`
|
||||
Amount []*v1beta1.Coin `protobuf:"bytes,2,rep,name=amount,proto3" json:"amount,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Period) Reset() {
|
||||
*x = Period{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_cosmos_lockup_lockup_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Period) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Period) ProtoMessage() {}
|
||||
|
||||
// Deprecated: Use Period.ProtoReflect.Descriptor instead.
|
||||
func (*Period) Descriptor() ([]byte, []int) {
|
||||
return file_cosmos_lockup_lockup_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Period) GetLength() *durationpb.Duration {
|
||||
if x != nil {
|
||||
return x.Length
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Period) GetAmount() []*v1beta1.Coin {
|
||||
if x != nil {
|
||||
return x.Amount
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_cosmos_lockup_lockup_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_cosmos_lockup_lockup_proto_rawDesc = []byte{
|
||||
0x0a, 0x1a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2f,
|
||||
0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x63, 0x6f,
|
||||
0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x1a, 0x11, 0x61, 0x6d, 0x69,
|
||||
0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e,
|
||||
0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65,
|
||||
0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14,
|
||||
0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc5, 0x01, 0x0a, 0x06, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12,
|
||||
0x40, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
|
||||
0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00,
|
||||
0x98, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74,
|
||||
0x68, 0x12, 0x79, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e,
|
||||
0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x46, 0xc8, 0xde,
|
||||
0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
|
||||
0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73,
|
||||
0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x9a, 0xe7,
|
||||
0xb0, 0x2a, 0x0c, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0xa8,
|
||||
0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x95, 0x01, 0x0a,
|
||||
0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x6b,
|
||||
0x75, 0x70, 0x42, 0x0b, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
|
||||
0x01, 0x5a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f,
|
||||
0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75,
|
||||
0x70, 0xa2, 0x02, 0x03, 0x43, 0x4c, 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73,
|
||||
0x2e, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73,
|
||||
0x5c, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73,
|
||||
0x5c, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64,
|
||||
0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x4c, 0x6f,
|
||||
0x63, 0x6b, 0x75, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_cosmos_lockup_lockup_proto_rawDescOnce sync.Once
|
||||
file_cosmos_lockup_lockup_proto_rawDescData = file_cosmos_lockup_lockup_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_cosmos_lockup_lockup_proto_rawDescGZIP() []byte {
|
||||
file_cosmos_lockup_lockup_proto_rawDescOnce.Do(func() {
|
||||
file_cosmos_lockup_lockup_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_lockup_lockup_proto_rawDescData)
|
||||
})
|
||||
return file_cosmos_lockup_lockup_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_cosmos_lockup_lockup_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_cosmos_lockup_lockup_proto_goTypes = []interface{}{
|
||||
(*Period)(nil), // 0: cosmos.lockup.Period
|
||||
(*durationpb.Duration)(nil), // 1: google.protobuf.Duration
|
||||
(*v1beta1.Coin)(nil), // 2: cosmos.base.v1beta1.Coin
|
||||
}
|
||||
var file_cosmos_lockup_lockup_proto_depIdxs = []int32{
|
||||
1, // 0: cosmos.lockup.Period.length:type_name -> google.protobuf.Duration
|
||||
2, // 1: cosmos.lockup.Period.amount:type_name -> cosmos.base.v1beta1.Coin
|
||||
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_cosmos_lockup_lockup_proto_init() }
|
||||
func file_cosmos_lockup_lockup_proto_init() {
|
||||
if File_cosmos_lockup_lockup_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_cosmos_lockup_lockup_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Period); 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_cosmos_lockup_lockup_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_cosmos_lockup_lockup_proto_goTypes,
|
||||
DependencyIndexes: file_cosmos_lockup_lockup_proto_depIdxs,
|
||||
MessageInfos: file_cosmos_lockup_lockup_proto_msgTypes,
|
||||
}.Build()
|
||||
File_cosmos_lockup_lockup_proto = out.File
|
||||
file_cosmos_lockup_lockup_proto_rawDesc = nil
|
||||
file_cosmos_lockup_lockup_proto_goTypes = nil
|
||||
file_cosmos_lockup_lockup_proto_depIdxs = nil
|
||||
}
|
||||
2891
api/cosmos/lockup/query.pulsar.go
Normal file
2891
api/cosmos/lockup/query.pulsar.go
Normal file
File diff suppressed because it is too large
Load Diff
6162
api/cosmos/lockup/tx.pulsar.go
Normal file
6162
api/cosmos/lockup/tx.pulsar.go
Normal file
File diff suppressed because it is too large
Load Diff
@ -38,4 +38,5 @@ use (
|
||||
./x/staking
|
||||
./x/tx
|
||||
./x/upgrade
|
||||
./x/accounts/defaults/lockup
|
||||
)
|
||||
|
||||
@ -22,6 +22,7 @@ import (
|
||||
"cosmossdk.io/x/accounts"
|
||||
"cosmossdk.io/x/accounts/accountstd"
|
||||
baseaccount "cosmossdk.io/x/accounts/defaults/base"
|
||||
lockup "cosmossdk.io/x/accounts/lockup"
|
||||
"cosmossdk.io/x/accounts/testing/account_abstraction"
|
||||
"cosmossdk.io/x/accounts/testing/counter"
|
||||
"cosmossdk.io/x/auth"
|
||||
@ -290,6 +291,11 @@ func NewSimApp(
|
||||
// TESTING: do not add
|
||||
accountstd.AddAccount("counter", counter.NewAccount),
|
||||
accountstd.AddAccount("aa_minimal", account_abstraction.NewMinimalAbstractedAccount),
|
||||
// Lockup account
|
||||
accountstd.AddAccount(lockup.CONTINUOUS_LOCKING_ACCOUNT, lockup.NewContinuousLockingAccount),
|
||||
accountstd.AddAccount(lockup.PERIODIC_LOCKING_ACCOUNT, lockup.NewPeriodicLockingAccount),
|
||||
accountstd.AddAccount(lockup.DELAYED_LOCKING_ACCOUNT, lockup.NewDelayedLockingAccount),
|
||||
accountstd.AddAccount(lockup.PERMANENT_LOCKING_ACCOUNT, lockup.NewPermanentLockingAccount),
|
||||
// PRODUCTION: add
|
||||
baseaccount.NewAccount("base", txConfig.SignModeHandler()),
|
||||
)
|
||||
|
||||
@ -33,22 +33,23 @@ require (
|
||||
google.golang.org/protobuf v1.33.0
|
||||
)
|
||||
|
||||
require cosmossdk.io/x/accounts v0.0.0-20240104091155-b729e981f130
|
||||
require cosmossdk.io/x/accounts v0.0.0-20240226161501-23359a0b6d91
|
||||
|
||||
require (
|
||||
cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000
|
||||
cosmossdk.io/x/accounts/lockup v0.0.0-00010101000000-000000000000
|
||||
cosmossdk.io/x/auth v0.0.0-20240226161501-23359a0b6d91
|
||||
cosmossdk.io/x/authz v0.0.0-00010101000000-000000000000
|
||||
cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000
|
||||
cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91
|
||||
cosmossdk.io/x/distribution v0.0.0-20240227221813-a248d05f70f4
|
||||
cosmossdk.io/x/gov v0.0.0-20231113122742-912390d5fc4a
|
||||
cosmossdk.io/x/group v0.0.0-00010101000000-000000000000
|
||||
cosmossdk.io/x/mint v0.0.0-00010101000000-000000000000
|
||||
cosmossdk.io/x/slashing v0.0.0-00010101000000-000000000000
|
||||
cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000
|
||||
cosmossdk.io/x/staking v0.0.0-20240226161501-23359a0b6d91
|
||||
)
|
||||
|
||||
require (
|
||||
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20230509103710-5e5b9fdd0180.1 // indirect
|
||||
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20240130113600-88ef6483f90f.1 // indirect
|
||||
buf.build/gen/go/tendermint/tendermint/protocolbuffers/go v1.32.0-20231117195010-33ed361a9051.1 // indirect
|
||||
cloud.google.com/go v0.112.0 // indirect
|
||||
cloud.google.com/go/compute v1.24.0 // indirect
|
||||
@ -69,7 +70,7 @@ require (
|
||||
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/cenkalti/backoff/v4 v4.1.3 // indirect
|
||||
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
|
||||
github.com/cespare/xxhash v1.1.0 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||
github.com/chzyer/readline v1.5.1 // indirect
|
||||
@ -79,7 +80,7 @@ require (
|
||||
github.com/cockroachdb/pebble v1.1.0 // indirect
|
||||
github.com/cockroachdb/redact v1.1.5 // 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.11.0 // indirect
|
||||
github.com/cosmos/btcutil v1.0.5 // indirect
|
||||
github.com/cosmos/cosmos-proto v1.0.0-beta.4 // indirect
|
||||
github.com/cosmos/go-bip39 v1.0.0 // indirect
|
||||
@ -89,7 +90,7 @@ require (
|
||||
github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect
|
||||
github.com/creachadair/atomicfile v0.3.3 // indirect
|
||||
github.com/creachadair/tomledit v0.0.25 // indirect
|
||||
github.com/danieljoos/wincred v1.2.0 // indirect
|
||||
github.com/danieljoos/wincred v1.2.1 // indirect
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
||||
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
|
||||
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect
|
||||
@ -99,7 +100,7 @@ require (
|
||||
github.com/dustin/go-humanize v1.0.1 // indirect
|
||||
github.com/dvsekhvalnov/jose2go v1.6.0 // indirect
|
||||
github.com/emicklei/dot v1.6.1 // indirect
|
||||
github.com/fatih/color v1.15.0 // indirect
|
||||
github.com/fatih/color v1.16.0 // indirect
|
||||
github.com/felixge/httpsnoop v1.0.4 // indirect
|
||||
github.com/fsnotify/fsnotify v1.7.0 // indirect
|
||||
github.com/getsentry/sentry-go v0.27.0 // indirect
|
||||
@ -124,16 +125,16 @@ require (
|
||||
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
|
||||
github.com/gorilla/handlers v1.5.2 // indirect
|
||||
github.com/gorilla/mux v1.8.1 // indirect
|
||||
github.com/gorilla/websocket v1.5.0 // indirect
|
||||
github.com/gorilla/websocket v1.5.1 // indirect
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
|
||||
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
|
||||
github.com/hashicorp/go-getter v1.7.3 // indirect
|
||||
github.com/hashicorp/go-hclog v1.5.0 // indirect
|
||||
github.com/hashicorp/go-hclog v1.6.2 // indirect
|
||||
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
|
||||
github.com/hashicorp/go-metrics v0.5.3 // indirect
|
||||
github.com/hashicorp/go-plugin v1.5.2 // indirect
|
||||
github.com/hashicorp/go-plugin v1.6.0 // indirect
|
||||
github.com/hashicorp/go-safetemp v1.0.0 // indirect
|
||||
github.com/hashicorp/go-version v1.6.0 // indirect
|
||||
github.com/hashicorp/golang-lru v1.0.2 // indirect
|
||||
@ -178,7 +179,7 @@ require (
|
||||
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
|
||||
github.com/rivo/uniseg v0.2.0 // indirect
|
||||
github.com/rogpeppe/go-internal v1.12.0 // indirect
|
||||
github.com/rs/cors v1.8.3 // indirect
|
||||
github.com/rs/cors v1.10.1 // indirect
|
||||
github.com/rs/zerolog v1.32.0 // indirect
|
||||
github.com/sagikazarmark/locafero v0.4.0 // indirect
|
||||
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
|
||||
@ -194,7 +195,7 @@ require (
|
||||
github.com/zondax/ledger-go v0.14.3 // indirect
|
||||
gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b // indirect
|
||||
gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect
|
||||
go.etcd.io/bbolt v1.3.8 // indirect
|
||||
go.etcd.io/bbolt v1.3.9 // indirect
|
||||
go.opencensus.io v0.24.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect
|
||||
@ -215,14 +216,14 @@ require (
|
||||
golang.org/x/tools v0.18.0 // indirect
|
||||
google.golang.org/api v0.162.0 // indirect
|
||||
google.golang.org/appengine v1.6.8 // indirect
|
||||
google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 // indirect
|
||||
google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect
|
||||
google.golang.org/grpc v1.62.1 // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
gotest.tools/v3 v3.5.1 // indirect
|
||||
nhooyr.io/websocket v1.8.6 // indirect
|
||||
nhooyr.io/websocket v1.8.10 // indirect
|
||||
pgregory.net/rapid v1.1.0 // indirect
|
||||
rsc.io/qr v0.2.0 // indirect
|
||||
sigs.k8s.io/yaml v1.4.0 // indirect
|
||||
@ -238,10 +239,12 @@ require (
|
||||
replace (
|
||||
cosmossdk.io/api => ../api
|
||||
cosmossdk.io/client/v2 => ../client/v2
|
||||
cosmossdk.io/collections => ../collections
|
||||
cosmossdk.io/core => ../core
|
||||
cosmossdk.io/depinject => ../depinject
|
||||
cosmossdk.io/tools/confix => ../tools/confix
|
||||
cosmossdk.io/x/accounts => ../x/accounts
|
||||
cosmossdk.io/x/accounts/lockup => ../x/accounts/defaults/lockup
|
||||
cosmossdk.io/x/auth => ../x/auth
|
||||
cosmossdk.io/x/authz => ../x/authz
|
||||
cosmossdk.io/x/bank => ../x/bank
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20230509103710-5e5b9fdd0180.1 h1:7LKjxs607BNfGhtKLf+bi3SDJgpiGuTgOvemojsH8Hc=
|
||||
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20230509103710-5e5b9fdd0180.1/go.mod h1:5GqIYthcy/ASmnKcaT26APpxMhZirnIHXHKki69zjWI=
|
||||
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20240130113600-88ef6483f90f.1 h1:68Z59OMFg4fY0XXsJWPZJQxB92R4pw6b5qphrWfHtro=
|
||||
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20240130113600-88ef6483f90f.1/go.mod h1:5GqIYthcy/ASmnKcaT26APpxMhZirnIHXHKki69zjWI=
|
||||
buf.build/gen/go/tendermint/tendermint/protocolbuffers/go v1.32.0-20231117195010-33ed361a9051.1 h1:VooqQ3rklp3PwMTAE890M76w/8Z01OPa7RdgU9posFE=
|
||||
buf.build/gen/go/tendermint/tendermint/protocolbuffers/go v1.32.0-20231117195010-33ed361a9051.1/go.mod h1:9KmeMJUsSG3IiIwK63Lh1ipZJrwd7KHrWZseJeHukcs=
|
||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
@ -188,8 +189,6 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX
|
||||
cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg=
|
||||
cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0=
|
||||
cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M=
|
||||
cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s=
|
||||
cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0=
|
||||
cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0=
|
||||
cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U=
|
||||
cosmossdk.io/log v1.3.1 h1:UZx8nWIkfbbNEWusZqzAx3ZGvu54TZacWib3EzUYmGI=
|
||||
@ -270,14 +269,13 @@ github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtyd
|
||||
github.com/bufbuild/protocompile v0.5.1 h1:mixz5lJX4Hiz4FpqFREJHIXLfaLBntfaJv1h+/jS+Qg=
|
||||
github.com/bufbuild/protocompile v0.5.1/go.mod h1:G5iLmavmF4NsYtpZFvE3B/zFch2GIY8+wjsYLR/lc40=
|
||||
github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
|
||||
github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s=
|
||||
github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U=
|
||||
github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ=
|
||||
github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4=
|
||||
github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
|
||||
github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
|
||||
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.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
|
||||
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
|
||||
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
|
||||
@ -286,7 +284,6 @@ github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj
|
||||
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s=
|
||||
github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY=
|
||||
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams=
|
||||
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk=
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM=
|
||||
@ -330,8 +327,8 @@ github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:
|
||||
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
|
||||
github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU=
|
||||
github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg=
|
||||
github.com/cometbft/cometbft-db v0.9.1 h1:MIhVX5ja5bXNHF8EYrThkG9F7r9kSfv8BX4LWaxWJ4M=
|
||||
github.com/cometbft/cometbft-db v0.9.1/go.mod h1:iliyWaoV0mRwBJoizElCwwRA9Tf7jZJOURcRZF9m60U=
|
||||
github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8=
|
||||
github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc=
|
||||
github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg=
|
||||
github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM=
|
||||
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
@ -372,8 +369,8 @@ github.com/creachadair/tomledit v0.0.25 h1:QBzoVTd4hVsKF4tTrrHFbrtAbxT41WvW348aE
|
||||
github.com/creachadair/tomledit v0.0.25/go.mod h1:m4Z0a8730G9sNfBkfbFAM+iw2cBBr/YmNeSjTnBCkfw=
|
||||
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/danieljoos/wincred v1.2.0 h1:ozqKHaLK0W/ii4KVbbvluM91W2H3Sh0BncbUNPS7jLE=
|
||||
github.com/danieljoos/wincred v1.2.0/go.mod h1:FzQLLMKBFdvu+osBrnFODiv32YGwCfx0SkRa/eYHgec=
|
||||
github.com/danieljoos/wincred v1.2.1 h1:dl9cBrupW8+r5250DYkYxocLeZ1Y4vB1kxgtjxw8GQs=
|
||||
github.com/danieljoos/wincred v1.2.1/go.mod h1:uGaFL9fDn3OLTvzCGulzE+SzjEe5NGlh5FdCcyfPwps=
|
||||
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.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
|
||||
@ -424,8 +421,8 @@ github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU
|
||||
github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew=
|
||||
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.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs=
|
||||
github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw=
|
||||
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
|
||||
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
|
||||
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
|
||||
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
|
||||
github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw=
|
||||
@ -438,14 +435,11 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
|
||||
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
|
||||
github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU=
|
||||
github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA=
|
||||
github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps=
|
||||
github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
|
||||
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
|
||||
github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg=
|
||||
github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU=
|
||||
github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA=
|
||||
github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=
|
||||
@ -471,21 +465,14 @@ github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ4
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
||||
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
|
||||
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
|
||||
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
|
||||
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
|
||||
github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js=
|
||||
github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU=
|
||||
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0=
|
||||
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo=
|
||||
github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8=
|
||||
github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
|
||||
github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo=
|
||||
github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
|
||||
github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
|
||||
github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
|
||||
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0=
|
||||
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4=
|
||||
@ -626,8 +613,8 @@ github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
|
||||
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
|
||||
github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
||||
github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
|
||||
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY=
|
||||
github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI=
|
||||
@ -647,8 +634,8 @@ github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9n
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
|
||||
github.com/hashicorp/go-getter v1.7.3 h1:bN2+Fw9XPFvOCjB0UOevFIMICZ7G2XSQHzfvLUyOM5E=
|
||||
github.com/hashicorp/go-getter v1.7.3/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744=
|
||||
github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c=
|
||||
github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
|
||||
github.com/hashicorp/go-hclog v1.6.2 h1:NOtoftovWkDheyUM/8JW3QMiXyxJK3uHRK7wV04nD2I=
|
||||
github.com/hashicorp/go-hclog v1.6.2/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
|
||||
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
|
||||
github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc=
|
||||
github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
|
||||
@ -656,8 +643,8 @@ github.com/hashicorp/go-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYS
|
||||
github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE=
|
||||
github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
|
||||
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
|
||||
github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y=
|
||||
github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4=
|
||||
github.com/hashicorp/go-plugin v1.6.0 h1:wgd4KxHJTVGGqWBq4QPB1i5BZNEx9BR8+OFmHDmTk8A=
|
||||
github.com/hashicorp/go-plugin v1.6.0/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI=
|
||||
github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs=
|
||||
github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=
|
||||
github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo=
|
||||
@ -717,7 +704,6 @@ github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u
|
||||
github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
||||
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
|
||||
@ -735,7 +721,6 @@ github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrD
|
||||
github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg=
|
||||
github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
|
||||
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
||||
github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk=
|
||||
github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY=
|
||||
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=
|
||||
@ -747,7 +732,6 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q=
|
||||
github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4=
|
||||
github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw=
|
||||
github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
||||
@ -802,11 +786,9 @@ github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh
|
||||
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
||||
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/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/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||
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=
|
||||
@ -932,8 +914,8 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f
|
||||
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
|
||||
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
|
||||
github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
|
||||
github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo=
|
||||
github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=
|
||||
github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo=
|
||||
github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=
|
||||
github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
|
||||
github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0=
|
||||
github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss=
|
||||
@ -1017,10 +999,8 @@ github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI=
|
||||
github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY=
|
||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
|
||||
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
|
||||
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
|
||||
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
|
||||
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
|
||||
github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU=
|
||||
github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
|
||||
github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
|
||||
github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8=
|
||||
@ -1044,8 +1024,8 @@ gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b/go.mod h1:/y
|
||||
gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 h1:qwDnMxjkyLmAFgcfgTnfJrmYKWhHnci3GjDqcZp1M3Q=
|
||||
gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02/go.mod h1:JTnUj0mpYiAsuZLmKjTx/ex3AtMowcCgnE7YNyCEP0I=
|
||||
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||
go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA=
|
||||
go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw=
|
||||
go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI=
|
||||
go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE=
|
||||
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=
|
||||
go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
|
||||
go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
|
||||
@ -1086,7 +1066,6 @@ 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.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
|
||||
golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
|
||||
golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k=
|
||||
golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
|
||||
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=
|
||||
@ -1626,10 +1605,10 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw
|
||||
google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM=
|
||||
google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM=
|
||||
google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s=
|
||||
google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y=
|
||||
google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 h1:x9PwdEgd11LgK+orcck69WVRo7DezSO4VUMPI4xpc8A=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014/go.mod h1:rbHMSEDyoYX62nRVLOCc4Qt1HbsdytAYoVwgjiOhF3I=
|
||||
google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c h1:Zmyn5CV/jxzKnF+3d+xzbomACPwLQqVpLTpyXN5uTaQ=
|
||||
google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c h1:9g7erC9qu44ks7UK4gDNlnk4kOxZG707xKm4jVniy6o=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c h1:NUsgEN92SQQqzfA+YtqYNqYmB3DMMYLlIwUZAQFVFbo=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY=
|
||||
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
|
||||
@ -1737,8 +1716,9 @@ 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-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=
|
||||
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.10 h1:mv4p+MnGrLDcPlBoWsvPP7XCzTYMXP9F9eIGoKbgx7Q=
|
||||
nhooyr.io/websocket v1.8.10/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c=
|
||||
pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw=
|
||||
pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04=
|
||||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||
|
||||
36
tests/go.mod
36
tests/go.mod
@ -36,22 +36,22 @@ require (
|
||||
)
|
||||
|
||||
require (
|
||||
cosmossdk.io/x/accounts v0.0.0-20240104091155-b729e981f130
|
||||
cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000
|
||||
cosmossdk.io/x/accounts v0.0.0-20240226161501-23359a0b6d91
|
||||
cosmossdk.io/x/auth v0.0.0-20240226161501-23359a0b6d91
|
||||
cosmossdk.io/x/authz v0.0.0-00010101000000-000000000000
|
||||
cosmossdk.io/x/bank v0.0.0-00010101000000-000000000000
|
||||
cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91
|
||||
cosmossdk.io/x/distribution v0.0.0-20240227221813-a248d05f70f4
|
||||
cosmossdk.io/x/gov v0.0.0-20231113122742-912390d5fc4a
|
||||
cosmossdk.io/x/group v0.0.0-00010101000000-000000000000
|
||||
cosmossdk.io/x/mint v0.0.0-00010101000000-000000000000
|
||||
cosmossdk.io/x/slashing v0.0.0-00010101000000-000000000000
|
||||
cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000
|
||||
cosmossdk.io/x/staking v0.0.0-20240226161501-23359a0b6d91
|
||||
github.com/google/go-cmp v0.6.0
|
||||
github.com/jhump/protoreflect v1.15.6
|
||||
)
|
||||
|
||||
require (
|
||||
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20230509103710-5e5b9fdd0180.1 // indirect
|
||||
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20240130113600-88ef6483f90f.1 // indirect
|
||||
buf.build/gen/go/tendermint/tendermint/protocolbuffers/go v1.32.0-20231117195010-33ed361a9051.1 // indirect
|
||||
cloud.google.com/go v0.112.0 // indirect
|
||||
cloud.google.com/go/compute v1.24.0 // indirect
|
||||
@ -59,6 +59,7 @@ require (
|
||||
cloud.google.com/go/iam v1.1.6 // indirect
|
||||
cloud.google.com/go/storage v1.36.0 // indirect
|
||||
cosmossdk.io/client/v2 v2.0.0-20230630094428-02b760776860 // indirect
|
||||
cosmossdk.io/x/accounts/lockup v0.0.0-00010101000000-000000000000 // indirect
|
||||
cosmossdk.io/x/circuit v0.0.0-20230613133644-0a778132a60f // indirect
|
||||
filippo.io/edwards25519 v1.1.0 // indirect
|
||||
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
|
||||
@ -73,7 +74,7 @@ require (
|
||||
github.com/bits-and-blooms/bitset v1.10.0 // indirect
|
||||
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
|
||||
github.com/bufbuild/protocompile v0.8.0 // indirect
|
||||
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
|
||||
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
|
||||
github.com/cespare/xxhash v1.1.0 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||
github.com/chzyer/readline v1.5.1 // indirect
|
||||
@ -83,14 +84,14 @@ require (
|
||||
github.com/cockroachdb/pebble v1.1.0 // indirect
|
||||
github.com/cockroachdb/redact v1.1.5 // 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.11.0 // indirect
|
||||
github.com/cosmos/btcutil v1.0.5 // indirect
|
||||
github.com/cosmos/go-bip39 v1.0.0 // indirect
|
||||
github.com/cosmos/gogogateway v1.2.0 // indirect
|
||||
github.com/cosmos/iavl v1.0.1 // indirect
|
||||
github.com/cosmos/ics23/go v0.10.0 // indirect
|
||||
github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect
|
||||
github.com/danieljoos/wincred v1.2.0 // indirect
|
||||
github.com/danieljoos/wincred v1.2.1 // indirect
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
||||
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
|
||||
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect
|
||||
@ -100,7 +101,7 @@ require (
|
||||
github.com/dustin/go-humanize v1.0.1 // indirect
|
||||
github.com/dvsekhvalnov/jose2go v1.6.0 // indirect
|
||||
github.com/emicklei/dot v1.6.1 // indirect
|
||||
github.com/fatih/color v1.15.0 // indirect
|
||||
github.com/fatih/color v1.16.0 // indirect
|
||||
github.com/felixge/httpsnoop v1.0.4 // indirect
|
||||
github.com/fsnotify/fsnotify v1.7.0 // indirect
|
||||
github.com/getsentry/sentry-go v0.27.0 // indirect
|
||||
@ -124,16 +125,16 @@ require (
|
||||
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
|
||||
github.com/gorilla/handlers v1.5.2 // indirect
|
||||
github.com/gorilla/mux v1.8.1 // indirect
|
||||
github.com/gorilla/websocket v1.5.0 // indirect
|
||||
github.com/gorilla/websocket v1.5.1 // indirect
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
|
||||
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
|
||||
github.com/hashicorp/go-getter v1.7.3 // indirect
|
||||
github.com/hashicorp/go-hclog v1.5.0 // indirect
|
||||
github.com/hashicorp/go-hclog v1.6.2 // indirect
|
||||
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
|
||||
github.com/hashicorp/go-metrics v0.5.3 // indirect
|
||||
github.com/hashicorp/go-plugin v1.5.2 // indirect
|
||||
github.com/hashicorp/go-plugin v1.6.0 // indirect
|
||||
github.com/hashicorp/go-safetemp v1.0.0 // indirect
|
||||
github.com/hashicorp/go-version v1.6.0 // indirect
|
||||
github.com/hashicorp/golang-lru v1.0.2 // indirect
|
||||
@ -173,7 +174,7 @@ require (
|
||||
github.com/prometheus/procfs v0.12.0 // indirect
|
||||
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
|
||||
github.com/rogpeppe/go-internal v1.12.0 // indirect
|
||||
github.com/rs/cors v1.8.3 // indirect
|
||||
github.com/rs/cors v1.10.1 // indirect
|
||||
github.com/rs/zerolog v1.32.0 // indirect
|
||||
github.com/sagikazarmark/locafero v0.4.0 // indirect
|
||||
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
|
||||
@ -192,7 +193,7 @@ require (
|
||||
github.com/zondax/ledger-go v0.14.3 // indirect
|
||||
gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b // indirect
|
||||
gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect
|
||||
go.etcd.io/bbolt v1.3.8 // indirect
|
||||
go.etcd.io/bbolt v1.3.9 // indirect
|
||||
go.opencensus.io v0.24.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect
|
||||
@ -213,12 +214,12 @@ require (
|
||||
golang.org/x/tools v0.18.0 // indirect
|
||||
google.golang.org/api v0.162.0 // indirect
|
||||
google.golang.org/appengine v1.6.8 // indirect
|
||||
google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 // indirect
|
||||
google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
nhooyr.io/websocket v1.8.6 // indirect
|
||||
nhooyr.io/websocket v1.8.10 // indirect
|
||||
sigs.k8s.io/yaml v1.4.0 // indirect
|
||||
)
|
||||
|
||||
@ -235,6 +236,7 @@ replace (
|
||||
cosmossdk.io/core => ../core
|
||||
cosmossdk.io/depinject => ../depinject
|
||||
cosmossdk.io/x/accounts => ../x/accounts
|
||||
cosmossdk.io/x/accounts/lockup => ../x/accounts/defaults/lockup
|
||||
cosmossdk.io/x/auth => ../x/auth
|
||||
cosmossdk.io/x/authz => ../x/authz
|
||||
cosmossdk.io/x/bank => ../x/bank
|
||||
|
||||
74
tests/go.sum
74
tests/go.sum
@ -1,5 +1,6 @@
|
||||
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20230509103710-5e5b9fdd0180.1 h1:7LKjxs607BNfGhtKLf+bi3SDJgpiGuTgOvemojsH8Hc=
|
||||
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20230509103710-5e5b9fdd0180.1/go.mod h1:5GqIYthcy/ASmnKcaT26APpxMhZirnIHXHKki69zjWI=
|
||||
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20240130113600-88ef6483f90f.1 h1:68Z59OMFg4fY0XXsJWPZJQxB92R4pw6b5qphrWfHtro=
|
||||
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20240130113600-88ef6483f90f.1/go.mod h1:5GqIYthcy/ASmnKcaT26APpxMhZirnIHXHKki69zjWI=
|
||||
buf.build/gen/go/tendermint/tendermint/protocolbuffers/go v1.32.0-20231117195010-33ed361a9051.1 h1:VooqQ3rklp3PwMTAE890M76w/8Z01OPa7RdgU9posFE=
|
||||
buf.build/gen/go/tendermint/tendermint/protocolbuffers/go v1.32.0-20231117195010-33ed361a9051.1/go.mod h1:9KmeMJUsSG3IiIwK63Lh1ipZJrwd7KHrWZseJeHukcs=
|
||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
@ -271,8 +272,8 @@ github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n
|
||||
github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4=
|
||||
github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
|
||||
github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
|
||||
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.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
|
||||
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
|
||||
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
|
||||
@ -322,8 +323,8 @@ github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:
|
||||
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
|
||||
github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU=
|
||||
github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg=
|
||||
github.com/cometbft/cometbft-db v0.9.1 h1:MIhVX5ja5bXNHF8EYrThkG9F7r9kSfv8BX4LWaxWJ4M=
|
||||
github.com/cometbft/cometbft-db v0.9.1/go.mod h1:iliyWaoV0mRwBJoizElCwwRA9Tf7jZJOURcRZF9m60U=
|
||||
github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8=
|
||||
github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc=
|
||||
github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg=
|
||||
github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM=
|
||||
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
@ -358,8 +359,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:ma
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/danieljoos/wincred v1.2.0 h1:ozqKHaLK0W/ii4KVbbvluM91W2H3Sh0BncbUNPS7jLE=
|
||||
github.com/danieljoos/wincred v1.2.0/go.mod h1:FzQLLMKBFdvu+osBrnFODiv32YGwCfx0SkRa/eYHgec=
|
||||
github.com/danieljoos/wincred v1.2.1 h1:dl9cBrupW8+r5250DYkYxocLeZ1Y4vB1kxgtjxw8GQs=
|
||||
github.com/danieljoos/wincred v1.2.1/go.mod h1:uGaFL9fDn3OLTvzCGulzE+SzjEe5NGlh5FdCcyfPwps=
|
||||
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.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
|
||||
@ -410,8 +411,8 @@ github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU
|
||||
github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew=
|
||||
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.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs=
|
||||
github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw=
|
||||
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
|
||||
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
|
||||
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
|
||||
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
|
||||
github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw=
|
||||
@ -428,11 +429,8 @@ github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyT
|
||||
github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps=
|
||||
github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
|
||||
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
|
||||
github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M=
|
||||
github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8=
|
||||
github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk=
|
||||
github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA=
|
||||
github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=
|
||||
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
||||
@ -458,25 +456,14 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
||||
github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
|
||||
github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU=
|
||||
github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs=
|
||||
github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA=
|
||||
github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho=
|
||||
github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA=
|
||||
github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI=
|
||||
github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ=
|
||||
github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU=
|
||||
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
||||
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0=
|
||||
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo=
|
||||
github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8=
|
||||
github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
|
||||
github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo=
|
||||
github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
|
||||
github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk=
|
||||
github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
|
||||
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0=
|
||||
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4=
|
||||
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||
@ -617,8 +604,8 @@ github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
|
||||
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
|
||||
github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
||||
github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
|
||||
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY=
|
||||
github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI=
|
||||
@ -638,8 +625,8 @@ github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9n
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
|
||||
github.com/hashicorp/go-getter v1.7.3 h1:bN2+Fw9XPFvOCjB0UOevFIMICZ7G2XSQHzfvLUyOM5E=
|
||||
github.com/hashicorp/go-getter v1.7.3/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744=
|
||||
github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c=
|
||||
github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
|
||||
github.com/hashicorp/go-hclog v1.6.2 h1:NOtoftovWkDheyUM/8JW3QMiXyxJK3uHRK7wV04nD2I=
|
||||
github.com/hashicorp/go-hclog v1.6.2/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
|
||||
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
|
||||
github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc=
|
||||
github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
|
||||
@ -647,8 +634,8 @@ github.com/hashicorp/go-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYS
|
||||
github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE=
|
||||
github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
|
||||
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
|
||||
github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y=
|
||||
github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4=
|
||||
github.com/hashicorp/go-plugin v1.6.0 h1:wgd4KxHJTVGGqWBq4QPB1i5BZNEx9BR8+OFmHDmTk8A=
|
||||
github.com/hashicorp/go-plugin v1.6.0/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI=
|
||||
github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs=
|
||||
github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=
|
||||
github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo=
|
||||
@ -708,8 +695,6 @@ github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u
|
||||
github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
||||
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
|
||||
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
|
||||
@ -736,8 +721,6 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
|
||||
github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w=
|
||||
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
|
||||
github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw=
|
||||
github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
||||
github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8=
|
||||
@ -785,12 +768,9 @@ github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh
|
||||
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
||||
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/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/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||
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/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
@ -914,8 +894,8 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f
|
||||
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
|
||||
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
|
||||
github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
|
||||
github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo=
|
||||
github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=
|
||||
github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo=
|
||||
github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=
|
||||
github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
|
||||
github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0=
|
||||
github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss=
|
||||
@ -997,12 +977,9 @@ github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI=
|
||||
github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY=
|
||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
|
||||
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
|
||||
github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo=
|
||||
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
|
||||
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
|
||||
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
|
||||
github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0=
|
||||
github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY=
|
||||
github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
|
||||
github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8=
|
||||
github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
|
||||
@ -1025,8 +1002,8 @@ gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b/go.mod h1:/y
|
||||
gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 h1:qwDnMxjkyLmAFgcfgTnfJrmYKWhHnci3GjDqcZp1M3Q=
|
||||
gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02/go.mod h1:JTnUj0mpYiAsuZLmKjTx/ex3AtMowcCgnE7YNyCEP0I=
|
||||
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||
go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA=
|
||||
go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw=
|
||||
go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI=
|
||||
go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE=
|
||||
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=
|
||||
go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
|
||||
go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
|
||||
@ -1587,10 +1564,10 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw
|
||||
google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM=
|
||||
google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM=
|
||||
google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s=
|
||||
google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y=
|
||||
google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 h1:x9PwdEgd11LgK+orcck69WVRo7DezSO4VUMPI4xpc8A=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014/go.mod h1:rbHMSEDyoYX62nRVLOCc4Qt1HbsdytAYoVwgjiOhF3I=
|
||||
google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c h1:Zmyn5CV/jxzKnF+3d+xzbomACPwLQqVpLTpyXN5uTaQ=
|
||||
google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c h1:9g7erC9qu44ks7UK4gDNlnk4kOxZG707xKm4jVniy6o=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c h1:NUsgEN92SQQqzfA+YtqYNqYmB3DMMYLlIwUZAQFVFbo=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY=
|
||||
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
|
||||
@ -1697,8 +1674,9 @@ 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-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=
|
||||
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.10 h1:mv4p+MnGrLDcPlBoWsvPP7XCzTYMXP9F9eIGoKbgx7Q=
|
||||
nhooyr.io/websocket v1.8.10/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c=
|
||||
pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw=
|
||||
pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04=
|
||||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||
|
||||
5
x/accounts/defaults/lockup/README.md
Normal file
5
x/accounts/defaults/lockup/README.md
Normal file
@ -0,0 +1,5 @@
|
||||
# x/accounts/lockup
|
||||
|
||||
<!--- TODO: need to expand more on this --->
|
||||
|
||||
The x/accounts/lockup module provides the implementation for lockup accounts within the x/accounts module.
|
||||
225
x/accounts/defaults/lockup/continuous_locking_account.go
Normal file
225
x/accounts/defaults/lockup/continuous_locking_account.go
Normal file
@ -0,0 +1,225 @@
|
||||
package lockup
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"cosmossdk.io/collections"
|
||||
collcodec "cosmossdk.io/collections/codec"
|
||||
"cosmossdk.io/math"
|
||||
"cosmossdk.io/x/accounts/accountstd"
|
||||
lockuptypes "cosmossdk.io/x/accounts/lockup/types"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
)
|
||||
|
||||
// Compile-time type assertions
|
||||
var (
|
||||
_ accountstd.Interface = (*ContinuousLockingAccount)(nil)
|
||||
)
|
||||
|
||||
// NewContinuousLockingAccount creates a new ContinuousLockingAccount object.
|
||||
func NewContinuousLockingAccount(d accountstd.Dependencies) (*ContinuousLockingAccount, error) {
|
||||
baseLockup := newBaseLockup(d)
|
||||
|
||||
ContinuousLockingAccount := ContinuousLockingAccount{
|
||||
BaseLockup: baseLockup,
|
||||
StartTime: collections.NewItem(d.SchemaBuilder, StartTimePrefix, "start_time", collcodec.KeyToValueCodec[time.Time](sdk.TimeKey)),
|
||||
}
|
||||
|
||||
return &ContinuousLockingAccount, nil
|
||||
}
|
||||
|
||||
type ContinuousLockingAccount struct {
|
||||
*BaseLockup
|
||||
StartTime collections.Item[time.Time]
|
||||
}
|
||||
|
||||
func (cva ContinuousLockingAccount) Init(ctx context.Context, msg *lockuptypes.MsgInitLockupAccount) (*lockuptypes.MsgInitLockupAccountResponse, error) {
|
||||
if msg.EndTime.IsZero() {
|
||||
return nil, sdkerrors.ErrInvalidRequest.Wrapf("invalid end time %s", msg.EndTime.String())
|
||||
}
|
||||
|
||||
if msg.EndTime.Before(msg.StartTime) {
|
||||
return nil, sdkerrors.ErrInvalidRequest.Wrap("invalid start and end time (must be start before end)")
|
||||
}
|
||||
|
||||
hs := cva.headerService.GetHeaderInfo(ctx)
|
||||
|
||||
start := msg.StartTime
|
||||
if msg.StartTime.IsZero() {
|
||||
start = hs.Time
|
||||
}
|
||||
|
||||
err := cva.StartTime.Set(ctx, start)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return cva.BaseLockup.Init(ctx, msg)
|
||||
}
|
||||
|
||||
func (cva *ContinuousLockingAccount) Delegate(ctx context.Context, msg *lockuptypes.MsgDelegate) (
|
||||
*lockuptypes.MsgExecuteMessagesResponse, error,
|
||||
) {
|
||||
return cva.BaseLockup.Delegate(ctx, msg, cva.GetLockedCoinsWithDenoms)
|
||||
}
|
||||
|
||||
func (cva *ContinuousLockingAccount) Undelegate(ctx context.Context, msg *lockuptypes.MsgUndelegate) (
|
||||
*lockuptypes.MsgExecuteMessagesResponse, error,
|
||||
) {
|
||||
return cva.BaseLockup.Undelegate(ctx, msg)
|
||||
}
|
||||
|
||||
func (cva *ContinuousLockingAccount) SendCoins(ctx context.Context, msg *lockuptypes.MsgSend) (
|
||||
*lockuptypes.MsgExecuteMessagesResponse, error,
|
||||
) {
|
||||
return cva.BaseLockup.SendCoins(ctx, msg, cva.GetLockedCoinsWithDenoms)
|
||||
}
|
||||
|
||||
func (cva *ContinuousLockingAccount) WithdrawUnlockedCoins(ctx context.Context, msg *lockuptypes.MsgWithdraw) (
|
||||
*lockuptypes.MsgWithdrawResponse, error,
|
||||
) {
|
||||
return cva.BaseLockup.WithdrawUnlockedCoins(ctx, msg, cva.GetLockedCoinsWithDenoms)
|
||||
}
|
||||
|
||||
// GetLockCoinsInfo returns the total number of unlocked and locked coins.
|
||||
func (cva ContinuousLockingAccount) GetLockCoinsInfo(ctx context.Context, blockTime time.Time) (unlockedCoins, lockedCoins sdk.Coins, err error) {
|
||||
unlockedCoins = sdk.Coins{}
|
||||
lockedCoins = sdk.Coins{}
|
||||
|
||||
// We must handle the case where the start time for a lockup account has
|
||||
// been set into the future or when the start of the chain is not exactly
|
||||
// known.
|
||||
startTime, err := cva.StartTime.Get(ctx)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
endTime, err := cva.EndTime.Get(ctx)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
var originalVesting sdk.Coins
|
||||
err = cva.IterateCoinEntries(ctx, cva.OriginalLocking, func(key string, value math.Int) (stop bool, err error) {
|
||||
originalVesting = append(originalVesting, sdk.NewCoin(key, value))
|
||||
vestedCoin, vestingCoin, err := cva.GetLockCoinInfoWithDenom(ctx, blockTime, key)
|
||||
if err != nil {
|
||||
return true, err
|
||||
}
|
||||
unlockedCoins = append(unlockedCoins, *vestedCoin)
|
||||
lockedCoins = append(lockedCoins, *vestingCoin)
|
||||
return false, nil
|
||||
})
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
if startTime.After(blockTime) {
|
||||
return unlockedCoins, originalVesting, nil
|
||||
} else if endTime.Before(blockTime) {
|
||||
return originalVesting, lockedCoins, nil
|
||||
}
|
||||
|
||||
return unlockedCoins, lockedCoins, nil
|
||||
}
|
||||
|
||||
// GetLockCoinInfoWithDenom returns the number of locked coin for a specific denom. If no coins are locked,
|
||||
// nil is returned.
|
||||
func (cva ContinuousLockingAccount) GetLockCoinInfoWithDenom(ctx context.Context, blockTime time.Time, denom string) (unlockedCoin, lockedCoin *sdk.Coin, err error) {
|
||||
// We must handle the case where the start time for a lockup account has
|
||||
// been set into the future or when the start of the chain is not exactly
|
||||
// known.
|
||||
startTime, err := cva.StartTime.Get(ctx)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
endTime, err := cva.EndTime.Get(ctx)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
originalLockingAmt, err := cva.OriginalLocking.Get(ctx, denom)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
originalLocking := sdk.NewCoin(denom, originalLockingAmt)
|
||||
if startTime.After(blockTime) {
|
||||
return &sdk.Coin{}, &originalLocking, nil
|
||||
} else if endTime.Before(blockTime) {
|
||||
return &originalLocking, &sdk.Coin{}, nil
|
||||
}
|
||||
|
||||
// calculate the locking scalar
|
||||
x := blockTime.Unix() - startTime.Unix()
|
||||
y := endTime.Unix() - startTime.Unix()
|
||||
s := math.LegacyNewDec(x).Quo(math.LegacyNewDec(y))
|
||||
|
||||
unlockedAmt := math.LegacyNewDecFromInt(originalLocking.Amount).Mul(s).RoundInt()
|
||||
unlocked := sdk.NewCoin(originalLocking.Denom, unlockedAmt)
|
||||
|
||||
locked := originalLocking.Sub(unlocked)
|
||||
|
||||
return &unlocked, &locked, nil
|
||||
}
|
||||
|
||||
// GetLockedCoins returns the total number of locked coins.
|
||||
func (cva ContinuousLockingAccount) GetLockedCoins(ctx context.Context, blockTime time.Time) (sdk.Coins, error) {
|
||||
_, lockedCoins, err := cva.GetLockCoinsInfo(ctx, blockTime)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return lockedCoins, nil
|
||||
}
|
||||
|
||||
// GetLockedCoinsWithDenoms returns the number of locked coin for a specific denom.
|
||||
func (cva ContinuousLockingAccount) GetLockedCoinsWithDenoms(ctx context.Context, blockTime time.Time, denoms ...string) (sdk.Coins, error) {
|
||||
lockedCoins := sdk.Coins{}
|
||||
for _, denom := range denoms {
|
||||
_, lockedCoin, err := cva.GetLockCoinInfoWithDenom(ctx, blockTime, denom)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
lockedCoins = append(lockedCoins, *lockedCoin)
|
||||
}
|
||||
|
||||
return lockedCoins, nil
|
||||
}
|
||||
|
||||
func (cva ContinuousLockingAccount) QueryLockupAccountInfo(ctx context.Context, req *lockuptypes.QueryLockupAccountInfoRequest) (
|
||||
*lockuptypes.QueryLockupAccountInfoResponse, error,
|
||||
) {
|
||||
resp, err := cva.BaseLockup.QueryLockupAccountBaseInfo(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
startTime, err := cva.StartTime.Get(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
hs := cva.headerService.GetHeaderInfo(ctx)
|
||||
unlockedCoins, lockedCoins, err := cva.GetLockCoinsInfo(ctx, hs.Time)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
resp.StartTime = &startTime
|
||||
resp.LockedCoins = lockedCoins
|
||||
resp.UnlockedCoins = unlockedCoins
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// Implement smart account interface
|
||||
func (cva ContinuousLockingAccount) RegisterInitHandler(builder *accountstd.InitBuilder) {
|
||||
accountstd.RegisterInitHandler(builder, cva.Init)
|
||||
}
|
||||
|
||||
func (cva ContinuousLockingAccount) RegisterExecuteHandlers(builder *accountstd.ExecuteBuilder) {
|
||||
accountstd.RegisterExecuteHandler(builder, cva.Delegate)
|
||||
accountstd.RegisterExecuteHandler(builder, cva.Undelegate)
|
||||
accountstd.RegisterExecuteHandler(builder, cva.SendCoins)
|
||||
accountstd.RegisterExecuteHandler(builder, cva.WithdrawUnlockedCoins)
|
||||
}
|
||||
|
||||
func (cva ContinuousLockingAccount) RegisterQueryHandlers(builder *accountstd.QueryBuilder) {
|
||||
accountstd.RegisterQueryHandler(builder, cva.QueryLockupAccountInfo)
|
||||
}
|
||||
158
x/accounts/defaults/lockup/delayed_locking_account.go
Normal file
158
x/accounts/defaults/lockup/delayed_locking_account.go
Normal file
@ -0,0 +1,158 @@
|
||||
package lockup
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"cosmossdk.io/math"
|
||||
"cosmossdk.io/x/accounts/accountstd"
|
||||
lockuptypes "cosmossdk.io/x/accounts/lockup/types"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
)
|
||||
|
||||
// Compile-time type assertions
|
||||
var (
|
||||
_ accountstd.Interface = (*DelayedLockingAccount)(nil)
|
||||
)
|
||||
|
||||
// NewDelayedLockingAccount creates a new DelayedLockingAccount object.
|
||||
func NewDelayedLockingAccount(d accountstd.Dependencies) (*DelayedLockingAccount, error) {
|
||||
baseLockup := newBaseLockup(d)
|
||||
return &DelayedLockingAccount{
|
||||
baseLockup,
|
||||
}, nil
|
||||
}
|
||||
|
||||
type DelayedLockingAccount struct {
|
||||
*BaseLockup
|
||||
}
|
||||
|
||||
func (dva DelayedLockingAccount) Init(ctx context.Context, msg *lockuptypes.MsgInitLockupAccount) (*lockuptypes.MsgInitLockupAccountResponse, error) {
|
||||
if msg.EndTime.IsZero() {
|
||||
return nil, sdkerrors.ErrInvalidRequest.Wrapf("invalid end time %s", msg.EndTime.String())
|
||||
}
|
||||
|
||||
return dva.BaseLockup.Init(ctx, msg)
|
||||
}
|
||||
|
||||
func (dva *DelayedLockingAccount) Delegate(ctx context.Context, msg *lockuptypes.MsgDelegate) (
|
||||
*lockuptypes.MsgExecuteMessagesResponse, error,
|
||||
) {
|
||||
return dva.BaseLockup.Delegate(ctx, msg, dva.GetLockedCoinsWithDenoms)
|
||||
}
|
||||
|
||||
func (dva *DelayedLockingAccount) Undelegate(ctx context.Context, msg *lockuptypes.MsgUndelegate) (
|
||||
*lockuptypes.MsgExecuteMessagesResponse, error,
|
||||
) {
|
||||
return dva.BaseLockup.Undelegate(ctx, msg)
|
||||
}
|
||||
|
||||
func (dva *DelayedLockingAccount) SendCoins(ctx context.Context, msg *lockuptypes.MsgSend) (
|
||||
*lockuptypes.MsgExecuteMessagesResponse, error,
|
||||
) {
|
||||
return dva.BaseLockup.SendCoins(ctx, msg, dva.GetLockedCoinsWithDenoms)
|
||||
}
|
||||
|
||||
func (dva *DelayedLockingAccount) WithdrawUnlockedCoins(ctx context.Context, msg *lockuptypes.MsgWithdraw) (
|
||||
*lockuptypes.MsgWithdrawResponse, error,
|
||||
) {
|
||||
return dva.BaseLockup.WithdrawUnlockedCoins(ctx, msg, dva.GetLockedCoinsWithDenoms)
|
||||
}
|
||||
|
||||
// GetLockCoinsInfo returns the total number of unlocked and locked coins.
|
||||
func (dva DelayedLockingAccount) GetLockCoinsInfo(ctx context.Context, blockTime time.Time) (sdk.Coins, sdk.Coins, error) {
|
||||
endTime, err := dva.EndTime.Get(ctx)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
originalLocking := sdk.Coins{}
|
||||
err = dva.IterateCoinEntries(ctx, dva.OriginalLocking, func(key string, value math.Int) (stop bool, err error) {
|
||||
originalLocking = append(originalLocking, sdk.NewCoin(key, value))
|
||||
return false, nil
|
||||
})
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
if blockTime.After(endTime) {
|
||||
return originalLocking, sdk.Coins{}, nil
|
||||
}
|
||||
|
||||
return sdk.Coins{}, originalLocking, nil
|
||||
}
|
||||
|
||||
// GetLockedCoins returns the total number of locked coins. If no coins are
|
||||
// locked, nil is returned.
|
||||
func (dva DelayedLockingAccount) GetLockedCoins(ctx context.Context, blockTime time.Time) (sdk.Coins, error) {
|
||||
_, lockedCoins, err := dva.GetLockCoinsInfo(ctx, blockTime)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return lockedCoins, nil
|
||||
}
|
||||
|
||||
// GetLockCoinInfoWithDenom returns the number of unlocked and locked coin for a specific denom.
|
||||
func (dva DelayedLockingAccount) GetLockCoinInfoWithDenom(ctx context.Context, blockTime time.Time, denom string) (*sdk.Coin, *sdk.Coin, error) {
|
||||
endTime, err := dva.EndTime.Get(ctx)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
originalLockingAmt, err := dva.OriginalLocking.Get(ctx, denom)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
originalLockingCoin := sdk.NewCoin(denom, originalLockingAmt)
|
||||
|
||||
if blockTime.After(endTime) {
|
||||
return &originalLockingCoin, &sdk.Coin{}, nil
|
||||
}
|
||||
|
||||
return &sdk.Coin{}, &originalLockingCoin, nil
|
||||
}
|
||||
|
||||
// GetLockedCoinsWithDenoms returns the number of locked coin for a specific denom.
|
||||
func (dva DelayedLockingAccount) GetLockedCoinsWithDenoms(ctx context.Context, blockTime time.Time, denoms ...string) (sdk.Coins, error) {
|
||||
vestingCoins := sdk.Coins{}
|
||||
for _, denom := range denoms {
|
||||
_, vestingCoin, err := dva.GetLockCoinInfoWithDenom(ctx, blockTime, denom)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
vestingCoins = append(vestingCoins, *vestingCoin)
|
||||
}
|
||||
return vestingCoins, nil
|
||||
}
|
||||
|
||||
func (dva DelayedLockingAccount) QueryVestingAccountInfo(ctx context.Context, req *lockuptypes.QueryLockupAccountInfoRequest) (
|
||||
*lockuptypes.QueryLockupAccountInfoResponse, error,
|
||||
) {
|
||||
resp, err := dva.BaseLockup.QueryLockupAccountBaseInfo(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
hs := dva.headerService.GetHeaderInfo(ctx)
|
||||
unlockedCoins, lockedCoins, err := dva.GetLockCoinsInfo(ctx, hs.Time)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
resp.LockedCoins = lockedCoins
|
||||
resp.UnlockedCoins = unlockedCoins
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// Implement smart account interface
|
||||
func (dva DelayedLockingAccount) RegisterInitHandler(builder *accountstd.InitBuilder) {
|
||||
accountstd.RegisterInitHandler(builder, dva.Init)
|
||||
}
|
||||
|
||||
func (dva DelayedLockingAccount) RegisterExecuteHandlers(builder *accountstd.ExecuteBuilder) {
|
||||
accountstd.RegisterExecuteHandler(builder, dva.Delegate)
|
||||
accountstd.RegisterExecuteHandler(builder, dva.Undelegate)
|
||||
accountstd.RegisterExecuteHandler(builder, dva.SendCoins)
|
||||
accountstd.RegisterExecuteHandler(builder, dva.WithdrawUnlockedCoins)
|
||||
}
|
||||
|
||||
func (dva DelayedLockingAccount) RegisterQueryHandlers(builder *accountstd.QueryBuilder) {
|
||||
accountstd.RegisterQueryHandler(builder, dva.QueryVestingAccountInfo)
|
||||
}
|
||||
184
x/accounts/defaults/lockup/go.mod
Normal file
184
x/accounts/defaults/lockup/go.mod
Normal file
@ -0,0 +1,184 @@
|
||||
module cosmossdk.io/x/accounts/lockup
|
||||
|
||||
go 1.21
|
||||
|
||||
require (
|
||||
cosmossdk.io/collections v0.4.0
|
||||
cosmossdk.io/core v0.12.1-0.20231114100755-569e3ff6a0d7
|
||||
cosmossdk.io/x/accounts v0.0.0-20240226161501-23359a0b6d91
|
||||
cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91
|
||||
github.com/cosmos/cosmos-sdk v0.51.0
|
||||
github.com/cosmos/gogoproto v1.4.11
|
||||
)
|
||||
|
||||
require (
|
||||
cosmossdk.io/api v0.7.3
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
|
||||
github.com/spf13/cobra v1.8.0 // indirect
|
||||
github.com/stretchr/testify v1.9.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect
|
||||
google.golang.org/grpc v1.62.1 // indirect
|
||||
google.golang.org/protobuf v1.33.0
|
||||
)
|
||||
|
||||
require (
|
||||
cosmossdk.io/errors v1.0.1
|
||||
cosmossdk.io/log v1.3.1 // indirect
|
||||
cosmossdk.io/math v1.3.0
|
||||
cosmossdk.io/store v1.0.2 // indirect
|
||||
cosmossdk.io/x/tx v0.13.1 // indirect
|
||||
filippo.io/edwards25519 v1.1.0 // indirect
|
||||
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
|
||||
github.com/99designs/keyring v1.2.2 // indirect
|
||||
github.com/DataDog/datadog-go v4.8.3+incompatible // indirect
|
||||
github.com/DataDog/zstd v1.5.5 // indirect
|
||||
github.com/Microsoft/go-winio v0.6.1 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect
|
||||
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
|
||||
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
|
||||
github.com/cespare/xxhash v1.1.0 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||
github.com/cockroachdb/errors v1.11.1 // indirect
|
||||
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
|
||||
github.com/cockroachdb/pebble v1.1.0 // indirect
|
||||
github.com/cockroachdb/redact v1.1.5 // indirect
|
||||
github.com/cometbft/cometbft v0.38.5 // indirect
|
||||
github.com/cometbft/cometbft-db v0.11.0 // indirect
|
||||
github.com/cosmos/btcutil v1.0.5 // indirect
|
||||
github.com/cosmos/cosmos-db v1.0.2 // indirect
|
||||
github.com/cosmos/cosmos-proto v1.0.0-beta.4
|
||||
github.com/cosmos/go-bip39 v1.0.0 // indirect
|
||||
github.com/cosmos/gogogateway v1.2.0 // indirect
|
||||
github.com/cosmos/iavl v1.0.1 // indirect
|
||||
github.com/cosmos/ics23/go v0.10.0 // indirect
|
||||
github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect
|
||||
github.com/danieljoos/wincred v1.2.1 // indirect
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
||||
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
|
||||
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect
|
||||
github.com/dgraph-io/badger/v2 v2.2007.4 // indirect
|
||||
github.com/dgraph-io/ristretto v0.1.1 // indirect
|
||||
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect
|
||||
github.com/dustin/go-humanize v1.0.1 // indirect
|
||||
github.com/dvsekhvalnov/jose2go v1.6.0 // indirect
|
||||
github.com/emicklei/dot v1.6.1 // indirect
|
||||
github.com/fatih/color v1.16.0 // indirect
|
||||
github.com/felixge/httpsnoop v1.0.4 // indirect
|
||||
github.com/fsnotify/fsnotify v1.7.0 // indirect
|
||||
github.com/getsentry/sentry-go v0.27.0 // indirect
|
||||
github.com/go-kit/kit v0.13.0 // indirect
|
||||
github.com/go-kit/log v0.2.1 // indirect
|
||||
github.com/go-logfmt/logfmt v0.6.0 // indirect
|
||||
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
|
||||
github.com/gogo/googleapis v1.4.1 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang/glog v1.2.0 // indirect
|
||||
github.com/golang/protobuf v1.5.4 // indirect
|
||||
github.com/golang/snappy v0.0.4 // indirect
|
||||
github.com/google/btree v1.1.2 // indirect
|
||||
github.com/google/go-cmp v0.6.0 // indirect
|
||||
github.com/gorilla/handlers v1.5.2 // indirect
|
||||
github.com/gorilla/mux v1.8.1 // indirect
|
||||
github.com/gorilla/websocket v1.5.1 // indirect
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
|
||||
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
|
||||
github.com/hashicorp/go-hclog v1.6.2 // indirect
|
||||
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
|
||||
github.com/hashicorp/go-metrics v0.5.3 // indirect
|
||||
github.com/hashicorp/go-plugin v1.6.0 // indirect
|
||||
github.com/hashicorp/golang-lru v1.0.2 // indirect
|
||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||
github.com/hashicorp/yamux v0.1.1 // indirect
|
||||
github.com/hdevalence/ed25519consensus v0.2.0 // indirect
|
||||
github.com/huandu/skiplist v1.2.0 // indirect
|
||||
github.com/iancoleman/strcase v0.3.0 // indirect
|
||||
github.com/improbable-eng/grpc-web v0.15.0 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
||||
github.com/jmhodges/levigo v1.0.0 // indirect
|
||||
github.com/klauspost/compress v1.17.7 // indirect
|
||||
github.com/kr/pretty v0.3.1 // indirect
|
||||
github.com/kr/text v0.2.0 // indirect
|
||||
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
|
||||
github.com/linxGnu/grocksdb v1.8.12 // indirect
|
||||
github.com/magiconair/properties v1.8.7 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
|
||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||
github.com/mtibben/percent v0.2.1 // indirect
|
||||
github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect
|
||||
github.com/oklog/run v1.1.0 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.1.1 // indirect
|
||||
github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
||||
github.com/prometheus/client_golang v1.19.0 // indirect
|
||||
github.com/prometheus/client_model v0.6.0 // indirect
|
||||
github.com/prometheus/common v0.50.0 // indirect
|
||||
github.com/prometheus/procfs v0.12.0 // indirect
|
||||
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
|
||||
github.com/rogpeppe/go-internal v1.12.0 // indirect
|
||||
github.com/rs/cors v1.10.1 // indirect
|
||||
github.com/rs/zerolog v1.32.0 // indirect
|
||||
github.com/sagikazarmark/locafero v0.4.0 // indirect
|
||||
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
|
||||
github.com/sasha-s/go-deadlock v0.3.1 // indirect
|
||||
github.com/sourcegraph/conc v0.3.0 // indirect
|
||||
github.com/spf13/afero v1.11.0 // indirect
|
||||
github.com/spf13/cast v1.6.0 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/spf13/viper v1.18.2 // indirect
|
||||
github.com/subosito/gotenv v1.6.0 // indirect
|
||||
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect
|
||||
github.com/tendermint/go-amino v0.16.0 // indirect
|
||||
github.com/tidwall/btree v1.7.0 // indirect
|
||||
github.com/zondax/hid v0.9.2 // indirect
|
||||
github.com/zondax/ledger-go v0.14.3 // indirect
|
||||
gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b // indirect
|
||||
gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect
|
||||
go.etcd.io/bbolt v1.3.9 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
golang.org/x/crypto v0.21.0 // indirect
|
||||
golang.org/x/mod v0.15.0 // indirect
|
||||
golang.org/x/net v0.22.0 // indirect
|
||||
golang.org/x/sync v0.6.0 // indirect
|
||||
golang.org/x/sys v0.18.0 // indirect
|
||||
golang.org/x/term v0.18.0 // indirect
|
||||
golang.org/x/text v0.14.0 // indirect
|
||||
golang.org/x/tools v0.18.0 // indirect
|
||||
google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
gotest.tools/v3 v3.5.1 // indirect
|
||||
nhooyr.io/websocket v1.8.10 // indirect
|
||||
pgregory.net/rapid v1.1.0 // indirect
|
||||
sigs.k8s.io/yaml v1.4.0 // indirect
|
||||
)
|
||||
|
||||
require (
|
||||
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20240130113600-88ef6483f90f.1 // indirect
|
||||
buf.build/gen/go/tendermint/tendermint/protocolbuffers/go v1.32.0-20231117195010-33ed361a9051.1 // indirect
|
||||
cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 // indirect
|
||||
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
|
||||
)
|
||||
|
||||
replace github.com/cosmos/cosmos-sdk => ../../../../.
|
||||
|
||||
replace (
|
||||
cosmossdk.io/api => ../../../../api
|
||||
cosmossdk.io/core => ../../../../core
|
||||
cosmossdk.io/depinject => ../../../../depinject
|
||||
cosmossdk.io/x/accounts => ../../.
|
||||
cosmossdk.io/x/auth => ../../../auth
|
||||
cosmossdk.io/x/bank => ../../../bank
|
||||
cosmossdk.io/x/distribution => ../../../distribution
|
||||
cosmossdk.io/x/gov => ../../../gov
|
||||
cosmossdk.io/x/mint => ../../../mint
|
||||
cosmossdk.io/x/protocolpool => ../../../protocolpool
|
||||
cosmossdk.io/x/slashing => ../../../slashing
|
||||
cosmossdk.io/x/staking => ../../../staking
|
||||
github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.1
|
||||
)
|
||||
1009
x/accounts/defaults/lockup/go.sum
Normal file
1009
x/accounts/defaults/lockup/go.sum
Normal file
File diff suppressed because it is too large
Load Diff
587
x/accounts/defaults/lockup/lockup.go
Normal file
587
x/accounts/defaults/lockup/lockup.go
Normal file
@ -0,0 +1,587 @@
|
||||
package lockup
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"cosmossdk.io/collections"
|
||||
collcodec "cosmossdk.io/collections/codec"
|
||||
"cosmossdk.io/core/address"
|
||||
"cosmossdk.io/core/header"
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
"cosmossdk.io/math"
|
||||
"cosmossdk.io/x/accounts/accountstd"
|
||||
lockuptypes "cosmossdk.io/x/accounts/lockup/types"
|
||||
banktypes "cosmossdk.io/x/bank/types"
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
)
|
||||
|
||||
var (
|
||||
OriginalLockingPrefix = collections.NewPrefix(0)
|
||||
DelegatedFreePrefix = collections.NewPrefix(1)
|
||||
DelegatedLockingPrefix = collections.NewPrefix(2)
|
||||
EndTimePrefix = collections.NewPrefix(3)
|
||||
StartTimePrefix = collections.NewPrefix(4)
|
||||
LockingPeriodsPrefix = collections.NewPrefix(5)
|
||||
OwnerPrefix = collections.NewPrefix(6)
|
||||
WithdrawedCoinsPrefix = collections.NewPrefix(7)
|
||||
)
|
||||
|
||||
var (
|
||||
CONTINUOUS_LOCKING_ACCOUNT = "continuous-locking-account"
|
||||
DELAYED_LOCKING_ACCOUNT = "delayed-locking-account"
|
||||
PERIODIC_LOCKING_ACCOUNT = "periodic-locking-account"
|
||||
PERMANENT_LOCKING_ACCOUNT = "permanent-locking-account"
|
||||
)
|
||||
|
||||
type getLockedCoinsFunc = func(ctx context.Context, time time.Time, denoms ...string) (sdk.Coins, error)
|
||||
|
||||
// newBaseLockup creates a new BaseLockup object.
|
||||
func newBaseLockup(d accountstd.Dependencies) *BaseLockup {
|
||||
BaseLockup := &BaseLockup{
|
||||
Owner: collections.NewItem(d.SchemaBuilder, OwnerPrefix, "owner", collections.BytesValue),
|
||||
OriginalLocking: collections.NewMap(d.SchemaBuilder, OriginalLockingPrefix, "original_locking", collections.StringKey, sdk.IntValue),
|
||||
DelegatedFree: collections.NewMap(d.SchemaBuilder, DelegatedFreePrefix, "delegated_free", collections.StringKey, sdk.IntValue),
|
||||
DelegatedLocking: collections.NewMap(d.SchemaBuilder, DelegatedLockingPrefix, "delegated_locking", collections.StringKey, sdk.IntValue),
|
||||
WithdrawedCoins: collections.NewMap(d.SchemaBuilder, WithdrawedCoinsPrefix, "withdrawed_coins", collections.StringKey, sdk.IntValue),
|
||||
addressCodec: d.AddressCodec,
|
||||
headerService: d.Environment.HeaderService,
|
||||
EndTime: collections.NewItem(d.SchemaBuilder, EndTimePrefix, "end_time", collcodec.KeyToValueCodec[time.Time](sdk.TimeKey)),
|
||||
}
|
||||
|
||||
return BaseLockup
|
||||
}
|
||||
|
||||
type BaseLockup struct {
|
||||
// Owner is the address of the account owner.
|
||||
Owner collections.Item[[]byte]
|
||||
OriginalLocking collections.Map[string, math.Int]
|
||||
DelegatedFree collections.Map[string, math.Int]
|
||||
DelegatedLocking collections.Map[string, math.Int]
|
||||
WithdrawedCoins collections.Map[string, math.Int]
|
||||
addressCodec address.Codec
|
||||
headerService header.Service
|
||||
// lockup end time.
|
||||
EndTime collections.Item[time.Time]
|
||||
}
|
||||
|
||||
func (bva *BaseLockup) Init(ctx context.Context, msg *lockuptypes.MsgInitLockupAccount) (
|
||||
*lockuptypes.MsgInitLockupAccountResponse, error,
|
||||
) {
|
||||
owner, err := bva.addressCodec.StringToBytes(msg.Owner)
|
||||
if err != nil {
|
||||
return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid 'owner' address: %s", err)
|
||||
}
|
||||
err = bva.Owner.Set(ctx, owner)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
funds := accountstd.Funds(ctx)
|
||||
|
||||
sortedAmt := funds.Sort()
|
||||
for _, coin := range sortedAmt {
|
||||
err = bva.OriginalLocking.Set(ctx, coin.Denom, coin.Amount)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Set initial value for all locked token
|
||||
err = bva.WithdrawedCoins.Set(ctx, coin.Denom, math.ZeroInt())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Set initial value for all locked token
|
||||
err = bva.DelegatedFree.Set(ctx, coin.Denom, math.ZeroInt())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Set initial value for all locked token
|
||||
err = bva.DelegatedLocking.Set(ctx, coin.Denom, math.ZeroInt())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
err = bva.EndTime.Set(ctx, msg.EndTime)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &lockuptypes.MsgInitLockupAccountResponse{}, nil
|
||||
}
|
||||
|
||||
func (bva *BaseLockup) Delegate(
|
||||
ctx context.Context, msg *lockuptypes.MsgDelegate, getLockedCoinsFunc getLockedCoinsFunc,
|
||||
) (
|
||||
*lockuptypes.MsgExecuteMessagesResponse, error,
|
||||
) {
|
||||
err := bva.checkSender(ctx, msg.Sender)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
whoami := accountstd.Whoami(ctx)
|
||||
delegatorAddress, err := bva.addressCodec.BytesToString(whoami)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
hs := bva.headerService.GetHeaderInfo(ctx)
|
||||
|
||||
balance, err := bva.getBalance(ctx, delegatorAddress, msg.Amount.Denom)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
lockedCoins, err := getLockedCoinsFunc(ctx, hs.Time, msg.Amount.Denom)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = bva.TrackDelegation(
|
||||
ctx,
|
||||
sdk.Coins{*balance},
|
||||
lockedCoins,
|
||||
sdk.Coins{msg.Amount},
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
msgDelegate := makeMsgDelegate(delegatorAddress, msg.ValidatorAddress, msg.Amount)
|
||||
responses, err := sendMessage(ctx, msgDelegate)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &lockuptypes.MsgExecuteMessagesResponse{Responses: responses}, nil
|
||||
}
|
||||
|
||||
func (bva *BaseLockup) Undelegate(
|
||||
ctx context.Context, msg *lockuptypes.MsgUndelegate,
|
||||
) (
|
||||
*lockuptypes.MsgExecuteMessagesResponse, error,
|
||||
) {
|
||||
err := bva.checkSender(ctx, msg.Sender)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
whoami := accountstd.Whoami(ctx)
|
||||
delegatorAddress, err := bva.addressCodec.BytesToString(whoami)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = bva.TrackUndelegation(ctx, sdk.Coins{msg.Amount})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
msgUndelegate := makeMsgUndelegate(delegatorAddress, msg.ValidatorAddress, msg.Amount)
|
||||
responses, err := sendMessage(ctx, msgUndelegate)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &lockuptypes.MsgExecuteMessagesResponse{Responses: responses}, nil
|
||||
}
|
||||
|
||||
func (bva *BaseLockup) SendCoins(
|
||||
ctx context.Context, msg *lockuptypes.MsgSend, getLockedCoinsFunc getLockedCoinsFunc,
|
||||
) (
|
||||
*lockuptypes.MsgExecuteMessagesResponse, error,
|
||||
) {
|
||||
err := bva.checkSender(ctx, msg.Sender)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
whoami := accountstd.Whoami(ctx)
|
||||
fromAddress, err := bva.addressCodec.BytesToString(whoami)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
hs := bva.headerService.GetHeaderInfo(ctx)
|
||||
|
||||
lockedCoins, err := getLockedCoinsFunc(ctx, hs.Time, msg.Amount.Denoms()...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = bva.checkTokensSendable(ctx, fromAddress, msg.Amount, lockedCoins)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
msgSend := makeMsgSend(fromAddress, msg.ToAddress, msg.Amount)
|
||||
responses, err := sendMessage(ctx, msgSend)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &lockuptypes.MsgExecuteMessagesResponse{Responses: responses}, nil
|
||||
}
|
||||
|
||||
// WithdrawUnlockedCoins allow owner to withdraw the unlocked token for a specific denoms to an
|
||||
// account of choice. Update the withdrawed token tracking for lockup account
|
||||
func (bva *BaseLockup) WithdrawUnlockedCoins(
|
||||
ctx context.Context, msg *lockuptypes.MsgWithdraw, getLockedCoinsFunc getLockedCoinsFunc,
|
||||
) (
|
||||
*lockuptypes.MsgWithdrawResponse, error,
|
||||
) {
|
||||
err := bva.checkSender(ctx, msg.Withdrawer)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
whoami := accountstd.Whoami(ctx)
|
||||
fromAddress, err := bva.addressCodec.BytesToString(whoami)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
hs := bva.headerService.GetHeaderInfo(ctx)
|
||||
lockedCoins, err := getLockedCoinsFunc(ctx, hs.Time, msg.Denoms...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
amount := sdk.Coins{}
|
||||
for _, denom := range msg.Denoms {
|
||||
balance, err := bva.getBalance(ctx, fromAddress, denom)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
lockedAmt := lockedCoins.AmountOf(denom)
|
||||
|
||||
// get lockedCoin from that are not bonded for the sent denom
|
||||
notBondedLockedCoin, err := bva.GetNotBondedLockedCoin(ctx, sdk.NewCoin(denom, lockedAmt), denom)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
spendable, err := balance.SafeSub(notBondedLockedCoin)
|
||||
if err != nil {
|
||||
return nil, errorsmod.Wrapf(sdkerrors.ErrInsufficientFunds,
|
||||
"locked amount exceeds account balance funds: %s > %s", notBondedLockedCoin, balance)
|
||||
}
|
||||
|
||||
withdrawedAmt, err := bva.WithdrawedCoins.Get(ctx, denom)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
originalLockingAmt, err := bva.OriginalLocking.Get(ctx, denom)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// withdrawable amount is equal to original locking amount subtract already withdrawed amount
|
||||
withdrawableAmt, err := originalLockingAmt.SafeSub(withdrawedAmt)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
withdrawAmt := math.MinInt(withdrawableAmt, spendable.Amount)
|
||||
// if zero amount go to the next iteration
|
||||
if withdrawAmt.IsZero() {
|
||||
continue
|
||||
}
|
||||
amount = append(amount, sdk.NewCoin(denom, withdrawAmt))
|
||||
|
||||
// update the withdrawed amount
|
||||
err = bva.WithdrawedCoins.Set(ctx, denom, withdrawedAmt.Add(withdrawAmt))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
if len(amount) == 0 {
|
||||
return nil, fmt.Errorf("no tokens available for withdrawing")
|
||||
}
|
||||
|
||||
msgSend := makeMsgSend(fromAddress, msg.ToAddress, amount)
|
||||
_, err = sendMessage(ctx, msgSend)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &lockuptypes.MsgWithdrawResponse{
|
||||
Reciever: msg.ToAddress,
|
||||
AmountReceived: amount,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (bva *BaseLockup) checkSender(ctx context.Context, sender string) error {
|
||||
owner, err := bva.Owner.Get(ctx)
|
||||
if err != nil {
|
||||
return sdkerrors.ErrInvalidAddress.Wrapf("invalid owner address: %s", err.Error())
|
||||
}
|
||||
senderBytes, err := bva.addressCodec.StringToBytes(sender)
|
||||
if err != nil {
|
||||
return sdkerrors.ErrInvalidAddress.Wrapf("invalid sender address: %s", err.Error())
|
||||
}
|
||||
if !bytes.Equal(owner, senderBytes) {
|
||||
return fmt.Errorf("sender is not the owner of this vesting account")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func sendMessage(ctx context.Context, msg proto.Message) ([]*codectypes.Any, error) {
|
||||
response, err := accountstd.ExecModuleUntyped(ctx, msg)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
respAny, err := accountstd.PackAny(response)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return []*codectypes.Any{respAny}, nil
|
||||
}
|
||||
|
||||
// TrackDelegation tracks a delegation amount for any given lockup account type
|
||||
// given the amount of coins currently being locked and the current account balance
|
||||
// of the delegation denominations.
|
||||
//
|
||||
// CONTRACT: The account's coins, delegation coins, locked coins, and delegated
|
||||
// locking coins must be sorted.
|
||||
func (bva *BaseLockup) TrackDelegation(
|
||||
ctx context.Context, balance, lockedCoins, amount sdk.Coins,
|
||||
) error {
|
||||
for _, coin := range amount {
|
||||
baseAmt := balance.AmountOf(coin.Denom)
|
||||
lockedAmt := lockedCoins.AmountOf(coin.Denom)
|
||||
delLockingAmt, err := bva.DelegatedLocking.Get(ctx, coin.Denom)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
delFreeAmt, err := bva.DelegatedFree.Get(ctx, coin.Denom)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// return error if the delegation amount is zero or if the base coins does not
|
||||
// exceed the desired delegation amount.
|
||||
if coin.Amount.IsZero() || baseAmt.LT(coin.Amount) {
|
||||
return sdkerrors.ErrInvalidCoins.Wrap("delegation attempt with zero coins or insufficient funds")
|
||||
}
|
||||
|
||||
// compute x and y per the specification, where:
|
||||
// X := min(max(V - DV, 0), D)
|
||||
// Y := D - X
|
||||
x := math.MinInt(math.MaxInt(lockedAmt.Sub(delLockingAmt), math.ZeroInt()), coin.Amount)
|
||||
y := coin.Amount.Sub(x)
|
||||
|
||||
delLockingCoin := sdk.NewCoin(coin.Denom, delLockingAmt)
|
||||
delFreeCoin := sdk.NewCoin(coin.Denom, delFreeAmt)
|
||||
if !x.IsZero() {
|
||||
xCoin := sdk.NewCoin(coin.Denom, x)
|
||||
newDelLocking := delLockingCoin.Add(xCoin)
|
||||
err = bva.DelegatedLocking.Set(ctx, newDelLocking.Denom, newDelLocking.Amount)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if !y.IsZero() {
|
||||
yCoin := sdk.NewCoin(coin.Denom, y)
|
||||
newDelFree := delFreeCoin.Add(yCoin)
|
||||
err = bva.DelegatedFree.Set(ctx, newDelFree.Denom, newDelFree.Amount)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// TrackUndelegation tracks an undelegation amount by setting the necessary
|
||||
// values by which delegated locking and delegated free need to decrease and
|
||||
// by which amount the base coins need to increase.
|
||||
//
|
||||
// NOTE: The undelegation (bond refund) amount may exceed the delegated
|
||||
// locking (bond) amount due to the way undelegation truncates the bond refund,
|
||||
// which can increase the validator's exchange rate (tokens/shares) slightly if
|
||||
// the undelegated tokens are non-integral.
|
||||
//
|
||||
// CONTRACT: The account's coins and undelegation coins must be sorted.
|
||||
func (bva *BaseLockup) TrackUndelegation(ctx context.Context, amount sdk.Coins) error {
|
||||
for _, coin := range amount {
|
||||
// return error if the undelegation amount is zero
|
||||
if coin.Amount.IsZero() {
|
||||
return sdkerrors.ErrInvalidCoins.Wrap("undelegation attempt with zero coins")
|
||||
}
|
||||
delFreeAmt, err := bva.DelegatedFree.Get(ctx, coin.Denom)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
delLockingAmt, err := bva.DelegatedLocking.Get(ctx, coin.Denom)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// compute x and y per the specification, where:
|
||||
// X := min(DF, D)
|
||||
// Y := min(DV, D - X)
|
||||
x := math.MinInt(delFreeAmt, coin.Amount)
|
||||
y := math.MinInt(delLockingAmt, coin.Amount.Sub(x))
|
||||
|
||||
delLockingCoin := sdk.NewCoin(coin.Denom, delLockingAmt)
|
||||
delFreeCoin := sdk.NewCoin(coin.Denom, delFreeAmt)
|
||||
if !x.IsZero() {
|
||||
xCoin := sdk.NewCoin(coin.Denom, x)
|
||||
newDelFree := delFreeCoin.Sub(xCoin)
|
||||
err = bva.DelegatedFree.Set(ctx, newDelFree.Denom, newDelFree.Amount)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if !y.IsZero() {
|
||||
yCoin := sdk.NewCoin(coin.Denom, y)
|
||||
newDelLocking := delLockingCoin.Sub(yCoin)
|
||||
err = bva.DelegatedLocking.Set(ctx, newDelLocking.Denom, newDelLocking.Amount)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (bva BaseLockup) getBalance(ctx context.Context, sender, denom string) (*sdk.Coin, error) {
|
||||
// Query account balance for the sent denom
|
||||
balanceQueryReq := banktypes.NewQueryBalanceRequest(sdk.AccAddress(sender), denom)
|
||||
resp, err := accountstd.QueryModule[banktypes.QueryBalanceResponse](ctx, balanceQueryReq)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return resp.Balance, nil
|
||||
}
|
||||
|
||||
func (bva BaseLockup) checkTokensSendable(ctx context.Context, sender string, amount, lockedCoins sdk.Coins) error {
|
||||
// Check if any sent tokens is exceeds lockup account balances
|
||||
for _, coin := range amount {
|
||||
balance, err := bva.getBalance(ctx, sender, coin.Denom)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
lockedAmt := lockedCoins.AmountOf(coin.Denom)
|
||||
|
||||
// get lockedCoin from that are not bonded for the sent denom
|
||||
notBondedLockedCoin, err := bva.GetNotBondedLockedCoin(ctx, sdk.NewCoin(coin.Denom, lockedAmt), coin.Denom)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
spendable, hasNeg := sdk.Coins{*balance}.SafeSub(notBondedLockedCoin)
|
||||
if hasNeg {
|
||||
return errorsmod.Wrapf(sdkerrors.ErrInsufficientFunds,
|
||||
"locked amount exceeds account balance funds: %s > %s", notBondedLockedCoin, balance)
|
||||
}
|
||||
|
||||
if _, hasNeg := spendable.SafeSub(coin); hasNeg {
|
||||
if len(spendable) == 0 {
|
||||
spendable = sdk.Coins{sdk.NewCoin(coin.Denom, math.ZeroInt())}
|
||||
}
|
||||
return errorsmod.Wrapf(
|
||||
sdkerrors.ErrInsufficientFunds,
|
||||
"spendable balance %s is smaller than %s",
|
||||
spendable, coin,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// IterateSendEnabledEntries iterates over all the SendEnabled entries.
|
||||
func (bva BaseLockup) IterateCoinEntries(
|
||||
ctx context.Context,
|
||||
entries collections.Map[string, math.Int],
|
||||
cb func(denom string, value math.Int) (bool, error),
|
||||
) error {
|
||||
err := entries.Walk(ctx, nil, func(key string, value math.Int) (stop bool, err error) {
|
||||
return cb(key, value)
|
||||
})
|
||||
return err
|
||||
}
|
||||
|
||||
// GetNotBondedLockedCoin returns the coin that are not spendable that are not bonded by denom
|
||||
// for a lockup account. If the coin by the provided denom are not locked, an coin with zero amount is returned.
|
||||
func (bva BaseLockup) GetNotBondedLockedCoin(ctx context.Context, lockedCoin sdk.Coin, denom string) (sdk.Coin, error) {
|
||||
delegatedLockingAmt, err := bva.DelegatedLocking.Get(ctx, denom)
|
||||
if err != nil {
|
||||
return sdk.Coin{}, err
|
||||
}
|
||||
|
||||
x := math.MinInt(lockedCoin.Amount, delegatedLockingAmt)
|
||||
lockedAmt := lockedCoin.Amount.Sub(x)
|
||||
|
||||
return sdk.NewCoin(denom, lockedAmt), nil
|
||||
}
|
||||
|
||||
// QueryLockupAccountBaseInfo returns a lockup account's info
|
||||
func (bva BaseLockup) QueryLockupAccountBaseInfo(ctx context.Context, _ *lockuptypes.QueryLockupAccountInfoRequest) (
|
||||
*lockuptypes.QueryLockupAccountInfoResponse, error,
|
||||
) {
|
||||
owner, err := bva.Owner.Get(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
ownerAddress, err := bva.addressCodec.BytesToString(owner)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
endTime, err := bva.EndTime.Get(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
originalLocking := sdk.Coins{}
|
||||
err = bva.IterateCoinEntries(ctx, bva.OriginalLocking, func(key string, value math.Int) (stop bool, err error) {
|
||||
originalLocking = append(originalLocking, sdk.NewCoin(key, value))
|
||||
return false, nil
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
delegatedLocking := sdk.Coins{}
|
||||
err = bva.IterateCoinEntries(ctx, bva.DelegatedLocking, func(key string, value math.Int) (stop bool, err error) {
|
||||
delegatedLocking = append(delegatedLocking, sdk.NewCoin(key, value))
|
||||
return false, nil
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
delegatedFree := sdk.Coins{}
|
||||
err = bva.IterateCoinEntries(ctx, bva.DelegatedFree, func(key string, value math.Int) (stop bool, err error) {
|
||||
delegatedFree = append(delegatedFree, sdk.NewCoin(key, value))
|
||||
return false, nil
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &lockuptypes.QueryLockupAccountInfoResponse{
|
||||
Owner: ownerAddress,
|
||||
OriginalLocking: originalLocking,
|
||||
DelegatedLocking: delegatedLocking,
|
||||
DelegatedFree: delegatedFree,
|
||||
EndTime: &endTime,
|
||||
}, nil
|
||||
}
|
||||
337
x/accounts/defaults/lockup/periodic_locking_account.go
Normal file
337
x/accounts/defaults/lockup/periodic_locking_account.go
Normal file
@ -0,0 +1,337 @@
|
||||
package lockup
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"cosmossdk.io/collections"
|
||||
collcodec "cosmossdk.io/collections/codec"
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
"cosmossdk.io/math"
|
||||
"cosmossdk.io/x/accounts/accountstd"
|
||||
lockuptypes "cosmossdk.io/x/accounts/lockup/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
)
|
||||
|
||||
// Compile-time type assertions
|
||||
var (
|
||||
_ accountstd.Interface = (*PeriodicLockingAccount)(nil)
|
||||
)
|
||||
|
||||
// NewPeriodicLockingAccount creates a new PeriodicLockingAccount object.
|
||||
func NewPeriodicLockingAccount(d accountstd.Dependencies) (*PeriodicLockingAccount, error) {
|
||||
baseLockup := newBaseLockup(d)
|
||||
|
||||
periodicsVestingAccount := PeriodicLockingAccount{
|
||||
BaseLockup: baseLockup,
|
||||
StartTime: collections.NewItem(d.SchemaBuilder, StartTimePrefix, "start_time", collcodec.KeyToValueCodec[time.Time](sdk.TimeKey)),
|
||||
LockingPeriods: collections.NewVec(d.SchemaBuilder, LockingPeriodsPrefix, "locking_periods", codec.CollValue[lockuptypes.Period](d.LegacyStateCodec)),
|
||||
}
|
||||
|
||||
return &periodicsVestingAccount, nil
|
||||
}
|
||||
|
||||
type PeriodicLockingAccount struct {
|
||||
*BaseLockup
|
||||
StartTime collections.Item[time.Time]
|
||||
LockingPeriods collections.Vec[lockuptypes.Period]
|
||||
}
|
||||
|
||||
func (pva PeriodicLockingAccount) Init(ctx context.Context, msg *lockuptypes.MsgInitPeriodicLockingAccount) (*lockuptypes.MsgInitPeriodicLockingAccountResponse, error) {
|
||||
owner, err := pva.addressCodec.StringToBytes(msg.Owner)
|
||||
if err != nil {
|
||||
return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid 'owner' address: %s", err)
|
||||
}
|
||||
|
||||
hs := pva.headerService.GetHeaderInfo(ctx)
|
||||
|
||||
if msg.StartTime.Before(hs.Time) {
|
||||
return nil, sdkerrors.ErrInvalidRequest.Wrap("start time %s should be after block time")
|
||||
}
|
||||
|
||||
totalCoins := sdk.Coins{}
|
||||
endTime := msg.StartTime
|
||||
for _, period := range msg.LockingPeriods {
|
||||
if period.Length.Seconds() <= 0 {
|
||||
return nil, errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "invalid period duration length %d", period.Length)
|
||||
}
|
||||
|
||||
if err := validateAmount(period.Amount); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
totalCoins = totalCoins.Add(period.Amount...)
|
||||
// Calculate end time
|
||||
endTime = endTime.Add(period.Length)
|
||||
err = pva.LockingPeriods.Push(ctx, period)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
funds := accountstd.Funds(ctx)
|
||||
if !funds.Equal(totalCoins) {
|
||||
return nil, sdkerrors.ErrInvalidRequest.Wrap("invalid funding amount, should be equal to total coins lockup")
|
||||
}
|
||||
|
||||
sortedAmt := totalCoins.Sort()
|
||||
for _, coin := range sortedAmt {
|
||||
err := pva.OriginalLocking.Set(ctx, coin.Denom, coin.Amount)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
err = pva.StartTime.Set(ctx, msg.StartTime)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
err = pva.EndTime.Set(ctx, endTime)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
err = pva.Owner.Set(ctx, owner)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &lockuptypes.MsgInitPeriodicLockingAccountResponse{}, nil
|
||||
}
|
||||
|
||||
func (pva *PeriodicLockingAccount) Delegate(ctx context.Context, msg *lockuptypes.MsgDelegate) (
|
||||
*lockuptypes.MsgExecuteMessagesResponse, error,
|
||||
) {
|
||||
return pva.BaseLockup.Delegate(ctx, msg, pva.GetLockedCoinsWithDenoms)
|
||||
}
|
||||
|
||||
func (pva *PeriodicLockingAccount) Undelegate(ctx context.Context, msg *lockuptypes.MsgUndelegate) (
|
||||
*lockuptypes.MsgExecuteMessagesResponse, error,
|
||||
) {
|
||||
return pva.BaseLockup.Undelegate(ctx, msg)
|
||||
}
|
||||
|
||||
func (pva *PeriodicLockingAccount) SendCoins(ctx context.Context, msg *lockuptypes.MsgSend) (
|
||||
*lockuptypes.MsgExecuteMessagesResponse, error,
|
||||
) {
|
||||
return pva.BaseLockup.SendCoins(ctx, msg, pva.GetLockedCoinsWithDenoms)
|
||||
}
|
||||
|
||||
func (pva *PeriodicLockingAccount) WithdrawUnlockedCoins(ctx context.Context, msg *lockuptypes.MsgWithdraw) (
|
||||
*lockuptypes.MsgWithdrawResponse, error,
|
||||
) {
|
||||
return pva.BaseLockup.WithdrawUnlockedCoins(ctx, msg, pva.GetLockedCoinsWithDenoms)
|
||||
}
|
||||
|
||||
// IterateSendEnabledEntries iterates over all the SendEnabled entries.
|
||||
func (pva PeriodicLockingAccount) IteratePeriods(
|
||||
ctx context.Context,
|
||||
cb func(value lockuptypes.Period) (bool, error),
|
||||
) error {
|
||||
err := pva.LockingPeriods.Walk(ctx, nil, func(_ uint64, value lockuptypes.Period) (stop bool, err error) {
|
||||
return cb(value)
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetLockCoinsInfo returns the total number of locked and unlocked coins.
|
||||
func (pva PeriodicLockingAccount) GetLockCoinsInfo(ctx context.Context, blockTime time.Time) (unlockedCoins, lockedCoins sdk.Coins, err error) {
|
||||
unlockedCoins = sdk.Coins{}
|
||||
lockedCoins = sdk.Coins{}
|
||||
|
||||
// We must handle the case where the start time for a lockup account has
|
||||
// been set into the future or when the start of the chain is not exactly
|
||||
// known.
|
||||
startTime, err := pva.StartTime.Get(ctx)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
endTime, err := pva.EndTime.Get(ctx)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
originalLocking := sdk.Coins{}
|
||||
err = pva.IterateCoinEntries(ctx, pva.OriginalLocking, func(key string, value math.Int) (stop bool, err error) {
|
||||
originalLocking = append(originalLocking, sdk.NewCoin(key, value))
|
||||
return false, nil
|
||||
})
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
if blockTime.Before(startTime) {
|
||||
return unlockedCoins, originalLocking, nil
|
||||
} else if blockTime.After(endTime) {
|
||||
return originalLocking, lockedCoins, nil
|
||||
}
|
||||
|
||||
// track the start time of the next period
|
||||
currentPeriodStartTime, err := pva.StartTime.Get(ctx)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
err = pva.IteratePeriods(ctx, func(period lockuptypes.Period) (stop bool, err error) {
|
||||
x := blockTime.Sub(currentPeriodStartTime)
|
||||
if x.Seconds() < period.Length.Seconds() {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
unlockedCoins = unlockedCoins.Add(period.Amount...)
|
||||
|
||||
// update the start time of the next period
|
||||
err = pva.StartTime.Set(ctx, currentPeriodStartTime.Add(period.Length))
|
||||
if err != nil {
|
||||
return true, err
|
||||
}
|
||||
return false, nil
|
||||
})
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
lockedCoins = originalLocking.Sub(unlockedCoins...)
|
||||
|
||||
return unlockedCoins, lockedCoins, err
|
||||
}
|
||||
|
||||
// GetLockedCoins returns the total number of locked coins. If no coins are
|
||||
// locked, nil is returned.
|
||||
func (pva PeriodicLockingAccount) GetLockedCoins(ctx context.Context, blockTime time.Time) (sdk.Coins, error) {
|
||||
_, vestingCoins, err := pva.GetLockCoinsInfo(ctx, blockTime)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return vestingCoins, nil
|
||||
}
|
||||
|
||||
// GetLockCoinInfoWithDenom returns the total number of locked and unlocked coin for a specific denom.
|
||||
func (pva PeriodicLockingAccount) GetLockCoinInfoWithDenom(ctx context.Context, blockTime time.Time, denom string) (unlockedCoin, lockedCoin *sdk.Coin, err error) {
|
||||
// We must handle the case where the start time for a lockup account has
|
||||
// been set into the future or when the start of the chain is not exactly
|
||||
// known.
|
||||
startTime, err := pva.StartTime.Get(ctx)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
endTime, err := pva.EndTime.Get(ctx)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
originalLockingAmt, err := pva.OriginalLocking.Get(ctx, denom)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
originalLockingCoin := sdk.NewCoin(denom, originalLockingAmt)
|
||||
|
||||
if blockTime.Before(startTime) {
|
||||
return &sdk.Coin{}, &originalLockingCoin, nil
|
||||
} else if blockTime.After(endTime) {
|
||||
return &originalLockingCoin, &sdk.Coin{}, nil
|
||||
}
|
||||
|
||||
// track the start time of the next period
|
||||
currentPeriodStartTime, err := pva.StartTime.Get(ctx)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
unlocked := sdk.NewCoin(denom, math.ZeroInt())
|
||||
err = pva.IteratePeriods(ctx, func(period lockuptypes.Period) (stop bool, err error) {
|
||||
x := blockTime.Sub(currentPeriodStartTime)
|
||||
if x.Seconds() < period.Length.Seconds() {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
unlocked = unlocked.Add(sdk.NewCoin(denom, period.Amount.AmountOf(denom)))
|
||||
|
||||
// update the start time of the next period
|
||||
err = pva.StartTime.Set(ctx, currentPeriodStartTime.Add(period.Length))
|
||||
if err != nil {
|
||||
return true, err
|
||||
}
|
||||
return false, nil
|
||||
})
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
locked := originalLockingCoin.Sub(unlocked)
|
||||
|
||||
return &unlocked, &locked, err
|
||||
}
|
||||
|
||||
// GetLockedCoinsWithDenoms returns the total number of locked coins. If no coins are
|
||||
// locked, nil is returned.
|
||||
func (pva PeriodicLockingAccount) GetLockedCoinsWithDenoms(ctx context.Context, blockTime time.Time, denoms ...string) (sdk.Coins, error) {
|
||||
lockedCoins := sdk.Coins{}
|
||||
for _, denom := range denoms {
|
||||
_, lockedCoin, err := pva.GetLockCoinInfoWithDenom(ctx, blockTime, denom)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
lockedCoins = append(lockedCoins, *lockedCoin)
|
||||
}
|
||||
return lockedCoins, nil
|
||||
}
|
||||
|
||||
func (pva PeriodicLockingAccount) QueryLockupAccountInfo(ctx context.Context, req *lockuptypes.QueryLockupAccountInfoRequest) (
|
||||
*lockuptypes.QueryLockupAccountInfoResponse, error,
|
||||
) {
|
||||
resp, err := pva.BaseLockup.QueryLockupAccountBaseInfo(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
startTime, err := pva.StartTime.Get(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
hs := pva.headerService.GetHeaderInfo(ctx)
|
||||
unlockedCoins, lockedCoins, err := pva.GetLockCoinsInfo(ctx, hs.Time)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
resp.StartTime = &startTime
|
||||
resp.LockedCoins = lockedCoins
|
||||
resp.UnlockedCoins = unlockedCoins
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (pva PeriodicLockingAccount) QueryLockingPeriods(ctx context.Context, msg *lockuptypes.QueryLockingPeriodsRequest) (
|
||||
*lockuptypes.QueryLockingPeriodsResponse, error,
|
||||
) {
|
||||
lockingPeriods := []*lockuptypes.Period{}
|
||||
err := pva.IteratePeriods(ctx, func(period lockuptypes.Period) (stop bool, err error) {
|
||||
lockingPeriods = append(lockingPeriods, &period)
|
||||
return false, nil
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &lockuptypes.QueryLockingPeriodsResponse{
|
||||
LockingPeriods: lockingPeriods,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// Implement smart account interface
|
||||
func (pva PeriodicLockingAccount) RegisterInitHandler(builder *accountstd.InitBuilder) {
|
||||
accountstd.RegisterInitHandler(builder, pva.Init)
|
||||
}
|
||||
|
||||
func (pva PeriodicLockingAccount) RegisterExecuteHandlers(builder *accountstd.ExecuteBuilder) {
|
||||
accountstd.RegisterExecuteHandler(builder, pva.Delegate)
|
||||
accountstd.RegisterExecuteHandler(builder, pva.Undelegate)
|
||||
accountstd.RegisterExecuteHandler(builder, pva.SendCoins)
|
||||
accountstd.RegisterExecuteHandler(builder, pva.WithdrawUnlockedCoins)
|
||||
}
|
||||
|
||||
func (pva PeriodicLockingAccount) RegisterQueryHandlers(builder *accountstd.QueryBuilder) {
|
||||
accountstd.RegisterQueryHandler(builder, pva.QueryLockupAccountInfo)
|
||||
accountstd.RegisterQueryHandler(builder, pva.QueryLockingPeriods)
|
||||
}
|
||||
109
x/accounts/defaults/lockup/permanent_locking_account.go
Normal file
109
x/accounts/defaults/lockup/permanent_locking_account.go
Normal file
@ -0,0 +1,109 @@
|
||||
package lockup
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"cosmossdk.io/math"
|
||||
"cosmossdk.io/x/accounts/accountstd"
|
||||
lockuptypes "cosmossdk.io/x/accounts/lockup/types"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
)
|
||||
|
||||
// Compile-time type assertions
|
||||
var (
|
||||
_ accountstd.Interface = (*PermanentLockingAccount)(nil)
|
||||
)
|
||||
|
||||
// NewPermanentLockingAccount creates a new PermanentLockingAccount object.
|
||||
func NewPermanentLockingAccount(d accountstd.Dependencies) (*PermanentLockingAccount, error) {
|
||||
baseLockup := newBaseLockup(d)
|
||||
|
||||
return &PermanentLockingAccount{baseLockup}, nil
|
||||
}
|
||||
|
||||
type PermanentLockingAccount struct {
|
||||
*BaseLockup
|
||||
}
|
||||
|
||||
func (plva PermanentLockingAccount) Init(ctx context.Context, msg *lockuptypes.MsgInitLockupAccount) (*lockuptypes.MsgInitLockupAccountResponse, error) {
|
||||
resp, err := plva.BaseLockup.Init(ctx, msg)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
err = plva.EndTime.Set(ctx, time.Time{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
// GetlockedCoinsWithDenoms returns the total number of locked coins. If no coins are
|
||||
// locked, nil is returned.
|
||||
func (plva PermanentLockingAccount) GetlockedCoinsWithDenoms(ctx context.Context, blockTime time.Time, denoms ...string) (sdk.Coins, error) {
|
||||
vestingCoins := sdk.Coins{}
|
||||
for _, denom := range denoms {
|
||||
originalVestingAmt, err := plva.OriginalLocking.Get(ctx, denom)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
vestingCoins = append(vestingCoins, sdk.NewCoin(denom, originalVestingAmt))
|
||||
}
|
||||
return vestingCoins, nil
|
||||
}
|
||||
|
||||
func (plva *PermanentLockingAccount) Delegate(ctx context.Context, msg *lockuptypes.MsgDelegate) (
|
||||
*lockuptypes.MsgExecuteMessagesResponse, error,
|
||||
) {
|
||||
return plva.BaseLockup.Delegate(ctx, msg, plva.GetlockedCoinsWithDenoms)
|
||||
}
|
||||
|
||||
func (plva *PermanentLockingAccount) Undelegate(ctx context.Context, msg *lockuptypes.MsgUndelegate) (
|
||||
*lockuptypes.MsgExecuteMessagesResponse, error,
|
||||
) {
|
||||
return plva.BaseLockup.Undelegate(ctx, msg)
|
||||
}
|
||||
|
||||
func (plva *PermanentLockingAccount) SendCoins(ctx context.Context, msg *lockuptypes.MsgSend) (
|
||||
*lockuptypes.MsgExecuteMessagesResponse, error,
|
||||
) {
|
||||
return plva.BaseLockup.SendCoins(ctx, msg, plva.GetlockedCoinsWithDenoms)
|
||||
}
|
||||
|
||||
func (plva PermanentLockingAccount) QueryLockupAccountInfo(ctx context.Context, req *lockuptypes.QueryLockupAccountInfoRequest) (
|
||||
*lockuptypes.QueryLockupAccountInfoResponse, error,
|
||||
) {
|
||||
resp, err := plva.BaseLockup.QueryLockupAccountBaseInfo(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
originalLocking := sdk.Coins{}
|
||||
err = plva.IterateCoinEntries(ctx, plva.OriginalLocking, func(key string, value math.Int) (stop bool, err error) {
|
||||
originalLocking = append(originalLocking, sdk.NewCoin(key, value))
|
||||
return false, nil
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
resp.LockedCoins = originalLocking
|
||||
resp.UnlockedCoins = sdk.Coins{}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// Implement smart account interface
|
||||
func (plva PermanentLockingAccount) RegisterInitHandler(builder *accountstd.InitBuilder) {
|
||||
accountstd.RegisterInitHandler(builder, plva.Init)
|
||||
}
|
||||
|
||||
func (plva PermanentLockingAccount) RegisterExecuteHandlers(builder *accountstd.ExecuteBuilder) {
|
||||
accountstd.RegisterExecuteHandler(builder, plva.Delegate)
|
||||
accountstd.RegisterExecuteHandler(builder, plva.Undelegate)
|
||||
accountstd.RegisterExecuteHandler(builder, plva.SendCoins)
|
||||
}
|
||||
|
||||
func (plva PermanentLockingAccount) RegisterQueryHandlers(builder *accountstd.QueryBuilder) {
|
||||
accountstd.RegisterQueryHandler(builder, plva.QueryLockupAccountInfo)
|
||||
}
|
||||
70
x/accounts/defaults/lockup/protov2_wrapper.go
Normal file
70
x/accounts/defaults/lockup/protov2_wrapper.go
Normal file
@ -0,0 +1,70 @@
|
||||
package lockup
|
||||
|
||||
import (
|
||||
bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1"
|
||||
v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1"
|
||||
stakingv1beta1 "cosmossdk.io/api/cosmos/staking/v1beta1"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"google.golang.org/protobuf/proto"
|
||||
"google.golang.org/protobuf/runtime/protoiface"
|
||||
)
|
||||
|
||||
type ProtoMsg = protoiface.MessageV1
|
||||
|
||||
type gogoProtoPlusV2 interface {
|
||||
proto.Message
|
||||
ProtoMsg
|
||||
}
|
||||
|
||||
// protoV2GogoWrapper is a wrapper of a protov2 message into a gogo message.
|
||||
// this is exceptionally allowed to enable accounts to be decoupled from
|
||||
// the SDK, since x/accounts can support only protov1 in its APIs.
|
||||
// But in order to keep it decoupled from the SDK we need to use the API module.
|
||||
// This is a temporary solution that is being used here:
|
||||
// https://github.com/cosmos/cosmos-sdk/blob/main/x/accounts/coin_transfer.go
|
||||
type protoV2GogoWrapper struct {
|
||||
gogoProtoPlusV2
|
||||
}
|
||||
|
||||
func (h protoV2GogoWrapper) XXX_MessageName() string {
|
||||
return string(proto.MessageName(h.gogoProtoPlusV2))
|
||||
}
|
||||
|
||||
func makeMsgSend(fromAddr, toAddr string, coins sdk.Coins) ProtoMsg {
|
||||
v2Coins := make([]*v1beta1.Coin, len(coins))
|
||||
for i, coin := range coins {
|
||||
v2Coins[i] = &v1beta1.Coin{
|
||||
Denom: coin.Denom,
|
||||
Amount: coin.Amount.String(),
|
||||
}
|
||||
}
|
||||
return protoV2GogoWrapper{&bankv1beta1.MsgSend{
|
||||
FromAddress: fromAddr,
|
||||
ToAddress: toAddr,
|
||||
Amount: v2Coins,
|
||||
}}
|
||||
}
|
||||
|
||||
func makeMsgDelegate(delegatorAddr, validatorAddr string, amount sdk.Coin) ProtoMsg {
|
||||
v2Coin := &v1beta1.Coin{
|
||||
Denom: amount.Denom,
|
||||
Amount: amount.Amount.String(),
|
||||
}
|
||||
return protoV2GogoWrapper{&stakingv1beta1.MsgDelegate{
|
||||
DelegatorAddress: delegatorAddr,
|
||||
ValidatorAddress: validatorAddr,
|
||||
Amount: v2Coin,
|
||||
}}
|
||||
}
|
||||
|
||||
func makeMsgUndelegate(delegatorAddr, validatorAddr string, amount sdk.Coin) ProtoMsg {
|
||||
v2Coin := &v1beta1.Coin{
|
||||
Denom: amount.Denom,
|
||||
Amount: amount.Amount.String(),
|
||||
}
|
||||
return protoV2GogoWrapper{&stakingv1beta1.MsgUndelegate{
|
||||
DelegatorAddress: delegatorAddr,
|
||||
ValidatorAddress: validatorAddr,
|
||||
Amount: v2Coin,
|
||||
}}
|
||||
}
|
||||
26
x/accounts/defaults/lockup/types/encoding.go
Normal file
26
x/accounts/defaults/lockup/types/encoding.go
Normal file
@ -0,0 +1,26 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
proto "github.com/cosmos/gogoproto/proto"
|
||||
)
|
||||
|
||||
func UnpackAnyRaw(m *codectypes.Any) (proto.Message, error) {
|
||||
split := strings.Split(m.TypeUrl, "/")
|
||||
name := split[len(split)-1]
|
||||
typ := proto.MessageType(name)
|
||||
if typ == nil {
|
||||
return nil, fmt.Errorf("no message type found for %s", name)
|
||||
}
|
||||
concreteMsg := reflect.New(typ.Elem()).Interface().(proto.Message)
|
||||
err := proto.Unmarshal(m.Value, concreteMsg)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return concreteMsg, nil
|
||||
}
|
||||
399
x/accounts/defaults/lockup/types/lockup.pb.go
Normal file
399
x/accounts/defaults/lockup/types/lockup.pb.go
Normal file
@ -0,0 +1,399 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: cosmos/accounts/defaults/lockup/lockup.proto
|
||||
|
||||
package types
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
|
||||
types "github.com/cosmos/cosmos-sdk/types"
|
||||
_ "github.com/cosmos/cosmos-sdk/types/tx/amino"
|
||||
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||
proto "github.com/cosmos/gogoproto/proto"
|
||||
github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types"
|
||||
_ "google.golang.org/protobuf/types/known/durationpb"
|
||||
io "io"
|
||||
math "math"
|
||||
math_bits "math/bits"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
var _ = time.Kitchen
|
||||
|
||||
// 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
|
||||
|
||||
// Period defines a length of time and amount of coins that will be lock.
|
||||
type Period struct {
|
||||
// Period duration
|
||||
Length time.Duration `protobuf:"bytes,1,opt,name=length,proto3,stdduration" json:"length"`
|
||||
Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"`
|
||||
}
|
||||
|
||||
func (m *Period) Reset() { *m = Period{} }
|
||||
func (m *Period) String() string { return proto.CompactTextString(m) }
|
||||
func (*Period) ProtoMessage() {}
|
||||
func (*Period) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_79b466256e1a079c, []int{0}
|
||||
}
|
||||
func (m *Period) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *Period) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_Period.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 *Period) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Period.Merge(m, src)
|
||||
}
|
||||
func (m *Period) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *Period) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Period.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Period proto.InternalMessageInfo
|
||||
|
||||
func (m *Period) GetLength() time.Duration {
|
||||
if m != nil {
|
||||
return m.Length
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Period) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins {
|
||||
if m != nil {
|
||||
return m.Amount
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*Period)(nil), "cosmos.accounts.defaults.lockup.Period")
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterFile("cosmos/accounts/defaults/lockup/lockup.proto", fileDescriptor_79b466256e1a079c)
|
||||
}
|
||||
|
||||
var fileDescriptor_79b466256e1a079c = []byte{
|
||||
// 326 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x31, 0x4e, 0xc3, 0x30,
|
||||
0x14, 0x86, 0x63, 0x90, 0x32, 0x04, 0x18, 0xa8, 0x18, 0x4a, 0x07, 0xa7, 0x62, 0xaa, 0x2a, 0x6a,
|
||||
0xab, 0x70, 0x01, 0x54, 0x10, 0xac, 0x88, 0x91, 0x05, 0x39, 0x8e, 0xeb, 0x5a, 0x4d, 0xf2, 0xaa,
|
||||
0xda, 0x41, 0xf4, 0x16, 0x8c, 0x88, 0x13, 0x20, 0xa6, 0x5e, 0x02, 0xa9, 0x63, 0x47, 0x26, 0x8a,
|
||||
0x9a, 0xa1, 0xd7, 0x40, 0xb1, 0x9d, 0x91, 0xc5, 0xef, 0x59, 0xfe, 0xbf, 0xf7, 0xbf, 0x5f, 0x8e,
|
||||
0xce, 0x39, 0xe8, 0x1c, 0x34, 0x65, 0x9c, 0x43, 0x59, 0x18, 0x4d, 0x53, 0x31, 0x66, 0x65, 0x66,
|
||||
0x34, 0xcd, 0x80, 0x4f, 0xcb, 0x99, 0x2f, 0x64, 0x36, 0x07, 0x03, 0xad, 0xd8, 0xa9, 0x49, 0xa3,
|
||||
0x26, 0x8d, 0x9a, 0x38, 0x59, 0xe7, 0x98, 0xe5, 0xaa, 0x00, 0x6a, 0x4f, 0xc7, 0x74, 0xb0, 0x77,
|
||||
0x48, 0x98, 0x16, 0xf4, 0x79, 0x98, 0x08, 0xc3, 0x86, 0x94, 0x83, 0x2a, 0xfc, 0xfb, 0x89, 0x04,
|
||||
0x09, 0xb6, 0xa5, 0x75, 0xd7, 0x50, 0x12, 0x40, 0x66, 0x82, 0xda, 0x5b, 0x52, 0x8e, 0x69, 0x5a,
|
||||
0xce, 0x99, 0x51, 0xe0, 0xa9, 0xb3, 0x2f, 0x14, 0x85, 0xf7, 0x62, 0xae, 0x20, 0x6d, 0x5d, 0x45,
|
||||
0x61, 0x26, 0x0a, 0x69, 0x26, 0x6d, 0xd4, 0x45, 0xbd, 0x83, 0x8b, 0x53, 0xe2, 0x58, 0xd2, 0xb0,
|
||||
0xe4, 0xc6, 0xb3, 0xa3, 0xa3, 0xd5, 0x4f, 0x1c, 0xbc, 0x6d, 0x62, 0xf4, 0xb1, 0x5b, 0xf6, 0xd1,
|
||||
0x83, 0xe7, 0x5a, 0x8b, 0x28, 0x64, 0x79, 0x1d, 0xa8, 0xbd, 0xd7, 0xdd, 0xb7, 0x13, 0x7c, 0xce,
|
||||
0x7a, 0x67, 0xe2, 0x77, 0x26, 0xd7, 0xa0, 0x8a, 0xd1, 0x6d, 0x3d, 0xe1, 0x73, 0x13, 0xf7, 0xa4,
|
||||
0x32, 0x93, 0x32, 0x21, 0x1c, 0x72, 0xea, 0x03, 0xba, 0x32, 0xd0, 0xe9, 0x94, 0x9a, 0xc5, 0x4c,
|
||||
0x68, 0x0b, 0xe8, 0xf7, 0xdd, 0xb2, 0x7f, 0x98, 0x09, 0xc9, 0xf8, 0xe2, 0xa9, 0x4e, 0xad, 0xbd,
|
||||
0xb5, 0x33, 0x1c, 0xdd, 0xad, 0xb6, 0x18, 0xad, 0xb7, 0x18, 0xfd, 0x6e, 0x31, 0x7a, 0xad, 0x70,
|
||||
0xb0, 0xae, 0x70, 0xf0, 0x5d, 0xe1, 0xe0, 0x71, 0xe0, 0xe6, 0xe9, 0x74, 0x4a, 0x14, 0xd0, 0x97,
|
||||
0xff, 0x7f, 0xc8, 0x9a, 0x25, 0xa1, 0x4d, 0x7b, 0xf9, 0x17, 0x00, 0x00, 0xff, 0xff, 0xfe, 0xa5,
|
||||
0x33, 0xd0, 0xd1, 0x01, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *Period) 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 *Period) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *Period) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Amount) > 0 {
|
||||
for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- {
|
||||
{
|
||||
size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintLockup(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
}
|
||||
n1, err1 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.Length, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.Length):])
|
||||
if err1 != nil {
|
||||
return 0, err1
|
||||
}
|
||||
i -= n1
|
||||
i = encodeVarintLockup(dAtA, i, uint64(n1))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func encodeVarintLockup(dAtA []byte, offset int, v uint64) int {
|
||||
offset -= sovLockup(v)
|
||||
base := offset
|
||||
for v >= 1<<7 {
|
||||
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||||
v >>= 7
|
||||
offset++
|
||||
}
|
||||
dAtA[offset] = uint8(v)
|
||||
return base
|
||||
}
|
||||
func (m *Period) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.Length)
|
||||
n += 1 + l + sovLockup(uint64(l))
|
||||
if len(m.Amount) > 0 {
|
||||
for _, e := range m.Amount {
|
||||
l = e.Size()
|
||||
n += 1 + l + sovLockup(uint64(l))
|
||||
}
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func sovLockup(x uint64) (n int) {
|
||||
return (math_bits.Len64(x|1) + 6) / 7
|
||||
}
|
||||
func sozLockup(x uint64) (n int) {
|
||||
return sovLockup(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func (m *Period) 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 ErrIntOverflowLockup
|
||||
}
|
||||
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: Period: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: Period: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Length", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowLockup
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthLockup
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthLockup
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.Length, dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowLockup
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthLockup
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthLockup
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Amount = append(m.Amount, types.Coin{})
|
||||
if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipLockup(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthLockup
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func skipLockup(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, ErrIntOverflowLockup
|
||||
}
|
||||
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, ErrIntOverflowLockup
|
||||
}
|
||||
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, ErrIntOverflowLockup
|
||||
}
|
||||
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, ErrInvalidLengthLockup
|
||||
}
|
||||
iNdEx += length
|
||||
case 3:
|
||||
depth++
|
||||
case 4:
|
||||
if depth == 0 {
|
||||
return 0, ErrUnexpectedEndOfGroupLockup
|
||||
}
|
||||
depth--
|
||||
case 5:
|
||||
iNdEx += 4
|
||||
default:
|
||||
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
||||
}
|
||||
if iNdEx < 0 {
|
||||
return 0, ErrInvalidLengthLockup
|
||||
}
|
||||
if depth == 0 {
|
||||
return iNdEx, nil
|
||||
}
|
||||
}
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
|
||||
var (
|
||||
ErrInvalidLengthLockup = fmt.Errorf("proto: negative length found during unmarshaling")
|
||||
ErrIntOverflowLockup = fmt.Errorf("proto: integer overflow")
|
||||
ErrUnexpectedEndOfGroupLockup = fmt.Errorf("proto: unexpected end of group")
|
||||
)
|
||||
1203
x/accounts/defaults/lockup/types/query.pb.go
Normal file
1203
x/accounts/defaults/lockup/types/query.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
2476
x/accounts/defaults/lockup/types/tx.pb.go
Normal file
2476
x/accounts/defaults/lockup/types/tx.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
18
x/accounts/defaults/lockup/validate.go
Normal file
18
x/accounts/defaults/lockup/validate.go
Normal file
@ -0,0 +1,18 @@
|
||||
package lockup
|
||||
|
||||
import (
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
)
|
||||
|
||||
func validateAmount(amount sdk.Coins) error {
|
||||
if !amount.IsValid() {
|
||||
return sdkerrors.ErrInvalidCoins.Wrap(amount.String())
|
||||
}
|
||||
|
||||
if amount.IsZero() {
|
||||
return sdkerrors.ErrInvalidCoins.Wrap(amount.String())
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.accounts.defaults.lockup;
|
||||
|
||||
import "amino/amino.proto";
|
||||
import "cosmos/base/v1beta1/coin.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
import "google/protobuf/duration.proto";
|
||||
|
||||
option go_package = "cosmossdk.io/x/accounts/defaults/lockup/types";
|
||||
|
||||
// Period defines a length of time and amount of coins that will be lock.
|
||||
message Period {
|
||||
// Period duration
|
||||
google.protobuf.Duration length = 1
|
||||
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdduration) = true];
|
||||
repeated cosmos.base.v1beta1.Coin amount = 2 [
|
||||
(gogoproto.nullable) = false,
|
||||
(amino.dont_omitempty) = true,
|
||||
(amino.encoding) = "legacy_coins",
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
|
||||
];
|
||||
}
|
||||
53
x/accounts/proto/cosmos/accounts/defaults/lockup/query.proto
Normal file
53
x/accounts/proto/cosmos/accounts/defaults/lockup/query.proto
Normal file
@ -0,0 +1,53 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.accounts.defaults.lockup;
|
||||
|
||||
import "cosmos/accounts/defaults/lockup/lockup.proto";
|
||||
import "cosmos/base/v1beta1/coin.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
option go_package = "cosmossdk.io/x/accounts/defaults/lockup/types";
|
||||
|
||||
// QueryLockupAccountInfoRequest get lockup account info
|
||||
message QueryLockupAccountInfoRequest {}
|
||||
|
||||
// QueryLockupAccountInfoResponse return lockup account info
|
||||
message QueryLockupAccountInfoResponse {
|
||||
// original_locking defines the value of the account original locking coins.
|
||||
repeated cosmos.base.v1beta1.Coin original_locking = 1
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||
|
||||
// delegated_free defines the value of the account free delegated amount.
|
||||
repeated cosmos.base.v1beta1.Coin delegated_free = 2
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||
|
||||
// delegated_locking defines the value of the account locking delegated amount.
|
||||
repeated cosmos.base.v1beta1.Coin delegated_locking = 3
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||
|
||||
// end_time defines the value of the account lockup start time.
|
||||
google.protobuf.Timestamp start_time = 4 [(gogoproto.stdtime) = true];
|
||||
|
||||
// end_time defines the value of the account lockup end time.
|
||||
google.protobuf.Timestamp end_time = 5 [(gogoproto.stdtime) = true];
|
||||
|
||||
// locked_coins defines the value of the account locking coins.
|
||||
repeated cosmos.base.v1beta1.Coin locked_coins = 6
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||
|
||||
// unlocked_coins defines the value of the account released coins from lockup.
|
||||
repeated cosmos.base.v1beta1.Coin unlocked_coins = 7
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||
|
||||
// owner defines the value of the owner of the lockup account.
|
||||
string owner = 8;
|
||||
}
|
||||
|
||||
// QueryLockingPeriodsRequest is used to query the periodic lockup account locking periods.
|
||||
message QueryLockingPeriodsRequest {}
|
||||
|
||||
// QueryLockingPeriodsResponse returns the periodic lockup account locking periods.
|
||||
message QueryLockingPeriodsResponse {
|
||||
// lockup_periods defines the value of the periodic lockup account locking periods.
|
||||
repeated Period locking_periods = 1;
|
||||
}
|
||||
126
x/accounts/proto/cosmos/accounts/defaults/lockup/tx.proto
Normal file
126
x/accounts/proto/cosmos/accounts/defaults/lockup/tx.proto
Normal file
@ -0,0 +1,126 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.accounts.defaults.lockup;
|
||||
|
||||
import "amino/amino.proto";
|
||||
import "cosmos/base/v1beta1/coin.proto";
|
||||
import "cosmos/accounts/defaults/lockup/lockup.proto";
|
||||
import "cosmos/msg/v1/msg.proto";
|
||||
import "cosmos_proto/cosmos.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
import "google/protobuf/any.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
option go_package = "cosmossdk.io/x/accounts/defaults/lockup/types";
|
||||
|
||||
//-------------------------------------- INIT --------------------------------------
|
||||
|
||||
// MsgInitLockupAccount defines a message that enables creating a lockup
|
||||
// account.
|
||||
message MsgInitLockupAccount {
|
||||
option (amino.name) = "cosmos-sdk/MsgInitLockupAccount";
|
||||
|
||||
option (gogoproto.equal) = true;
|
||||
|
||||
// owner of the vesting account
|
||||
string owner = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||
|
||||
// end of lockup
|
||||
google.protobuf.Timestamp end_time = 2
|
||||
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true];
|
||||
// start of lockup
|
||||
google.protobuf.Timestamp start_time = 3
|
||||
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true];
|
||||
}
|
||||
|
||||
// MsgInitLockupAccountResponse defines the Msg/InitLockupAccount response type.
|
||||
message MsgInitLockupAccountResponse {}
|
||||
|
||||
// MsgInitPeriodicLockingAccount defines a message that enables creating a periodic locking
|
||||
// account.
|
||||
message MsgInitPeriodicLockingAccount {
|
||||
option (amino.name) = "cosmos-sdk/MsgInitPeriodLockupAccount";
|
||||
|
||||
option (gogoproto.equal) = false;
|
||||
|
||||
// owner of the lockup account
|
||||
string owner = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||
// start of lockup
|
||||
google.protobuf.Timestamp start_time = 2
|
||||
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true];
|
||||
repeated Period locking_periods = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
||||
}
|
||||
|
||||
// MsgInitPeriodicLockingAccountResponse defines the Msg/InitPeriodicLockingAccount
|
||||
// response type.
|
||||
message MsgInitPeriodicLockingAccountResponse {}
|
||||
|
||||
// MsgDelegate defines a message that enable lockup account to execute delegate message
|
||||
message MsgDelegate {
|
||||
option (cosmos.msg.v1.signer) = "sender";
|
||||
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// sender is the owner of the lockup account
|
||||
string sender = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||
string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"];
|
||||
cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
||||
}
|
||||
|
||||
// MsgUndelegate defines a message that enable lockup account to execute undelegate message
|
||||
message MsgUndelegate {
|
||||
option (cosmos.msg.v1.signer) = "sender";
|
||||
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
string sender = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||
string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"];
|
||||
cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
||||
}
|
||||
|
||||
// MsgSend defines a message that enable lockup account to execute send message
|
||||
message MsgSend {
|
||||
option (cosmos.msg.v1.signer) = "sender";
|
||||
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
string sender = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||
string to_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||
repeated cosmos.base.v1beta1.Coin amount = 3 [
|
||||
(gogoproto.nullable) = false,
|
||||
(amino.dont_omitempty) = true,
|
||||
(amino.encoding) = "legacy_coins",
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
|
||||
];
|
||||
}
|
||||
|
||||
// MsgExecuteMessagesResponse defines the response for lockup execute operations
|
||||
message MsgExecuteMessagesResponse {
|
||||
repeated google.protobuf.Any responses = 1;
|
||||
}
|
||||
|
||||
// MsgWithdraw defines a message that the owner of the lockup can perform to withdraw unlocked token to an account of
|
||||
// choice
|
||||
message MsgWithdraw {
|
||||
option (cosmos.msg.v1.signer) = "withdrawer";
|
||||
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
string withdrawer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||
string to_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||
repeated string denoms = 3;
|
||||
}
|
||||
|
||||
// MsgWithdrawResponse defines the response for MsgWithdraw
|
||||
message MsgWithdrawResponse {
|
||||
string reciever = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||
repeated cosmos.base.v1beta1.Coin amount_received = 2 [
|
||||
(gogoproto.nullable) = false,
|
||||
(amino.dont_omitempty) = true,
|
||||
(amino.encoding) = "legacy_coins",
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
|
||||
];
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user