diff --git a/api/regen/ecocredit/basket/v1/state.cosmos_orm.go b/api/regen/ecocredit/basket/v1/state.cosmos_orm.go index c3261fb427..951b99ce56 100644 --- a/api/regen/ecocredit/basket/v1/state.cosmos_orm.go +++ b/api/regen/ecocredit/basket/v1/state.cosmos_orm.go @@ -457,10 +457,125 @@ func NewBasketBalanceTable(db ormtable.Schema) (BasketBalanceTable, error) { return basketBalanceTable{table}, nil } +type BasketFeeTable interface { + Insert(ctx context.Context, basketFee *BasketFee) error + Update(ctx context.Context, basketFee *BasketFee) error + Save(ctx context.Context, basketFee *BasketFee) error + Delete(ctx context.Context, basketFee *BasketFee) error + Has(ctx context.Context, denom string) (found bool, err error) + // Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + Get(ctx context.Context, denom string) (*BasketFee, error) + List(ctx context.Context, prefixKey BasketFeeIndexKey, opts ...ormlist.Option) (BasketFeeIterator, error) + ListRange(ctx context.Context, from, to BasketFeeIndexKey, opts ...ormlist.Option) (BasketFeeIterator, error) + DeleteBy(ctx context.Context, prefixKey BasketFeeIndexKey) error + DeleteRange(ctx context.Context, from, to BasketFeeIndexKey) error + + doNotImplement() +} + +type BasketFeeIterator struct { + ormtable.Iterator +} + +func (i BasketFeeIterator) Value() (*BasketFee, error) { + var basketFee BasketFee + err := i.UnmarshalMessage(&basketFee) + return &basketFee, err +} + +type BasketFeeIndexKey interface { + id() uint32 + values() []interface{} + basketFeeIndexKey() +} + +// primary key starting index.. +type BasketFeePrimaryKey = BasketFeeDenomIndexKey + +type BasketFeeDenomIndexKey struct { + vs []interface{} +} + +func (x BasketFeeDenomIndexKey) id() uint32 { return 0 } +func (x BasketFeeDenomIndexKey) values() []interface{} { return x.vs } +func (x BasketFeeDenomIndexKey) basketFeeIndexKey() {} + +func (this BasketFeeDenomIndexKey) WithDenom(denom string) BasketFeeDenomIndexKey { + this.vs = []interface{}{denom} + return this +} + +type basketFeeTable struct { + table ormtable.Table +} + +func (this basketFeeTable) Insert(ctx context.Context, basketFee *BasketFee) error { + return this.table.Insert(ctx, basketFee) +} + +func (this basketFeeTable) Update(ctx context.Context, basketFee *BasketFee) error { + return this.table.Update(ctx, basketFee) +} + +func (this basketFeeTable) Save(ctx context.Context, basketFee *BasketFee) error { + return this.table.Save(ctx, basketFee) +} + +func (this basketFeeTable) Delete(ctx context.Context, basketFee *BasketFee) error { + return this.table.Delete(ctx, basketFee) +} + +func (this basketFeeTable) Has(ctx context.Context, denom string) (found bool, err error) { + return this.table.PrimaryKey().Has(ctx, denom) +} + +func (this basketFeeTable) Get(ctx context.Context, denom string) (*BasketFee, error) { + var basketFee BasketFee + found, err := this.table.PrimaryKey().Get(ctx, &basketFee, denom) + if err != nil { + return nil, err + } + if !found { + return nil, ormerrors.NotFound + } + return &basketFee, nil +} + +func (this basketFeeTable) List(ctx context.Context, prefixKey BasketFeeIndexKey, opts ...ormlist.Option) (BasketFeeIterator, error) { + it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) + return BasketFeeIterator{it}, err +} + +func (this basketFeeTable) ListRange(ctx context.Context, from, to BasketFeeIndexKey, opts ...ormlist.Option) (BasketFeeIterator, error) { + it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...) + return BasketFeeIterator{it}, err +} + +func (this basketFeeTable) DeleteBy(ctx context.Context, prefixKey BasketFeeIndexKey) error { + return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...) +} + +func (this basketFeeTable) DeleteRange(ctx context.Context, from, to BasketFeeIndexKey) error { + return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values()) +} + +func (this basketFeeTable) doNotImplement() {} + +var _ BasketFeeTable = basketFeeTable{} + +func NewBasketFeeTable(db ormtable.Schema) (BasketFeeTable, error) { + table := db.GetTable(&BasketFee{}) + if table == nil { + return nil, ormerrors.TableNotFound.Wrap(string((&BasketFee{}).ProtoReflect().Descriptor().FullName())) + } + return basketFeeTable{table}, nil +} + type StateStore interface { BasketTable() BasketTable BasketClassTable() BasketClassTable BasketBalanceTable() BasketBalanceTable + BasketFeeTable() BasketFeeTable doNotImplement() } @@ -469,6 +584,7 @@ type stateStore struct { basket BasketTable basketClass BasketClassTable basketBalance BasketBalanceTable + basketFee BasketFeeTable } func (x stateStore) BasketTable() BasketTable { @@ -483,6 +599,10 @@ func (x stateStore) BasketBalanceTable() BasketBalanceTable { return x.basketBalance } +func (x stateStore) BasketFeeTable() BasketFeeTable { + return x.basketFee +} + func (stateStore) doNotImplement() {} var _ StateStore = stateStore{} @@ -503,9 +623,15 @@ func NewStateStore(db ormtable.Schema) (StateStore, error) { return nil, err } + basketFeeTable, err := NewBasketFeeTable(db) + if err != nil { + return nil, err + } + return stateStore{ basketTable, basketClassTable, basketBalanceTable, + basketFeeTable, }, nil } diff --git a/api/regen/ecocredit/basket/v1/state.pulsar.go b/api/regen/ecocredit/basket/v1/state.pulsar.go index a6a51df60f..70062cba3d 100644 --- a/api/regen/ecocredit/basket/v1/state.pulsar.go +++ b/api/regen/ecocredit/basket/v1/state.pulsar.go @@ -1934,6 +1934,490 @@ func (x *fastReflection_BasketBalance) ProtoMethods() *protoiface.Methods { } } +var ( + md_BasketFee protoreflect.MessageDescriptor + fd_BasketFee_denom protoreflect.FieldDescriptor + fd_BasketFee_amount protoreflect.FieldDescriptor +) + +func init() { + file_regen_ecocredit_basket_v1_state_proto_init() + md_BasketFee = File_regen_ecocredit_basket_v1_state_proto.Messages().ByName("BasketFee") + fd_BasketFee_denom = md_BasketFee.Fields().ByName("denom") + fd_BasketFee_amount = md_BasketFee.Fields().ByName("amount") +} + +var _ protoreflect.Message = (*fastReflection_BasketFee)(nil) + +type fastReflection_BasketFee BasketFee + +func (x *BasketFee) ProtoReflect() protoreflect.Message { + return (*fastReflection_BasketFee)(x) +} + +func (x *BasketFee) slowProtoReflect() protoreflect.Message { + mi := &file_regen_ecocredit_basket_v1_state_proto_msgTypes[3] + 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_BasketFee_messageType fastReflection_BasketFee_messageType +var _ protoreflect.MessageType = fastReflection_BasketFee_messageType{} + +type fastReflection_BasketFee_messageType struct{} + +func (x fastReflection_BasketFee_messageType) Zero() protoreflect.Message { + return (*fastReflection_BasketFee)(nil) +} +func (x fastReflection_BasketFee_messageType) New() protoreflect.Message { + return new(fastReflection_BasketFee) +} +func (x fastReflection_BasketFee_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_BasketFee +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_BasketFee) Descriptor() protoreflect.MessageDescriptor { + return md_BasketFee +} + +// 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_BasketFee) Type() protoreflect.MessageType { + return _fastReflection_BasketFee_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_BasketFee) New() protoreflect.Message { + return new(fastReflection_BasketFee) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_BasketFee) Interface() protoreflect.ProtoMessage { + return (*BasketFee)(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_BasketFee) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Denom != "" { + value := protoreflect.ValueOfString(x.Denom) + if !f(fd_BasketFee_denom, value) { + return + } + } + if x.Amount != "" { + value := protoreflect.ValueOfString(x.Amount) + if !f(fd_BasketFee_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_BasketFee) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.ecocredit.basket.v1.BasketFee.denom": + return x.Denom != "" + case "regen.ecocredit.basket.v1.BasketFee.amount": + return x.Amount != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.basket.v1.BasketFee")) + } + panic(fmt.Errorf("message regen.ecocredit.basket.v1.BasketFee 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_BasketFee) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.ecocredit.basket.v1.BasketFee.denom": + x.Denom = "" + case "regen.ecocredit.basket.v1.BasketFee.amount": + x.Amount = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.basket.v1.BasketFee")) + } + panic(fmt.Errorf("message regen.ecocredit.basket.v1.BasketFee 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_BasketFee) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.ecocredit.basket.v1.BasketFee.denom": + value := x.Denom + return protoreflect.ValueOfString(value) + case "regen.ecocredit.basket.v1.BasketFee.amount": + value := x.Amount + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.basket.v1.BasketFee")) + } + panic(fmt.Errorf("message regen.ecocredit.basket.v1.BasketFee 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_BasketFee) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.ecocredit.basket.v1.BasketFee.denom": + x.Denom = value.Interface().(string) + case "regen.ecocredit.basket.v1.BasketFee.amount": + x.Amount = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.basket.v1.BasketFee")) + } + panic(fmt.Errorf("message regen.ecocredit.basket.v1.BasketFee 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_BasketFee) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.ecocredit.basket.v1.BasketFee.denom": + panic(fmt.Errorf("field denom of message regen.ecocredit.basket.v1.BasketFee is not mutable")) + case "regen.ecocredit.basket.v1.BasketFee.amount": + panic(fmt.Errorf("field amount of message regen.ecocredit.basket.v1.BasketFee is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.basket.v1.BasketFee")) + } + panic(fmt.Errorf("message regen.ecocredit.basket.v1.BasketFee 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_BasketFee) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.ecocredit.basket.v1.BasketFee.denom": + return protoreflect.ValueOfString("") + case "regen.ecocredit.basket.v1.BasketFee.amount": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.basket.v1.BasketFee")) + } + panic(fmt.Errorf("message regen.ecocredit.basket.v1.BasketFee 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_BasketFee) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.ecocredit.basket.v1.BasketFee", 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_BasketFee) 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_BasketFee) 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_BasketFee) 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_BasketFee) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*BasketFee) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Denom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Amount) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*BasketFee) + 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 { + i -= len(x.Amount) + copy(dAtA[i:], x.Amount) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Amount))) + i-- + dAtA[i] = 0x12 + } + if len(x.Denom) > 0 { + i -= len(x.Denom) + copy(dAtA[i:], x.Denom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) + 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().(*BasketFee) + 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: BasketFee: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BasketFee: 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 Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Denom = string(dAtA[iNdEx:postIndex]) + 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 stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Amount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -2169,6 +2653,53 @@ func (x *BasketBalance) GetBatchStartDate() *timestamppb.Timestamp { return nil } +// BasketFee is a valid coin denom and amount that may be used as the fee +// for basket creation. +type BasketFee struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // denom is the denom of the fee required to create a basket. + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + // amount is the amount of the fee required to create a basket. + Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *BasketFee) Reset() { + *x = BasketFee{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_ecocredit_basket_v1_state_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BasketFee) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BasketFee) ProtoMessage() {} + +// Deprecated: Use BasketFee.ProtoReflect.Descriptor instead. +func (*BasketFee) Descriptor() ([]byte, []int) { + return file_regen_ecocredit_basket_v1_state_proto_rawDescGZIP(), []int{3} +} + +func (x *BasketFee) GetDenom() string { + if x != nil { + return x.Denom + } + return "" +} + +func (x *BasketFee) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + var File_regen_ecocredit_basket_v1_state_proto protoreflect.FileDescriptor var file_regen_ecocredit_basket_v1_state_proto_rawDesc = []byte{ @@ -2226,24 +2757,29 @@ var file_regen_ecocredit_basket_v1_state_proto_rawDesc = []byte{ 0x0a, 0x15, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x2c, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1e, 0x0a, 0x1a, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x2c, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x5f, 0x64, 0x61, 0x74, 0x65, 0x10, 0x01, 0x18, 0x03, 0x42, 0x80, 0x02, 0x0a, 0x1d, 0x63, 0x6f, - 0x6d, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, - 0x74, 0x2e, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4c, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x65, 0x63, 0x6f, 0x63, 0x72, - 0x65, 0x64, 0x69, 0x74, 0x2f, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x62, - 0x61, 0x73, 0x6b, 0x65, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x52, 0x45, 0x42, 0xaa, 0x02, 0x19, - 0x52, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, - 0x42, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x19, 0x52, 0x65, 0x67, 0x65, - 0x6e, 0x5c, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x5c, 0x42, 0x61, 0x73, 0x6b, - 0x65, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x25, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x45, 0x63, - 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x5c, 0x42, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x5c, 0x56, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1c, - 0x52, 0x65, 0x67, 0x65, 0x6e, 0x3a, 0x3a, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, - 0x3a, 0x3a, 0x42, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x5f, 0x64, 0x61, 0x74, 0x65, 0x10, 0x01, 0x18, 0x03, 0x22, 0x4c, 0x0a, 0x09, 0x42, 0x61, 0x73, + 0x6b, 0x65, 0x74, 0x46, 0x65, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x16, 0x0a, 0x06, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x11, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x0b, 0x0a, 0x07, 0x0a, 0x05, + 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x0d, 0x42, 0x80, 0x02, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, + 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, + 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, + 0x69, 0x74, 0x2f, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x62, 0x61, 0x73, + 0x6b, 0x65, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x52, 0x45, 0x42, 0xaa, 0x02, 0x19, 0x52, 0x65, + 0x67, 0x65, 0x6e, 0x2e, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x42, 0x61, + 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x19, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, + 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x5c, 0x42, 0x61, 0x73, 0x6b, 0x65, 0x74, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x25, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x45, 0x63, 0x6f, 0x63, + 0x72, 0x65, 0x64, 0x69, 0x74, 0x5c, 0x42, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x5c, 0x56, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1c, 0x52, 0x65, + 0x67, 0x65, 0x6e, 0x3a, 0x3a, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x3a, 0x3a, + 0x42, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -2258,17 +2794,18 @@ func file_regen_ecocredit_basket_v1_state_proto_rawDescGZIP() []byte { return file_regen_ecocredit_basket_v1_state_proto_rawDescData } -var file_regen_ecocredit_basket_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_regen_ecocredit_basket_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_regen_ecocredit_basket_v1_state_proto_goTypes = []interface{}{ (*Basket)(nil), // 0: regen.ecocredit.basket.v1.Basket (*BasketClass)(nil), // 1: regen.ecocredit.basket.v1.BasketClass (*BasketBalance)(nil), // 2: regen.ecocredit.basket.v1.BasketBalance - (*DateCriteria)(nil), // 3: regen.ecocredit.basket.v1.DateCriteria - (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp + (*BasketFee)(nil), // 3: regen.ecocredit.basket.v1.BasketFee + (*DateCriteria)(nil), // 4: regen.ecocredit.basket.v1.DateCriteria + (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp } var file_regen_ecocredit_basket_v1_state_proto_depIdxs = []int32{ - 3, // 0: regen.ecocredit.basket.v1.Basket.date_criteria:type_name -> regen.ecocredit.basket.v1.DateCriteria - 4, // 1: regen.ecocredit.basket.v1.BasketBalance.batch_start_date:type_name -> google.protobuf.Timestamp + 4, // 0: regen.ecocredit.basket.v1.Basket.date_criteria:type_name -> regen.ecocredit.basket.v1.DateCriteria + 5, // 1: regen.ecocredit.basket.v1.BasketBalance.batch_start_date:type_name -> google.protobuf.Timestamp 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 @@ -2319,6 +2856,18 @@ func file_regen_ecocredit_basket_v1_state_proto_init() { return nil } } + file_regen_ecocredit_basket_v1_state_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BasketFee); 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{ @@ -2326,7 +2875,7 @@ func file_regen_ecocredit_basket_v1_state_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_regen_ecocredit_basket_v1_state_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, diff --git a/api/regen/ecocredit/basket/v1/tx.pulsar.go b/api/regen/ecocredit/basket/v1/tx.pulsar.go index c2ecf5b84b..10bb517972 100644 --- a/api/regen/ecocredit/basket/v1/tx.pulsar.go +++ b/api/regen/ecocredit/basket/v1/tx.pulsar.go @@ -3691,6 +3691,1044 @@ func (x *fastReflection_MsgTakeResponse) ProtoMethods() *protoiface.Methods { } } +var _ protoreflect.List = (*_MsgUpdateBasketFee_2_list)(nil) + +type _MsgUpdateBasketFee_2_list struct { + list *[]*v1beta1.Coin +} + +func (x *_MsgUpdateBasketFee_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgUpdateBasketFee_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgUpdateBasketFee_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_MsgUpdateBasketFee_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgUpdateBasketFee_2_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgUpdateBasketFee_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgUpdateBasketFee_2_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgUpdateBasketFee_2_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_MsgUpdateBasketFee_3_list)(nil) + +type _MsgUpdateBasketFee_3_list struct { + list *[]string +} + +func (x *_MsgUpdateBasketFee_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgUpdateBasketFee_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_MsgUpdateBasketFee_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_MsgUpdateBasketFee_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgUpdateBasketFee_3_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message MsgUpdateBasketFee at list field RemoveFeeDenoms as it is not of Message kind")) +} + +func (x *_MsgUpdateBasketFee_3_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_MsgUpdateBasketFee_3_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_MsgUpdateBasketFee_3_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgUpdateBasketFee protoreflect.MessageDescriptor + fd_MsgUpdateBasketFee_root_address protoreflect.FieldDescriptor + fd_MsgUpdateBasketFee_add_fees protoreflect.FieldDescriptor + fd_MsgUpdateBasketFee_remove_fee_denoms protoreflect.FieldDescriptor +) + +func init() { + file_regen_ecocredit_basket_v1_tx_proto_init() + md_MsgUpdateBasketFee = File_regen_ecocredit_basket_v1_tx_proto.Messages().ByName("MsgUpdateBasketFee") + fd_MsgUpdateBasketFee_root_address = md_MsgUpdateBasketFee.Fields().ByName("root_address") + fd_MsgUpdateBasketFee_add_fees = md_MsgUpdateBasketFee.Fields().ByName("add_fees") + fd_MsgUpdateBasketFee_remove_fee_denoms = md_MsgUpdateBasketFee.Fields().ByName("remove_fee_denoms") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateBasketFee)(nil) + +type fastReflection_MsgUpdateBasketFee MsgUpdateBasketFee + +func (x *MsgUpdateBasketFee) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateBasketFee)(x) +} + +func (x *MsgUpdateBasketFee) slowProtoReflect() protoreflect.Message { + mi := &file_regen_ecocredit_basket_v1_tx_proto_msgTypes[6] + 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_MsgUpdateBasketFee_messageType fastReflection_MsgUpdateBasketFee_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateBasketFee_messageType{} + +type fastReflection_MsgUpdateBasketFee_messageType struct{} + +func (x fastReflection_MsgUpdateBasketFee_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateBasketFee)(nil) +} +func (x fastReflection_MsgUpdateBasketFee_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateBasketFee) +} +func (x fastReflection_MsgUpdateBasketFee_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateBasketFee +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateBasketFee) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateBasketFee +} + +// 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_MsgUpdateBasketFee) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateBasketFee_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateBasketFee) New() protoreflect.Message { + return new(fastReflection_MsgUpdateBasketFee) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateBasketFee) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateBasketFee)(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_MsgUpdateBasketFee) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.RootAddress != "" { + value := protoreflect.ValueOfString(x.RootAddress) + if !f(fd_MsgUpdateBasketFee_root_address, value) { + return + } + } + if len(x.AddFees) != 0 { + value := protoreflect.ValueOfList(&_MsgUpdateBasketFee_2_list{list: &x.AddFees}) + if !f(fd_MsgUpdateBasketFee_add_fees, value) { + return + } + } + if len(x.RemoveFeeDenoms) != 0 { + value := protoreflect.ValueOfList(&_MsgUpdateBasketFee_3_list{list: &x.RemoveFeeDenoms}) + if !f(fd_MsgUpdateBasketFee_remove_fee_denoms, 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_MsgUpdateBasketFee) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.ecocredit.basket.v1.MsgUpdateBasketFee.root_address": + return x.RootAddress != "" + case "regen.ecocredit.basket.v1.MsgUpdateBasketFee.add_fees": + return len(x.AddFees) != 0 + case "regen.ecocredit.basket.v1.MsgUpdateBasketFee.remove_fee_denoms": + return len(x.RemoveFeeDenoms) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.basket.v1.MsgUpdateBasketFee")) + } + panic(fmt.Errorf("message regen.ecocredit.basket.v1.MsgUpdateBasketFee 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_MsgUpdateBasketFee) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.ecocredit.basket.v1.MsgUpdateBasketFee.root_address": + x.RootAddress = "" + case "regen.ecocredit.basket.v1.MsgUpdateBasketFee.add_fees": + x.AddFees = nil + case "regen.ecocredit.basket.v1.MsgUpdateBasketFee.remove_fee_denoms": + x.RemoveFeeDenoms = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.basket.v1.MsgUpdateBasketFee")) + } + panic(fmt.Errorf("message regen.ecocredit.basket.v1.MsgUpdateBasketFee 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_MsgUpdateBasketFee) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.ecocredit.basket.v1.MsgUpdateBasketFee.root_address": + value := x.RootAddress + return protoreflect.ValueOfString(value) + case "regen.ecocredit.basket.v1.MsgUpdateBasketFee.add_fees": + if len(x.AddFees) == 0 { + return protoreflect.ValueOfList(&_MsgUpdateBasketFee_2_list{}) + } + listValue := &_MsgUpdateBasketFee_2_list{list: &x.AddFees} + return protoreflect.ValueOfList(listValue) + case "regen.ecocredit.basket.v1.MsgUpdateBasketFee.remove_fee_denoms": + if len(x.RemoveFeeDenoms) == 0 { + return protoreflect.ValueOfList(&_MsgUpdateBasketFee_3_list{}) + } + listValue := &_MsgUpdateBasketFee_3_list{list: &x.RemoveFeeDenoms} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.basket.v1.MsgUpdateBasketFee")) + } + panic(fmt.Errorf("message regen.ecocredit.basket.v1.MsgUpdateBasketFee 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_MsgUpdateBasketFee) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.ecocredit.basket.v1.MsgUpdateBasketFee.root_address": + x.RootAddress = value.Interface().(string) + case "regen.ecocredit.basket.v1.MsgUpdateBasketFee.add_fees": + lv := value.List() + clv := lv.(*_MsgUpdateBasketFee_2_list) + x.AddFees = *clv.list + case "regen.ecocredit.basket.v1.MsgUpdateBasketFee.remove_fee_denoms": + lv := value.List() + clv := lv.(*_MsgUpdateBasketFee_3_list) + x.RemoveFeeDenoms = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.basket.v1.MsgUpdateBasketFee")) + } + panic(fmt.Errorf("message regen.ecocredit.basket.v1.MsgUpdateBasketFee 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_MsgUpdateBasketFee) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.ecocredit.basket.v1.MsgUpdateBasketFee.add_fees": + if x.AddFees == nil { + x.AddFees = []*v1beta1.Coin{} + } + value := &_MsgUpdateBasketFee_2_list{list: &x.AddFees} + return protoreflect.ValueOfList(value) + case "regen.ecocredit.basket.v1.MsgUpdateBasketFee.remove_fee_denoms": + if x.RemoveFeeDenoms == nil { + x.RemoveFeeDenoms = []string{} + } + value := &_MsgUpdateBasketFee_3_list{list: &x.RemoveFeeDenoms} + return protoreflect.ValueOfList(value) + case "regen.ecocredit.basket.v1.MsgUpdateBasketFee.root_address": + panic(fmt.Errorf("field root_address of message regen.ecocredit.basket.v1.MsgUpdateBasketFee is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.basket.v1.MsgUpdateBasketFee")) + } + panic(fmt.Errorf("message regen.ecocredit.basket.v1.MsgUpdateBasketFee 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_MsgUpdateBasketFee) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.ecocredit.basket.v1.MsgUpdateBasketFee.root_address": + return protoreflect.ValueOfString("") + case "regen.ecocredit.basket.v1.MsgUpdateBasketFee.add_fees": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_MsgUpdateBasketFee_2_list{list: &list}) + case "regen.ecocredit.basket.v1.MsgUpdateBasketFee.remove_fee_denoms": + list := []string{} + return protoreflect.ValueOfList(&_MsgUpdateBasketFee_3_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.basket.v1.MsgUpdateBasketFee")) + } + panic(fmt.Errorf("message regen.ecocredit.basket.v1.MsgUpdateBasketFee 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_MsgUpdateBasketFee) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.ecocredit.basket.v1.MsgUpdateBasketFee", 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_MsgUpdateBasketFee) 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_MsgUpdateBasketFee) 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_MsgUpdateBasketFee) 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_MsgUpdateBasketFee) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateBasketFee) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.RootAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.AddFees) > 0 { + for _, e := range x.AddFees { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.RemoveFeeDenoms) > 0 { + for _, s := range x.RemoveFeeDenoms { + l = len(s) + 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().(*MsgUpdateBasketFee) + 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.RemoveFeeDenoms) > 0 { + for iNdEx := len(x.RemoveFeeDenoms) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.RemoveFeeDenoms[iNdEx]) + copy(dAtA[i:], x.RemoveFeeDenoms[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RemoveFeeDenoms[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(x.AddFees) > 0 { + for iNdEx := len(x.AddFees) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.AddFees[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 len(x.RootAddress) > 0 { + i -= len(x.RootAddress) + copy(dAtA[i:], x.RootAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RootAddress))) + 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().(*MsgUpdateBasketFee) + 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: MsgUpdateBasketFee: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateBasketFee: 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 RootAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.RootAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AddFees", 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.AddFees = append(x.AddFees, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AddFees[len(x.AddFees)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RemoveFeeDenoms", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.RemoveFeeDenoms = append(x.RemoveFeeDenoms, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgUpdateBasketFeeResponse protoreflect.MessageDescriptor +) + +func init() { + file_regen_ecocredit_basket_v1_tx_proto_init() + md_MsgUpdateBasketFeeResponse = File_regen_ecocredit_basket_v1_tx_proto.Messages().ByName("MsgUpdateBasketFeeResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateBasketFeeResponse)(nil) + +type fastReflection_MsgUpdateBasketFeeResponse MsgUpdateBasketFeeResponse + +func (x *MsgUpdateBasketFeeResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateBasketFeeResponse)(x) +} + +func (x *MsgUpdateBasketFeeResponse) slowProtoReflect() protoreflect.Message { + mi := &file_regen_ecocredit_basket_v1_tx_proto_msgTypes[7] + 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_MsgUpdateBasketFeeResponse_messageType fastReflection_MsgUpdateBasketFeeResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateBasketFeeResponse_messageType{} + +type fastReflection_MsgUpdateBasketFeeResponse_messageType struct{} + +func (x fastReflection_MsgUpdateBasketFeeResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateBasketFeeResponse)(nil) +} +func (x fastReflection_MsgUpdateBasketFeeResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateBasketFeeResponse) +} +func (x fastReflection_MsgUpdateBasketFeeResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateBasketFeeResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateBasketFeeResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateBasketFeeResponse +} + +// 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_MsgUpdateBasketFeeResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateBasketFeeResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateBasketFeeResponse) New() protoreflect.Message { + return new(fastReflection_MsgUpdateBasketFeeResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateBasketFeeResponse) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateBasketFeeResponse)(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_MsgUpdateBasketFeeResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// 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_MsgUpdateBasketFeeResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.basket.v1.MsgUpdateBasketFeeResponse")) + } + panic(fmt.Errorf("message regen.ecocredit.basket.v1.MsgUpdateBasketFeeResponse 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_MsgUpdateBasketFeeResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.basket.v1.MsgUpdateBasketFeeResponse")) + } + panic(fmt.Errorf("message regen.ecocredit.basket.v1.MsgUpdateBasketFeeResponse 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_MsgUpdateBasketFeeResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.basket.v1.MsgUpdateBasketFeeResponse")) + } + panic(fmt.Errorf("message regen.ecocredit.basket.v1.MsgUpdateBasketFeeResponse 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_MsgUpdateBasketFeeResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.basket.v1.MsgUpdateBasketFeeResponse")) + } + panic(fmt.Errorf("message regen.ecocredit.basket.v1.MsgUpdateBasketFeeResponse 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_MsgUpdateBasketFeeResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.basket.v1.MsgUpdateBasketFeeResponse")) + } + panic(fmt.Errorf("message regen.ecocredit.basket.v1.MsgUpdateBasketFeeResponse 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_MsgUpdateBasketFeeResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.ecocredit.basket.v1.MsgUpdateBasketFeeResponse")) + } + panic(fmt.Errorf("message regen.ecocredit.basket.v1.MsgUpdateBasketFeeResponse 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_MsgUpdateBasketFeeResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.ecocredit.basket.v1.MsgUpdateBasketFeeResponse", 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_MsgUpdateBasketFeeResponse) 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_MsgUpdateBasketFeeResponse) 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_MsgUpdateBasketFeeResponse) 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_MsgUpdateBasketFeeResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateBasketFeeResponse) + 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.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().(*MsgUpdateBasketFeeResponse) + 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 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().(*MsgUpdateBasketFeeResponse) + 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: MsgUpdateBasketFeeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateBasketFeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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 @@ -4099,6 +5137,89 @@ func (x *MsgTakeResponse) GetCredits() []*BasketCredit { return nil } +// MsgUpdateBasketFee is the Msg/UpdateBasketFee request type. +type MsgUpdateBasketFee struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // root_address is the address of the signer. + // This MUST equal the address of the gov module for the tx to succeed. + RootAddress string `protobuf:"bytes,1,opt,name=root_address,json=rootAddress,proto3" json:"root_address,omitempty"` + // add_fees defines a list of coins to append to the list of fees that can be used in the basket creation fee. + AddFees []*v1beta1.Coin `protobuf:"bytes,2,rep,name=add_fees,json=addFees,proto3" json:"add_fees,omitempty"` + // remove_fee_denoms defines a list of denoms to remove from the list of basket creation fees. + RemoveFeeDenoms []string `protobuf:"bytes,3,rep,name=remove_fee_denoms,json=removeFeeDenoms,proto3" json:"remove_fee_denoms,omitempty"` +} + +func (x *MsgUpdateBasketFee) Reset() { + *x = MsgUpdateBasketFee{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_ecocredit_basket_v1_tx_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateBasketFee) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateBasketFee) ProtoMessage() {} + +// Deprecated: Use MsgUpdateBasketFee.ProtoReflect.Descriptor instead. +func (*MsgUpdateBasketFee) Descriptor() ([]byte, []int) { + return file_regen_ecocredit_basket_v1_tx_proto_rawDescGZIP(), []int{6} +} + +func (x *MsgUpdateBasketFee) GetRootAddress() string { + if x != nil { + return x.RootAddress + } + return "" +} + +func (x *MsgUpdateBasketFee) GetAddFees() []*v1beta1.Coin { + if x != nil { + return x.AddFees + } + return nil +} + +func (x *MsgUpdateBasketFee) GetRemoveFeeDenoms() []string { + if x != nil { + return x.RemoveFeeDenoms + } + return nil +} + +// MsgUpdateBasketFeeResponse is the Msg/UpdateBasketFee response type. +type MsgUpdateBasketFeeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgUpdateBasketFeeResponse) Reset() { + *x = MsgUpdateBasketFeeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_ecocredit_basket_v1_tx_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateBasketFeeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateBasketFeeResponse) ProtoMessage() {} + +// Deprecated: Use MsgUpdateBasketFeeResponse.ProtoReflect.Descriptor instead. +func (*MsgUpdateBasketFeeResponse) Descriptor() ([]byte, []int) { + return file_regen_ecocredit_basket_v1_tx_proto_rawDescGZIP(), []int{7} +} + var File_regen_ecocredit_basket_v1_tx_proto protoreflect.FileDescriptor var file_regen_ecocredit_basket_v1_tx_proto_rawDesc = []byte{ @@ -4170,41 +5291,60 @@ var file_regen_ecocredit_basket_v1_tx_proto_rawDesc = []byte{ 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x43, - 0x72, 0x65, 0x64, 0x69, 0x74, 0x52, 0x07, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x32, 0x90, - 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x5c, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x12, 0x24, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, + 0x72, 0x65, 0x64, 0x69, 0x74, 0x52, 0x07, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x22, 0x99, + 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x73, 0x6b, + 0x65, 0x74, 0x46, 0x65, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x6f, 0x6f, + 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x34, 0x0a, 0x08, 0x61, 0x64, 0x64, 0x5f, + 0x66, 0x65, 0x65, 0x73, 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, 0x52, 0x07, 0x61, 0x64, 0x64, 0x46, 0x65, 0x65, 0x73, 0x12, 0x2a, + 0x0a, 0x11, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x64, 0x65, 0x6e, + 0x6f, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x46, 0x65, 0x65, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, + 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x46, 0x65, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x89, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, + 0x12, 0x5c, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x24, 0x2e, 0x72, 0x65, 0x67, + 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x62, 0x61, 0x73, + 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x1a, 0x2c, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x1a, 0x2c, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, - 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x03, 0x50, 0x75, 0x74, 0x12, 0x21, 0x2e, 0x72, 0x65, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, + 0x0a, 0x03, 0x50, 0x75, 0x74, 0x12, 0x21, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, + 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x75, 0x74, 0x1a, 0x29, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, + 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x62, 0x61, 0x73, 0x6b, 0x65, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x04, 0x54, 0x61, 0x6b, 0x65, 0x12, 0x22, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x62, 0x61, - 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x75, 0x74, 0x1a, 0x29, + 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x61, 0x6b, 0x65, 0x1a, + 0x2a, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, + 0x74, 0x2e, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, + 0x61, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x77, 0x0a, 0x0f, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x46, 0x65, 0x65, 0x12, 0x2d, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, - 0x2e, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x75, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x04, 0x54, 0x61, 0x6b, - 0x65, 0x12, 0x22, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, - 0x64, 0x69, 0x74, 0x2e, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x54, 0x61, 0x6b, 0x65, 0x1a, 0x2a, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, - 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x42, 0xfd, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, - 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, - 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4c, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, - 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6c, - 0x65, 0x64, 0x67, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, - 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2f, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, - 0x2f, 0x76, 0x31, 0x3b, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x52, - 0x45, 0x42, 0xaa, 0x02, 0x19, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x45, 0x63, 0x6f, 0x63, 0x72, - 0x65, 0x64, 0x69, 0x74, 0x2e, 0x42, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, - 0x19, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, - 0x5c, 0x42, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x25, 0x52, 0x65, 0x67, - 0x65, 0x6e, 0x5c, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x5c, 0x42, 0x61, 0x73, - 0x6b, 0x65, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x1c, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x3a, 0x3a, 0x45, 0x63, 0x6f, 0x63, - 0x72, 0x65, 0x64, 0x69, 0x74, 0x3a, 0x3a, 0x42, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x46, 0x65, 0x65, 0x1a, 0x35, 0x2e, + 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, + 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x42, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xfd, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x65, 0x67, + 0x65, 0x6e, 0x2e, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x62, 0x61, 0x73, + 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x4c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, + 0x67, 0x65, 0x6e, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x72, 0x65, 0x67, 0x65, + 0x6e, 0x2d, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x67, + 0x65, 0x6e, 0x2f, 0x65, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2f, 0x62, 0x61, 0x73, + 0x6b, 0x65, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x76, 0x31, 0xa2, + 0x02, 0x03, 0x52, 0x45, 0x42, 0xaa, 0x02, 0x19, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x45, 0x63, + 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x2e, 0x42, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x19, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, + 0x64, 0x69, 0x74, 0x5c, 0x42, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x25, + 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x45, 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x5c, + 0x42, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1c, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x3a, 0x3a, 0x45, + 0x63, 0x6f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x3a, 0x3a, 0x42, 0x61, 0x73, 0x6b, 0x65, 0x74, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4219,34 +5359,39 @@ func file_regen_ecocredit_basket_v1_tx_proto_rawDescGZIP() []byte { return file_regen_ecocredit_basket_v1_tx_proto_rawDescData } -var file_regen_ecocredit_basket_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_regen_ecocredit_basket_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_regen_ecocredit_basket_v1_tx_proto_goTypes = []interface{}{ - (*MsgCreate)(nil), // 0: regen.ecocredit.basket.v1.MsgCreate - (*MsgCreateResponse)(nil), // 1: regen.ecocredit.basket.v1.MsgCreateResponse - (*MsgPut)(nil), // 2: regen.ecocredit.basket.v1.MsgPut - (*MsgPutResponse)(nil), // 3: regen.ecocredit.basket.v1.MsgPutResponse - (*MsgTake)(nil), // 4: regen.ecocredit.basket.v1.MsgTake - (*MsgTakeResponse)(nil), // 5: regen.ecocredit.basket.v1.MsgTakeResponse - (*DateCriteria)(nil), // 6: regen.ecocredit.basket.v1.DateCriteria - (*v1beta1.Coin)(nil), // 7: cosmos.base.v1beta1.Coin - (*BasketCredit)(nil), // 8: regen.ecocredit.basket.v1.BasketCredit + (*MsgCreate)(nil), // 0: regen.ecocredit.basket.v1.MsgCreate + (*MsgCreateResponse)(nil), // 1: regen.ecocredit.basket.v1.MsgCreateResponse + (*MsgPut)(nil), // 2: regen.ecocredit.basket.v1.MsgPut + (*MsgPutResponse)(nil), // 3: regen.ecocredit.basket.v1.MsgPutResponse + (*MsgTake)(nil), // 4: regen.ecocredit.basket.v1.MsgTake + (*MsgTakeResponse)(nil), // 5: regen.ecocredit.basket.v1.MsgTakeResponse + (*MsgUpdateBasketFee)(nil), // 6: regen.ecocredit.basket.v1.MsgUpdateBasketFee + (*MsgUpdateBasketFeeResponse)(nil), // 7: regen.ecocredit.basket.v1.MsgUpdateBasketFeeResponse + (*DateCriteria)(nil), // 8: regen.ecocredit.basket.v1.DateCriteria + (*v1beta1.Coin)(nil), // 9: cosmos.base.v1beta1.Coin + (*BasketCredit)(nil), // 10: regen.ecocredit.basket.v1.BasketCredit } var file_regen_ecocredit_basket_v1_tx_proto_depIdxs = []int32{ - 6, // 0: regen.ecocredit.basket.v1.MsgCreate.date_criteria:type_name -> regen.ecocredit.basket.v1.DateCriteria - 7, // 1: regen.ecocredit.basket.v1.MsgCreate.fee:type_name -> cosmos.base.v1beta1.Coin - 8, // 2: regen.ecocredit.basket.v1.MsgPut.credits:type_name -> regen.ecocredit.basket.v1.BasketCredit - 8, // 3: regen.ecocredit.basket.v1.MsgTakeResponse.credits:type_name -> regen.ecocredit.basket.v1.BasketCredit - 0, // 4: regen.ecocredit.basket.v1.Msg.Create:input_type -> regen.ecocredit.basket.v1.MsgCreate - 2, // 5: regen.ecocredit.basket.v1.Msg.Put:input_type -> regen.ecocredit.basket.v1.MsgPut - 4, // 6: regen.ecocredit.basket.v1.Msg.Take:input_type -> regen.ecocredit.basket.v1.MsgTake - 1, // 7: regen.ecocredit.basket.v1.Msg.Create:output_type -> regen.ecocredit.basket.v1.MsgCreateResponse - 3, // 8: regen.ecocredit.basket.v1.Msg.Put:output_type -> regen.ecocredit.basket.v1.MsgPutResponse - 5, // 9: regen.ecocredit.basket.v1.Msg.Take:output_type -> regen.ecocredit.basket.v1.MsgTakeResponse - 7, // [7:10] is the sub-list for method output_type - 4, // [4:7] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 8, // 0: regen.ecocredit.basket.v1.MsgCreate.date_criteria:type_name -> regen.ecocredit.basket.v1.DateCriteria + 9, // 1: regen.ecocredit.basket.v1.MsgCreate.fee:type_name -> cosmos.base.v1beta1.Coin + 10, // 2: regen.ecocredit.basket.v1.MsgPut.credits:type_name -> regen.ecocredit.basket.v1.BasketCredit + 10, // 3: regen.ecocredit.basket.v1.MsgTakeResponse.credits:type_name -> regen.ecocredit.basket.v1.BasketCredit + 9, // 4: regen.ecocredit.basket.v1.MsgUpdateBasketFee.add_fees:type_name -> cosmos.base.v1beta1.Coin + 0, // 5: regen.ecocredit.basket.v1.Msg.Create:input_type -> regen.ecocredit.basket.v1.MsgCreate + 2, // 6: regen.ecocredit.basket.v1.Msg.Put:input_type -> regen.ecocredit.basket.v1.MsgPut + 4, // 7: regen.ecocredit.basket.v1.Msg.Take:input_type -> regen.ecocredit.basket.v1.MsgTake + 6, // 8: regen.ecocredit.basket.v1.Msg.UpdateBasketFee:input_type -> regen.ecocredit.basket.v1.MsgUpdateBasketFee + 1, // 9: regen.ecocredit.basket.v1.Msg.Create:output_type -> regen.ecocredit.basket.v1.MsgCreateResponse + 3, // 10: regen.ecocredit.basket.v1.Msg.Put:output_type -> regen.ecocredit.basket.v1.MsgPutResponse + 5, // 11: regen.ecocredit.basket.v1.Msg.Take:output_type -> regen.ecocredit.basket.v1.MsgTakeResponse + 7, // 12: regen.ecocredit.basket.v1.Msg.UpdateBasketFee:output_type -> regen.ecocredit.basket.v1.MsgUpdateBasketFeeResponse + 9, // [9:13] is the sub-list for method output_type + 5, // [5:9] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_regen_ecocredit_basket_v1_tx_proto_init() } @@ -4328,6 +5473,30 @@ func file_regen_ecocredit_basket_v1_tx_proto_init() { return nil } } + file_regen_ecocredit_basket_v1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateBasketFee); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_ecocredit_basket_v1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateBasketFeeResponse); 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{ @@ -4335,7 +5504,7 @@ func file_regen_ecocredit_basket_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_regen_ecocredit_basket_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 8, NumExtensions: 0, NumServices: 1, }, diff --git a/api/regen/ecocredit/basket/v1/tx_grpc.pb.go b/api/regen/ecocredit/basket/v1/tx_grpc.pb.go index 547798a234..72b284afde 100644 --- a/api/regen/ecocredit/basket/v1/tx_grpc.pb.go +++ b/api/regen/ecocredit/basket/v1/tx_grpc.pb.go @@ -29,6 +29,9 @@ type MsgClient interface { // Take takes credits from a basket starting from the oldest // credits first. Take(ctx context.Context, in *MsgTake, opts ...grpc.CallOption) (*MsgTakeResponse, error) + // UpdateClassFee is a governance method that allows for the addition and removal of fees to be used for the + // basket creation fee. + UpdateBasketFee(ctx context.Context, in *MsgUpdateBasketFee, opts ...grpc.CallOption) (*MsgUpdateBasketFeeResponse, error) } type msgClient struct { @@ -66,6 +69,15 @@ func (c *msgClient) Take(ctx context.Context, in *MsgTake, opts ...grpc.CallOpti return out, nil } +func (c *msgClient) UpdateBasketFee(ctx context.Context, in *MsgUpdateBasketFee, opts ...grpc.CallOption) (*MsgUpdateBasketFeeResponse, error) { + out := new(MsgUpdateBasketFeeResponse) + err := c.cc.Invoke(ctx, "/regen.ecocredit.basket.v1.Msg/UpdateBasketFee", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer // for forward compatibility @@ -77,6 +89,9 @@ type MsgServer interface { // Take takes credits from a basket starting from the oldest // credits first. Take(context.Context, *MsgTake) (*MsgTakeResponse, error) + // UpdateClassFee is a governance method that allows for the addition and removal of fees to be used for the + // basket creation fee. + UpdateBasketFee(context.Context, *MsgUpdateBasketFee) (*MsgUpdateBasketFeeResponse, error) mustEmbedUnimplementedMsgServer() } @@ -93,6 +108,9 @@ func (UnimplementedMsgServer) Put(context.Context, *MsgPut) (*MsgPutResponse, er func (UnimplementedMsgServer) Take(context.Context, *MsgTake) (*MsgTakeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Take not implemented") } +func (UnimplementedMsgServer) UpdateBasketFee(context.Context, *MsgUpdateBasketFee) (*MsgUpdateBasketFeeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateBasketFee not implemented") +} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. @@ -160,6 +178,24 @@ func _Msg_Take_Handler(srv interface{}, ctx context.Context, dec func(interface{ return interceptor(ctx, in, info, handler) } +func _Msg_UpdateBasketFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateBasketFee) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateBasketFee(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/regen.ecocredit.basket.v1.Msg/UpdateBasketFee", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateBasketFee(ctx, req.(*MsgUpdateBasketFee)) + } + return interceptor(ctx, in, info, handler) +} + // Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -179,6 +215,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "Take", Handler: _Msg_Take_Handler, }, + { + MethodName: "UpdateBasketFee", + Handler: _Msg_UpdateBasketFee_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "regen/ecocredit/basket/v1/tx.proto", diff --git a/proto/regen/ecocredit/basket/v1/state.proto b/proto/regen/ecocredit/basket/v1/state.proto index 9962e257c0..d563d83a3c 100644 --- a/proto/regen/ecocredit/basket/v1/state.proto +++ b/proto/regen/ecocredit/basket/v1/state.proto @@ -86,3 +86,19 @@ message BasketBalance { // to create an index which is used to remove the oldest credits first. google.protobuf.Timestamp batch_start_date = 4; } + +// BasketFee is a valid coin denom and amount that may be used as the fee +// for basket creation. +message BasketFee { + // This table is controlled via governance. + option (cosmos.orm.v1alpha1.table) = { + id : 13, + primary_key : {fields : "denom"} + }; + + // denom is the denom of the fee required to create a basket. + string denom = 1; + + // amount is the amount of the fee required to create a basket. + string amount = 2; +} \ No newline at end of file diff --git a/proto/regen/ecocredit/basket/v1/tx.proto b/proto/regen/ecocredit/basket/v1/tx.proto index 48fd286765..7f54aed672 100644 --- a/proto/regen/ecocredit/basket/v1/tx.proto +++ b/proto/regen/ecocredit/basket/v1/tx.proto @@ -20,6 +20,10 @@ service Msg { // Take takes credits from a basket starting from the oldest // credits first. rpc Take(MsgTake) returns (MsgTakeResponse); + + // UpdateClassFee is a governance method that allows for the addition and removal of fees to be used for the + // basket creation fee. + rpc UpdateBasketFee(MsgUpdateBasketFee) returns (MsgUpdateBasketFeeResponse); } // MsgCreateBasket is the Msg/CreateBasket request type. @@ -154,3 +158,20 @@ message MsgTakeResponse { // credits are the credits taken out of the basket. repeated BasketCredit credits = 1; } + +// MsgUpdateBasketFee is the Msg/UpdateBasketFee request type. +message MsgUpdateBasketFee { + + // root_address is the address of the signer. + // This MUST equal the address of the gov module for the tx to succeed. + string root_address = 1; + + // add_fees defines a list of coins to append to the list of fees that can be used in the basket creation fee. + repeated cosmos.base.v1beta1.Coin add_fees = 2; + + // remove_fee_denoms defines a list of denoms to remove from the list of basket creation fees. + repeated string remove_fee_denoms = 3; +} + +// MsgUpdateBasketFeeResponse is the Msg/UpdateBasketFee response type. +message MsgUpdateBasketFeeResponse {} \ No newline at end of file diff --git a/x/ecocredit/basket/msg_params.go b/x/ecocredit/basket/msg_params.go new file mode 100644 index 0000000000..c34d797d85 --- /dev/null +++ b/x/ecocredit/basket/msg_params.go @@ -0,0 +1,33 @@ +package basket + +import ( + "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/legacy/legacytx" +) + +var _ legacytx.LegacyMsg = &MsgUpdateBasketFee{} + +func (m MsgUpdateBasketFee) ValidateBasic() error { + //TODO implement me + panic("implement me") +} + +func (m MsgUpdateBasketFee) GetSigners() []types.AccAddress { + //TODO implement me + panic("implement me") +} + +func (m MsgUpdateBasketFee) GetSignBytes() []byte { + //TODO implement me + panic("implement me") +} + +func (m MsgUpdateBasketFee) Route() string { + //TODO implement me + panic("implement me") +} + +func (m MsgUpdateBasketFee) Type() string { + //TODO implement me + panic("implement me") +} diff --git a/x/ecocredit/basket/state.pb.go b/x/ecocredit/basket/state.pb.go index 7ab831093b..a042d9e5a4 100644 --- a/x/ecocredit/basket/state.pb.go +++ b/x/ecocredit/basket/state.pb.go @@ -273,10 +273,67 @@ func (m *BasketBalance) GetBatchStartDate() *types.Timestamp { return nil } +// BasketFee is a valid coin denom and amount that may be used as the fee +// for basket creation. +type BasketFee struct { + // denom is the denom of the fee required to create a basket. + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + // amount is the amount of the fee required to create a basket. + Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (m *BasketFee) Reset() { *m = BasketFee{} } +func (m *BasketFee) String() string { return proto.CompactTextString(m) } +func (*BasketFee) ProtoMessage() {} +func (*BasketFee) Descriptor() ([]byte, []int) { + return fileDescriptor_c416a19075224f85, []int{3} +} +func (m *BasketFee) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BasketFee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BasketFee.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 *BasketFee) XXX_Merge(src proto.Message) { + xxx_messageInfo_BasketFee.Merge(m, src) +} +func (m *BasketFee) XXX_Size() int { + return m.Size() +} +func (m *BasketFee) XXX_DiscardUnknown() { + xxx_messageInfo_BasketFee.DiscardUnknown(m) +} + +var xxx_messageInfo_BasketFee proto.InternalMessageInfo + +func (m *BasketFee) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func (m *BasketFee) GetAmount() string { + if m != nil { + return m.Amount + } + return "" +} + func init() { proto.RegisterType((*Basket)(nil), "regen.ecocredit.basket.v1.Basket") proto.RegisterType((*BasketClass)(nil), "regen.ecocredit.basket.v1.BasketClass") proto.RegisterType((*BasketBalance)(nil), "regen.ecocredit.basket.v1.BasketBalance") + proto.RegisterType((*BasketFee)(nil), "regen.ecocredit.basket.v1.BasketFee") } func init() { @@ -284,43 +341,45 @@ func init() { } var fileDescriptor_c416a19075224f85 = []byte{ - // 563 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x53, 0xc1, 0x6e, 0xd3, 0x4c, - 0x10, 0xee, 0xba, 0xfd, 0xd3, 0x74, 0xd2, 0x56, 0xfe, 0x17, 0x10, 0xdb, 0x20, 0xdc, 0x50, 0x09, - 0x11, 0xa1, 0x62, 0x93, 0x72, 0x41, 0xe1, 0x94, 0x34, 0x97, 0x4a, 0x9c, 0x4c, 0x4f, 0x5c, 0xac, - 0xb5, 0x3d, 0x24, 0x56, 0x6d, 0xaf, 0xb5, 0xde, 0x84, 0xf6, 0x25, 0x10, 0x4f, 0xc0, 0xf3, 0x70, - 0xac, 0xc4, 0x85, 0x23, 0x4a, 0x5e, 0x00, 0xf1, 0x04, 0xc8, 0xbb, 0x4e, 0xd2, 0x82, 0xe8, 0x2d, - 0xdf, 0x7c, 0xdf, 0xe7, 0x99, 0xfd, 0x66, 0x02, 0x4f, 0x25, 0x8e, 0x31, 0xf7, 0x30, 0x12, 0x91, - 0xc4, 0x38, 0x51, 0x5e, 0xc8, 0xcb, 0x0b, 0x54, 0xde, 0xac, 0xe7, 0x95, 0x8a, 0x2b, 0x74, 0x0b, - 0x29, 0x94, 0xa0, 0x07, 0x5a, 0xe6, 0xae, 0x64, 0xae, 0x91, 0xb9, 0xb3, 0x5e, 0xfb, 0x71, 0x24, - 0xca, 0x4c, 0x94, 0x9e, 0x90, 0x99, 0x37, 0xeb, 0xf1, 0xb4, 0x98, 0xf0, 0x5e, 0x05, 0x8c, 0xb3, - 0x7d, 0x38, 0x16, 0x62, 0x9c, 0xa2, 0xa7, 0x51, 0x38, 0xfd, 0xe0, 0xa9, 0x24, 0xc3, 0x52, 0xf1, - 0xac, 0xa8, 0x05, 0x77, 0x4c, 0xa0, 0xae, 0x0a, 0x2c, 0x8d, 0xec, 0x68, 0x61, 0x41, 0x63, 0xa8, - 0x19, 0xba, 0x0f, 0x56, 0x12, 0x33, 0xd2, 0x21, 0xdd, 0x2d, 0xdf, 0x4a, 0x62, 0xfa, 0x04, 0x76, - 0x8d, 0x27, 0x88, 0x31, 0x17, 0x19, 0xb3, 0x3a, 0xa4, 0xbb, 0xe3, 0xb7, 0x4c, 0x6d, 0x54, 0x95, - 0x28, 0x85, 0xad, 0x9c, 0x67, 0xc8, 0x36, 0x35, 0xa5, 0x7f, 0x53, 0x17, 0xee, 0xc5, 0x49, 0xc9, - 0xc3, 0x14, 0x03, 0x3e, 0x55, 0x22, 0x90, 0xa8, 0x12, 0x89, 0x6c, 0xab, 0x43, 0xba, 0x4d, 0xff, - 0xff, 0x9a, 0x1a, 0x4c, 0x95, 0xf0, 0x35, 0x41, 0x8f, 0x81, 0x9a, 0x09, 0x83, 0x6a, 0xae, 0x80, - 0x87, 0xa1, 0xc4, 0x19, 0xfb, 0x4f, 0x7f, 0xd1, 0x36, 0xcc, 0xf9, 0x55, 0x81, 0x03, 0x5d, 0xa7, - 0x6f, 0x61, 0x2f, 0xe6, 0x0a, 0x83, 0x48, 0x26, 0x0a, 0x65, 0xc2, 0x59, 0xa3, 0x43, 0xba, 0xad, - 0x93, 0x67, 0xee, 0x3f, 0x93, 0x74, 0x47, 0x5c, 0xe1, 0x69, 0x2d, 0xf7, 0x77, 0xe3, 0x1b, 0x88, - 0xb6, 0xa1, 0x89, 0x97, 0x85, 0xc8, 0x31, 0x57, 0x6c, 0xbb, 0x43, 0xba, 0x7b, 0xfe, 0x0a, 0x53, - 0x06, 0xdb, 0xd1, 0x54, 0x72, 0x25, 0x24, 0x6b, 0xea, 0x61, 0x96, 0xb0, 0xff, 0xf2, 0xd7, 0x97, - 0x6f, 0x9f, 0x36, 0x9f, 0x43, 0xa3, 0x0a, 0xcc, 0x26, 0x94, 0xde, 0x0e, 0xca, 0x26, 0x8c, 0x50, - 0x30, 0xc9, 0xd8, 0x16, 0x23, 0x8c, 0x1c, 0x21, 0xb4, 0x4c, 0xc8, 0xa7, 0x29, 0x2f, 0x4b, 0xfa, - 0x08, 0x76, 0x6a, 0xc3, 0x2a, 0xf0, 0xa6, 0x29, 0x9c, 0xc5, 0xf4, 0x00, 0x9a, 0x51, 0xa5, 0xaa, - 0x38, 0xab, 0x6e, 0x5c, 0xe1, 0xb3, 0xb8, 0xef, 0xe8, 0xc6, 0x0c, 0xee, 0x03, 0x5d, 0xf9, 0x8f, - 0xd7, 0xe2, 0xa3, 0x9f, 0x04, 0xf6, 0x4c, 0x9f, 0x21, 0x4f, 0x79, 0x1e, 0xe1, 0xdd, 0x9d, 0x0e, - 0xa1, 0x15, 0x72, 0x15, 0x4d, 0x6e, 0xed, 0x17, 0x74, 0xc9, 0xac, 0x97, 0xc1, 0x76, 0x68, 0x3e, - 0x54, 0x6f, 0x78, 0x09, 0xe9, 0x08, 0x6c, 0x63, 0x2d, 0x15, 0x97, 0x2a, 0xa8, 0x42, 0xd5, 0x1b, - 0x6e, 0x9d, 0xb4, 0x5d, 0x73, 0x99, 0xee, 0xf2, 0x32, 0xdd, 0xf3, 0xe5, 0x65, 0xfa, 0xfb, 0xda, - 0xf3, 0xae, 0xb2, 0x54, 0x4b, 0xe9, 0x0f, 0xf4, 0x7b, 0xde, 0xc0, 0x43, 0x78, 0xb0, 0x7e, 0xcf, - 0x8d, 0x91, 0xa8, 0x03, 0xed, 0x3f, 0x89, 0x75, 0x43, 0x9b, 0xb0, 0xcd, 0xa1, 0xff, 0x75, 0xee, - 0x90, 0xeb, 0xb9, 0x43, 0x7e, 0xcc, 0x1d, 0xf2, 0x79, 0xe1, 0x6c, 0x5c, 0x2f, 0x9c, 0x8d, 0xef, - 0x0b, 0x67, 0xe3, 0xfd, 0xeb, 0x71, 0xa2, 0x26, 0xd3, 0xd0, 0x8d, 0x44, 0xe6, 0xe9, 0xe3, 0x78, - 0x91, 0xa3, 0xfa, 0x28, 0xe4, 0x45, 0x8d, 0x52, 0x8c, 0xc7, 0x28, 0xbd, 0xcb, 0xbf, 0xfe, 0x22, - 0x61, 0x43, 0x8f, 0xfe, 0xea, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xed, 0x1f, 0x4f, 0xbd, 0xc5, - 0x03, 0x00, 0x00, + // 600 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x53, 0xcf, 0x6e, 0xd3, 0x4e, + 0x10, 0xee, 0xa6, 0x6d, 0x92, 0x4e, 0x9a, 0xca, 0xdd, 0x5f, 0x7f, 0xb0, 0x0d, 0xc2, 0x0d, 0x91, + 0x10, 0x11, 0x2a, 0x36, 0x29, 0x17, 0x14, 0x4e, 0xfd, 0x23, 0xa4, 0x4a, 0x3d, 0x99, 0x9e, 0xb8, + 0x58, 0x6b, 0x7b, 0x48, 0xad, 0xda, 0x5e, 0x6b, 0xbd, 0x0e, 0xed, 0x4b, 0x20, 0x9e, 0x80, 0xe7, + 0xe1, 0x58, 0x89, 0x0b, 0x47, 0xd4, 0xbc, 0x00, 0xe2, 0x09, 0x90, 0x77, 0x9d, 0xb4, 0x05, 0xd1, + 0x9b, 0xbf, 0x99, 0xef, 0xdb, 0x99, 0xf9, 0x66, 0x0c, 0x4f, 0x25, 0x4e, 0x30, 0x73, 0x31, 0x14, + 0xa1, 0xc4, 0x28, 0x56, 0x6e, 0xc0, 0x8b, 0x73, 0x54, 0xee, 0x74, 0xe4, 0x16, 0x8a, 0x2b, 0x74, + 0x72, 0x29, 0x94, 0xa0, 0xdb, 0x9a, 0xe6, 0x2c, 0x68, 0x8e, 0xa1, 0x39, 0xd3, 0x51, 0xef, 0x71, + 0x28, 0x8a, 0x54, 0x14, 0xae, 0x90, 0xa9, 0x3b, 0x1d, 0xf1, 0x24, 0x3f, 0xe3, 0xa3, 0x0a, 0x18, + 0x65, 0x6f, 0x67, 0x22, 0xc4, 0x24, 0x41, 0x57, 0xa3, 0xa0, 0xfc, 0xe0, 0xaa, 0x38, 0xc5, 0x42, + 0xf1, 0x34, 0xaf, 0x09, 0xf7, 0x74, 0xa0, 0x2e, 0x73, 0x2c, 0x0c, 0x6d, 0x30, 0x6b, 0x40, 0xf3, + 0x40, 0x67, 0xe8, 0x06, 0x34, 0xe2, 0x88, 0x91, 0x3e, 0x19, 0xae, 0x78, 0x8d, 0x38, 0xa2, 0x4f, + 0x60, 0xdd, 0x68, 0xfc, 0x08, 0x33, 0x91, 0xb2, 0x46, 0x9f, 0x0c, 0xd7, 0xbc, 0x8e, 0x89, 0x1d, + 0x55, 0x21, 0x4a, 0x61, 0x25, 0xe3, 0x29, 0xb2, 0x65, 0x9d, 0xd2, 0xdf, 0xd4, 0x81, 0xff, 0xa2, + 0xb8, 0xe0, 0x41, 0x82, 0x3e, 0x2f, 0x95, 0xf0, 0x25, 0xaa, 0x58, 0x22, 0x5b, 0xe9, 0x93, 0x61, + 0xdb, 0xdb, 0xac, 0x53, 0xfb, 0xa5, 0x12, 0x9e, 0x4e, 0xd0, 0x5d, 0xa0, 0xa6, 0x43, 0xbf, 0xea, + 0xcb, 0xe7, 0x41, 0x20, 0x71, 0xca, 0x56, 0xf5, 0x8b, 0x96, 0xc9, 0x9c, 0x5e, 0xe6, 0xb8, 0xaf, + 0xe3, 0xf4, 0x04, 0xba, 0x11, 0x57, 0xe8, 0x87, 0x32, 0x56, 0x28, 0x63, 0xce, 0x9a, 0x7d, 0x32, + 0xec, 0xec, 0x3d, 0x73, 0xfe, 0xe9, 0xa4, 0x73, 0xc4, 0x15, 0x1e, 0xd6, 0x74, 0x6f, 0x3d, 0xba, + 0x85, 0x68, 0x0f, 0xda, 0x78, 0x91, 0x8b, 0x0c, 0x33, 0xc5, 0x5a, 0x7d, 0x32, 0xec, 0x7a, 0x0b, + 0x4c, 0x19, 0xb4, 0xc2, 0x52, 0x72, 0x25, 0x24, 0x6b, 0xeb, 0x66, 0xe6, 0x70, 0xfc, 0xf2, 0xd7, + 0x97, 0x6f, 0x9f, 0x96, 0x9f, 0x43, 0xb3, 0x32, 0xcc, 0x22, 0x94, 0xde, 0x35, 0xca, 0x22, 0x8c, + 0x50, 0x30, 0xce, 0x58, 0x0d, 0x46, 0x18, 0x19, 0x20, 0x74, 0x8c, 0xc9, 0x87, 0x09, 0x2f, 0x0a, + 0xfa, 0x08, 0xd6, 0x6a, 0xc1, 0xc2, 0xf0, 0xb6, 0x09, 0x1c, 0x47, 0x74, 0x1b, 0xda, 0x61, 0xc5, + 0xaa, 0x72, 0x8d, 0xba, 0x70, 0x85, 0x8f, 0xa3, 0xb1, 0xad, 0x0b, 0x33, 0xd8, 0x02, 0xba, 0xd0, + 0xef, 0xde, 0x90, 0x07, 0x3f, 0x09, 0x74, 0x4d, 0x9d, 0x03, 0x9e, 0xf0, 0x2c, 0xc4, 0xfb, 0x2b, + 0xed, 0x40, 0x27, 0xe0, 0x2a, 0x3c, 0xbb, 0xb3, 0x5f, 0xd0, 0x21, 0xb3, 0x5e, 0x06, 0xad, 0xc0, + 0x3c, 0x54, 0x6f, 0x78, 0x0e, 0xe9, 0x11, 0x58, 0x46, 0x5a, 0x28, 0x2e, 0x95, 0x5f, 0x99, 0xaa, + 0x37, 0xdc, 0xd9, 0xeb, 0x39, 0xe6, 0x32, 0x9d, 0xf9, 0x65, 0x3a, 0xa7, 0xf3, 0xcb, 0xf4, 0x36, + 0xb4, 0xe6, 0x5d, 0x25, 0xa9, 0x96, 0x32, 0xde, 0xd7, 0xf3, 0xbc, 0x81, 0x87, 0xf0, 0xff, 0xcd, + 0x3c, 0xb7, 0x5a, 0xa2, 0x36, 0xf4, 0xfe, 0x4c, 0xdc, 0x14, 0xb4, 0x08, 0x5b, 0x1e, 0x9c, 0xc0, + 0x9a, 0x99, 0xf8, 0x2d, 0x22, 0xdd, 0x82, 0x55, 0x33, 0x0a, 0xd1, 0xdd, 0x1a, 0x40, 0x1f, 0x40, + 0x93, 0xa7, 0xa2, 0xcc, 0x54, 0x3d, 0x61, 0x8d, 0xc6, 0x9b, 0xba, 0x7a, 0x07, 0x5a, 0x73, 0x55, + 0xf7, 0xc0, 0xfb, 0x7a, 0x6d, 0x93, 0xab, 0x6b, 0x9b, 0xfc, 0xb8, 0xb6, 0xc9, 0xe7, 0x99, 0xbd, + 0x74, 0x35, 0xb3, 0x97, 0xbe, 0xcf, 0xec, 0xa5, 0xf7, 0xaf, 0x27, 0xb1, 0x3a, 0x2b, 0x03, 0x27, + 0x14, 0xa9, 0xab, 0x4f, 0xed, 0x45, 0x86, 0xea, 0xa3, 0x90, 0xe7, 0x35, 0x4a, 0x30, 0x9a, 0xa0, + 0x74, 0x2f, 0xfe, 0xfa, 0xe1, 0x82, 0xa6, 0x36, 0xe2, 0xd5, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xe9, 0xac, 0xb0, 0xf9, 0x13, 0x04, 0x00, 0x00, } func (m *Basket) Marshal() (dAtA []byte, err error) { @@ -495,6 +554,43 @@ func (m *BasketBalance) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *BasketFee) 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 *BasketFee) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BasketFee) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Amount) > 0 { + i -= len(m.Amount) + copy(dAtA[i:], m.Amount) + i = encodeVarintState(dAtA, i, uint64(len(m.Amount))) + i-- + dAtA[i] = 0x12 + } + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintState(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintState(dAtA []byte, offset int, v uint64) int { offset -= sovState(v) base := offset @@ -584,6 +680,23 @@ func (m *BasketBalance) Size() (n int) { return n } +func (m *BasketFee) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovState(uint64(l)) + } + l = len(m.Amount) + if l > 0 { + n += 1 + l + sovState(uint64(l)) + } + return n +} + func sovState(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1132,6 +1245,120 @@ func (m *BasketBalance) Unmarshal(dAtA []byte) error { } return nil } +func (m *BasketFee) 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 ErrIntOverflowState + } + 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: BasketFee: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BasketFee: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipState(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthState + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipState(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/ecocredit/basket/tx.pb.go b/x/ecocredit/basket/tx.pb.go index 425895d65b..711d157c04 100644 --- a/x/ecocredit/basket/tx.pb.go +++ b/x/ecocredit/basket/tx.pb.go @@ -479,6 +479,108 @@ func (m *MsgTakeResponse) GetCredits() []*BasketCredit { return nil } +// MsgUpdateBasketFee is the Msg/UpdateBasketFee request type. +type MsgUpdateBasketFee struct { + // root_address is the address of the signer. + // This MUST equal the address of the gov module for the tx to succeed. + RootAddress string `protobuf:"bytes,1,opt,name=root_address,json=rootAddress,proto3" json:"root_address,omitempty"` + // add_fees defines a list of coins to append to the list of fees that can be used in the basket creation fee. + AddFees []*types.Coin `protobuf:"bytes,2,rep,name=add_fees,json=addFees,proto3" json:"add_fees,omitempty"` + // remove_fee_denoms defines a list of denoms to remove from the list of basket creation fees. + RemoveFeeDenoms []string `protobuf:"bytes,3,rep,name=remove_fee_denoms,json=removeFeeDenoms,proto3" json:"remove_fee_denoms,omitempty"` +} + +func (m *MsgUpdateBasketFee) Reset() { *m = MsgUpdateBasketFee{} } +func (m *MsgUpdateBasketFee) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateBasketFee) ProtoMessage() {} +func (*MsgUpdateBasketFee) Descriptor() ([]byte, []int) { + return fileDescriptor_a60f962a3c61f018, []int{6} +} +func (m *MsgUpdateBasketFee) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateBasketFee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateBasketFee.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 *MsgUpdateBasketFee) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateBasketFee.Merge(m, src) +} +func (m *MsgUpdateBasketFee) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateBasketFee) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateBasketFee.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateBasketFee proto.InternalMessageInfo + +func (m *MsgUpdateBasketFee) GetRootAddress() string { + if m != nil { + return m.RootAddress + } + return "" +} + +func (m *MsgUpdateBasketFee) GetAddFees() []*types.Coin { + if m != nil { + return m.AddFees + } + return nil +} + +func (m *MsgUpdateBasketFee) GetRemoveFeeDenoms() []string { + if m != nil { + return m.RemoveFeeDenoms + } + return nil +} + +// MsgUpdateBasketFeeResponse is the Msg/UpdateBasketFee response type. +type MsgUpdateBasketFeeResponse struct { +} + +func (m *MsgUpdateBasketFeeResponse) Reset() { *m = MsgUpdateBasketFeeResponse{} } +func (m *MsgUpdateBasketFeeResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateBasketFeeResponse) ProtoMessage() {} +func (*MsgUpdateBasketFeeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_a60f962a3c61f018, []int{7} +} +func (m *MsgUpdateBasketFeeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateBasketFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateBasketFeeResponse.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 *MsgUpdateBasketFeeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateBasketFeeResponse.Merge(m, src) +} +func (m *MsgUpdateBasketFeeResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateBasketFeeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateBasketFeeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateBasketFeeResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgCreate)(nil), "regen.ecocredit.basket.v1.MsgCreate") proto.RegisterType((*MsgCreateResponse)(nil), "regen.ecocredit.basket.v1.MsgCreateResponse") @@ -486,6 +588,8 @@ func init() { proto.RegisterType((*MsgPutResponse)(nil), "regen.ecocredit.basket.v1.MsgPutResponse") proto.RegisterType((*MsgTake)(nil), "regen.ecocredit.basket.v1.MsgTake") proto.RegisterType((*MsgTakeResponse)(nil), "regen.ecocredit.basket.v1.MsgTakeResponse") + proto.RegisterType((*MsgUpdateBasketFee)(nil), "regen.ecocredit.basket.v1.MsgUpdateBasketFee") + proto.RegisterType((*MsgUpdateBasketFeeResponse)(nil), "regen.ecocredit.basket.v1.MsgUpdateBasketFeeResponse") } func init() { @@ -493,50 +597,57 @@ func init() { } var fileDescriptor_a60f962a3c61f018 = []byte{ - // 683 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xcd, 0x4e, 0xdb, 0x4a, - 0x14, 0x8e, 0x71, 0x48, 0xc8, 0x04, 0xc2, 0x65, 0x40, 0x57, 0x26, 0x8b, 0x10, 0x2c, 0xae, 0xc8, - 0xad, 0xc0, 0x6e, 0xa8, 0x54, 0xb5, 0x4b, 0x08, 0x4b, 0xa2, 0x22, 0x17, 0x75, 0x51, 0xb5, 0xb2, - 0x26, 0xf6, 0xa9, 0x6b, 0x25, 0x99, 0x89, 0x66, 0x26, 0x01, 0xf6, 0x7d, 0x00, 0x9e, 0xa3, 0x5d, - 0xf5, 0x2d, 0x58, 0xb2, 0xec, 0xaa, 0xad, 0xe0, 0x45, 0x2a, 0xcf, 0x4c, 0xdc, 0x48, 0xa8, 0xa1, - 0x62, 0xe5, 0x39, 0xdf, 0xf9, 0xce, 0xe7, 0xf3, 0x37, 0x83, 0x5c, 0x0e, 0x09, 0x50, 0x1f, 0x22, - 0x16, 0x71, 0x88, 0x53, 0xe9, 0xf7, 0x88, 0xe8, 0x83, 0xf4, 0x27, 0x6d, 0x5f, 0x5e, 0x78, 0x23, - 0xce, 0x24, 0xc3, 0x9b, 0x8a, 0xe3, 0xe5, 0x1c, 0x4f, 0x73, 0xbc, 0x49, 0xbb, 0xbe, 0x91, 0xb0, - 0x84, 0x29, 0x96, 0x9f, 0x9d, 0x74, 0x40, 0xfd, 0xbf, 0x39, 0xa2, 0x97, 0x23, 0x10, 0x86, 0xd6, - 0x88, 0x98, 0x18, 0x32, 0x91, 0x79, 0xc1, 0x9f, 0xb4, 0x7b, 0x20, 0x49, 0xdb, 0x8f, 0x58, 0x4a, - 0xb5, 0xdf, 0xfd, 0x62, 0xa3, 0x4a, 0x57, 0x24, 0x1d, 0x0e, 0x44, 0x02, 0x76, 0x50, 0x39, 0x1a, - 0x73, 0x22, 0x19, 0x77, 0xac, 0xa6, 0xd5, 0xaa, 0x04, 0x53, 0x13, 0x63, 0x54, 0xa4, 0x64, 0x08, - 0xce, 0x82, 0x82, 0xd5, 0x19, 0x37, 0x51, 0x35, 0x06, 0x11, 0xf1, 0x74, 0x24, 0x53, 0x46, 0x1d, - 0x5b, 0xb9, 0x66, 0x21, 0x5c, 0x47, 0x4b, 0x70, 0x31, 0x62, 0x14, 0xa8, 0x74, 0x8a, 0x4d, 0xab, - 0xb5, 0x12, 0xe4, 0x36, 0xf6, 0xd0, 0x7a, 0x9c, 0x0a, 0xd2, 0x1b, 0x40, 0x48, 0xc6, 0x92, 0x85, - 0x1c, 0x64, 0xca, 0xc1, 0x59, 0x6c, 0x5a, 0xad, 0xa5, 0x60, 0xcd, 0xb8, 0x0e, 0xc7, 0x92, 0x05, - 0xca, 0x81, 0xf7, 0x10, 0xd6, 0x95, 0x86, 0x59, 0x7d, 0x21, 0xe9, 0xf5, 0x38, 0x4c, 0x9c, 0x92, - 0xfa, 0xe9, 0x3f, 0xda, 0x73, 0x76, 0x39, 0x82, 0x43, 0x85, 0xe3, 0x5d, 0xb4, 0x4a, 0x06, 0x03, - 0x76, 0x0e, 0x71, 0x18, 0x0d, 0x88, 0x10, 0x20, 0x9c, 0x72, 0xd3, 0x6e, 0x55, 0x82, 0x9a, 0x81, - 0x3b, 0x1a, 0xc5, 0x27, 0x68, 0x25, 0x26, 0x12, 0xc2, 0x88, 0xa7, 0x12, 0x78, 0x4a, 0x9c, 0xa5, - 0xa6, 0xd5, 0xaa, 0x1e, 0xec, 0x7a, 0x7f, 0x1c, 0x88, 0x77, 0x4c, 0x24, 0x74, 0x0c, 0x3d, 0x58, - 0x8e, 0x67, 0x2c, 0xfc, 0x1e, 0xd9, 0x1f, 0x00, 0x9c, 0x4a, 0xd3, 0x6e, 0x55, 0x0f, 0x36, 0x3d, - 0xdd, 0xfc, 0x2c, 0x14, 0x3c, 0xd3, 0x7c, 0xaf, 0xc3, 0x52, 0x7a, 0xf4, 0xf4, 0xfa, 0xfb, 0x56, - 0xe1, 0xf3, 0x8f, 0xad, 0x56, 0x92, 0xca, 0x8f, 0xe3, 0x9e, 0x17, 0xb1, 0xa1, 0x6f, 0x26, 0xa5, - 0x3f, 0xfb, 0x22, 0xee, 0x9b, 0x41, 0x66, 0x01, 0x22, 0xc8, 0x74, 0xdd, 0xe7, 0x68, 0x2d, 0x1f, - 0x56, 0x00, 0x62, 0xc4, 0xa8, 0x00, 0xbc, 0x8d, 0x96, 0x75, 0x6e, 0x61, 0x0c, 0x94, 0x0d, 0xcd, - 0xe4, 0xaa, 0x1a, 0x3b, 0xce, 0x20, 0xf7, 0x93, 0x85, 0x4a, 0x5d, 0x91, 0x9c, 0x8e, 0x25, 0xde, - 0x40, 0x8b, 0xec, 0x9c, 0xc2, 0x74, 0xc0, 0xda, 0xb8, 0xa7, 0xb1, 0x70, 0x4f, 0x03, 0x1f, 0xa2, - 0xb2, 0xee, 0x84, 0x70, 0x6c, 0x55, 0xde, 0xbc, 0x16, 0x1d, 0xa9, 0x53, 0x47, 0xc1, 0xc1, 0x34, - 0xce, 0x7d, 0x89, 0x6a, 0x3a, 0x8b, 0x3c, 0xf7, 0x6c, 0x4c, 0x43, 0x36, 0xa6, 0x32, 0xe4, 0x10, - 0x41, 0x3a, 0x81, 0xd8, 0xe4, 0x55, 0xd3, 0x70, 0x60, 0x50, 0xf7, 0xab, 0x85, 0xca, 0x5d, 0x91, - 0x9c, 0x91, 0x3e, 0x3c, 0xbe, 0x84, 0x7f, 0x51, 0x49, 0xcb, 0x9a, 0x5d, 0x35, 0x16, 0xf6, 0xd1, - 0xba, 0xde, 0xbe, 0x21, 0x50, 0x19, 0x0e, 0x58, 0x44, 0xd4, 0x42, 0x17, 0x15, 0x09, 0xff, 0x76, - 0x9d, 0x18, 0x0f, 0xde, 0x41, 0x35, 0x8d, 0x86, 0x8c, 0x86, 0x92, 0xf4, 0xa7, 0x6b, 0xbb, 0xac, - 0xd1, 0x57, 0x34, 0xcb, 0xd3, 0x3d, 0x43, 0xab, 0x26, 0xe5, 0xbc, 0xde, 0x99, 0x26, 0x5a, 0x8f, - 0x6b, 0xe2, 0xc1, 0xd5, 0x02, 0xb2, 0xbb, 0x22, 0xc1, 0xef, 0x50, 0xc9, 0xdc, 0xda, 0x9d, 0x39, - 0x1a, 0xf9, 0xba, 0xd4, 0xf7, 0xfe, 0x86, 0x95, 0x27, 0xfa, 0x1a, 0xd9, 0xd9, 0xb6, 0x6c, 0xcf, - 0x0f, 0x3a, 0x1d, 0xcb, 0xfa, 0xff, 0x0f, 0x52, 0x72, 0xd1, 0x37, 0xa8, 0xa8, 0x06, 0xe8, 0xce, - 0x0f, 0xc9, 0x38, 0xf5, 0x27, 0x0f, 0x73, 0xa6, 0xba, 0x47, 0xc1, 0xf5, 0x6d, 0xc3, 0xba, 0xb9, - 0x6d, 0x58, 0x3f, 0x6f, 0x1b, 0xd6, 0xd5, 0x5d, 0xa3, 0x70, 0x73, 0xd7, 0x28, 0x7c, 0xbb, 0x6b, - 0x14, 0xde, 0xbe, 0x98, 0xb9, 0x5f, 0x4a, 0x6f, 0x9f, 0x82, 0x3c, 0x67, 0xbc, 0x6f, 0xac, 0x01, - 0xc4, 0x09, 0x70, 0xff, 0xe2, 0xde, 0x3b, 0xda, 0x2b, 0xa9, 0xf7, 0xf1, 0xd9, 0xaf, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x2d, 0x07, 0xf3, 0xba, 0xbd, 0x05, 0x00, 0x00, + // 786 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x4f, 0x6f, 0xe3, 0x44, + 0x14, 0x8f, 0xeb, 0x6c, 0xfe, 0x4c, 0xba, 0x09, 0x9d, 0x5d, 0x21, 0xaf, 0x85, 0xb2, 0x59, 0x6b, + 0xd1, 0x86, 0x55, 0x6b, 0x93, 0xf2, 0x47, 0x70, 0x4c, 0x53, 0xf5, 0xd4, 0x88, 0xca, 0x14, 0x0e, + 0x08, 0x64, 0x4d, 0x3c, 0xaf, 0xc6, 0x4a, 0xe2, 0x89, 0x66, 0x26, 0x49, 0x7b, 0xe7, 0xc2, 0x8d, + 0x2b, 0x5f, 0x01, 0x4e, 0x7c, 0x8b, 0x1e, 0x7b, 0xe4, 0x04, 0xa8, 0xfd, 0x22, 0xc8, 0x33, 0x13, + 0x13, 0x35, 0x22, 0x85, 0x9e, 0x3c, 0xef, 0xf7, 0x7e, 0xef, 0xf9, 0xfd, 0xf9, 0x69, 0x06, 0x79, + 0x1c, 0x12, 0xc8, 0x02, 0x88, 0x59, 0xcc, 0x81, 0xa6, 0x32, 0x18, 0x11, 0x31, 0x06, 0x19, 0x2c, + 0x7a, 0x81, 0xbc, 0xf4, 0x67, 0x9c, 0x49, 0x86, 0x5f, 0x28, 0x8e, 0x5f, 0x70, 0x7c, 0xcd, 0xf1, + 0x17, 0x3d, 0xf7, 0x79, 0xc2, 0x12, 0xa6, 0x58, 0x41, 0x7e, 0xd2, 0x01, 0xee, 0xfb, 0x5b, 0x92, + 0x5e, 0xcd, 0x40, 0x18, 0x5a, 0x3b, 0x66, 0x62, 0xca, 0x44, 0xee, 0x85, 0x60, 0xd1, 0x1b, 0x81, + 0x24, 0xbd, 0x20, 0x66, 0x69, 0xa6, 0xfd, 0xde, 0xaf, 0x36, 0xaa, 0x0f, 0x45, 0x32, 0xe0, 0x40, + 0x24, 0x60, 0x07, 0x55, 0xe3, 0x39, 0x27, 0x92, 0x71, 0xc7, 0xea, 0x58, 0xdd, 0x7a, 0xb8, 0x32, + 0x31, 0x46, 0xe5, 0x8c, 0x4c, 0xc1, 0xd9, 0x51, 0xb0, 0x3a, 0xe3, 0x0e, 0x6a, 0x50, 0x10, 0x31, + 0x4f, 0x67, 0x32, 0x65, 0x99, 0x63, 0x2b, 0xd7, 0x3a, 0x84, 0x5d, 0x54, 0x83, 0xcb, 0x19, 0xcb, + 0x20, 0x93, 0x4e, 0xb9, 0x63, 0x75, 0x9f, 0x86, 0x85, 0x8d, 0x7d, 0xf4, 0x8c, 0xa6, 0x82, 0x8c, + 0x26, 0x10, 0x91, 0xb9, 0x64, 0x11, 0x07, 0x99, 0x72, 0x70, 0x9e, 0x74, 0xac, 0x6e, 0x2d, 0xdc, + 0x33, 0xae, 0xfe, 0x5c, 0xb2, 0x50, 0x39, 0xf0, 0x3e, 0xc2, 0xba, 0xd3, 0x28, 0xef, 0x2f, 0x22, + 0xa3, 0x11, 0x87, 0x85, 0x53, 0x51, 0x3f, 0x7d, 0x47, 0x7b, 0xce, 0xaf, 0x66, 0xd0, 0x57, 0x38, + 0x7e, 0x83, 0x5a, 0x64, 0x32, 0x61, 0x4b, 0xa0, 0x51, 0x3c, 0x21, 0x42, 0x80, 0x70, 0xaa, 0x1d, + 0xbb, 0x5b, 0x0f, 0x9b, 0x06, 0x1e, 0x68, 0x14, 0x9f, 0xa2, 0xa7, 0x94, 0x48, 0x88, 0x62, 0x9e, + 0x4a, 0xe0, 0x29, 0x71, 0x6a, 0x1d, 0xab, 0xdb, 0x38, 0x7c, 0xe3, 0xff, 0xeb, 0x42, 0xfc, 0x63, + 0x22, 0x61, 0x60, 0xe8, 0xe1, 0x2e, 0x5d, 0xb3, 0xf0, 0x77, 0xc8, 0xbe, 0x00, 0x70, 0xea, 0x1d, + 0xbb, 0xdb, 0x38, 0x7c, 0xe1, 0xeb, 0xe1, 0xe7, 0xa1, 0xe0, 0x9b, 0xe1, 0xfb, 0x03, 0x96, 0x66, + 0x47, 0x1f, 0x5e, 0xff, 0xf1, 0xb2, 0xf4, 0xcb, 0x9f, 0x2f, 0xbb, 0x49, 0x2a, 0xbf, 0x9f, 0x8f, + 0xfc, 0x98, 0x4d, 0x03, 0xb3, 0x29, 0xfd, 0x39, 0x10, 0x74, 0x6c, 0x16, 0x99, 0x07, 0x88, 0x30, + 0xcf, 0xeb, 0x7d, 0x8a, 0xf6, 0x8a, 0x65, 0x85, 0x20, 0x66, 0x2c, 0x13, 0x80, 0x5f, 0xa1, 0x5d, + 0x5d, 0x5b, 0x44, 0x21, 0x63, 0x53, 0xb3, 0xb9, 0x86, 0xc6, 0x8e, 0x73, 0xc8, 0xfb, 0xc1, 0x42, + 0x95, 0xa1, 0x48, 0xce, 0xe6, 0x12, 0x3f, 0x47, 0x4f, 0xd8, 0x32, 0x83, 0xd5, 0x82, 0xb5, 0xb1, + 0x91, 0x63, 0x67, 0x23, 0x07, 0xee, 0xa3, 0xaa, 0x9e, 0x84, 0x70, 0x6c, 0xd5, 0xde, 0xb6, 0x11, + 0x1d, 0xa9, 0xd3, 0x40, 0xc1, 0xe1, 0x2a, 0xce, 0xfb, 0x1c, 0x35, 0x75, 0x15, 0x45, 0xed, 0xf9, + 0x9a, 0xa6, 0x6c, 0x9e, 0xc9, 0x88, 0x43, 0x0c, 0xe9, 0x02, 0xa8, 0xa9, 0xab, 0xa9, 0xe1, 0xd0, + 0xa0, 0xde, 0x6f, 0x16, 0xaa, 0x0e, 0x45, 0x72, 0x4e, 0xc6, 0xf0, 0xf8, 0x16, 0xde, 0x45, 0x15, + 0x9d, 0xd6, 0x68, 0xd5, 0x58, 0x38, 0x40, 0xcf, 0xb4, 0xfa, 0xa6, 0x90, 0xc9, 0x68, 0xc2, 0x62, + 0xa2, 0x04, 0x5d, 0x56, 0x24, 0xfc, 0x8f, 0xeb, 0xd4, 0x78, 0xf0, 0x6b, 0xd4, 0xd4, 0x68, 0xc4, + 0xb2, 0x48, 0x92, 0xf1, 0x4a, 0xb6, 0xbb, 0x1a, 0xfd, 0x22, 0xcb, 0xeb, 0xf4, 0xce, 0x51, 0xcb, + 0x94, 0x5c, 0xf4, 0xbb, 0x36, 0x44, 0xeb, 0x91, 0x43, 0xfc, 0xd9, 0x42, 0x78, 0x28, 0x92, 0xaf, + 0x66, 0xb9, 0xf0, 0x34, 0xe5, 0x04, 0x94, 0x0a, 0x38, 0x63, 0x32, 0x22, 0x94, 0x72, 0x10, 0x62, + 0xa5, 0x82, 0x1c, 0xeb, 0x6b, 0x08, 0x7f, 0x8c, 0x6a, 0x84, 0xd2, 0xe8, 0x02, 0x40, 0x38, 0x3b, + 0x0f, 0x28, 0x34, 0xac, 0x12, 0x4a, 0x4f, 0x00, 0x04, 0x7e, 0x8b, 0xf6, 0x38, 0x4c, 0xd9, 0x02, + 0xf2, 0x40, 0x3d, 0x5b, 0xad, 0x80, 0x7a, 0xd8, 0xd2, 0x8e, 0x13, 0x00, 0x35, 0x5f, 0xe1, 0xbd, + 0x87, 0xdc, 0xcd, 0xd2, 0x56, 0xcd, 0x1f, 0xfe, 0x68, 0x23, 0x7b, 0x28, 0x12, 0xfc, 0x2d, 0xaa, + 0x98, 0xfb, 0xe6, 0xf5, 0x96, 0xee, 0x0b, 0xa1, 0xbb, 0xfb, 0xff, 0x85, 0x55, 0x8c, 0xf8, 0x4b, + 0x64, 0xe7, 0x3a, 0x7f, 0xb5, 0x3d, 0xe8, 0x6c, 0x2e, 0xdd, 0x0f, 0x1e, 0xa4, 0x14, 0x49, 0xbf, + 0x46, 0x65, 0x25, 0x3d, 0x6f, 0x7b, 0x48, 0xce, 0x71, 0xdf, 0x3e, 0xcc, 0x29, 0xf2, 0x2e, 0x51, + 0xeb, 0xfe, 0x22, 0x0f, 0xb6, 0x87, 0xdf, 0xa3, 0xbb, 0x9f, 0xfc, 0x2f, 0xfa, 0xea, 0xc7, 0x47, + 0xe1, 0xf5, 0x6d, 0xdb, 0xba, 0xb9, 0x6d, 0x5b, 0x7f, 0xdd, 0xb6, 0xad, 0x9f, 0xee, 0xda, 0xa5, + 0x9b, 0xbb, 0x76, 0xe9, 0xf7, 0xbb, 0x76, 0xe9, 0x9b, 0xcf, 0xd6, 0xae, 0x24, 0x95, 0xfa, 0x20, + 0x03, 0xb9, 0x64, 0x7c, 0x6c, 0xac, 0x09, 0xd0, 0x04, 0x78, 0x70, 0xb9, 0xf1, 0xf4, 0x8c, 0x2a, + 0xea, 0x49, 0xf9, 0xe8, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x24, 0x88, 0x8f, 0xa8, 0xf0, 0x06, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -558,6 +669,9 @@ type MsgClient interface { // Take takes credits from a basket starting from the oldest // credits first. Take(ctx context.Context, in *MsgTake, opts ...grpc.CallOption) (*MsgTakeResponse, error) + // UpdateClassFee is a governance method that allows for the addition and removal of fees to be used for the + // basket creation fee. + UpdateBasketFee(ctx context.Context, in *MsgUpdateBasketFee, opts ...grpc.CallOption) (*MsgUpdateBasketFeeResponse, error) } type msgClient struct { @@ -595,6 +709,15 @@ func (c *msgClient) Take(ctx context.Context, in *MsgTake, opts ...grpc.CallOpti return out, nil } +func (c *msgClient) UpdateBasketFee(ctx context.Context, in *MsgUpdateBasketFee, opts ...grpc.CallOption) (*MsgUpdateBasketFeeResponse, error) { + out := new(MsgUpdateBasketFeeResponse) + err := c.cc.Invoke(ctx, "/regen.ecocredit.basket.v1.Msg/UpdateBasketFee", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // Create creates a bank denom which wraps credits. @@ -604,6 +727,9 @@ type MsgServer interface { // Take takes credits from a basket starting from the oldest // credits first. Take(context.Context, *MsgTake) (*MsgTakeResponse, error) + // UpdateClassFee is a governance method that allows for the addition and removal of fees to be used for the + // basket creation fee. + UpdateBasketFee(context.Context, *MsgUpdateBasketFee) (*MsgUpdateBasketFeeResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -619,6 +745,9 @@ func (*UnimplementedMsgServer) Put(ctx context.Context, req *MsgPut) (*MsgPutRes func (*UnimplementedMsgServer) Take(ctx context.Context, req *MsgTake) (*MsgTakeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Take not implemented") } +func (*UnimplementedMsgServer) UpdateBasketFee(ctx context.Context, req *MsgUpdateBasketFee) (*MsgUpdateBasketFeeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateBasketFee not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -678,6 +807,24 @@ func _Msg_Take_Handler(srv interface{}, ctx context.Context, dec func(interface{ return interceptor(ctx, in, info, handler) } +func _Msg_UpdateBasketFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateBasketFee) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateBasketFee(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/regen.ecocredit.basket.v1.Msg/UpdateBasketFee", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateBasketFee(ctx, req.(*MsgUpdateBasketFee)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "regen.ecocredit.basket.v1.Msg", HandlerType: (*MsgServer)(nil), @@ -694,6 +841,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "Take", Handler: _Msg_Take_Handler, }, + { + MethodName: "UpdateBasketFee", + Handler: _Msg_UpdateBasketFee_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "regen/ecocredit/basket/v1/tx.proto", @@ -1009,6 +1160,82 @@ func (m *MsgTakeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *MsgUpdateBasketFee) 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 *MsgUpdateBasketFee) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateBasketFee) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RemoveFeeDenoms) > 0 { + for iNdEx := len(m.RemoveFeeDenoms) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.RemoveFeeDenoms[iNdEx]) + copy(dAtA[i:], m.RemoveFeeDenoms[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.RemoveFeeDenoms[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.AddFees) > 0 { + for iNdEx := len(m.AddFees) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AddFees[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.RootAddress) > 0 { + i -= len(m.RootAddress) + copy(dAtA[i:], m.RootAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.RootAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateBasketFeeResponse) 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 *MsgUpdateBasketFeeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateBasketFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -1159,6 +1386,40 @@ func (m *MsgTakeResponse) Size() (n int) { return n } +func (m *MsgUpdateBasketFee) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.RootAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.AddFees) > 0 { + for _, e := range m.AddFees { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + if len(m.RemoveFeeDenoms) > 0 { + for _, s := range m.RemoveFeeDenoms { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgUpdateBasketFeeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -2078,6 +2339,204 @@ func (m *MsgTakeResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgUpdateBasketFee) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateBasketFee: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateBasketFee: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RootAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RootAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AddFees", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AddFees = append(m.AddFees, &types.Coin{}) + if err := m.AddFees[len(m.AddFees)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RemoveFeeDenoms", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RemoveFeeDenoms = append(m.RemoveFeeDenoms, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateBasketFeeResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateBasketFeeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateBasketFeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/ecocredit/core/query.pb.gw.go b/x/ecocredit/core/query.pb.gw.go index 3d3d6685c3..a6ec0138b2 100644 --- a/x/ecocredit/core/query.pb.gw.go +++ b/x/ecocredit/core/query.pb.gw.go @@ -973,6 +973,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Balances_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -980,6 +982,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Balances_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/x/ecocredit/server/basket/params.go b/x/ecocredit/server/basket/params.go new file mode 100644 index 0000000000..83993eef92 --- /dev/null +++ b/x/ecocredit/server/basket/params.go @@ -0,0 +1,12 @@ +package basket + +import ( + "context" + + baskettypes "github.com/regen-network/regen-ledger/x/ecocredit/basket" +) + +func (k Keeper) UpdateBasketFee(ctx context.Context, fee *baskettypes.MsgUpdateBasketFee) (*baskettypes.MsgUpdateBasketFeeResponse, error) { + //TODO implement me + panic("implement me") +}