From 7d40bf52f3f3629ad0f5d0d7fd6e018fc491bd0a Mon Sep 17 00:00:00 2001 From: Daniel Wedul Date: Mon, 6 May 2024 18:13:19 -0600 Subject: [PATCH] [1760]: Get rid of all the String() methods that just do yaml conversion, and switch them to an auto-generated version. --- proto/provenance/attribute/v1/attribute.proto | 1 - proto/provenance/marker/v1/marker.proto | 6 +- proto/provenance/metadata/v1/metadata.proto | 3 +- proto/provenance/metadata/v1/scope.proto | 4 - .../metadata/v1/specification.proto | 10 - x/attribute/types/attribute.pb.go | 109 ++++---- x/attribute/types/params.go | 8 - x/marker/types/marker.pb.go | 241 ++++++++++-------- x/marker/types/params.go | 43 ---- x/marker/types/params_test.go | 11 +- x/metadata/types/metadata.pb.go | 99 +++---- x/metadata/types/params.go | 8 - x/metadata/types/querier.go | 85 ------ x/metadata/types/scope.go | 14 - x/metadata/types/scope.pb.go | 153 +++++------ x/metadata/types/specification.go | 34 +-- x/metadata/types/specification.pb.go | 138 +++++----- x/name/keeper/keeper_test.go | 37 +-- 18 files changed, 425 insertions(+), 579 deletions(-) delete mode 100644 x/metadata/types/querier.go diff --git a/proto/provenance/attribute/v1/attribute.proto b/proto/provenance/attribute/v1/attribute.proto index 38a8addd12..15957cbac3 100644 --- a/proto/provenance/attribute/v1/attribute.proto +++ b/proto/provenance/attribute/v1/attribute.proto @@ -11,7 +11,6 @@ option java_multiple_files = true; // Params defines the set of params for the attribute module. message Params { - option (gogoproto.goproto_stringer) = false; // maximum length of data to allow in an attribute value uint32 max_value_length = 1; } diff --git a/proto/provenance/marker/v1/marker.proto b/proto/provenance/marker/v1/marker.proto index fcf69ad992..509e127f30 100644 --- a/proto/provenance/marker/v1/marker.proto +++ b/proto/provenance/marker/v1/marker.proto @@ -13,11 +13,9 @@ option java_multiple_files = true; // Params defines the set of params for the account module. message Params { - option (gogoproto.equal) = false; - option (gogoproto.goproto_stringer) = false; - + option (gogoproto.equal) = true; // Deprecated: Prefer to use `max_supply` instead. Maximum amount of supply to allow a marker to be created with - uint64 max_total_supply = 1 [(gogoproto.customtype) = "uint64", (gogoproto.nullable) = false, deprecated = true]; + uint64 max_total_supply = 1 [deprecated = true]; // indicates if governance based controls of markers is allowed. bool enable_governance = 2; // a regular expression used to validate marker denom values from normal create requests (governance diff --git a/proto/provenance/metadata/v1/metadata.proto b/proto/provenance/metadata/v1/metadata.proto index 03d382624e..65c51afeab 100644 --- a/proto/provenance/metadata/v1/metadata.proto +++ b/proto/provenance/metadata/v1/metadata.proto @@ -10,8 +10,7 @@ option java_multiple_files = true; // Params defines the set of params for the metadata module. message Params { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; + option (gogoproto.equal) = true; } // ScopeIdInfo contains various info regarding a scope id. diff --git a/proto/provenance/metadata/v1/scope.proto b/proto/provenance/metadata/v1/scope.proto index 322ee46ab4..732ce45235 100644 --- a/proto/provenance/metadata/v1/scope.proto +++ b/proto/provenance/metadata/v1/scope.proto @@ -69,8 +69,6 @@ Indexes (special kvstore records for efficient cross reference/queries) // Scope defines a root reference for a collection of records owned by one or more parties. message Scope { - option (gogoproto.goproto_stringer) = false; - // Unique ID for this scope. Implements sdk.Address interface for use where addresses are required in Cosmos bytes scope_id = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "MetadataAddress"]; // the scope specification that contains the specifications for data elements allowed within this scope @@ -93,8 +91,6 @@ message Scope { // // NOTE: When there are no more Records within a Scope that reference a Session, the Session is removed. message Session { - option (gogoproto.goproto_stringer) = false; - bytes session_id = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "MetadataAddress"]; // unique id of the contract specification that was used to create this session. bytes specification_id = 2 [(gogoproto.nullable) = false, (gogoproto.customtype) = "MetadataAddress"]; diff --git a/proto/provenance/metadata/v1/specification.proto b/proto/provenance/metadata/v1/specification.proto index f0ee857641..6ef6bd1c59 100644 --- a/proto/provenance/metadata/v1/specification.proto +++ b/proto/provenance/metadata/v1/specification.proto @@ -35,8 +35,6 @@ option java_multiple_files = true; // ScopeSpecification defines the required parties, resources, conditions, and consideration outputs for a contract message ScopeSpecification { - option (gogoproto.goproto_stringer) = false; - // unique identifier for this specification on chain bytes specification_id = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "MetadataAddress"]; // General information about this scope specification. @@ -51,8 +49,6 @@ message ScopeSpecification { // ContractSpecification defines the required parties, resources, conditions, and consideration outputs for a contract message ContractSpecification { - option (gogoproto.goproto_stringer) = false; - // unique identifier for this specification on chain bytes specification_id = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "MetadataAddress"]; // Description information for this contract specification @@ -75,8 +71,6 @@ message ContractSpecification { // RecordSpecification defines the specification for a Record including allowed/required inputs/outputs message RecordSpecification { - option (gogoproto.goproto_stringer) = false; - // unique identifier for this specification on chain bytes specification_id = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "MetadataAddress"]; // Name of Record that will be created when this specification is used @@ -94,8 +88,6 @@ message RecordSpecification { // InputSpecification defines a name, type_name, and source reference (either on or off chain) to define an input // parameter message InputSpecification { - option (gogoproto.goproto_stringer) = false; - // name for this input string name = 1; // a type_name (typically a proto name or class_name) @@ -111,8 +103,6 @@ message InputSpecification { // Description holds general information that is handy to associate with a structure. message Description { - option (gogoproto.goproto_stringer) = false; - // A Name for this thing. string name = 1; // A description of this thing. diff --git a/x/attribute/types/attribute.pb.go b/x/attribute/types/attribute.pb.go index 9b624e2198..255650656a 100644 --- a/x/attribute/types/attribute.pb.go +++ b/x/attribute/types/attribute.pb.go @@ -89,8 +89,9 @@ type Params struct { MaxValueLength uint32 `protobuf:"varint,1,opt,name=max_value_length,json=maxValueLength,proto3" json:"max_value_length,omitempty"` } -func (m *Params) Reset() { *m = Params{} } -func (*Params) ProtoMessage() {} +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { return fileDescriptor_14fe7eb43c711f5e, []int{0} } @@ -750,60 +751,60 @@ func init() { } var fileDescriptor_14fe7eb43c711f5e = []byte{ - // 839 bytes of a gzipped FileDescriptorProto + // 836 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x4d, 0x6f, 0xdb, 0x46, 0x10, 0xd5, 0x5a, 0x1f, 0xb6, 0xc6, 0xb6, 0xc2, 0x6c, 0x1c, 0x44, 0x20, 0x5a, 0x89, 0x51, 0xe0, - 0x56, 0x28, 0x10, 0x11, 0x49, 0x50, 0xa0, 0xe8, 0xcd, 0xaa, 0xe4, 0x56, 0x45, 0x62, 0x0b, 0x14, - 0x55, 0x20, 0xb9, 0x10, 0x6b, 0x71, 0x43, 0x11, 0x10, 0x3f, 0x40, 0xae, 0x54, 0xfb, 0x2f, 0xe8, - 0x94, 0x63, 0x2f, 0x42, 0xdb, 0x73, 0xff, 0x48, 0x8e, 0x39, 0x16, 0x3d, 0xa4, 0x85, 0x7d, 0xeb, - 0xb5, 0x7f, 0xa0, 0xd0, 0xae, 0xf8, 0x21, 0x99, 0x4a, 0x51, 0xe4, 0xb6, 0x33, 0xfb, 0x38, 0xf3, - 0xde, 0x9b, 0x5d, 0x2e, 0x7c, 0xee, 0x07, 0xde, 0x8c, 0xba, 0xc4, 0x1d, 0x51, 0x95, 0x30, 0x16, - 0xd8, 0x17, 0x53, 0x46, 0xd5, 0xd9, 0x93, 0x24, 0x68, 0xf9, 0x81, 0xc7, 0x3c, 0xfc, 0x20, 0x01, - 0xb6, 0x92, 0xbd, 0xd9, 0x13, 0xf9, 0xc8, 0xf2, 0x2c, 0x8f, 0x63, 0xd4, 0xe5, 0x4a, 0xc0, 0xe5, - 0xba, 0xe5, 0x79, 0xd6, 0x84, 0xaa, 0x3c, 0xba, 0x98, 0xbe, 0x56, 0x99, 0xed, 0xd0, 0x90, 0x11, - 0xc7, 0x17, 0x80, 0xc6, 0x57, 0x50, 0xea, 0x93, 0x80, 0x38, 0x21, 0x6e, 0x82, 0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c4, 0x9f, 0x94, 0xe7, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0xcb, 0xe7, 0xbe, 0x13, + 0xca, 0x07, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { diff --git a/x/attribute/types/params.go b/x/attribute/types/params.go index e0bed97c12..a22cb192bd 100644 --- a/x/attribute/types/params.go +++ b/x/attribute/types/params.go @@ -3,8 +3,6 @@ package types import ( "fmt" - "gopkg.in/yaml.v2" - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) @@ -19,12 +17,6 @@ var ( ParamStoreKeyMaxValueLength = []byte("MaxValueLength") ) -// String implements stringer interface -func (params Params) String() string { - out, _ := yaml.Marshal(params) - return string(out) -} - // ParamKeyTable for slashing module // TODO: remove with the umber (v1.19.x) handlers. func ParamKeyTable() paramtypes.KeyTable { diff --git a/x/marker/types/marker.pb.go b/x/marker/types/marker.pb.go index 0b548bc27f..39e0af4322 100644 --- a/x/marker/types/marker.pb.go +++ b/x/marker/types/marker.pb.go @@ -103,7 +103,7 @@ func (MarkerStatus) EnumDescriptor() ([]byte, []int) { // Params defines the set of params for the account module. type Params struct { // Deprecated: Prefer to use `max_supply` instead. Maximum amount of supply to allow a marker to be created with - MaxTotalSupply uint64 `protobuf:"varint,1,opt,name=max_total_supply,json=maxTotalSupply,proto3,customtype=uint64" json:"max_total_supply"` // Deprecated: Do not use. + MaxTotalSupply uint64 `protobuf:"varint,1,opt,name=max_total_supply,json=maxTotalSupply,proto3" json:"max_total_supply,omitempty"` // Deprecated: Do not use. // indicates if governance based controls of markers is allowed. EnableGovernance bool `protobuf:"varint,2,opt,name=enable_governance,json=enableGovernance,proto3" json:"enable_governance,omitempty"` // a regular expression used to validate marker denom values from normal create requests (governance @@ -113,8 +113,9 @@ type Params struct { MaxSupply cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=max_supply,json=maxSupply,proto3,customtype=cosmossdk.io/math.Int" json:"max_supply"` } -func (m *Params) Reset() { *m = Params{} } -func (*Params) ProtoMessage() {} +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { return fileDescriptor_f7e2c25c71db7f99, []int{0} } @@ -145,6 +146,14 @@ func (m *Params) XXX_DiscardUnknown() { var xxx_messageInfo_Params proto.InternalMessageInfo +// Deprecated: Do not use. +func (m *Params) GetMaxTotalSupply() uint64 { + if m != nil { + return m.MaxTotalSupply + } + return 0 +} + func (m *Params) GetEnableGovernance() bool { if m != nil { return m.EnableGovernance @@ -1273,104 +1282,136 @@ func init() { func init() { proto.RegisterFile("provenance/marker/v1/marker.proto", fileDescriptor_f7e2c25c71db7f99) } var fileDescriptor_f7e2c25c71db7f99 = []byte{ - // 1510 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcd, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0x26, 0x8e, 0x93, 0x8c, 0x13, 0xd7, 0x9d, 0xb8, 0xa9, 0x6b, 0x54, 0xc7, 0x35, 0x85, - 0x86, 0xa2, 0xda, 0x4d, 0xa0, 0x08, 0x45, 0x5c, 0xfc, 0x95, 0x62, 0xd1, 0x7c, 0xb0, 0x76, 0x8a, - 0x5a, 0x21, 0xad, 0xc6, 0xbb, 0x13, 0x67, 0x95, 0xdd, 0x1d, 0xb3, 0x33, 0xeb, 0x26, 0x88, 0x73, - 0x55, 0xe5, 0xd4, 0x23, 0x1c, 0x22, 0x55, 0x82, 0x03, 0x12, 0x57, 0xce, 0x9c, 0x2b, 0x4e, 0x3d, - 0x22, 0x0e, 0x15, 0x6a, 0x2f, 0x1c, 0x10, 0x17, 0xfe, 0x01, 0x34, 0x1f, 0x5e, 0xaf, 0x1b, 0xb7, - 0x45, 0x0a, 0xbd, 0xed, 0xfb, 0x9c, 0xf7, 0xde, 0xfc, 0xde, 0xbc, 0xb7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fd, 0xc8, 0x4c, 0x5b, 0x42, 0x53, 0x57, 0x16, 0x30, 0x03, - 0xa6, 0x44, 0xdd, 0xb3, 0x53, 0x22, 0x46, 0x49, 0xc0, 0x1b, 0x20, 0xa1, 0x8a, 0x9b, 0xf8, 0x2f, - 0xc5, 0x55, 0xca, 0xb0, 0x02, 0x92, 0xf2, 0x38, 0x83, 0x1d, 0xf6, 0x70, 0x76, 0x5a, 0x44, 0x53, - 0x78, 0x55, 0x34, 0xed, 0xc3, 0x1e, 0xd6, 0x81, 0x1b, 0x7e, 0xc3, 0x4b, 0x60, 0x4e, 0x3a, 0x33, - 0x76, 0xed, 0x03, 0x6c, 0x65, 0x67, 0x04, 0x78, 0x92, 0x92, 0xb7, 0xce, 0x59, 0x1c, 0x37, 0xc8, - 0x71, 0xc8, 0xbd, 0x08, 0xc6, 0xc2, 0x42, 0xce, 0x0a, 0xf5, 0x45, 0x21, 0x1f, 0x42, 0x6d, 0x50, - 0xa8, 0x55, 0x70, 0x4e, 0x5a, 0xee, 0x12, 0xdf, 0xc4, 0x96, 0xc1, 0x7c, 0xe4, 0xd1, 0x5d, 0xec, - 0x67, 0x81, 0x30, 0x5b, 0x10, 0xc2, 0x75, 0x21, 0x6b, 0x2b, 0x11, 0x2c, 0x83, 0x05, 0x1f, 0x7f, - 0x15, 0xd8, 0x3e, 0xb6, 0x0c, 0xc4, 0x98, 0x6f, 0x77, 0x02, 0x86, 0x69, 0x36, 0x59, 0x98, 0x5c, - 0x9e, 0xd5, 0xe1, 0x40, 0x54, 0x09, 0x25, 0x6b, 0xb9, 0x07, 0x8f, 0x96, 0x62, 0x1c, 0x62, 0xbf, - 0xfe, 0x7c, 0x2d, 0x35, 0x82, 0xae, 0x66, 0xf1, 0xa1, 0x06, 0xe6, 0x37, 0x31, 0xab, 0x50, 0x8a, - 0xd9, 0x6d, 0xe4, 0x04, 0x18, 0xde, 0x00, 0x53, 0x3d, 0xdf, 0x36, 0xb1, 0x42, 0xda, 0x85, 0x01, - 0xd2, 0x38, 0x92, 0x42, 0xa4, 0xd5, 0x88, 0xed, 0xa9, 0xab, 0x97, 0xda, 0x70, 0x11, 0x24, 0xfa, - 0xc4, 0x09, 0x5c, 0xd9, 0x5d, 0x71, 0x5d, 0x51, 0xf0, 0x3a, 0xc8, 0x04, 0x3d, 0x0b, 0xf1, 0x76, - 0xea, 0x38, 0xc4, 0xdc, 0x37, 0xf6, 0xb0, 0xdd, 0xdd, 0x63, 0xa2, 0x9f, 0xe2, 0x3a, 0x54, 0xb2, - 0x2a, 0x17, 0x7d, 0x2a, 0x24, 0xc5, 0x9f, 0x34, 0x90, 0x6a, 0xf4, 0xb1, 0xc7, 0x54, 0xa8, 0x96, - 0x35, 0xc4, 0x84, 0x16, 0xc5, 0xc4, 0x22, 0x48, 0x20, 0x57, 0x34, 0x85, 0x84, 0xb3, 0xa2, 0x38, - 0x5f, 0xa1, 0x4f, 0x36, 0xed, 0x00, 0x59, 0x11, 0xfc, 0xc7, 0x47, 0xf1, 0xbf, 0x34, 0x0a, 0x13, - 0x89, 0xbc, 0x28, 0x08, 0xb2, 0x60, 0x1a, 0x59, 0x96, 0x8f, 0x29, 0x95, 0xf8, 0xd3, 0x07, 0x64, - 0xf1, 0x3b, 0x0d, 0x64, 0x46, 0xa3, 0x95, 0xdd, 0x01, 0x1b, 0x20, 0x21, 0x9b, 0x42, 0x15, 0xf2, - 0xca, 0x78, 0xd4, 0x45, 0x6d, 0x85, 0xba, 0x2a, 0xab, 0x32, 0x1e, 0xa6, 0x3e, 0x11, 0x4d, 0xfd, - 0x32, 0x98, 0x47, 0x96, 0x6b, 0x7b, 0x36, 0x65, 0x3e, 0x62, 0xc4, 0x57, 0x99, 0x8e, 0x32, 0x8b, - 0x5b, 0xe0, 0xec, 0x09, 0xf7, 0xd1, 0x54, 0xb4, 0x91, 0x54, 0x60, 0x01, 0x24, 0x7b, 0xd8, 0x77, - 0x6d, 0x4a, 0x6d, 0xe2, 0xd1, 0xec, 0x84, 0x00, 0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8c, 0x20, 0x7c, 0xd2, 0x7b, 0xad, 0xb2, 0x59, - 0x6b, 0xdc, 0xba, 0xd5, 0xa8, 0xa7, 0xe3, 0x51, 0xef, 0x72, 0xbc, 0x38, 0xe3, 0xe2, 0xa9, 0xf3, - 0xb2, 0x6d, 0xdd, 0x69, 0xd4, 0xd3, 0x53, 0x51, 0x8b, 0x3a, 0xaf, 0x1d, 0x39, 0xc4, 0x56, 0x6e, - 0xe6, 0xc1, 0xf7, 0xf9, 0xd8, 0x8f, 0x3f, 0xe4, 0x63, 0xd5, 0xee, 0xe3, 0x67, 0x79, 0xed, 0xc9, - 0xb3, 0xbc, 0xf6, 0xc7, 0xb3, 0xbc, 0xf6, 0xf0, 0x79, 0x3e, 0xf6, 0xe4, 0x79, 0x3e, 0xf6, 0xdb, - 0xf3, 0x7c, 0x0c, 0x9c, 0xb7, 0xc9, 0xd8, 0x36, 0xdb, 0xd6, 0xee, 0xae, 0x76, 0x6d, 0xb6, 0x17, - 0x74, 0x4a, 0x26, 0x71, 0xcb, 0x43, 0x95, 0x6b, 0x36, 0x89, 0x50, 0xe5, 0x83, 0xc1, 0x3f, 0x1e, - 0xdf, 0xab, 0x68, 0x27, 0x21, 0xfe, 0xed, 0x3e, 0xf8, 0x37, 0x00, 0x00, 0xff, 0xff, 0xc0, 0x7d, - 0xcc, 0xaf, 0xaf, 0x0e, 0x00, 0x00, + // 1503 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcd, 0x6f, 0x1b, 0xc7, + 0x15, 0xe7, 0x52, 0x14, 0x25, 0x0d, 0x25, 0x9a, 0x1e, 0xd1, 0x32, 0xcd, 0xc2, 0x14, 0xcd, 0xba, + 0xb5, 0xea, 0xd6, 0xa4, 0xa5, 0xc2, 0x40, 0x61, 0xf4, 0xc2, 0x2f, 0xb9, 0x44, 0xad, 0x8f, 0x2e, + 0x29, 0x17, 0x36,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xb2, + 0x49, 0xc0, 0x29, 0xf1, 0x72, 0x33, 0xc5, 0x99, 0xb5, 0xd4, 0xc6, 0xb5, 0xf2, 0x34, 0x88, 0x94, + 0xab, 0x52, 0xf7, 0x9e, 0xb8, 0x9b, 0x5a, 0x42, 0x64, 0x68, 0x2e, 0x29, 0xf3, 0xba, 0xb2, 0x86, + 0x77, 0x41, 0x92, 0x71, 0xc4, 0x07, 0x4c, 0x96, 0x21, 0xbd, 0x51, 0x9a, 0xee, 0x47, 0x65, 0xda, + 0x96, 0x9a, 0xa6, 0xb6, 0x80, 0x59, 0x30, 0x2b, 0x6b, 0x9e, 0x9b, 0x95, 0x31, 0x2a, 0x02, 0xde, + 0x01, 0x49, 0x5d, 0xd8, 0xe4, 0xaf, 0x29, 0xac, 0x56, 0x86, 0x55, 0x90, 0x52, 0xc7, 0x59, 0xfc, + 0xb8, 0x8f, 0x73, 0x73, 0x32, 0x9a, 0xe2, 0xfb, 0xa2, 0xe9, 0x1c, 0xf7, 0xb1, 0x09, 0xfc, 0xf0, + 0x1b, 0x5e, 0x03, 0x8b, 0xca, 0x99, 0xb5, 0xef, 0x1e, 0x61, 0x27, 0x37, 0x2f, 0x81, 0x93, 0x52, + 0xbc, 0x4d, 0xc1, 0x12, 0x98, 0x41, 0x9e, 0x47, 0x1e, 0x47, 0xf0, 0x15, 0x16, 0x72, 0x41, 0xaa, + 0xaf, 0x48, 0xf9, 0x18, 0x66, 0xa3, 0x42, 0x6d, 0x80, 0x4b, 0xca, 0x72, 0x9f, 0x50, 0x1b, 0x3b, + 0x16, 0xa7, 0x28, 0x60, 0xfb, 0x98, 0xe6, 0x80, 0x34, 0x5b, 0x96, 0xc2, 0x4d, 0x29, 0xeb, 0x68, + 0x11, 0xac, 0x80, 0x65, 0x8a, 0xff, 0x3b, 0x70, 0x29, 0x76, 0x2c, 0xc4, 0x39, 0x75, 0xbb, 0x03, + 0x8e, 0x59, 0x2e, 0x55, 0x9c, 0x59, 0x5b, 0x30, 0xe1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0x25, 0x7d, 0xc2, 0xb0, 0x03, 0x6f, 0x87, 0xe9, 0x6a, 0xfd, 0xcd, 0xd6, + 0x76, 0xf5, 0x7e, 0xeb, 0x91, 0x8c, 0x32, 0x72, 0xc2, 0x68, 0x4c, 0x39, 0xf0, 0x26, 0xc8, 0x4e, + 0x5a, 0x54, 0xeb, 0x9d, 0xd6, 0x83, 0x66, 0x66, 0x26, 0x9f, 0x39, 0x39, 0x2d, 0x2e, 0x2a, 0x75, + 0x39, 0x82, 0xf0, 0x59, 0xef, 0xf5, 0xea, 0x76, 0xbd, 0x79, 0xff, 0x7e, 0xb3, 0x91, 0x49, 0x44, + 0xbd, 0xab, 0xf1, 0xe2, 0x4d, 0x8b, 0xa7, 0x21, 0xca, 0xb6, 0xf3, 0xb0, 0xd9, 0xc8, 0xcc, 0x46, + 0x2d, 0x1a, 0xa2, 0x76, 0xe4, 0x18, 0x3b, 0xf9, 0xf9, 0xa7, 0x9f, 0x15, 0x62, 0x5f, 0x7c, 0x5e, + 0x88, 0xd5, 0x7a, 0x2f, 0x5e, 0x17, 0x8c, 0x97, 0xaf, 0x0b, 0xc6, 0xf7, 0xaf, 0x0b, 0xc6, 0xb3, + 0x37, 0x85, 0xd8, 0xcb, 0x37, 0x85, 0xd8, 0xb7, 0x6f, 0x0a, 0x31, 0x70, 0xd9, 0x25, 0x53, 0xdb, + 0x6c, 0xd7, 0x78, 0xb4, 0xd1, 0x73, 0xf9, 0xc1, 0xa0, 0x5b, 0xb6, 0x89, 0x5f, 0x19, 0xab, 0xdc, + 0x72, 0x49, 0x84, 0xaa, 0x1c, 0x8d, 0xfe, 0xe8, 0xc4, 0x5e, 0xc5, 0xba, 0x49, 0xf9, 0x27, 0xf7, + 0xd7, 0x5f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x1e, 0x92, 0xb4, 0x93, 0x9d, 0x0e, 0x00, 0x00, +} + +func (this *Params) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Params) + if !ok { + that2, ok := that.(Params) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.MaxTotalSupply != that1.MaxTotalSupply { + return false + } + if this.EnableGovernance != that1.EnableGovernance { + return false + } + if this.UnrestrictedDenomRegex != that1.UnrestrictedDenomRegex { + return false + } + if !this.MaxSupply.Equal(that1.MaxSupply) { + return false + } + return true } - func (m *Params) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) diff --git a/x/marker/types/params.go b/x/marker/types/params.go index 354dda0d18..fbdeb47988 100644 --- a/x/marker/types/params.go +++ b/x/marker/types/params.go @@ -5,8 +5,6 @@ import ( "fmt" "regexp" - yaml "gopkg.in/yaml.v2" - sdkmath "cosmossdk.io/math" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" @@ -77,47 +75,6 @@ func DefaultParams() Params { ) } -// String implements the Stringer interface. -func (p Params) String() string { - out, _ := yaml.Marshal(p) - return string(out) -} - -// Equal returns true if the given value is equivalent to the current instance of params -func (p *Params) Equal(that interface{}) bool { - if that == nil { - return p == nil - } - - that1, ok := that.(*Params) - if !ok { - that2, ok := that.(Params) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return p == nil - } else if p == nil { - return false - } - if p.MaxTotalSupply != that1.MaxTotalSupply { - return false - } - if !p.MaxSupply.Equal(that1.MaxSupply) { - return false - } - if p.EnableGovernance != that1.EnableGovernance { - return false - } - if p.UnrestrictedDenomRegex != that1.UnrestrictedDenomRegex { - return false - } - return true -} - func (p Params) Validate() error { errs := []error{ validateEnableGovernance(p.EnableGovernance), diff --git a/x/marker/types/params_test.go b/x/marker/types/params_test.go index 650ec0a72b..dbdfab0275 100644 --- a/x/marker/types/params_test.go +++ b/x/marker/types/params_test.go @@ -41,12 +41,13 @@ func TestDefaultParams(t *testing.T) { } func TestParamString(t *testing.T) { + expected := `max_total_supply:100000000000 ` + + `enable_governance:true ` + + `unrestricted_denom_regex:"[a-zA-Z][a-zA-Z0-9\\-\\.]{2,83}" ` + + `max_supply:"100000000000000000000" ` p := DefaultParams() - require.Equal(t, `maxtotalsupply: 100000000000 -enablegovernance: true -unrestricteddenomregex: '[a-zA-Z][a-zA-Z0-9\-\.]{2,83}' -max_supply: "100000000000000000000" -`, p.String()) + actual := p.String() + require.Equal(t, expected, actual) } func TestParamSetPairs(t *testing.T) { diff --git a/x/metadata/types/metadata.pb.go b/x/metadata/types/metadata.pb.go index d21e9d0eaa..fb823f8883 100644 --- a/x/metadata/types/metadata.pb.go +++ b/x/metadata/types/metadata.pb.go @@ -27,8 +27,9 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Params struct { } -func (m *Params) Reset() { *m = Params{} } -func (*Params) ProtoMessage() {} +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { return fileDescriptor_786fb0ab3f663d79, []int{0} } @@ -560,53 +561,53 @@ func init() { } var fileDescriptor_786fb0ab3f663d79 = []byte{ - // 734 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x96, 0xc1, 0x4e, 0xdb, 0x4a, - 0x14, 0x86, 0xe3, 0xc0, 0x0d, 0xe4, 0x24, 0x21, 0x61, 0x6e, 0x80, 0x5c, 0x74, 0x71, 0x20, 0xe8, - 0x5e, 0x45, 0xa8, 0x24, 0x0a, 0xa5, 0x5d, 0x50, 0x55, 0x15, 0x74, 0x41, 0x51, 0xd5, 0x0a, 0x05, - 0x75, 0x53, 0xa9, 0x42, 0xc6, 0x1e, 0xc0, 0xaa, 0xe2, 0xb1, 0x3c, 0x0e, 0xa2, 0x6f, 0x81, 0xba, - 0xea, 0x92, 0xb7, 0xe8, 0xa6, 0x0f, 0xc0, 0x92, 0x55, 0x55, 0x75, 0x81, 0x2a, 0xd8, 0x74, 0xd1, - 0x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0x8d, 0xb0, 0xfa, 0x42, 0x51, 0x96, 0x63, 0x6f, 0x53, 0x8a, 0x10, 0x8e, - 0xdf, 0xc1, 0x4c, 0xe6, 0xe3, 0x45, 0x33, 0xbd, 0x72, 0xdf, 0x4c, 0x67, 0xdf, 0xd1, 0x3e, 0xb1, - 0x33, 0xb5, 0xad, 0xf7, 0x17, 0xd7, 0xa6, 0x71, 0x79, 0x6d, 0x1a, 0x3f, 0xae, 0x4d, 0xe3, 0xec, - 0xc6, 0xcc, 0x5d, 0xde, 0x98, 0xb9, 0x6f, 0x37, 0x66, 0x0e, 0xfe, 0x71, 0xd9, 0x3d, 0xbd, 0x77, - 0x8d, 0xb7, 0xeb, 0x47, 0x6e, 0x78, 0x3c, 0x3c, 0xe8, 0xd8, 0x6c, 0xd0, 0x55, 0xa1, 0x55, 0x97, - 0xa1, 0x5d, 0xf7, 0x54, 0xfd, 0x46, 0x08, 0x3f, 0xf8, 0x94, 0x1f, 0x14, 0xc4, 0x3f, 0xfc, 0x87, - 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0xad, 0x93, 0x57, 0x6a, 0x47, 0x08, 0x00, 0x00, + // 728 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x96, 0xcf, 0x4e, 0xdb, 0x4a, + 0x14, 0x87, 0xe3, 0xc0, 0x0d, 0xe4, 0xe4, 0x2f, 0x73, 0x03, 0xe4, 0xa2, 0x8b, 0x03, 0x41, 0xf7, + 0x2a, 0x42, 0x25, 0x51, 0x28, 0xed, 0x82, 0xaa, 0xaa, 0xa0, 0x0b, 0x8a, 0xaa, 0x56, 0x28, 0xa8, + 0x9b, 0x4a, 0x15, 0x32, 0xf6, 0x00, 0x56, 0x15, 0x8f, 0xe5, 0x71, 0x10, 0x7d, 0x0b, 0xd4, 0x27, + 0xe8, 0x5b, 0x74, 0xd3, 0x07, 0x60, 0xc9, 0xaa, 0x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a0, 0x11, + 0x56, 0x1f, 0x14, 0x65, 0x39, 0xf6, 0x56, 0x55, 0x84, 0x70, 0xfc, 0x0e, 0x66, 0x33, 0x3f, 0x2f, + 0x9a, 0xe9, 0xd5, 0xfb, 0x66, 0x3a, 0xfb, 0x8e, 0x0e, 0x88, 0x9d, 0xa9, 0x6d, 0xbf, 0xbf, 0xb8, + 0x36, 0x8d, 0xcb, 0x6b, 0xd3, 0xf8, 0x71, 0x6d, 0x1a, 0xe7, 0x37, 0x66, 0xee, 0xf2, 0xc6, 0xcc, + 0x7d, 0xbb, 0x31, 0x73, 0xf0, 0x8f, 0xcb, 0xee, 0xe9, 0xbd, 0x67, 0xbc, 0xdd, 0x38, 0x76, 0xc3, + 0x93, 0xd1, 0x61, 0xd7, 0x66, 0xc3, 0x9e, 0x0a, 0xad, 0xb9, 0x0c, 0xed, 0x7a, 0x67, 0xea, 0xff, + 0x83, 0xf0, 0x83, 0x4f, 0xf9, 0x61, 0x41, 0xfc, 0xb1, 0x7f, 0xf8, 0x3b, 0x00, 0x00, 0xff, 0xff, + 0xea, 0x47, 0x7e, 0x34, 0x43, 0x08, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { diff --git a/x/metadata/types/params.go b/x/metadata/types/params.go index c30977f7d5..298a750240 100644 --- a/x/metadata/types/params.go +++ b/x/metadata/types/params.go @@ -1,8 +1,6 @@ package types import ( - yaml "gopkg.in/yaml.v2" - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) @@ -28,9 +26,3 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { func DefaultParams() Params { return NewParams() } - -// String implements stringer interface -func (p Params) String() string { - out, _ := yaml.Marshal(p) - return string(out) -} diff --git a/x/metadata/types/querier.go b/x/metadata/types/querier.go deleted file mode 100644 index f07b3b5f34..0000000000 --- a/x/metadata/types/querier.go +++ /dev/null @@ -1,85 +0,0 @@ -package types - -import ( - "fmt" - "strings" - - "gopkg.in/yaml.v2" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// query endpoints supported by the auth Querier -const ( - QueryScope = "scope" - QueryOwnership = "ownership" - QueryParams = "params" - QueryScopeSpec = "scopespec" - // Query OS params - QueryOSParams = "os-params" - QueryOSGet = "get-os" - QueryOSGetByURI = "get-os-by-uri" - QueryOSGetByScope = "get-os-by-scope" - QueryOSGetAll = "get-all-os" -) - -// QueryMetadataParams defines the params for queries that support paging (get by scope) -type QueryMetadataParams struct { - Page, Limit int -} - -// NewQueryMetadataParams object -func NewQueryMetadataParams(page, limit int) QueryMetadataParams { - return QueryMetadataParams{page, limit} -} - -// QueryResScope is the result for legacy scope queries. -type QueryResScope struct { - Scope []byte `json:"scope"` -} - -// String implements fmt.Stringer -func (qr QueryResScope) String() string { - return fmt.Sprintf("%X", qr.Scope) -} - -// MarshalYAML returns the YAML representation of a QueryResScope. -func (qr QueryResScope) MarshalYAML() (interface{}, error) { - // Unmarshal protobuf scope - scope := &Scope{} - if err := scope.Unmarshal(qr.Scope); err != nil { - return nil, err - } - bs, err := yaml.Marshal(qr.Scope) - if err != nil { - return nil, err - } - - return string(bs), nil -} - -// QueryResOwnership is the result of a query for scopes associated with a given address -// query: 'custom/metadata/ownership/{address} -type QueryResOwnership struct { - Address sdk.AccAddress `json:"address" yaml:"address"` - ScopeID []string `json:"scope_id" yaml:"scope_id"` -} - -// String representation of the query for address ownership scope IDs. -func (qor QueryResOwnership) String() string { - return fmt.Sprintf("%s - %s", qor.Address.String(), strings.Join(qor.ScopeID, ", ")) -} - -// QueryResScopeSpec is the result of a query for a scope specification. -type QueryResScopeSpec struct { - ScopeSpecification ScopeSpecification `json:"scope_specification" yaml:"scope_specification"` -} - -// NewQueryResScopeSpec creates a new QueryResScopeSpec object. -func NewQueryResScopeSpec( - scopeSpecification ScopeSpecification, -) *QueryResScopeSpec { - return &QueryResScopeSpec{ - ScopeSpecification: scopeSpecification, - } -} diff --git a/x/metadata/types/scope.go b/x/metadata/types/scope.go index 4bce806a61..bcf4bd96d7 100644 --- a/x/metadata/types/scope.go +++ b/x/metadata/types/scope.go @@ -6,8 +6,6 @@ import ( "strings" "time" - "gopkg.in/yaml.v2" - sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -86,12 +84,6 @@ func (s Scope) ValidateOwnersBasic() error { return ValidateOptionalParties(s.RequirePartyRollup, s.Owners) } -// String implements stringer interface -func (s Scope) String() string { - out, _ := yaml.Marshal(s) - return string(out) -} - func (s *Scope) RemoveDataAccess(addresses []string) { newDataAccess := []string{} for _, da := range s.DataAccess { @@ -241,12 +233,6 @@ func (s Session) ValidateBasic() error { return nil } -// String implements stringer interface -func (s Session) String() string { - out, _ := yaml.Marshal(s) - return string(out) -} - // GetAllPartyAddresses gets the addresses of all of the parties. Each address can only appear once in the return value. func (s Session) GetAllPartyAddresses() []string { return GetPartyAddresses(s.Parties) diff --git a/x/metadata/types/scope.pb.go b/x/metadata/types/scope.pb.go index d3db869552..e3f75df312 100644 --- a/x/metadata/types/scope.pb.go +++ b/x/metadata/types/scope.pb.go @@ -116,8 +116,9 @@ type Scope struct { RequirePartyRollup bool `protobuf:"varint,6,opt,name=require_party_rollup,json=requirePartyRollup,proto3" json:"require_party_rollup,omitempty"` } -func (m *Scope) Reset() { *m = Scope{} } -func (*Scope) ProtoMessage() {} +func (m *Scope) Reset() { *m = Scope{} } +func (m *Scope) String() string { return proto.CompactTextString(m) } +func (*Scope) ProtoMessage() {} func (*Scope) Descriptor() ([]byte, []int) { return fileDescriptor_edeea634bfb18aba, []int{0} } @@ -194,8 +195,9 @@ type Session struct { Audit *AuditFields `protobuf:"bytes,99,opt,name=audit,proto3" json:"audit,omitempty"` } -func (m *Session) Reset() { *m = Session{} } -func (*Session) ProtoMessage() {} +func (m *Session) Reset() { *m = Session{} } +func (m *Session) String() string { return proto.CompactTextString(m) } +func (*Session) ProtoMessage() {} func (*Session) Descriptor() ([]byte, []int) { return fileDescriptor_edeea634bfb18aba, []int{1} } @@ -824,78 +826,77 @@ func init() { } var fileDescriptor_edeea634bfb18aba = []byte{ - // 1121 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcd, 0x6e, 0x23, 0xc5, - 0x13, 0xf7, 0xf8, 0xdb, 0x65, 0xef, 0x7f, 0xbd, 0xbd, 0xab, 0xfd, 0x7b, 0x0d, 0x6b, 0x1b, 0xc3, - 0xc1, 0x44, 0x62, 0xbc, 0x31, 0x2c, 0x12, 0x5f, 0x42, 0xf6, 0x26, 0x4b, 0x2c, 0x96, 0xc4, 0x6a, - 0x27, 0x1c, 0xb8, 0x8c, 0xc6, 0x33, 0x1d, 0x7b, 0x14, 0x7b, 0x7a, 0x98, 0xee, 0xf1, 0xc6, 0xf0, - 0x06, 0x39, 0x2d, 0x37, 0x2e, 0x91, 0xe0, 0x19, 0x78, 0x06, 0xa4, 0x3d, 0xee, 0x11, 0x81, 0xb4, - 0xa0, 0xe4, 0xc2, 0x63, 0xa0, 0xee, 0xe9, 0xf1, 0x07, 0x71, 0xa2, 0x44, 0xe2, 0x36, 0x55, 0xf5, - 0xab, 0xae, 0xaa, 0x5f, 0x55, 0x4d, 0x37, 0xd4, 0x3d, 0x9f, 0x4e, 0x89, 0x6b, 0xba, 0x16, 0x69, - 0x4e, 0x08, 0x37, 0x6d, 0x93, 0x9b, 0xcd, 0xe9, 0x66, 0x93, 0x59, 0xd4, 0x23, 0xba, 0xe7, 0x53, - 0x4e, 0xd1, 0xfd, 0x05, 0x46, 0x8f, 0x30, 0xfa, 0x74, 0xb3, 0x5c, 0xb1, 0x28, 0x9b, 0x50, 0xd6, - 0x1c, 0x98, 0x8c, 0x34, 0xa7, 0x9b, 0x03, 0xc2, 0xcd, 0xcd, 0xa6, 0x45, 0x1d, 0x37, 0xf4, 0x2b, - 0xdf, 0x1b, 0xd2, 0x21, 0x95, 0x9f, 0x4d, 0xf1, 0xa5, 0xb4, 0xd5, 0x21, 0xa5, 0xc3, 0x31, 0x69,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5, 0x23, 0x91, 0xbe, - 0xd9, 0x48, 0x28, 0xaa, 0xbf, 0x87, 0x8c, 0x2a, 0x16, 0x95, 0x21, 0x13, 0xed, 0x81, 0x64, 0x7b, - 0x27, 0x86, 0x23, 0x05, 0xba, 0x07, 0xc9, 0x91, 0xc9, 0x46, 0x92, 0x6c, 0x61, 0x90, 0xd2, 0xbc, - 0x39, 0x89, 0xa5, 0xe6, 0xdc, 0x87, 0xf4, 0x84, 0xf0, 0x11, 0xb5, 0xd5, 0xb0, 0x28, 0x29, 0x0c, - 0xd7, 0x29, 0x00, 0x28, 0x32, 0x0d, 0xc7, 0xae, 0xff, 0xa1, 0x41, 0x7e, 0x89, 0xaa, 0xb5, 0xcd, - 0x6e, 0x41, 0xce, 0x97, 0x90, 0x45, 0xaf, 0xef, 0xae, 0xa9, 0x6f, 0x27, 0x86, 0xb3, 0x21, 0xae, - 0x6b, 0xcf, 0xb3, 0x4d, 0xac, 0x64, 0xfb, 0x06, 0xe4, 0xf8, 0xcc, 0x23, 0xc6, 0xd2, 0x24, 0x67, - 0x85, 0x62, 0x57, 0x84, 0x69, 0x43, 0x9a, 0x71, 0x93, 0x07, 0xe1, 0x3f, 0xe0, 0x7f, 0xad, 0x77, - 0xaf, 0xd1, 0xda, 0xbe, 0x74, 0xc0, 0xca, 0x51, 0x55, 0x98, 0x85, 0x34, 0xa3, 0x81, 0x6f, 0x91, - 0xfa, 0x21, 0x14, 0x96, 0x7b, 0x28, 0xaa, 0x93, 0x59, 0xa9, 0xea, 0x64, 0x4e, 0x9f, 0xce, 0xc3, - 0xc6, 0x65, 0xd8, 0x2b, 0xa6, 0x81, 0x05, 0xe3, 0xb5, 0x11, 0xeb, 0xdf, 0x41, 0x4a, 0x2e, 0xad, - 0xd8, 0xc8, 0x95, 0x06, 0x2e, 0xda, 0xf7, 0x18, 0x92, 0x3e, 0x1d, 0x13, 0x15, 0xe4, 0xad, 0x2b, - 0x77, 0x7f, 0x7f, 0xe6, 0x11, 0x2c, 0xe1, 0xa8, 0x0c, 0x59, 0xea, 0x89, 0x71, 0x31, 0xc7, 0x92, - 0xcb, 0x2c, 0x9e, 0xcb, 0x2a, 0xf6, 0x0f, 0x71, 0xc8, 0x2f, 0xad, 0x31, 0xfa, 0x02, 0x0a, 0x96, - 0x4f, 0x4c, 0x4e, 0x6c, 0xc3, 0x36, 0x79, 0xd8, 0xc9, 0x7c, 0xab, 0xac, 0x87, 0x97, 0x93, 0x1e, - 0x5d, 0x4e, 0xfa, 0x7e, 0x74, 0x7b, 0x75, 0xb2, 0x62, 0x60, 0x5f, 0xfc, 0x59, 0xd5, 0x70, 0x5e, - 0x79, 0x6e, 0x99, 0x9c, 0xa0, 0x87, 0x00, 0xd1, 0x41, 0x83, 0x59, 0x38, 0x76, 0x38, 0xa7, 0x34, - 0x9d, 0x99, 0x88, 0x13, 0x78, 0xf6, 0x22, 0x4e, 0xe2, 0x26, 0x71, 0x94, 0x67, 0x14, 0x27, 0x3a, - 0x68, 0x30, 0x53, 0x53, 0x91, 0x53, 0x9a, 0x8e, 0xa4, 0x74, 0x4a, 0x7c, 0xf1, 0xff, 0x90, 0x73, - 0x71, 0x0b, 0x47, 0xa2, 0xb0, 0x4c, 0x08, 0x63, 0xe6, 0x90, 0xc8, 0xcd, 0xcb, 0xe1, 0x48, 0xac, - 0x1f, 0xc3, 0xad, 0x5d, 0xc2, 0xdb, 0x8c, 0x11, 0xfe, 0xb5, 0xb8, 0x48, 0xd0, 0x63, 0x48, 0x79, - 0xbe, 0x63, 0x45, 0x6c, 0x3c, 0xd0, 0xc3, 0x17, 0x80, 0x2e, 0x5e, 0x00, 0xba, 0x7a, 0x01, 0xe8, - 0x4f, 0xa8, 0xe3, 0xaa, 0x35, 0x0f, 0xd1, 0xe2, 0xce, 0x99, 0xa7, 0x36, 0xa6, 0xd6, 0x91, 0x31, - 0x22, 0xce, 0x70, 0xc4, 0x25, 0x19, 0x49, 0x8c, 0xa2, 0x24, 0x85, 0x69, 0x47, 0x5a, 0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 0x39, 0x74, 0x49, 0x6a, 0x1e, 0x2f, 0x9e, 0x53, 0xe2, 0x7f, 0xc2, 0x06, 0x69, - 0x39, 0x7f, 0xef, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0xe1, 0x09, 0x9a, 0x05, 0x27, 0x0a, 0x00, - 0x00, + // 1118 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4d, 0x6f, 0x23, 0x45, + 0x13, 0xf6, 0xf8, 0xdb, 0x65, 0xef, 0xbb, 0xde, 0xde, 0xd5, 0xbe, 0x5e, 0xc3, 0xda, 0xc6, 0x70, + 0x30, 0x91, 0x18, 0x6f, 0x0c, 0x8b, 0xc4, 0x97, 0x90, 0xbd, 0xc9, 0x12, 0x8b, 0x25, 0xb1, 0xda, + 0x09, 0x07, 0x2e, 0xa3, 0xf1, 0x4c, 0xc7, 0x1e, 0xc5, 0x9e, 0x1e, 0xa6, 0x7b, 0xbc, 0x31, 0xfc, + 0x83, 0x9c, 0x96, 0x1b, 0x97, 0x48, 0xf0, 0x03, 0xf8, 0x0d, 0x5c, 0xf7, 0xb8, 0x47, 0x04, 0xd2, + 0x82, 0x92, 0x0b, 0x3f, 0x03, 0x75, 0x4f, 0x8f, 0x3f, 0x88, 0x13, 0x25, 0x12, 0xb7, 0xe9, 0xaa, + 0xa7, 0xba, 0xaa, 0x9e, 0x7a, 0xca, 0x6d, 0xa8, 0x7b, 0x3e, 0x9d, 0x12, 0xd7, 0x74, 0x2d, 0xd2, + 0x9c, 0x10, 0x6e, 0xda, 0x26, 0x37, 0x9b, 0xd3, 0xcd, 0x26, 0xb3, 0xa8, 0x47, 0x74, 0xcf, 0xa7, + 0x9c, 0xa2, 0xfb, 0x0b, 0x8c, 0x1e, 0x61, 0xf4, 0xe9, 0x66, 0xb9, 0x62, 0x51, 0x36, 0xa1, 0xac, + 0x39, 0x30, 0x19, 0x69, 0x4e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 0x12, 0xfb, 0xed, 0xbc, 0x12, 0x83, 0x07, 0x0e, 0xbd, 0x64, 0x1f, + 0x7a, 0xda, 0x37, 0x1f, 0x0c, 0x1d, 0x3e, 0x0a, 0x06, 0xba, 0x45, 0x27, 0xcd, 0x05, 0xe8, 0x3d, + 0x87, 0x2e, 0x9d, 0x9a, 0xc7, 0x8b, 0xbf, 0x50, 0xe2, 0xf7, 0x84, 0x0d, 0xd2, 0x52, 0x7f, 0xef, + 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0x0e, 0xcc, 0xe3, 0x58, 0x1b, 0x0a, 0x00, 0x00, } func (m *Scope) Marshal() (dAtA []byte, err error) { diff --git a/x/metadata/types/specification.go b/x/metadata/types/specification.go index 292dfdce18..e4b7d04ec5 100644 --- a/x/metadata/types/specification.go +++ b/x/metadata/types/specification.go @@ -6,8 +6,6 @@ import ( "regexp" "strings" - "gopkg.in/yaml.v2" - sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -96,13 +94,7 @@ func (s ScopeSpecification) ValidateBasic() error { return nil } -// String implements stringer interface -func (s ScopeSpecification) String() string { - out, _ := yaml.Marshal(s) - return string(out) -} - -// NewScopeSpecification creates a new ScopeSpecification instance. +// NewContractSpecification creates a new ContractSpecification instance. func NewContractSpecification( specificationID MetadataAddress, description *Description, @@ -183,12 +175,6 @@ func (s ContractSpecification) ValidateBasic() error { return nil } -// String implements stringer interface -func (s ContractSpecification) String() string { - out, _ := yaml.Marshal(s) - return string(out) -} - // NewRecordSpecification creates a new RecordSpecification instance func NewRecordSpecification( specificationID MetadataAddress, @@ -254,12 +240,6 @@ func (s RecordSpecification) ValidateBasic() error { return nil } -// String implements stringer interface -func (s RecordSpecification) String() string { - out, _ := yaml.Marshal(s) - return string(out) -} - // NewInputSpecification creates a new InputSpecification instance func NewInputSpecification( name string, @@ -322,12 +302,6 @@ func (s InputSpecification) ValidateBasic() error { return nil } -// String implements stringer interface -func (s InputSpecification) String() string { - out, _ := yaml.Marshal(s) - return string(out) -} - // NewDescription creates a new Description instance. func NewDescription(name, description, websiteURL, iconURL string) *Description { return &Description{ @@ -366,12 +340,6 @@ func (d Description) ValidateBasic(path string) error { return nil } -// String implements stringer interface -func (d Description) String() string { - out, _ := yaml.Marshal(d) - return string(out) -} - func (x PartyType) IsValid() bool { _, ok := PartyType_name[int32(x)] return ok diff --git a/x/metadata/types/specification.pb.go b/x/metadata/types/specification.pb.go index 463e39580f..ed8e3cbc88 100644 --- a/x/metadata/types/specification.pb.go +++ b/x/metadata/types/specification.pb.go @@ -139,8 +139,9 @@ type ScopeSpecification struct { ContractSpecIds []MetadataAddress `protobuf:"bytes,5,rep,name=contract_spec_ids,json=contractSpecIds,proto3,customtype=MetadataAddress" json:"contract_spec_ids"` } -func (m *ScopeSpecification) Reset() { *m = ScopeSpecification{} } -func (*ScopeSpecification) ProtoMessage() {} +func (m *ScopeSpecification) Reset() { *m = ScopeSpecification{} } +func (m *ScopeSpecification) String() string { return proto.CompactTextString(m) } +func (*ScopeSpecification) ProtoMessage() {} func (*ScopeSpecification) Descriptor() ([]byte, []int) { return fileDescriptor_1e2d1042057ea889, []int{0} } @@ -214,8 +215,9 @@ type ContractSpecification struct { ClassName string `protobuf:"bytes,7,opt,name=class_name,json=className,proto3" json:"class_name,omitempty"` } -func (m *ContractSpecification) Reset() { *m = ContractSpecification{} } -func (*ContractSpecification) ProtoMessage() {} +func (m *ContractSpecification) Reset() { *m = ContractSpecification{} } +func (m *ContractSpecification) String() string { return proto.CompactTextString(m) } +func (*ContractSpecification) ProtoMessage() {} func (*ContractSpecification) Descriptor() ([]byte, []int) { return fileDescriptor_1e2d1042057ea889, []int{1} } @@ -335,8 +337,9 @@ type RecordSpecification struct { ResponsibleParties []PartyType `protobuf:"varint,6,rep,packed,name=responsible_parties,json=responsibleParties,proto3,enum=provenance.metadata.v1.PartyType" json:"responsible_parties,omitempty"` } -func (m *RecordSpecification) Reset() { *m = RecordSpecification{} } -func (*RecordSpecification) ProtoMessage() {} +func (m *RecordSpecification) Reset() { *m = RecordSpecification{} } +func (m *RecordSpecification) String() string { return proto.CompactTextString(m) } +func (*RecordSpecification) ProtoMessage() {} func (*RecordSpecification) Descriptor() ([]byte, []int) { return fileDescriptor_1e2d1042057ea889, []int{2} } @@ -418,8 +421,9 @@ type InputSpecification struct { Source isInputSpecification_Source `protobuf_oneof:"source"` } -func (m *InputSpecification) Reset() { *m = InputSpecification{} } -func (*InputSpecification) ProtoMessage() {} +func (m *InputSpecification) Reset() { *m = InputSpecification{} } +func (m *InputSpecification) String() string { return proto.CompactTextString(m) } +func (*InputSpecification) ProtoMessage() {} func (*InputSpecification) Descriptor() ([]byte, []int) { return fileDescriptor_1e2d1042057ea889, []int{3} } @@ -514,8 +518,9 @@ type Description struct { IconUrl string `protobuf:"bytes,5,opt,name=icon_url,json=iconUrl,proto3" json:"icon_url,omitempty"` } -func (m *Description) Reset() { *m = Description{} } -func (*Description) ProtoMessage() {} +func (m *Description) Reset() { *m = Description{} } +func (m *Description) String() string { return proto.CompactTextString(m) } +func (*Description) ProtoMessage() {} func (*Description) Descriptor() ([]byte, []int) { return fileDescriptor_1e2d1042057ea889, []int{4} } @@ -589,63 +594,62 @@ func init() { } var fileDescriptor_1e2d1042057ea889 = []byte{ - // 893 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x41, 0x6f, 0xe3, 0x44, - 0x14, 0x8e, 0x93, 0x34, 0x4d, 0x5e, 0x50, 0x6b, 0xa6, 0xdd, 0xae, 0xbb, 0x0b, 0x49, 0x28, 0x12, - 0x44, 0x95, 0x9a, 0xa8, 0x81, 0x13, 0x37, 0x27, 0x71, 0xb7, 0x23, 0x65, 0xed, 0x68, 0xe2, 0x14, - 0x2d, 0x17, 0xcb, 0xb5, 0x67, 0x5b, 0x6b, 0x13, 0x8f, 0xe5, 0x71, 0xb2, 0xf4, 0x07, 0x70, 0xe3, - 0xc0,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xee, 0x90, 0x18, 0x67, 0x9a, 0xae, 0xea, 0x3d, - 0x4d, 0x2e, 0xaf, 0x40, 0x3d, 0x43, 0x37, 0x89, 0x31, 0x18, 0x68, 0x44, 0x86, 0x95, 0x73, 0xce, - 0xd4, 0x01, 0xee, 0x8b, 0x19, 0xab, 0xdd, 0x57, 0x6f, 0x6e, 0x6a, 0xd2, 0xdb, 0x9b, 0x9a, 0xf4, - 0xc7, 0x4d, 0x4d, 0xfa, 0xe1, 0xb6, 0x96, 0x7b, 0x7b, 0x5b, 0xcb, 0xfd, 0x76, 0x5b, 0xcb, 0xc1, - 0xbe, 0xc7, 0x1e, 0x78, 0x3a, 0x43, 0xe9, 0x9b, 0x2f, 0x33, 0x9f, 0xc3, 0x05, 0xe9, 0xc8, 0x63, - 0x99, 0x5d, 0xfb, 0xdb, 0xc5, 0x8f, 0x03, 0xf1, 0x81, 0x3c, 0x2f, 0x89, 0x7f, 0xf2, 0x5f, 0xfc, - 0x13, 0x00, 0x00, 0xff, 0xff, 0x56, 0x52, 0x70, 0xc7, 0x40, 0x08, 0x00, 0x00, + // 877 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0x4f, 0x6f, 0xe2, 0xc6, + 0x1b, 0xc6, 0x40, 0x08, 0xbc, 0xfc, 0x94, 0xf8, 0x37, 0xc9, 0x66, 0x9d, 0xdd, 0x16, 0x68, 0x2a, + 0xb5, 0x28, 0x52, 0x40, 0xa1, 0xfd, 0x02, 0x06, 0x9c, 0xcd, 0x48, 0xac, 0x8d, 0xc6, 0x26, 0xd5, + 0xf6, 0x62, 0x39, 0xf6, 0x6c, 0x62, 0x2d, 0x78, 0x2c, 0x8f, 0x61, 0x9b, 0x53, 0xbf, 0x40, 0x0f, + 0xbd, 0xf6, 0x0b, 0xf4, 0xd8, 0xcf, 0xb1, 0xc7, 0x3d, 0x56, 0xad, 0x14, 0x55, 0xc9,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x0d, 0xe9, 0xfd, 0x5d, 0x43, 0xfa, + 0xed, 0xae, 0x21, 0x7d, 0x7f, 0xdf, 0x28, 0xbc, 0xbf, 0x6f, 0x14, 0x7e, 0xbe, 0x6f, 0x14, 0xe0, + 0xd0, 0x67, 0x8f, 0xdc, 0x93, 0xb1, 0xf4, 0xf5, 0x97, 0xb9, 0x7f, 0xbd, 0x25, 0xe9, 0xc4, 0x67, + 0xb9, 0xb7, 0xee, 0x37, 0xcb, 0xaf, 0xbf, 0xf8, 0x1f, 0xbc, 0xac, 0x88, 0xaf, 0xf8, 0x17, 0x7f, + 0x06, 0x00, 0x00, 0xff, 0xff, 0xd2, 0xfd, 0x6f, 0x30, 0x21, 0x08, 0x00, 0x00, } func (m *ScopeSpecification) Marshal() (dAtA []byte, err error) { diff --git a/x/name/keeper/keeper_test.go b/x/name/keeper/keeper_test.go index e0ca1ae18c..d91d9e4e40 100644 --- a/x/name/keeper/keeper_test.go +++ b/x/name/keeper/keeper_test.go @@ -10,10 +10,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - "gopkg.in/yaml.v2" + "sigs.k8s.io/yaml" "cosmossdk.io/log" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -30,6 +31,7 @@ type KeeperTestSuite struct { app *app.App ctx sdk.Context + cdc *codec.ProtoCodec pubkey1 cryptotypes.PubKey user1 string @@ -48,6 +50,7 @@ func TestKeeperTestSuite(t *testing.T) { func (s *KeeperTestSuite) SetupTest() { s.app = app.Setup(s.T()) + s.cdc = codec.NewProtoCodec(s.app.GetEncodingConfig().InterfaceRegistry) s.ctx = s.app.BaseApp.NewContext(false) s.pubkey1 = secp256k1.GenPrivKey().PubKey() s.user1Addr = sdk.AccAddress(s.pubkey1.Address()) @@ -87,28 +90,30 @@ func (s *KeeperTestSuite) TestSetup() { s.Require().Equal(uint32(16), p.MaxSegmentLength) }) - expOut := fmt.Sprintf(`params: - maxsegmentlength: 16 - minsegmentlength: 2 - maxnamelevels: 16 - allowunrestrictednames: false -bindings: -- name: name - address: %[1]s + expOut := fmt.Sprintf(`bindings: +- address: %[1]s + name: name restricted: false -- name: example.name - address: %[1]s +- address: %[1]s + name: example.name restricted: false -- name: %[2]s - address: %[3]s +- address: %[3]s + name: %[2]s restricted: true +params: + allow_unrestricted_names: false + max_name_levels: 16 + max_segment_length: 16 + min_segment_length: 2 `, s.user1Addr.String(), attrtypes.AccountDataName, authtypes.NewModuleAddress(attrtypes.ModuleName).String()) gen := s.app.NameKeeper.ExportGenesis(s.ctx) - out, err := yaml.Marshal(gen) - s.Require().NoError(err) - s.Require().Equal(expOut, string(out)) + genJSON, err := s.cdc.MarshalJSON(gen) + s.Require().NoError(err, "MarshalJSON name genesis") + genYAML, err := yaml.JSONToYAML(genJSON) + s.Require().NoError(err, "JSONToYAML name genesis") + s.Require().Equal(expOut, string(genYAML)) } func (s *KeeperTestSuite) TestNameNormalization() {