diff --git a/.gitignore b/.gitignore index 01fd764c..27c1acce 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,6 @@ build/ DistributedIBE/ data/ devnet_data/ -github.com/ \ No newline at end of file +github.com/ +fairyring_contract/target/ +scripts/tests/fairyring_contract/target/ \ No newline at end of file diff --git a/api/fairyring/pep/query.pulsar.go b/api/fairyring/pep/query.pulsar.go index 04b17f56..87742372 100644 --- a/api/fairyring/pep/query.pulsar.go +++ b/api/fairyring/pep/query.pulsar.go @@ -10006,18 +10006,18 @@ func (x *fastReflection_QueryShowPrivateKeyshareReqResponse) ProtoMethods() *pro } var ( - md_QueryDecryptDataRequest protoreflect.MessageDescriptor - fd_QueryDecryptDataRequest_pubkey protoreflect.FieldDescriptor - fd_QueryDecryptDataRequest_aggrKeyshare protoreflect.FieldDescriptor - fd_QueryDecryptDataRequest_encryptedData protoreflect.FieldDescriptor + md_QueryDecryptDataRequest protoreflect.MessageDescriptor + fd_QueryDecryptDataRequest_pubkey protoreflect.FieldDescriptor + fd_QueryDecryptDataRequest_aggr_keyshare protoreflect.FieldDescriptor + fd_QueryDecryptDataRequest_encrypted_data protoreflect.FieldDescriptor ) func init() { file_fairyring_pep_query_proto_init() md_QueryDecryptDataRequest = File_fairyring_pep_query_proto.Messages().ByName("QueryDecryptDataRequest") fd_QueryDecryptDataRequest_pubkey = md_QueryDecryptDataRequest.Fields().ByName("pubkey") - fd_QueryDecryptDataRequest_aggrKeyshare = md_QueryDecryptDataRequest.Fields().ByName("aggrKeyshare") - fd_QueryDecryptDataRequest_encryptedData = md_QueryDecryptDataRequest.Fields().ByName("encryptedData") + fd_QueryDecryptDataRequest_aggr_keyshare = md_QueryDecryptDataRequest.Fields().ByName("aggr_keyshare") + fd_QueryDecryptDataRequest_encrypted_data = md_QueryDecryptDataRequest.Fields().ByName("encrypted_data") } var _ protoreflect.Message = (*fastReflection_QueryDecryptDataRequest)(nil) @@ -10093,13 +10093,13 @@ func (x *fastReflection_QueryDecryptDataRequest) Range(f func(protoreflect.Field } if x.AggrKeyshare != "" { value := protoreflect.ValueOfString(x.AggrKeyshare) - if !f(fd_QueryDecryptDataRequest_aggrKeyshare, value) { + if !f(fd_QueryDecryptDataRequest_aggr_keyshare, value) { return } } if x.EncryptedData != "" { value := protoreflect.ValueOfString(x.EncryptedData) - if !f(fd_QueryDecryptDataRequest_encryptedData, value) { + if !f(fd_QueryDecryptDataRequest_encrypted_data, value) { return } } @@ -10120,9 +10120,9 @@ func (x *fastReflection_QueryDecryptDataRequest) Has(fd protoreflect.FieldDescri switch fd.FullName() { case "fairyring.pep.QueryDecryptDataRequest.pubkey": return x.Pubkey != "" - case "fairyring.pep.QueryDecryptDataRequest.aggrKeyshare": + case "fairyring.pep.QueryDecryptDataRequest.aggr_keyshare": return x.AggrKeyshare != "" - case "fairyring.pep.QueryDecryptDataRequest.encryptedData": + case "fairyring.pep.QueryDecryptDataRequest.encrypted_data": return x.EncryptedData != "" default: if fd.IsExtension() { @@ -10142,9 +10142,9 @@ func (x *fastReflection_QueryDecryptDataRequest) Clear(fd protoreflect.FieldDesc switch fd.FullName() { case "fairyring.pep.QueryDecryptDataRequest.pubkey": x.Pubkey = "" - case "fairyring.pep.QueryDecryptDataRequest.aggrKeyshare": + case "fairyring.pep.QueryDecryptDataRequest.aggr_keyshare": x.AggrKeyshare = "" - case "fairyring.pep.QueryDecryptDataRequest.encryptedData": + case "fairyring.pep.QueryDecryptDataRequest.encrypted_data": x.EncryptedData = "" default: if fd.IsExtension() { @@ -10165,10 +10165,10 @@ func (x *fastReflection_QueryDecryptDataRequest) Get(descriptor protoreflect.Fie case "fairyring.pep.QueryDecryptDataRequest.pubkey": value := x.Pubkey return protoreflect.ValueOfString(value) - case "fairyring.pep.QueryDecryptDataRequest.aggrKeyshare": + case "fairyring.pep.QueryDecryptDataRequest.aggr_keyshare": value := x.AggrKeyshare return protoreflect.ValueOfString(value) - case "fairyring.pep.QueryDecryptDataRequest.encryptedData": + case "fairyring.pep.QueryDecryptDataRequest.encrypted_data": value := x.EncryptedData return protoreflect.ValueOfString(value) default: @@ -10193,9 +10193,9 @@ func (x *fastReflection_QueryDecryptDataRequest) Set(fd protoreflect.FieldDescri switch fd.FullName() { case "fairyring.pep.QueryDecryptDataRequest.pubkey": x.Pubkey = value.Interface().(string) - case "fairyring.pep.QueryDecryptDataRequest.aggrKeyshare": + case "fairyring.pep.QueryDecryptDataRequest.aggr_keyshare": x.AggrKeyshare = value.Interface().(string) - case "fairyring.pep.QueryDecryptDataRequest.encryptedData": + case "fairyring.pep.QueryDecryptDataRequest.encrypted_data": x.EncryptedData = value.Interface().(string) default: if fd.IsExtension() { @@ -10219,10 +10219,10 @@ func (x *fastReflection_QueryDecryptDataRequest) Mutable(fd protoreflect.FieldDe switch fd.FullName() { case "fairyring.pep.QueryDecryptDataRequest.pubkey": panic(fmt.Errorf("field pubkey of message fairyring.pep.QueryDecryptDataRequest is not mutable")) - case "fairyring.pep.QueryDecryptDataRequest.aggrKeyshare": - panic(fmt.Errorf("field aggrKeyshare of message fairyring.pep.QueryDecryptDataRequest is not mutable")) - case "fairyring.pep.QueryDecryptDataRequest.encryptedData": - panic(fmt.Errorf("field encryptedData of message fairyring.pep.QueryDecryptDataRequest is not mutable")) + case "fairyring.pep.QueryDecryptDataRequest.aggr_keyshare": + panic(fmt.Errorf("field aggr_keyshare of message fairyring.pep.QueryDecryptDataRequest is not mutable")) + case "fairyring.pep.QueryDecryptDataRequest.encrypted_data": + panic(fmt.Errorf("field encrypted_data of message fairyring.pep.QueryDecryptDataRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.QueryDecryptDataRequest")) @@ -10238,9 +10238,9 @@ func (x *fastReflection_QueryDecryptDataRequest) NewField(fd protoreflect.FieldD switch fd.FullName() { case "fairyring.pep.QueryDecryptDataRequest.pubkey": return protoreflect.ValueOfString("") - case "fairyring.pep.QueryDecryptDataRequest.aggrKeyshare": + case "fairyring.pep.QueryDecryptDataRequest.aggr_keyshare": return protoreflect.ValueOfString("") - case "fairyring.pep.QueryDecryptDataRequest.encryptedData": + case "fairyring.pep.QueryDecryptDataRequest.encrypted_data": return protoreflect.ValueOfString("") default: if fd.IsExtension() { @@ -11802,8 +11802,8 @@ type QueryDecryptDataRequest struct { unknownFields protoimpl.UnknownFields Pubkey string `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"` - AggrKeyshare string `protobuf:"bytes,2,opt,name=aggrKeyshare,proto3" json:"aggrKeyshare,omitempty"` - EncryptedData string `protobuf:"bytes,3,opt,name=encryptedData,proto3" json:"encryptedData,omitempty"` + AggrKeyshare string `protobuf:"bytes,2,opt,name=aggr_keyshare,json=aggrKeyshare,proto3" json:"aggr_keyshare,omitempty"` + EncryptedData string `protobuf:"bytes,3,opt,name=encrypted_data,json=encryptedData,proto3" json:"encrypted_data,omitempty"` } func (x *QueryDecryptDataRequest) Reset() { @@ -12040,140 +12040,141 @@ var file_fairyring_pep_query_proto_rawDesc = []byte{ 0x0b, 0x32, 0x23, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x52, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, - 0x64, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x22, 0x7b, 0x0a, 0x17, 0x51, 0x75, + 0x64, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x22, 0x7d, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x22, 0x0a, - 0x0c, 0x61, 0x67, 0x67, 0x72, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x67, 0x67, 0x72, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, - 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, - 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x22, 0x41, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, - 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x32, 0xec, 0x0d, 0x0a, 0x05, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x12, 0x6e, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x21, - 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x22, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, - 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, - 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x70, 0x65, 0x70, 0x2f, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0xa0, 0x01, 0x0a, 0x0b, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x65, 0x64, 0x54, 0x78, 0x12, 0x29, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, - 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2a, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, - 0x64, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x34, 0x12, 0x32, 0x2f, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2f, - 0x70, 0x65, 0x70, 0x2f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x78, - 0x2f, 0x7b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x7d, 0x2f, - 0x7b, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x7d, 0x12, 0x8c, 0x01, 0x0a, 0x0e, 0x45, 0x6e, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x65, 0x64, 0x54, 0x78, 0x41, 0x6c, 0x6c, 0x12, 0x29, 0x2e, 0x66, 0x61, 0x69, - 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x54, 0x78, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x23, 0x0a, + 0x0d, 0x61, 0x67, 0x67, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x67, 0x67, 0x72, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, + 0x72, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x22, 0x41, 0x0a, 0x18, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, + 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x32, 0xf7, 0x0d, 0x0a, + 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x6e, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x21, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, + 0x70, 0x65, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, + 0x15, 0x2f, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x70, 0x65, 0x70, 0x2f, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0xa0, 0x01, 0x0a, 0x0b, 0x45, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x65, 0x64, 0x54, 0x78, 0x12, 0x29, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, + 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x45, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2a, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, + 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x65, 0x64, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12, 0x32, 0x2f, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, + 0x67, 0x2f, 0x70, 0x65, 0x70, 0x2f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, + 0x74, 0x78, 0x2f, 0x7b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x7d, 0x2f, 0x7b, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x7d, 0x12, 0x8c, 0x01, 0x0a, 0x0e, 0x45, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x54, 0x78, 0x41, 0x6c, 0x6c, 0x12, 0x29, 0x2e, 0x66, + 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x54, 0x78, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, + 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, + 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x66, 0x61, + 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x70, 0x65, 0x70, 0x2f, 0x65, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x78, 0x12, 0xb9, 0x01, 0x0a, 0x18, 0x45, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x54, 0x78, 0x41, 0x6c, 0x6c, 0x46, 0x72, 0x6f, 0x6d, 0x48, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x33, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x45, 0x6e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x66, 0x61, 0x69, 0x72, - 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x70, 0x65, 0x70, 0x2f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x65, 0x64, 0x5f, 0x74, 0x78, 0x12, 0xb9, 0x01, 0x0a, 0x18, 0x45, 0x6e, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x65, 0x64, 0x54, 0x78, 0x41, 0x6c, 0x6c, 0x46, 0x72, 0x6f, 0x6d, 0x48, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x12, 0x33, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, - 0x70, 0x65, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x65, 0x64, 0x54, 0x78, 0x46, 0x72, 0x6f, 0x6d, 0x48, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x54, 0x78, 0x46, 0x72, 0x6f, 0x6d, 0x48, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x66, 0x61, 0x69, + 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x54, 0x78, 0x46, 0x72, + 0x6f, 0x6d, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x12, 0x2a, 0x2f, 0x66, 0x61, 0x69, 0x72, 0x79, + 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x70, 0x65, 0x70, 0x2f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x65, 0x64, 0x5f, 0x74, 0x78, 0x2f, 0x7b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x7d, 0x12, 0x87, 0x01, 0x0a, 0x0c, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x48, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x27, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, + 0x67, 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x61, 0x74, 0x65, 0x73, + 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, + 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, + 0x12, 0x1c, 0x2f, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x70, 0x65, 0x70, + 0x2f, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x87, + 0x01, 0x0a, 0x08, 0x50, 0x65, 0x70, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x26, 0x2e, 0x66, 0x61, + 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x47, 0x65, 0x74, 0x50, 0x65, 0x70, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, + 0x70, 0x65, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x50, 0x65, 0x70, 0x4e, + 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, + 0x2f, 0x70, 0x65, 0x70, 0x2f, 0x70, 0x65, 0x70, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x2f, 0x7b, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0x80, 0x01, 0x0a, 0x0b, 0x50, 0x65, 0x70, + 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x41, 0x6c, 0x6c, 0x12, 0x26, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, - 0x6c, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x54, 0x78, 0x46, 0x72, 0x6f, 0x6d, - 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x12, 0x2a, 0x2f, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, - 0x6e, 0x67, 0x2f, 0x70, 0x65, 0x70, 0x2f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, - 0x5f, 0x74, 0x78, 0x2f, 0x7b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x7d, 0x12, 0x87, 0x01, 0x0a, 0x0c, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x48, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x12, 0x27, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, - 0x70, 0x65, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x48, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x66, + 0x6c, 0x50, 0x65, 0x70, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x27, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x50, 0x65, 0x70, 0x4e, 0x6f, 0x6e, 0x63, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1a, 0x12, 0x18, 0x2f, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x70, 0x65, + 0x70, 0x2f, 0x70, 0x65, 0x70, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x6f, 0x0a, 0x06, 0x50, + 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x21, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, + 0x67, 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x75, 0x62, 0x4b, 0x65, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, + 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x75, + 0x62, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, + 0x2f, 0x70, 0x65, 0x70, 0x2f, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x12, 0x82, 0x01, 0x0a, + 0x0b, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x12, 0x23, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, - 0x2f, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x70, 0x65, 0x70, 0x2f, 0x6c, - 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x87, 0x01, 0x0a, - 0x08, 0x50, 0x65, 0x70, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x26, 0x2e, 0x66, 0x61, 0x69, 0x72, - 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, - 0x65, 0x74, 0x50, 0x65, 0x70, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x27, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, - 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x50, 0x65, 0x70, 0x4e, 0x6f, 0x6e, - 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x24, 0x12, 0x22, 0x2f, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x70, - 0x65, 0x70, 0x2f, 0x70, 0x65, 0x70, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x2f, 0x7b, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0x80, 0x01, 0x0a, 0x0b, 0x50, 0x65, 0x70, 0x4e, 0x6f, - 0x6e, 0x63, 0x65, 0x41, 0x6c, 0x6c, 0x12, 0x26, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, - 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x50, - 0x65, 0x70, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, - 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x50, 0x65, 0x70, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, - 0x18, 0x2f, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x70, 0x65, 0x70, 0x2f, - 0x70, 0x65, 0x70, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x6f, 0x0a, 0x06, 0x50, 0x75, 0x62, - 0x4b, 0x65, 0x79, 0x12, 0x21, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, - 0x70, 0x65, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, - 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x75, 0x62, 0x4b, - 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x18, 0x12, 0x16, 0x2f, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x70, - 0x65, 0x70, 0x2f, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x12, 0x82, 0x01, 0x0a, 0x0b, 0x4b, - 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x12, 0x23, 0x2e, 0x66, 0x61, 0x69, - 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x24, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, + 0x72, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x24, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, + 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, + 0x20, 0x2f, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x70, 0x65, 0x70, 0x2f, + 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x2f, 0x7b, 0x72, 0x65, 0x71, 0x5f, 0x69, 0x64, + 0x7d, 0x12, 0x82, 0x01, 0x0a, 0x0e, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, + 0x71, 0x41, 0x6c, 0x6c, 0x12, 0x26, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, + 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x4b, 0x65, 0x79, + 0x73, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x66, + 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x70, 0x65, 0x70, 0x2f, 0x6b, 0x65, - 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x2f, 0x7b, 0x72, 0x65, 0x71, 0x5f, 0x69, 0x64, 0x7d, 0x12, - 0x82, 0x01, 0x0a, 0x0e, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x41, - 0x6c, 0x6c, 0x12, 0x26, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, - 0x65, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x4b, 0x65, 0x79, 0x73, 0x68, - 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x66, 0x61, 0x69, - 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x41, 0x6c, 0x6c, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x66, 0x61, - 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x70, 0x65, 0x70, 0x2f, 0x6b, 0x65, 0x79, 0x73, - 0x68, 0x61, 0x72, 0x65, 0x12, 0xc3, 0x01, 0x0a, 0x16, 0x53, 0x68, 0x6f, 0x77, 0x50, 0x72, 0x69, - 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x12, - 0x31, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x68, 0x6f, 0x77, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, - 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, - 0x65, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x68, 0x6f, 0x77, 0x50, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3c, 0x12, 0x3a, - 0x2f, 0x46, 0x61, 0x69, 0x72, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x66, 0x61, 0x69, 0x72, 0x79, - 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x70, 0x65, 0x70, 0x2f, 0x73, 0x68, 0x6f, 0x77, 0x5f, 0x70, 0x72, - 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x5f, 0x72, - 0x65, 0x71, 0x2f, 0x7b, 0x72, 0x65, 0x71, 0x49, 0x64, 0x7d, 0x12, 0xac, 0x01, 0x0a, 0x0b, 0x44, - 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x26, 0x2e, 0x66, 0x61, 0x69, - 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, - 0x65, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x44, - 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4c, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x46, 0x12, 0x44, 0x2f, 0x46, 0x61, 0x69, 0x72, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, - 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x70, 0x65, 0x70, 0x2f, 0x64, 0x65, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x7b, 0x61, 0x67, 0x67, 0x72, - 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x7d, 0x2f, 0x7b, 0x65, 0x6e, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x7d, 0x42, 0x94, 0x01, 0x0a, 0x11, 0x63, 0x6f, - 0x6d, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x42, - 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x70, 0x65, 0x70, 0xa2, 0x02, 0x03, - 0x46, 0x50, 0x58, 0xaa, 0x02, 0x0d, 0x46, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, - 0x50, 0x65, 0x70, 0xca, 0x02, 0x0d, 0x46, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x5c, - 0x50, 0x65, 0x70, 0xe2, 0x02, 0x19, 0x46, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x5c, - 0x50, 0x65, 0x70, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x0e, 0x46, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x50, 0x65, 0x70, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x12, 0xc3, 0x01, 0x0a, 0x16, 0x53, 0x68, 0x6f, 0x77, 0x50, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, + 0x71, 0x12, 0x31, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, + 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x68, 0x6f, 0x77, 0x50, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, + 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x68, 0x6f, 0x77, 0x50, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3c, + 0x12, 0x3a, 0x2f, 0x46, 0x61, 0x69, 0x72, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x66, 0x61, 0x69, + 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x70, 0x65, 0x70, 0x2f, 0x73, 0x68, 0x6f, 0x77, 0x5f, + 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, + 0x5f, 0x72, 0x65, 0x71, 0x2f, 0x7b, 0x72, 0x65, 0x71, 0x49, 0x64, 0x7d, 0x12, 0xb7, 0x01, 0x0a, + 0x0b, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x26, 0x2e, 0x66, + 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, + 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x57, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x51, 0x12, 0x4f, 0x2f, 0x46, 0x61, 0x69, 0x72, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x2f, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x70, 0x65, 0x70, 0x2f, + 0x64, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x7b, 0x70, 0x75, + 0x62, 0x6b, 0x65, 0x79, 0x7d, 0x2f, 0x7b, 0x61, 0x67, 0x67, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x73, + 0x68, 0x61, 0x72, 0x65, 0x7d, 0x2f, 0x7b, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x7d, 0x42, 0x94, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x66, + 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x42, 0x0a, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x61, 0x69, + 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x70, 0x65, 0x70, 0xa2, 0x02, 0x03, 0x46, 0x50, 0x58, + 0xaa, 0x02, 0x0d, 0x46, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x50, 0x65, 0x70, + 0xca, 0x02, 0x0d, 0x46, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x5c, 0x50, 0x65, 0x70, + 0xe2, 0x02, 0x19, 0x46, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x5c, 0x50, 0x65, 0x70, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x46, + 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x50, 0x65, 0x70, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/fairyring/pep/request_id.pulsar.go b/api/fairyring/pep/request_id.pulsar.go index a0f16240..ecc62c54 100644 --- a/api/fairyring/pep/request_id.pulsar.go +++ b/api/fairyring/pep/request_id.pulsar.go @@ -1184,6 +1184,1596 @@ func (x *fastReflection_PrivateRequest) ProtoMethods() *protoiface.Methods { } } +var ( + md_ContractDetails protoreflect.MessageDescriptor + fd_ContractDetails_registrar protoreflect.FieldDescriptor + fd_ContractDetails_contract_address protoreflect.FieldDescriptor +) + +func init() { + file_fairyring_pep_request_id_proto_init() + md_ContractDetails = File_fairyring_pep_request_id_proto.Messages().ByName("ContractDetails") + fd_ContractDetails_registrar = md_ContractDetails.Fields().ByName("registrar") + fd_ContractDetails_contract_address = md_ContractDetails.Fields().ByName("contract_address") +} + +var _ protoreflect.Message = (*fastReflection_ContractDetails)(nil) + +type fastReflection_ContractDetails ContractDetails + +func (x *ContractDetails) ProtoReflect() protoreflect.Message { + return (*fastReflection_ContractDetails)(x) +} + +func (x *ContractDetails) slowProtoReflect() protoreflect.Message { + mi := &file_fairyring_pep_request_id_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ContractDetails_messageType fastReflection_ContractDetails_messageType +var _ protoreflect.MessageType = fastReflection_ContractDetails_messageType{} + +type fastReflection_ContractDetails_messageType struct{} + +func (x fastReflection_ContractDetails_messageType) Zero() protoreflect.Message { + return (*fastReflection_ContractDetails)(nil) +} +func (x fastReflection_ContractDetails_messageType) New() protoreflect.Message { + return new(fastReflection_ContractDetails) +} +func (x fastReflection_ContractDetails_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ContractDetails +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ContractDetails) Descriptor() protoreflect.MessageDescriptor { + return md_ContractDetails +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ContractDetails) Type() protoreflect.MessageType { + return _fastReflection_ContractDetails_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ContractDetails) New() protoreflect.Message { + return new(fastReflection_ContractDetails) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ContractDetails) Interface() protoreflect.ProtoMessage { + return (*ContractDetails)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ContractDetails) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Registrar != "" { + value := protoreflect.ValueOfString(x.Registrar) + if !f(fd_ContractDetails_registrar, value) { + return + } + } + if x.ContractAddress != "" { + value := protoreflect.ValueOfString(x.ContractAddress) + if !f(fd_ContractDetails_contract_address, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ContractDetails) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "fairyring.pep.ContractDetails.registrar": + return x.Registrar != "" + case "fairyring.pep.ContractDetails.contract_address": + return x.ContractAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.ContractDetails")) + } + panic(fmt.Errorf("message fairyring.pep.ContractDetails does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ContractDetails) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "fairyring.pep.ContractDetails.registrar": + x.Registrar = "" + case "fairyring.pep.ContractDetails.contract_address": + x.ContractAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.ContractDetails")) + } + panic(fmt.Errorf("message fairyring.pep.ContractDetails does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ContractDetails) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "fairyring.pep.ContractDetails.registrar": + value := x.Registrar + return protoreflect.ValueOfString(value) + case "fairyring.pep.ContractDetails.contract_address": + value := x.ContractAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.ContractDetails")) + } + panic(fmt.Errorf("message fairyring.pep.ContractDetails does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ContractDetails) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "fairyring.pep.ContractDetails.registrar": + x.Registrar = value.Interface().(string) + case "fairyring.pep.ContractDetails.contract_address": + x.ContractAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.ContractDetails")) + } + panic(fmt.Errorf("message fairyring.pep.ContractDetails does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ContractDetails) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "fairyring.pep.ContractDetails.registrar": + panic(fmt.Errorf("field registrar of message fairyring.pep.ContractDetails is not mutable")) + case "fairyring.pep.ContractDetails.contract_address": + panic(fmt.Errorf("field contract_address of message fairyring.pep.ContractDetails is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.ContractDetails")) + } + panic(fmt.Errorf("message fairyring.pep.ContractDetails does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ContractDetails) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "fairyring.pep.ContractDetails.registrar": + return protoreflect.ValueOfString("") + case "fairyring.pep.ContractDetails.contract_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.ContractDetails")) + } + panic(fmt.Errorf("message fairyring.pep.ContractDetails does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ContractDetails) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in fairyring.pep.ContractDetails", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ContractDetails) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ContractDetails) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ContractDetails) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ContractDetails) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ContractDetails) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Registrar) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ContractAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ContractDetails) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.ContractAddress) > 0 { + i -= len(x.ContractAddress) + copy(dAtA[i:], x.ContractAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ContractAddress))) + i-- + dAtA[i] = 0x12 + } + if len(x.Registrar) > 0 { + i -= len(x.Registrar) + copy(dAtA[i:], x.Registrar) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Registrar))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ContractDetails) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ContractDetails: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ContractDetails: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Registrar", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Registrar = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_RegisteredContract_2_list)(nil) + +type _RegisteredContract_2_list struct { + list *[]*ContractDetails +} + +func (x *_RegisteredContract_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_RegisteredContract_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_RegisteredContract_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ContractDetails) + (*x.list)[i] = concreteValue +} + +func (x *_RegisteredContract_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ContractDetails) + *x.list = append(*x.list, concreteValue) +} + +func (x *_RegisteredContract_2_list) AppendMutable() protoreflect.Value { + v := new(ContractDetails) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_RegisteredContract_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_RegisteredContract_2_list) NewElement() protoreflect.Value { + v := new(ContractDetails) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_RegisteredContract_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_RegisteredContract protoreflect.MessageDescriptor + fd_RegisteredContract_identity protoreflect.FieldDescriptor + fd_RegisteredContract_contracts protoreflect.FieldDescriptor +) + +func init() { + file_fairyring_pep_request_id_proto_init() + md_RegisteredContract = File_fairyring_pep_request_id_proto.Messages().ByName("RegisteredContract") + fd_RegisteredContract_identity = md_RegisteredContract.Fields().ByName("identity") + fd_RegisteredContract_contracts = md_RegisteredContract.Fields().ByName("contracts") +} + +var _ protoreflect.Message = (*fastReflection_RegisteredContract)(nil) + +type fastReflection_RegisteredContract RegisteredContract + +func (x *RegisteredContract) ProtoReflect() protoreflect.Message { + return (*fastReflection_RegisteredContract)(x) +} + +func (x *RegisteredContract) slowProtoReflect() protoreflect.Message { + mi := &file_fairyring_pep_request_id_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_RegisteredContract_messageType fastReflection_RegisteredContract_messageType +var _ protoreflect.MessageType = fastReflection_RegisteredContract_messageType{} + +type fastReflection_RegisteredContract_messageType struct{} + +func (x fastReflection_RegisteredContract_messageType) Zero() protoreflect.Message { + return (*fastReflection_RegisteredContract)(nil) +} +func (x fastReflection_RegisteredContract_messageType) New() protoreflect.Message { + return new(fastReflection_RegisteredContract) +} +func (x fastReflection_RegisteredContract_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_RegisteredContract +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_RegisteredContract) Descriptor() protoreflect.MessageDescriptor { + return md_RegisteredContract +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_RegisteredContract) Type() protoreflect.MessageType { + return _fastReflection_RegisteredContract_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_RegisteredContract) New() protoreflect.Message { + return new(fastReflection_RegisteredContract) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_RegisteredContract) Interface() protoreflect.ProtoMessage { + return (*RegisteredContract)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_RegisteredContract) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Identity != "" { + value := protoreflect.ValueOfString(x.Identity) + if !f(fd_RegisteredContract_identity, value) { + return + } + } + if len(x.Contracts) != 0 { + value := protoreflect.ValueOfList(&_RegisteredContract_2_list{list: &x.Contracts}) + if !f(fd_RegisteredContract_contracts, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_RegisteredContract) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "fairyring.pep.RegisteredContract.identity": + return x.Identity != "" + case "fairyring.pep.RegisteredContract.contracts": + return len(x.Contracts) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.RegisteredContract")) + } + panic(fmt.Errorf("message fairyring.pep.RegisteredContract does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_RegisteredContract) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "fairyring.pep.RegisteredContract.identity": + x.Identity = "" + case "fairyring.pep.RegisteredContract.contracts": + x.Contracts = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.RegisteredContract")) + } + panic(fmt.Errorf("message fairyring.pep.RegisteredContract does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_RegisteredContract) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "fairyring.pep.RegisteredContract.identity": + value := x.Identity + return protoreflect.ValueOfString(value) + case "fairyring.pep.RegisteredContract.contracts": + if len(x.Contracts) == 0 { + return protoreflect.ValueOfList(&_RegisteredContract_2_list{}) + } + listValue := &_RegisteredContract_2_list{list: &x.Contracts} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.RegisteredContract")) + } + panic(fmt.Errorf("message fairyring.pep.RegisteredContract does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_RegisteredContract) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "fairyring.pep.RegisteredContract.identity": + x.Identity = value.Interface().(string) + case "fairyring.pep.RegisteredContract.contracts": + lv := value.List() + clv := lv.(*_RegisteredContract_2_list) + x.Contracts = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.RegisteredContract")) + } + panic(fmt.Errorf("message fairyring.pep.RegisteredContract does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_RegisteredContract) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "fairyring.pep.RegisteredContract.contracts": + if x.Contracts == nil { + x.Contracts = []*ContractDetails{} + } + value := &_RegisteredContract_2_list{list: &x.Contracts} + return protoreflect.ValueOfList(value) + case "fairyring.pep.RegisteredContract.identity": + panic(fmt.Errorf("field identity of message fairyring.pep.RegisteredContract is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.RegisteredContract")) + } + panic(fmt.Errorf("message fairyring.pep.RegisteredContract does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_RegisteredContract) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "fairyring.pep.RegisteredContract.identity": + return protoreflect.ValueOfString("") + case "fairyring.pep.RegisteredContract.contracts": + list := []*ContractDetails{} + return protoreflect.ValueOfList(&_RegisteredContract_2_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.RegisteredContract")) + } + panic(fmt.Errorf("message fairyring.pep.RegisteredContract does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_RegisteredContract) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in fairyring.pep.RegisteredContract", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_RegisteredContract) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_RegisteredContract) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_RegisteredContract) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_RegisteredContract) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*RegisteredContract) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Identity) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Contracts) > 0 { + for _, e := range x.Contracts { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*RegisteredContract) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Contracts) > 0 { + for iNdEx := len(x.Contracts) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Contracts[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if len(x.Identity) > 0 { + i -= len(x.Identity) + copy(dAtA[i:], x.Identity) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Identity))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*RegisteredContract) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RegisteredContract: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RegisteredContract: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Identity = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Contracts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Contracts = append(x.Contracts, &ContractDetails{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Contracts[len(x.Contracts)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_ExecuteContractMsg protoreflect.MessageDescriptor + fd_ExecuteContractMsg_identity protoreflect.FieldDescriptor + fd_ExecuteContractMsg_pubkey protoreflect.FieldDescriptor + fd_ExecuteContractMsg_aggr_keyshare protoreflect.FieldDescriptor +) + +func init() { + file_fairyring_pep_request_id_proto_init() + md_ExecuteContractMsg = File_fairyring_pep_request_id_proto.Messages().ByName("ExecuteContractMsg") + fd_ExecuteContractMsg_identity = md_ExecuteContractMsg.Fields().ByName("identity") + fd_ExecuteContractMsg_pubkey = md_ExecuteContractMsg.Fields().ByName("pubkey") + fd_ExecuteContractMsg_aggr_keyshare = md_ExecuteContractMsg.Fields().ByName("aggr_keyshare") +} + +var _ protoreflect.Message = (*fastReflection_ExecuteContractMsg)(nil) + +type fastReflection_ExecuteContractMsg ExecuteContractMsg + +func (x *ExecuteContractMsg) ProtoReflect() protoreflect.Message { + return (*fastReflection_ExecuteContractMsg)(x) +} + +func (x *ExecuteContractMsg) slowProtoReflect() protoreflect.Message { + mi := &file_fairyring_pep_request_id_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ExecuteContractMsg_messageType fastReflection_ExecuteContractMsg_messageType +var _ protoreflect.MessageType = fastReflection_ExecuteContractMsg_messageType{} + +type fastReflection_ExecuteContractMsg_messageType struct{} + +func (x fastReflection_ExecuteContractMsg_messageType) Zero() protoreflect.Message { + return (*fastReflection_ExecuteContractMsg)(nil) +} +func (x fastReflection_ExecuteContractMsg_messageType) New() protoreflect.Message { + return new(fastReflection_ExecuteContractMsg) +} +func (x fastReflection_ExecuteContractMsg_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ExecuteContractMsg +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ExecuteContractMsg) Descriptor() protoreflect.MessageDescriptor { + return md_ExecuteContractMsg +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ExecuteContractMsg) Type() protoreflect.MessageType { + return _fastReflection_ExecuteContractMsg_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ExecuteContractMsg) New() protoreflect.Message { + return new(fastReflection_ExecuteContractMsg) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ExecuteContractMsg) Interface() protoreflect.ProtoMessage { + return (*ExecuteContractMsg)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ExecuteContractMsg) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Identity != "" { + value := protoreflect.ValueOfString(x.Identity) + if !f(fd_ExecuteContractMsg_identity, value) { + return + } + } + if x.Pubkey != "" { + value := protoreflect.ValueOfString(x.Pubkey) + if !f(fd_ExecuteContractMsg_pubkey, value) { + return + } + } + if x.AggrKeyshare != "" { + value := protoreflect.ValueOfString(x.AggrKeyshare) + if !f(fd_ExecuteContractMsg_aggr_keyshare, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ExecuteContractMsg) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "fairyring.pep.ExecuteContractMsg.identity": + return x.Identity != "" + case "fairyring.pep.ExecuteContractMsg.pubkey": + return x.Pubkey != "" + case "fairyring.pep.ExecuteContractMsg.aggr_keyshare": + return x.AggrKeyshare != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.ExecuteContractMsg")) + } + panic(fmt.Errorf("message fairyring.pep.ExecuteContractMsg does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ExecuteContractMsg) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "fairyring.pep.ExecuteContractMsg.identity": + x.Identity = "" + case "fairyring.pep.ExecuteContractMsg.pubkey": + x.Pubkey = "" + case "fairyring.pep.ExecuteContractMsg.aggr_keyshare": + x.AggrKeyshare = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.ExecuteContractMsg")) + } + panic(fmt.Errorf("message fairyring.pep.ExecuteContractMsg does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ExecuteContractMsg) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "fairyring.pep.ExecuteContractMsg.identity": + value := x.Identity + return protoreflect.ValueOfString(value) + case "fairyring.pep.ExecuteContractMsg.pubkey": + value := x.Pubkey + return protoreflect.ValueOfString(value) + case "fairyring.pep.ExecuteContractMsg.aggr_keyshare": + value := x.AggrKeyshare + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.ExecuteContractMsg")) + } + panic(fmt.Errorf("message fairyring.pep.ExecuteContractMsg does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ExecuteContractMsg) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "fairyring.pep.ExecuteContractMsg.identity": + x.Identity = value.Interface().(string) + case "fairyring.pep.ExecuteContractMsg.pubkey": + x.Pubkey = value.Interface().(string) + case "fairyring.pep.ExecuteContractMsg.aggr_keyshare": + x.AggrKeyshare = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.ExecuteContractMsg")) + } + panic(fmt.Errorf("message fairyring.pep.ExecuteContractMsg does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ExecuteContractMsg) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "fairyring.pep.ExecuteContractMsg.identity": + panic(fmt.Errorf("field identity of message fairyring.pep.ExecuteContractMsg is not mutable")) + case "fairyring.pep.ExecuteContractMsg.pubkey": + panic(fmt.Errorf("field pubkey of message fairyring.pep.ExecuteContractMsg is not mutable")) + case "fairyring.pep.ExecuteContractMsg.aggr_keyshare": + panic(fmt.Errorf("field aggr_keyshare of message fairyring.pep.ExecuteContractMsg is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.ExecuteContractMsg")) + } + panic(fmt.Errorf("message fairyring.pep.ExecuteContractMsg does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ExecuteContractMsg) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "fairyring.pep.ExecuteContractMsg.identity": + return protoreflect.ValueOfString("") + case "fairyring.pep.ExecuteContractMsg.pubkey": + return protoreflect.ValueOfString("") + case "fairyring.pep.ExecuteContractMsg.aggr_keyshare": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.ExecuteContractMsg")) + } + panic(fmt.Errorf("message fairyring.pep.ExecuteContractMsg does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ExecuteContractMsg) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in fairyring.pep.ExecuteContractMsg", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ExecuteContractMsg) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ExecuteContractMsg) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ExecuteContractMsg) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ExecuteContractMsg) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ExecuteContractMsg) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Identity) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Pubkey) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.AggrKeyshare) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ExecuteContractMsg) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.AggrKeyshare) > 0 { + i -= len(x.AggrKeyshare) + copy(dAtA[i:], x.AggrKeyshare) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AggrKeyshare))) + i-- + dAtA[i] = 0x1a + } + if len(x.Pubkey) > 0 { + i -= len(x.Pubkey) + copy(dAtA[i:], x.Pubkey) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Pubkey))) + i-- + dAtA[i] = 0x12 + } + if len(x.Identity) > 0 { + i -= len(x.Identity) + copy(dAtA[i:], x.Identity) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Identity))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ExecuteContractMsg) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ExecuteContractMsg: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ExecuteContractMsg: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Identity = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pubkey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Pubkey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AggrKeyshare", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.AggrKeyshare = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -1299,6 +2889,143 @@ func (x *PrivateRequest) GetEncryptedKeyshares() []*common.EncryptedKeyshare { return nil } +type ContractDetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Registrar string `protobuf:"bytes,1,opt,name=registrar,proto3" json:"registrar,omitempty"` + ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` +} + +func (x *ContractDetails) Reset() { + *x = ContractDetails{} + if protoimpl.UnsafeEnabled { + mi := &file_fairyring_pep_request_id_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContractDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContractDetails) ProtoMessage() {} + +// Deprecated: Use ContractDetails.ProtoReflect.Descriptor instead. +func (*ContractDetails) Descriptor() ([]byte, []int) { + return file_fairyring_pep_request_id_proto_rawDescGZIP(), []int{2} +} + +func (x *ContractDetails) GetRegistrar() string { + if x != nil { + return x.Registrar + } + return "" +} + +func (x *ContractDetails) GetContractAddress() string { + if x != nil { + return x.ContractAddress + } + return "" +} + +type RegisteredContract struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + Contracts []*ContractDetails `protobuf:"bytes,2,rep,name=contracts,proto3" json:"contracts,omitempty"` +} + +func (x *RegisteredContract) Reset() { + *x = RegisteredContract{} + if protoimpl.UnsafeEnabled { + mi := &file_fairyring_pep_request_id_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegisteredContract) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisteredContract) ProtoMessage() {} + +// Deprecated: Use RegisteredContract.ProtoReflect.Descriptor instead. +func (*RegisteredContract) Descriptor() ([]byte, []int) { + return file_fairyring_pep_request_id_proto_rawDescGZIP(), []int{3} +} + +func (x *RegisteredContract) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +func (x *RegisteredContract) GetContracts() []*ContractDetails { + if x != nil { + return x.Contracts + } + return nil +} + +type ExecuteContractMsg struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + Pubkey string `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey,omitempty"` + AggrKeyshare string `protobuf:"bytes,3,opt,name=aggr_keyshare,json=aggrKeyshare,proto3" json:"aggr_keyshare,omitempty"` +} + +func (x *ExecuteContractMsg) Reset() { + *x = ExecuteContractMsg{} + if protoimpl.UnsafeEnabled { + mi := &file_fairyring_pep_request_id_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecuteContractMsg) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecuteContractMsg) ProtoMessage() {} + +// Deprecated: Use ExecuteContractMsg.ProtoReflect.Descriptor instead. +func (*ExecuteContractMsg) Descriptor() ([]byte, []int) { + return file_fairyring_pep_request_id_proto_rawDescGZIP(), []int{4} +} + +func (x *ExecuteContractMsg) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +func (x *ExecuteContractMsg) GetPubkey() string { + if x != nil { + return x.Pubkey + } + return "" +} + +func (x *ExecuteContractMsg) GetAggrKeyshare() string { + if x != nil { + return x.AggrKeyshare + } + return "" +} + var File_fairyring_pep_request_id_proto protoreflect.FileDescriptor var file_fairyring_pep_request_id_proto_rawDesc = []byte{ @@ -1323,17 +3050,37 @@ var file_fairyring_pep_request_id_proto_rawDesc = []byte{ 0x32, 0x23, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x52, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, - 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x42, 0x98, 0x01, 0x0a, 0x11, 0x63, 0x6f, - 0x6d, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x42, - 0x0e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x70, 0x65, - 0x70, 0xa2, 0x02, 0x03, 0x46, 0x50, 0x58, 0xaa, 0x02, 0x0d, 0x46, 0x61, 0x69, 0x72, 0x79, 0x72, - 0x69, 0x6e, 0x67, 0x2e, 0x50, 0x65, 0x70, 0xca, 0x02, 0x0d, 0x46, 0x61, 0x69, 0x72, 0x79, 0x72, - 0x69, 0x6e, 0x67, 0x5c, 0x50, 0x65, 0x70, 0xe2, 0x02, 0x19, 0x46, 0x61, 0x69, 0x72, 0x79, 0x72, - 0x69, 0x6e, 0x67, 0x5c, 0x50, 0x65, 0x70, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x46, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x3a, - 0x3a, 0x50, 0x65, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x22, 0x5a, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x1c, 0x0a, 0x09, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x6e, 0x0a, 0x12, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x3c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x61, 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x66, 0x61, 0x69, + 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, + 0x61, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x61, 0x63, 0x74, 0x73, 0x22, 0x6d, 0x0a, 0x12, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x4d, 0x73, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, + 0x23, 0x0a, 0x0d, 0x61, 0x67, 0x67, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x67, 0x67, 0x72, 0x4b, 0x65, 0x79, 0x73, + 0x68, 0x61, 0x72, 0x65, 0x42, 0x98, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x61, 0x69, + 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x42, 0x0e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x49, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, + 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x70, 0x65, 0x70, 0xa2, 0x02, 0x03, 0x46, + 0x50, 0x58, 0xaa, 0x02, 0x0d, 0x46, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x50, + 0x65, 0x70, 0xca, 0x02, 0x0d, 0x46, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x5c, 0x50, + 0x65, 0x70, 0xe2, 0x02, 0x19, 0x46, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x5c, 0x50, + 0x65, 0x70, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x0e, 0x46, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x50, 0x65, 0x70, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1348,19 +3095,23 @@ func file_fairyring_pep_request_id_proto_rawDescGZIP() []byte { return file_fairyring_pep_request_id_proto_rawDescData } -var file_fairyring_pep_request_id_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_fairyring_pep_request_id_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_fairyring_pep_request_id_proto_goTypes = []interface{}{ (*RequestId)(nil), // 0: fairyring.pep.RequestId (*PrivateRequest)(nil), // 1: fairyring.pep.PrivateRequest - (*common.EncryptedKeyshare)(nil), // 2: fairyring.common.EncryptedKeyshare + (*ContractDetails)(nil), // 2: fairyring.pep.ContractDetails + (*RegisteredContract)(nil), // 3: fairyring.pep.RegisteredContract + (*ExecuteContractMsg)(nil), // 4: fairyring.pep.ExecuteContractMsg + (*common.EncryptedKeyshare)(nil), // 5: fairyring.common.EncryptedKeyshare } var file_fairyring_pep_request_id_proto_depIdxs = []int32{ - 2, // 0: fairyring.pep.PrivateRequest.encrypted_keyshares:type_name -> fairyring.common.EncryptedKeyshare - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 5, // 0: fairyring.pep.PrivateRequest.encrypted_keyshares:type_name -> fairyring.common.EncryptedKeyshare + 2, // 1: fairyring.pep.RegisteredContract.contracts:type_name -> fairyring.pep.ContractDetails + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_fairyring_pep_request_id_proto_init() } @@ -1393,6 +3144,42 @@ func file_fairyring_pep_request_id_proto_init() { return nil } } + file_fairyring_pep_request_id_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContractDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_fairyring_pep_request_id_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisteredContract); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_fairyring_pep_request_id_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecuteContractMsg); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -1400,7 +3187,7 @@ func file_fairyring_pep_request_id_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_fairyring_pep_request_id_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 5, NumExtensions: 0, NumServices: 0, }, diff --git a/api/fairyring/pep/tx.pulsar.go b/api/fairyring/pep/tx.pulsar.go index e1d052aa..9035a68e 100644 --- a/api/fairyring/pep/tx.pulsar.go +++ b/api/fairyring/pep/tx.pulsar.go @@ -6828,6 +6828,1814 @@ func (x *fastReflection_MsgGetPrivateKeysharesResponse) ProtoMethods() *protoifa } } +var ( + md_MsgRegisterContract protoreflect.MessageDescriptor + fd_MsgRegisterContract_creator protoreflect.FieldDescriptor + fd_MsgRegisterContract_contract_address protoreflect.FieldDescriptor + fd_MsgRegisterContract_identity protoreflect.FieldDescriptor +) + +func init() { + file_fairyring_pep_tx_proto_init() + md_MsgRegisterContract = File_fairyring_pep_tx_proto.Messages().ByName("MsgRegisterContract") + fd_MsgRegisterContract_creator = md_MsgRegisterContract.Fields().ByName("creator") + fd_MsgRegisterContract_contract_address = md_MsgRegisterContract.Fields().ByName("contract_address") + fd_MsgRegisterContract_identity = md_MsgRegisterContract.Fields().ByName("identity") +} + +var _ protoreflect.Message = (*fastReflection_MsgRegisterContract)(nil) + +type fastReflection_MsgRegisterContract MsgRegisterContract + +func (x *MsgRegisterContract) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRegisterContract)(x) +} + +func (x *MsgRegisterContract) slowProtoReflect() protoreflect.Message { + mi := &file_fairyring_pep_tx_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgRegisterContract_messageType fastReflection_MsgRegisterContract_messageType +var _ protoreflect.MessageType = fastReflection_MsgRegisterContract_messageType{} + +type fastReflection_MsgRegisterContract_messageType struct{} + +func (x fastReflection_MsgRegisterContract_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRegisterContract)(nil) +} +func (x fastReflection_MsgRegisterContract_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRegisterContract) +} +func (x fastReflection_MsgRegisterContract_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterContract +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRegisterContract) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterContract +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgRegisterContract) Type() protoreflect.MessageType { + return _fastReflection_MsgRegisterContract_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRegisterContract) New() protoreflect.Message { + return new(fastReflection_MsgRegisterContract) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRegisterContract) Interface() protoreflect.ProtoMessage { + return (*MsgRegisterContract)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgRegisterContract) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Creator != "" { + value := protoreflect.ValueOfString(x.Creator) + if !f(fd_MsgRegisterContract_creator, value) { + return + } + } + if x.ContractAddress != "" { + value := protoreflect.ValueOfString(x.ContractAddress) + if !f(fd_MsgRegisterContract_contract_address, value) { + return + } + } + if x.Identity != "" { + value := protoreflect.ValueOfString(x.Identity) + if !f(fd_MsgRegisterContract_identity, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgRegisterContract) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "fairyring.pep.MsgRegisterContract.creator": + return x.Creator != "" + case "fairyring.pep.MsgRegisterContract.contract_address": + return x.ContractAddress != "" + case "fairyring.pep.MsgRegisterContract.identity": + return x.Identity != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.MsgRegisterContract")) + } + panic(fmt.Errorf("message fairyring.pep.MsgRegisterContract does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterContract) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "fairyring.pep.MsgRegisterContract.creator": + x.Creator = "" + case "fairyring.pep.MsgRegisterContract.contract_address": + x.ContractAddress = "" + case "fairyring.pep.MsgRegisterContract.identity": + x.Identity = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.MsgRegisterContract")) + } + panic(fmt.Errorf("message fairyring.pep.MsgRegisterContract does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgRegisterContract) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "fairyring.pep.MsgRegisterContract.creator": + value := x.Creator + return protoreflect.ValueOfString(value) + case "fairyring.pep.MsgRegisterContract.contract_address": + value := x.ContractAddress + return protoreflect.ValueOfString(value) + case "fairyring.pep.MsgRegisterContract.identity": + value := x.Identity + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.MsgRegisterContract")) + } + panic(fmt.Errorf("message fairyring.pep.MsgRegisterContract does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterContract) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "fairyring.pep.MsgRegisterContract.creator": + x.Creator = value.Interface().(string) + case "fairyring.pep.MsgRegisterContract.contract_address": + x.ContractAddress = value.Interface().(string) + case "fairyring.pep.MsgRegisterContract.identity": + x.Identity = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.MsgRegisterContract")) + } + panic(fmt.Errorf("message fairyring.pep.MsgRegisterContract does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterContract) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "fairyring.pep.MsgRegisterContract.creator": + panic(fmt.Errorf("field creator of message fairyring.pep.MsgRegisterContract is not mutable")) + case "fairyring.pep.MsgRegisterContract.contract_address": + panic(fmt.Errorf("field contract_address of message fairyring.pep.MsgRegisterContract is not mutable")) + case "fairyring.pep.MsgRegisterContract.identity": + panic(fmt.Errorf("field identity of message fairyring.pep.MsgRegisterContract is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.MsgRegisterContract")) + } + panic(fmt.Errorf("message fairyring.pep.MsgRegisterContract does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgRegisterContract) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "fairyring.pep.MsgRegisterContract.creator": + return protoreflect.ValueOfString("") + case "fairyring.pep.MsgRegisterContract.contract_address": + return protoreflect.ValueOfString("") + case "fairyring.pep.MsgRegisterContract.identity": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.MsgRegisterContract")) + } + panic(fmt.Errorf("message fairyring.pep.MsgRegisterContract does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgRegisterContract) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in fairyring.pep.MsgRegisterContract", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgRegisterContract) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterContract) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgRegisterContract) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgRegisterContract) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgRegisterContract) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Creator) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ContractAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Identity) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgRegisterContract) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Identity) > 0 { + i -= len(x.Identity) + copy(dAtA[i:], x.Identity) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Identity))) + i-- + dAtA[i] = 0x1a + } + if len(x.ContractAddress) > 0 { + i -= len(x.ContractAddress) + copy(dAtA[i:], x.ContractAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ContractAddress))) + i-- + dAtA[i] = 0x12 + } + if len(x.Creator) > 0 { + i -= len(x.Creator) + copy(dAtA[i:], x.Creator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgRegisterContract) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterContract: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterContract: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Identity = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgRegisterContractResponse protoreflect.MessageDescriptor +) + +func init() { + file_fairyring_pep_tx_proto_init() + md_MsgRegisterContractResponse = File_fairyring_pep_tx_proto.Messages().ByName("MsgRegisterContractResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgRegisterContractResponse)(nil) + +type fastReflection_MsgRegisterContractResponse MsgRegisterContractResponse + +func (x *MsgRegisterContractResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRegisterContractResponse)(x) +} + +func (x *MsgRegisterContractResponse) slowProtoReflect() protoreflect.Message { + mi := &file_fairyring_pep_tx_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgRegisterContractResponse_messageType fastReflection_MsgRegisterContractResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgRegisterContractResponse_messageType{} + +type fastReflection_MsgRegisterContractResponse_messageType struct{} + +func (x fastReflection_MsgRegisterContractResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRegisterContractResponse)(nil) +} +func (x fastReflection_MsgRegisterContractResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRegisterContractResponse) +} +func (x fastReflection_MsgRegisterContractResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterContractResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRegisterContractResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterContractResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgRegisterContractResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgRegisterContractResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRegisterContractResponse) New() protoreflect.Message { + return new(fastReflection_MsgRegisterContractResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRegisterContractResponse) Interface() protoreflect.ProtoMessage { + return (*MsgRegisterContractResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgRegisterContractResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgRegisterContractResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.MsgRegisterContractResponse")) + } + panic(fmt.Errorf("message fairyring.pep.MsgRegisterContractResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterContractResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.MsgRegisterContractResponse")) + } + panic(fmt.Errorf("message fairyring.pep.MsgRegisterContractResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgRegisterContractResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.MsgRegisterContractResponse")) + } + panic(fmt.Errorf("message fairyring.pep.MsgRegisterContractResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterContractResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.MsgRegisterContractResponse")) + } + panic(fmt.Errorf("message fairyring.pep.MsgRegisterContractResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterContractResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.MsgRegisterContractResponse")) + } + panic(fmt.Errorf("message fairyring.pep.MsgRegisterContractResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgRegisterContractResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.MsgRegisterContractResponse")) + } + panic(fmt.Errorf("message fairyring.pep.MsgRegisterContractResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgRegisterContractResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in fairyring.pep.MsgRegisterContractResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgRegisterContractResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterContractResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgRegisterContractResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgRegisterContractResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgRegisterContractResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgRegisterContractResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgRegisterContractResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterContractResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterContractResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgUnregisterContract protoreflect.MessageDescriptor + fd_MsgUnregisterContract_creator protoreflect.FieldDescriptor + fd_MsgUnregisterContract_contract_address protoreflect.FieldDescriptor + fd_MsgUnregisterContract_identity protoreflect.FieldDescriptor +) + +func init() { + file_fairyring_pep_tx_proto_init() + md_MsgUnregisterContract = File_fairyring_pep_tx_proto.Messages().ByName("MsgUnregisterContract") + fd_MsgUnregisterContract_creator = md_MsgUnregisterContract.Fields().ByName("creator") + fd_MsgUnregisterContract_contract_address = md_MsgUnregisterContract.Fields().ByName("contract_address") + fd_MsgUnregisterContract_identity = md_MsgUnregisterContract.Fields().ByName("identity") +} + +var _ protoreflect.Message = (*fastReflection_MsgUnregisterContract)(nil) + +type fastReflection_MsgUnregisterContract MsgUnregisterContract + +func (x *MsgUnregisterContract) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUnregisterContract)(x) +} + +func (x *MsgUnregisterContract) slowProtoReflect() protoreflect.Message { + mi := &file_fairyring_pep_tx_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUnregisterContract_messageType fastReflection_MsgUnregisterContract_messageType +var _ protoreflect.MessageType = fastReflection_MsgUnregisterContract_messageType{} + +type fastReflection_MsgUnregisterContract_messageType struct{} + +func (x fastReflection_MsgUnregisterContract_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUnregisterContract)(nil) +} +func (x fastReflection_MsgUnregisterContract_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUnregisterContract) +} +func (x fastReflection_MsgUnregisterContract_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUnregisterContract +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUnregisterContract) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUnregisterContract +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgUnregisterContract) Type() protoreflect.MessageType { + return _fastReflection_MsgUnregisterContract_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUnregisterContract) New() protoreflect.Message { + return new(fastReflection_MsgUnregisterContract) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUnregisterContract) Interface() protoreflect.ProtoMessage { + return (*MsgUnregisterContract)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgUnregisterContract) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Creator != "" { + value := protoreflect.ValueOfString(x.Creator) + if !f(fd_MsgUnregisterContract_creator, value) { + return + } + } + if x.ContractAddress != "" { + value := protoreflect.ValueOfString(x.ContractAddress) + if !f(fd_MsgUnregisterContract_contract_address, value) { + return + } + } + if x.Identity != "" { + value := protoreflect.ValueOfString(x.Identity) + if !f(fd_MsgUnregisterContract_identity, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgUnregisterContract) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "fairyring.pep.MsgUnregisterContract.creator": + return x.Creator != "" + case "fairyring.pep.MsgUnregisterContract.contract_address": + return x.ContractAddress != "" + case "fairyring.pep.MsgUnregisterContract.identity": + return x.Identity != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.MsgUnregisterContract")) + } + panic(fmt.Errorf("message fairyring.pep.MsgUnregisterContract does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUnregisterContract) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "fairyring.pep.MsgUnregisterContract.creator": + x.Creator = "" + case "fairyring.pep.MsgUnregisterContract.contract_address": + x.ContractAddress = "" + case "fairyring.pep.MsgUnregisterContract.identity": + x.Identity = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.MsgUnregisterContract")) + } + panic(fmt.Errorf("message fairyring.pep.MsgUnregisterContract does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgUnregisterContract) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "fairyring.pep.MsgUnregisterContract.creator": + value := x.Creator + return protoreflect.ValueOfString(value) + case "fairyring.pep.MsgUnregisterContract.contract_address": + value := x.ContractAddress + return protoreflect.ValueOfString(value) + case "fairyring.pep.MsgUnregisterContract.identity": + value := x.Identity + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.MsgUnregisterContract")) + } + panic(fmt.Errorf("message fairyring.pep.MsgUnregisterContract does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUnregisterContract) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "fairyring.pep.MsgUnregisterContract.creator": + x.Creator = value.Interface().(string) + case "fairyring.pep.MsgUnregisterContract.contract_address": + x.ContractAddress = value.Interface().(string) + case "fairyring.pep.MsgUnregisterContract.identity": + x.Identity = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.MsgUnregisterContract")) + } + panic(fmt.Errorf("message fairyring.pep.MsgUnregisterContract does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUnregisterContract) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "fairyring.pep.MsgUnregisterContract.creator": + panic(fmt.Errorf("field creator of message fairyring.pep.MsgUnregisterContract is not mutable")) + case "fairyring.pep.MsgUnregisterContract.contract_address": + panic(fmt.Errorf("field contract_address of message fairyring.pep.MsgUnregisterContract is not mutable")) + case "fairyring.pep.MsgUnregisterContract.identity": + panic(fmt.Errorf("field identity of message fairyring.pep.MsgUnregisterContract is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.MsgUnregisterContract")) + } + panic(fmt.Errorf("message fairyring.pep.MsgUnregisterContract does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgUnregisterContract) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "fairyring.pep.MsgUnregisterContract.creator": + return protoreflect.ValueOfString("") + case "fairyring.pep.MsgUnregisterContract.contract_address": + return protoreflect.ValueOfString("") + case "fairyring.pep.MsgUnregisterContract.identity": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.MsgUnregisterContract")) + } + panic(fmt.Errorf("message fairyring.pep.MsgUnregisterContract does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgUnregisterContract) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in fairyring.pep.MsgUnregisterContract", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgUnregisterContract) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUnregisterContract) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgUnregisterContract) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgUnregisterContract) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUnregisterContract) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Creator) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ContractAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Identity) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgUnregisterContract) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Identity) > 0 { + i -= len(x.Identity) + copy(dAtA[i:], x.Identity) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Identity))) + i-- + dAtA[i] = 0x1a + } + if len(x.ContractAddress) > 0 { + i -= len(x.ContractAddress) + copy(dAtA[i:], x.ContractAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ContractAddress))) + i-- + dAtA[i] = 0x12 + } + if len(x.Creator) > 0 { + i -= len(x.Creator) + copy(dAtA[i:], x.Creator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgUnregisterContract) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUnregisterContract: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUnregisterContract: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Identity = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgUnregisterContractResponse protoreflect.MessageDescriptor +) + +func init() { + file_fairyring_pep_tx_proto_init() + md_MsgUnregisterContractResponse = File_fairyring_pep_tx_proto.Messages().ByName("MsgUnregisterContractResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgUnregisterContractResponse)(nil) + +type fastReflection_MsgUnregisterContractResponse MsgUnregisterContractResponse + +func (x *MsgUnregisterContractResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUnregisterContractResponse)(x) +} + +func (x *MsgUnregisterContractResponse) slowProtoReflect() protoreflect.Message { + mi := &file_fairyring_pep_tx_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUnregisterContractResponse_messageType fastReflection_MsgUnregisterContractResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgUnregisterContractResponse_messageType{} + +type fastReflection_MsgUnregisterContractResponse_messageType struct{} + +func (x fastReflection_MsgUnregisterContractResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUnregisterContractResponse)(nil) +} +func (x fastReflection_MsgUnregisterContractResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUnregisterContractResponse) +} +func (x fastReflection_MsgUnregisterContractResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUnregisterContractResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUnregisterContractResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUnregisterContractResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgUnregisterContractResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgUnregisterContractResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUnregisterContractResponse) New() protoreflect.Message { + return new(fastReflection_MsgUnregisterContractResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUnregisterContractResponse) Interface() protoreflect.ProtoMessage { + return (*MsgUnregisterContractResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgUnregisterContractResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgUnregisterContractResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.MsgUnregisterContractResponse")) + } + panic(fmt.Errorf("message fairyring.pep.MsgUnregisterContractResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUnregisterContractResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.MsgUnregisterContractResponse")) + } + panic(fmt.Errorf("message fairyring.pep.MsgUnregisterContractResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgUnregisterContractResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.MsgUnregisterContractResponse")) + } + panic(fmt.Errorf("message fairyring.pep.MsgUnregisterContractResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUnregisterContractResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.MsgUnregisterContractResponse")) + } + panic(fmt.Errorf("message fairyring.pep.MsgUnregisterContractResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUnregisterContractResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.MsgUnregisterContractResponse")) + } + panic(fmt.Errorf("message fairyring.pep.MsgUnregisterContractResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgUnregisterContractResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: fairyring.pep.MsgUnregisterContractResponse")) + } + panic(fmt.Errorf("message fairyring.pep.MsgUnregisterContractResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgUnregisterContractResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in fairyring.pep.MsgUnregisterContractResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgUnregisterContractResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUnregisterContractResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgUnregisterContractResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgUnregisterContractResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUnregisterContractResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgUnregisterContractResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgUnregisterContractResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUnregisterContractResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUnregisterContractResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -7431,6 +9239,160 @@ func (*MsgGetPrivateKeysharesResponse) Descriptor() ([]byte, []int) { return file_fairyring_pep_tx_proto_rawDescGZIP(), []int{14} } +type MsgRegisterContract struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + Identity string `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"` +} + +func (x *MsgRegisterContract) Reset() { + *x = MsgRegisterContract{} + if protoimpl.UnsafeEnabled { + mi := &file_fairyring_pep_tx_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRegisterContract) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRegisterContract) ProtoMessage() {} + +// Deprecated: Use MsgRegisterContract.ProtoReflect.Descriptor instead. +func (*MsgRegisterContract) Descriptor() ([]byte, []int) { + return file_fairyring_pep_tx_proto_rawDescGZIP(), []int{15} +} + +func (x *MsgRegisterContract) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +func (x *MsgRegisterContract) GetContractAddress() string { + if x != nil { + return x.ContractAddress + } + return "" +} + +func (x *MsgRegisterContract) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +type MsgRegisterContractResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgRegisterContractResponse) Reset() { + *x = MsgRegisterContractResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_fairyring_pep_tx_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRegisterContractResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRegisterContractResponse) ProtoMessage() {} + +// Deprecated: Use MsgRegisterContractResponse.ProtoReflect.Descriptor instead. +func (*MsgRegisterContractResponse) Descriptor() ([]byte, []int) { + return file_fairyring_pep_tx_proto_rawDescGZIP(), []int{16} +} + +type MsgUnregisterContract struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + Identity string `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"` +} + +func (x *MsgUnregisterContract) Reset() { + *x = MsgUnregisterContract{} + if protoimpl.UnsafeEnabled { + mi := &file_fairyring_pep_tx_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUnregisterContract) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUnregisterContract) ProtoMessage() {} + +// Deprecated: Use MsgUnregisterContract.ProtoReflect.Descriptor instead. +func (*MsgUnregisterContract) Descriptor() ([]byte, []int) { + return file_fairyring_pep_tx_proto_rawDescGZIP(), []int{17} +} + +func (x *MsgUnregisterContract) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +func (x *MsgUnregisterContract) GetContractAddress() string { + if x != nil { + return x.ContractAddress + } + return "" +} + +func (x *MsgUnregisterContract) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +type MsgUnregisterContractResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgUnregisterContractResponse) Reset() { + *x = MsgUnregisterContractResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_fairyring_pep_tx_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUnregisterContractResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUnregisterContractResponse) ProtoMessage() {} + +// Deprecated: Use MsgUnregisterContractResponse.ProtoReflect.Descriptor instead. +func (*MsgUnregisterContractResponse) Descriptor() ([]byte, []int) { + return file_fairyring_pep_tx_proto_rawDescGZIP(), []int{18} +} + var File_fairyring_pep_tx_proto protoreflect.FileDescriptor var file_fairyring_pep_tx_proto_rawDesc = []byte{ @@ -7533,7 +9495,28 @@ var file_fairyring_pep_tx_proto_rawDesc = []byte{ 0x79, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x20, 0x0a, 0x1e, 0x4d, 0x73, 0x67, 0x47, 0x65, 0x74, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x32, 0xff, 0x06, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x56, 0x0a, 0x0c, 0x55, 0x70, 0x64, + 0x65, 0x22, 0x84, 0x01, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x6f, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, + 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, + 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x1d, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x86, 0x01, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x55, + 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, + 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, + 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x32, 0xcd, 0x08, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x56, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1e, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x26, 0x2e, 0x66, 0x61, 0x69, 0x72, @@ -7588,17 +9571,30 @@ var file_fairyring_pep_tx_proto_rawDesc = []byte{ 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x1a, 0x2d, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x65, 0x74, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x68, - 0x61, 0x72, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, - 0xb0, 0x2a, 0x01, 0x42, 0x91, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x61, 0x69, 0x72, - 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, - 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, - 0x2f, 0x70, 0x65, 0x70, 0xa2, 0x02, 0x03, 0x46, 0x50, 0x58, 0xaa, 0x02, 0x0d, 0x46, 0x61, 0x69, - 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x50, 0x65, 0x70, 0xca, 0x02, 0x0d, 0x46, 0x61, 0x69, - 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x5c, 0x50, 0x65, 0x70, 0xe2, 0x02, 0x19, 0x46, 0x61, 0x69, - 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x5c, 0x50, 0x65, 0x70, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x46, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, - 0x6e, 0x67, 0x3a, 0x3a, 0x50, 0x65, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x72, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x10, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, + 0x12, 0x22, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, + 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x61, 0x63, 0x74, 0x1a, 0x2a, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, + 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x68, 0x0a, 0x12, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x24, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, + 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x1a, 0x2c, 0x2e, 0x66, + 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x2e, 0x4d, 0x73, 0x67, + 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, + 0x01, 0x42, 0x91, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, + 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x65, 0x70, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x70, + 0x65, 0x70, 0xa2, 0x02, 0x03, 0x46, 0x50, 0x58, 0xaa, 0x02, 0x0d, 0x46, 0x61, 0x69, 0x72, 0x79, + 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x50, 0x65, 0x70, 0xca, 0x02, 0x0d, 0x46, 0x61, 0x69, 0x72, 0x79, + 0x72, 0x69, 0x6e, 0x67, 0x5c, 0x50, 0x65, 0x70, 0xe2, 0x02, 0x19, 0x46, 0x61, 0x69, 0x72, 0x79, + 0x72, 0x69, 0x6e, 0x67, 0x5c, 0x50, 0x65, 0x70, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x46, 0x61, 0x69, 0x72, 0x79, 0x72, 0x69, 0x6e, 0x67, + 0x3a, 0x3a, 0x50, 0x65, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -7613,7 +9609,7 @@ func file_fairyring_pep_tx_proto_rawDescGZIP() []byte { return file_fairyring_pep_tx_proto_rawDescData } -var file_fairyring_pep_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_fairyring_pep_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 19) var file_fairyring_pep_tx_proto_goTypes = []interface{}{ (*MsgUpdateParams)(nil), // 0: fairyring.pep.MsgUpdateParams (*MsgUpdateParamsResponse)(nil), // 1: fairyring.pep.MsgUpdateParamsResponse @@ -7630,12 +9626,16 @@ var file_fairyring_pep_tx_proto_goTypes = []interface{}{ (*MsgRequestPrivateIdentityResponse)(nil), // 12: fairyring.pep.MsgRequestPrivateIdentityResponse (*MsgGetPrivateKeyshares)(nil), // 13: fairyring.pep.MsgGetPrivateKeyshares (*MsgGetPrivateKeysharesResponse)(nil), // 14: fairyring.pep.MsgGetPrivateKeysharesResponse - (*Params)(nil), // 15: fairyring.pep.Params - (*durationpb.Duration)(nil), // 16: google.protobuf.Duration + (*MsgRegisterContract)(nil), // 15: fairyring.pep.MsgRegisterContract + (*MsgRegisterContractResponse)(nil), // 16: fairyring.pep.MsgRegisterContractResponse + (*MsgUnregisterContract)(nil), // 17: fairyring.pep.MsgUnregisterContract + (*MsgUnregisterContractResponse)(nil), // 18: fairyring.pep.MsgUnregisterContractResponse + (*Params)(nil), // 19: fairyring.pep.Params + (*durationpb.Duration)(nil), // 20: google.protobuf.Duration } var file_fairyring_pep_tx_proto_depIdxs = []int32{ - 15, // 0: fairyring.pep.MsgUpdateParams.params:type_name -> fairyring.pep.Params - 16, // 1: fairyring.pep.MsgRequestGeneralKeyshare.estimated_delay:type_name -> google.protobuf.Duration + 19, // 0: fairyring.pep.MsgUpdateParams.params:type_name -> fairyring.pep.Params + 20, // 1: fairyring.pep.MsgRequestGeneralKeyshare.estimated_delay:type_name -> google.protobuf.Duration 0, // 2: fairyring.pep.Msg.UpdateParams:input_type -> fairyring.pep.MsgUpdateParams 2, // 3: fairyring.pep.Msg.SubmitEncryptedTx:input_type -> fairyring.pep.MsgSubmitEncryptedTx 3, // 4: fairyring.pep.Msg.SubmitGeneralEncryptedTx:input_type -> fairyring.pep.MsgSubmitGeneralEncryptedTx @@ -7644,16 +9644,20 @@ var file_fairyring_pep_tx_proto_depIdxs = []int32{ 9, // 7: fairyring.pep.Msg.GetGeneralKeyshare:input_type -> fairyring.pep.MsgGetGeneralKeyshare 11, // 8: fairyring.pep.Msg.RequestPrivateIdentity:input_type -> fairyring.pep.MsgRequestPrivateIdentity 13, // 9: fairyring.pep.Msg.GetPrivateKeyshares:input_type -> fairyring.pep.MsgGetPrivateKeyshares - 1, // 10: fairyring.pep.Msg.UpdateParams:output_type -> fairyring.pep.MsgUpdateParamsResponse - 4, // 11: fairyring.pep.Msg.SubmitEncryptedTx:output_type -> fairyring.pep.MsgSubmitEncryptedTxResponse - 4, // 12: fairyring.pep.Msg.SubmitGeneralEncryptedTx:output_type -> fairyring.pep.MsgSubmitEncryptedTxResponse - 6, // 13: fairyring.pep.Msg.CreateAggregatedKeyShare:output_type -> fairyring.pep.MsgCreateAggregatedKeyShareResponse - 8, // 14: fairyring.pep.Msg.RequestGeneralKeyshare:output_type -> fairyring.pep.MsgRequestGeneralKeyshareResponse - 10, // 15: fairyring.pep.Msg.GetGeneralKeyshare:output_type -> fairyring.pep.MsgGetGeneralKeyshareResponse - 12, // 16: fairyring.pep.Msg.RequestPrivateIdentity:output_type -> fairyring.pep.MsgRequestPrivateIdentityResponse - 14, // 17: fairyring.pep.Msg.GetPrivateKeyshares:output_type -> fairyring.pep.MsgGetPrivateKeysharesResponse - 10, // [10:18] is the sub-list for method output_type - 2, // [2:10] is the sub-list for method input_type + 15, // 10: fairyring.pep.Msg.RegisterContract:input_type -> fairyring.pep.MsgRegisterContract + 17, // 11: fairyring.pep.Msg.UnregisterContract:input_type -> fairyring.pep.MsgUnregisterContract + 1, // 12: fairyring.pep.Msg.UpdateParams:output_type -> fairyring.pep.MsgUpdateParamsResponse + 4, // 13: fairyring.pep.Msg.SubmitEncryptedTx:output_type -> fairyring.pep.MsgSubmitEncryptedTxResponse + 4, // 14: fairyring.pep.Msg.SubmitGeneralEncryptedTx:output_type -> fairyring.pep.MsgSubmitEncryptedTxResponse + 6, // 15: fairyring.pep.Msg.CreateAggregatedKeyShare:output_type -> fairyring.pep.MsgCreateAggregatedKeyShareResponse + 8, // 16: fairyring.pep.Msg.RequestGeneralKeyshare:output_type -> fairyring.pep.MsgRequestGeneralKeyshareResponse + 10, // 17: fairyring.pep.Msg.GetGeneralKeyshare:output_type -> fairyring.pep.MsgGetGeneralKeyshareResponse + 12, // 18: fairyring.pep.Msg.RequestPrivateIdentity:output_type -> fairyring.pep.MsgRequestPrivateIdentityResponse + 14, // 19: fairyring.pep.Msg.GetPrivateKeyshares:output_type -> fairyring.pep.MsgGetPrivateKeysharesResponse + 16, // 20: fairyring.pep.Msg.RegisterContract:output_type -> fairyring.pep.MsgRegisterContractResponse + 18, // 21: fairyring.pep.Msg.UnregisterContract:output_type -> fairyring.pep.MsgUnregisterContractResponse + 12, // [12:22] is the sub-list for method output_type + 2, // [2:12] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension extendee 0, // [0:2] is the sub-list for field type_name @@ -7847,6 +9851,54 @@ func file_fairyring_pep_tx_proto_init() { return nil } } + file_fairyring_pep_tx_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRegisterContract); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_fairyring_pep_tx_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRegisterContractResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_fairyring_pep_tx_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUnregisterContract); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_fairyring_pep_tx_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUnregisterContractResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -7854,7 +9906,7 @@ func file_fairyring_pep_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_fairyring_pep_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 15, + NumMessages: 19, NumExtensions: 0, NumServices: 1, }, diff --git a/api/fairyring/pep/tx_grpc.pb.go b/api/fairyring/pep/tx_grpc.pb.go index 87acd533..b712f03b 100644 --- a/api/fairyring/pep/tx_grpc.pb.go +++ b/api/fairyring/pep/tx_grpc.pb.go @@ -27,6 +27,8 @@ const ( Msg_GetGeneralKeyshare_FullMethodName = "/fairyring.pep.Msg/GetGeneralKeyshare" Msg_RequestPrivateIdentity_FullMethodName = "/fairyring.pep.Msg/RequestPrivateIdentity" Msg_GetPrivateKeyshares_FullMethodName = "/fairyring.pep.Msg/GetPrivateKeyshares" + Msg_RegisterContract_FullMethodName = "/fairyring.pep.Msg/RegisterContract" + Msg_UnregisterContract_FullMethodName = "/fairyring.pep.Msg/UnregisterContract" ) // MsgClient is the client API for Msg service. @@ -44,6 +46,8 @@ type MsgClient interface { GetGeneralKeyshare(ctx context.Context, in *MsgGetGeneralKeyshare, opts ...grpc.CallOption) (*MsgGetGeneralKeyshareResponse, error) RequestPrivateIdentity(ctx context.Context, in *MsgRequestPrivateIdentity, opts ...grpc.CallOption) (*MsgRequestPrivateIdentityResponse, error) GetPrivateKeyshares(ctx context.Context, in *MsgGetPrivateKeyshares, opts ...grpc.CallOption) (*MsgGetPrivateKeysharesResponse, error) + RegisterContract(ctx context.Context, in *MsgRegisterContract, opts ...grpc.CallOption) (*MsgRegisterContractResponse, error) + UnregisterContract(ctx context.Context, in *MsgUnregisterContract, opts ...grpc.CallOption) (*MsgUnregisterContractResponse, error) } type msgClient struct { @@ -126,6 +130,24 @@ func (c *msgClient) GetPrivateKeyshares(ctx context.Context, in *MsgGetPrivateKe return out, nil } +func (c *msgClient) RegisterContract(ctx context.Context, in *MsgRegisterContract, opts ...grpc.CallOption) (*MsgRegisterContractResponse, error) { + out := new(MsgRegisterContractResponse) + err := c.cc.Invoke(ctx, Msg_RegisterContract_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UnregisterContract(ctx context.Context, in *MsgUnregisterContract, opts ...grpc.CallOption) (*MsgUnregisterContractResponse, error) { + out := new(MsgUnregisterContractResponse) + err := c.cc.Invoke(ctx, Msg_UnregisterContract_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer // for forward compatibility @@ -141,6 +163,8 @@ type MsgServer interface { GetGeneralKeyshare(context.Context, *MsgGetGeneralKeyshare) (*MsgGetGeneralKeyshareResponse, error) RequestPrivateIdentity(context.Context, *MsgRequestPrivateIdentity) (*MsgRequestPrivateIdentityResponse, error) GetPrivateKeyshares(context.Context, *MsgGetPrivateKeyshares) (*MsgGetPrivateKeysharesResponse, error) + RegisterContract(context.Context, *MsgRegisterContract) (*MsgRegisterContractResponse, error) + UnregisterContract(context.Context, *MsgUnregisterContract) (*MsgUnregisterContractResponse, error) mustEmbedUnimplementedMsgServer() } @@ -172,6 +196,12 @@ func (UnimplementedMsgServer) RequestPrivateIdentity(context.Context, *MsgReques func (UnimplementedMsgServer) GetPrivateKeyshares(context.Context, *MsgGetPrivateKeyshares) (*MsgGetPrivateKeysharesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPrivateKeyshares not implemented") } +func (UnimplementedMsgServer) RegisterContract(context.Context, *MsgRegisterContract) (*MsgRegisterContractResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterContract not implemented") +} +func (UnimplementedMsgServer) UnregisterContract(context.Context, *MsgUnregisterContract) (*MsgUnregisterContractResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnregisterContract not implemented") +} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. @@ -329,6 +359,42 @@ func _Msg_GetPrivateKeyshares_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _Msg_RegisterContract_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRegisterContract) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RegisterContract(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_RegisterContract_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RegisterContract(ctx, req.(*MsgRegisterContract)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UnregisterContract_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUnregisterContract) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UnregisterContract(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UnregisterContract_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UnregisterContract(ctx, req.(*MsgUnregisterContract)) + } + return interceptor(ctx, in, info, handler) +} + // Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -368,6 +434,14 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetPrivateKeyshares", Handler: _Msg_GetPrivateKeyshares_Handler, }, + { + MethodName: "RegisterContract", + Handler: _Msg_RegisterContract_Handler, + }, + { + MethodName: "UnregisterContract", + Handler: _Msg_UnregisterContract_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "fairyring/pep/tx.proto", diff --git a/app/app.go b/app/app.go index 700ea28e..45b5b594 100644 --- a/app/app.go +++ b/app/app.go @@ -86,12 +86,9 @@ import ( slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" _ "github.com/cosmos/cosmos-sdk/x/staking" // import for side-effects stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" - _ "github.com/cosmos/ibc-go/modules/capability" // import for side-effects capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" - _ "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts" // import for side-effects icacontrollerkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/keeper" icahostkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/keeper" - _ "github.com/cosmos/ibc-go/v8/modules/apps/29-fee" // import for side-effects ibcfeekeeper "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/keeper" ibctransferkeeper "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper" ibcmodule "github.com/cosmos/ibc-go/v8/modules/core" diff --git a/app/ibc.go b/app/ibc.go index d5222069..028c1014 100644 --- a/app/ibc.go +++ b/app/ibc.go @@ -170,6 +170,21 @@ func (app *App) registerIBCModules(appOpts servertypes.AppOptions) error { AddRoute(icacontrollertypes.SubModuleName, icaControllerIBCModule). AddRoute(icahosttypes.SubModuleName, icaHostIBCModule) + acceptList := map[string]proto.Message{ + "/fairyring.keyshare.Query/VerifiableRandomness": &keysharemoduletypes.QueryVerifiableRandomnessResponse{}, + "/fairyring.pep.Query/DecryptData": &pepmoduletypes.QueryDecryptDataResponse{}, + } + + // Add wasmd to IBC Router + wasmStack, err := app.registerWasmModules(appOpts, wasmkeeper.WithQueryPlugins( + &wasmkeeper.QueryPlugins{ + Grpc: wasmkeeper.AcceptListGrpcQuerier(acceptList, app.GRPCQueryRouter(), app.appCodec), + })) + if err != nil { + return err + } + ibcRouter.AddRoute(wasmtypes.ModuleName, wasmStack) + pepStack, err := app.registerPepModule() if err != nil { return err @@ -186,19 +201,6 @@ func (app *App) registerIBCModules(appOpts servertypes.AppOptions) error { govIBCModule := ibcfee.NewIBCMiddleware(gov.NewIBCModule(app.GovKeeper), app.IBCFeeKeeper) ibcRouter.AddRoute(govtypes.ModuleName, govIBCModule) - acceptList := map[string]proto.Message{ - "/fairyring.keyshare.Query/VerifiableRandomness": &keysharemoduletypes.QueryVerifiableRandomnessResponse{}, - } - - // Add wasmd to IBC Router - wasmStack, err := app.registerWasmModules(appOpts, wasmkeeper.WithQueryPlugins( - &wasmkeeper.QueryPlugins{ - Grpc: wasmkeeper.AcceptListGrpcQuerier(acceptList, app.GRPCQueryRouter(), app.appCodec), - })) - if err != nil { - return err - } - ibcRouter.AddRoute(wasmtypes.ModuleName, wasmStack) // this line is used by starport scaffolding # ibc/app/module app.IBCKeeper.SetRouter(ibcRouter) diff --git a/app/pep.go b/app/pep.go index 591569d5..f1ea1aee 100644 --- a/app/pep.go +++ b/app/pep.go @@ -2,6 +2,7 @@ package app import ( storetypes "cosmossdk.io/store/types" + wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" pepmodulekeeper "github.com/Fairblock/fairyring/x/pep/keeper" pepmodule "github.com/Fairblock/fairyring/x/pep/module" peptypes "github.com/Fairblock/fairyring/x/pep/types" @@ -21,6 +22,7 @@ func (app *App) registerPepModule() (porttypes.IBCModule, error) { } scopedPepKeeper := app.CapabilityKeeper.ScopeToModule(peptypes.ModuleName) + contractKeeper := wasmkeeper.NewDefaultPermissionKeeper(&app.WasmKeeper) // The last arguments can contain custom message handlers, and custom query handlers, // if we want to allow any custom callbacks @@ -34,6 +36,8 @@ func (app *App) registerPepModule() (porttypes.IBCModule, error) { scopedPepKeeper, app.AccountKeeper, app.BankKeeper, + contractKeeper, + app.WasmKeeper, ) // register IBC modules diff --git a/proto/fairyring/pep/query.proto b/proto/fairyring/pep/query.proto index e5278674..db71194a 100644 --- a/proto/fairyring/pep/query.proto +++ b/proto/fairyring/pep/query.proto @@ -82,7 +82,7 @@ service Query { // Queries a list of DecryptData items. rpc DecryptData (QueryDecryptDataRequest) returns (QueryDecryptDataResponse) { - option (google.api.http).get = "/Fairblock/fairyring/pep/decrypt_data/{aggrKeyshare}/{encryptedData}"; + option (google.api.http).get = "/Fairblock/fairyring/pep/decrypt_data/{pubkey}/{aggr_keyshare}/{encrypted_data}"; } } @@ -182,8 +182,8 @@ message QueryShowPrivateKeyshareReqResponse { message QueryDecryptDataRequest { string pubkey = 1; - string aggrKeyshare = 2; - string encryptedData = 3; + string aggr_keyshare = 2; + string encrypted_data = 3; } message QueryDecryptDataResponse { diff --git a/proto/fairyring/pep/request_id.proto b/proto/fairyring/pep/request_id.proto index 9ffd4542..fd04d48c 100644 --- a/proto/fairyring/pep/request_id.proto +++ b/proto/fairyring/pep/request_id.proto @@ -17,3 +17,19 @@ message PrivateRequest { string pubkey = 3; repeated fairyring.common.EncryptedKeyshare encrypted_keyshares = 5; } + +message ContractDetails { + string registrar = 1; + string contract_address = 2; +} + +message RegisteredContract { + string identity = 1; + repeated ContractDetails contracts = 2; +} + +message ExecuteContractMsg { + string identity = 1; + string pubkey = 2; + string aggr_keyshare = 3; +} diff --git a/proto/fairyring/pep/tx.proto b/proto/fairyring/pep/tx.proto index 2edb8ae6..9fcf4b9e 100644 --- a/proto/fairyring/pep/tx.proto +++ b/proto/fairyring/pep/tx.proto @@ -31,6 +31,8 @@ service Msg { rpc GetGeneralKeyshare (MsgGetGeneralKeyshare ) returns (MsgGetGeneralKeyshareResponse ); rpc RequestPrivateIdentity (MsgRequestPrivateIdentity ) returns (MsgRequestPrivateIdentityResponse ); rpc GetPrivateKeyshares (MsgGetPrivateKeyshares ) returns (MsgGetPrivateKeysharesResponse ); + rpc RegisterContract (MsgRegisterContract ) returns (MsgRegisterContractResponse ); + rpc UnregisterContract (MsgUnregisterContract ) returns (MsgUnregisterContractResponse ); } // MsgUpdateParams is the Msg/UpdateParams request type. message MsgUpdateParams { @@ -114,3 +116,20 @@ message MsgGetPrivateKeyshares { message MsgGetPrivateKeysharesResponse {} +message MsgRegisterContract { + option (cosmos.msg.v1.signer) = "creator"; + string creator = 1; + string contract_address = 2; + string identity = 3; +} + +message MsgRegisterContractResponse {} + +message MsgUnregisterContract { + option (cosmos.msg.v1.signer) = "creator"; + string creator = 1; + string contract_address = 2; + string identity = 3; +} + +message MsgUnregisterContractResponse {} \ No newline at end of file diff --git a/scripts/tests/fairyring_contract/Cargo.lock b/scripts/tests/fairyring_contract/Cargo.lock new file mode 100644 index 00000000..d7aff698 --- /dev/null +++ b/scripts/tests/fairyring_contract/Cargo.lock @@ -0,0 +1,1577 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "addr2line" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "allocator-api2" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" + +[[package]] +name = "anyhow" +version = "1.0.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" + +[[package]] +name = "ark-bls12-381" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools 0.10.5", + "num-traits", + "rayon", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest", + "itertools 0.10.5", + "num-bigint", + "num-traits", + "paste", + "rayon", + "rustc_version", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand", + "rayon", +] + +[[package]] +name = "async-trait" +version = "0.1.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "autocfg" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" + +[[package]] +name = "backtrace" +version = "0.3.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-targets", +] + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bech32" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d965446196e3b7decd44aa7ee49e31d630118f90ef12f97900f262eb915c951d" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bnum" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e31ea183f6ee62ac8b8a8cf7feddd766317adfb13ff469de57ce033efd6a790" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +dependencies = [ + "serde", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "cosmos-sdk-proto" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b2f63ab112b8c8e7b8a29c891adc48f43145beb21c0bfbf562957072c1e0beb" +dependencies = [ + "prost", + "prost-types", + "tendermint-proto", +] + +[[package]] +name = "cosmwasm-core" +version = "2.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6ceb8624260d0d3a67c4e1a1d43fc7e9406720afbcb124521501dd138f90aa" + +[[package]] +name = "cosmwasm-crypto" +version = "2.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4125381e5fd7fefe9f614640049648088015eca2b60d861465329a5d87dfa538" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-serialize", + "cosmwasm-core", + "digest", + "ecdsa", + "ed25519-zebra", + "k256", + "num-traits", + "p256", + "rand_core", + "rayon", + "sha2", + "thiserror", +] + +[[package]] +name = "cosmwasm-derive" +version = "2.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5658b1dc64e10b56ae7a449f678f96932a96f6cfad1769d608d1d1d656480a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "cosmwasm-schema" +version = "2.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f86b4d949b6041519c58993a73f4bbfba8083ba14f7001eae704865a09065845" +dependencies = [ + "cosmwasm-schema-derive", + "schemars", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "cosmwasm-schema-derive" +version = "2.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8ef1b5835a65fcca3ab8b9a02b4f4dacc78e233a5c2f20b270efb9db0666d12" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "cosmwasm-std" +version = "2.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70eb7ab0c1e99dd6207496963ba2a457c4128ac9ad9c72a83f8d9808542b849b" +dependencies = [ + "base64", + "bech32", + "bnum", + "cosmwasm-core", + "cosmwasm-crypto", + "cosmwasm-derive", + "derive_more", + "hex", + "rand_core", + "schemars", + "serde", + "serde-json-wasm", + "sha2", + "static_assertions", + "thiserror", +] + +[[package]] +name = "cpufeatures" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +dependencies = [ + "libc", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "curve25519-dalek" +version = "4.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest", + "fiat-crypto", + "rustc_version", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "cw-multi-test" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0ae276e7a06ad1b7e7da78a3d68aba80634cde30ee7fe8259a94e653603fef8" +dependencies = [ + "anyhow", + "bech32", + "cosmwasm-std", + "cw-storage-plus", + "cw-utils", + "derivative", + "itertools 0.13.0", + "prost", + "schemars", + "serde", + "sha2", + "thiserror", +] + +[[package]] +name = "cw-storage-plus" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f13360e9007f51998d42b1bc6b7fa0141f74feae61ed5fd1e5b0a89eec7b5de1" +dependencies = [ + "cosmwasm-std", + "schemars", + "serde", +] + +[[package]] +name = "cw-utils" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07dfee7f12f802431a856984a32bce1cb7da1e6c006b5409e3981035ce562dec" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "schemars", + "serde", + "thiserror", +] + +[[package]] +name = "der" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_more" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", + "unicode-xid", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "dyn-clone" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest", + "elliptic-curve", + "rfc6979", + "signature", +] + +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "signature", +] + +[[package]] +name = "ed25519-zebra" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" +dependencies = [ + "curve25519-dalek", + "ed25519", + "hashbrown 0.14.5", + "hex", + "rand_core", + "sha2", + "zeroize", +] + +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest", + "ff", + "generic-array", + "group", + "rand_core", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "fairblock-proto" +version = "0.1.0" +source = "git+https://github.com/Fairblock/fairblock-rust/?branch=contract-callback#7a24f0d3cf3e4315f90e99567c5e4e01923d6c84" +dependencies = [ + "cosmos-sdk-proto", + "prost", + "prost-types", + "tonic", +] + +[[package]] +name = "fairyring_contract" +version = "0.1.0" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-multi-test", + "cw-storage-plus", + "fairblock-proto", + "prost", + "prost-types", + "schemars", + "serde", + "thiserror", +] + +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "rand_core", + "subtle", +] + +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + +[[package]] +name = "flex-error" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c606d892c9de11507fa0dcffc116434f94e105d0bbdc4e405b61519464c49d7b" +dependencies = [ + "paste", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "futures-core" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" + +[[package]] +name = "futures-task" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" + +[[package]] +name = "futures-util" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +dependencies = [ + "futures-core", + "futures-task", + "pin-project-lite", + "pin-utils", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "gimli" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core", + "subtle", +] + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", +] + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "k256" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "sha2", +] + +[[package]] +name = "libc" +version = "0.2.159" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "miniz_oxide" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +dependencies = [ + "adler2", +] + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "object" +version = "0.36.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82881c4be219ab5faaf2ad5e5e5ecdff8c66bd7402ca3160975c93b24961afd1" +dependencies = [ + "portable-atomic", +] + +[[package]] +name = "p256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "portable-atomic" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", +] + +[[package]] +name = "proc-macro2" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "prost" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-derive" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" +dependencies = [ + "anyhow", + "itertools 0.13.0", + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "prost-types" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4759aa0d3a6232fb8dbdb97b61de2c20047c68aca932c7ed76da9d788508d670" +dependencies = [ + "prost", +] + +[[package]] +name = "quote" +version = "1.0.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "schemars" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92" +dependencies = [ + "dyn-clone", + "schemars_derive", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.79", +] + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "subtle", + "zeroize", +] + +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" + +[[package]] +name = "serde" +version = "1.0.210" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde-json-wasm" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f05da0d153dd4595bdffd5099dc0e9ce425b205ee648eb93437ff7302af8c9a5" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_bytes" +version = "0.11.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.210" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "serde_derive_internals" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "serde_json" +version = "1.0.128" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest", + "rand_core", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "subtle-encoding" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dcb1ed7b8330c5eed5441052651dd7a12c75e2ed88f2ec024ae1fa3a5e59945" +dependencies = [ + "zeroize", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tendermint-proto" +version = "0.38.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ed14abe3b0502a3afe21ca74ca5cdd6c7e8d326d982c26f98a394445eb31d6e" +dependencies = [ + "bytes", + "flex-error", + "prost", + "prost-types", + "serde", + "serde_bytes", + "subtle-encoding", + "time", +] + +[[package]] +name = "thiserror" +version = "1.0.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "time" +version = "0.3.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +dependencies = [ + "deranged", + "num-conv", + "powerfmt", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tokio" +version = "1.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +dependencies = [ + "backtrace", + "pin-project-lite", +] + +[[package]] +name = "tokio-stream" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tonic" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" +dependencies = [ + "async-trait", + "base64", + "bytes", + "http", + "http-body", + "http-body-util", + "percent-encoding", + "pin-project", + "prost", + "tokio-stream", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "unicode-ident" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] diff --git a/scripts/tests/fairyring_contract/Cargo.toml b/scripts/tests/fairyring_contract/Cargo.toml new file mode 100644 index 00000000..ed0a8765 --- /dev/null +++ b/scripts/tests/fairyring_contract/Cargo.toml @@ -0,0 +1,51 @@ +[package] +name = "fairyring_contract" +version = "0.1.0" +edition = "2018" + +[lib] +crate-type = ["cdylib", "rlib"] + +[profile.release] +opt-level = 3 +debug = false +rpath = false +lto = true +debug-assertions = false +codegen-units = 1 +panic = 'abort' +incremental = false +overflow-checks = true + +[features] +# use library feature to disable all instantiate/execute/query exports +library = [] + +[package.metadata.scripts] +optimize = """docker run --rm -v "$(pwd)":/code \ + --mount type=volume,source="$(basename "$(pwd)")_cache",target=/target \ + --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ + cosmwasm/optimizer:0.15.0 +""" + +[dependencies] +cosmwasm-schema = "2.1.0" +cosmwasm-std = { version = "2.1.0", features = [ + "cosmwasm_1_4", + # Enable this if you only deploy to chains that have CosmWasm 2.0 or higher + "cosmwasm_2_0", +] } +cw-storage-plus = "2.0.0" +serde = { version = "1.0", features = ["derive"] } +schemars = "0.8" +thiserror = "1.0" +prost = "0.13.3" # Protobuf support +prost-types = "0.13" +# tonic = { version = "0.12.3", features = ["prost", "tls"] } +fairblock-proto = { git = "https://github.com/Fairblock/fairblock-rust/", branch = "contract-callback" } +# getrandom = { version = "0.2", features = ["js"] } +# mio = "1.0.2" +# tokio = "1.40.0" + +[dev-dependencies] +cw-multi-test = "2.0.0" diff --git a/scripts/tests/fairyring_contract/artifacts/checksums.txt b/scripts/tests/fairyring_contract/artifacts/checksums.txt new file mode 100644 index 00000000..d3f83ce4 --- /dev/null +++ b/scripts/tests/fairyring_contract/artifacts/checksums.txt @@ -0,0 +1 @@ +6868e236b02b69d77557e203908940e25b5ecc70a5649880399732f5e665301e fairyring_contract.wasm diff --git a/scripts/tests/fairyring_contract/artifacts/fairyring_contract.wasm b/scripts/tests/fairyring_contract/artifacts/fairyring_contract.wasm new file mode 100644 index 00000000..fb93167d Binary files /dev/null and b/scripts/tests/fairyring_contract/artifacts/fairyring_contract.wasm differ diff --git a/scripts/tests/fairyring_contract/src/contract.rs b/scripts/tests/fairyring_contract/src/contract.rs new file mode 100644 index 00000000..cfb354ff --- /dev/null +++ b/scripts/tests/fairyring_contract/src/contract.rs @@ -0,0 +1,126 @@ +// contract.rs +use cosmwasm_std::{attr, entry_point, to_json_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdError, StdResult}; +use prost::Message; +use crate::msg::{ExecuteContractMsg, QueryMsg, QueryResponse, InstantiateMsg, QueryDecryptDataResponse as JsonDcryptData}; +use crate::state::STORED_DATA; +use fairblock_proto::fairyring::pep::{QueryDecryptDataRequest, QueryDecryptDataResponse}; + +#[entry_point] +pub fn execute( + deps: DepsMut, + _env: Env, + _info: MessageInfo, + msg: ExecuteContractMsg, +) -> StdResult { + // Store the data + + // Check if identity is a non-empty string + if msg.identity.trim().is_empty() { + return Err(StdError::generic_err("Identity cannot be empty")); + } + + // Use the identity directly + let identity = msg.identity; + + STORED_DATA.save( + deps.storage, + &identity, + &(msg.pubkey.clone(), msg.aggr_keyshare.clone()), // Use `.clone()` to avoid moving the values + )?; + + // Return a response + Ok(Response::new().add_attributes(vec![ + attr("action", "store_data"), + attr("identity", identity), + attr("pubkey", msg.pubkey), + attr("aggr_keyshare", msg.aggr_keyshare), + ])) +} + +#[entry_point] +pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { + match msg { + QueryMsg::GetStoredData { identity } => { + if identity.trim().is_empty() { + return Err(StdError::generic_err("Identity cannot be empty")); + } + let stored_data = STORED_DATA.load(deps.storage, &identity)?; + let response = QueryResponse { + pubkey: stored_data.0, + aggr_keyshare: stored_data.1, + }; + to_json_binary(&response) + } + + QueryMsg::DecryptData { + pubkey, + aggr_keyshare, + encrypted_data, + } => { + if encrypted_data.trim().is_empty() || aggr_keyshare.trim().is_empty() { + return Err(StdError::generic_err("Invalid input data")); + } + + // Call the function to query the `pep` module + let response = query_pep_decrypt(deps, pubkey, aggr_keyshare, encrypted_data)?; + + // Return the decrypted data in binary format + Ok(response) + } + } +} + +#[entry_point] +pub fn instantiate( + deps: DepsMut, + _env: Env, + _info: MessageInfo, + msg: InstantiateMsg, +) -> StdResult { + // Add logic to initialize the contract state here + + // For example, store some initial data + if msg.identity.trim().is_empty() { + return Err(StdError::generic_err("Identity cannot be empty")); + } + + STORED_DATA.save( + deps.storage, + &msg.identity, + &(msg.pubkey.clone(), msg.aggr_keyshare.clone()), + )?; + + Ok(Response::new().add_attribute("method", "instantiate")) +} + +// Function to query the `DecryptData` RPC from your `pep` module +pub fn query_pep_decrypt( + deps: Deps, + pubkey: String, + aggr_keyshare: String, + encrypted_data: String, +) -> StdResult { + // Create the request message + let request = QueryDecryptDataRequest { + pubkey, + aggr_keyshare, + encrypted_data, + }; + + let e = request.encode_to_vec(); + let d = Binary::new(e); + + // Send the query + let raw_response: Binary = deps.querier.query_grpc("/fairyring.pep.Query/DecryptData".to_string(), d)?; + + let vec_res = raw_response.to_vec(); + let x = QueryDecryptDataResponse::decode(&*vec_res) + .expect("Failed to decode Protobuf message"); + + let json_data = JsonDcryptData { + decrypted_data : x.decrypted_data, + }; + + let json_res = to_json_binary(&json_data)?; + Ok(json_res) +} diff --git a/scripts/tests/fairyring_contract/src/error.rs b/scripts/tests/fairyring_contract/src/error.rs new file mode 100644 index 00000000..e69de29b diff --git a/scripts/tests/fairyring_contract/src/lib.rs b/scripts/tests/fairyring_contract/src/lib.rs new file mode 100644 index 00000000..94c37d1c --- /dev/null +++ b/scripts/tests/fairyring_contract/src/lib.rs @@ -0,0 +1,22 @@ +pub mod contract; +pub mod msg; +pub mod state; +pub mod error; + + +// use cosmwasm_std::{entry_point, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdError, StdResult}; + +// #[entry_point] +// pub fn instantiate(deps: DepsMut, env: Env, info: MessageInfo, msg: InstantiateMsg) -> StdResult { +// contract::instantiate(deps, env, info, msg) +// } + +// #[entry_point] +// pub fn execute(deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg) -> StdResult { +// contract::execute(deps, env, info, msg) +// } + +// #[entry_point] +// pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> StdResult { +// contract::query(deps, env, msg) +// } diff --git a/scripts/tests/fairyring_contract/src/msg.rs b/scripts/tests/fairyring_contract/src/msg.rs new file mode 100644 index 00000000..afaaf379 --- /dev/null +++ b/scripts/tests/fairyring_contract/src/msg.rs @@ -0,0 +1,46 @@ +// msg.rs +use schemars::JsonSchema; +use serde::{Deserialize, Serialize}; +use cosmwasm_std::CustomQuery; + +// This is the message to execute the contract +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +pub struct ExecuteContractMsg { + pub identity: String, + pub pubkey: String, + pub aggr_keyshare: String, +} + +// Query message +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +#[serde(rename_all = "snake_case")] +pub enum QueryMsg { + GetStoredData { identity: String }, + DecryptData { + pubkey: String, + aggr_keyshare: String, + encrypted_data: String, + }, +} + +impl CustomQuery for QueryMsg{} + +// Response type for querying stored data +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +pub struct QueryResponse { + pub pubkey: String, + pub aggr_keyshare: String, +} + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +pub struct QueryDecryptDataResponse { + pub decrypted_data: String, +} + +// Instantiate message +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] +pub struct InstantiateMsg { + pub identity: String, + pub pubkey: String, + pub aggr_keyshare: String, +} diff --git a/scripts/tests/fairyring_contract/src/state.rs b/scripts/tests/fairyring_contract/src/state.rs new file mode 100644 index 00000000..893873ae --- /dev/null +++ b/scripts/tests/fairyring_contract/src/state.rs @@ -0,0 +1,4 @@ +// state.rs +use cw_storage_plus::Map; + +pub const STORED_DATA: Map<&str, (String, String)> = Map::new("stored_data"); diff --git a/scripts/tests/pep.sh b/scripts/tests/pep.sh index 2dfed876..84d484fe 100755 --- a/scripts/tests/pep.sh +++ b/scripts/tests/pep.sh @@ -15,6 +15,7 @@ echo "" BINARY=fairyringd CHAIN_DIR=$(pwd)/data +CONTRACT_DIR=$(pwd)/scripts/tests/fairyring_contract CHAINID_1=fairyring_test_1 CHAIN1_NODE=tcp://localhost:16657 CHAINID_2=fairyring_test_2 @@ -25,6 +26,7 @@ WALLET_1=$($BINARY keys show wallet1 -a --keyring-backend test --home $CHAIN_DIR VALIDATOR_1=$($BINARY keys show val1 -a --keyring-backend test --home $CHAIN_DIR/$CHAINID_1) WALLET_2=$($BINARY keys show wallet2 -a --keyring-backend test --home $CHAIN_DIR/$CHAINID_2) VALIDATOR_2=$($BINARY keys show val2 -a --keyring-backend test --home $CHAIN_DIR/$CHAINID_2) +WALLET_3=$($BINARY keys show wallet3 -a --keyring-backend test --home $CHAIN_DIR/$CHAINID_1) GENERATED_SHARE=$1 @@ -53,6 +55,14 @@ wait_for_tx () { echo "$RESULT" } +wait_for_tx_source () { + sleep $BLOCK_TIME + sleep $BLOCK_TIME + local TXHASH=$(echo "$1" | jq -r '.txhash') + RESULT=$($BINARY q tx --type=hash $TXHASH --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node $CHAIN1_NODE -o json) + echo "$RESULT" +} + echo "Query new account pep nonce from pep module on chain fairyring_test_2" RESULT=$($BINARY query pep show-pep-nonce $VALIDATOR_2 --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE -o json) VALIDATOR_PEP_NONCE=$(echo "$RESULT" | jq -r '.pepNonce.nonce') @@ -805,6 +815,112 @@ else exit 1 fi +echo "#############################################" +echo "# Testing contract callback on source chain #" +echo "#############################################" + +cd $CONTRACT_DIR + +echo "Compiling contract" +cargo build --release --target wasm32-unknown-unknown + +echo "Optimizing Contract" +docker run --rm -v "$(pwd)":/code \ + --mount type=volume,source="$(basename "$(pwd)")_cache",target=/target \ + --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ + cosmwasm/optimizer:0.16.0 +cd - + +echo "Deploying smart contract on source chain" +RESULT=$($BINARY tx wasm store $CONTRACT_DIR/artifacts/fairyring_contract.wasm --from $WALLET_1 --gas 9000000 --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node $CHAIN1_NODE --broadcast-mode sync --keyring-backend test --fees 9000000ufairy -o json -y) +check_tx_code $RESULT + +sleep 10 + +echo "Instantiating the contract" +RESULT=$($BINARY tx wasm instantiate 1 '{"identity": "init_identity", "pubkey": "init_pubkey", "aggr_keyshare": "init_keyshare"}' --admin $WALLET_1 --from $WALLET_1 --gas 9000000 --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node $CHAIN1_NODE --broadcast-mode sync --keyring-backend test --fees 9000000ufairy --label test_contract_1 -o json -y) +check_tx_code $RESULT + +sleep 10 + +echo "Creating new General keyshare Request on chain fairyring_test_1" +RESULT=$($BINARY tx pep request-general-keyshare 30s contract123 --from $WALLET_1 --gas-prices 1ufairy --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node $CHAIN1_NODE --broadcast-mode sync --keyring-backend test -o json -y) +check_tx_code $RESULT + +sleep 10 + +REQ_ID="fairy1m9l358xunhhwds0568za49mzhvuxx9uxdra8sq/contract123" +CONTRACT_ADDR="fairy14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9stsyf7v" + +echo "Trying to registering contract with unauthorized address" +RESULT=$($BINARY tx pep register-contract $CONTRACT_ADDR $REQ_ID --from $WALLET_3 --gas-prices 1ufairy --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node $CHAIN1_NODE --broadcast-mode sync --keyring-backend test -o json -y) +check_tx_code $RESULT +RESULT=$(wait_for_tx_source $RESULT) + +ERROR_MSG=$(echo "$RESULT" | jq -r '.raw_log') +if [[ "$ERROR_MSG" != *"unautorized registration; only cretor and admin can register"* ]]; then + echo "ERROR: '$ERROR_MSG'" + echo "ERROR MESSAGE: $(echo "$RESULT" | jq -r '.raw_log')" + exit 1 +fi + + +echo "Registering contract with identity" +RESULT=$($BINARY tx pep register-contract $CONTRACT_ADDR $REQ_ID --from $WALLET_1 --gas-prices 1ufairy --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node $CHAIN1_NODE --broadcast-mode sync --keyring-backend test -o json -y) +check_tx_code $RESULT +RESULT=$(wait_for_tx_source $RESULT) + +sleep 10 + +echo "Trying to unregistering contract with unauthorized address" +RESULT=$($BINARY tx pep unregister-contract $CONTRACT_ADDR $REQ_ID --from $WALLET_3 --gas-prices 1ufairy --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node $CHAIN1_NODE --broadcast-mode sync --keyring-backend test -o json -y) +check_tx_code $RESULT +RESULT=$(wait_for_tx_source $RESULT) +ERROR_MSG=$(echo "$RESULT" | jq -r '.raw_log') + +if [[ "$ERROR_MSG" != *"unautorized deregistration; only cretor and admin can deregister"* ]]; then + echo "ERROR: '$ERROR_MSG'" + echo "ERROR MESSAGE: $(echo "$RESULT" | jq -r '.raw_log')" + exit 1 +fi + +echo "Request Generation of Aggr keyshare" +RESULT=$($BINARY tx pep get-general-keyshare $REQ_ID --from $WALLET_1 --gas-prices 1ufairy --gas 900000 --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node $CHAIN1_NODE --broadcast-mode sync --keyring-backend test -o json -y) +echo "$RESULT" +check_tx_code $RESULT + +sleep 6 + +EXTRACTED_RESULT=$($BINARY share-generation derive $GENERATED_SHARE 1 $REQ_ID) +EXTRACTED_SHARE=$(echo "$EXTRACTED_RESULT" | jq -r '.KeyShare') + +while true; do + echo "Submitting General Key Share" + + RESULT=$($BINARY tx keyshare create-general-key-share "private-gov-identity" $REQ_ID $EXTRACTED_SHARE 1 --from $VALIDATOR_1 --gas-prices 1ufairy --gas 900000 --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) + echo "$RESULT" + check_tx_err $RESULT + if [ $? -eq 0 ]; then + break + fi +done + +sleep 15 + +echo "Query Contract state" +RSP=$($BINARY q wasm contract-state smart $CONTRACT_ADDR '{"get_stored_data":{"identity": "fairy1m9l358xunhhwds0568za49mzhvuxx9uxdra8sq/contract123"}}' --node $CHAIN1_NODE -o json) +echo $RSP + +echo "#########################################################" +echo "# Testing decryption from contract request source chain #" +echo "#########################################################" + +echo "Testing with pubkey provided explicitly" +RSP=$($BINARY q wasm contract-state smart $CONTRACT_ADDR '{"decrypt_data": {"pubkey": "a2a4472488440341db3252447af1c31e06fd32d7067e300ed60052fcdd131fd702bf901e1dd0122a312bb582a9a375a3", "aggr_keyshare": "a3b49bbffd655aa37e0b71a4d90862e1f70bdd0aab48587307ef74c2b3e12fd2ea42d88fc5f592e5caf83d33d7f93454196f32137817ceb5ecb41fbe48c3734bb11510febd6988302dd2c362deb3479b4946daa399fb149e63c0a5c45b48292d", "encrypted_data": "6167652d656e6372797074696f6e2e6f72672f76310a2d3e20646973744942450a686e4a7641376d5655797679397166465230447849417464374c3152586371484542687736306a316f325a446e567453626a4759374a4d2f5a524752654e536b0a574d6f56567966674d55546f363944502f4f624a6544424e6f47694b50746a6b316a523075464276536372326d766948543238524f6e473755647835683077510a6c734767656554424336786e7834626e496d737874410a2d2d2d20793668724135506e5233563568414a35646f732b574e325932334b72742b383946306d4d743138595a59490a43129dfd9ddbb210374314a96ab1b06260b4e1abf7d3fac77029043c8bdbe0a6efd2b73f95f75be0"}}' --node $CHAIN1_NODE -o json) +echo $RSP + +echo "Testing with pubkey not provided" +RSP=$($BINARY q wasm contract-state smart $CONTRACT_ADDR '{"decrypt_data": {"pubkey": "", "aggr_keyshare": "a3b49bbffd655aa37e0b71a4d90862e1f70bdd0aab48587307ef74c2b3e12fd2ea42d88fc5f592e5caf83d33d7f93454196f32137817ceb5ecb41fbe48c3734bb11510febd6988302dd2c362deb3479b4946daa399fb149e63c0a5c45b48292d", "encrypted_data": "6167652d656e6372797074696f6e2e6f72672f76310a2d3e20646973744942450a686e4a7641376d5655797679397166465230447849417464374c3152586371484542687736306a316f325a446e567453626a4759374a4d2f5a524752654e536b0a574d6f56567966674d55546f363944502f4f624a6544424e6f47694b50746a6b316a523075464276536372326d766948543238524f6e473755647835683077510a6c734767656554424336786e7834626e496d737874410a2d2d2d20793668724135506e5233563568414a35646f732b574e325932334b72742b383946306d4d743138595a59490a43129dfd9ddbb210374314a96ab1b06260b4e1abf7d3fac77029043c8bdbe0a6efd2b73f95f75be0"}}' --node $CHAIN1_NODE -o json) echo $RSP echo "" diff --git a/scripts/tests/start.sh b/scripts/tests/start.sh index 3370a3d6..37606e31 100755 --- a/scripts/tests/start.sh +++ b/scripts/tests/start.sh @@ -153,11 +153,11 @@ echo "$modifiedJson2" | jq '.' > "$CHAIN_DIR/$CHAINID_2/config/genesis.json" echo "Starting $CHAINID_1 in $CHAIN_DIR..." echo "Creating log file at $CHAIN_DIR/$CHAINID_1.log" -$BINARY start --log_level info --home $CHAIN_DIR/$CHAINID_1 --pruning=nothing --grpc.address="0.0.0.0:$GRPCPORT_1" > $CHAIN_DIR/$CHAINID_1.log 2>&1 & +$BINARY start --log_format json --log_level info --home $CHAIN_DIR/$CHAINID_1 --pruning=nothing --grpc.address="0.0.0.0:$GRPCPORT_1" > $CHAIN_DIR/$CHAINID_1.log 2>&1 & echo "Starting $CHAINID_2 in $CHAIN_DIR..." echo "Creating log file at $CHAIN_DIR/$CHAINID_2.log" -$BINARY start --log_level info --home $CHAIN_DIR/$CHAINID_2 --pruning=nothing --grpc.address="0.0.0.0:$GRPCPORT_2" > $CHAIN_DIR/$CHAINID_2.log 2>&1 & +$BINARY start --log_format json --log_level info --home $CHAIN_DIR/$CHAINID_2 --pruning=nothing --grpc.address="0.0.0.0:$GRPCPORT_2" > $CHAIN_DIR/$CHAINID_2.log 2>&1 & echo "Checking if there is an existing keys for Hermes Relayer..." HKEY_1=$(hermes --config hermes_config.toml keys list --chain fairyring_test_1 | sed -n '/SUCCESS/d; s/.*(\([^)]*\)).*/\1/p') diff --git a/testutil/keeper/pep.go b/testutil/keeper/pep.go index 9f2fed2c..79280efd 100644 --- a/testutil/keeper/pep.go +++ b/testutil/keeper/pep.go @@ -60,6 +60,8 @@ func PepKeeper(t testing.TB) (keeper.Keeper, sdk.Context) { scopedKeeper, nil, nil, + nil, + nil, ) ctx := sdk.NewContext(stateStore, cmtproto.Header{}, false, log.NewNopLogger()) diff --git a/x/pep/client/cli/tx.go b/x/pep/client/cli/tx.go index 47dfd167..a27be67f 100644 --- a/x/pep/client/cli/tx.go +++ b/x/pep/client/cli/tx.go @@ -32,6 +32,8 @@ func GetTxCmd() *cobra.Command { cmd.AddCommand(CmdSubmitGeneralEncryptedTx()) cmd.AddCommand(CmdRequestPrivateKeyshare()) cmd.AddCommand(CmdGetPrivateKeyshare()) + cmd.AddCommand(CmdRegisterContract()) + cmd.AddCommand(CmdUnregisterContract()) // this line is used by starport scaffolding # 1 return cmd diff --git a/x/pep/client/cli/tx_register_contract.go b/x/pep/client/cli/tx_register_contract.go new file mode 100644 index 00000000..eeeedffd --- /dev/null +++ b/x/pep/client/cli/tx_register_contract.go @@ -0,0 +1,41 @@ +package cli + +import ( + "strconv" + + "github.com/Fairblock/fairyring/x/pep/types" + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/client/tx" + "github.com/spf13/cobra" +) + +var _ = strconv.Itoa(0) + +func CmdRegisterContract() *cobra.Command { + cmd := &cobra.Command{ + Use: "register-contract [contract-address] [identity]", + Short: "Broadcast message register-contract", + Args: cobra.ExactArgs(2), + RunE: func(cmd *cobra.Command, args []string) (err error) { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + msg := types.NewMsgRegisterContract( + clientCtx.GetFromAddress().String(), + args[0], + args[1], + ) + if err := msg.ValidateBasic(); err != nil { + return err + } + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} diff --git a/x/pep/client/cli/tx_unregister_contract.go b/x/pep/client/cli/tx_unregister_contract.go new file mode 100644 index 00000000..fb0dd961 --- /dev/null +++ b/x/pep/client/cli/tx_unregister_contract.go @@ -0,0 +1,41 @@ +package cli + +import ( + "strconv" + + "github.com/Fairblock/fairyring/x/pep/types" + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/client/tx" + "github.com/spf13/cobra" +) + +var _ = strconv.Itoa(0) + +func CmdUnregisterContract() *cobra.Command { + cmd := &cobra.Command{ + Use: "unregister-contract [contract-address] [identity]", + Short: "Broadcast message unregister-contract", + Args: cobra.ExactArgs(2), + RunE: func(cmd *cobra.Command, args []string) (err error) { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + msg := types.NewMsgUnregisterContract( + clientCtx.GetFromAddress().String(), + args[0], + args[1], + ) + if err := msg.ValidateBasic(); err != nil { + return err + } + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} diff --git a/x/pep/keeper/contract.go b/x/pep/keeper/contract.go new file mode 100644 index 00000000..0d585f25 --- /dev/null +++ b/x/pep/keeper/contract.go @@ -0,0 +1,112 @@ +package keeper + +import ( + "context" + "encoding/json" + + "cosmossdk.io/store/prefix" + storetypes "cosmossdk.io/store/types" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + "github.com/Fairblock/fairyring/x/pep/types" + "github.com/cosmos/cosmos-sdk/runtime" + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" +) + +// SetContractEntry set a specific contract entry in the store by identity +func (k Keeper) SetContractEntry(ctx context.Context, contract types.RegisteredContract) { + storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.ContractKeyPrefix)) + b := k.cdc.MustMarshal(&contract) + store.Set([]byte(contract.Identity), b) +} + +// RemoveContractEntry removes a specific contract entry in the store by identity +func (k Keeper) RemoveContractEntry(ctx context.Context, identity string) { + storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.ContractKeyPrefix)) + store.Delete([]byte(identity)) +} + +// GetContractEntriesByID returns a the list of contracts for an identity +func (k Keeper) GetContractEntriesByID( + ctx context.Context, + identity string, +) (val types.RegisteredContract, found bool) { + storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.ContractKeyPrefix)) + + b := store.Get([]byte(identity)) + if b == nil { + return val, false + } + + k.cdc.MustUnmarshal(b, &val) + return val, true +} + +// GetContractEntry fetches the details of a contract by identity and contract address +func (k Keeper) GetContractEntry( + ctx context.Context, + reqID string, + contractAddr string, +) (val types.ContractDetails, found bool) { + c, found := k.GetContractEntriesByID(ctx, reqID) + if !found || len(c.Contracts) == 0 { + return types.ContractDetails{}, found + } + + for _, con := range c.Contracts { + if con.ContractAddress == contractAddr { + return *con, true + } + } + + return types.ContractDetails{}, false +} + +// AppendContractToEntry appends a new contract detail to an already existing contract entry +func (k Keeper) AppendContractToEntry( + ctx context.Context, + contract types.RegisteredContract, +) { + c, found := k.GetContractEntriesByID(ctx, contract.Identity) + if !found { + k.logger.Error("contract entry not found for identity: ", contract.Identity) + return + } + c.Contracts = append(c.Contracts, contract.Contracts...) + k.SetContractEntry(ctx, c) +} + +// GetAllContractEntries returns all contracts for all identities +func (k Keeper) GetAllContractEntries(ctx context.Context) (list []types.RegisteredContract) { + storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.ContractKeyPrefix)) + iterator := storetypes.KVStorePrefixIterator(store, []byte{}) + + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + var val types.RegisteredContract + k.cdc.MustUnmarshal(iterator.Value(), &val) + list = append(list, val) + } + + return +} + +func (k Keeper) ExecuteContract(ctx sdk.Context, contractAddr string, msg types.ExecuteContractMsg) { + addr := sdk.MustAccAddressFromBech32(contractAddr) + msgBytes, err := json.Marshal(msg) + if err != nil { + k.logger.Error("error marshalling msg for contract: %s", contractAddr) + return + } + + wasmAddr := authtypes.NewModuleAddress(wasmtypes.ModuleName) + _, err = k.contractKeeper.Execute(ctx, addr, wasmAddr, msgBytes, sdk.Coins{}) + if err != nil { + k.logger.Error("error executing contract: %s; error: %v", contractAddr, err) + } +} diff --git a/x/pep/keeper/keeper.go b/x/pep/keeper/keeper.go index 8a4a569c..0b94440a 100644 --- a/x/pep/keeper/keeper.go +++ b/x/pep/keeper/keeper.go @@ -34,8 +34,10 @@ type ( // capabilityScopedFn func(string) capabilitykeeper.ScopedKeeper scopedKeeper exported.ScopedKeeper - accountKeeper types.AccountKeeper - bankKeeper types.BankKeeper + accountKeeper types.AccountKeeper + bankKeeper types.BankKeeper + contractKeeper types.ContractKeeper + wasmKeeper types.WasmKeeper } ) @@ -50,6 +52,8 @@ func NewKeeper( accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, + contractKeeper types.ContractKeeper, + wasmKeeper types.WasmKeeper, ) Keeper { if _, err := sdk.AccAddressFromBech32(authority); err != nil { panic(fmt.Sprintf("invalid authority address: %s", authority)) @@ -62,9 +66,11 @@ func NewKeeper( logger: logger, ibcKeeperFn: ibcKeeperFn, // capabilityScopedFn: capabilityScopedFn, - scopedKeeper: scopedKeeper, - accountKeeper: accountKeeper, - bankKeeper: bankKeeper, + scopedKeeper: scopedKeeper, + accountKeeper: accountKeeper, + bankKeeper: bankKeeper, + contractKeeper: contractKeeper, + wasmKeeper: wasmKeeper, } } @@ -156,3 +162,11 @@ func (k Keeper) SetRequestCount(ctx sdk.Context, requestNumber uint64) { store := prefix.NewStore(storeAdapter, []byte{}) store.Set(types.RequestsCountKey, []byte(strconv.FormatUint(requestNumber, 10))) } + +func (k Keeper) SetWasmKeeper(wk types.WasmKeeper) { + k.wasmKeeper = wk +} + +func (k Keeper) SetContractKeeper(ck types.ContractKeeper) { + k.contractKeeper = ck +} diff --git a/x/pep/keeper/msg_register_contract.go b/x/pep/keeper/msg_register_contract.go new file mode 100644 index 00000000..0b0ae2a6 --- /dev/null +++ b/x/pep/keeper/msg_register_contract.go @@ -0,0 +1,56 @@ +package keeper + +import ( + "context" + "errors" + + "github.com/Fairblock/fairyring/x/pep/types" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func (k msgServer) RegisterContract( + goCtx context.Context, + msg *types.MsgRegisterContract, +) (*types.MsgRegisterContractResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + contracAddr, err := sdk.AccAddressFromBech32(msg.ContractAddress) + if err != nil { + return nil, errors.New("invalid contract address") + } + + contractInfo := k.wasmKeeper.GetContractInfo(ctx, contracAddr) + if contractInfo == nil { + return nil, errors.New("contract information not found") + } + + if msg.Creator != contractInfo.Admin && msg.Creator != contractInfo.Creator { + return nil, errors.New("unautorized registration; only cretor and admin can register") + } + + var contDetails = types.ContractDetails{ + Registrar: msg.Creator, + ContractAddress: msg.ContractAddress, + } + + entry, found := k.GetContractEntriesByID(ctx, msg.Identity) + if found { + if len(entry.Contracts) != 0 { + for _, c := range entry.Contracts { + if c.ContractAddress == msg.ContractAddress { + return nil, errors.New("contract is already registered for this identity") + } + } + } else { + entry.Contracts = make([]*types.ContractDetails, 0) + } + + } + + entry.Identity = msg.Identity + entry.Contracts = append(entry.Contracts, &contDetails) + + k.SetContractEntry(ctx, entry) + + return &types.MsgRegisterContractResponse{}, nil +} diff --git a/x/pep/keeper/msg_unregister_contract.go b/x/pep/keeper/msg_unregister_contract.go new file mode 100644 index 00000000..9d36f242 --- /dev/null +++ b/x/pep/keeper/msg_unregister_contract.go @@ -0,0 +1,56 @@ +package keeper + +import ( + "context" + "errors" + + "github.com/Fairblock/fairyring/x/pep/types" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func (k msgServer) UnregisterContract( + goCtx context.Context, + msg *types.MsgUnregisterContract, +) (*types.MsgUnregisterContractResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + contracAddr, err := sdk.AccAddressFromBech32(msg.ContractAddress) + if err != nil { + return nil, errors.New("invalid contract address") + } + + contractInfo := k.wasmKeeper.GetContractInfo(ctx, contracAddr) + if contractInfo == nil { + return nil, errors.New("contract information not found") + } + + if msg.Creator != contractInfo.Admin && msg.Creator != contractInfo.Creator { + return nil, errors.New("unautorized deregistration; only cretor and admin can deregister") + } + + entry, found := k.GetContractEntriesByID(ctx, msg.Identity) + contracts := make([]*types.ContractDetails, 0) + detailsFound := false + + if found && len(entry.Contracts) != 0 { + for _, c := range entry.Contracts { + if c.ContractAddress == msg.ContractAddress { + detailsFound = true + } else { + contracts = append(contracts, c) + } + } + } else { + return &types.MsgUnregisterContractResponse{}, + errors.New("no entry found for the provided identity") + } + + if detailsFound { + entry.Contracts = contracts + k.SetContractEntry(ctx, entry) + return &types.MsgUnregisterContractResponse{}, nil + } + + return &types.MsgUnregisterContractResponse{}, + errors.New("contract not found in the list of registered contracts") +} diff --git a/x/pep/module/autocli.go b/x/pep/module/autocli.go index cb664282..3f96644c 100644 --- a/x/pep/module/autocli.go +++ b/x/pep/module/autocli.go @@ -77,7 +77,7 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { RpcMethod: "DecryptData", Use: "decrypt-data [pubkey] [aggr-keyshare] [encrypted-data]", Short: "Query decrypt-data", - PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "pubkey"}, {ProtoField: "aggrKeyshare"}, {ProtoField: "encryptedData"}}, + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "pubkey"}, {ProtoField: "aggr_keyshare"}, {ProtoField: "encrypted_data"}}, }, // this line is used by ignite scaffolding # autocli/query diff --git a/x/pep/module/module.go b/x/pep/module/module.go index 7282a2dc..12a39e1e 100644 --- a/x/pep/module/module.go +++ b/x/pep/module/module.go @@ -277,6 +277,26 @@ func (am AppModule) BeginBlock(cctx context.Context) error { continue } + // execute registered contracts + contracts, found := am.keeper.GetContractEntriesByID(ctx, entry.Identity) + if found && len(contracts.Contracts) != 0 { + for _, contract := range contracts.Contracts { + am.keeper.ExecuteContract( + ctx, + contract.ContractAddress, + types.ExecuteContractMsg{ + Identity: entry.Identity, + Pubkey: entry.Pubkey, + AggrKeyshare: entry.AggrKeyshare, + }, + ) + } + } + + if found { + am.keeper.RemoveContractEntry(ctx, entry.Identity) + } + if entry.TxList == nil { am.keeper.Logger().Info("No encrypted txs found for entry with req-id: ", entry.RequestId) am.keeper.RemoveExecutionQueueEntry(ctx, entry.Identity) diff --git a/x/pep/types/expected_keepers.go b/x/pep/types/expected_keepers.go index 854dfc9f..820d35b4 100644 --- a/x/pep/types/expected_keepers.go +++ b/x/pep/types/expected_keepers.go @@ -3,6 +3,7 @@ package types import ( "context" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -27,3 +28,14 @@ type ParamSubspace interface { Get(context.Context, []byte, interface{}) Set(context.Context, []byte, interface{}) } + +// WasmKeeper defines the expected interface for the wasm module. +type WasmKeeper interface { + GetContractInfo(ctx context.Context, contractAddress sdk.AccAddress) *wasmtypes.ContractInfo + HasContractInfo(ctx context.Context, contractAddress sdk.AccAddress) bool +} + +// ContractKeeper defines the expected interface for the wasm module. +type ContractKeeper interface { + Execute(ctx sdk.Context, contractAddress, caller sdk.AccAddress, msg []byte, coins sdk.Coins) ([]byte, error) +} diff --git a/x/pep/types/key_request_id.go b/x/pep/types/key_request_id.go index 1aa0f903..83a5031a 100644 --- a/x/pep/types/key_request_id.go +++ b/x/pep/types/key_request_id.go @@ -11,6 +11,7 @@ const ( // RequestIdKeyPrefix is the prefix to retrieve all RequestId RequestIdKeyPrefix = "RequestId/value/" PrivateRequestIdKeyPrefix = "PrivateRequestId/value/" + ContractKeyPrefix = "Contract/value/" ) // RequestIdKey returns the store key to retrieve a RequestId from the index fields diff --git a/x/pep/types/msg_register_contract.go b/x/pep/types/msg_register_contract.go new file mode 100644 index 00000000..9fc2fb31 --- /dev/null +++ b/x/pep/types/msg_register_contract.go @@ -0,0 +1,33 @@ +package types + +import ( + sdkioerrors "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +const TypeMsgRegisterContract = "register_contract" + +var _ sdk.Msg = &MsgRegisterContract{} + +func NewMsgRegisterContract(creator string, contractAddr string, identity string) *MsgRegisterContract { + return &MsgRegisterContract{ + Creator: creator, + ContractAddress: contractAddr, + Identity: identity, + } +} + +func (msg *MsgRegisterContract) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + return sdkioerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) + } + + _, err = sdk.AccAddressFromBech32(msg.ContractAddress) + if err != nil { + return sdkioerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid contract address (%s)", err) + } + + return nil +} diff --git a/x/pep/types/msg_unregister_contract.go b/x/pep/types/msg_unregister_contract.go new file mode 100644 index 00000000..fd01bdae --- /dev/null +++ b/x/pep/types/msg_unregister_contract.go @@ -0,0 +1,33 @@ +package types + +import ( + sdkioerrors "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +const TypeMsgUnregisterContract = "unregister_contract" + +var _ sdk.Msg = &MsgRegisterContract{} + +func NewMsgUnregisterContract(creator string, contractAddr string, identity string) *MsgUnregisterContract { + return &MsgUnregisterContract{ + Creator: creator, + ContractAddress: contractAddr, + Identity: identity, + } +} + +func (msg *MsgUnregisterContract) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + return sdkioerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) + } + + _, err = sdk.AccAddressFromBech32(msg.ContractAddress) + if err != nil { + return sdkioerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid contract address (%s)", err) + } + + return nil +} diff --git a/x/pep/types/query.pb.go b/x/pep/types/query.pb.go index 63b70e3e..7044ff6c 100644 --- a/x/pep/types/query.pb.go +++ b/x/pep/types/query.pb.go @@ -1046,8 +1046,8 @@ func (m *QueryShowPrivateKeyshareReqResponse) GetEncryptedKeyshares() []*types.E type QueryDecryptDataRequest struct { Pubkey string `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"` - AggrKeyshare string `protobuf:"bytes,2,opt,name=aggrKeyshare,proto3" json:"aggrKeyshare,omitempty"` - EncryptedData string `protobuf:"bytes,3,opt,name=encryptedData,proto3" json:"encryptedData,omitempty"` + AggrKeyshare string `protobuf:"bytes,2,opt,name=aggr_keyshare,json=aggrKeyshare,proto3" json:"aggr_keyshare,omitempty"` + EncryptedData string `protobuf:"bytes,3,opt,name=encrypted_data,json=encryptedData,proto3" json:"encrypted_data,omitempty"` } func (m *QueryDecryptDataRequest) Reset() { *m = QueryDecryptDataRequest{} } @@ -1178,92 +1178,92 @@ func init() { func init() { proto.RegisterFile("fairyring/pep/query.proto", fileDescriptor_dd36cf23112e8be0) } var fileDescriptor_dd36cf23112e8be0 = []byte{ - // 1349 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x98, 0xcd, 0x6f, 0xe3, 0xc4, - 0x1b, 0xc7, 0xeb, 0xee, 0x36, 0xdb, 0x4e, 0xda, 0xea, 0xf7, 0x9b, 0xed, 0x4b, 0xea, 0xdd, 0xa6, - 0xdd, 0xe9, 0x2b, 0x11, 0xc4, 0x6a, 0xbb, 0x07, 0xa8, 0xb8, 0xa4, 0xf4, 0x85, 0xa5, 0x2b, 0x68, - 0x43, 0xe1, 0xb0, 0x97, 0x68, 0x12, 0x0f, 0x8e, 0xd5, 0xc4, 0x76, 0x6c, 0xa7, 0x9b, 0x10, 0x45, - 0x42, 0x7b, 0xe1, 0xc2, 0x01, 0x89, 0x3b, 0xe2, 0xb8, 0x07, 0x24, 0xb8, 0xee, 0x19, 0x0e, 0x7b, - 0x5c, 0x89, 0x0b, 0x27, 0x84, 0x5a, 0x24, 0x2e, 0xfc, 0x11, 0xc8, 0xe3, 0x67, 0x12, 0xdb, 0x71, - 0x92, 0x56, 0xf4, 0x52, 0xd5, 0x33, 0xcf, 0xcb, 0xe7, 0x79, 0x66, 0xfc, 0x7c, 0xdd, 0xa2, 0x85, -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x92, 0x81, 0x22, 0x2b, 0x6f, 0xdf, 0xc4, 0x05, 0x10, 0xf7, - 0x38, 0xe2, 0xfb, 0x78, 0x57, 0x39, 0xa4, 0xba, 0x5d, 0xac, 0x98, 0xa5, 0xf3, 0x08, 0xac, 0x53, - 0x36, 0x9f, 0x17, 0x2c, 0x3f, 0x42, 0x47, 0x33, 0x0b, 0x36, 0xab, 0xf1, 0x5e, 0x3e, 0x51, 0xdb, - 0xf8, 0x47, 0x09, 0x25, 0x03, 0xf2, 0x13, 0xdf, 0xc7, 0x5e, 0x71, 0x8c, 0xef, 0x63, 0x8c, 0x8e, - 0x91, 0xa7, 0x1c, 0xf2, 0x10, 0xef, 0xf7, 0x85, 0x04, 0x41, 0xe3, 0x22, 0xa7, 0xb4, 0x82, 0x32, - 0xda, 0x56, 0x5a, 0x21, 0xc1, 0x6c, 0xef, 0xed, 0xbf, 0xbe, 0x4c, 0x4b, 0x6f, 0x2e, 0xd3, 0xd2, - 0x9f, 0x97, 0x69, 0xe9, 0xdb, 0xab, 0xf4, 0xc8, 0x9b, 0xab, 0xf4, 0xc8, 0xef, 0x57, 0xe9, 0x91, - 0x67, 0x19, 0x4d, 0x77, 0xcb, 0xf5, 0xa2, 0xa7, 0xfe, 0xb1, 0x99, 0x1a, 0x3c, 0x17, 0xff, 0x5f, - 0x43, 0x31, 0xc1, 0xff, 0x99, 0xb0, 0xf3, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x79, 0xc5, 0x1b, - 0xde, 0xb7, 0x11, 0x00, 0x00, + // 1357 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x98, 0xcf, 0x6f, 0xe3, 0x44, + 0x14, 0xc7, 0xeb, 0x6e, 0x9b, 0x6d, 0x27, 0x6d, 0x05, 0xb3, 0xfd, 0x91, 0x7a, 0xb7, 0x69, 0x77, + 0xd2, 0x5f, 0x44, 0x10, 0xab, 0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xf8, 0xee, 0x2a, 0x3d, 0xf2, + 0xfa, 0x2a, 0x3d, 0xf2, 0xc7, 0x55, 0x7a, 0xe4, 0x69, 0x56, 0xd5, 0x9c, 0x72, 0xbd, 0xe4, 0x7e, + 0x0a, 0xc4, 0x26, 0x6d, 0xf0, 0xb4, 0xfc, 0x1f, 0x0f, 0xa5, 0x04, 0xff, 0xcf, 0xc2, 0xce, 0x7f, + 0x01, 0x00, 0x00, 0xff, 0xff, 0xe4, 0x33, 0xe3, 0x9f, 0xc4, 0x11, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/pep/types/query.pb.gw.go b/x/pep/types/query.pb.gw.go index 55cdab4c..2ee2d6db 100644 --- a/x/pep/types/query.pb.gw.go +++ b/x/pep/types/query.pb.gw.go @@ -487,10 +487,6 @@ func local_request_Query_ShowPrivateKeyshareReq_0(ctx context.Context, marshaler } -var ( - filter_Query_DecryptData_0 = &utilities.DoubleArray{Encoding: map[string]int{"aggrKeyshare": 0, "encryptedData": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} -) - func request_Query_DecryptData_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryDecryptDataRequest var metadata runtime.ServerMetadata @@ -502,33 +498,37 @@ func request_Query_DecryptData_0(ctx context.Context, marshaler runtime.Marshale _ = err ) - val, ok = pathParams["aggrKeyshare"] + val, ok = pathParams["pubkey"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "aggrKeyshare") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pubkey") } - protoReq.AggrKeyshare, err = runtime.String(val) + protoReq.Pubkey, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "aggrKeyshare", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pubkey", err) } - val, ok = pathParams["encryptedData"] + val, ok = pathParams["aggr_keyshare"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "encryptedData") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "aggr_keyshare") } - protoReq.EncryptedData, err = runtime.String(val) + protoReq.AggrKeyshare, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "encryptedData", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "aggr_keyshare", err) } - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + val, ok = pathParams["encrypted_data"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "encrypted_data") } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_DecryptData_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + + protoReq.EncryptedData, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "encrypted_data", err) } msg, err := client.DecryptData(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -547,33 +547,37 @@ func local_request_Query_DecryptData_0(ctx context.Context, marshaler runtime.Ma _ = err ) - val, ok = pathParams["aggrKeyshare"] + val, ok = pathParams["pubkey"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "aggrKeyshare") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pubkey") } - protoReq.AggrKeyshare, err = runtime.String(val) + protoReq.Pubkey, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "aggrKeyshare", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pubkey", err) } - val, ok = pathParams["encryptedData"] + val, ok = pathParams["aggr_keyshare"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "encryptedData") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "aggr_keyshare") } - protoReq.EncryptedData, err = runtime.String(val) + protoReq.AggrKeyshare, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "encryptedData", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "aggr_keyshare", err) } - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + val, ok = pathParams["encrypted_data"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "encrypted_data") } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_DecryptData_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + + protoReq.EncryptedData, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "encrypted_data", err) } msg, err := server.DecryptData(ctx, &protoReq) @@ -1170,7 +1174,7 @@ var ( pattern_Query_ShowPrivateKeyshareReq_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"Fairblock", "fairyring", "pep", "show_private_keyshare_req", "reqId"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_DecryptData_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"Fairblock", "fairyring", "pep", "decrypt_data", "aggrKeyshare", "encryptedData"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_DecryptData_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5, 1, 0, 4, 1, 5, 6}, []string{"Fairblock", "fairyring", "pep", "decrypt_data", "pubkey", "aggr_keyshare", "encrypted_data"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/x/pep/types/request_id.pb.go b/x/pep/types/request_id.pb.go index 280ee896..33576192 100644 --- a/x/pep/types/request_id.pb.go +++ b/x/pep/types/request_id.pb.go @@ -144,34 +144,209 @@ func (m *PrivateRequest) GetEncryptedKeyshares() []*types.EncryptedKeyshare { return nil } +type ContractDetails struct { + Registrar string `protobuf:"bytes,1,opt,name=registrar,proto3" json:"registrar,omitempty"` + ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` +} + +func (m *ContractDetails) Reset() { *m = ContractDetails{} } +func (m *ContractDetails) String() string { return proto.CompactTextString(m) } +func (*ContractDetails) ProtoMessage() {} +func (*ContractDetails) Descriptor() ([]byte, []int) { + return fileDescriptor_3e457d2e8ff0411e, []int{2} +} +func (m *ContractDetails) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ContractDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ContractDetails.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 *ContractDetails) XXX_Merge(src proto.Message) { + xxx_messageInfo_ContractDetails.Merge(m, src) +} +func (m *ContractDetails) XXX_Size() int { + return m.Size() +} +func (m *ContractDetails) XXX_DiscardUnknown() { + xxx_messageInfo_ContractDetails.DiscardUnknown(m) +} + +var xxx_messageInfo_ContractDetails proto.InternalMessageInfo + +func (m *ContractDetails) GetRegistrar() string { + if m != nil { + return m.Registrar + } + return "" +} + +func (m *ContractDetails) GetContractAddress() string { + if m != nil { + return m.ContractAddress + } + return "" +} + +type RegisteredContract struct { + Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + Contracts []*ContractDetails `protobuf:"bytes,2,rep,name=contracts,proto3" json:"contracts,omitempty"` +} + +func (m *RegisteredContract) Reset() { *m = RegisteredContract{} } +func (m *RegisteredContract) String() string { return proto.CompactTextString(m) } +func (*RegisteredContract) ProtoMessage() {} +func (*RegisteredContract) Descriptor() ([]byte, []int) { + return fileDescriptor_3e457d2e8ff0411e, []int{3} +} +func (m *RegisteredContract) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RegisteredContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RegisteredContract.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 *RegisteredContract) XXX_Merge(src proto.Message) { + xxx_messageInfo_RegisteredContract.Merge(m, src) +} +func (m *RegisteredContract) XXX_Size() int { + return m.Size() +} +func (m *RegisteredContract) XXX_DiscardUnknown() { + xxx_messageInfo_RegisteredContract.DiscardUnknown(m) +} + +var xxx_messageInfo_RegisteredContract proto.InternalMessageInfo + +func (m *RegisteredContract) GetIdentity() string { + if m != nil { + return m.Identity + } + return "" +} + +func (m *RegisteredContract) GetContracts() []*ContractDetails { + if m != nil { + return m.Contracts + } + return nil +} + +type ExecuteContractMsg struct { + Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + Pubkey string `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey,omitempty"` + AggrKeyshare string `protobuf:"bytes,3,opt,name=aggr_keyshare,json=aggrKeyshare,proto3" json:"aggr_keyshare,omitempty"` +} + +func (m *ExecuteContractMsg) Reset() { *m = ExecuteContractMsg{} } +func (m *ExecuteContractMsg) String() string { return proto.CompactTextString(m) } +func (*ExecuteContractMsg) ProtoMessage() {} +func (*ExecuteContractMsg) Descriptor() ([]byte, []int) { + return fileDescriptor_3e457d2e8ff0411e, []int{4} +} +func (m *ExecuteContractMsg) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExecuteContractMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExecuteContractMsg.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 *ExecuteContractMsg) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExecuteContractMsg.Merge(m, src) +} +func (m *ExecuteContractMsg) XXX_Size() int { + return m.Size() +} +func (m *ExecuteContractMsg) XXX_DiscardUnknown() { + xxx_messageInfo_ExecuteContractMsg.DiscardUnknown(m) +} + +var xxx_messageInfo_ExecuteContractMsg proto.InternalMessageInfo + +func (m *ExecuteContractMsg) GetIdentity() string { + if m != nil { + return m.Identity + } + return "" +} + +func (m *ExecuteContractMsg) GetPubkey() string { + if m != nil { + return m.Pubkey + } + return "" +} + +func (m *ExecuteContractMsg) GetAggrKeyshare() string { + if m != nil { + return m.AggrKeyshare + } + return "" +} + func init() { proto.RegisterType((*RequestId)(nil), "fairyring.pep.RequestId") proto.RegisterType((*PrivateRequest)(nil), "fairyring.pep.PrivateRequest") + proto.RegisterType((*ContractDetails)(nil), "fairyring.pep.ContractDetails") + proto.RegisterType((*RegisteredContract)(nil), "fairyring.pep.RegisteredContract") + proto.RegisterType((*ExecuteContractMsg)(nil), "fairyring.pep.ExecuteContractMsg") } func init() { proto.RegisterFile("fairyring/pep/request_id.proto", fileDescriptor_3e457d2e8ff0411e) } var fileDescriptor_3e457d2e8ff0411e = []byte{ - // 294 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0x3d, 0x4e, 0xc3, 0x30, - 0x18, 0x86, 0x6b, 0xaa, 0x16, 0xd5, 0x08, 0x06, 0x53, 0x50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 0xcc, 0xe9, 0x8d, 0xbb, 0xb3, 0x83, 0xf3, 0xa9, 0xdb, 0x0e, 0x50, 0xbf, 0xcd, 0xbd, 0xd9, - 0x95, 0xef, 0x9a, 0xee, 0x82, 0xc1, 0x5f, 0x2b, 0xbb, 0xba, 0xfe, 0x28, 0x39, 0xd9, 0x94, 0x9c, - 0x7c, 0x95, 0x9c, 0xbc, 0x55, 0xbc, 0xb3, 0xa9, 0x78, 0xe7, 0xb3, 0xe2, 0x9d, 0xc7, 0xb3, 0x58, - 0x9a, 0x65, 0x1e, 0x6c, 0x71, 0xe2, 0xd6, 0x97, 0x18, 0x3c, 0xab, 0x70, 0x25, 0xda, 0x09, 0x5f, - 0xed, 0x4f, 0xd8, 0xe9, 0x82, 0xbe, 0xdd, 0xee, 0xe2, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x14, 0x1c, - 0xef, 0xb3, 0xa7, 0x01, 0x00, 0x00, + // 422 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0xc1, 0x6e, 0xd4, 0x30, + 0x10, 0xdd, 0xb4, 0xea, 0xc2, 0x0e, 0x94, 0x22, 0x53, 0x50, 0xb4, 0x42, 0x51, 0x95, 0xbd, 0x14, + 0x0e, 0x89, 0x04, 0x47, 0xb8, 0x00, 0x2d, 0x52, 0x85, 0x90, 0x50, 0xc4, 0xa9, 0x97, 0xc8, 0x1b, + 0x0f, 0xa9, 0xb5, 0xdd, 0xd8, 0x3b, 0x76, 0x50, 0xf3, 0x17, 0xfc, 0x09, 0xbf, 0xc1, 0xb1, 0x47, + 0x8e, 0x68, 0xf7, 0x47, 0x50, 0x9c, 0x78, 0xa3, 0xed, 0xa1, 0x37, 0xcf, 0xf3, 0x9b, 0xe7, 0xf1, + 0x9b, 0x07, 0xd1, 0x0f, 0x2e, 0xa9, 0x21, 0x59, 0x95, 0xa9, 0x46, 0x9d, 0x12, 0x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, 0xe7, 0x3f, 0xf2, 0xf8, 0x87, 0x0e, 0x8e, 0x2b, 0x60, 0x99, 0xeb, + 0x43, 0x42, 0xe1, 0x5f, 0x61, 0x53, 0x78, 0x28, 0x05, 0x56, 0x56, 0xda, 0xa6, 0x57, 0xdf, 0xd6, + 0xec, 0x3d, 0x4c, 0xbc, 0x48, 0xab, 0xda, 0xfe, 0x2c, 0x4a, 0x76, 0x56, 0x9b, 0xdc, 0x99, 0x36, + 0x1b, 0x1a, 0xe2, 0x25, 0xb0, 0xf3, 0x1b, 0x2c, 0x6a, 0x8b, 0x9e, 0xf4, 0xd5, 0x94, 0xf7, 0xbe, + 0x37, 0x78, 0xbd, 0xb7, 0xe3, 0xf5, 0x0c, 0x0e, 0x79, 0x59, 0xd2, 0xd6, 0xe6, 0x7e, 0x15, 0x8f, + 0x5b, 0xd0, 0x7b, 0xf7, 0xf1, 0xec, 0xcf, 0x3a, 0x0a, 0x6e, 0xd7, 0x51, 0xf0, 0x6f, 0x1d, 0x05, + 0xbf, 0x36, 0xd1, 0xe8, 0x76, 0x13, 0x8d, 0xfe, 0x6e, 0xa2, 0xd1, 0xe5, 0xeb, 0x52, 0xda, 0xab, + 0x7a, 0xde, 0x6e, 0x22, 0xfd, 0xcc, 0x25, 0xcd, 0xaf, 0x55, 0xb1, 0x48, 0x87, 0xf4, 0xdd, 0xb8, + 0x10, 0xbb, 0xd4, 0xcd, 0xc7, 0x2e, 0x76, 0x6f, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0xf3, 0x11, + 0xcf, 0x8f, 0xe2, 0x02, 0x00, 0x00, } func (m *RequestId) Marshal() (dAtA []byte, err error) { @@ -269,6 +444,131 @@ func (m *PrivateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *ContractDetails) 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 *ContractDetails) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ContractDetails) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = encodeVarintRequestId(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.Registrar) > 0 { + i -= len(m.Registrar) + copy(dAtA[i:], m.Registrar) + i = encodeVarintRequestId(dAtA, i, uint64(len(m.Registrar))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RegisteredContract) 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 *RegisteredContract) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RegisteredContract) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Contracts) > 0 { + for iNdEx := len(m.Contracts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Contracts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRequestId(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = encodeVarintRequestId(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ExecuteContractMsg) 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 *ExecuteContractMsg) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExecuteContractMsg) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AggrKeyshare) > 0 { + i -= len(m.AggrKeyshare) + copy(dAtA[i:], m.AggrKeyshare) + i = encodeVarintRequestId(dAtA, i, uint64(len(m.AggrKeyshare))) + i-- + dAtA[i] = 0x1a + } + if len(m.Pubkey) > 0 { + i -= len(m.Pubkey) + copy(dAtA[i:], m.Pubkey) + i = encodeVarintRequestId(dAtA, i, uint64(len(m.Pubkey))) + i-- + dAtA[i] = 0x12 + } + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = encodeVarintRequestId(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintRequestId(dAtA []byte, offset int, v uint64) int { offset -= sovRequestId(v) base := offset @@ -324,6 +624,63 @@ func (m *PrivateRequest) Size() (n int) { return n } +func (m *ContractDetails) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Registrar) + if l > 0 { + n += 1 + l + sovRequestId(uint64(l)) + } + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + sovRequestId(uint64(l)) + } + return n +} + +func (m *RegisteredContract) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Identity) + if l > 0 { + n += 1 + l + sovRequestId(uint64(l)) + } + if len(m.Contracts) > 0 { + for _, e := range m.Contracts { + l = e.Size() + n += 1 + l + sovRequestId(uint64(l)) + } + } + return n +} + +func (m *ExecuteContractMsg) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Identity) + if l > 0 { + n += 1 + l + sovRequestId(uint64(l)) + } + l = len(m.Pubkey) + if l > 0 { + n += 1 + l + sovRequestId(uint64(l)) + } + l = len(m.AggrKeyshare) + if l > 0 { + n += 1 + l + sovRequestId(uint64(l)) + } + return n +} + func sovRequestId(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -624,6 +981,382 @@ func (m *PrivateRequest) Unmarshal(dAtA []byte) error { } return nil } +func (m *ContractDetails) 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 ErrIntOverflowRequestId + } + 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: ContractDetails: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContractDetails: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Registrar", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestId + } + 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 ErrInvalidLengthRequestId + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestId + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Registrar = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestId + } + 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 ErrInvalidLengthRequestId + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestId + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestId(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRequestId + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RegisteredContract) 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 ErrIntOverflowRequestId + } + 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: RegisteredContract: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RegisteredContract: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestId + } + 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 ErrInvalidLengthRequestId + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestId + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Contracts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestId + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRequestId + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRequestId + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Contracts = append(m.Contracts, &ContractDetails{}) + if err := m.Contracts[len(m.Contracts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestId(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRequestId + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExecuteContractMsg) 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 ErrIntOverflowRequestId + } + 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: ExecuteContractMsg: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExecuteContractMsg: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestId + } + 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 ErrInvalidLengthRequestId + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestId + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestId + } + 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 ErrInvalidLengthRequestId + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestId + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Pubkey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AggrKeyshare", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequestId + } + 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 ErrInvalidLengthRequestId + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRequestId + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AggrKeyshare = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequestId(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRequestId + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipRequestId(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/pep/types/tx.pb.go b/x/pep/types/tx.pb.go index 6a463fe8..3ef57b7e 100644 --- a/x/pep/types/tx.pb.go +++ b/x/pep/types/tx.pb.go @@ -766,6 +766,198 @@ func (m *MsgGetPrivateKeysharesResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgGetPrivateKeysharesResponse proto.InternalMessageInfo +type MsgRegisterContract struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + Identity string `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"` +} + +func (m *MsgRegisterContract) Reset() { *m = MsgRegisterContract{} } +func (m *MsgRegisterContract) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterContract) ProtoMessage() {} +func (*MsgRegisterContract) Descriptor() ([]byte, []int) { + return fileDescriptor_f6953e463911e1ec, []int{15} +} +func (m *MsgRegisterContract) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterContract.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 *MsgRegisterContract) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterContract.Merge(m, src) +} +func (m *MsgRegisterContract) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterContract) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterContract.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterContract proto.InternalMessageInfo + +func (m *MsgRegisterContract) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgRegisterContract) GetContractAddress() string { + if m != nil { + return m.ContractAddress + } + return "" +} + +func (m *MsgRegisterContract) GetIdentity() string { + if m != nil { + return m.Identity + } + return "" +} + +type MsgRegisterContractResponse struct { +} + +func (m *MsgRegisterContractResponse) Reset() { *m = MsgRegisterContractResponse{} } +func (m *MsgRegisterContractResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterContractResponse) ProtoMessage() {} +func (*MsgRegisterContractResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f6953e463911e1ec, []int{16} +} +func (m *MsgRegisterContractResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterContractResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterContractResponse.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 *MsgRegisterContractResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterContractResponse.Merge(m, src) +} +func (m *MsgRegisterContractResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterContractResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterContractResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterContractResponse proto.InternalMessageInfo + +type MsgUnregisterContract struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + Identity string `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"` +} + +func (m *MsgUnregisterContract) Reset() { *m = MsgUnregisterContract{} } +func (m *MsgUnregisterContract) String() string { return proto.CompactTextString(m) } +func (*MsgUnregisterContract) ProtoMessage() {} +func (*MsgUnregisterContract) Descriptor() ([]byte, []int) { + return fileDescriptor_f6953e463911e1ec, []int{17} +} +func (m *MsgUnregisterContract) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUnregisterContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUnregisterContract.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 *MsgUnregisterContract) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUnregisterContract.Merge(m, src) +} +func (m *MsgUnregisterContract) XXX_Size() int { + return m.Size() +} +func (m *MsgUnregisterContract) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUnregisterContract.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUnregisterContract proto.InternalMessageInfo + +func (m *MsgUnregisterContract) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgUnregisterContract) GetContractAddress() string { + if m != nil { + return m.ContractAddress + } + return "" +} + +func (m *MsgUnregisterContract) GetIdentity() string { + if m != nil { + return m.Identity + } + return "" +} + +type MsgUnregisterContractResponse struct { +} + +func (m *MsgUnregisterContractResponse) Reset() { *m = MsgUnregisterContractResponse{} } +func (m *MsgUnregisterContractResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUnregisterContractResponse) ProtoMessage() {} +func (*MsgUnregisterContractResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f6953e463911e1ec, []int{18} +} +func (m *MsgUnregisterContractResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUnregisterContractResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUnregisterContractResponse.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 *MsgUnregisterContractResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUnregisterContractResponse.Merge(m, src) +} +func (m *MsgUnregisterContractResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUnregisterContractResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUnregisterContractResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUnregisterContractResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgUpdateParams)(nil), "fairyring.pep.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "fairyring.pep.MsgUpdateParamsResponse") @@ -782,65 +974,76 @@ func init() { proto.RegisterType((*MsgRequestPrivateIdentityResponse)(nil), "fairyring.pep.MsgRequestPrivateIdentityResponse") proto.RegisterType((*MsgGetPrivateKeyshares)(nil), "fairyring.pep.MsgGetPrivateKeyshares") proto.RegisterType((*MsgGetPrivateKeysharesResponse)(nil), "fairyring.pep.MsgGetPrivateKeysharesResponse") + proto.RegisterType((*MsgRegisterContract)(nil), "fairyring.pep.MsgRegisterContract") + proto.RegisterType((*MsgRegisterContractResponse)(nil), "fairyring.pep.MsgRegisterContractResponse") + proto.RegisterType((*MsgUnregisterContract)(nil), "fairyring.pep.MsgUnregisterContract") + proto.RegisterType((*MsgUnregisterContractResponse)(nil), "fairyring.pep.MsgUnregisterContractResponse") } func init() { proto.RegisterFile("fairyring/pep/tx.proto", fileDescriptor_f6953e463911e1ec) } var fileDescriptor_f6953e463911e1ec = []byte{ - // 848 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0x26, 0xa9, 0x91, 0x5f, 0x0b, 0x55, 0x96, 0x24, 0x75, 0x16, 0xd8, 0x04, 0x97, 0x22, - 0xcb, 0xb4, 0xbb, 0x24, 0x20, 0x84, 0x72, 0xab, 0x09, 0xa4, 0x55, 0x65, 0x29, 0xda, 0x40, 0x25, - 0xb8, 0x58, 0xb3, 0xde, 0xd7, 0xf1, 0xca, 0x3f, 0x66, 0x3d, 0x33, 0x0e, 0x59, 0x4e, 0x15, 0x47, - 0x4e, 0x1c, 0xf9, 0x03, 0x38, 0x70, 0xcc, 0x81, 0x3f, 0xa2, 0x07, 0x0e, 0x15, 0x27, 0x4e, 0x80, - 0x92, 0x43, 0xfe, 0x0c, 0xd0, 0xfe, 0x74, 0xbc, 0x3f, 0x5c, 0xa7, 0x17, 0x7b, 0x67, 0xde, 0x37, - 0xef, 0xfb, 0xbe, 0xb7, 0xf3, 0x9e, 0x16, 0x36, 0x9f, 0x11, 0x97, 0xfb, 0xdc, 0x1d, 0x51, 0xd3, - 0x43, 0xcf, 0x94, 0xa7, 0x86, 0xc7, 0x99, 0x64, 0xea, 0x9b, 0xe9, 0xbe, 0xe1, 0xa1, 0xa7, 0xad, - 0x91, 0xa1, 0x3b, 0x62, 0x66, 0xf8, 0x1b, 0x21, 0xb4, 0x3b, 0x5d, 0x26, 0x86, 0x4c, 0x98, 0x43, - 0x41, 0xcd, 0x93, 0xdd, 0xe0, 0x2f, 0x0e, 0x6c, 0x45, 0x81, 0x4e, 0xb8, 0x32, 0xa3, 0x45, 0x1c, - 0xd2, 0x29, 0x63, 0x74, 0x80, 0x66, 0xb8, 0xb2, 0x27, 0xcf, 0x4c, 0x67, 0xc2, 0x89, 0x74, 0xd9, - 0x28, 0x8e, 0xaf, 0x53, 0x46, 0x59, 0x74, 0x2e, 0x78, 0x8a, 0x77, 0xb5, 0x59, 0x8d, 0x1e, 0xe1, - 0x64, 0x98, 0x64, 0x6c, 0xcc, 0xc6, 0x08, 0xa5, 0x1c, 0x29, 0x91, 0xe8, 0x74, 0xfa, 0xe8, 0x77, - 0x44, 0x8f, 0x70, 0x4c, 0xb8, 0x63, 0xbd, 0x36, 0x11, 0x68, 0x9e, 0xec, 0xda, 0x28, 0xc9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0xb9, 0xbf, 0x0c, - 0x72, 0x8e, 0xbf, 0xb2, 0xfe, 0xed, 0xc3, 0xdb, 0x45, 0x5d, 0x7a, 0xaf, 0x50, 0x7a, 0x16, 0xa6, - 0x3d, 0x58, 0x08, 0x96, 0x90, 0x69, 0x37, 0x9e, 0x07, 0x9f, 0x0a, 0xad, 0x83, 0x17, 0xe7, 0xba, - 0xf2, 0xf2, 0x5c, 0x57, 0xfe, 0x3d, 0xd7, 0x95, 0x9f, 0x2f, 0xf4, 0xa5, 0x97, 0x17, 0xfa, 0xd2, - 0x5f, 0x17, 0xfa, 0xd2, 0x77, 0xcd, 0x85, 0xbe, 0x14, 0xa4, 0xef, 0xa1, 0xb0, 0x2b, 0xe1, 0xf0, - 0xff, 0xe4, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x57, 0x44, 0xcb, 0x00, 0x01, 0x0a, 0x00, 0x00, + // 952 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x96, 0xcf, 0x6f, 0xdc, 0x44, + 0x14, 0xc7, 0xe3, 0x24, 0x0d, 0xdd, 0xd7, 0x42, 0x1a, 0x37, 0x49, 0x37, 0x86, 0x3a, 0x61, 0x4b, + 0xd1, 0xb2, 0xb4, 0x6b, 0x12, 0x10, 0x42, 0xb9, 0x75, 0x1b, 0x48, 0xab, 0x6a, 0xa5, 0x68, 0x43, + 0x2b, 0xc1, 0x65, 0x35, 0xb6, 0x5f, 0x67, 0xad, 0x64, 0x6d, 0x67, 0x66, 0x36, 0xc4, 0x9c, 0x2a, + 0x84, 0x38, 0x70, 0xe2, 0xc8, 0x1f, 0xc0, 0x81, 0x63, 0x0e, 0xfc, 0x11, 0x3d, 0x80, 0x54, 0x71, + 0xe2, 0x04, 0x28, 0x39, 0xe4, 0xdf, 0x40, 0xb6, 0xc7, 0xde, 0xac, 0x7f, 0x6c, 0x36, 0x5c, 0x7a, + 0x49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ed, 0x81, 0x5a, 0xd0, 0x25, 0xdf, 0xcb, 0xc7, 0xc9, 0xab, 0xb4, + 0x7b, 0x93, 0xa8, 0x0a, 0xf2, 0xcb, 0xb6, 0xc5, 0xf2, 0xfc, 0x32, 0xca, 0x31, 0xf9, 0x95, 0xf5, + 0xc3, 0x3d, 0xb8, 0x59, 0xd4, 0xf5, 0xee, 0x16, 0xa2, 0x67, 0x65, 0xda, 0xfd, 0x89, 0x64, 0xa9, + 0x99, 0x09, 0x37, 0x72, 0x6d, 0xac, 0x56, 0x84, 0x3c, 0xaa, 0xd1, 0x1a, 0x17, 0x6b, 0xce, 0x3f, + 0xb0, 0x82, 0x26, 0x54, 0xf0, 0xc0, 0xf2, 0xaa, 0xa2, 0x07, 0x56, 0xde, 0x48, 0xb4, 0x2b, 0x2f, + 0xc2, 0x0f, 0xc9, 0xd6, 0xd6, 0xcb, 0x13, 0x5d, 0x79, 0x75, 0xa2, 0x2b, 0xff, 0x9e, 0xe8, 0xca, + 0x4f, 0xa7, 0xfa, 0xd4, 0xab, 0x53, 0x7d, 0xea, 0xaf, 0x53, 0x7d, 0xea, 0xeb, 0xc6, 0x44, 0xdf, + 0x91, 0x22, 0xf0, 0x91, 0x9b, 0x73, 0xd1, 0xa7, 0xc1, 0xc7, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, + 0xa6, 0x87, 0x12, 0xeb, 0x1f, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -866,6 +1069,8 @@ type MsgClient interface { GetGeneralKeyshare(ctx context.Context, in *MsgGetGeneralKeyshare, opts ...grpc.CallOption) (*MsgGetGeneralKeyshareResponse, error) RequestPrivateIdentity(ctx context.Context, in *MsgRequestPrivateIdentity, opts ...grpc.CallOption) (*MsgRequestPrivateIdentityResponse, error) GetPrivateKeyshares(ctx context.Context, in *MsgGetPrivateKeyshares, opts ...grpc.CallOption) (*MsgGetPrivateKeysharesResponse, error) + RegisterContract(ctx context.Context, in *MsgRegisterContract, opts ...grpc.CallOption) (*MsgRegisterContractResponse, error) + UnregisterContract(ctx context.Context, in *MsgUnregisterContract, opts ...grpc.CallOption) (*MsgUnregisterContractResponse, error) } type msgClient struct { @@ -948,6 +1153,24 @@ func (c *msgClient) GetPrivateKeyshares(ctx context.Context, in *MsgGetPrivateKe return out, nil } +func (c *msgClient) RegisterContract(ctx context.Context, in *MsgRegisterContract, opts ...grpc.CallOption) (*MsgRegisterContractResponse, error) { + out := new(MsgRegisterContractResponse) + err := c.cc.Invoke(ctx, "/fairyring.pep.Msg/RegisterContract", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UnregisterContract(ctx context.Context, in *MsgUnregisterContract, opts ...grpc.CallOption) (*MsgUnregisterContractResponse, error) { + out := new(MsgUnregisterContractResponse) + err := c.cc.Invoke(ctx, "/fairyring.pep.Msg/UnregisterContract", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // UpdateParams defines a (governance) operation for updating the module @@ -961,6 +1184,8 @@ type MsgServer interface { GetGeneralKeyshare(context.Context, *MsgGetGeneralKeyshare) (*MsgGetGeneralKeyshareResponse, error) RequestPrivateIdentity(context.Context, *MsgRequestPrivateIdentity) (*MsgRequestPrivateIdentityResponse, error) GetPrivateKeyshares(context.Context, *MsgGetPrivateKeyshares) (*MsgGetPrivateKeysharesResponse, error) + RegisterContract(context.Context, *MsgRegisterContract) (*MsgRegisterContractResponse, error) + UnregisterContract(context.Context, *MsgUnregisterContract) (*MsgUnregisterContractResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -991,6 +1216,12 @@ func (*UnimplementedMsgServer) RequestPrivateIdentity(ctx context.Context, req * func (*UnimplementedMsgServer) GetPrivateKeyshares(ctx context.Context, req *MsgGetPrivateKeyshares) (*MsgGetPrivateKeysharesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPrivateKeyshares not implemented") } +func (*UnimplementedMsgServer) RegisterContract(ctx context.Context, req *MsgRegisterContract) (*MsgRegisterContractResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterContract not implemented") +} +func (*UnimplementedMsgServer) UnregisterContract(ctx context.Context, req *MsgUnregisterContract) (*MsgUnregisterContractResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnregisterContract not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -1140,6 +1371,42 @@ func _Msg_GetPrivateKeyshares_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _Msg_RegisterContract_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRegisterContract) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RegisterContract(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/fairyring.pep.Msg/RegisterContract", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RegisterContract(ctx, req.(*MsgRegisterContract)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UnregisterContract_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUnregisterContract) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UnregisterContract(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/fairyring.pep.Msg/UnregisterContract", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UnregisterContract(ctx, req.(*MsgUnregisterContract)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "fairyring.pep.Msg", HandlerType: (*MsgServer)(nil), @@ -1176,6 +1443,14 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "GetPrivateKeyshares", Handler: _Msg_GetPrivateKeyshares_Handler, }, + { + MethodName: "RegisterContract", + Handler: _Msg_RegisterContract_Handler, + }, + { + MethodName: "UnregisterContract", + Handler: _Msg_UnregisterContract_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "fairyring/pep/tx.proto", @@ -1689,83 +1964,217 @@ func (m *MsgGetPrivateKeysharesResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func encodeVarintTx(dAtA []byte, offset int, v uint64) int { - offset -= sovTx(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *MsgUpdateParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Authority) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) +func (m *MsgRegisterContract) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - l = m.Params.Size() - n += 1 + l + sovTx(uint64(l)) - return n + return dAtA[:n], nil } -func (m *MsgUpdateParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n +func (m *MsgRegisterContract) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgSubmitEncryptedTx) Size() (n int) { - if m == nil { - return 0 - } +func (m *MsgRegisterContract) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = encodeVarintTx(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0x1a } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0x12 } - if m.TargetBlockHeight != 0 { - n += 1 + sovTx(uint64(m.TargetBlockHeight)) + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *MsgSubmitGeneralEncryptedTx) Size() (n int) { - if m == nil { - return 0 +func (m *MsgRegisterContractResponse) 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 *MsgRegisterContractResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRegisterContractResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ReqId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n + return len(dAtA) - i, nil } -func (m *MsgSubmitEncryptedTxResponse) Size() (n int) { +func (m *MsgUnregisterContract) 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 *MsgUnregisterContract) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUnregisterContract) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = encodeVarintTx(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0x1a + } + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUnregisterContractResponse) 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 *MsgUnregisterContractResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUnregisterContractResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgSubmitEncryptedTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.TargetBlockHeight != 0 { + n += 1 + sovTx(uint64(m.TargetBlockHeight)) + } + return n +} + +func (m *MsgSubmitGeneralEncryptedTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.ReqId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgSubmitEncryptedTxResponse) Size() (n int) { if m == nil { return 0 } @@ -1923,6 +2332,66 @@ func (m *MsgGetPrivateKeysharesResponse) Size() (n int) { return n } +func (m *MsgRegisterContract) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Identity) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgRegisterContractResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUnregisterContract) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Identity) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUnregisterContractResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -2311,14 +2780,397 @@ func (m *MsgSubmitGeneralEncryptedTx) Unmarshal(dAtA []byte) error { if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReqId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ReqId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSubmitEncryptedTxResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSubmitEncryptedTxResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSubmitEncryptedTxResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateAggregatedKeyShare) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateAggregatedKeyShare: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateAggregatedKeyShare: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateAggregatedKeyShareResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateAggregatedKeyShareResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateAggregatedKeyShareResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRequestGeneralKeyshare) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRequestGeneralKeyshare: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRequestGeneralKeyshare: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EstimatedDelay", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.Data = string(dAtA[iNdEx:postIndex]) + if m.EstimatedDelay == nil { + m.EstimatedDelay = new(time.Duration) + } + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(m.EstimatedDelay, dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 3: if wireType != 2 { @@ -2373,7 +3225,7 @@ func (m *MsgSubmitGeneralEncryptedTx) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSubmitEncryptedTxResponse) Unmarshal(dAtA []byte) error { +func (m *MsgRequestGeneralKeyshareResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2396,12 +3248,44 @@ func (m *MsgSubmitEncryptedTxResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSubmitEncryptedTxResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgRequestGeneralKeyshareResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSubmitEncryptedTxResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgRequestGeneralKeyshareResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReqId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ReqId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -2423,7 +3307,7 @@ func (m *MsgSubmitEncryptedTxResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgCreateAggregatedKeyShare) Unmarshal(dAtA []byte) error { +func (m *MsgGetGeneralKeyshare) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2446,10 +3330,10 @@ func (m *MsgCreateAggregatedKeyShare) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgCreateAggregatedKeyShare: wiretype end group for non-group") + return fmt.Errorf("proto: MsgGetGeneralKeyshare: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateAggregatedKeyShare: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgGetGeneralKeyshare: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2485,27 +3369,8 @@ func (m *MsgCreateAggregatedKeyShare) Unmarshal(dAtA []byte) error { m.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ReqId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2533,7 +3398,7 @@ func (m *MsgCreateAggregatedKeyShare) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Data = string(dAtA[iNdEx:postIndex]) + m.ReqId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2556,7 +3421,7 @@ func (m *MsgCreateAggregatedKeyShare) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgCreateAggregatedKeyShareResponse) Unmarshal(dAtA []byte) error { +func (m *MsgGetGeneralKeyshareResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2579,10 +3444,10 @@ func (m *MsgCreateAggregatedKeyShareResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgCreateAggregatedKeyShareResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgGetGeneralKeyshareResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateAggregatedKeyShareResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgGetGeneralKeyshareResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -2606,7 +3471,7 @@ func (m *MsgCreateAggregatedKeyShareResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgRequestGeneralKeyshare) Unmarshal(dAtA []byte) error { +func (m *MsgRequestPrivateIdentity) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2629,10 +3494,10 @@ func (m *MsgRequestGeneralKeyshare) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgRequestGeneralKeyshare: wiretype end group for non-group") + return fmt.Errorf("proto: MsgRequestPrivateIdentity: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRequestGeneralKeyshare: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgRequestPrivateIdentity: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2668,42 +3533,6 @@ func (m *MsgRequestGeneralKeyshare) Unmarshal(dAtA []byte) error { m.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EstimatedDelay", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.EstimatedDelay == nil { - m.EstimatedDelay = new(time.Duration) - } - if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(m.EstimatedDelay, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ReqId", wireType) } @@ -2756,7 +3585,7 @@ func (m *MsgRequestGeneralKeyshare) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgRequestGeneralKeyshareResponse) Unmarshal(dAtA []byte) error { +func (m *MsgRequestPrivateIdentityResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2779,10 +3608,10 @@ func (m *MsgRequestGeneralKeyshareResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgRequestGeneralKeyshareResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgRequestPrivateIdentityResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRequestGeneralKeyshareResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgRequestPrivateIdentityResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2838,7 +3667,7 @@ func (m *MsgRequestGeneralKeyshareResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgGetGeneralKeyshare) Unmarshal(dAtA []byte) error { +func (m *MsgGetPrivateKeyshares) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2861,10 +3690,10 @@ func (m *MsgGetGeneralKeyshare) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgGetGeneralKeyshare: wiretype end group for non-group") + return fmt.Errorf("proto: MsgGetPrivateKeyshares: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgGetGeneralKeyshare: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgGetPrivateKeyshares: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2931,6 +3760,38 @@ func (m *MsgGetGeneralKeyshare) Unmarshal(dAtA []byte) error { } m.ReqId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SecpPubkey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SecpPubkey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -2952,7 +3813,7 @@ func (m *MsgGetGeneralKeyshare) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgGetGeneralKeyshareResponse) Unmarshal(dAtA []byte) error { +func (m *MsgGetPrivateKeysharesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2975,10 +3836,10 @@ func (m *MsgGetGeneralKeyshareResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgGetGeneralKeyshareResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgGetPrivateKeysharesResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgGetGeneralKeyshareResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgGetPrivateKeysharesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -3002,7 +3863,7 @@ func (m *MsgGetGeneralKeyshareResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgRequestPrivateIdentity) Unmarshal(dAtA []byte) error { +func (m *MsgRegisterContract) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3025,10 +3886,10 @@ func (m *MsgRequestPrivateIdentity) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgRequestPrivateIdentity: wiretype end group for non-group") + return fmt.Errorf("proto: MsgRegisterContract: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRequestPrivateIdentity: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgRegisterContract: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3065,7 +3926,7 @@ func (m *MsgRequestPrivateIdentity) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReqId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3093,7 +3954,39 @@ func (m *MsgRequestPrivateIdentity) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ReqId = string(dAtA[iNdEx:postIndex]) + m.ContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3116,7 +4009,7 @@ func (m *MsgRequestPrivateIdentity) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgRequestPrivateIdentityResponse) Unmarshal(dAtA []byte) error { +func (m *MsgRegisterContractResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3139,44 +4032,12 @@ func (m *MsgRequestPrivateIdentityResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgRequestPrivateIdentityResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgRegisterContractResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRequestPrivateIdentityResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgRegisterContractResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReqId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ReqId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -3198,7 +4059,7 @@ func (m *MsgRequestPrivateIdentityResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgGetPrivateKeyshares) Unmarshal(dAtA []byte) error { +func (m *MsgUnregisterContract) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3221,10 +4082,10 @@ func (m *MsgGetPrivateKeyshares) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgGetPrivateKeyshares: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUnregisterContract: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgGetPrivateKeyshares: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUnregisterContract: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3261,7 +4122,7 @@ func (m *MsgGetPrivateKeyshares) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReqId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3289,11 +4150,11 @@ func (m *MsgGetPrivateKeyshares) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ReqId = string(dAtA[iNdEx:postIndex]) + m.ContractAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SecpPubkey", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3321,7 +4182,7 @@ func (m *MsgGetPrivateKeyshares) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SecpPubkey = string(dAtA[iNdEx:postIndex]) + m.Identity = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3344,7 +4205,7 @@ func (m *MsgGetPrivateKeyshares) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgGetPrivateKeysharesResponse) Unmarshal(dAtA []byte) error { +func (m *MsgUnregisterContractResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3367,10 +4228,10 @@ func (m *MsgGetPrivateKeysharesResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgGetPrivateKeysharesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUnregisterContractResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgGetPrivateKeysharesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUnregisterContractResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: