From 855e3773f132f9aea0d13c870afffd57d27a5fcc Mon Sep 17 00:00:00 2001 From: Alex | Skip Date: Wed, 11 Dec 2024 16:31:54 -0500 Subject: [PATCH] chore: backport https://github.com/skip-mev/connect/pull/838 (#869) Co-authored-by: Chenyao Yu <4844716+chenyaoy@users.noreply.github.com> --- api/slinky/marketmap/v1/tx.pulsar.go | 176 +++++++++++++------------- proto/slinky/marketmap/v1/tx.proto | 8 +- tests/integration/slinky_setup.go | 4 +- x/marketmap/keeper/msg_server.go | 10 +- x/marketmap/keeper/msg_server_test.go | 34 ++--- x/marketmap/types/msg.go | 2 +- x/marketmap/types/msg_test.go | 18 +-- x/marketmap/types/tx.pb.go | 120 +++++++++--------- 8 files changed, 184 insertions(+), 188 deletions(-) diff --git a/api/slinky/marketmap/v1/tx.pulsar.go b/api/slinky/marketmap/v1/tx.pulsar.go index debc29b0a..110515001 100644 --- a/api/slinky/marketmap/v1/tx.pulsar.go +++ b/api/slinky/marketmap/v1/tx.pulsar.go @@ -4856,15 +4856,15 @@ func (x *_MsgRemoveMarkets_2_list) IsValid() bool { } var ( - md_MsgRemoveMarkets protoreflect.MessageDescriptor - fd_MsgRemoveMarkets_admin protoreflect.FieldDescriptor - fd_MsgRemoveMarkets_markets protoreflect.FieldDescriptor + md_MsgRemoveMarkets protoreflect.MessageDescriptor + fd_MsgRemoveMarkets_authority protoreflect.FieldDescriptor + fd_MsgRemoveMarkets_markets protoreflect.FieldDescriptor ) func init() { file_slinky_marketmap_v1_tx_proto_init() md_MsgRemoveMarkets = File_slinky_marketmap_v1_tx_proto.Messages().ByName("MsgRemoveMarkets") - fd_MsgRemoveMarkets_admin = md_MsgRemoveMarkets.Fields().ByName("admin") + fd_MsgRemoveMarkets_authority = md_MsgRemoveMarkets.Fields().ByName("authority") fd_MsgRemoveMarkets_markets = md_MsgRemoveMarkets.Fields().ByName("markets") } @@ -4933,9 +4933,9 @@ func (x *fastReflection_MsgRemoveMarkets) Interface() protoreflect.ProtoMessage // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgRemoveMarkets) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Admin != "" { - value := protoreflect.ValueOfString(x.Admin) - if !f(fd_MsgRemoveMarkets_admin, value) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgRemoveMarkets_authority, value) { return } } @@ -4960,8 +4960,8 @@ func (x *fastReflection_MsgRemoveMarkets) Range(f func(protoreflect.FieldDescrip // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgRemoveMarkets) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "slinky.marketmap.v1.MsgRemoveMarkets.admin": - return x.Admin != "" + case "slinky.marketmap.v1.MsgRemoveMarkets.authority": + return x.Authority != "" case "slinky.marketmap.v1.MsgRemoveMarkets.markets": return len(x.Markets) != 0 default: @@ -4980,8 +4980,8 @@ func (x *fastReflection_MsgRemoveMarkets) Has(fd protoreflect.FieldDescriptor) b // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRemoveMarkets) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "slinky.marketmap.v1.MsgRemoveMarkets.admin": - x.Admin = "" + case "slinky.marketmap.v1.MsgRemoveMarkets.authority": + x.Authority = "" case "slinky.marketmap.v1.MsgRemoveMarkets.markets": x.Markets = nil default: @@ -5000,8 +5000,8 @@ func (x *fastReflection_MsgRemoveMarkets) Clear(fd protoreflect.FieldDescriptor) // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgRemoveMarkets) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "slinky.marketmap.v1.MsgRemoveMarkets.admin": - value := x.Admin + case "slinky.marketmap.v1.MsgRemoveMarkets.authority": + value := x.Authority return protoreflect.ValueOfString(value) case "slinky.marketmap.v1.MsgRemoveMarkets.markets": if len(x.Markets) == 0 { @@ -5029,8 +5029,8 @@ func (x *fastReflection_MsgRemoveMarkets) Get(descriptor protoreflect.FieldDescr // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRemoveMarkets) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "slinky.marketmap.v1.MsgRemoveMarkets.admin": - x.Admin = value.Interface().(string) + case "slinky.marketmap.v1.MsgRemoveMarkets.authority": + x.Authority = value.Interface().(string) case "slinky.marketmap.v1.MsgRemoveMarkets.markets": lv := value.List() clv := lv.(*_MsgRemoveMarkets_2_list) @@ -5061,8 +5061,8 @@ func (x *fastReflection_MsgRemoveMarkets) Mutable(fd protoreflect.FieldDescripto } value := &_MsgRemoveMarkets_2_list{list: &x.Markets} return protoreflect.ValueOfList(value) - case "slinky.marketmap.v1.MsgRemoveMarkets.admin": - panic(fmt.Errorf("field admin of message slinky.marketmap.v1.MsgRemoveMarkets is not mutable")) + case "slinky.marketmap.v1.MsgRemoveMarkets.authority": + panic(fmt.Errorf("field authority of message slinky.marketmap.v1.MsgRemoveMarkets is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: slinky.marketmap.v1.MsgRemoveMarkets")) @@ -5076,7 +5076,7 @@ func (x *fastReflection_MsgRemoveMarkets) Mutable(fd protoreflect.FieldDescripto // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgRemoveMarkets) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "slinky.marketmap.v1.MsgRemoveMarkets.admin": + case "slinky.marketmap.v1.MsgRemoveMarkets.authority": return protoreflect.ValueOfString("") case "slinky.marketmap.v1.MsgRemoveMarkets.markets": list := []string{} @@ -5150,7 +5150,7 @@ func (x *fastReflection_MsgRemoveMarkets) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.Admin) + l = len(x.Authority) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -5198,10 +5198,10 @@ func (x *fastReflection_MsgRemoveMarkets) ProtoMethods() *protoiface.Methods { dAtA[i] = 0x12 } } - if len(x.Admin) > 0 { - i -= len(x.Admin) - copy(dAtA[i:], x.Admin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Admin))) + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) i-- dAtA[i] = 0xa } @@ -5256,7 +5256,7 @@ func (x *fastReflection_MsgRemoveMarkets) ProtoMethods() *protoiface.Methods { switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5284,7 +5284,7 @@ func (x *fastReflection_MsgRemoveMarkets) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Admin = string(dAtA[iNdEx:postIndex]) + x.Authority = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -6249,9 +6249,9 @@ type MsgRemoveMarkets struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Admin defines the authority that is the x/marketmap - // Admin account. This account is set in the module parameters. - Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` + // Authority is the signer of this transaction. This authority must be + // authorized by the module to execute the message. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // Markets is the list of markets to remove. Markets []string `protobuf:"bytes,2,rep,name=markets,proto3" json:"markets,omitempty"` } @@ -6276,9 +6276,9 @@ func (*MsgRemoveMarkets) Descriptor() ([]byte, []int) { return file_slinky_marketmap_v1_tx_proto_rawDescGZIP(), []int{10} } -func (x *MsgRemoveMarkets) GetAdmin() string { +func (x *MsgRemoveMarkets) GetAuthority() string { if x != nil { - return x.Admin + return x.Authority } return "" } @@ -6420,72 +6420,72 @@ var file_slinky_marketmap_v1_tx_proto_rawDesc = []byte{ 0x69, 0x6e, 0x67, 0x52, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x24, 0x0a, 0x22, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x68, 0x0a, 0x10, + 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x74, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, - 0x12, 0x2e, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x07, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x3a, 0x0a, 0x82, 0xe7, 0xb0, 0x2a, - 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x43, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x64, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x32, 0x86, 0x05, 0x0a, 0x03, - 0x4d, 0x73, 0x67, 0x12, 0x65, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x1a, 0x2d, 0x2e, 0x73, 0x6c, - 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x0d, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x73, 0x6c, - 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x73, 0x1a, 0x2d, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x56, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x1e, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x1a, 0x26, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, - 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x83, 0x01, 0x0a, 0x17, 0x52, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x2f, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, - 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x1a, 0x37, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, - 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x65, 0x0a, 0x0d, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, + 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x22, 0x43, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, + 0x0a, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, + 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x32, 0x86, 0x05, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, + 0x65, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, - 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, + 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x1a, 0x2d, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x1a, 0x2d, + 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x1a, 0x2d, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, - 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x61, - 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, - 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xc2, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6c, 0x69, + 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, + 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1e, 0x2e, + 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x26, 0x2e, + 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x83, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x12, 0x2f, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, + 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x69, + 0x65, 0x73, 0x1a, 0x37, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, + 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x0d, 0x55, + 0x70, 0x73, 0x65, 0x72, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x73, + 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x4d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x73, 0x1a, 0x2d, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x73, + 0x65, 0x72, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x65, 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, + 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x73, 0x1a, 0x2d, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, - 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6c, - 0x69, 0x6e, 0x6b, 0x79, 0x2f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2f, 0x76, - 0x31, 0x3b, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x76, 0x31, 0xa2, 0x02, 0x03, - 0x53, 0x4d, 0x58, 0xaa, 0x02, 0x13, 0x53, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x4d, 0x61, 0x72, - 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x13, 0x53, 0x6c, 0x69, 0x6e, - 0x6b, 0x79, 0x5c, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x5c, 0x56, 0x31, 0xe2, - 0x02, 0x1f, 0x53, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x5c, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, - 0x61, 0x70, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x15, 0x53, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x3a, 0x3a, 0x4d, 0x61, 0x72, 0x6b, - 0x65, 0x74, 0x6d, 0x61, 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, + 0x42, 0xc2, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, + 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, + 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x6c, 0x69, 0x6e, 0x6b, 0x79, + 0x2f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x4d, 0x58, 0xaa, + 0x02, 0x13, 0x53, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, + 0x61, 0x70, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x13, 0x53, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x5c, 0x4d, + 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1f, 0x53, 0x6c, + 0x69, 0x6e, 0x6b, 0x79, 0x5c, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x5c, 0x56, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, + 0x53, 0x6c, 0x69, 0x6e, 0x6b, 0x79, 0x3a, 0x3a, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x6d, 0x61, + 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/slinky/marketmap/v1/tx.proto b/proto/slinky/marketmap/v1/tx.proto index d0b08be3f..b2241741e 100644 --- a/proto/slinky/marketmap/v1/tx.proto +++ b/proto/slinky/marketmap/v1/tx.proto @@ -143,11 +143,11 @@ message MsgRemoveMarketAuthoritiesResponse {} // MsgRemoveMarkets defines the Msg/RemoveMarkets request type. It contains the // new markets to be removed from the market map. message MsgRemoveMarkets { - option (cosmos.msg.v1.signer) = "admin"; + option (cosmos.msg.v1.signer) = "authority"; - // Admin defines the authority that is the x/marketmap - // Admin account. This account is set in the module parameters. - string admin = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // Authority is the signer of this transaction. This authority must be + // authorized by the module to execute the message. + string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // Markets is the list of markets to remove. repeated string markets = 2; diff --git a/tests/integration/slinky_setup.go b/tests/integration/slinky_setup.go index d209f17f9..9b80f81ff 100644 --- a/tests/integration/slinky_setup.go +++ b/tests/integration/slinky_setup.go @@ -482,8 +482,8 @@ func (s *SlinkyIntegrationSuite) RemoveMarket( } msg := &mmtypes.MsgRemoveMarkets{ - Admin: s.user.FormattedAddress(), - Markets: marketString, + Authority: s.user.FormattedAddress(), + Markets: marketString, } tx := CreateTx(s.T(), s.chain, s.user, gasPrice, msg) diff --git a/x/marketmap/keeper/msg_server.go b/x/marketmap/keeper/msg_server.go index 9433695a8..a5098adab 100644 --- a/x/marketmap/keeper/msg_server.go +++ b/x/marketmap/keeper/msg_server.go @@ -263,13 +263,9 @@ func (ms msgServer) RemoveMarkets( ctx := sdk.UnwrapSDKContext(goCtx) - params, err := ms.k.GetParams(ctx) - if err != nil { - return nil, err - } - - if msg.Admin != params.Admin { - return nil, fmt.Errorf("request admin %s does not match module admin %s", msg.Admin, params.Admin) + // perform basic msg validity checks + if err := ms.verifyMarketAuthorities(ctx, msg); err != nil { + return nil, fmt.Errorf("unable to verify market authorities: %w", err) } deletedMarkets := make([]string, 0, len(msg.Markets)) diff --git a/x/marketmap/keeper/msg_server_test.go b/x/marketmap/keeper/msg_server_test.go index bd359d582..4affcf865 100644 --- a/x/marketmap/keeper/msg_server_test.go +++ b/x/marketmap/keeper/msg_server_test.go @@ -531,7 +531,7 @@ func (s *KeeperTestSuite) TestMsgServerRemoveMarkets() { s.Run("unable to process for invalid authority", func() { msg := &types.MsgRemoveMarkets{ - Admin: "invalid", + Authority: "invalid", } resp, err := msgServer.RemoveMarkets(s.ctx, msg) s.Require().Error(err) @@ -540,8 +540,8 @@ func (s *KeeperTestSuite) TestMsgServerRemoveMarkets() { s.Run("only remove existing markets - no error", func() { msg := &types.MsgRemoveMarkets{ - Admin: s.admin, - Markets: []string{"BTC/USD", "ETH/USDT"}, + Authority: s.marketAuthorities[0], + Markets: []string{"BTC/USD", "ETH/USDT"}, } resp, err := msgServer.RemoveMarkets(s.ctx, msg) s.Require().NoError(err) @@ -550,8 +550,8 @@ func (s *KeeperTestSuite) TestMsgServerRemoveMarkets() { s.Run("unable to remove non-existent market - single", func() { msg := &types.MsgRemoveMarkets{ - Admin: s.admin, - Markets: []string{"BTC/USD"}, + Authority: s.marketAuthorities[0], + Markets: []string{"BTC/USD"}, } resp, err := msgServer.RemoveMarkets(s.ctx, msg) s.Require().NoError(err) @@ -563,8 +563,8 @@ func (s *KeeperTestSuite) TestMsgServerRemoveMarkets() { copyBTC.Ticker.Enabled = false msg := &types.MsgRemoveMarkets{ - Admin: s.admin, - Markets: []string{copyBTC.Ticker.String()}, + Authority: s.marketAuthorities[0], + Markets: []string{copyBTC.Ticker.String()}, } err := s.keeper.CreateMarket(s.ctx, copyBTC) @@ -587,8 +587,8 @@ func (s *KeeperTestSuite) TestMsgServerRemoveMarkets() { s.Require().NoError(err) msg := &types.MsgRemoveMarkets{ - Admin: s.admin, - Markets: []string{copyBTC.Ticker.String()}, + Authority: s.marketAuthorities[0], + Markets: []string{copyBTC.Ticker.String()}, } resp, err := msgServer.RemoveMarkets(s.ctx, msg) @@ -638,13 +638,13 @@ func (s *KeeperTestSuite) TestMsgServerRemoveMarkets() { s.Require().NoError(err) msgRemoveBTC := &types.MsgRemoveMarkets{ - Admin: s.admin, - Markets: []string{copyBTC.Ticker.String()}, + Authority: s.marketAuthorities[0], + Markets: []string{copyBTC.Ticker.String()}, } msgRemoveETH := &types.MsgRemoveMarkets{ - Admin: s.admin, - Markets: []string{copyETH.Ticker.String()}, + Authority: s.marketAuthorities[0], + Markets: []string{copyETH.Ticker.String()}, } resp, err := msgServer.RemoveMarkets(s.ctx, msgRemoveBTC) @@ -673,8 +673,8 @@ func (s *KeeperTestSuite) TestMsgServerRemoveMarkets() { s.Require().NoError(err) msg := &types.MsgRemoveMarkets{ - Admin: s.admin, - Markets: []string{copyBTC.Ticker.String(), copyETH.Ticker.String()}, + Authority: s.marketAuthorities[0], + Markets: []string{copyBTC.Ticker.String(), copyETH.Ticker.String()}, } resp, err := msgServer.RemoveMarkets(s.ctx, msg) @@ -713,8 +713,8 @@ func (s *KeeperTestSuite) TestMsgServerRemoveMarkets() { s.Require().NoError(err) msg := &types.MsgRemoveMarkets{ - Admin: s.admin, - Markets: []string{copyBTC.Ticker.String(), copyETH.Ticker.String()}, + Authority: s.marketAuthorities[0], + Markets: []string{copyBTC.Ticker.String(), copyETH.Ticker.String()}, } resp, err := msgServer.RemoveMarkets(s.ctx, msg) diff --git a/x/marketmap/types/msg.go b/x/marketmap/types/msg.go index 7221994d0..b0399421a 100644 --- a/x/marketmap/types/msg.go +++ b/x/marketmap/types/msg.go @@ -132,7 +132,7 @@ func (m *MsgRemoveMarketAuthorities) ValidateBasic() error { // whether the signer is a valid acc-address. func (m *MsgRemoveMarkets) ValidateBasic() error { // validate signer address - if _, err := sdk.AccAddressFromBech32(m.Admin); err != nil { + if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { return err } diff --git a/x/marketmap/types/msg_test.go b/x/marketmap/types/msg_test.go index 28a1c3b38..4cf6ad781 100644 --- a/x/marketmap/types/msg_test.go +++ b/x/marketmap/types/msg_test.go @@ -528,39 +528,39 @@ func TestValidateBasicMsgRemoveMarkets(t *testing.T) { { "if the Authority is not an acc-address - fail", types.MsgRemoveMarkets{ - Admin: "invalid", + Authority: "invalid", }, false, }, { name: "invalid message (no markets) - fail", msg: types.MsgRemoveMarkets{ - Markets: nil, - Admin: sample.Address(rng), + Markets: nil, + Authority: sample.Address(rng), }, expectPass: false, }, { name: "valid message - single market", msg: types.MsgRemoveMarkets{ - Markets: []string{"USDT/USD"}, - Admin: sample.Address(rng), + Markets: []string{"USDT/USD"}, + Authority: sample.Address(rng), }, expectPass: true, }, { name: "valid message - multiple markets", msg: types.MsgRemoveMarkets{ - Markets: []string{"USDT/USD", "ETH/USD"}, - Admin: sample.Address(rng), + Markets: []string{"USDT/USD", "ETH/USD"}, + Authority: sample.Address(rng), }, expectPass: true, }, { name: "invalid message (duplicate markets", msg: types.MsgRemoveMarkets{ - Markets: []string{"USDT/USD", "USDT/USD"}, - Admin: sample.Address(rng), + Markets: []string{"USDT/USD", "USDT/USD"}, + Authority: sample.Address(rng), }, expectPass: false, }, diff --git a/x/marketmap/types/tx.pb.go b/x/marketmap/types/tx.pb.go index b8cf84524..581f28d3c 100644 --- a/x/marketmap/types/tx.pb.go +++ b/x/marketmap/types/tx.pb.go @@ -519,9 +519,9 @@ var xxx_messageInfo_MsgRemoveMarketAuthoritiesResponse proto.InternalMessageInfo // MsgRemoveMarkets defines the Msg/RemoveMarkets request type. It contains the // new markets to be removed from the market map. type MsgRemoveMarkets struct { - // Admin defines the authority that is the x/marketmap - // Admin account. This account is set in the module parameters. - Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` + // Authority is the signer of this transaction. This authority must be + // authorized by the module to execute the message. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // Markets is the list of markets to remove. Markets []string `protobuf:"bytes,2,rep,name=markets,proto3" json:"markets,omitempty"` } @@ -559,9 +559,9 @@ func (m *MsgRemoveMarkets) XXX_DiscardUnknown() { var xxx_messageInfo_MsgRemoveMarkets proto.InternalMessageInfo -func (m *MsgRemoveMarkets) GetAdmin() string { +func (m *MsgRemoveMarkets) GetAuthority() string { if m != nil { - return m.Admin + return m.Authority } return "" } @@ -639,54 +639,54 @@ func init() { func init() { proto.RegisterFile("slinky/marketmap/v1/tx.proto", fileDescriptor_e9adadfc18297083) } var fileDescriptor_e9adadfc18297083 = []byte{ - // 739 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 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, 0x20, 0x98, 0xa9, 0x11, 0x6b, - 0xcb, 0x23, 0xd8, 0xa7, 0xb5, 0x00, 0x46, 0x84, 0x7b, 0x90, 0x37, 0xda, 0x74, 0xc7, 0xf5, 0x6d, - 0xda, 0x15, 0x51, 0x09, 0x2d, 0xe5, 0xab, 0xe2, 0xb7, 0xcf, 0x2b, 0xf3, 0x9c, 0xd0, 0x86, 0x69, - 0xfa, 0x98, 0x90, 0xe7, 0xd4, 0xb7, 0x5b, 0x96, 0x3e, 0x80, 0x0a, 0x8f, 0xe0, 0x02, 0x8b, 0x44, - 0xc4, 0x6c, 0x69, 0x62, 0xe9, 0xd2, 0xda, 0x55, 0x35, 0xa1, 0x28, 0x2a, 0x0b, 0x53, 0x9d, 0x3c, - 0xfc, 0xb1, 0x98, 0xd1, 0xfb, 0x16, 0x95, 0xca, 0xaf, 0x8f, 0x8b, 0x99, 0xd7, 0xa7, 0x07, 0xcb, - 0x03, 0x87, 0x6f, 0x4f, 0x0f, 0x96, 0xaf, 0xf3, 0x14, 0xf6, 0x22, 0x49, 0x9c, 0x25, 0xac, 0x7c, - 0x45, 0x20, 0x9e, 0x15, 0xea, 0x98, 0x78, 0x6e, 0x8b, 0x60, 0xa1, 0x09, 0x45, 0x66, 0x5a, 0x6f, - 0x7b, 0xa6, 0x41, 0x31, 0x11, 0x51, 0x40, 0x6e, 0x3d, 0x99, 0x5c, 0x8a, 0x1b, 0xce, 0x7a, 0x8b, - 0xb9, 0x78, 0xdc, 0xa2, 0x7e, 0xb7, 0x9a, 0x15, 0x91, 0x5e, 0x70, 0xa2, 0x72, 0x69, 0x1d, 0x84, - 0xf3, 0x40, 0x61, 0x06, 0x26, 0x9a, 0x98, 0x97, 0x52, 0xef, 0x1d, 0x85, 0x79, 0xc8, 0x75, 0x8c, - 0xdd, 0x36, 0x16, 0xb3, 0x25, 0xb4, 0x74, 0x51, 0x67, 0x1f, 0x95, 0xec, 0x03, 0x54, 0x99, 0xfc, - 0xf0, 0x69, 0x11, 0x29, 0x47, 0xac, 0x2f, 0x9b, 0x3e, 0x36, 0x28, 0xfe, 0xd7, 0xbe, 0x3c, 0x85, - 0x62, 0x23, 0x70, 0x54, 0x1f, 0xbb, 0x3d, 0x85, 0x46, 0x94, 0xc1, 0x98, 0x4d, 0x8a, 0xb1, 0x57, - 0xa4, 0xa0, 0x47, 0x31, 0x59, 0xbf, 0xb8, 0xfd, 0x74, 0x59, 0xd1, 0xfe, 0x43, 0xba, 0xac, 0xd3, - 0x7f, 0x91, 0x6e, 0x3b, 0xca, 0x60, 0xec, 0x99, 0x34, 0xcf, 0xa5, 0x1b, 0x93, 0x85, 0xe9, 0xbe, - 0x43, 0x90, 0xaf, 0x11, 0xeb, 0x59, 0x70, 0x13, 0x85, 0x87, 0x30, 0xc5, 0xee, 0x64, 0x90, 0x64, - 0x1a, 0x4f, 0x06, 0xe6, 0x3c, 0xb9, 0x41, 0xbc, 0x44, 0xd9, 0x91, 0x4b, 0x54, 0x29, 0xc6, 0x93, - 0x52, 0xe6, 0x60, 0x36, 0xe4, 0x13, 0xb2, 0xdc, 0x47, 0x20, 0xd5, 0x88, 0xa5, 0x63, 0xc7, 0xed, - 0xf0, 0x14, 0x36, 0xb8, 0x85, 0x8d, 0x89, 0x70, 0x1b, 0x66, 0xfc, 0x40, 0x55, 0x37, 0x58, 0x18, - 0x7e, 0xb3, 0xf2, 0xfa, 0x34, 0x93, 0x6f, 0xf4, 0xc5, 0x82, 0x0a, 0x39, 0xc3, 0x74, 0xec, 0xd6, - 0x1f, 0x29, 0x32, 0x58, 0x05, 0x7a, 0xf4, 0xd8, 0x59, 0xb9, 0x01, 0x4a, 0x3a, 0x89, 0x90, 0xeb, - 0x4e, 0x30, 0x3f, 0x51, 0x54, 0x24, 0x2a, 0x1a, 0x29, 0xaa, 0x20, 0xc6, 0xd7, 0x57, 0x7e, 0xb0, - 0x9b, 0xa2, 0x7c, 0x36, 0x83, 0xbe, 0xc6, 0x22, 0x85, 0xab, 0xe6, 0x16, 0x4c, 0x9b, 0x78, 0x17, - 0x53, 0x6c, 0x86, 0xa3, 0xc7, 0x2a, 0x52, 0xe4, 0x62, 0x6e, 0xb0, 0xf6, 0x26, 0x07, 0x13, 0x35, - 0x62, 0x09, 0x18, 0x0a, 0xf1, 0x2b, 0x5e, 0x4e, 0x5b, 0x4a, 0x31, 0x98, 0xb4, 0x32, 0x12, 0x2c, - 0xe4, 0x85, 0xa1, 0x10, 0xbf, 0x5a, 0xe5, 0xf4, 0xdd, 0x67, 0x8e, 0x12, 0x26, 0x71, 0xac, 0x85, - 0x17, 0x70, 0x99, 0x29, 0xf8, 0x60, 0xcb, 0x69, 0xe6, 0x4c, 0x2f, 0xdd, 0x1c, 0xae, 0x0f, 0xfd, - 0xee, 0x23, 0x58, 0x48, 0x9b, 0x42, 0x2d, 0xcd, 0x47, 0x8a, 0x81, 0x74, 0x7f, 0x4c, 0x83, 0x78, - 0x11, 0xa3, 0xcf, 0x64, 0x79, 0xa4, 0x07, 0x64, 0x58, 0x11, 0x93, 0x9e, 0x2b, 0x0c, 0x85, 0xf8, - 0x18, 0x97, 0x47, 0x21, 0x3c, 0x24, 0x4c, 0xe2, 0xa8, 0x4a, 0xb9, 0x57, 0xa7, 0x07, 0xcb, 0xa8, - 0xfa, 0xe4, 0xf0, 0x58, 0x46, 0x47, 0xc7, 0x32, 0xfa, 0x79, 0x2c, 0xa3, 0xf7, 0x27, 0x72, 0xe6, - 0xe8, 0x44, 0xce, 0x7c, 0x3f, 0x91, 0x33, 0x2f, 0xef, 0x58, 0x36, 0xdd, 0x69, 0x6f, 0xab, 0x0d, - 0xd7, 0xd1, 0x48, 0xd3, 0xf6, 0x56, 0x1c, 0xdc, 0xd1, 0x12, 0x16, 0x1f, 0xed, 0x7a, 0x98, 0x6c, - 0x4f, 0x05, 0x7f, 0x27, 0xee, 0xfe, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x4b, 0xc8, 0xbc, 0x0f, 0x24, - 0x09, 0x00, 0x00, + // 738 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4d, 0x6f, 0xd3, 0x4c, + 0x10, 0xce, 0xa6, 0x4d, 0xdf, 0x37, 0x03, 0x49, 0x5b, 0xb7, 0x52, 0x8d, 0x41, 0x6e, 0x64, 0x08, + 0x94, 0x8a, 0xda, 0x6a, 0x91, 0xf8, 0x08, 0x97, 0x36, 0x15, 0x88, 0x4b, 0x24, 0x64, 0x54, 0x0e, + 0x5c, 0x22, 0x37, 0x5e, 0xb9, 0x56, 0xea, 0xd8, 0xf2, 0x6e, 0xa2, 0xe6, 0x86, 0xa8, 0xc4, 0x81, + 0x03, 0xe2, 0xc8, 0x11, 0xfe, 0x41, 0x0f, 0xfc, 0x03, 0x2e, 0xbd, 0x51, 0x71, 0xe2, 0x84, 0x50, + 0x7b, 0x28, 0x3f, 0x03, 0xc5, 0xbb, 0x71, 0xed, 0xd4, 0x0e, 0x49, 0xe1, 0x12, 0xad, 0x67, 0x9e, + 0x99, 0x79, 0xe6, 0x63, 0x67, 0x03, 0xd7, 0xc8, 0xae, 0xdd, 0x6a, 0x76, 0x35, 0xc7, 0xf0, 0x9b, + 0x98, 0x3a, 0x86, 0xa7, 0x75, 0x56, 0x35, 0xba, 0xa7, 0x7a, 0xbe, 0x4b, 0x5d, 0x61, 0x8e, 0x69, + 0xd5, 0x50, 0xab, 0x76, 0x56, 0xa5, 0x85, 0x86, 0x4b, 0x1c, 0x97, 0x68, 0x0e, 0xb1, 0x7a, 0x60, + 0x87, 0x58, 0x0c, 0x2d, 0xcd, 0x5b, 0xae, 0xe5, 0x06, 0x47, 0xad, 0x77, 0xe2, 0xd2, 0x2b, 0x0c, + 0x5e, 0x67, 0x0a, 0xf6, 0xc1, 0x55, 0xb3, 0x86, 0x63, 0xb7, 0x5c, 0x2d, 0xf8, 0xe5, 0xa2, 0x52, + 0x12, 0x1f, 0xf6, 0x31, 0x0c,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9, 0x36, 0x83, 0x1e, 0xc7, 0xa2, 0x86, 0x6b, 0xe7, 0x16, 0x4c, 0x9b, 0x78, 0x17, 0x53, + 0x6c, 0x86, 0x63, 0xc8, 0xaa, 0x53, 0xe4, 0x62, 0x6e, 0xb0, 0xf6, 0x26, 0x07, 0x13, 0x35, 0x62, + 0x09, 0x18, 0x0a, 0xf1, 0xeb, 0x5e, 0x4e, 0x5b, 0x50, 0x31, 0x98, 0xb4, 0x32, 0x12, 0x2c, 0xe4, + 0x85, 0xa1, 0x10, 0xbf, 0x66, 0xe5, 0xf4, 0x3d, 0x68, 0x8e, 0x12, 0x26, 0x71, 0xc4, 0x85, 0x17, + 0x70, 0x99, 0x29, 0xf8, 0x90, 0xcb, 0x69, 0xe6, 0x4c, 0x2f, 0xdd, 0x1c, 0xae, 0x0f, 0xfd, 0xee, + 0x23, 0x58, 0x48, 0x9b, 0x48, 0x2d, 0xcd, 0x47, 0x8a, 0x81, 0x74, 0x7f, 0x4c, 0x83, 0x78, 0x11, + 0xa3, 0x4f, 0x66, 0x79, 0xa4, 0xc7, 0x64, 0x58, 0x11, 0x93, 0x9e, 0x2e, 0x0c, 0x85, 0xf8, 0x48, + 0x97, 0x47, 0x21, 0x3c, 0x24, 0x4c, 0xe2, 0xa8, 0x4a, 0xb9, 0x57, 0xa7, 0x07, 0xcb, 0xa8, 0xfa, + 0xe4, 0xf0, 0x58, 0x46, 0x47, 0xc7, 0x32, 0xfa, 0x79, 0x2c, 0xa3, 0xf7, 0x27, 0x72, 0xe6, 0xe8, + 0x44, 0xce, 0x7c, 0x3f, 0x91, 0x33, 0x2f, 0xef, 0x58, 0x36, 0xdd, 0x69, 0x6f, 0xab, 0x0d, 0xd7, + 0xd1, 0x48, 0xd3, 0xf6, 0x56, 0x1c, 0xdc, 0xd1, 0x12, 0x96, 0x20, 0xed, 0x7a, 0x98, 0x6c, 0x4f, + 0x05, 0x7f, 0x2d, 0xee, 0xfe, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xc1, 0x0d, 0x35, 0x3d, 0x30, 0x09, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1355,10 +1355,10 @@ func (m *MsgRemoveMarkets) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x12 } } - if len(m.Admin) > 0 { - i -= len(m.Admin) - copy(dAtA[i:], m.Admin) - i = encodeVarintTx(dAtA, i, uint64(len(m.Admin))) + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) i-- dAtA[i] = 0xa } @@ -1558,7 +1558,7 @@ func (m *MsgRemoveMarkets) Size() (n int) { } var l int _ = l - l = len(m.Admin) + l = len(m.Authority) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -2565,7 +2565,7 @@ func (m *MsgRemoveMarkets) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2593,7 +2593,7 @@ func (m *MsgRemoveMarkets) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Admin = string(dAtA[iNdEx:postIndex]) + m.Authority = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 {