diff --git a/golang/iotexapi/read_state.pb.go b/golang/iotexapi/read_state.pb.go index f037559..4401d52 100644 --- a/golang/iotexapi/read_state.pb.go +++ b/golang/iotexapi/read_state.pb.go @@ -9,7 +9,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.26.0 // protoc v3.21.12 // source: proto/api/read_state.proto @@ -42,33 +42,55 @@ const ( ReadStakingDataMethod_CANDIDATE_BY_ADDRESS ReadStakingDataMethod_Name = 7 ReadStakingDataMethod_TOTAL_STAKING_AMOUNT ReadStakingDataMethod_Name = 8 ReadStakingDataMethod_BUCKETS_COUNT ReadStakingDataMethod_Name = 9 + // 10-19 reserved for native staking + ReadStakingDataMethod_COMPOSITE_BUCKETS ReadStakingDataMethod_Name = 20 + ReadStakingDataMethod_COMPOSITE_BUCKETS_BY_VOTER ReadStakingDataMethod_Name = 21 + ReadStakingDataMethod_COMPOSITE_BUCKETS_BY_CANDIDATE ReadStakingDataMethod_Name = 22 + ReadStakingDataMethod_COMPOSITE_BUCKETS_BY_INDEXES ReadStakingDataMethod_Name = 23 + ReadStakingDataMethod_COMPOSITE_BUCKETS_COUNT ReadStakingDataMethod_Name = 24 + ReadStakingDataMethod_COMPOSITE_TOTAL_STAKING_AMOUNT ReadStakingDataMethod_Name = 25 + ReadStakingDataMethod_CONTRACT_STAKING_BUCKET_TYPES ReadStakingDataMethod_Name = 26 ) // Enum value maps for ReadStakingDataMethod_Name. var ( ReadStakingDataMethod_Name_name = map[int32]string{ - 0: "INVALID", - 1: "BUCKETS", - 2: "BUCKETS_BY_VOTER", - 3: "BUCKETS_BY_CANDIDATE", - 4: "CANDIDATES", - 5: "CANDIDATE_BY_NAME", - 6: "BUCKETS_BY_INDEXES", - 7: "CANDIDATE_BY_ADDRESS", - 8: "TOTAL_STAKING_AMOUNT", - 9: "BUCKETS_COUNT", + 0: "INVALID", + 1: "BUCKETS", + 2: "BUCKETS_BY_VOTER", + 3: "BUCKETS_BY_CANDIDATE", + 4: "CANDIDATES", + 5: "CANDIDATE_BY_NAME", + 6: "BUCKETS_BY_INDEXES", + 7: "CANDIDATE_BY_ADDRESS", + 8: "TOTAL_STAKING_AMOUNT", + 9: "BUCKETS_COUNT", + 20: "COMPOSITE_BUCKETS", + 21: "COMPOSITE_BUCKETS_BY_VOTER", + 22: "COMPOSITE_BUCKETS_BY_CANDIDATE", + 23: "COMPOSITE_BUCKETS_BY_INDEXES", + 24: "COMPOSITE_BUCKETS_COUNT", + 25: "COMPOSITE_TOTAL_STAKING_AMOUNT", + 26: "CONTRACT_STAKING_BUCKET_TYPES", } ReadStakingDataMethod_Name_value = map[string]int32{ - "INVALID": 0, - "BUCKETS": 1, - "BUCKETS_BY_VOTER": 2, - "BUCKETS_BY_CANDIDATE": 3, - "CANDIDATES": 4, - "CANDIDATE_BY_NAME": 5, - "BUCKETS_BY_INDEXES": 6, - "CANDIDATE_BY_ADDRESS": 7, - "TOTAL_STAKING_AMOUNT": 8, - "BUCKETS_COUNT": 9, + "INVALID": 0, + "BUCKETS": 1, + "BUCKETS_BY_VOTER": 2, + "BUCKETS_BY_CANDIDATE": 3, + "CANDIDATES": 4, + "CANDIDATE_BY_NAME": 5, + "BUCKETS_BY_INDEXES": 6, + "CANDIDATE_BY_ADDRESS": 7, + "TOTAL_STAKING_AMOUNT": 8, + "BUCKETS_COUNT": 9, + "COMPOSITE_BUCKETS": 20, + "COMPOSITE_BUCKETS_BY_VOTER": 21, + "COMPOSITE_BUCKETS_BY_CANDIDATE": 22, + "COMPOSITE_BUCKETS_BY_INDEXES": 23, + "COMPOSITE_BUCKETS_COUNT": 24, + "COMPOSITE_TOTAL_STAKING_AMOUNT": 25, + "CONTRACT_STAKING_BUCKET_TYPES": 26, } ) @@ -217,6 +239,7 @@ type ReadStakingDataRequest struct { // *ReadStakingDataRequest_CandidateByAddress_ // *ReadStakingDataRequest_TotalStakingAmount_ // *ReadStakingDataRequest_BucketsCount_ + // *ReadStakingDataRequest_ContractStakingBucketTypes_ Request isReadStakingDataRequest_Request `protobuf_oneof:"request"` } @@ -322,6 +345,13 @@ func (x *ReadStakingDataRequest) GetBucketsCount() *ReadStakingDataRequest_Bucke return nil } +func (x *ReadStakingDataRequest) GetContractStakingBucketTypes() *ReadStakingDataRequest_ContractStakingBucketTypes { + if x, ok := x.GetRequest().(*ReadStakingDataRequest_ContractStakingBucketTypes_); ok { + return x.ContractStakingBucketTypes + } + return nil +} + type isReadStakingDataRequest_Request interface { isReadStakingDataRequest_Request() } @@ -362,6 +392,10 @@ type ReadStakingDataRequest_BucketsCount_ struct { BucketsCount *ReadStakingDataRequest_BucketsCount `protobuf:"bytes,9,opt,name=bucketsCount,proto3,oneof"` } +type ReadStakingDataRequest_ContractStakingBucketTypes_ struct { + ContractStakingBucketTypes *ReadStakingDataRequest_ContractStakingBucketTypes `protobuf:"bytes,10,opt,name=contractStakingBucketTypes,proto3,oneof"` +} + func (*ReadStakingDataRequest_Buckets) isReadStakingDataRequest_Request() {} func (*ReadStakingDataRequest_BucketsByVoter) isReadStakingDataRequest_Request() {} @@ -380,6 +414,8 @@ func (*ReadStakingDataRequest_TotalStakingAmount_) isReadStakingDataRequest_Requ func (*ReadStakingDataRequest_BucketsCount_) isReadStakingDataRequest_Request() {} +func (*ReadStakingDataRequest_ContractStakingBucketTypes_) isReadStakingDataRequest_Request() {} + type ReadStakingDataRequest_VoteBuckets struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -801,6 +837,53 @@ func (*ReadStakingDataRequest_BucketsCount) Descriptor() ([]byte, []int) { return file_proto_api_read_state_proto_rawDescGZIP(), []int{2, 8} } +type ReadStakingDataRequest_ContractStakingBucketTypes struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ContractAddress string `protobuf:"bytes,1,opt,name=contractAddress,proto3" json:"contractAddress,omitempty"` +} + +func (x *ReadStakingDataRequest_ContractStakingBucketTypes) Reset() { + *x = ReadStakingDataRequest_ContractStakingBucketTypes{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_api_read_state_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadStakingDataRequest_ContractStakingBucketTypes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadStakingDataRequest_ContractStakingBucketTypes) ProtoMessage() {} + +func (x *ReadStakingDataRequest_ContractStakingBucketTypes) ProtoReflect() protoreflect.Message { + mi := &file_proto_api_read_state_proto_msgTypes[12] + 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) +} + +// Deprecated: Use ReadStakingDataRequest_ContractStakingBucketTypes.ProtoReflect.Descriptor instead. +func (*ReadStakingDataRequest_ContractStakingBucketTypes) Descriptor() ([]byte, []int) { + return file_proto_api_read_state_proto_rawDescGZIP(), []int{2, 9} +} + +func (x *ReadStakingDataRequest_ContractStakingBucketTypes) GetContractAddress() string { + if x != nil { + return x.ContractAddress + } + return "" +} + var File_proto_api_read_state_proto protoreflect.FileDescriptor var file_proto_api_read_state_proto_rawDesc = []byte{ @@ -810,13 +893,13 @@ var file_proto_api_read_state_proto_rawDesc = []byte{ 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0xae, 0x02, 0x0a, 0x15, 0x52, 0x65, 0x61, 0x64, + 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x8f, 0x04, 0x0a, 0x15, 0x52, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x3c, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x69, 0x6f, 0x74, 0x65, 0x78, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x22, - 0xd6, 0x01, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x56, 0x41, + 0xb7, 0x03, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x55, 0x43, 0x4b, 0x45, 0x54, 0x53, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x43, 0x4b, 0x45, 0x54, 0x53, 0x5f, 0x42, 0x59, 0x5f, 0x56, 0x4f, 0x54, 0x45, 0x52, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x55, 0x43, 0x4b, @@ -829,61 +912,83 @@ var file_proto_api_read_state_proto_rawDesc = []byte{ 0x59, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x10, 0x07, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x4f, 0x54, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x4b, 0x49, 0x4e, 0x47, 0x5f, 0x41, 0x4d, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x08, 0x12, 0x11, 0x0a, 0x0d, 0x42, 0x55, 0x43, 0x4b, 0x45, 0x54, 0x53, - 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x09, 0x22, 0x9c, 0x0b, 0x0a, 0x16, 0x52, 0x65, 0x61, - 0x64, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x48, 0x0a, 0x07, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x69, 0x6f, 0x74, 0x65, 0x78, 0x61, 0x70, 0x69, 0x2e, - 0x52, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, - 0x74, 0x73, 0x48, 0x00, 0x52, 0x07, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x5d, 0x0a, - 0x0e, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x42, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x69, 0x6f, 0x74, 0x65, 0x78, 0x61, 0x70, 0x69, + 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x09, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x4f, 0x4d, 0x50, + 0x4f, 0x53, 0x49, 0x54, 0x45, 0x5f, 0x42, 0x55, 0x43, 0x4b, 0x45, 0x54, 0x53, 0x10, 0x14, 0x12, + 0x1e, 0x0a, 0x1a, 0x43, 0x4f, 0x4d, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x45, 0x5f, 0x42, 0x55, 0x43, + 0x4b, 0x45, 0x54, 0x53, 0x5f, 0x42, 0x59, 0x5f, 0x56, 0x4f, 0x54, 0x45, 0x52, 0x10, 0x15, 0x12, + 0x22, 0x0a, 0x1e, 0x43, 0x4f, 0x4d, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x45, 0x5f, 0x42, 0x55, 0x43, + 0x4b, 0x45, 0x54, 0x53, 0x5f, 0x42, 0x59, 0x5f, 0x43, 0x41, 0x4e, 0x44, 0x49, 0x44, 0x41, 0x54, + 0x45, 0x10, 0x16, 0x12, 0x20, 0x0a, 0x1c, 0x43, 0x4f, 0x4d, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x45, + 0x5f, 0x42, 0x55, 0x43, 0x4b, 0x45, 0x54, 0x53, 0x5f, 0x42, 0x59, 0x5f, 0x49, 0x4e, 0x44, 0x45, + 0x58, 0x45, 0x53, 0x10, 0x17, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x4f, 0x4d, 0x50, 0x4f, 0x53, 0x49, + 0x54, 0x45, 0x5f, 0x42, 0x55, 0x43, 0x4b, 0x45, 0x54, 0x53, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, + 0x10, 0x18, 0x12, 0x22, 0x0a, 0x1e, 0x43, 0x4f, 0x4d, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x45, 0x5f, + 0x54, 0x4f, 0x54, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x4b, 0x49, 0x4e, 0x47, 0x5f, 0x41, 0x4d, + 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x19, 0x12, 0x21, 0x0a, 0x1d, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x41, + 0x43, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x4b, 0x49, 0x4e, 0x47, 0x5f, 0x42, 0x55, 0x43, 0x4b, 0x45, + 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x53, 0x10, 0x1a, 0x22, 0xe3, 0x0c, 0x0a, 0x16, 0x52, 0x65, + 0x61, 0x64, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x48, 0x0a, 0x07, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x69, 0x6f, 0x74, 0x65, 0x78, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, - 0x65, 0x74, 0x73, 0x42, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0e, 0x62, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x73, 0x42, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x72, 0x12, 0x69, 0x0a, 0x12, - 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x42, 0x79, 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x69, 0x6f, 0x74, 0x65, 0x78, - 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x44, - 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x42, - 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x42, 0x79, 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x48, 0x00, 0x52, 0x12, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x42, 0x79, 0x43, 0x61, - 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x12, 0x4d, 0x0a, 0x0a, 0x63, 0x61, 0x6e, 0x64, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x69, 0x6f, - 0x74, 0x65, 0x78, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x61, - 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x61, 0x6e, 0x64, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x5c, 0x0a, 0x0f, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x30, 0x2e, 0x69, 0x6f, 0x74, 0x65, 0x78, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x53, + 0x65, 0x74, 0x73, 0x48, 0x00, 0x52, 0x07, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x5d, + 0x0a, 0x0e, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x42, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x69, 0x6f, 0x74, 0x65, 0x78, 0x61, 0x70, + 0x69, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, + 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x42, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x73, 0x42, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0e, 0x62, + 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x42, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x72, 0x12, 0x69, 0x0a, + 0x12, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x42, 0x79, 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x69, 0x6f, 0x74, 0x65, + 0x78, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, + 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x6f, 0x74, 0x65, + 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x42, 0x79, 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x48, 0x00, 0x52, 0x12, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x42, 0x79, 0x43, + 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x12, 0x4d, 0x0a, 0x0a, 0x63, 0x61, 0x6e, 0x64, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x69, + 0x6f, 0x74, 0x65, 0x78, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, + 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x61, 0x6e, + 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x5c, 0x0a, 0x0f, 0x63, 0x61, 0x6e, 0x64, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x30, 0x2e, 0x69, 0x6f, 0x74, 0x65, 0x78, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x61, 0x64, + 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x2e, 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x42, 0x79, 0x4e, 0x61, + 0x6d, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x42, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x63, 0x0a, 0x10, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, + 0x42, 0x79, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x35, 0x2e, 0x69, 0x6f, 0x74, 0x65, 0x78, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x2e, 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x42, 0x79, 0x4e, 0x61, 0x6d, - 0x65, 0x48, 0x00, 0x52, 0x0f, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x42, 0x79, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x63, 0x0a, 0x10, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x42, - 0x79, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, - 0x2e, 0x69, 0x6f, 0x74, 0x65, 0x78, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x53, 0x74, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x42, 0x79, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x65, 0x73, 0x48, 0x00, 0x52, 0x10, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, - 0x42, 0x79, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x12, 0x65, 0x0a, 0x12, 0x63, 0x61, 0x6e, - 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x69, 0x6f, 0x74, 0x65, 0x78, 0x61, 0x70, 0x69, - 0x2e, 0x52, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x12, 0x63, 0x61, + 0x74, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x42, 0x79, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x48, 0x00, 0x52, 0x10, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, + 0x73, 0x42, 0x79, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x12, 0x65, 0x0a, 0x12, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x65, 0x0a, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x69, - 0x6f, 0x74, 0x65, 0x78, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61, 0x6b, - 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, - 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x41, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x48, 0x00, 0x52, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x53, 0x0a, 0x0c, 0x62, 0x75, 0x63, 0x6b, 0x65, - 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x69, 0x6f, 0x74, 0x65, 0x78, 0x61, 0x70, + 0x69, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, + 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x12, 0x63, + 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x65, 0x0a, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, + 0x67, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x69, 0x6f, 0x74, 0x65, 0x78, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, - 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0c, - 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x48, 0x0a, 0x0b, + 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x41, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x48, 0x00, 0x52, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x53, 0x0a, 0x0c, 0x62, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, + 0x2e, 0x69, 0x6f, 0x74, 0x65, 0x78, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x53, 0x74, + 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x48, 0x00, 0x52, + 0x0c, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x7d, 0x0a, + 0x1a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, + 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x3b, 0x2e, 0x69, 0x6f, 0x74, 0x65, 0x78, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x61, + 0x64, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x53, 0x74, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x48, 0x00, + 0x52, 0x1a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, + 0x67, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x1a, 0x48, 0x0a, 0x0b, 0x56, 0x6f, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x39, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x69, 0x6f, 0x74, 0x65, 0x78, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, @@ -918,14 +1023,19 @@ var file_proto_api_read_state_proto_rawDesc = []byte{ 0x72, 0x41, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x1a, 0x14, 0x0a, 0x12, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x0e, 0x0a, 0x0c, - 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x09, 0x0a, 0x07, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x59, 0x0a, 0x20, 0x63, 0x6f, 0x6d, 0x2e, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x69, 0x6f, 0x74, 0x65, 0x78, 0x70, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x61, 0x70, 0x69, 0x50, 0x01, 0x5a, 0x33, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6f, 0x74, 0x65, 0x78, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x69, 0x6f, 0x74, 0x65, 0x78, 0x2d, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x69, 0x6f, 0x74, 0x65, 0x78, 0x61, - 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x46, 0x0a, 0x1a, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x42, + 0x75, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x42, 0x09, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, + 0x59, 0x0a, 0x20, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x69, 0x6f, + 0x74, 0x65, 0x78, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, + 0x61, 0x70, 0x69, 0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x69, 0x6f, 0x74, 0x65, 0x78, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x69, + 0x6f, 0x74, 0x65, 0x78, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, + 0x67, 0x2f, 0x69, 0x6f, 0x74, 0x65, 0x78, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -941,21 +1051,22 @@ func file_proto_api_read_state_proto_rawDescGZIP() []byte { } var file_proto_api_read_state_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_proto_api_read_state_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_proto_api_read_state_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_proto_api_read_state_proto_goTypes = []interface{}{ - (ReadStakingDataMethod_Name)(0), // 0: iotexapi.ReadStakingDataMethod.Name - (*PaginationParam)(nil), // 1: iotexapi.PaginationParam - (*ReadStakingDataMethod)(nil), // 2: iotexapi.ReadStakingDataMethod - (*ReadStakingDataRequest)(nil), // 3: iotexapi.ReadStakingDataRequest - (*ReadStakingDataRequest_VoteBuckets)(nil), // 4: iotexapi.ReadStakingDataRequest.VoteBuckets - (*ReadStakingDataRequest_VoteBucketsByVoter)(nil), // 5: iotexapi.ReadStakingDataRequest.VoteBucketsByVoter - (*ReadStakingDataRequest_VoteBucketsByCandidate)(nil), // 6: iotexapi.ReadStakingDataRequest.VoteBucketsByCandidate - (*ReadStakingDataRequest_Candidates)(nil), // 7: iotexapi.ReadStakingDataRequest.Candidates - (*ReadStakingDataRequest_CandidateByName)(nil), // 8: iotexapi.ReadStakingDataRequest.CandidateByName - (*ReadStakingDataRequest_VoteBucketsByIndexes)(nil), // 9: iotexapi.ReadStakingDataRequest.VoteBucketsByIndexes - (*ReadStakingDataRequest_CandidateByAddress)(nil), // 10: iotexapi.ReadStakingDataRequest.CandidateByAddress - (*ReadStakingDataRequest_TotalStakingAmount)(nil), // 11: iotexapi.ReadStakingDataRequest.TotalStakingAmount - (*ReadStakingDataRequest_BucketsCount)(nil), // 12: iotexapi.ReadStakingDataRequest.BucketsCount + (ReadStakingDataMethod_Name)(0), // 0: iotexapi.ReadStakingDataMethod.Name + (*PaginationParam)(nil), // 1: iotexapi.PaginationParam + (*ReadStakingDataMethod)(nil), // 2: iotexapi.ReadStakingDataMethod + (*ReadStakingDataRequest)(nil), // 3: iotexapi.ReadStakingDataRequest + (*ReadStakingDataRequest_VoteBuckets)(nil), // 4: iotexapi.ReadStakingDataRequest.VoteBuckets + (*ReadStakingDataRequest_VoteBucketsByVoter)(nil), // 5: iotexapi.ReadStakingDataRequest.VoteBucketsByVoter + (*ReadStakingDataRequest_VoteBucketsByCandidate)(nil), // 6: iotexapi.ReadStakingDataRequest.VoteBucketsByCandidate + (*ReadStakingDataRequest_Candidates)(nil), // 7: iotexapi.ReadStakingDataRequest.Candidates + (*ReadStakingDataRequest_CandidateByName)(nil), // 8: iotexapi.ReadStakingDataRequest.CandidateByName + (*ReadStakingDataRequest_VoteBucketsByIndexes)(nil), // 9: iotexapi.ReadStakingDataRequest.VoteBucketsByIndexes + (*ReadStakingDataRequest_CandidateByAddress)(nil), // 10: iotexapi.ReadStakingDataRequest.CandidateByAddress + (*ReadStakingDataRequest_TotalStakingAmount)(nil), // 11: iotexapi.ReadStakingDataRequest.TotalStakingAmount + (*ReadStakingDataRequest_BucketsCount)(nil), // 12: iotexapi.ReadStakingDataRequest.BucketsCount + (*ReadStakingDataRequest_ContractStakingBucketTypes)(nil), // 13: iotexapi.ReadStakingDataRequest.ContractStakingBucketTypes } var file_proto_api_read_state_proto_depIdxs = []int32{ 0, // 0: iotexapi.ReadStakingDataMethod.method:type_name -> iotexapi.ReadStakingDataMethod.Name @@ -968,15 +1079,16 @@ var file_proto_api_read_state_proto_depIdxs = []int32{ 10, // 7: iotexapi.ReadStakingDataRequest.candidateByAddress:type_name -> iotexapi.ReadStakingDataRequest.CandidateByAddress 11, // 8: iotexapi.ReadStakingDataRequest.totalStakingAmount:type_name -> iotexapi.ReadStakingDataRequest.TotalStakingAmount 12, // 9: iotexapi.ReadStakingDataRequest.bucketsCount:type_name -> iotexapi.ReadStakingDataRequest.BucketsCount - 1, // 10: iotexapi.ReadStakingDataRequest.VoteBuckets.pagination:type_name -> iotexapi.PaginationParam - 1, // 11: iotexapi.ReadStakingDataRequest.VoteBucketsByVoter.pagination:type_name -> iotexapi.PaginationParam - 1, // 12: iotexapi.ReadStakingDataRequest.VoteBucketsByCandidate.pagination:type_name -> iotexapi.PaginationParam - 1, // 13: iotexapi.ReadStakingDataRequest.Candidates.pagination:type_name -> iotexapi.PaginationParam - 14, // [14:14] is the sub-list for method output_type - 14, // [14:14] is the sub-list for method input_type - 14, // [14:14] is the sub-list for extension type_name - 14, // [14:14] is the sub-list for extension extendee - 0, // [0:14] is the sub-list for field type_name + 13, // 10: iotexapi.ReadStakingDataRequest.contractStakingBucketTypes:type_name -> iotexapi.ReadStakingDataRequest.ContractStakingBucketTypes + 1, // 11: iotexapi.ReadStakingDataRequest.VoteBuckets.pagination:type_name -> iotexapi.PaginationParam + 1, // 12: iotexapi.ReadStakingDataRequest.VoteBucketsByVoter.pagination:type_name -> iotexapi.PaginationParam + 1, // 13: iotexapi.ReadStakingDataRequest.VoteBucketsByCandidate.pagination:type_name -> iotexapi.PaginationParam + 1, // 14: iotexapi.ReadStakingDataRequest.Candidates.pagination:type_name -> iotexapi.PaginationParam + 15, // [15:15] is the sub-list for method output_type + 15, // [15:15] is the sub-list for method input_type + 15, // [15:15] is the sub-list for extension type_name + 15, // [15:15] is the sub-list for extension extendee + 0, // [0:15] is the sub-list for field type_name } func init() { file_proto_api_read_state_proto_init() } @@ -1129,6 +1241,18 @@ func file_proto_api_read_state_proto_init() { return nil } } + file_proto_api_read_state_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadStakingDataRequest_ContractStakingBucketTypes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_proto_api_read_state_proto_msgTypes[2].OneofWrappers = []interface{}{ (*ReadStakingDataRequest_Buckets)(nil), @@ -1140,6 +1264,7 @@ func file_proto_api_read_state_proto_init() { (*ReadStakingDataRequest_CandidateByAddress_)(nil), (*ReadStakingDataRequest_TotalStakingAmount_)(nil), (*ReadStakingDataRequest_BucketsCount_)(nil), + (*ReadStakingDataRequest_ContractStakingBucketTypes_)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -1147,7 +1272,7 @@ func file_proto_api_read_state_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_api_read_state_proto_rawDesc, NumEnums: 1, - NumMessages: 12, + NumMessages: 13, NumExtensions: 0, NumServices: 0, }, diff --git a/golang/iotextypes/state_data.pb.go b/golang/iotextypes/state_data.pb.go index d5d5b5d..a6e1fa1 100644 --- a/golang/iotextypes/state_data.pb.go +++ b/golang/iotextypes/state_data.pb.go @@ -9,7 +9,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.26.0 // protoc v3.21.12 // source: proto/types/state_data.proto @@ -91,15 +91,20 @@ type VoteBucket struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` - CandidateAddress string `protobuf:"bytes,2,opt,name=candidateAddress,proto3" json:"candidateAddress,omitempty"` - StakedAmount string `protobuf:"bytes,3,opt,name=stakedAmount,proto3" json:"stakedAmount,omitempty"` - StakedDuration uint32 `protobuf:"varint,4,opt,name=stakedDuration,proto3" json:"stakedDuration,omitempty"` - CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=createTime,proto3" json:"createTime,omitempty"` - StakeStartTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=stakeStartTime,proto3" json:"stakeStartTime,omitempty"` - UnstakeStartTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=unstakeStartTime,proto3" json:"unstakeStartTime,omitempty"` - AutoStake bool `protobuf:"varint,8,opt,name=autoStake,proto3" json:"autoStake,omitempty"` - Owner string `protobuf:"bytes,9,opt,name=owner,proto3" json:"owner,omitempty"` + Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` + CandidateAddress string `protobuf:"bytes,2,opt,name=candidateAddress,proto3" json:"candidateAddress,omitempty"` + StakedAmount string `protobuf:"bytes,3,opt,name=stakedAmount,proto3" json:"stakedAmount,omitempty"` + StakedDuration uint32 `protobuf:"varint,4,opt,name=stakedDuration,proto3" json:"stakedDuration,omitempty"` + CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=createTime,proto3" json:"createTime,omitempty"` + StakeStartTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=stakeStartTime,proto3" json:"stakeStartTime,omitempty"` + UnstakeStartTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=unstakeStartTime,proto3" json:"unstakeStartTime,omitempty"` + AutoStake bool `protobuf:"varint,8,opt,name=autoStake,proto3" json:"autoStake,omitempty"` + Owner string `protobuf:"bytes,9,opt,name=owner,proto3" json:"owner,omitempty"` + ContractAddress string `protobuf:"bytes,10,opt,name=contractAddress,proto3" json:"contractAddress,omitempty"` + StakedDurationBlockNumber uint64 `protobuf:"varint,11,opt,name=stakedDurationBlockNumber,proto3" json:"stakedDurationBlockNumber,omitempty"` + CreateBlockHeight uint64 `protobuf:"varint,12,opt,name=createBlockHeight,proto3" json:"createBlockHeight,omitempty"` + StakeStartBlockHeight uint64 `protobuf:"varint,13,opt,name=stakeStartBlockHeight,proto3" json:"stakeStartBlockHeight,omitempty"` + UnstakeStartBlockHeight uint64 `protobuf:"varint,14,opt,name=unstakeStartBlockHeight,proto3" json:"unstakeStartBlockHeight,omitempty"` } func (x *VoteBucket) Reset() { @@ -197,6 +202,41 @@ func (x *VoteBucket) GetOwner() string { return "" } +func (x *VoteBucket) GetContractAddress() string { + if x != nil { + return x.ContractAddress + } + return "" +} + +func (x *VoteBucket) GetStakedDurationBlockNumber() uint64 { + if x != nil { + return x.StakedDurationBlockNumber + } + return 0 +} + +func (x *VoteBucket) GetCreateBlockHeight() uint64 { + if x != nil { + return x.CreateBlockHeight + } + return 0 +} + +func (x *VoteBucket) GetStakeStartBlockHeight() uint64 { + if x != nil { + return x.StakeStartBlockHeight + } + return 0 +} + +func (x *VoteBucket) GetUnstakeStartBlockHeight() uint64 { + if x != nil { + return x.UnstakeStartBlockHeight + } + return 0 +} + type VoteBucketList struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -441,6 +481,108 @@ func (x *BucketsCount) GetActive() uint64 { return 0 } +type ContractStakingBucketType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + StakedAmount string `protobuf:"bytes,1,opt,name=stakedAmount,proto3" json:"stakedAmount,omitempty"` + StakedDuration uint32 `protobuf:"varint,2,opt,name=stakedDuration,proto3" json:"stakedDuration,omitempty"` +} + +func (x *ContractStakingBucketType) Reset() { + *x = ContractStakingBucketType{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_state_data_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContractStakingBucketType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContractStakingBucketType) ProtoMessage() {} + +func (x *ContractStakingBucketType) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_state_data_proto_msgTypes[6] + 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) +} + +// Deprecated: Use ContractStakingBucketType.ProtoReflect.Descriptor instead. +func (*ContractStakingBucketType) Descriptor() ([]byte, []int) { + return file_proto_types_state_data_proto_rawDescGZIP(), []int{6} +} + +func (x *ContractStakingBucketType) GetStakedAmount() string { + if x != nil { + return x.StakedAmount + } + return "" +} + +func (x *ContractStakingBucketType) GetStakedDuration() uint32 { + if x != nil { + return x.StakedDuration + } + return 0 +} + +type ContractStakingBucketTypeList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BucketTypes []*ContractStakingBucketType `protobuf:"bytes,1,rep,name=bucketTypes,proto3" json:"bucketTypes,omitempty"` +} + +func (x *ContractStakingBucketTypeList) Reset() { + *x = ContractStakingBucketTypeList{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_state_data_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContractStakingBucketTypeList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContractStakingBucketTypeList) ProtoMessage() {} + +func (x *ContractStakingBucketTypeList) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_state_data_proto_msgTypes[7] + 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) +} + +// Deprecated: Use ContractStakingBucketTypeList.ProtoReflect.Descriptor instead. +func (*ContractStakingBucketTypeList) Descriptor() ([]byte, []int) { + return file_proto_types_state_data_proto_rawDescGZIP(), []int{7} +} + +func (x *ContractStakingBucketTypeList) GetBucketTypes() []*ContractStakingBucketType { + if x != nil { + return x.BucketTypes + } + return nil +} + type ProbationCandidateList_Info struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -453,7 +595,7 @@ type ProbationCandidateList_Info struct { func (x *ProbationCandidateList_Info) Reset() { *x = ProbationCandidateList_Info{} if protoimpl.UnsafeEnabled { - mi := &file_proto_types_state_data_proto_msgTypes[6] + mi := &file_proto_types_state_data_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -466,7 +608,7 @@ func (x *ProbationCandidateList_Info) String() string { func (*ProbationCandidateList_Info) ProtoMessage() {} func (x *ProbationCandidateList_Info) ProtoReflect() protoreflect.Message { - mi := &file_proto_types_state_data_proto_msgTypes[6] + mi := &file_proto_types_state_data_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -516,7 +658,7 @@ var file_proto_types_state_data_proto_rawDesc = []byte{ 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0x96, 0x03, 0x0a, 0x0a, 0x56, 0x6f, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, + 0x75, 0x6e, 0x74, 0x22, 0x9c, 0x05, 0x0a, 0x0a, 0x56, 0x6f, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, @@ -541,45 +683,74 @@ var file_proto_types_state_data_proto_rawDesc = []byte{ 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x6f, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x75, 0x74, 0x6f, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x22, 0x42, 0x0a, 0x0e, - 0x56, 0x6f, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x30, - 0x0a, 0x07, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x69, 0x6f, 0x74, 0x65, 0x78, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x6f, 0x74, - 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x07, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, - 0x22, 0xa3, 0x02, 0x0a, 0x0b, 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x32, - 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x24, - 0x0a, 0x0d, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x57, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x65, 0x64, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x2e, 0x0a, 0x12, 0x73, 0x65, 0x6c, 0x66, - 0x53, 0x74, 0x61, 0x6b, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x78, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x73, 0x65, 0x6c, 0x66, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x42, - 0x75, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x78, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x65, 0x6c, 0x66, - 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x65, 0x6c, 0x66, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x22, 0x4a, 0x0a, 0x0f, 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x32, 0x12, 0x37, 0x0a, 0x0a, 0x63, 0x61, 0x6e, - 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x69, 0x6f, 0x74, 0x65, 0x78, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x61, 0x6e, 0x64, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x56, 0x32, 0x52, 0x0a, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x73, 0x22, 0x3c, 0x0a, 0x0c, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x42, 0x5d, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x69, - 0x6f, 0x74, 0x65, 0x78, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x67, 0x72, 0x70, 0x63, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6f, 0x74, 0x65, 0x78, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x2f, 0x69, 0x6f, 0x74, 0x65, 0x78, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, - 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x69, 0x6f, 0x74, 0x65, 0x78, 0x74, 0x79, 0x70, 0x65, 0x73, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x28, 0x0a, 0x0f, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3c, 0x0a, 0x19, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x64, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x19, 0x73, 0x74, 0x61, 0x6b, 0x65, + 0x64, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x12, 0x34, 0x0a, 0x15, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x15, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x38, 0x0a, 0x17, 0x75, 0x6e, 0x73, 0x74, + 0x61, 0x6b, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x17, 0x75, 0x6e, 0x73, 0x74, 0x61, + 0x6b, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x22, 0x42, 0x0a, 0x0e, 0x56, 0x6f, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, + 0x4c, 0x69, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x07, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x69, 0x6f, 0x74, 0x65, 0x78, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x07, 0x62, + 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x22, 0xa3, 0x02, 0x0a, 0x0b, 0x43, 0x61, 0x6e, 0x64, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x56, 0x32, 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x77, + 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2e, + 0x0a, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x56, + 0x6f, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x2e, + 0x0a, 0x12, 0x73, 0x65, 0x6c, 0x66, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x49, 0x64, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x73, 0x65, 0x6c, 0x66, + 0x53, 0x74, 0x61, 0x6b, 0x65, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x78, 0x12, 0x2c, + 0x0a, 0x11, 0x73, 0x65, 0x6c, 0x66, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x65, 0x6c, 0x66, 0x53, + 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x22, 0x4a, 0x0a, 0x0f, + 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x32, 0x12, + 0x37, 0x0a, 0x0a, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x69, 0x6f, 0x74, 0x65, 0x78, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x56, 0x32, 0x52, 0x0a, 0x63, 0x61, + 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x73, 0x22, 0x3c, 0x0a, 0x0c, 0x42, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x16, + 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, + 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x22, 0x67, 0x0a, 0x19, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x63, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x64, 0x41, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x6b, 0x65, + 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x6b, 0x65, + 0x64, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x0e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x64, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x68, 0x0a, 0x1d, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x4c, 0x69, 0x73, 0x74, + 0x12, 0x47, 0x0a, 0x0b, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x69, 0x6f, 0x74, 0x65, 0x78, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x62, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x42, 0x5d, 0x0a, 0x22, 0x63, 0x6f, 0x6d, + 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x69, 0x6f, 0x74, 0x65, 0x78, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x50, + 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6f, + 0x74, 0x65, 0x78, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x69, 0x6f, 0x74, 0x65, 0x78, + 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x69, 0x6f, + 0x74, 0x65, 0x78, 0x74, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -594,29 +765,32 @@ func file_proto_types_state_data_proto_rawDescGZIP() []byte { return file_proto_types_state_data_proto_rawDescData } -var file_proto_types_state_data_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_proto_types_state_data_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_proto_types_state_data_proto_goTypes = []interface{}{ - (*ProbationCandidateList)(nil), // 0: iotextypes.ProbationCandidateList - (*VoteBucket)(nil), // 1: iotextypes.VoteBucket - (*VoteBucketList)(nil), // 2: iotextypes.VoteBucketList - (*CandidateV2)(nil), // 3: iotextypes.CandidateV2 - (*CandidateListV2)(nil), // 4: iotextypes.CandidateListV2 - (*BucketsCount)(nil), // 5: iotextypes.BucketsCount - (*ProbationCandidateList_Info)(nil), // 6: iotextypes.ProbationCandidateList.Info - (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp + (*ProbationCandidateList)(nil), // 0: iotextypes.ProbationCandidateList + (*VoteBucket)(nil), // 1: iotextypes.VoteBucket + (*VoteBucketList)(nil), // 2: iotextypes.VoteBucketList + (*CandidateV2)(nil), // 3: iotextypes.CandidateV2 + (*CandidateListV2)(nil), // 4: iotextypes.CandidateListV2 + (*BucketsCount)(nil), // 5: iotextypes.BucketsCount + (*ContractStakingBucketType)(nil), // 6: iotextypes.ContractStakingBucketType + (*ContractStakingBucketTypeList)(nil), // 7: iotextypes.ContractStakingBucketTypeList + (*ProbationCandidateList_Info)(nil), // 8: iotextypes.ProbationCandidateList.Info + (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp } var file_proto_types_state_data_proto_depIdxs = []int32{ - 6, // 0: iotextypes.ProbationCandidateList.probationList:type_name -> iotextypes.ProbationCandidateList.Info - 7, // 1: iotextypes.VoteBucket.createTime:type_name -> google.protobuf.Timestamp - 7, // 2: iotextypes.VoteBucket.stakeStartTime:type_name -> google.protobuf.Timestamp - 7, // 3: iotextypes.VoteBucket.unstakeStartTime:type_name -> google.protobuf.Timestamp + 8, // 0: iotextypes.ProbationCandidateList.probationList:type_name -> iotextypes.ProbationCandidateList.Info + 9, // 1: iotextypes.VoteBucket.createTime:type_name -> google.protobuf.Timestamp + 9, // 2: iotextypes.VoteBucket.stakeStartTime:type_name -> google.protobuf.Timestamp + 9, // 3: iotextypes.VoteBucket.unstakeStartTime:type_name -> google.protobuf.Timestamp 1, // 4: iotextypes.VoteBucketList.buckets:type_name -> iotextypes.VoteBucket 3, // 5: iotextypes.CandidateListV2.candidates:type_name -> iotextypes.CandidateV2 - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 6, // 6: iotextypes.ContractStakingBucketTypeList.bucketTypes:type_name -> iotextypes.ContractStakingBucketType + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_proto_types_state_data_proto_init() } @@ -698,6 +872,30 @@ func file_proto_types_state_data_proto_init() { } } file_proto_types_state_data_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContractStakingBucketType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_state_data_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContractStakingBucketTypeList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_state_data_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ProbationCandidateList_Info); i { case 0: return &v.state @@ -716,7 +914,7 @@ func file_proto_types_state_data_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_types_state_data_proto_rawDesc, NumEnums: 0, - NumMessages: 7, + NumMessages: 9, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/api/read_state.proto b/proto/api/read_state.proto index 498c4f7..3ef9cf6 100644 --- a/proto/api/read_state.proto +++ b/proto/api/read_state.proto @@ -29,6 +29,14 @@ message ReadStakingDataMethod { CANDIDATE_BY_ADDRESS = 7; TOTAL_STAKING_AMOUNT = 8; BUCKETS_COUNT = 9; + // 10-19 reserved for native staking + COMPOSITE_BUCKETS = 20; + COMPOSITE_BUCKETS_BY_VOTER = 21; + COMPOSITE_BUCKETS_BY_CANDIDATE = 22; + COMPOSITE_BUCKETS_BY_INDEXES = 23; + COMPOSITE_BUCKETS_COUNT = 24; + COMPOSITE_TOTAL_STAKING_AMOUNT = 25; + CONTRACT_STAKING_BUCKET_TYPES = 26; } Name method = 1; } @@ -68,6 +76,10 @@ message ReadStakingDataRequest { message BucketsCount {} + message ContractStakingBucketTypes { + string contractAddress = 1; + } + oneof request { VoteBuckets buckets = 1; VoteBucketsByVoter bucketsByVoter = 2; @@ -78,5 +90,6 @@ message ReadStakingDataRequest { CandidateByAddress candidateByAddress = 7; TotalStakingAmount totalStakingAmount = 8; BucketsCount bucketsCount = 9; + ContractStakingBucketTypes contractStakingBucketTypes = 10; } } diff --git a/proto/types/state_data.proto b/proto/types/state_data.proto index 4b52741..f2e4596 100644 --- a/proto/types/state_data.proto +++ b/proto/types/state_data.proto @@ -34,6 +34,11 @@ message VoteBucket { google.protobuf.Timestamp unstakeStartTime = 7; bool autoStake = 8; string owner = 9; + string contractAddress = 10; + uint64 stakedDurationBlockNumber = 11; + uint64 createBlockHeight = 12; + uint64 stakeStartBlockHeight = 13; + uint64 unstakeStartBlockHeight = 14; } message VoteBucketList { @@ -58,3 +63,12 @@ message BucketsCount { uint64 total = 1; uint64 active = 2; } + +message ContractStakingBucketType { + string stakedAmount = 1; + uint32 stakedDuration = 2; +} + +message ContractStakingBucketTypeList { + repeated ContractStakingBucketType bucketTypes = 1; +}