feat: constitution (#15125)
This commit is contained in:
parent
7f99ad5fe7
commit
eb98685508
@ -39,6 +39,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
|
||||
|
||||
### Features
|
||||
|
||||
* (x/gov) [#14373](https://github.com/cosmos/cosmos-sdk/pull/14057) Add new proto field `constitution` of type `string` to gov module genesis state, which allows chain builders to lay a strong foundation by specifying purpose.
|
||||
* (x/genutil) [#15301](https://github.com/cosmos/cosmos-sdk/pull/15031) Add application genesis. The genesis is now entirely managed by the application and passed to CometBFT at note instantiation. Functions that were taking a `cmttypes.GenesisDoc{}` now takes a `genutiltypes.AppGenesis{}`.
|
||||
* (cli) [#14659](https://github.com/cosmos/cosmos-sdk/pull/14659) Added ability to query blocks by events with queries directly passed to Tendermint, which will allow for full query operator support, e.g. `>`.
|
||||
* [#14897](https://github.com/cosmos/cosmos-sdk/pull/14897) Migrate the Cosmos SDK to CometBFT.
|
||||
|
||||
@ -175,6 +175,7 @@ var (
|
||||
fd_GenesisState_voting_params protoreflect.FieldDescriptor
|
||||
fd_GenesisState_tally_params protoreflect.FieldDescriptor
|
||||
fd_GenesisState_params protoreflect.FieldDescriptor
|
||||
fd_GenesisState_constitution protoreflect.FieldDescriptor
|
||||
)
|
||||
|
||||
func init() {
|
||||
@ -188,6 +189,7 @@ func init() {
|
||||
fd_GenesisState_voting_params = md_GenesisState.Fields().ByName("voting_params")
|
||||
fd_GenesisState_tally_params = md_GenesisState.Fields().ByName("tally_params")
|
||||
fd_GenesisState_params = md_GenesisState.Fields().ByName("params")
|
||||
fd_GenesisState_constitution = md_GenesisState.Fields().ByName("constitution")
|
||||
}
|
||||
|
||||
var _ protoreflect.Message = (*fastReflection_GenesisState)(nil)
|
||||
@ -303,6 +305,12 @@ func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor,
|
||||
return
|
||||
}
|
||||
}
|
||||
if x.Constitution != "" {
|
||||
value := protoreflect.ValueOfString(x.Constitution)
|
||||
if !f(fd_GenesisState_constitution, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Has reports whether a field is populated.
|
||||
@ -334,6 +342,8 @@ func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool
|
||||
return x.TallyParams != nil
|
||||
case "cosmos.gov.v1.GenesisState.params":
|
||||
return x.Params != nil
|
||||
case "cosmos.gov.v1.GenesisState.constitution":
|
||||
return x.Constitution != ""
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.GenesisState"))
|
||||
@ -366,6 +376,8 @@ func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) {
|
||||
x.TallyParams = nil
|
||||
case "cosmos.gov.v1.GenesisState.params":
|
||||
x.Params = nil
|
||||
case "cosmos.gov.v1.GenesisState.constitution":
|
||||
x.Constitution = ""
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.GenesisState"))
|
||||
@ -415,6 +427,9 @@ func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescripto
|
||||
case "cosmos.gov.v1.GenesisState.params":
|
||||
value := x.Params
|
||||
return protoreflect.ValueOfMessage(value.ProtoReflect())
|
||||
case "cosmos.gov.v1.GenesisState.constitution":
|
||||
value := x.Constitution
|
||||
return protoreflect.ValueOfString(value)
|
||||
default:
|
||||
if descriptor.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.GenesisState"))
|
||||
@ -457,6 +472,8 @@ func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value
|
||||
x.TallyParams = value.Message().Interface().(*TallyParams)
|
||||
case "cosmos.gov.v1.GenesisState.params":
|
||||
x.Params = value.Message().Interface().(*Params)
|
||||
case "cosmos.gov.v1.GenesisState.constitution":
|
||||
x.Constitution = value.Interface().(string)
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.GenesisState"))
|
||||
@ -517,6 +534,8 @@ func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) p
|
||||
return protoreflect.ValueOfMessage(x.Params.ProtoReflect())
|
||||
case "cosmos.gov.v1.GenesisState.starting_proposal_id":
|
||||
panic(fmt.Errorf("field starting_proposal_id of message cosmos.gov.v1.GenesisState is not mutable"))
|
||||
case "cosmos.gov.v1.GenesisState.constitution":
|
||||
panic(fmt.Errorf("field constitution of message cosmos.gov.v1.GenesisState is not mutable"))
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.GenesisState"))
|
||||
@ -553,6 +572,8 @@ func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor)
|
||||
case "cosmos.gov.v1.GenesisState.params":
|
||||
m := new(Params)
|
||||
return protoreflect.ValueOfMessage(m.ProtoReflect())
|
||||
case "cosmos.gov.v1.GenesisState.constitution":
|
||||
return protoreflect.ValueOfString("")
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.GenesisState"))
|
||||
@ -659,6 +680,10 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods {
|
||||
l = options.Size(x.Params)
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
l = len(x.Constitution)
|
||||
if l > 0 {
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
if x.unknownFields != nil {
|
||||
n += len(x.unknownFields)
|
||||
}
|
||||
@ -688,6 +713,13 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods {
|
||||
i -= len(x.unknownFields)
|
||||
copy(dAtA[i:], x.unknownFields)
|
||||
}
|
||||
if len(x.Constitution) > 0 {
|
||||
i -= len(x.Constitution)
|
||||
copy(dAtA[i:], x.Constitution)
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Constitution)))
|
||||
i--
|
||||
dAtA[i] = 0x4a
|
||||
}
|
||||
if x.Params != nil {
|
||||
encoded, err := options.Marshal(x.Params)
|
||||
if err != nil {
|
||||
@ -1111,6 +1143,38 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 9:
|
||||
if wireType != 2 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Constitution", 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.Constitution = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := runtime.Skip(dAtA[iNdEx:])
|
||||
@ -1194,6 +1258,13 @@ type GenesisState struct {
|
||||
//
|
||||
// Since: cosmos-sdk 0.47
|
||||
Params *Params `protobuf:"bytes,8,opt,name=params,proto3" json:"params,omitempty"`
|
||||
// The constitution allows builders to lay a foundation and define purpose.
|
||||
// This is an immutable string set in genesis.
|
||||
// There are no amendments, to go outside of scope, just fork.
|
||||
// constitution is an immutable string in genesis for a chain builder to lay out their vision, ideas and ideals.
|
||||
//
|
||||
// Since: cosmos-sdk 0.48
|
||||
Constitution string `protobuf:"bytes,9,opt,name=constitution,proto3" json:"constitution,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GenesisState) Reset() {
|
||||
@ -1275,6 +1346,13 @@ func (x *GenesisState) GetParams() *Params {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *GenesisState) GetConstitution() string {
|
||||
if x != nil {
|
||||
return x.Constitution
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_cosmos_gov_v1_genesis_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_cosmos_gov_v1_genesis_proto_rawDesc = []byte{
|
||||
@ -1282,7 +1360,7 @@ var file_cosmos_gov_v1_genesis_proto_rawDesc = []byte{
|
||||
0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x63,
|
||||
0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x63, 0x6f,
|
||||
0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x6f, 0x76, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd7, 0x03, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfb, 0x03, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69,
|
||||
0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69,
|
||||
0x6e, 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72,
|
||||
@ -1311,18 +1389,20 @@ var file_cosmos_gov_v1_genesis_proto_rawDesc = []byte{
|
||||
0x02, 0x18, 0x01, 0x52, 0x0b, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73,
|
||||
0x12, 0x2d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x15, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42,
|
||||
0x9d, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67,
|
||||
0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b,
|
||||
0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67,
|
||||
0x6f, 0x76, 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47,
|
||||
0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56,
|
||||
0x31, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56,
|
||||
0x31, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56,
|
||||
0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f,
|
||||
0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12,
|
||||
0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18,
|
||||
0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x42, 0x9d, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d,
|
||||
0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73,
|
||||
0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f,
|
||||
0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d,
|
||||
0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0xa2,
|
||||
0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47,
|
||||
0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47,
|
||||
0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47,
|
||||
0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
|
||||
0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a,
|
||||
0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -22,6 +22,8 @@ const _ = grpc.SupportPackageIsVersion7
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type QueryClient interface {
|
||||
// Constitution queries the chain's constitution.
|
||||
Constitution(ctx context.Context, in *QueryConstitutionRequest, opts ...grpc.CallOption) (*QueryConstitutionResponse, error)
|
||||
// Proposal queries proposal details based on ProposalID.
|
||||
Proposal(ctx context.Context, in *QueryProposalRequest, opts ...grpc.CallOption) (*QueryProposalResponse, error)
|
||||
// Proposals queries all proposals based on given status.
|
||||
@ -48,6 +50,15 @@ func NewQueryClient(cc grpc.ClientConnInterface) QueryClient {
|
||||
return &queryClient{cc}
|
||||
}
|
||||
|
||||
func (c *queryClient) Constitution(ctx context.Context, in *QueryConstitutionRequest, opts ...grpc.CallOption) (*QueryConstitutionResponse, error) {
|
||||
out := new(QueryConstitutionResponse)
|
||||
err := c.cc.Invoke(ctx, "/cosmos.gov.v1.Query/Constitution", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) Proposal(ctx context.Context, in *QueryProposalRequest, opts ...grpc.CallOption) (*QueryProposalResponse, error) {
|
||||
out := new(QueryProposalResponse)
|
||||
err := c.cc.Invoke(ctx, "/cosmos.gov.v1.Query/Proposal", in, out, opts...)
|
||||
@ -124,6 +135,8 @@ func (c *queryClient) TallyResult(ctx context.Context, in *QueryTallyResultReque
|
||||
// All implementations must embed UnimplementedQueryServer
|
||||
// for forward compatibility
|
||||
type QueryServer interface {
|
||||
// Constitution queries the chain's constitution.
|
||||
Constitution(context.Context, *QueryConstitutionRequest) (*QueryConstitutionResponse, error)
|
||||
// Proposal queries proposal details based on ProposalID.
|
||||
Proposal(context.Context, *QueryProposalRequest) (*QueryProposalResponse, error)
|
||||
// Proposals queries all proposals based on given status.
|
||||
@ -147,6 +160,9 @@ type QueryServer interface {
|
||||
type UnimplementedQueryServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedQueryServer) Constitution(context.Context, *QueryConstitutionRequest) (*QueryConstitutionResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Constitution not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) Proposal(context.Context, *QueryProposalRequest) (*QueryProposalResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Proposal not implemented")
|
||||
}
|
||||
@ -184,6 +200,24 @@ func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) {
|
||||
s.RegisterService(&Query_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Query_Constitution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryConstitutionRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).Constitution(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/cosmos.gov.v1.Query/Constitution",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).Constitution(ctx, req.(*QueryConstitutionRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_Proposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryProposalRequest)
|
||||
if err := dec(in); err != nil {
|
||||
@ -335,6 +369,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "cosmos.gov.v1.Query",
|
||||
HandlerType: (*QueryServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Constitution",
|
||||
Handler: _Query_Constitution_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Proposal",
|
||||
Handler: _Query_Proposal_Handler,
|
||||
|
||||
@ -30,4 +30,11 @@ message GenesisState {
|
||||
//
|
||||
// Since: cosmos-sdk 0.47
|
||||
Params params = 8;
|
||||
// The constitution allows builders to lay a foundation and define purpose.
|
||||
// This is an immutable string set in genesis.
|
||||
// There are no amendments, to go outside of scope, just fork.
|
||||
// constitution is an immutable string in genesis for a chain builder to lay out their vision, ideas and ideals.
|
||||
//
|
||||
// Since: cosmos-sdk 0.48
|
||||
string constitution = 9;
|
||||
}
|
||||
|
||||
@ -12,6 +12,11 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types/v1";
|
||||
|
||||
// Query defines the gRPC querier service for gov module
|
||||
service Query {
|
||||
// Constitution queries the chain's constitution.
|
||||
rpc Constitution(QueryConstitutionRequest) returns (QueryConstitutionResponse) {
|
||||
option (google.api.http).get = "/cosmos/gov/v1/constitution";
|
||||
}
|
||||
|
||||
// Proposal queries proposal details based on ProposalID.
|
||||
rpc Proposal(QueryProposalRequest) returns (QueryProposalResponse) {
|
||||
option (google.api.http).get = "/cosmos/gov/v1/proposals/{proposal_id}";
|
||||
@ -53,6 +58,14 @@ service Query {
|
||||
}
|
||||
}
|
||||
|
||||
// QueryConstitutionRequest is the request type for the Query/Constitution RPC method
|
||||
message QueryConstitutionRequest {}
|
||||
|
||||
// QueryConstitutionResponse is the response type for the Query/Constitution RPC method
|
||||
message QueryConstitutionResponse {
|
||||
string constitution = 1;
|
||||
}
|
||||
|
||||
// QueryProposalRequest is the request type for the Query/Proposal RPC method.
|
||||
message QueryProposalRequest {
|
||||
// proposal_id defines the unique id of the proposal.
|
||||
|
||||
@ -262,6 +262,39 @@ Validators and full nodes can use an automation tool, such as [Cosmovisor](https
|
||||
|
||||
## State
|
||||
|
||||
### Constitution
|
||||
|
||||
`Constitution` is found in the genesis state. It is a string field intended to be used to descibe the purpose of a particular blockchain, and its expected norms. A few examples of how the constitution field can be used:
|
||||
|
||||
* define the purpose of the chain, laying a foundation for its future development
|
||||
* set expectations for delegators
|
||||
* set expectations for validators
|
||||
* define the chain's relationship to "meatspace" entities, like a foundation or corporation
|
||||
|
||||
Since this is more of a social feature than a technical feature, we'll now get into some items that may have been useful to have in a genesis constitution:
|
||||
|
||||
* What limitations on governance exist, if any?
|
||||
* is it okay for the community to slash the wallet of a whale that they no longer feel that they want around? (viz: Juno Proposal 4 and 16)
|
||||
* can governance "socially slash" a validator who is using unapproved MEV? (viz: commonwealth.im/osmosis)
|
||||
* In the event of an economic emergency, what should validators do?
|
||||
* Terra crash of May, 2022, saw validators choose to run a new binary with code that had not been approved by governance, because the governance token had been inflated to nothing.
|
||||
* What is the purpose of the chain, specifically?
|
||||
* best example of this is the Cosmos hub, where different founding groups, have different interpertations of the purpose of the network.
|
||||
|
||||
This genesis entry, "constitution" hasn't been designed for existing chains, who should likely just ratify a constitution using their governance system. Instead, this is for new chains. It will allow for validators to have a much clearer idea of purpose and the expecations placed on them while operating thier nodes. Likewise, for community members, the constitution will give them some idea of what to expect from both the "chain team" and the validators, respectively.
|
||||
|
||||
This constitution is designed to be immutable, and placed only in genesis, though that could change over time by a pull request to the cosmos-sdk that allows for the constitution to be changed by governance. Communities whishing to make amendments to their original constitution should use the governance mechanism and a "signaling proposal" to do exactly that.
|
||||
|
||||
**Ideal use scenario for a cosmos chain constitution**
|
||||
|
||||
As a chain developer, you decide that you'd like to provide clarity to your key user groups:
|
||||
|
||||
* validators
|
||||
* token holders
|
||||
* developers (yourself)
|
||||
|
||||
You use the constitution to immutably store some Markdown in genesis, so that when difficult questions come up, the constutituon can provide guidance to the community.
|
||||
|
||||
### Proposals
|
||||
|
||||
`Proposal` objects are used to tally votes and generally track the proposal's state.
|
||||
|
||||
@ -38,6 +38,7 @@ func GetQueryCmd() *cobra.Command {
|
||||
GetCmdQueryDeposit(),
|
||||
GetCmdQueryDeposits(),
|
||||
GetCmdQueryTally(),
|
||||
GetCmdConstitution(),
|
||||
)
|
||||
|
||||
return govQueryCmd
|
||||
@ -652,3 +653,25 @@ $ %s query gov proposer 1
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
func GetCmdConstitution() *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "constitution",
|
||||
Short: "Get the constitution",
|
||||
Args: cobra.NoArgs,
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
clientCtx, err := client.GetClientTxContext(cmd)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
queryClient := v1.NewQueryClient(clientCtx)
|
||||
|
||||
resp, err := queryClient.Constitution(cmd.Context(), &v1.QueryConstitutionRequest{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return clientCtx.PrintProto(resp)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,6 +4,8 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
"github.com/cosmos/cosmos-sdk/testutil"
|
||||
"github.com/cosmos/cosmos-sdk/x/gov/client/cli"
|
||||
@ -381,3 +383,26 @@ func (s *CLITestSuite) TestCmdQueryVote() {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func (s *CLITestSuite) TestCmdGetConstitution() {
|
||||
testCases := []struct {
|
||||
name string
|
||||
expOutput string
|
||||
}{
|
||||
{
|
||||
name: "get constitution",
|
||||
expOutput: "constitution",
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
|
||||
s.Run(tc.name, func() {
|
||||
cmd := cli.GetCmdConstitution()
|
||||
out, err := clitestutil.ExecTestCLICmd(s.clientCtx, cmd, []string{})
|
||||
s.Require().NoError(err)
|
||||
s.Require().Contains(out.String(), tc.expOutput)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,6 +13,7 @@ import (
|
||||
func InitGenesis(ctx sdk.Context, ak types.AccountKeeper, bk types.BankKeeper, k *keeper.Keeper, data *v1.GenesisState) {
|
||||
k.SetProposalID(ctx, data.StartingProposalId)
|
||||
k.SetParams(ctx, *data.Params)
|
||||
k.SetConstitution(ctx, data.Constitution)
|
||||
|
||||
// check if the deposits pool account exists
|
||||
moduleAcc := k.GetGovernanceAccount(ctx)
|
||||
@ -50,12 +51,14 @@ func InitGenesis(ctx sdk.Context, ak types.AccountKeeper, bk types.BankKeeper, k
|
||||
if !balance.Equal(totalDeposits) {
|
||||
panic(fmt.Sprintf("expected module account was %s but we got %s", balance.String(), totalDeposits.String()))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ExportGenesis - output genesis parameters
|
||||
func ExportGenesis(ctx sdk.Context, k *keeper.Keeper) *v1.GenesisState {
|
||||
startingProposalID, _ := k.GetProposalID(ctx)
|
||||
proposals := k.GetProposals(ctx)
|
||||
constitution := k.GetConstitution(ctx)
|
||||
params := k.GetParams(ctx)
|
||||
|
||||
var proposalsDeposits v1.Deposits
|
||||
@ -74,5 +77,6 @@ func ExportGenesis(ctx sdk.Context, k *keeper.Keeper) *v1.GenesisState {
|
||||
Votes: proposalsVotes,
|
||||
Proposals: proposals,
|
||||
Params: ¶ms,
|
||||
Constitution: constitution,
|
||||
}
|
||||
}
|
||||
|
||||
18
x/gov/keeper/constitution.go
Normal file
18
x/gov/keeper/constitution.go
Normal file
@ -0,0 +1,18 @@
|
||||
package keeper
|
||||
|
||||
import (
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/gov/types"
|
||||
)
|
||||
|
||||
func (keeper Keeper) GetConstitution(ctx sdk.Context) (constitution string) {
|
||||
store := ctx.KVStore(keeper.storeKey)
|
||||
bz := store.Get(types.KeyConstitution)
|
||||
|
||||
return string(bz)
|
||||
}
|
||||
|
||||
func (keeper Keeper) SetConstitution(ctx sdk.Context, constitution string) {
|
||||
store := ctx.KVStore(keeper.storeKey)
|
||||
store.Set([]byte(types.KeyConstitution), []byte(constitution))
|
||||
}
|
||||
@ -18,6 +18,13 @@ import (
|
||||
|
||||
var _ v1.QueryServer = Keeper{}
|
||||
|
||||
func (q Keeper) Constitution(c context.Context, req *v1.QueryConstitutionRequest) (*v1.QueryConstitutionResponse, error) {
|
||||
ctx := sdk.UnwrapSDKContext(c)
|
||||
constitution := q.GetConstitution(ctx)
|
||||
|
||||
return &v1.QueryConstitutionResponse{Constitution: constitution}, nil
|
||||
}
|
||||
|
||||
// Proposal returns proposal details based on ProposalID
|
||||
func (q Keeper) Proposal(c context.Context, req *v1.QueryProposalRequest) (*v1.QueryProposalResponse, error) {
|
||||
if req == nil {
|
||||
|
||||
@ -73,6 +73,7 @@ func TestMigrateJSON(t *testing.T) {
|
||||
// Make sure about:
|
||||
// - Proposals use MsgExecLegacyContent
|
||||
expected := `{
|
||||
"constitution": "",
|
||||
"deposit_params": {
|
||||
"max_deposit_period": "172800s",
|
||||
"min_deposit": [
|
||||
|
||||
@ -56,6 +56,7 @@ func TestMigrateJSON(t *testing.T) {
|
||||
// Make sure about:
|
||||
// - Proposals use MsgExecLegacyContent
|
||||
expected := `{
|
||||
"constitution": "",
|
||||
"deposit_params": null,
|
||||
"deposits": [],
|
||||
"params": {
|
||||
|
||||
@ -49,6 +49,9 @@ var (
|
||||
|
||||
// ParamsKey is the key to query all gov params
|
||||
ParamsKey = []byte{0x30}
|
||||
|
||||
// KeyConstitution is the key string used to store the chain's constitution
|
||||
KeyConstitution = []byte("constitution")
|
||||
)
|
||||
|
||||
var lenTime = len(sdk.FormatTimeBytes(time.Now()))
|
||||
|
||||
@ -45,6 +45,13 @@ type GenesisState struct {
|
||||
//
|
||||
// Since: cosmos-sdk 0.47
|
||||
Params *Params `protobuf:"bytes,8,opt,name=params,proto3" json:"params,omitempty"`
|
||||
// The constitution allows builders to lay a foundation and define purpose.
|
||||
// This is an immutable string set in genesis.
|
||||
// There are no amendments, to go outside of scope, just fork.
|
||||
// constitution is an immutable string in genesis for a chain builder to lay out their vision, ideas and ideals.
|
||||
//
|
||||
// Since: cosmos-sdk 0.48
|
||||
Constitution string `protobuf:"bytes,9,opt,name=constitution,proto3" json:"constitution,omitempty"`
|
||||
}
|
||||
|
||||
func (m *GenesisState) Reset() { *m = GenesisState{} }
|
||||
@ -139,6 +146,13 @@ func (m *GenesisState) GetParams() *Params {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *GenesisState) GetConstitution() string {
|
||||
if m != nil {
|
||||
return m.Constitution
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*GenesisState)(nil), "cosmos.gov.v1.GenesisState")
|
||||
}
|
||||
@ -146,30 +160,31 @@ func init() {
|
||||
func init() { proto.RegisterFile("cosmos/gov/v1/genesis.proto", fileDescriptor_ef7cfd15e3ded621) }
|
||||
|
||||
var fileDescriptor_ef7cfd15e3ded621 = []byte{
|
||||
// 358 bytes of a gzipped FileDescriptorProto
|
||||
// 379 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xcd, 0x4e, 0xfa, 0x40,
|
||||
0x14, 0xc5, 0x19, 0xbe, 0xfe, 0xfc, 0x07, 0x70, 0x31, 0x7e, 0xd0, 0x80, 0x69, 0x88, 0x2b, 0x8c,
|
||||
0xa1, 0x15, 0x8c, 0x0f, 0x20, 0xc1, 0x10, 0x77, 0xa4, 0x1a, 0x17, 0x6e, 0x48, 0xa1, 0x93, 0xda,
|
||||
0x08, 0xdc, 0xa6, 0x77, 0x9c, 0xc8, 0x5b, 0xf8, 0x58, 0x2e, 0xd9, 0xe9, 0xd2, 0xc0, 0x8b, 0x18,
|
||||
0x66, 0x5a, 0xc1, 0xea, 0x6a, 0x92, 0x7b, 0x7e, 0xe7, 0xcc, 0xc9, 0xcd, 0xa5, 0x8d, 0x09, 0xe0,
|
||||
0x0c, 0xd0, 0xf6, 0x41, 0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42, 0x8f, 0x06, 0xd4, 0x8c, 0x62,
|
||||
0x60, 0x40, 0xea, 0x52, 0x34, 0x7d, 0xe0, 0x26, 0xef, 0x36, 0x1b, 0x19, 0x16, 0xb8, 0xe4, 0xda,
|
||||
0x5f, 0x05, 0xac, 0x0c, 0xa5, 0xf3, 0x9e, 0x39, 0xcc, 0x23, 0x97, 0xf8, 0x98, 0x32, 0x27, 0x66,
|
||||
0x41, 0xe8, 0x8f, 0xa3, 0x18, 0x22, 0xa0, 0xce, 0x6c, 0x1c, 0xb8, 0x2a, 0xd2, 0x91, 0x51, 0xb4,
|
||||
0x49, 0xaa, 0x8d, 0x12, 0xe9, 0xce, 0x25, 0x3d, 0x5c, 0x71, 0xbd, 0x08, 0x68, 0xc0, 0xa8, 0x9a,
|
||||
0xd7, 0x0b, 0x46, 0xad, 0x77, 0x6a, 0x1e, 0xfc, 0x6e, 0x0e, 0xa4, 0x6c, 0xff, 0x70, 0xe4, 0x1c,
|
||||
0x97, 0x38, 0x30, 0x8f, 0xaa, 0x05, 0x61, 0x38, 0xca, 0x18, 0x1e, 0x81, 0x79, 0xb6, 0x24, 0xc8,
|
||||
0x35, 0xae, 0xa6, 0x3d, 0xa8, 0x5a, 0x14, 0x78, 0x23, 0x83, 0xa7, 0x65, 0xec, 0x1d, 0x49, 0x86,
|
||||
0xf8, 0x7f, 0xf2, 0xdb, 0x38, 0x72, 0x62, 0x67, 0x4e, 0xd5, 0x92, 0x8e, 0x8c, 0x5a, 0xef, 0xec,
|
||||
0xef, 0x6e, 0x23, 0xc1, 0xf4, 0xf3, 0x2a, 0xb2, 0xeb, 0xee, 0xfe, 0x88, 0x0c, 0x70, 0x9d, 0x83,
|
||||
0x5c, 0x87, 0xcc, 0x29, 0x8b, 0x9c, 0xd6, 0xef, 0xca, 0xdb, 0xb5, 0xec, 0x62, 0x14, 0xbe, 0x37,
|
||||
0x21, 0x37, 0x58, 0x61, 0xce, 0x6c, 0xb6, 0x4c, 0x43, 0xfe, 0x89, 0x90, 0x66, 0x26, 0xe4, 0x61,
|
||||
0x8b, 0xec, 0x65, 0xd4, 0xd8, 0x6e, 0x40, 0x3a, 0xb8, 0x9c, 0x98, 0x2b, 0xc2, 0x7c, 0x92, 0xdd,
|
||||
0x82, 0x10, 0xed, 0x04, 0x22, 0x6d, 0xac, 0x4c, 0x21, 0xa4, 0x2c, 0x60, 0x0b, 0x16, 0x40, 0xa8,
|
||||
0x56, 0x75, 0x64, 0x54, 0xed, 0x83, 0x59, 0xff, 0xf6, 0x7d, 0xad, 0xa1, 0xd5, 0x5a, 0x43, 0x9f,
|
||||
0x6b, 0x0d, 0xbd, 0x6d, 0xb4, 0xdc, 0x6a, 0xa3, 0xe5, 0x3e, 0x36, 0x5a, 0xee, 0xe9, 0xc2, 0x0f,
|
||||
0xd8, 0xf3, 0x62, 0x62, 0x4e, 0x61, 0x6e, 0x25, 0xb7, 0x23, 0x9f, 0x0e, 0x75, 0x5f, 0xac, 0x57,
|
||||
0x71, 0x48, 0x6c, 0x19, 0x79, 0xd4, 0xe2, 0xdd, 0x49, 0x59, 0xdc, 0xd2, 0xd5, 0x77, 0x00, 0x00,
|
||||
0x00, 0xff, 0xff, 0x1b, 0x69, 0x07, 0x35, 0x92, 0x02, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *GenesisState) Marshal() (dAtA []byte, err error) {
|
||||
@ -192,6 +207,13 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Constitution) > 0 {
|
||||
i -= len(m.Constitution)
|
||||
copy(dAtA[i:], m.Constitution)
|
||||
i = encodeVarintGenesis(dAtA, i, uint64(len(m.Constitution)))
|
||||
i--
|
||||
dAtA[i] = 0x4a
|
||||
}
|
||||
if m.Params != nil {
|
||||
{
|
||||
size, err := m.Params.MarshalToSizedBuffer(dAtA[:i])
|
||||
@ -344,6 +366,10 @@ func (m *GenesisState) Size() (n int) {
|
||||
l = m.Params.Size()
|
||||
n += 1 + l + sovGenesis(uint64(l))
|
||||
}
|
||||
l = len(m.Constitution)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovGenesis(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
@ -647,6 +673,38 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 9:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Constitution", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenesis
|
||||
}
|
||||
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 ErrInvalidLengthGenesis
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthGenesis
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Constitution = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipGenesis(dAtA[iNdEx:])
|
||||
|
||||
@ -30,6 +30,88 @@ var _ = math.Inf
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// QueryConstitutionRequest is the request type for the Query/Constitution RPC method
|
||||
type QueryConstitutionRequest struct {
|
||||
}
|
||||
|
||||
func (m *QueryConstitutionRequest) Reset() { *m = QueryConstitutionRequest{} }
|
||||
func (m *QueryConstitutionRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryConstitutionRequest) ProtoMessage() {}
|
||||
func (*QueryConstitutionRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_46a436d1109b50d0, []int{0}
|
||||
}
|
||||
func (m *QueryConstitutionRequest) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *QueryConstitutionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_QueryConstitutionRequest.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 *QueryConstitutionRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_QueryConstitutionRequest.Merge(m, src)
|
||||
}
|
||||
func (m *QueryConstitutionRequest) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *QueryConstitutionRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_QueryConstitutionRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_QueryConstitutionRequest proto.InternalMessageInfo
|
||||
|
||||
// QueryConstitutionResponse is the response type for the Query/Constitution RPC method
|
||||
type QueryConstitutionResponse struct {
|
||||
Constitution string `protobuf:"bytes,1,opt,name=constitution,proto3" json:"constitution,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryConstitutionResponse) Reset() { *m = QueryConstitutionResponse{} }
|
||||
func (m *QueryConstitutionResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryConstitutionResponse) ProtoMessage() {}
|
||||
func (*QueryConstitutionResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_46a436d1109b50d0, []int{1}
|
||||
}
|
||||
func (m *QueryConstitutionResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *QueryConstitutionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_QueryConstitutionResponse.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 *QueryConstitutionResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_QueryConstitutionResponse.Merge(m, src)
|
||||
}
|
||||
func (m *QueryConstitutionResponse) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *QueryConstitutionResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_QueryConstitutionResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_QueryConstitutionResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *QueryConstitutionResponse) GetConstitution() string {
|
||||
if m != nil {
|
||||
return m.Constitution
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// QueryProposalRequest is the request type for the Query/Proposal RPC method.
|
||||
type QueryProposalRequest struct {
|
||||
// proposal_id defines the unique id of the proposal.
|
||||
@ -40,7 +122,7 @@ func (m *QueryProposalRequest) Reset() { *m = QueryProposalRequest{} }
|
||||
func (m *QueryProposalRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryProposalRequest) ProtoMessage() {}
|
||||
func (*QueryProposalRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_46a436d1109b50d0, []int{0}
|
||||
return fileDescriptor_46a436d1109b50d0, []int{2}
|
||||
}
|
||||
func (m *QueryProposalRequest) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -86,7 +168,7 @@ func (m *QueryProposalResponse) Reset() { *m = QueryProposalResponse{} }
|
||||
func (m *QueryProposalResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryProposalResponse) ProtoMessage() {}
|
||||
func (*QueryProposalResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_46a436d1109b50d0, []int{1}
|
||||
return fileDescriptor_46a436d1109b50d0, []int{3}
|
||||
}
|
||||
func (m *QueryProposalResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -138,7 +220,7 @@ func (m *QueryProposalsRequest) Reset() { *m = QueryProposalsRequest{} }
|
||||
func (m *QueryProposalsRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryProposalsRequest) ProtoMessage() {}
|
||||
func (*QueryProposalsRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_46a436d1109b50d0, []int{2}
|
||||
return fileDescriptor_46a436d1109b50d0, []int{4}
|
||||
}
|
||||
func (m *QueryProposalsRequest) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -208,7 +290,7 @@ func (m *QueryProposalsResponse) Reset() { *m = QueryProposalsResponse{}
|
||||
func (m *QueryProposalsResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryProposalsResponse) ProtoMessage() {}
|
||||
func (*QueryProposalsResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_46a436d1109b50d0, []int{3}
|
||||
return fileDescriptor_46a436d1109b50d0, []int{5}
|
||||
}
|
||||
func (m *QueryProposalsResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -263,7 +345,7 @@ func (m *QueryVoteRequest) Reset() { *m = QueryVoteRequest{} }
|
||||
func (m *QueryVoteRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryVoteRequest) ProtoMessage() {}
|
||||
func (*QueryVoteRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_46a436d1109b50d0, []int{4}
|
||||
return fileDescriptor_46a436d1109b50d0, []int{6}
|
||||
}
|
||||
func (m *QueryVoteRequest) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -316,7 +398,7 @@ func (m *QueryVoteResponse) Reset() { *m = QueryVoteResponse{} }
|
||||
func (m *QueryVoteResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryVoteResponse) ProtoMessage() {}
|
||||
func (*QueryVoteResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_46a436d1109b50d0, []int{5}
|
||||
return fileDescriptor_46a436d1109b50d0, []int{7}
|
||||
}
|
||||
func (m *QueryVoteResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -364,7 +446,7 @@ func (m *QueryVotesRequest) Reset() { *m = QueryVotesRequest{} }
|
||||
func (m *QueryVotesRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryVotesRequest) ProtoMessage() {}
|
||||
func (*QueryVotesRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_46a436d1109b50d0, []int{6}
|
||||
return fileDescriptor_46a436d1109b50d0, []int{8}
|
||||
}
|
||||
func (m *QueryVotesRequest) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -419,7 +501,7 @@ func (m *QueryVotesResponse) Reset() { *m = QueryVotesResponse{} }
|
||||
func (m *QueryVotesResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryVotesResponse) ProtoMessage() {}
|
||||
func (*QueryVotesResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_46a436d1109b50d0, []int{7}
|
||||
return fileDescriptor_46a436d1109b50d0, []int{9}
|
||||
}
|
||||
func (m *QueryVotesResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -473,7 +555,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} }
|
||||
func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryParamsRequest) ProtoMessage() {}
|
||||
func (*QueryParamsRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_46a436d1109b50d0, []int{8}
|
||||
return fileDescriptor_46a436d1109b50d0, []int{10}
|
||||
}
|
||||
func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -530,7 +612,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} }
|
||||
func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryParamsResponse) ProtoMessage() {}
|
||||
func (*QueryParamsResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_46a436d1109b50d0, []int{9}
|
||||
return fileDescriptor_46a436d1109b50d0, []int{11}
|
||||
}
|
||||
func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -602,7 +684,7 @@ func (m *QueryDepositRequest) Reset() { *m = QueryDepositRequest{} }
|
||||
func (m *QueryDepositRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryDepositRequest) ProtoMessage() {}
|
||||
func (*QueryDepositRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_46a436d1109b50d0, []int{10}
|
||||
return fileDescriptor_46a436d1109b50d0, []int{12}
|
||||
}
|
||||
func (m *QueryDepositRequest) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -655,7 +737,7 @@ func (m *QueryDepositResponse) Reset() { *m = QueryDepositResponse{} }
|
||||
func (m *QueryDepositResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryDepositResponse) ProtoMessage() {}
|
||||
func (*QueryDepositResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_46a436d1109b50d0, []int{11}
|
||||
return fileDescriptor_46a436d1109b50d0, []int{13}
|
||||
}
|
||||
func (m *QueryDepositResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -703,7 +785,7 @@ func (m *QueryDepositsRequest) Reset() { *m = QueryDepositsRequest{} }
|
||||
func (m *QueryDepositsRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryDepositsRequest) ProtoMessage() {}
|
||||
func (*QueryDepositsRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_46a436d1109b50d0, []int{12}
|
||||
return fileDescriptor_46a436d1109b50d0, []int{14}
|
||||
}
|
||||
func (m *QueryDepositsRequest) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -758,7 +840,7 @@ func (m *QueryDepositsResponse) Reset() { *m = QueryDepositsResponse{} }
|
||||
func (m *QueryDepositsResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryDepositsResponse) ProtoMessage() {}
|
||||
func (*QueryDepositsResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_46a436d1109b50d0, []int{13}
|
||||
return fileDescriptor_46a436d1109b50d0, []int{15}
|
||||
}
|
||||
func (m *QueryDepositsResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -811,7 +893,7 @@ func (m *QueryTallyResultRequest) Reset() { *m = QueryTallyResultRequest
|
||||
func (m *QueryTallyResultRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryTallyResultRequest) ProtoMessage() {}
|
||||
func (*QueryTallyResultRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_46a436d1109b50d0, []int{14}
|
||||
return fileDescriptor_46a436d1109b50d0, []int{16}
|
||||
}
|
||||
func (m *QueryTallyResultRequest) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -857,7 +939,7 @@ func (m *QueryTallyResultResponse) Reset() { *m = QueryTallyResultRespon
|
||||
func (m *QueryTallyResultResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryTallyResultResponse) ProtoMessage() {}
|
||||
func (*QueryTallyResultResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_46a436d1109b50d0, []int{15}
|
||||
return fileDescriptor_46a436d1109b50d0, []int{17}
|
||||
}
|
||||
func (m *QueryTallyResultResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -894,6 +976,8 @@ func (m *QueryTallyResultResponse) GetTally() *TallyResult {
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*QueryConstitutionRequest)(nil), "cosmos.gov.v1.QueryConstitutionRequest")
|
||||
proto.RegisterType((*QueryConstitutionResponse)(nil), "cosmos.gov.v1.QueryConstitutionResponse")
|
||||
proto.RegisterType((*QueryProposalRequest)(nil), "cosmos.gov.v1.QueryProposalRequest")
|
||||
proto.RegisterType((*QueryProposalResponse)(nil), "cosmos.gov.v1.QueryProposalResponse")
|
||||
proto.RegisterType((*QueryProposalsRequest)(nil), "cosmos.gov.v1.QueryProposalsRequest")
|
||||
@ -915,68 +999,71 @@ func init() {
|
||||
func init() { proto.RegisterFile("cosmos/gov/v1/query.proto", fileDescriptor_46a436d1109b50d0) }
|
||||
|
||||
var fileDescriptor_46a436d1109b50d0 = []byte{
|
||||
// 964 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4b, 0x6f, 0xdc, 0x54,
|
||||
0x14, 0x8e, 0x27, 0x8f, 0xce, 0x9c, 0x34, 0x01, 0x4e, 0x1f, 0x19, 0x4c, 0x99, 0x06, 0x87, 0x26,
|
||||
0x81, 0x12, 0x5f, 0x26, 0x7d, 0x49, 0x50, 0x16, 0x0d, 0x25, 0x05, 0x89, 0x45, 0x98, 0x56, 0x2c,
|
||||
0xd8, 0x44, 0x4e, 0xc6, 0x32, 0x16, 0x13, 0x5f, 0x77, 0xee, 0x9d, 0x11, 0x21, 0x8d, 0x90, 0x2a,
|
||||
0x21, 0x58, 0x01, 0x12, 0x15, 0xf0, 0x43, 0xf8, 0x11, 0x2c, 0x2b, 0xd8, 0x20, 0x56, 0x28, 0xe1,
|
||||
0x87, 0x20, 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a1, 0x67,
|
||||
0xa9, 0xdd, 0x77, 0x06, 0x60, 0xda, 0x3d, 0xa9, 0x7f, 0x43, 0xa7, 0x20, 0xae, 0x59, 0xa1, 0x7c,
|
||||
0x8d, 0x78, 0x7e, 0xb5, 0xba, 0x41, 0x4a, 0xb6, 0x9c, 0xae, 0xb3, 0x97, 0xc9, 0x84, 0x3a, 0xd8,
|
||||
0x96, 0xfb, 0xa1, 0x4e, 0x67, 0x2d, 0x32, 0x8b, 0x8e, 0x1e, 0xec, 0x87, 0xae, 0xf5, 0x73, 0x05,
|
||||
0xce, 0x65, 0xec, 0x28, 0x84, 0xbb, 0x30, 0xd7, 0xe7, 0xd2, 0x0f, 0xbc, 0x6d, 0x0d, 0xa6, 0x4a,
|
||||
0xbc, 0x72, 0x32, 0x14, 0x3f, 0xf0, 0xb4, 0xed, 0x46, 0xa5, 0x6e, 0xb4, 0xce, 0xf6, 0x53, 0x27,
|
||||
0x78, 0x0f, 0xe6, 0x69, 0x60, 0x62, 0x1a, 0x1d, 0xe1, 0xa5, 0x1c, 0xcd, 0x5d, 0x0d, 0x4a, 0xf1,
|
||||
0xcc, 0xb5, 0xd3, 0x47, 0x78, 0x07, 0xce, 0x4a, 0xa7, 0xd3, 0xd9, 0x8f, 0x69, 0x26, 0x15, 0x8d,
|
||||
0x99, 0xa3, 0x79, 0x10, 0x41, 0x52, 0x24, 0xb3, 0x72, 0x70, 0x80, 0x6b, 0x30, 0x43, 0xc6, 0x7a,
|
||||
0x56, 0x2f, 0xe4, 0x27, 0x49, 0x27, 0x80, 0x40, 0x56, 0x40, 0x79, 0x21, 0x69, 0x23, 0xb7, 0x56,
|
||||
0x66, 0x9d, 0x54, 0x46, 0x5e, 0x27, 0xd6, 0x87, 0xb4, 0x9f, 0x13, 0x7f, 0x54, 0x88, 0xb7, 0xe1,
|
||||
0x0c, 0x81, 0xa8, 0x04, 0x17, 0x8b, 0x73, 0xd7, 0x8a, 0x61, 0xd6, 0xd7, 0x59, 0xa6, 0xff, 0x7f,
|
||||
0x2a, 0x9e, 0x18, 0xb4, 0xe3, 0x07, 0x0a, 0x28, 0x98, 0x75, 0xa8, 0x92, 0xca, 0x78, 0x36, 0x86,
|
||||
0x45, 0x93, 0xe0, 0x9e, 0xdf, 0x84, 0xbc, 0x03, 0x0b, 0x4a, 0x95, 0xea, 0x92, 0x96, 0x2b, 0x7a,
|
||||
0x1d, 0x39, 0xc6, 0x23, 0x58, 0x3f, 0x69, 0x9b, 0x54, 0x68, 0x5a, 0xf5, 0x19, 0xd5, 0xa7, 0xb0,
|
||||
0x29, 0xc9, 0x44, 0x03, 0xd7, 0xff, 0xae, 0xc2, 0xb4, 0xa2, 0xc3, 0x6f, 0x0c, 0xa8, 0xc6, 0x2b,
|
||||
0x1c, 0x97, 0x72, 0x96, 0x45, 0xef, 0xb5, 0xf9, 0x7a, 0x39, 0x48, 0x6b, 0xb2, 0xec, 0xc7, 0x7f,
|
||||
0xfe, 0xfb, 0x53, 0x65, 0x15, 0x97, 0x59, 0xf6, 0x5f, 0x85, 0xe4, 0x91, 0x60, 0x07, 0xa9, 0x80,
|
||||
0x0f, 0xf1, 0x2b, 0xa8, 0x25, 0xcf, 0x0f, 0x96, 0xba, 0x88, 0xdb, 0xc9, 0xbc, 0x72, 0x0a, 0x8a,
|
||||
0x94, 0x2c, 0x2a, 0x25, 0x26, 0xd6, 0x87, 0x29, 0xc1, 0x6f, 0x0d, 0x98, 0x8a, 0x56, 0x22, 0x5e,
|
||||
0x2e, 0x62, 0x4c, 0xbd, 0x3d, 0xe6, 0xe2, 0x70, 0x00, 0x79, 0xbb, 0xad, 0xbc, 0xdd, 0xc4, 0xeb,
|
||||
0xa3, 0xc5, 0xcd, 0xd4, 0x12, 0x66, 0x07, 0xea, 0x25, 0x3a, 0xc4, 0xc7, 0x06, 0x4c, 0xab, 0x4d,
|
||||
0x8e, 0x43, 0x3d, 0x25, 0xe1, 0xbf, 0x56, 0x82, 0x20, 0x31, 0xd7, 0x95, 0x18, 0x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, 0xff, 0x9f, 0xe4, 0xf6, 0xe9,
|
||||
0xe0, 0x0c, 0x00, 0x00,
|
||||
// 1023 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x5b, 0x6f, 0xdc, 0x44,
|
||||
0x14, 0x8e, 0x37, 0x97, 0x66, 0x4f, 0x2e, 0xc0, 0xe9, 0x25, 0xae, 0xdb, 0x6e, 0x83, 0x43, 0x93,
|
||||
0x40, 0x89, 0xcd, 0xa6, 0x37, 0x09, 0x8a, 0x50, 0xd3, 0x92, 0x82, 0xc4, 0x43, 0x70, 0x2b, 0x1e,
|
||||
0x78, 0x89, 0x9c, 0xac, 0x65, 0x2c, 0x36, 0x1e, 0x77, 0x67, 0x76, 0x45, 0x48, 0x23, 0xa4, 0x4a,
|
||||
0x5c, 0x9e, 0x00, 0x89, 0x0a, 0xf8, 0x21, 0xfc, 0x08, 0x1e, 0x2b, 0x78, 0xe1, 0x11, 0x25, 0xfc,
|
||||
0x10, 0xe4, 0x99, 0x63, 0xaf, 0xed, 0x78, 0x6f, 0x55, 0xd5, 0xa7, 0x95, 0x67, 0xbe, 0xf3, 0x9d,
|
||||
0xef, 0x9c, 0x39, 0x73, 0xce, 0x2c, 0x9c, 0xdf, 0x65, 0x7c, 0x8f, 0x71, 0xdb, 0x67, 0x1d, 0xbb,
|
||||
0x53, 0xb7, 0x1f, 0xb5, 0xbd, 0xd6, 0xbe, 0x15, 0xb5, 0x98, 0x60, 0x38, 0xa7, 0xb6, 0x2c, 0x9f,
|
||||
0x75, 0xac, 0x4e, 0xdd, 0x78, 0x8b, 0x90, 0x3b, 0x2e, 0xf7, 0x14, 0xce, 0xee, 0xd4, 0x77, 0x3c,
|
||||
0xe1, 0xd6, 0xed, 0xc8, 0xf5, 0x83, 0xd0, 0x15, 0x01, 0x0b, 0x95, 0xa9, 0x71, 0xd1, 0x67, 0xcc,
|
||||
0x6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||||
0x10, 0xad, 0x20, 0xf4, 0x1d, 0x05, 0xc3, 0x9b, 0x50, 0x6d, 0x78, 0x11, 0xe3, 0x81, 0x60, 0x2d,
|
||||
0x7d, 0x7c, 0x80, 0x4d, 0x17, 0x8a, 0x9b, 0x00, 0xdd, 0x9a, 0xd0, 0x27, 0x64, 0x02, 0x96, 0x13,
|
||||
0xa9, 0x71, 0x01, 0x59, 0xaa, 0xd0, 0xa8, 0x80, 0xac, 0x2d, 0xd7, 0xf7, 0x28, 0x56, 0x27, 0x63,
|
||||
0x69, 0xfe, 0xae, 0xc1, 0xb9, 0x62, 0x46, 0x28, 0xc3, 0x37, 0xa0, 0x9a, 0x04, 0x17, 0x27, 0x63,
|
||||
0xbc, 0x5f, 0x8a, 0xbb, 0x48, 0xbc, 0x9f, 0x53, 0x56, 0x91, 0xca, 0x56, 0x06, 0x2a, 0x53, 0x3e,
|
||||
0x73, 0xd2, 0x76, 0xe1, 0x55, 0xa9, 0xec, 0x33, 0x26, 0xbc, 0x61, 0xeb, 0x65, 0xd4, 0xfc, 0x9b,
|
||||
0xb7, 0xe1, 0xb5, 0x8c, 0x13, 0x8a, 0x7c, 0x05, 0x26, 0xe2, 0x5d, 0xaa, 0xab, 0xd3, 0x85, 0xa0,
|
||||
0x25, 0x54, 0x02, 0xcc, 0xc7, 0x19, 0x6b, 0x3e, 0xb4, 0xc6, 0xcd, 0x92, 0x0c, 0x3d, 0xcf, 0xd9,
|
||||
0xfd, 0xa0, 0x01, 0x66, 0xdd, 0x93, 0xfa, 0x37, 0x55, 0x0a, 0x92, 0x33, 0x2b, 0x95, 0xaf, 0x10,
|
||||
0x2f, 0xee, 0xac, 0x6e, 0x90, 0x92, 0x2d, 0xb7, 0xe5, 0xee, 0xe5, 0x32, 0x21, 0x17, 0xb6, 0xc5,
|
||||
0x7e, 0xe4, 0x51, 0x63, 0x00, 0xb5, 0xf4, 0x70, 0x3f, 0xf2, 0xcc, 0x5f, 0x2b, 0x70, 0x3a, 0x67,
|
||||
0x47, 0x21, 0xdc, 0x83, 0xb9, 0x0e, 0x13, 0x41, 0xe8, 0x6f, 0x2b, 0x30, 0x9d, 0xc4, 0x85, 0x93,
|
||||
0xa1, 0x04, 0xa1, 0xaf, 0x6c, 0x37, 0x2a, 0xba, 0xe6, 0xcc, 0x76, 0x32, 0x2b, 0x78, 0x1f, 0xe6,
|
||||
0xe9, 0xc2, 0x24, 0x34, 0x2a, 0xc2, 0x8b, 0x05, 0x9a, 0x7b, 0x0a, 0x94, 0xe1, 0x99, 0x6b, 0x64,
|
||||
0x97, 0xf0, 0x0e, 0xcc, 0x0a, 0xb7, 0xd9, 0xdc, 0x4f, 0x68, 0xc6, 0x25, 0x8d, 0x51, 0xa0, 0x79,
|
||||
0x18, 0x43, 0x32, 0x24, 0x33, 0xa2, 0xbb, 0x80, 0x6b, 0x30, 0x45, 0xc6, 0xea, 0xae, 0x9e, 0x2d,
|
||||
0xde, 0x24, 0x95, 0x00, 0x02, 0x99, 0x21, 0xe5, 0x85, 0xa4, 0x0d, 0x5d, 0x5a, 0xb9, 0x76, 0x52,
|
||||
0x19, 0xba, 0x9d, 0x98, 0x1f, 0x51, 0x7f, 0x4e, 0xfd, 0xd1, 0x41, 0xbc, 0x03, 0xa7, 0x08, 0x44,
|
||||
0x47, 0x70, 0xae, 0x3c, 0x77, 0x4e, 0x02, 0x33, 0xbf, 0xc9, 0x33, 0xbd, 0xfc, 0x5b, 0xf1, 0x54,
|
||||
0xa3, 0x1e, 0xdf, 0x55, 0x40, 0xc1, 0xac, 0xc3, 0x34, 0xa9, 0x4c, 0xee, 0x46, 0xaf, 0x68, 0x52,
|
||||
0xdc, 0x8b, 0xbb, 0x21, 0xef, 0xc2, 0x82, 0x54, 0x25, 0xab, 0xc4, 0xf1, 0x78, 0xbb, 0x29, 0x46,
|
||||
0x18, 0x82, 0xfa, 0x49, 0xdb, 0xf4, 0x84, 0x26, 0x65, 0x9d, 0xd1, 0xf9, 0x94, 0x16, 0x25, 0x99,
|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0x0a, 0x2e,
|
||||
0x15, 0x65, 0x48, 0x98, 0x7d, 0x90, 0x99, 0x54, 0x87, 0xf8, 0x9b, 0x06, 0xa7, 0xa8, 0x19, 0x60,
|
||||
0x29, 0x79, 0xbe, 0x31, 0x1b, 0x4b, 0x7d, 0x31, 0xa4, 0xe0, 0xae, 0x54, 0xf0, 0x3e, 0xbe, 0x37,
|
||||
0x64, 0x22, 0x92, 0x26, 0x64, 0x1f, 0xa4, 0x8d, 0xfa, 0x10, 0x7f, 0xd4, 0x60, 0x3a, 0xe9, 0x6c,
|
||||
0xd8, 0xcf, 0x2d, 0xef, 0x7b, 0x55, 0x8a, 0xcd, 0xd1, 0xbc, 0x25, 0xc5, 0xd5, 0xd1, 0x1e, 0x51,
|
||||
0x1c, 0x3e, 0xd5, 0x60, 0x26, 0xd3, 0x65, 0x70, 0xb9, 0xcc, 0xdd, 0xc9, 0xae, 0x67, 0xac, 0x0c,
|
||||
0xc4, 0x3d, 0x67, 0xfd, 0xc8, 0x2e, 0xb7, 0xf1, 0xe1, 0x9f, 0x47, 0x35, 0xed, 0xd9, 0x51, 0x4d,
|
||||
0xfb, 0xf7, 0xa8, 0xa6, 0xfd, 0x7c, 0x5c, 0x1b, 0x7b, 0x76, 0x5c, 0x1b, 0xfb, 0xe7, 0xb8, 0x36,
|
||||
0xf6, 0xf9, 0x55, 0x3f, 0x10, 0x5f, 0xb4, 0x77, 0xac, 0x5d, 0xb6, 0x97, 0x30, 0xaa, 0x9f, 0x35,
|
||||
0xde, 0xf8, 0xd2, 0xfe, 0x4a, 0xd2, 0xc7, 0x55, 0xc0, 0xe3, 0x7f, 0x5f, 0x53, 0xf2, 0xcf, 0xd1,
|
||||
0xb5, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x34, 0xfb, 0x7f, 0x51, 0xc6, 0x0d, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@ -991,6 +1078,8 @@ const _ = grpc.SupportPackageIsVersion4
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type QueryClient interface {
|
||||
// Constitution queries the chain's constitution.
|
||||
Constitution(ctx context.Context, in *QueryConstitutionRequest, opts ...grpc.CallOption) (*QueryConstitutionResponse, error)
|
||||
// Proposal queries proposal details based on ProposalID.
|
||||
Proposal(ctx context.Context, in *QueryProposalRequest, opts ...grpc.CallOption) (*QueryProposalResponse, error)
|
||||
// Proposals queries all proposals based on given status.
|
||||
@ -1017,6 +1106,15 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient {
|
||||
return &queryClient{cc}
|
||||
}
|
||||
|
||||
func (c *queryClient) Constitution(ctx context.Context, in *QueryConstitutionRequest, opts ...grpc.CallOption) (*QueryConstitutionResponse, error) {
|
||||
out := new(QueryConstitutionResponse)
|
||||
err := c.cc.Invoke(ctx, "/cosmos.gov.v1.Query/Constitution", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) Proposal(ctx context.Context, in *QueryProposalRequest, opts ...grpc.CallOption) (*QueryProposalResponse, error) {
|
||||
out := new(QueryProposalResponse)
|
||||
err := c.cc.Invoke(ctx, "/cosmos.gov.v1.Query/Proposal", in, out, opts...)
|
||||
@ -1091,6 +1189,8 @@ func (c *queryClient) TallyResult(ctx context.Context, in *QueryTallyResultReque
|
||||
|
||||
// QueryServer is the server API for Query service.
|
||||
type QueryServer interface {
|
||||
// Constitution queries the chain's constitution.
|
||||
Constitution(context.Context, *QueryConstitutionRequest) (*QueryConstitutionResponse, error)
|
||||
// Proposal queries proposal details based on ProposalID.
|
||||
Proposal(context.Context, *QueryProposalRequest) (*QueryProposalResponse, error)
|
||||
// Proposals queries all proposals based on given status.
|
||||
@ -1113,6 +1213,9 @@ type QueryServer interface {
|
||||
type UnimplementedQueryServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedQueryServer) Constitution(ctx context.Context, req *QueryConstitutionRequest) (*QueryConstitutionResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Constitution not implemented")
|
||||
}
|
||||
func (*UnimplementedQueryServer) Proposal(ctx context.Context, req *QueryProposalRequest) (*QueryProposalResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Proposal not implemented")
|
||||
}
|
||||
@ -1142,6 +1245,24 @@ func RegisterQueryServer(s grpc1.Server, srv QueryServer) {
|
||||
s.RegisterService(&_Query_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _Query_Constitution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryConstitutionRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).Constitution(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/cosmos.gov.v1.Query/Constitution",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).Constitution(ctx, req.(*QueryConstitutionRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_Proposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryProposalRequest)
|
||||
if err := dec(in); err != nil {
|
||||
@ -1290,6 +1411,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "cosmos.gov.v1.Query",
|
||||
HandlerType: (*QueryServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Constitution",
|
||||
Handler: _Query_Constitution_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Proposal",
|
||||
Handler: _Query_Proposal_Handler,
|
||||
@ -1327,6 +1452,59 @@ var _Query_serviceDesc = grpc.ServiceDesc{
|
||||
Metadata: "cosmos/gov/v1/query.proto",
|
||||
}
|
||||
|
||||
func (m *QueryConstitutionRequest) 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 *QueryConstitutionRequest) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *QueryConstitutionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *QueryConstitutionResponse) 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 *QueryConstitutionResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *QueryConstitutionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Constitution) > 0 {
|
||||
i -= len(m.Constitution)
|
||||
copy(dAtA[i:], m.Constitution)
|
||||
i = encodeVarintQuery(dAtA, i, uint64(len(m.Constitution)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *QueryProposalRequest) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
@ -1986,6 +2164,28 @@ func encodeVarintQuery(dAtA []byte, offset int, v uint64) int {
|
||||
dAtA[offset] = uint8(v)
|
||||
return base
|
||||
}
|
||||
func (m *QueryConstitutionRequest) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *QueryConstitutionResponse) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.Constitution)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *QueryProposalRequest) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
@ -2251,6 +2451,138 @@ func sovQuery(x uint64) (n int) {
|
||||
func sozQuery(x uint64) (n int) {
|
||||
return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func (m *QueryConstitutionRequest) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: QueryConstitutionRequest: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: QueryConstitutionRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipQuery(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *QueryConstitutionResponse) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: QueryConstitutionResponse: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: QueryConstitutionResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Constitution", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
}
|
||||
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 ErrInvalidLengthQuery
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Constitution = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipQuery(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *QueryProposalRequest) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
|
||||
@ -33,6 +33,24 @@ var _ = utilities.NewDoubleArray
|
||||
var _ = descriptor.ForMessage
|
||||
var _ = metadata.Join
|
||||
|
||||
func request_Query_Constitution_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq QueryConstitutionRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
msg, err := client.Constitution(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_Query_Constitution_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq QueryConstitutionRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
msg, err := server.Constitution(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_Query_Proposal_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq QueryProposalRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
@ -533,6 +551,29 @@ func local_request_Query_TallyResult_0(ctx context.Context, marshaler runtime.Ma
|
||||
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
|
||||
func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error {
|
||||
|
||||
mux.Handle("GET", pattern_Query_Constitution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_Constitution_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Query_Constitution_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Query_Proposal_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
@ -758,6 +799,26 @@ func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc
|
||||
// "QueryClient" to call the correct interceptors.
|
||||
func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error {
|
||||
|
||||
mux.Handle("GET", pattern_Query_Constitution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Query_Constitution_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Query_Constitution_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Query_Proposal_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
@ -922,6 +983,8 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_Query_Constitution_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "gov", "v1", "constitution"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_Proposal_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "gov", "v1", "proposals", "proposal_id"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_Proposals_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "gov", "v1", "proposals"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
@ -940,6 +1003,8 @@ var (
|
||||
)
|
||||
|
||||
var (
|
||||
forward_Query_Constitution_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Query_Proposal_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Query_Proposals_0 = runtime.ForwardResponseMessage
|
||||
|
||||
Loading…
Reference in New Issue
Block a user