diff --git a/indexer/packages/v4-protos/src/codegen/dydxprotocol/vault/params.ts b/indexer/packages/v4-protos/src/codegen/dydxprotocol/vault/params.ts index 85118c1e485..2d3e279da0d 100644 --- a/indexer/packages/v4-protos/src/codegen/dydxprotocol/vault/params.ts +++ b/indexer/packages/v4-protos/src/codegen/dydxprotocol/vault/params.ts @@ -94,12 +94,38 @@ export interface VaultParamsSDKType { /** OperatorParams stores parameters regarding megavault operator. */ export interface OperatorParams { + /** Address of the operator. */ operator: string; + /** Metadata of the operator. */ + + metadata?: OperatorMetadata; } /** OperatorParams stores parameters regarding megavault operator. */ export interface OperatorParamsSDKType { + /** Address of the operator. */ operator: string; + /** Metadata of the operator. */ + + metadata?: OperatorMetadataSDKType; +} +/** OperatorMetadata stores metadata regarding megavault operator. */ + +export interface OperatorMetadata { + /** Name of the operator. */ + name: string; + /** Description of the operator. */ + + description: string; +} +/** OperatorMetadata stores metadata regarding megavault operator. */ + +export interface OperatorMetadataSDKType { + /** Name of the operator. */ + name: string; + /** Description of the operator. */ + + description: string; } /** * Deprecated: Params stores `x/vault` parameters. @@ -342,7 +368,8 @@ export const VaultParams = { function createBaseOperatorParams(): OperatorParams { return { - operator: "" + operator: "", + metadata: undefined }; } @@ -352,6 +379,10 @@ export const OperatorParams = { writer.uint32(10).string(message.operator); } + if (message.metadata !== undefined) { + OperatorMetadata.encode(message.metadata, writer.uint32(18).fork()).ldelim(); + } + return writer; }, @@ -368,6 +399,10 @@ export const OperatorParams = { message.operator = reader.string(); break; + case 2: + message.metadata = OperatorMetadata.decode(reader, reader.uint32()); + break; + default: reader.skipType(tag & 7); break; @@ -380,6 +415,62 @@ export const OperatorParams = { fromPartial(object: DeepPartial): OperatorParams { const message = createBaseOperatorParams(); message.operator = object.operator ?? ""; + message.metadata = object.metadata !== undefined && object.metadata !== null ? OperatorMetadata.fromPartial(object.metadata) : undefined; + return message; + } + +}; + +function createBaseOperatorMetadata(): OperatorMetadata { + return { + name: "", + description: "" + }; +} + +export const OperatorMetadata = { + encode(message: OperatorMetadata, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + + if (message.description !== "") { + writer.uint32(18).string(message.description); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): OperatorMetadata { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseOperatorMetadata(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + + case 2: + message.description = reader.string(); + break; + + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromPartial(object: DeepPartial): OperatorMetadata { + const message = createBaseOperatorMetadata(); + message.name = object.name ?? ""; + message.description = object.description ?? ""; return message; } diff --git a/proto/dydxprotocol/vault/params.proto b/proto/dydxprotocol/vault/params.proto index f0f16fb714b..002cc98b3e8 100644 --- a/proto/dydxprotocol/vault/params.proto +++ b/proto/dydxprotocol/vault/params.proto @@ -51,7 +51,18 @@ message VaultParams { // OperatorParams stores parameters regarding megavault operator. message OperatorParams { + // Address of the operator. string operator = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // Metadata of the operator. + OperatorMetadata metadata = 2 [ (gogoproto.nullable) = false ]; +} + +// OperatorMetadata stores metadata regarding megavault operator. +message OperatorMetadata { + // Name of the operator. + string name = 1; + // Description of the operator. + string description = 2; } // Deprecated: Params stores `x/vault` parameters. diff --git a/protocol/app/testdata/default_genesis_state.json b/protocol/app/testdata/default_genesis_state.json index 0263da539bb..598d1dbc988 100644 --- a/protocol/app/testdata/default_genesis_state.json +++ b/protocol/app/testdata/default_genesis_state.json @@ -528,7 +528,11 @@ "activation_threshold_quote_quantums": "1000000000" }, "operator_params": { - "operator": "dydx10d07y265gmmuvt4z0w9aw880jnsr700jnmapky" + "operator": "dydx10d07y265gmmuvt4z0w9aw880jnsr700jnmapky", + "metadata": { + "name": "Governance", + "description": "Governance Module Account" + } }, "owner_shares": [], "total_shares": { diff --git a/protocol/scripts/genesis/sample_pregenesis.json b/protocol/scripts/genesis/sample_pregenesis.json index 21ebb6f93d7..b909f9ffc98 100644 --- a/protocol/scripts/genesis/sample_pregenesis.json +++ b/protocol/scripts/genesis/sample_pregenesis.json @@ -3972,6 +3972,10 @@ "spread_min_ppm": 3000 }, "operator_params": { + "metadata": { + "description": "Governance Module Account", + "name": "Governance" + }, "operator": "dydx10d07y265gmmuvt4z0w9aw880jnsr700jnmapky" }, "owner_shares": [ diff --git a/protocol/testing/genesis.sh b/protocol/testing/genesis.sh index bf7a99cf2cb..0007ebff2db 100755 --- a/protocol/testing/genesis.sh +++ b/protocol/testing/genesis.sh @@ -2273,6 +2273,8 @@ function edit_genesis() { dasel put -t int -f "$GENESIS" ".app_state.vault.default_quoting_params.spread_min_ppm" -v '3000' # Set operator params. dasel put -t string -f "$GENESIS" ".app_state.vault.operator_params.operator" -v 'dydx10d07y265gmmuvt4z0w9aw880jnsr700jnmapky' + dasel put -t string -f "$GENESIS" ".app_state.vault.operator_params.metadata.name" -v 'Governance' + dasel put -t string -f "$GENESIS" ".app_state.vault.operator_params.metadata.description" -v 'Governance Module Account' # Set total shares and owner shares. if [ -z "${INPUT_TEST_ACCOUNTS[0]}" ]; then vault_owner_address='dydx199tqg4wdlnu4qjlxchpd7seg454937hjrknju4' # alice as default vault owner diff --git a/protocol/testutil/constants/genesis.go b/protocol/testutil/constants/genesis.go index ba7c2f14020..7c78b3a6eef 100644 --- a/protocol/testutil/constants/genesis.go +++ b/protocol/testutil/constants/genesis.go @@ -4594,7 +4594,11 @@ const GenesisState = `{ "activation_threshold_quote_quantums": "1000000000" }, "operator_params": { - "operator": "dydx10d07y265gmmuvt4z0w9aw880jnsr700jnmapky" + "operator": "dydx10d07y265gmmuvt4z0w9aw880jnsr700jnmapky", + "metadata": { + "name": "Governance", + "description": "Governance Module Account" + } }, "owner_shares": [], "total_shares": { diff --git a/protocol/x/vault/keeper/grpc_query_test.go b/protocol/x/vault/keeper/grpc_query_test.go index 2d9cd9a98fc..3c76648104e 100644 --- a/protocol/x/vault/keeper/grpc_query_test.go +++ b/protocol/x/vault/keeper/grpc_query_test.go @@ -27,6 +27,7 @@ func TestQueryParams(t *testing.T) { DefaultQuotingParams: types.DefaultQuotingParams(), OperatorParams: types.OperatorParams{ Operator: constants.GovAuthority, + Metadata: types.DefaultOperatorParams().Metadata, }, }, err: nil, diff --git a/protocol/x/vault/types/params.go b/protocol/x/vault/types/params.go index 578f7030cb1..31131dac03b 100644 --- a/protocol/x/vault/types/params.go +++ b/protocol/x/vault/types/params.go @@ -85,5 +85,9 @@ func (o OperatorParams) Validate() error { func DefaultOperatorParams() OperatorParams { return OperatorParams{ Operator: lib.GovModuleAddress.String(), + Metadata: OperatorMetadata{ + Name: "Governance", + Description: "Governance Module Account", + }, } } diff --git a/protocol/x/vault/types/params.pb.go b/protocol/x/vault/types/params.pb.go index 3c2908369c7..e19c7c7ec3d 100644 --- a/protocol/x/vault/types/params.pb.go +++ b/protocol/x/vault/types/params.pb.go @@ -181,7 +181,10 @@ func (m *VaultParams) GetQuotingParams() *QuotingParams { // OperatorParams stores parameters regarding megavault operator. type OperatorParams struct { + // Address of the operator. Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` + // Metadata of the operator. + Metadata OperatorMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata"` } func (m *OperatorParams) Reset() { *m = OperatorParams{} } @@ -224,6 +227,68 @@ func (m *OperatorParams) GetOperator() string { return "" } +func (m *OperatorParams) GetMetadata() OperatorMetadata { + if m != nil { + return m.Metadata + } + return OperatorMetadata{} +} + +// OperatorMetadata stores metadata regarding megavault operator. +type OperatorMetadata struct { + // Name of the operator. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Description of the operator. + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` +} + +func (m *OperatorMetadata) Reset() { *m = OperatorMetadata{} } +func (m *OperatorMetadata) String() string { return proto.CompactTextString(m) } +func (*OperatorMetadata) ProtoMessage() {} +func (*OperatorMetadata) Descriptor() ([]byte, []int) { + return fileDescriptor_6043e0b8bfdbca9f, []int{3} +} +func (m *OperatorMetadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OperatorMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OperatorMetadata.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 *OperatorMetadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_OperatorMetadata.Merge(m, src) +} +func (m *OperatorMetadata) XXX_Size() int { + return m.Size() +} +func (m *OperatorMetadata) XXX_DiscardUnknown() { + xxx_messageInfo_OperatorMetadata.DiscardUnknown(m) +} + +var xxx_messageInfo_OperatorMetadata proto.InternalMessageInfo + +func (m *OperatorMetadata) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *OperatorMetadata) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + // Deprecated: Params stores `x/vault` parameters. // Deprecated since v6.x as is replaced by QuotingParams. type Params struct { @@ -253,7 +318,7 @@ 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_6043e0b8bfdbca9f, []int{3} + return fileDescriptor_6043e0b8bfdbca9f, []int{4} } func (m *Params) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -328,46 +393,51 @@ func init() { proto.RegisterType((*QuotingParams)(nil), "dydxprotocol.vault.QuotingParams") proto.RegisterType((*VaultParams)(nil), "dydxprotocol.vault.VaultParams") proto.RegisterType((*OperatorParams)(nil), "dydxprotocol.vault.OperatorParams") + proto.RegisterType((*OperatorMetadata)(nil), "dydxprotocol.vault.OperatorMetadata") proto.RegisterType((*Params)(nil), "dydxprotocol.vault.Params") } func init() { proto.RegisterFile("dydxprotocol/vault/params.proto", fileDescriptor_6043e0b8bfdbca9f) } var fileDescriptor_6043e0b8bfdbca9f = []byte{ - // 527 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x94, 0xb1, 0x6e, 0xd3, 0x40, - 0x1c, 0xc6, 0x63, 0x02, 0x01, 0xae, 0x4d, 0x2a, 0xac, 0xaa, 0x32, 0x1d, 0x9c, 0x10, 0x10, 0xaa, - 0x40, 0xb5, 0xa5, 0x52, 0xa9, 0x8c, 0x10, 0x89, 0xaa, 0x0c, 0x88, 0xc4, 0x46, 0x0c, 0x2c, 0xa7, - 0x8b, 0x7d, 0x71, 0x4e, 0xd8, 0xbe, 0xcb, 0xdd, 0xb9, 0x24, 0x79, 0x8a, 0x6e, 0x0c, 0x6c, 0x3c, - 0x03, 0x0f, 0xd1, 0xb1, 0x62, 0x42, 0x0c, 0x15, 0x4a, 0x5e, 0x04, 0xf9, 0x7f, 0x26, 0xb4, 0xa2, - 0x03, 0x23, 0x03, 0x4b, 0x94, 0xfb, 0xbe, 0xdf, 0xff, 0xfe, 0x27, 0x7d, 0x9f, 0x8c, 0xda, 0xf1, - 0x2c, 0x9e, 0x0a, 0xc9, 0x35, 0x8f, 0x78, 0xea, 0x1f, 0x93, 0x22, 0xd5, 0xbe, 0x20, 0x92, 0x64, - 0xca, 0x03, 0xd5, 0xb6, 0x2f, 0x02, 0x1e, 0x00, 0xdb, 0x77, 0x23, 0xae, 0x32, 0xae, 0x30, 0xc8, - 0xbe, 0x39, 0x18, 0x7c, 0xdb, 0xbd, 0xe2, 0x3e, 0xf8, 0xad, 0xfc, 0xcd, 0x84, 0x27, 0xdc, 0xcc, - 0x95, 0xff, 0x8c, 0xda, 0xfd, 0x5c, 0x47, 0xcd, 0x41, 0xc1, 0x35, 0xcb, 0x93, 0x3e, 0x2c, 0xb7, - 0xb7, 0x50, 0x23, 0x25, 0x33, 0x2a, 0x95, 0x63, 0x75, 0xac, 0x9d, 0x66, 0x50, 0x9d, 0xec, 0x07, - 0xa8, 0xa5, 0x84, 0xa4, 0x24, 0xc6, 0x19, 0xcb, 0xb1, 0x10, 0x99, 0x73, 0x0d, 0xfc, 0x75, 0xa3, - 0xbe, 0x62, 0x79, 0x5f, 0x64, 0xf6, 0x23, 0x74, 0xa7, 0xa2, 0x86, 0xc5, 0x68, 0x44, 0x25, 0x80, - 0x75, 0x00, 0x37, 0x8c, 0xd1, 0x03, 0xbd, 0x64, 0x1f, 0xa2, 0x0d, 0xf5, 0x9e, 0x7e, 0xc0, 0x23, - 0x12, 0x69, 0x6e, 0xc8, 0xeb, 0x40, 0x36, 0x4b, 0xf9, 0x10, 0xd4, 0x92, 0x7b, 0x8c, 0x6c, 0x2e, - 0x63, 0x2a, 0xb1, 0x62, 0x73, 0x8a, 0x45, 0xa4, 0x01, 0xbd, 0x61, 0x2e, 0x05, 0x27, 0x64, 0x73, - 0xda, 0x8f, 0x74, 0x09, 0x3f, 0x45, 0x8e, 0x81, 0xe9, 0x54, 0x30, 0x49, 0x34, 0xe3, 0x39, 0x56, - 0x34, 0xe2, 0x79, 0xac, 0x9c, 0x06, 0x8c, 0x6c, 0x81, 0xff, 0x62, 0x65, 0x87, 0xc6, 0xb5, 0x3f, - 0x5a, 0xe8, 0x3e, 0x89, 0x34, 0x3b, 0x36, 0x43, 0x7a, 0x2c, 0xa9, 0x1a, 0xf3, 0x34, 0xc6, 0x93, - 0x82, 0x6b, 0x8a, 0x27, 0x05, 0xc9, 0x75, 0x91, 0x29, 0xe7, 0x66, 0xc7, 0xda, 0x59, 0xef, 0x1d, - 0x9d, 0x9e, 0xb7, 0x6b, 0xdf, 0xcf, 0xdb, 0xcf, 0x12, 0xa6, 0xc7, 0xc5, 0xd0, 0x8b, 0x78, 0xe6, - 0x5f, 0x4e, 0x60, 0x7f, 0x37, 0x1a,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xff, 0x04, 0x00, 0x00, + // 587 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x94, 0x31, 0x6f, 0xd3, 0x40, + 0x14, 0xc7, 0x63, 0x12, 0x42, 0x7b, 0x69, 0x52, 0x38, 0x55, 0x95, 0xe9, 0xe0, 0x84, 0x50, 0xa1, + 0x0a, 0x54, 0x47, 0x2a, 0x95, 0xca, 0x08, 0x91, 0xa8, 0xc2, 0x50, 0x91, 0x38, 0x88, 0x81, 0xc5, + 0xba, 0xd8, 0x97, 0xe4, 0x84, 0xed, 0x73, 0xee, 0xce, 0x25, 0xc9, 0x87, 0x40, 0xdd, 0x18, 0xd8, + 0xf8, 0x0c, 0x7c, 0x88, 0x8e, 0x15, 0x13, 0x62, 0xa8, 0x50, 0xf2, 0x45, 0x90, 0xdf, 0xb9, 0x21, + 0x85, 0x0c, 0x8c, 0x0c, 0x5d, 0xac, 0xbb, 0xff, 0xfb, 0xbd, 0x7b, 0x4f, 0xf7, 0x7f, 0x67, 0x54, + 0xf5, 0x27, 0xfe, 0x38, 0x16, 0x5c, 0x71, 0x8f, 0x07, 0x8d, 0x53, 0x92, 0x04, 0xaa, 0x11, 0x13, + 0x41, 0x42, 0x69, 0x83, 0x8a, 0xf1, 0x32, 0x60, 0x03, 0xb0, 0x73, 0xdf, 0xe3, 0x32, 0xe4, 0xd2, + 0x05, 0xb9, 0xa1, 0x37, 0x1a, 0xdf, 0xb1, 0x56, 0x9c, 0x07, 0xdf, 0x2c, 0xbe, 0x35, 0xe0, 0x03, + 0xae, 0xf3, 0xd2, 0x95, 0x56, 0xeb, 0x5f, 0xf2, 0xa8, 0xdc, 0x49, 0xb8, 0x62, 0xd1, 0xa0, 0x0d, + 0xc5, 0xf1, 0x36, 0x2a, 0x06, 0x64, 0x42, 0x85, 0x34, 0x8d, 0x9a, 0xb1, 0x57, 0x76, 0xb2, 0x1d, + 0xde, 0x45, 0x15, 0x19, 0x0b, 0x4a, 0x7c, 0x37, 0x64, 0x91, 0x1b, 0xc7, 0xa1, 0x79, 0x0b, 0xe2, + 0x1b, 0x5a, 0x3d, 0x61, 0x51, 0x3b, 0x0e, 0xf1, 0x63, 0x74, 0x2f, 0xa3, 0x7a, 0x49, 0xbf, 0x4f, + 0x05, 0x80, 0x79, 0x00, 0x37, 0x75, 0xa0, 0x09, 0x7a, 0xca, 0x3e, 0x42, 0x9b, 0xf2, 0x3d, 0xfd, + 0xe0, 0xf6, 0x89, 0xa7, 0xb8, 0x26, 0x0b, 0x40, 0x96, 0x53, 0xf9, 0x18, 0xd4, 0x94, 0x7b, 0x82, + 0x30, 0x17, 0x3e, 0x15, 0xae, 0x64, 0x53, 0xea, 0xc6, 0x9e, 0x02, 0xf4, 0xb6, 0x3e, 0x14, 0x22, + 0x5d, 0x36, 0xa5, 0x6d, 0x4f, 0xa5, 0xf0, 0x33, 0x64, 0x6a, 0x98, 0x8e, 0x63, 0x26, 0x88, 0x62, + 0x3c, 0x72, 0x25, 0xf5, 0x78, 0xe4, 0x4b, 0xb3, 0x08, 0x29, 0xdb, 0x10, 0x7f, 0xb9, 0x08, 0x77, + 0x75, 0x14, 0x7f, 0x32, 0xd0, 0x43, 0xe2, 0x29, 0x76, 0xaa, 0x93, 0xd4, 0x50, 0x50, 0x39, 0xe4, + 0x81, 0xef, 0x8e, 0x12, 0xae, 0xa8, 0x3b, 0x4a, 0x48, 0xa4, 0x92, 0x50, 0x9a, 0x77, 0x6a, 0xc6, + 0xde, 0x46, 0xb3, 0x75, 0x7e, 0x59, 0xcd, 0xfd, 0xb8, 0xac, 0x3e, 0x1f, 0x30, 0x35, 0x4c, 0x7a, + 0xb6, 0xc7, 0xc3, 0xc6, 0x75, 0x07, 0x0e, 0xf7, 0xbd, 0x21, 0x61, 0x51, 0x63, 0xa1, 0xf8, 0x6a, + 0x12, 0x53, 0x69, 0x77, 0xa9, 0x60, 0x24, 0x60, 0x53, 0xd2, 0x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xc6, 0xcf, 0x99, 0x65, 0x9c, 0xcd, 0xad, 0xdc, 0xc5, 0xdc, 0xca, 0x7d, 0x9f, 0x5b, 0xb9, 0x77, + 0x47, 0xff, 0x5e, 0x7d, 0x9c, 0xfd, 0x1f, 0xa1, 0x89, 0x5e, 0x11, 0xf4, 0xa7, 0xbf, 0x02, 0x00, + 0x00, 0xff, 0xff, 0xb0, 0x1c, 0x9f, 0x45, 0x92, 0x05, 0x00, 0x00, } func (m *QuotingParams) Marshal() (dAtA []byte, err error) { @@ -493,6 +563,16 @@ func (m *OperatorParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + { + size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 if len(m.Operator) > 0 { i -= len(m.Operator) copy(dAtA[i:], m.Operator) @@ -503,6 +583,43 @@ func (m *OperatorParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *OperatorMetadata) 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 *OperatorMetadata) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OperatorMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintParams(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintParams(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *Params) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -632,6 +749,25 @@ func (m *OperatorParams) Size() (n int) { if l > 0 { n += 1 + l + sovParams(uint64(l)) } + l = m.Metadata.Size() + n += 1 + l + sovParams(uint64(l)) + return n +} + +func (m *OperatorMetadata) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovParams(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovParams(uint64(l)) + } return n } @@ -1033,6 +1169,153 @@ func (m *OperatorParams) Unmarshal(dAtA []byte) error { } m.Operator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OperatorMetadata) 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 ErrIntOverflowParams + } + 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: OperatorMetadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OperatorMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipParams(dAtA[iNdEx:])