tron grpc api

This commit is contained in:
anon 2024-11-13 13:49:35 -03:00
commit c30a64e6c5
22 changed files with 35159 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.idea
.DS_Store

8874
gen/api/api.pb.go Normal file

File diff suppressed because it is too large Load Diff

7657
gen/api/api_grpc.pb.go Normal file

File diff suppressed because it is too large Load Diff

306
gen/api/zksnark.pb.go Normal file
View File

@ -0,0 +1,306 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v4.25.1
// source: api/zksnark.proto
package api
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
core "kk/pkg/crypto/tron/core"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type ZksnarkResponse_Code int32
const (
ZksnarkResponse_SUCCESS ZksnarkResponse_Code = 0
ZksnarkResponse_FAILED ZksnarkResponse_Code = 1
)
// Enum value maps for ZksnarkResponse_Code.
var (
ZksnarkResponse_Code_name = map[int32]string{
0: "SUCCESS",
1: "FAILED",
}
ZksnarkResponse_Code_value = map[string]int32{
"SUCCESS": 0,
"FAILED": 1,
}
)
func (x ZksnarkResponse_Code) Enum() *ZksnarkResponse_Code {
p := new(ZksnarkResponse_Code)
*p = x
return p
}
func (x ZksnarkResponse_Code) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ZksnarkResponse_Code) Descriptor() protoreflect.EnumDescriptor {
return file_api_zksnark_proto_enumTypes[0].Descriptor()
}
func (ZksnarkResponse_Code) Type() protoreflect.EnumType {
return &file_api_zksnark_proto_enumTypes[0]
}
func (x ZksnarkResponse_Code) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ZksnarkResponse_Code.Descriptor instead.
func (ZksnarkResponse_Code) EnumDescriptor() ([]byte, []int) {
return file_api_zksnark_proto_rawDescGZIP(), []int{1, 0}
}
type ZksnarkRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Transaction *core.Transaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"`
Sighash []byte `protobuf:"bytes,2,opt,name=sighash,proto3" json:"sighash,omitempty"`
ValueBalance int64 `protobuf:"varint,3,opt,name=valueBalance,proto3" json:"valueBalance,omitempty"`
TxId string `protobuf:"bytes,4,opt,name=txId,proto3" json:"txId,omitempty"`
}
func (x *ZksnarkRequest) Reset() {
*x = ZksnarkRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_zksnark_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ZksnarkRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ZksnarkRequest) ProtoMessage() {}
func (x *ZksnarkRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_zksnark_proto_msgTypes[0]
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 ZksnarkRequest.ProtoReflect.Descriptor instead.
func (*ZksnarkRequest) Descriptor() ([]byte, []int) {
return file_api_zksnark_proto_rawDescGZIP(), []int{0}
}
func (x *ZksnarkRequest) GetTransaction() *core.Transaction {
if x != nil {
return x.Transaction
}
return nil
}
func (x *ZksnarkRequest) GetSighash() []byte {
if x != nil {
return x.Sighash
}
return nil
}
func (x *ZksnarkRequest) GetValueBalance() int64 {
if x != nil {
return x.ValueBalance
}
return 0
}
func (x *ZksnarkRequest) GetTxId() string {
if x != nil {
return x.TxId
}
return ""
}
type ZksnarkResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Code ZksnarkResponse_Code `protobuf:"varint,1,opt,name=code,proto3,enum=protocol.ZksnarkResponse_Code" json:"code,omitempty"`
}
func (x *ZksnarkResponse) Reset() {
*x = ZksnarkResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_api_zksnark_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ZksnarkResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ZksnarkResponse) ProtoMessage() {}
func (x *ZksnarkResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_zksnark_proto_msgTypes[1]
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 ZksnarkResponse.ProtoReflect.Descriptor instead.
func (*ZksnarkResponse) Descriptor() ([]byte, []int) {
return file_api_zksnark_proto_rawDescGZIP(), []int{1}
}
func (x *ZksnarkResponse) GetCode() ZksnarkResponse_Code {
if x != nil {
return x.Code
}
return ZksnarkResponse_SUCCESS
}
var File_api_zksnark_proto protoreflect.FileDescriptor
var file_api_zksnark_proto_rawDesc = []byte{
0x0a, 0x11, 0x61, 0x70, 0x69, 0x2f, 0x7a, 0x6b, 0x73, 0x6e, 0x61, 0x72, 0x6b, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x12, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x1a, 0x0f, 0x63,
0x6f, 0x72, 0x65, 0x2f, 0x54, 0x72, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9b,
0x01, 0x0a, 0x0e, 0x5a, 0x6b, 0x73, 0x6e, 0x61, 0x72, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x37, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f,
0x6c, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74,
0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x69,
0x67, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x69, 0x67,
0x68, 0x61, 0x73, 0x68, 0x12, 0x22, 0x0a, 0x0c, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x61, 0x6c,
0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x78, 0x49, 0x64,
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x78, 0x49, 0x64, 0x22, 0x66, 0x0a, 0x0f,
0x5a, 0x6b, 0x73, 0x6e, 0x61, 0x72, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x32, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x5a, 0x6b, 0x73, 0x6e, 0x61, 0x72, 0x6b,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63,
0x6f, 0x64, 0x65, 0x22, 0x1f, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x53,
0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c,
0x45, 0x44, 0x10, 0x01, 0x32, 0x59, 0x0a, 0x0b, 0x54, 0x72, 0x6f, 0x6e, 0x5a, 0x6b, 0x73, 0x6e,
0x61, 0x72, 0x6b, 0x12, 0x4a, 0x0a, 0x11, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x5a, 0x6b, 0x73, 0x6e,
0x61, 0x72, 0x6b, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x63, 0x6f, 0x6c, 0x2e, 0x5a, 0x6b, 0x73, 0x6e, 0x61, 0x72, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x5a, 0x6b,
0x73, 0x6e, 0x61, 0x72, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42,
0x48, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x2e, 0x74, 0x72, 0x6f, 0x6e, 0x2e, 0x61, 0x70, 0x69, 0x42,
0x0e, 0x5a, 0x6b, 0x73, 0x6e, 0x61, 0x72, 0x6b, 0x47, 0x72, 0x70, 0x63, 0x41, 0x50, 0x49, 0x5a,
0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x72, 0x6f, 0x6e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61,
0x74, 0x65, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
var (
file_api_zksnark_proto_rawDescOnce sync.Once
file_api_zksnark_proto_rawDescData = file_api_zksnark_proto_rawDesc
)
func file_api_zksnark_proto_rawDescGZIP() []byte {
file_api_zksnark_proto_rawDescOnce.Do(func() {
file_api_zksnark_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_zksnark_proto_rawDescData)
})
return file_api_zksnark_proto_rawDescData
}
var file_api_zksnark_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_api_zksnark_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_api_zksnark_proto_goTypes = []interface{}{
(ZksnarkResponse_Code)(0), // 0: protocol.ZksnarkResponse.Code
(*ZksnarkRequest)(nil), // 1: protocol.ZksnarkRequest
(*ZksnarkResponse)(nil), // 2: protocol.ZksnarkResponse
(*core.Transaction)(nil), // 3: protocol.Transaction
}
var file_api_zksnark_proto_depIdxs = []int32{
3, // 0: protocol.ZksnarkRequest.transaction:type_name -> protocol.Transaction
0, // 1: protocol.ZksnarkResponse.code:type_name -> protocol.ZksnarkResponse.Code
1, // 2: protocol.TronZksnark.CheckZksnarkProof:input_type -> protocol.ZksnarkRequest
2, // 3: protocol.TronZksnark.CheckZksnarkProof:output_type -> protocol.ZksnarkResponse
3, // [3:4] is the sub-list for method output_type
2, // [2:3] 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_api_zksnark_proto_init() }
func file_api_zksnark_proto_init() {
if File_api_zksnark_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_api_zksnark_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ZksnarkRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_zksnark_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ZksnarkResponse); 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{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_api_zksnark_proto_rawDesc,
NumEnums: 1,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_api_zksnark_proto_goTypes,
DependencyIndexes: file_api_zksnark_proto_depIdxs,
EnumInfos: file_api_zksnark_proto_enumTypes,
MessageInfos: file_api_zksnark_proto_msgTypes,
}.Build()
File_api_zksnark_proto = out.File
file_api_zksnark_proto_rawDesc = nil
file_api_zksnark_proto_goTypes = nil
file_api_zksnark_proto_depIdxs = nil
}

105
gen/api/zksnark_grpc.pb.go Normal file
View File

@ -0,0 +1,105 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v4.25.1
// source: api/zksnark.proto
package api
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// TronZksnarkClient is the client API for TronZksnark service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type TronZksnarkClient interface {
CheckZksnarkProof(ctx context.Context, in *ZksnarkRequest, opts ...grpc.CallOption) (*ZksnarkResponse, error)
}
type tronZksnarkClient struct {
cc grpc.ClientConnInterface
}
func NewTronZksnarkClient(cc grpc.ClientConnInterface) TronZksnarkClient {
return &tronZksnarkClient{cc}
}
func (c *tronZksnarkClient) CheckZksnarkProof(ctx context.Context, in *ZksnarkRequest, opts ...grpc.CallOption) (*ZksnarkResponse, error) {
out := new(ZksnarkResponse)
err := c.cc.Invoke(ctx, "/protocol.TronZksnark/CheckZksnarkProof", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// TronZksnarkServer is the server API for TronZksnark service.
// All implementations must embed UnimplementedTronZksnarkServer
// for forward compatibility
type TronZksnarkServer interface {
CheckZksnarkProof(context.Context, *ZksnarkRequest) (*ZksnarkResponse, error)
mustEmbedUnimplementedTronZksnarkServer()
}
// UnimplementedTronZksnarkServer must be embedded to have forward compatible implementations.
type UnimplementedTronZksnarkServer struct {
}
func (UnimplementedTronZksnarkServer) CheckZksnarkProof(context.Context, *ZksnarkRequest) (*ZksnarkResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CheckZksnarkProof not implemented")
}
func (UnimplementedTronZksnarkServer) mustEmbedUnimplementedTronZksnarkServer() {}
// UnsafeTronZksnarkServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to TronZksnarkServer will
// result in compilation errors.
type UnsafeTronZksnarkServer interface {
mustEmbedUnimplementedTronZksnarkServer()
}
func RegisterTronZksnarkServer(s grpc.ServiceRegistrar, srv TronZksnarkServer) {
s.RegisterService(&TronZksnark_ServiceDesc, srv)
}
func _TronZksnark_CheckZksnarkProof_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ZksnarkRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TronZksnarkServer).CheckZksnarkProof(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/protocol.TronZksnark/CheckZksnarkProof",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TronZksnarkServer).CheckZksnarkProof(ctx, req.(*ZksnarkRequest))
}
return interceptor(ctx, in, info, handler)
}
// TronZksnark_ServiceDesc is the grpc.ServiceDesc for TronZksnark service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var TronZksnark_ServiceDesc = grpc.ServiceDesc{
ServiceName: "protocol.TronZksnark",
HandlerType: (*TronZksnarkServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CheckZksnarkProof",
Handler: _TronZksnark_CheckZksnarkProof_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "api/zksnark.proto",
}

586
gen/core/Discover.pb.go Normal file
View File

@ -0,0 +1,586 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v4.25.1
// source: core/Discover.proto
package core
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type Endpoint struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
NodeId []byte `protobuf:"bytes,3,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
}
func (x *Endpoint) Reset() {
*x = Endpoint{}
if protoimpl.UnsafeEnabled {
mi := &file_core_Discover_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Endpoint) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Endpoint) ProtoMessage() {}
func (x *Endpoint) ProtoReflect() protoreflect.Message {
mi := &file_core_Discover_proto_msgTypes[0]
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 Endpoint.ProtoReflect.Descriptor instead.
func (*Endpoint) Descriptor() ([]byte, []int) {
return file_core_Discover_proto_rawDescGZIP(), []int{0}
}
func (x *Endpoint) GetAddress() []byte {
if x != nil {
return x.Address
}
return nil
}
func (x *Endpoint) GetPort() int32 {
if x != nil {
return x.Port
}
return 0
}
func (x *Endpoint) GetNodeId() []byte {
if x != nil {
return x.NodeId
}
return nil
}
type PingMessage struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
From *Endpoint `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
To *Endpoint `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"`
Version int32 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"`
Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
}
func (x *PingMessage) Reset() {
*x = PingMessage{}
if protoimpl.UnsafeEnabled {
mi := &file_core_Discover_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PingMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PingMessage) ProtoMessage() {}
func (x *PingMessage) ProtoReflect() protoreflect.Message {
mi := &file_core_Discover_proto_msgTypes[1]
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 PingMessage.ProtoReflect.Descriptor instead.
func (*PingMessage) Descriptor() ([]byte, []int) {
return file_core_Discover_proto_rawDescGZIP(), []int{1}
}
func (x *PingMessage) GetFrom() *Endpoint {
if x != nil {
return x.From
}
return nil
}
func (x *PingMessage) GetTo() *Endpoint {
if x != nil {
return x.To
}
return nil
}
func (x *PingMessage) GetVersion() int32 {
if x != nil {
return x.Version
}
return 0
}
func (x *PingMessage) GetTimestamp() int64 {
if x != nil {
return x.Timestamp
}
return 0
}
type PongMessage struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
From *Endpoint `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
Echo int32 `protobuf:"varint,2,opt,name=echo,proto3" json:"echo,omitempty"`
Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
}
func (x *PongMessage) Reset() {
*x = PongMessage{}
if protoimpl.UnsafeEnabled {
mi := &file_core_Discover_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PongMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PongMessage) ProtoMessage() {}
func (x *PongMessage) ProtoReflect() protoreflect.Message {
mi := &file_core_Discover_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)
}
// Deprecated: Use PongMessage.ProtoReflect.Descriptor instead.
func (*PongMessage) Descriptor() ([]byte, []int) {
return file_core_Discover_proto_rawDescGZIP(), []int{2}
}
func (x *PongMessage) GetFrom() *Endpoint {
if x != nil {
return x.From
}
return nil
}
func (x *PongMessage) GetEcho() int32 {
if x != nil {
return x.Echo
}
return 0
}
func (x *PongMessage) GetTimestamp() int64 {
if x != nil {
return x.Timestamp
}
return 0
}
type FindNeighbours struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
From *Endpoint `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
TargetId []byte `protobuf:"bytes,2,opt,name=targetId,proto3" json:"targetId,omitempty"`
Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
}
func (x *FindNeighbours) Reset() {
*x = FindNeighbours{}
if protoimpl.UnsafeEnabled {
mi := &file_core_Discover_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindNeighbours) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindNeighbours) ProtoMessage() {}
func (x *FindNeighbours) ProtoReflect() protoreflect.Message {
mi := &file_core_Discover_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)
}
// Deprecated: Use FindNeighbours.ProtoReflect.Descriptor instead.
func (*FindNeighbours) Descriptor() ([]byte, []int) {
return file_core_Discover_proto_rawDescGZIP(), []int{3}
}
func (x *FindNeighbours) GetFrom() *Endpoint {
if x != nil {
return x.From
}
return nil
}
func (x *FindNeighbours) GetTargetId() []byte {
if x != nil {
return x.TargetId
}
return nil
}
func (x *FindNeighbours) GetTimestamp() int64 {
if x != nil {
return x.Timestamp
}
return 0
}
type Neighbours struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
From *Endpoint `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
Neighbours []*Endpoint `protobuf:"bytes,2,rep,name=neighbours,proto3" json:"neighbours,omitempty"`
Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
}
func (x *Neighbours) Reset() {
*x = Neighbours{}
if protoimpl.UnsafeEnabled {
mi := &file_core_Discover_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Neighbours) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Neighbours) ProtoMessage() {}
func (x *Neighbours) ProtoReflect() protoreflect.Message {
mi := &file_core_Discover_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)
}
// Deprecated: Use Neighbours.ProtoReflect.Descriptor instead.
func (*Neighbours) Descriptor() ([]byte, []int) {
return file_core_Discover_proto_rawDescGZIP(), []int{4}
}
func (x *Neighbours) GetFrom() *Endpoint {
if x != nil {
return x.From
}
return nil
}
func (x *Neighbours) GetNeighbours() []*Endpoint {
if x != nil {
return x.Neighbours
}
return nil
}
func (x *Neighbours) GetTimestamp() int64 {
if x != nil {
return x.Timestamp
}
return 0
}
type BackupMessage struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Flag bool `protobuf:"varint,1,opt,name=flag,proto3" json:"flag,omitempty"`
Priority int32 `protobuf:"varint,2,opt,name=priority,proto3" json:"priority,omitempty"`
}
func (x *BackupMessage) Reset() {
*x = BackupMessage{}
if protoimpl.UnsafeEnabled {
mi := &file_core_Discover_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BackupMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BackupMessage) ProtoMessage() {}
func (x *BackupMessage) ProtoReflect() protoreflect.Message {
mi := &file_core_Discover_proto_msgTypes[5]
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 BackupMessage.ProtoReflect.Descriptor instead.
func (*BackupMessage) Descriptor() ([]byte, []int) {
return file_core_Discover_proto_rawDescGZIP(), []int{5}
}
func (x *BackupMessage) GetFlag() bool {
if x != nil {
return x.Flag
}
return false
}
func (x *BackupMessage) GetPriority() int32 {
if x != nil {
return x.Priority
}
return 0
}
var File_core_Discover_proto protoreflect.FileDescriptor
var file_core_Discover_proto_rawDesc = []byte{
0x0a, 0x13, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22,
0x50, 0x0a, 0x08, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61,
0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x64,
0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20,
0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x64,
0x65, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49,
0x64, 0x22, 0x91, 0x01, 0x0a, 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x12, 0x26, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f,
0x69, 0x6e, 0x74, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x22, 0x0a, 0x02, 0x74, 0x6f, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c,
0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x18, 0x0a,
0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07,
0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73,
0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65,
0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x67, 0x0a, 0x0b, 0x50, 0x6f, 0x6e, 0x67, 0x4d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x6e,
0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x12, 0x0a, 0x04,
0x65, 0x63, 0x68, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x65, 0x63, 0x68, 0x6f,
0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20,
0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x72,
0x0a, 0x0e, 0x46, 0x69, 0x6e, 0x64, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x75, 0x72, 0x73,
0x12, 0x26, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69,
0x6e, 0x74, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x61, 0x72, 0x67,
0x65, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x74, 0x61, 0x72, 0x67,
0x65, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
0x6d, 0x70, 0x22, 0x86, 0x01, 0x0a, 0x0a, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x75, 0x72,
0x73, 0x12, 0x26, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f,
0x69, 0x6e, 0x74, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x32, 0x0a, 0x0a, 0x6e, 0x65, 0x69,
0x67, 0x68, 0x62, 0x6f, 0x75, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e,
0x74, 0x52, 0x0a, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x75, 0x72, 0x73, 0x12, 0x1c, 0x0a,
0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03,
0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x3f, 0x0a, 0x0d, 0x42,
0x61, 0x63, 0x6b, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04,
0x66, 0x6c, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x61, 0x67,
0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01,
0x28, 0x05, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x46, 0x0a, 0x0f,
0x6f, 0x72, 0x67, 0x2e, 0x74, 0x72, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x42,
0x08, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75,
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x72, 0x6f, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63,
0x6f, 0x6c, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f,
0x63, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_core_Discover_proto_rawDescOnce sync.Once
file_core_Discover_proto_rawDescData = file_core_Discover_proto_rawDesc
)
func file_core_Discover_proto_rawDescGZIP() []byte {
file_core_Discover_proto_rawDescOnce.Do(func() {
file_core_Discover_proto_rawDescData = protoimpl.X.CompressGZIP(file_core_Discover_proto_rawDescData)
})
return file_core_Discover_proto_rawDescData
}
var file_core_Discover_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_core_Discover_proto_goTypes = []interface{}{
(*Endpoint)(nil), // 0: protocol.Endpoint
(*PingMessage)(nil), // 1: protocol.PingMessage
(*PongMessage)(nil), // 2: protocol.PongMessage
(*FindNeighbours)(nil), // 3: protocol.FindNeighbours
(*Neighbours)(nil), // 4: protocol.Neighbours
(*BackupMessage)(nil), // 5: protocol.BackupMessage
}
var file_core_Discover_proto_depIdxs = []int32{
0, // 0: protocol.PingMessage.from:type_name -> protocol.Endpoint
0, // 1: protocol.PingMessage.to:type_name -> protocol.Endpoint
0, // 2: protocol.PongMessage.from:type_name -> protocol.Endpoint
0, // 3: protocol.FindNeighbours.from:type_name -> protocol.Endpoint
0, // 4: protocol.Neighbours.from:type_name -> protocol.Endpoint
0, // 5: protocol.Neighbours.neighbours:type_name -> protocol.Endpoint
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
}
func init() { file_core_Discover_proto_init() }
func file_core_Discover_proto_init() {
if File_core_Discover_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_core_Discover_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Endpoint); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_Discover_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PingMessage); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_Discover_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PongMessage); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_Discover_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindNeighbours); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_Discover_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Neighbours); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_Discover_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BackupMessage); 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{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_core_Discover_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_core_Discover_proto_goTypes,
DependencyIndexes: file_core_Discover_proto_depIdxs,
MessageInfos: file_core_Discover_proto_msgTypes,
}.Build()
File_core_Discover_proto = out.File
file_core_Discover_proto_rawDesc = nil
file_core_Discover_proto_goTypes = nil
file_core_Discover_proto_depIdxs = nil
}

10102
gen/core/Tron.pb.go Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,156 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v4.25.1
// source: core/TronInventoryItems.proto
package core
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type InventoryItems struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type int32 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"`
Items [][]byte `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"`
}
func (x *InventoryItems) Reset() {
*x = InventoryItems{}
if protoimpl.UnsafeEnabled {
mi := &file_core_TronInventoryItems_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *InventoryItems) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InventoryItems) ProtoMessage() {}
func (x *InventoryItems) ProtoReflect() protoreflect.Message {
mi := &file_core_TronInventoryItems_proto_msgTypes[0]
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 InventoryItems.ProtoReflect.Descriptor instead.
func (*InventoryItems) Descriptor() ([]byte, []int) {
return file_core_TronInventoryItems_proto_rawDescGZIP(), []int{0}
}
func (x *InventoryItems) GetType() int32 {
if x != nil {
return x.Type
}
return 0
}
func (x *InventoryItems) GetItems() [][]byte {
if x != nil {
return x.Items
}
return nil
}
var File_core_TronInventoryItems_proto protoreflect.FileDescriptor
var file_core_TronInventoryItems_proto_rawDesc = []byte{
0x0a, 0x1d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x54, 0x72, 0x6f, 0x6e, 0x49, 0x6e, 0x76, 0x65, 0x6e,
0x74, 0x6f, 0x72, 0x79, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22, 0x3a, 0x0a, 0x0e, 0x49, 0x6e, 0x76,
0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x74,
0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12,
0x14, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x05,
0x69, 0x74, 0x65, 0x6d, 0x73, 0x42, 0x50, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x2e, 0x74, 0x72, 0x6f,
0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x42, 0x12, 0x54, 0x72, 0x6f, 0x6e, 0x49, 0x6e,
0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x5a, 0x29, 0x67, 0x69,
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x72, 0x6f, 0x6e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77,
0x61, 0x79, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_core_TronInventoryItems_proto_rawDescOnce sync.Once
file_core_TronInventoryItems_proto_rawDescData = file_core_TronInventoryItems_proto_rawDesc
)
func file_core_TronInventoryItems_proto_rawDescGZIP() []byte {
file_core_TronInventoryItems_proto_rawDescOnce.Do(func() {
file_core_TronInventoryItems_proto_rawDescData = protoimpl.X.CompressGZIP(file_core_TronInventoryItems_proto_rawDescData)
})
return file_core_TronInventoryItems_proto_rawDescData
}
var file_core_TronInventoryItems_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_core_TronInventoryItems_proto_goTypes = []interface{}{
(*InventoryItems)(nil), // 0: protocol.InventoryItems
}
var file_core_TronInventoryItems_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_core_TronInventoryItems_proto_init() }
func file_core_TronInventoryItems_proto_init() {
if File_core_TronInventoryItems_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_core_TronInventoryItems_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InventoryItems); 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{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_core_TronInventoryItems_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_core_TronInventoryItems_proto_goTypes,
DependencyIndexes: file_core_TronInventoryItems_proto_depIdxs,
MessageInfos: file_core_TronInventoryItems_proto_msgTypes,
}.Build()
File_core_TronInventoryItems_proto = out.File
file_core_TronInventoryItems_proto_rawDesc = nil
file_core_TronInventoryItems_proto_goTypes = nil
file_core_TronInventoryItems_proto_depIdxs = nil
}

View File

@ -0,0 +1,439 @@
//
// java-tron is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// java-tron is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v4.25.1
// source: core/contract/account_contract.proto
package core
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type AccountCreateContract struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`
AccountAddress []byte `protobuf:"bytes,2,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"`
Type AccountType `protobuf:"varint,3,opt,name=type,proto3,enum=protocol.AccountType" json:"type,omitempty"`
}
func (x *AccountCreateContract) Reset() {
*x = AccountCreateContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_account_contract_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AccountCreateContract) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AccountCreateContract) ProtoMessage() {}
func (x *AccountCreateContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_account_contract_proto_msgTypes[0]
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 AccountCreateContract.ProtoReflect.Descriptor instead.
func (*AccountCreateContract) Descriptor() ([]byte, []int) {
return file_core_contract_account_contract_proto_rawDescGZIP(), []int{0}
}
func (x *AccountCreateContract) GetOwnerAddress() []byte {
if x != nil {
return x.OwnerAddress
}
return nil
}
func (x *AccountCreateContract) GetAccountAddress() []byte {
if x != nil {
return x.AccountAddress
}
return nil
}
func (x *AccountCreateContract) GetType() AccountType {
if x != nil {
return x.Type
}
return AccountType_Normal
}
// Update account name. Account name is not unique now.
type AccountUpdateContract struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AccountName []byte `protobuf:"bytes,1,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"`
OwnerAddress []byte `protobuf:"bytes,2,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`
}
func (x *AccountUpdateContract) Reset() {
*x = AccountUpdateContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_account_contract_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AccountUpdateContract) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AccountUpdateContract) ProtoMessage() {}
func (x *AccountUpdateContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_account_contract_proto_msgTypes[1]
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 AccountUpdateContract.ProtoReflect.Descriptor instead.
func (*AccountUpdateContract) Descriptor() ([]byte, []int) {
return file_core_contract_account_contract_proto_rawDescGZIP(), []int{1}
}
func (x *AccountUpdateContract) GetAccountName() []byte {
if x != nil {
return x.AccountName
}
return nil
}
func (x *AccountUpdateContract) GetOwnerAddress() []byte {
if x != nil {
return x.OwnerAddress
}
return nil
}
// Set account id if the account has no id. Account id is unique and case insensitive.
type SetAccountIdContract struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AccountId []byte `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
OwnerAddress []byte `protobuf:"bytes,2,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`
}
func (x *SetAccountIdContract) Reset() {
*x = SetAccountIdContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_account_contract_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SetAccountIdContract) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SetAccountIdContract) ProtoMessage() {}
func (x *SetAccountIdContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_account_contract_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)
}
// Deprecated: Use SetAccountIdContract.ProtoReflect.Descriptor instead.
func (*SetAccountIdContract) Descriptor() ([]byte, []int) {
return file_core_contract_account_contract_proto_rawDescGZIP(), []int{2}
}
func (x *SetAccountIdContract) GetAccountId() []byte {
if x != nil {
return x.AccountId
}
return nil
}
func (x *SetAccountIdContract) GetOwnerAddress() []byte {
if x != nil {
return x.OwnerAddress
}
return nil
}
type AccountPermissionUpdateContract struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`
Owner *Permission `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` //Empty is invalidate
Witness *Permission `protobuf:"bytes,3,opt,name=witness,proto3" json:"witness,omitempty"` //Can be empty
Actives []*Permission `protobuf:"bytes,4,rep,name=actives,proto3" json:"actives,omitempty"` //Empty is invalidate
}
func (x *AccountPermissionUpdateContract) Reset() {
*x = AccountPermissionUpdateContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_account_contract_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AccountPermissionUpdateContract) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AccountPermissionUpdateContract) ProtoMessage() {}
func (x *AccountPermissionUpdateContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_account_contract_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)
}
// Deprecated: Use AccountPermissionUpdateContract.ProtoReflect.Descriptor instead.
func (*AccountPermissionUpdateContract) Descriptor() ([]byte, []int) {
return file_core_contract_account_contract_proto_rawDescGZIP(), []int{3}
}
func (x *AccountPermissionUpdateContract) GetOwnerAddress() []byte {
if x != nil {
return x.OwnerAddress
}
return nil
}
func (x *AccountPermissionUpdateContract) GetOwner() *Permission {
if x != nil {
return x.Owner
}
return nil
}
func (x *AccountPermissionUpdateContract) GetWitness() *Permission {
if x != nil {
return x.Witness
}
return nil
}
func (x *AccountPermissionUpdateContract) GetActives() []*Permission {
if x != nil {
return x.Actives
}
return nil
}
var File_core_contract_account_contract_proto protoreflect.FileDescriptor
var file_core_contract_account_contract_proto_rawDesc = []byte{
0x0a, 0x24, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2f,
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c,
0x1a, 0x0f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x54, 0x72, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x22, 0x90, 0x01, 0x0a, 0x15, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x72, 0x65,
0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6f,
0x77, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x0c, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72,
0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x29, 0x0a, 0x04, 0x74, 0x79, 0x70,
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63,
0x6f, 0x6c, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04,
0x74, 0x79, 0x70, 0x65, 0x22, 0x5f, 0x0a, 0x15, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x21, 0x0a,
0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0c, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65,
0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73,
0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x64,
0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x5a, 0x0a, 0x14, 0x53, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x49, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x1d, 0x0a,
0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0c, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d,
0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73,
0x73, 0x22, 0xd2, 0x01, 0x0a, 0x1f, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x65, 0x72,
0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e,
0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x61,
0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6f, 0x77,
0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2a, 0x0a, 0x05, 0x6f, 0x77,
0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52,
0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x07, 0x77, 0x69, 0x74, 0x6e, 0x65, 0x73,
0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63,
0x6f, 0x6c, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x77,
0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x12, 0x2e, 0x0a, 0x07, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65,
0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63,
0x6f, 0x6c, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x61,
0x63, 0x74, 0x69, 0x76, 0x65, 0x73, 0x42, 0x45, 0x0a, 0x18, 0x6f, 0x72, 0x67, 0x2e, 0x74, 0x72,
0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61,
0x63, 0x74, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74,
0x72, 0x6f, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x67, 0x72, 0x70, 0x63,
0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_core_contract_account_contract_proto_rawDescOnce sync.Once
file_core_contract_account_contract_proto_rawDescData = file_core_contract_account_contract_proto_rawDesc
)
func file_core_contract_account_contract_proto_rawDescGZIP() []byte {
file_core_contract_account_contract_proto_rawDescOnce.Do(func() {
file_core_contract_account_contract_proto_rawDescData = protoimpl.X.CompressGZIP(file_core_contract_account_contract_proto_rawDescData)
})
return file_core_contract_account_contract_proto_rawDescData
}
var file_core_contract_account_contract_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_core_contract_account_contract_proto_goTypes = []interface{}{
(*AccountCreateContract)(nil), // 0: protocol.AccountCreateContract
(*AccountUpdateContract)(nil), // 1: protocol.AccountUpdateContract
(*SetAccountIdContract)(nil), // 2: protocol.SetAccountIdContract
(*AccountPermissionUpdateContract)(nil), // 3: protocol.AccountPermissionUpdateContract
(AccountType)(0), // 4: protocol.AccountType
(*Permission)(nil), // 5: protocol.Permission
}
var file_core_contract_account_contract_proto_depIdxs = []int32{
4, // 0: protocol.AccountCreateContract.type:type_name -> protocol.AccountType
5, // 1: protocol.AccountPermissionUpdateContract.owner:type_name -> protocol.Permission
5, // 2: protocol.AccountPermissionUpdateContract.witness:type_name -> protocol.Permission
5, // 3: protocol.AccountPermissionUpdateContract.actives:type_name -> protocol.Permission
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_core_contract_account_contract_proto_init() }
func file_core_contract_account_contract_proto_init() {
if File_core_contract_account_contract_proto != nil {
return
}
file_core_Tron_proto_init()
if !protoimpl.UnsafeEnabled {
file_core_contract_account_contract_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AccountCreateContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_account_contract_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AccountUpdateContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_account_contract_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SetAccountIdContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_account_contract_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AccountPermissionUpdateContract); 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{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_core_contract_account_contract_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_core_contract_account_contract_proto_goTypes,
DependencyIndexes: file_core_contract_account_contract_proto_depIdxs,
MessageInfos: file_core_contract_account_contract_proto_msgTypes,
}.Build()
File_core_contract_account_contract_proto = out.File
file_core_contract_account_contract_proto_rawDesc = nil
file_core_contract_account_contract_proto_goTypes = nil
file_core_contract_account_contract_proto_depIdxs = nil
}

View File

@ -0,0 +1,761 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v4.25.1
// source: core/contract/asset_issue_contract.proto
package core
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type AssetIssueContract struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,41,opt,name=id,proto3" json:"id,omitempty"`
OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`
Name []byte `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Abbr []byte `protobuf:"bytes,3,opt,name=abbr,proto3" json:"abbr,omitempty"`
TotalSupply int64 `protobuf:"varint,4,opt,name=total_supply,json=totalSupply,proto3" json:"total_supply,omitempty"`
FrozenSupply []*AssetIssueContract_FrozenSupply `protobuf:"bytes,5,rep,name=frozen_supply,json=frozenSupply,proto3" json:"frozen_supply,omitempty"`
TrxNum int32 `protobuf:"varint,6,opt,name=trx_num,json=trxNum,proto3" json:"trx_num,omitempty"`
Precision int32 `protobuf:"varint,7,opt,name=precision,proto3" json:"precision,omitempty"`
Num int32 `protobuf:"varint,8,opt,name=num,proto3" json:"num,omitempty"`
StartTime int64 `protobuf:"varint,9,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
EndTime int64 `protobuf:"varint,10,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
Order int64 `protobuf:"varint,11,opt,name=order,proto3" json:"order,omitempty"` // useless
VoteScore int32 `protobuf:"varint,16,opt,name=vote_score,json=voteScore,proto3" json:"vote_score,omitempty"`
Description []byte `protobuf:"bytes,20,opt,name=description,proto3" json:"description,omitempty"`
Url []byte `protobuf:"bytes,21,opt,name=url,proto3" json:"url,omitempty"`
FreeAssetNetLimit int64 `protobuf:"varint,22,opt,name=free_asset_net_limit,json=freeAssetNetLimit,proto3" json:"free_asset_net_limit,omitempty"`
PublicFreeAssetNetLimit int64 `protobuf:"varint,23,opt,name=public_free_asset_net_limit,json=publicFreeAssetNetLimit,proto3" json:"public_free_asset_net_limit,omitempty"`
PublicFreeAssetNetUsage int64 `protobuf:"varint,24,opt,name=public_free_asset_net_usage,json=publicFreeAssetNetUsage,proto3" json:"public_free_asset_net_usage,omitempty"`
PublicLatestFreeNetTime int64 `protobuf:"varint,25,opt,name=public_latest_free_net_time,json=publicLatestFreeNetTime,proto3" json:"public_latest_free_net_time,omitempty"`
}
func (x *AssetIssueContract) Reset() {
*x = AssetIssueContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_asset_issue_contract_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AssetIssueContract) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AssetIssueContract) ProtoMessage() {}
func (x *AssetIssueContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_asset_issue_contract_proto_msgTypes[0]
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 AssetIssueContract.ProtoReflect.Descriptor instead.
func (*AssetIssueContract) Descriptor() ([]byte, []int) {
return file_core_contract_asset_issue_contract_proto_rawDescGZIP(), []int{0}
}
func (x *AssetIssueContract) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *AssetIssueContract) GetOwnerAddress() []byte {
if x != nil {
return x.OwnerAddress
}
return nil
}
func (x *AssetIssueContract) GetName() []byte {
if x != nil {
return x.Name
}
return nil
}
func (x *AssetIssueContract) GetAbbr() []byte {
if x != nil {
return x.Abbr
}
return nil
}
func (x *AssetIssueContract) GetTotalSupply() int64 {
if x != nil {
return x.TotalSupply
}
return 0
}
func (x *AssetIssueContract) GetFrozenSupply() []*AssetIssueContract_FrozenSupply {
if x != nil {
return x.FrozenSupply
}
return nil
}
func (x *AssetIssueContract) GetTrxNum() int32 {
if x != nil {
return x.TrxNum
}
return 0
}
func (x *AssetIssueContract) GetPrecision() int32 {
if x != nil {
return x.Precision
}
return 0
}
func (x *AssetIssueContract) GetNum() int32 {
if x != nil {
return x.Num
}
return 0
}
func (x *AssetIssueContract) GetStartTime() int64 {
if x != nil {
return x.StartTime
}
return 0
}
func (x *AssetIssueContract) GetEndTime() int64 {
if x != nil {
return x.EndTime
}
return 0
}
func (x *AssetIssueContract) GetOrder() int64 {
if x != nil {
return x.Order
}
return 0
}
func (x *AssetIssueContract) GetVoteScore() int32 {
if x != nil {
return x.VoteScore
}
return 0
}
func (x *AssetIssueContract) GetDescription() []byte {
if x != nil {
return x.Description
}
return nil
}
func (x *AssetIssueContract) GetUrl() []byte {
if x != nil {
return x.Url
}
return nil
}
func (x *AssetIssueContract) GetFreeAssetNetLimit() int64 {
if x != nil {
return x.FreeAssetNetLimit
}
return 0
}
func (x *AssetIssueContract) GetPublicFreeAssetNetLimit() int64 {
if x != nil {
return x.PublicFreeAssetNetLimit
}
return 0
}
func (x *AssetIssueContract) GetPublicFreeAssetNetUsage() int64 {
if x != nil {
return x.PublicFreeAssetNetUsage
}
return 0
}
func (x *AssetIssueContract) GetPublicLatestFreeNetTime() int64 {
if x != nil {
return x.PublicLatestFreeNetTime
}
return 0
}
type TransferAssetContract struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AssetName []byte `protobuf:"bytes,1,opt,name=asset_name,json=assetName,proto3" json:"asset_name,omitempty"` // this field is token name before the proposal ALLOW_SAME_TOKEN_NAME is active, otherwise it is token id and token is should be in string format.
OwnerAddress []byte `protobuf:"bytes,2,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`
ToAddress []byte `protobuf:"bytes,3,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"`
Amount int64 `protobuf:"varint,4,opt,name=amount,proto3" json:"amount,omitempty"`
}
func (x *TransferAssetContract) Reset() {
*x = TransferAssetContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_asset_issue_contract_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TransferAssetContract) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TransferAssetContract) ProtoMessage() {}
func (x *TransferAssetContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_asset_issue_contract_proto_msgTypes[1]
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 TransferAssetContract.ProtoReflect.Descriptor instead.
func (*TransferAssetContract) Descriptor() ([]byte, []int) {
return file_core_contract_asset_issue_contract_proto_rawDescGZIP(), []int{1}
}
func (x *TransferAssetContract) GetAssetName() []byte {
if x != nil {
return x.AssetName
}
return nil
}
func (x *TransferAssetContract) GetOwnerAddress() []byte {
if x != nil {
return x.OwnerAddress
}
return nil
}
func (x *TransferAssetContract) GetToAddress() []byte {
if x != nil {
return x.ToAddress
}
return nil
}
func (x *TransferAssetContract) GetAmount() int64 {
if x != nil {
return x.Amount
}
return 0
}
type UnfreezeAssetContract struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`
}
func (x *UnfreezeAssetContract) Reset() {
*x = UnfreezeAssetContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_asset_issue_contract_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UnfreezeAssetContract) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UnfreezeAssetContract) ProtoMessage() {}
func (x *UnfreezeAssetContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_asset_issue_contract_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)
}
// Deprecated: Use UnfreezeAssetContract.ProtoReflect.Descriptor instead.
func (*UnfreezeAssetContract) Descriptor() ([]byte, []int) {
return file_core_contract_asset_issue_contract_proto_rawDescGZIP(), []int{2}
}
func (x *UnfreezeAssetContract) GetOwnerAddress() []byte {
if x != nil {
return x.OwnerAddress
}
return nil
}
type UpdateAssetContract struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`
Description []byte `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
Url []byte `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
NewLimit int64 `protobuf:"varint,4,opt,name=new_limit,json=newLimit,proto3" json:"new_limit,omitempty"`
NewPublicLimit int64 `protobuf:"varint,5,opt,name=new_public_limit,json=newPublicLimit,proto3" json:"new_public_limit,omitempty"`
}
func (x *UpdateAssetContract) Reset() {
*x = UpdateAssetContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_asset_issue_contract_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UpdateAssetContract) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdateAssetContract) ProtoMessage() {}
func (x *UpdateAssetContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_asset_issue_contract_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)
}
// Deprecated: Use UpdateAssetContract.ProtoReflect.Descriptor instead.
func (*UpdateAssetContract) Descriptor() ([]byte, []int) {
return file_core_contract_asset_issue_contract_proto_rawDescGZIP(), []int{3}
}
func (x *UpdateAssetContract) GetOwnerAddress() []byte {
if x != nil {
return x.OwnerAddress
}
return nil
}
func (x *UpdateAssetContract) GetDescription() []byte {
if x != nil {
return x.Description
}
return nil
}
func (x *UpdateAssetContract) GetUrl() []byte {
if x != nil {
return x.Url
}
return nil
}
func (x *UpdateAssetContract) GetNewLimit() int64 {
if x != nil {
return x.NewLimit
}
return 0
}
func (x *UpdateAssetContract) GetNewPublicLimit() int64 {
if x != nil {
return x.NewPublicLimit
}
return 0
}
type ParticipateAssetIssueContract struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`
ToAddress []byte `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"`
AssetName []byte `protobuf:"bytes,3,opt,name=asset_name,json=assetName,proto3" json:"asset_name,omitempty"` // this field is token name before the proposal ALLOW_SAME_TOKEN_NAME is active, otherwise it is token id and token is should be in string format.
Amount int64 `protobuf:"varint,4,opt,name=amount,proto3" json:"amount,omitempty"` // the amount of drops
}
func (x *ParticipateAssetIssueContract) Reset() {
*x = ParticipateAssetIssueContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_asset_issue_contract_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ParticipateAssetIssueContract) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ParticipateAssetIssueContract) ProtoMessage() {}
func (x *ParticipateAssetIssueContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_asset_issue_contract_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)
}
// Deprecated: Use ParticipateAssetIssueContract.ProtoReflect.Descriptor instead.
func (*ParticipateAssetIssueContract) Descriptor() ([]byte, []int) {
return file_core_contract_asset_issue_contract_proto_rawDescGZIP(), []int{4}
}
func (x *ParticipateAssetIssueContract) GetOwnerAddress() []byte {
if x != nil {
return x.OwnerAddress
}
return nil
}
func (x *ParticipateAssetIssueContract) GetToAddress() []byte {
if x != nil {
return x.ToAddress
}
return nil
}
func (x *ParticipateAssetIssueContract) GetAssetName() []byte {
if x != nil {
return x.AssetName
}
return nil
}
func (x *ParticipateAssetIssueContract) GetAmount() int64 {
if x != nil {
return x.Amount
}
return 0
}
type AssetIssueContract_FrozenSupply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
FrozenAmount int64 `protobuf:"varint,1,opt,name=frozen_amount,json=frozenAmount,proto3" json:"frozen_amount,omitempty"`
FrozenDays int64 `protobuf:"varint,2,opt,name=frozen_days,json=frozenDays,proto3" json:"frozen_days,omitempty"`
}
func (x *AssetIssueContract_FrozenSupply) Reset() {
*x = AssetIssueContract_FrozenSupply{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_asset_issue_contract_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AssetIssueContract_FrozenSupply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AssetIssueContract_FrozenSupply) ProtoMessage() {}
func (x *AssetIssueContract_FrozenSupply) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_asset_issue_contract_proto_msgTypes[5]
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 AssetIssueContract_FrozenSupply.ProtoReflect.Descriptor instead.
func (*AssetIssueContract_FrozenSupply) Descriptor() ([]byte, []int) {
return file_core_contract_asset_issue_contract_proto_rawDescGZIP(), []int{0, 0}
}
func (x *AssetIssueContract_FrozenSupply) GetFrozenAmount() int64 {
if x != nil {
return x.FrozenAmount
}
return 0
}
func (x *AssetIssueContract_FrozenSupply) GetFrozenDays() int64 {
if x != nil {
return x.FrozenDays
}
return 0
}
var File_core_contract_asset_issue_contract_proto protoreflect.FileDescriptor
var file_core_contract_asset_issue_contract_proto_rawDesc = []byte{
0x0a, 0x28, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2f,
0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x73, 0x73, 0x75, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74,
0x72, 0x61, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x63, 0x6f, 0x6c, 0x22, 0x91, 0x06, 0x0a, 0x12, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x73,
0x73, 0x75, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x64, 0x18, 0x29, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x6f,
0x77, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x0c, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x62, 0x62, 0x72, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x04, 0x61, 0x62, 0x62, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61,
0x6c, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b,
0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x4e, 0x0a, 0x0d, 0x66,
0x72, 0x6f, 0x7a, 0x65, 0x6e, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x18, 0x05, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x41, 0x73,
0x73, 0x65, 0x74, 0x49, 0x73, 0x73, 0x75, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74,
0x2e, 0x46, 0x72, 0x6f, 0x7a, 0x65, 0x6e, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x0c, 0x66,
0x72, 0x6f, 0x7a, 0x65, 0x6e, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x74,
0x72, 0x78, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x72,
0x78, 0x4e, 0x75, 0x6d, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f,
0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69,
0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x75, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52,
0x03, 0x6e, 0x75, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69,
0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54,
0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18,
0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14,
0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6f,
0x72, 0x64, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x73, 0x63, 0x6f,
0x72, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x76, 0x6f, 0x74, 0x65, 0x53, 0x63,
0x6f, 0x72, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x15, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x2f, 0x0a, 0x14, 0x66, 0x72, 0x65, 0x65, 0x5f,
0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x6e, 0x65, 0x74, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18,
0x16, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x66, 0x72, 0x65, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74,
0x4e, 0x65, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x3c, 0x0a, 0x1b, 0x70, 0x75, 0x62, 0x6c,
0x69, 0x63, 0x5f, 0x66, 0x72, 0x65, 0x65, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x6e, 0x65,
0x74, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x17, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x70,
0x75, 0x62, 0x6c, 0x69, 0x63, 0x46, 0x72, 0x65, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x4e, 0x65,
0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x3c, 0x0a, 0x1b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63,
0x5f, 0x66, 0x72, 0x65, 0x65, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x6e, 0x65, 0x74, 0x5f,
0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x70, 0x75, 0x62,
0x6c, 0x69, 0x63, 0x46, 0x72, 0x65, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x55,
0x73, 0x61, 0x67, 0x65, 0x12, 0x3c, 0x0a, 0x1b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6c,
0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x66, 0x72, 0x65, 0x65, 0x5f, 0x6e, 0x65, 0x74, 0x5f, 0x74,
0x69, 0x6d, 0x65, 0x18, 0x19, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x70, 0x75, 0x62, 0x6c, 0x69,
0x63, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x46, 0x72, 0x65, 0x65, 0x4e, 0x65, 0x74, 0x54, 0x69,
0x6d, 0x65, 0x1a, 0x54, 0x0a, 0x0c, 0x46, 0x72, 0x6f, 0x7a, 0x65, 0x6e, 0x53, 0x75, 0x70, 0x70,
0x6c, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x72, 0x6f, 0x7a, 0x65, 0x6e, 0x5f, 0x61, 0x6d, 0x6f,
0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x66, 0x72, 0x6f, 0x7a, 0x65,
0x6e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x72, 0x6f, 0x7a, 0x65,
0x6e, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x66, 0x72,
0x6f, 0x7a, 0x65, 0x6e, 0x44, 0x61, 0x79, 0x73, 0x22, 0x92, 0x01, 0x0a, 0x15, 0x54, 0x72, 0x61,
0x6e, 0x73, 0x66, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61,
0x63, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x4e, 0x61, 0x6d,
0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65,
0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41,
0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64,
0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64,
0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18,
0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3c, 0x0a,
0x15, 0x55, 0x6e, 0x66, 0x72, 0x65, 0x65, 0x7a, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x43, 0x6f,
0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f,
0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6f,
0x77, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xb5, 0x01, 0x0a, 0x13,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72,
0x61, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64,
0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6f, 0x77, 0x6e, 0x65,
0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63,
0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x64,
0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72,
0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1b, 0x0a, 0x09,
0x6e, 0x65, 0x77, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52,
0x08, 0x6e, 0x65, 0x77, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x6e, 0x65, 0x77,
0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20,
0x01, 0x28, 0x03, 0x52, 0x0e, 0x6e, 0x65, 0x77, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4c, 0x69,
0x6d, 0x69, 0x74, 0x22, 0x9a, 0x01, 0x0a, 0x1d, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70,
0x61, 0x74, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x73, 0x73, 0x75, 0x65, 0x43, 0x6f, 0x6e,
0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x61,
0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6f, 0x77,
0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f,
0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09,
0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x73,
0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x61,
0x73, 0x73, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75,
0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74,
0x42, 0x45, 0x0a, 0x18, 0x6f, 0x72, 0x67, 0x2e, 0x74, 0x72, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5a, 0x29, 0x67, 0x69,
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x72, 0x6f, 0x6e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77,
0x61, 0x79, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_core_contract_asset_issue_contract_proto_rawDescOnce sync.Once
file_core_contract_asset_issue_contract_proto_rawDescData = file_core_contract_asset_issue_contract_proto_rawDesc
)
func file_core_contract_asset_issue_contract_proto_rawDescGZIP() []byte {
file_core_contract_asset_issue_contract_proto_rawDescOnce.Do(func() {
file_core_contract_asset_issue_contract_proto_rawDescData = protoimpl.X.CompressGZIP(file_core_contract_asset_issue_contract_proto_rawDescData)
})
return file_core_contract_asset_issue_contract_proto_rawDescData
}
var file_core_contract_asset_issue_contract_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_core_contract_asset_issue_contract_proto_goTypes = []interface{}{
(*AssetIssueContract)(nil), // 0: protocol.AssetIssueContract
(*TransferAssetContract)(nil), // 1: protocol.TransferAssetContract
(*UnfreezeAssetContract)(nil), // 2: protocol.UnfreezeAssetContract
(*UpdateAssetContract)(nil), // 3: protocol.UpdateAssetContract
(*ParticipateAssetIssueContract)(nil), // 4: protocol.ParticipateAssetIssueContract
(*AssetIssueContract_FrozenSupply)(nil), // 5: protocol.AssetIssueContract.FrozenSupply
}
var file_core_contract_asset_issue_contract_proto_depIdxs = []int32{
5, // 0: protocol.AssetIssueContract.frozen_supply:type_name -> protocol.AssetIssueContract.FrozenSupply
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
}
func init() { file_core_contract_asset_issue_contract_proto_init() }
func file_core_contract_asset_issue_contract_proto_init() {
if File_core_contract_asset_issue_contract_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_core_contract_asset_issue_contract_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AssetIssueContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_asset_issue_contract_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TransferAssetContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_asset_issue_contract_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UnfreezeAssetContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_asset_issue_contract_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateAssetContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_asset_issue_contract_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ParticipateAssetIssueContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_asset_issue_contract_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AssetIssueContract_FrozenSupply); 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{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_core_contract_asset_issue_contract_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_core_contract_asset_issue_contract_proto_goTypes,
DependencyIndexes: file_core_contract_asset_issue_contract_proto_depIdxs,
MessageInfos: file_core_contract_asset_issue_contract_proto_msgTypes,
}.Build()
File_core_contract_asset_issue_contract_proto = out.File
file_core_contract_asset_issue_contract_proto_rawDesc = nil
file_core_contract_asset_issue_contract_proto_goTypes = nil
file_core_contract_asset_issue_contract_proto_depIdxs = nil
}

File diff suppressed because it is too large Load Diff

135
gen/core/common.pb.go Normal file
View File

@ -0,0 +1,135 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v4.25.1
// source: core/contract/common.proto
package core
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type ResourceCode int32
const (
ResourceCode_BANDWIDTH ResourceCode = 0
ResourceCode_ENERGY ResourceCode = 1
ResourceCode_TRON_POWER ResourceCode = 2
)
// Enum value maps for ResourceCode.
var (
ResourceCode_name = map[int32]string{
0: "BANDWIDTH",
1: "ENERGY",
2: "TRON_POWER",
}
ResourceCode_value = map[string]int32{
"BANDWIDTH": 0,
"ENERGY": 1,
"TRON_POWER": 2,
}
)
func (x ResourceCode) Enum() *ResourceCode {
p := new(ResourceCode)
*p = x
return p
}
func (x ResourceCode) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ResourceCode) Descriptor() protoreflect.EnumDescriptor {
return file_core_contract_common_proto_enumTypes[0].Descriptor()
}
func (ResourceCode) Type() protoreflect.EnumType {
return &file_core_contract_common_proto_enumTypes[0]
}
func (x ResourceCode) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ResourceCode.Descriptor instead.
func (ResourceCode) EnumDescriptor() ([]byte, []int) {
return file_core_contract_common_proto_rawDescGZIP(), []int{0}
}
var File_core_contract_common_proto protoreflect.FileDescriptor
var file_core_contract_common_proto_rawDesc = []byte{
0x0a, 0x1a, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2f,
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2a, 0x39, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x41, 0x4e, 0x44, 0x57, 0x49,
0x44, 0x54, 0x48, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x4e, 0x45, 0x52, 0x47, 0x59, 0x10,
0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x52, 0x4f, 0x4e, 0x5f, 0x50, 0x4f, 0x57, 0x45, 0x52, 0x10,
0x02, 0x42, 0x45, 0x0a, 0x18, 0x6f, 0x72, 0x67, 0x2e, 0x74, 0x72, 0x6f, 0x6e, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5a, 0x29, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x72, 0x6f, 0x6e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65,
0x77, 0x61, 0x79, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_core_contract_common_proto_rawDescOnce sync.Once
file_core_contract_common_proto_rawDescData = file_core_contract_common_proto_rawDesc
)
func file_core_contract_common_proto_rawDescGZIP() []byte {
file_core_contract_common_proto_rawDescOnce.Do(func() {
file_core_contract_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_core_contract_common_proto_rawDescData)
})
return file_core_contract_common_proto_rawDescData
}
var file_core_contract_common_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_core_contract_common_proto_goTypes = []interface{}{
(ResourceCode)(0), // 0: protocol.ResourceCode
}
var file_core_contract_common_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_core_contract_common_proto_init() }
func file_core_contract_common_proto_init() {
if File_core_contract_common_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_core_contract_common_proto_rawDesc,
NumEnums: 1,
NumMessages: 0,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_core_contract_common_proto_goTypes,
DependencyIndexes: file_core_contract_common_proto_depIdxs,
EnumInfos: file_core_contract_common_proto_enumTypes,
}.Build()
File_core_contract_common_proto = out.File
file_core_contract_common_proto_rawDesc = nil
file_core_contract_common_proto_goTypes = nil
file_core_contract_common_proto_depIdxs = nil
}

View File

@ -0,0 +1,481 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v4.25.1
// source: core/contract/exchange_contract.proto
package core
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type ExchangeCreateContract struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`
FirstTokenId []byte `protobuf:"bytes,2,opt,name=first_token_id,json=firstTokenId,proto3" json:"first_token_id,omitempty"`
FirstTokenBalance int64 `protobuf:"varint,3,opt,name=first_token_balance,json=firstTokenBalance,proto3" json:"first_token_balance,omitempty"`
SecondTokenId []byte `protobuf:"bytes,4,opt,name=second_token_id,json=secondTokenId,proto3" json:"second_token_id,omitempty"`
SecondTokenBalance int64 `protobuf:"varint,5,opt,name=second_token_balance,json=secondTokenBalance,proto3" json:"second_token_balance,omitempty"`
}
func (x *ExchangeCreateContract) Reset() {
*x = ExchangeCreateContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_exchange_contract_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ExchangeCreateContract) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExchangeCreateContract) ProtoMessage() {}
func (x *ExchangeCreateContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_exchange_contract_proto_msgTypes[0]
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 ExchangeCreateContract.ProtoReflect.Descriptor instead.
func (*ExchangeCreateContract) Descriptor() ([]byte, []int) {
return file_core_contract_exchange_contract_proto_rawDescGZIP(), []int{0}
}
func (x *ExchangeCreateContract) GetOwnerAddress() []byte {
if x != nil {
return x.OwnerAddress
}
return nil
}
func (x *ExchangeCreateContract) GetFirstTokenId() []byte {
if x != nil {
return x.FirstTokenId
}
return nil
}
func (x *ExchangeCreateContract) GetFirstTokenBalance() int64 {
if x != nil {
return x.FirstTokenBalance
}
return 0
}
func (x *ExchangeCreateContract) GetSecondTokenId() []byte {
if x != nil {
return x.SecondTokenId
}
return nil
}
func (x *ExchangeCreateContract) GetSecondTokenBalance() int64 {
if x != nil {
return x.SecondTokenBalance
}
return 0
}
type ExchangeInjectContract struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`
ExchangeId int64 `protobuf:"varint,2,opt,name=exchange_id,json=exchangeId,proto3" json:"exchange_id,omitempty"`
TokenId []byte `protobuf:"bytes,3,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"`
Quant int64 `protobuf:"varint,4,opt,name=quant,proto3" json:"quant,omitempty"`
}
func (x *ExchangeInjectContract) Reset() {
*x = ExchangeInjectContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_exchange_contract_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ExchangeInjectContract) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExchangeInjectContract) ProtoMessage() {}
func (x *ExchangeInjectContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_exchange_contract_proto_msgTypes[1]
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 ExchangeInjectContract.ProtoReflect.Descriptor instead.
func (*ExchangeInjectContract) Descriptor() ([]byte, []int) {
return file_core_contract_exchange_contract_proto_rawDescGZIP(), []int{1}
}
func (x *ExchangeInjectContract) GetOwnerAddress() []byte {
if x != nil {
return x.OwnerAddress
}
return nil
}
func (x *ExchangeInjectContract) GetExchangeId() int64 {
if x != nil {
return x.ExchangeId
}
return 0
}
func (x *ExchangeInjectContract) GetTokenId() []byte {
if x != nil {
return x.TokenId
}
return nil
}
func (x *ExchangeInjectContract) GetQuant() int64 {
if x != nil {
return x.Quant
}
return 0
}
type ExchangeWithdrawContract struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`
ExchangeId int64 `protobuf:"varint,2,opt,name=exchange_id,json=exchangeId,proto3" json:"exchange_id,omitempty"`
TokenId []byte `protobuf:"bytes,3,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"`
Quant int64 `protobuf:"varint,4,opt,name=quant,proto3" json:"quant,omitempty"`
}
func (x *ExchangeWithdrawContract) Reset() {
*x = ExchangeWithdrawContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_exchange_contract_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ExchangeWithdrawContract) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExchangeWithdrawContract) ProtoMessage() {}
func (x *ExchangeWithdrawContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_exchange_contract_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)
}
// Deprecated: Use ExchangeWithdrawContract.ProtoReflect.Descriptor instead.
func (*ExchangeWithdrawContract) Descriptor() ([]byte, []int) {
return file_core_contract_exchange_contract_proto_rawDescGZIP(), []int{2}
}
func (x *ExchangeWithdrawContract) GetOwnerAddress() []byte {
if x != nil {
return x.OwnerAddress
}
return nil
}
func (x *ExchangeWithdrawContract) GetExchangeId() int64 {
if x != nil {
return x.ExchangeId
}
return 0
}
func (x *ExchangeWithdrawContract) GetTokenId() []byte {
if x != nil {
return x.TokenId
}
return nil
}
func (x *ExchangeWithdrawContract) GetQuant() int64 {
if x != nil {
return x.Quant
}
return 0
}
type ExchangeTransactionContract struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`
ExchangeId int64 `protobuf:"varint,2,opt,name=exchange_id,json=exchangeId,proto3" json:"exchange_id,omitempty"`
TokenId []byte `protobuf:"bytes,3,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"`
Quant int64 `protobuf:"varint,4,opt,name=quant,proto3" json:"quant,omitempty"`
Expected int64 `protobuf:"varint,5,opt,name=expected,proto3" json:"expected,omitempty"`
}
func (x *ExchangeTransactionContract) Reset() {
*x = ExchangeTransactionContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_exchange_contract_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ExchangeTransactionContract) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExchangeTransactionContract) ProtoMessage() {}
func (x *ExchangeTransactionContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_exchange_contract_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)
}
// Deprecated: Use ExchangeTransactionContract.ProtoReflect.Descriptor instead.
func (*ExchangeTransactionContract) Descriptor() ([]byte, []int) {
return file_core_contract_exchange_contract_proto_rawDescGZIP(), []int{3}
}
func (x *ExchangeTransactionContract) GetOwnerAddress() []byte {
if x != nil {
return x.OwnerAddress
}
return nil
}
func (x *ExchangeTransactionContract) GetExchangeId() int64 {
if x != nil {
return x.ExchangeId
}
return 0
}
func (x *ExchangeTransactionContract) GetTokenId() []byte {
if x != nil {
return x.TokenId
}
return nil
}
func (x *ExchangeTransactionContract) GetQuant() int64 {
if x != nil {
return x.Quant
}
return 0
}
func (x *ExchangeTransactionContract) GetExpected() int64 {
if x != nil {
return x.Expected
}
return 0
}
var File_core_contract_exchange_contract_proto protoreflect.FileDescriptor
var file_core_contract_exchange_contract_proto_rawDesc = []byte{
0x0a, 0x25, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2f,
0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63,
0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f,
0x6c, 0x22, 0xed, 0x01, 0x0a, 0x16, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x72,
0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0d,
0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73,
0x73, 0x12, 0x24, 0x0a, 0x0e, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x66, 0x69, 0x72, 0x73, 0x74,
0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x66, 0x69, 0x72, 0x73, 0x74,
0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03,
0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x66, 0x69, 0x72, 0x73, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e,
0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x65, 0x63, 0x6f, 0x6e,
0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c,
0x52, 0x0d, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x64, 0x12,
0x30, 0x0a, 0x14, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f,
0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x73,
0x65, 0x63, 0x6f, 0x6e, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63,
0x65, 0x22, 0x8f, 0x01, 0x0a, 0x16, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e,
0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0d,
0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73,
0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x69, 0x64,
0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65,
0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a,
0x05, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x71, 0x75,
0x61, 0x6e, 0x74, 0x22, 0x91, 0x01, 0x0a, 0x18, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65,
0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74,
0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73,
0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x64,
0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67,
0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x65, 0x78, 0x63, 0x68,
0x61, 0x6e, 0x67, 0x65, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f,
0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x49,
0x64, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03,
0x52, 0x05, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x22, 0xb0, 0x01, 0x0a, 0x1b, 0x45, 0x78, 0x63, 0x68,
0x61, 0x6e, 0x67, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43,
0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x65, 0x72,
0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c,
0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b,
0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
0x03, 0x52, 0x0a, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x64, 0x12, 0x19, 0x0a,
0x08, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52,
0x07, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x61, 0x6e,
0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x12, 0x1a,
0x0a, 0x08, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03,
0x52, 0x08, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x45, 0x0a, 0x18, 0x6f, 0x72,
0x67, 0x2e, 0x74, 0x72, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x63, 0x6f,
0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
0x6f, 0x6d, 0x2f, 0x74, 0x72, 0x6f, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f,
0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f, 0x63, 0x6f, 0x72,
0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_core_contract_exchange_contract_proto_rawDescOnce sync.Once
file_core_contract_exchange_contract_proto_rawDescData = file_core_contract_exchange_contract_proto_rawDesc
)
func file_core_contract_exchange_contract_proto_rawDescGZIP() []byte {
file_core_contract_exchange_contract_proto_rawDescOnce.Do(func() {
file_core_contract_exchange_contract_proto_rawDescData = protoimpl.X.CompressGZIP(file_core_contract_exchange_contract_proto_rawDescData)
})
return file_core_contract_exchange_contract_proto_rawDescData
}
var file_core_contract_exchange_contract_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_core_contract_exchange_contract_proto_goTypes = []interface{}{
(*ExchangeCreateContract)(nil), // 0: protocol.ExchangeCreateContract
(*ExchangeInjectContract)(nil), // 1: protocol.ExchangeInjectContract
(*ExchangeWithdrawContract)(nil), // 2: protocol.ExchangeWithdrawContract
(*ExchangeTransactionContract)(nil), // 3: protocol.ExchangeTransactionContract
}
var file_core_contract_exchange_contract_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_core_contract_exchange_contract_proto_init() }
func file_core_contract_exchange_contract_proto_init() {
if File_core_contract_exchange_contract_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_core_contract_exchange_contract_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ExchangeCreateContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_exchange_contract_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ExchangeInjectContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_exchange_contract_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ExchangeWithdrawContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_exchange_contract_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ExchangeTransactionContract); 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{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_core_contract_exchange_contract_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_core_contract_exchange_contract_proto_goTypes,
DependencyIndexes: file_core_contract_exchange_contract_proto_depIdxs,
MessageInfos: file_core_contract_exchange_contract_proto_msgTypes,
}.Build()
File_core_contract_exchange_contract_proto = out.File
file_core_contract_exchange_contract_proto_rawDesc = nil
file_core_contract_exchange_contract_proto_goTypes = nil
file_core_contract_exchange_contract_proto_depIdxs = nil
}

View File

@ -0,0 +1,264 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v4.25.1
// source: core/contract/market_contract.proto
package core
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type MarketSellAssetContract struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`
SellTokenId []byte `protobuf:"bytes,2,opt,name=sell_token_id,json=sellTokenId,proto3" json:"sell_token_id,omitempty"`
SellTokenQuantity int64 `protobuf:"varint,3,opt,name=sell_token_quantity,json=sellTokenQuantity,proto3" json:"sell_token_quantity,omitempty"`
BuyTokenId []byte `protobuf:"bytes,4,opt,name=buy_token_id,json=buyTokenId,proto3" json:"buy_token_id,omitempty"`
BuyTokenQuantity int64 `protobuf:"varint,5,opt,name=buy_token_quantity,json=buyTokenQuantity,proto3" json:"buy_token_quantity,omitempty"` // min to receive
}
func (x *MarketSellAssetContract) Reset() {
*x = MarketSellAssetContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_market_contract_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MarketSellAssetContract) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MarketSellAssetContract) ProtoMessage() {}
func (x *MarketSellAssetContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_market_contract_proto_msgTypes[0]
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 MarketSellAssetContract.ProtoReflect.Descriptor instead.
func (*MarketSellAssetContract) Descriptor() ([]byte, []int) {
return file_core_contract_market_contract_proto_rawDescGZIP(), []int{0}
}
func (x *MarketSellAssetContract) GetOwnerAddress() []byte {
if x != nil {
return x.OwnerAddress
}
return nil
}
func (x *MarketSellAssetContract) GetSellTokenId() []byte {
if x != nil {
return x.SellTokenId
}
return nil
}
func (x *MarketSellAssetContract) GetSellTokenQuantity() int64 {
if x != nil {
return x.SellTokenQuantity
}
return 0
}
func (x *MarketSellAssetContract) GetBuyTokenId() []byte {
if x != nil {
return x.BuyTokenId
}
return nil
}
func (x *MarketSellAssetContract) GetBuyTokenQuantity() int64 {
if x != nil {
return x.BuyTokenQuantity
}
return 0
}
type MarketCancelOrderContract struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`
OrderId []byte `protobuf:"bytes,2,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
}
func (x *MarketCancelOrderContract) Reset() {
*x = MarketCancelOrderContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_market_contract_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MarketCancelOrderContract) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MarketCancelOrderContract) ProtoMessage() {}
func (x *MarketCancelOrderContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_market_contract_proto_msgTypes[1]
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 MarketCancelOrderContract.ProtoReflect.Descriptor instead.
func (*MarketCancelOrderContract) Descriptor() ([]byte, []int) {
return file_core_contract_market_contract_proto_rawDescGZIP(), []int{1}
}
func (x *MarketCancelOrderContract) GetOwnerAddress() []byte {
if x != nil {
return x.OwnerAddress
}
return nil
}
func (x *MarketCancelOrderContract) GetOrderId() []byte {
if x != nil {
return x.OrderId
}
return nil
}
var File_core_contract_market_contract_proto protoreflect.FileDescriptor
var file_core_contract_market_contract_proto_rawDesc = []byte{
0x0a, 0x23, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2f,
0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22,
0xe2, 0x01, 0x0a, 0x17, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x6c, 0x41, 0x73,
0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6f,
0x77, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x0c, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
0x12, 0x22, 0x0a, 0x0d, 0x73, 0x65, 0x6c, 0x6c, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x69,
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x65, 0x6c, 0x6c, 0x54, 0x6f, 0x6b,
0x65, 0x6e, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x73, 0x65, 0x6c, 0x6c, 0x5f, 0x74, 0x6f, 0x6b,
0x65, 0x6e, 0x5f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28,
0x03, 0x52, 0x11, 0x73, 0x65, 0x6c, 0x6c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x51, 0x75, 0x61, 0x6e,
0x74, 0x69, 0x74, 0x79, 0x12, 0x20, 0x0a, 0x0c, 0x62, 0x75, 0x79, 0x5f, 0x74, 0x6f, 0x6b, 0x65,
0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x62, 0x75, 0x79, 0x54,
0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x12, 0x62, 0x75, 0x79, 0x5f, 0x74, 0x6f,
0x6b, 0x65, 0x6e, 0x5f, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01,
0x28, 0x03, 0x52, 0x10, 0x62, 0x75, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x51, 0x75, 0x61, 0x6e,
0x74, 0x69, 0x74, 0x79, 0x22, 0x5b, 0x0a, 0x19, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x43, 0x61,
0x6e, 0x63, 0x65, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63,
0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65,
0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41,
0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f,
0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x49,
0x64, 0x42, 0x45, 0x0a, 0x18, 0x6f, 0x72, 0x67, 0x2e, 0x74, 0x72, 0x6f, 0x6e, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5a, 0x29, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x72, 0x6f, 0x6e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65,
0x77, 0x61, 0x79, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_core_contract_market_contract_proto_rawDescOnce sync.Once
file_core_contract_market_contract_proto_rawDescData = file_core_contract_market_contract_proto_rawDesc
)
func file_core_contract_market_contract_proto_rawDescGZIP() []byte {
file_core_contract_market_contract_proto_rawDescOnce.Do(func() {
file_core_contract_market_contract_proto_rawDescData = protoimpl.X.CompressGZIP(file_core_contract_market_contract_proto_rawDescData)
})
return file_core_contract_market_contract_proto_rawDescData
}
var file_core_contract_market_contract_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_core_contract_market_contract_proto_goTypes = []interface{}{
(*MarketSellAssetContract)(nil), // 0: protocol.MarketSellAssetContract
(*MarketCancelOrderContract)(nil), // 1: protocol.MarketCancelOrderContract
}
var file_core_contract_market_contract_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_core_contract_market_contract_proto_init() }
func file_core_contract_market_contract_proto_init() {
if File_core_contract_market_contract_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_core_contract_market_contract_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MarketSellAssetContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_market_contract_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MarketCancelOrderContract); 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{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_core_contract_market_contract_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_core_contract_market_contract_proto_goTypes,
DependencyIndexes: file_core_contract_market_contract_proto_depIdxs,
MessageInfos: file_core_contract_market_contract_proto_msgTypes,
}.Build()
File_core_contract_market_contract_proto = out.File
file_core_contract_market_contract_proto_rawDesc = nil
file_core_contract_market_contract_proto_goTypes = nil
file_core_contract_market_contract_proto_depIdxs = nil
}

View File

@ -0,0 +1,326 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v4.25.1
// source: core/contract/proposal_contract.proto
package core
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type ProposalApproveContract struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`
ProposalId int64 `protobuf:"varint,2,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
IsAddApproval bool `protobuf:"varint,3,opt,name=is_add_approval,json=isAddApproval,proto3" json:"is_add_approval,omitempty"` // add or remove approval
}
func (x *ProposalApproveContract) Reset() {
*x = ProposalApproveContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_proposal_contract_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ProposalApproveContract) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ProposalApproveContract) ProtoMessage() {}
func (x *ProposalApproveContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_proposal_contract_proto_msgTypes[0]
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 ProposalApproveContract.ProtoReflect.Descriptor instead.
func (*ProposalApproveContract) Descriptor() ([]byte, []int) {
return file_core_contract_proposal_contract_proto_rawDescGZIP(), []int{0}
}
func (x *ProposalApproveContract) GetOwnerAddress() []byte {
if x != nil {
return x.OwnerAddress
}
return nil
}
func (x *ProposalApproveContract) GetProposalId() int64 {
if x != nil {
return x.ProposalId
}
return 0
}
func (x *ProposalApproveContract) GetIsAddApproval() bool {
if x != nil {
return x.IsAddApproval
}
return false
}
type ProposalCreateContract struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`
Parameters map[int64]int64 `protobuf:"bytes,2,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
}
func (x *ProposalCreateContract) Reset() {
*x = ProposalCreateContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_proposal_contract_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ProposalCreateContract) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ProposalCreateContract) ProtoMessage() {}
func (x *ProposalCreateContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_proposal_contract_proto_msgTypes[1]
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 ProposalCreateContract.ProtoReflect.Descriptor instead.
func (*ProposalCreateContract) Descriptor() ([]byte, []int) {
return file_core_contract_proposal_contract_proto_rawDescGZIP(), []int{1}
}
func (x *ProposalCreateContract) GetOwnerAddress() []byte {
if x != nil {
return x.OwnerAddress
}
return nil
}
func (x *ProposalCreateContract) GetParameters() map[int64]int64 {
if x != nil {
return x.Parameters
}
return nil
}
type ProposalDeleteContract struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`
ProposalId int64 `protobuf:"varint,2,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
}
func (x *ProposalDeleteContract) Reset() {
*x = ProposalDeleteContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_proposal_contract_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ProposalDeleteContract) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ProposalDeleteContract) ProtoMessage() {}
func (x *ProposalDeleteContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_proposal_contract_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)
}
// Deprecated: Use ProposalDeleteContract.ProtoReflect.Descriptor instead.
func (*ProposalDeleteContract) Descriptor() ([]byte, []int) {
return file_core_contract_proposal_contract_proto_rawDescGZIP(), []int{2}
}
func (x *ProposalDeleteContract) GetOwnerAddress() []byte {
if x != nil {
return x.OwnerAddress
}
return nil
}
func (x *ProposalDeleteContract) GetProposalId() int64 {
if x != nil {
return x.ProposalId
}
return 0
}
var File_core_contract_proposal_contract_proto protoreflect.FileDescriptor
var file_core_contract_proposal_contract_proto_rawDesc = []byte{
0x0a, 0x25, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2f,
0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63,
0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f,
0x6c, 0x22, 0x87, 0x01, 0x0a, 0x17, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x41, 0x70,
0x70, 0x72, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x23, 0x0a,
0x0d, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65,
0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69,
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61,
0x6c, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x69, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x5f, 0x61, 0x70,
0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73,
0x41, 0x64, 0x64, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x22, 0xce, 0x01, 0x0a, 0x16,
0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f,
0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f,
0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6f,
0x77, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x50, 0x0a, 0x0a, 0x70,
0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x30, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f,
0x73, 0x61, 0x6c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63,
0x74, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x3d, 0x0a,
0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b,
0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x5e, 0x0a, 0x16,
0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f,
0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f,
0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6f,
0x77, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70,
0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x42, 0x45, 0x0a, 0x18,
0x6f, 0x72, 0x67, 0x2e, 0x74, 0x72, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e,
0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x72, 0x6f, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f,
0x6c, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f, 0x63,
0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_core_contract_proposal_contract_proto_rawDescOnce sync.Once
file_core_contract_proposal_contract_proto_rawDescData = file_core_contract_proposal_contract_proto_rawDesc
)
func file_core_contract_proposal_contract_proto_rawDescGZIP() []byte {
file_core_contract_proposal_contract_proto_rawDescOnce.Do(func() {
file_core_contract_proposal_contract_proto_rawDescData = protoimpl.X.CompressGZIP(file_core_contract_proposal_contract_proto_rawDescData)
})
return file_core_contract_proposal_contract_proto_rawDescData
}
var file_core_contract_proposal_contract_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_core_contract_proposal_contract_proto_goTypes = []interface{}{
(*ProposalApproveContract)(nil), // 0: protocol.ProposalApproveContract
(*ProposalCreateContract)(nil), // 1: protocol.ProposalCreateContract
(*ProposalDeleteContract)(nil), // 2: protocol.ProposalDeleteContract
nil, // 3: protocol.ProposalCreateContract.ParametersEntry
}
var file_core_contract_proposal_contract_proto_depIdxs = []int32{
3, // 0: protocol.ProposalCreateContract.parameters:type_name -> protocol.ProposalCreateContract.ParametersEntry
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
}
func init() { file_core_contract_proposal_contract_proto_init() }
func file_core_contract_proposal_contract_proto_init() {
if File_core_contract_proposal_contract_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_core_contract_proposal_contract_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ProposalApproveContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_proposal_contract_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ProposalCreateContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_proposal_contract_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ProposalDeleteContract); 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{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_core_contract_proposal_contract_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_core_contract_proposal_contract_proto_goTypes,
DependencyIndexes: file_core_contract_proposal_contract_proto_depIdxs,
MessageInfos: file_core_contract_proposal_contract_proto_msgTypes,
}.Build()
File_core_contract_proposal_contract_proto = out.File
file_core_contract_proposal_contract_proto_rawDesc = nil
file_core_contract_proposal_contract_proto_goTypes = nil
file_core_contract_proposal_contract_proto_depIdxs = nil
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,379 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v4.25.1
// source: core/contract/storage_contract.proto
package core
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type BuyStorageBytesContract struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`
Bytes int64 `protobuf:"varint,2,opt,name=bytes,proto3" json:"bytes,omitempty"` // storage bytes for buy
}
func (x *BuyStorageBytesContract) Reset() {
*x = BuyStorageBytesContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_storage_contract_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BuyStorageBytesContract) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BuyStorageBytesContract) ProtoMessage() {}
func (x *BuyStorageBytesContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_storage_contract_proto_msgTypes[0]
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 BuyStorageBytesContract.ProtoReflect.Descriptor instead.
func (*BuyStorageBytesContract) Descriptor() ([]byte, []int) {
return file_core_contract_storage_contract_proto_rawDescGZIP(), []int{0}
}
func (x *BuyStorageBytesContract) GetOwnerAddress() []byte {
if x != nil {
return x.OwnerAddress
}
return nil
}
func (x *BuyStorageBytesContract) GetBytes() int64 {
if x != nil {
return x.Bytes
}
return 0
}
type BuyStorageContract struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`
Quant int64 `protobuf:"varint,2,opt,name=quant,proto3" json:"quant,omitempty"` // trx quantity for buy storage (sun)
}
func (x *BuyStorageContract) Reset() {
*x = BuyStorageContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_storage_contract_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BuyStorageContract) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BuyStorageContract) ProtoMessage() {}
func (x *BuyStorageContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_storage_contract_proto_msgTypes[1]
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 BuyStorageContract.ProtoReflect.Descriptor instead.
func (*BuyStorageContract) Descriptor() ([]byte, []int) {
return file_core_contract_storage_contract_proto_rawDescGZIP(), []int{1}
}
func (x *BuyStorageContract) GetOwnerAddress() []byte {
if x != nil {
return x.OwnerAddress
}
return nil
}
func (x *BuyStorageContract) GetQuant() int64 {
if x != nil {
return x.Quant
}
return 0
}
type SellStorageContract struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`
StorageBytes int64 `protobuf:"varint,2,opt,name=storage_bytes,json=storageBytes,proto3" json:"storage_bytes,omitempty"`
}
func (x *SellStorageContract) Reset() {
*x = SellStorageContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_storage_contract_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SellStorageContract) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SellStorageContract) ProtoMessage() {}
func (x *SellStorageContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_storage_contract_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)
}
// Deprecated: Use SellStorageContract.ProtoReflect.Descriptor instead.
func (*SellStorageContract) Descriptor() ([]byte, []int) {
return file_core_contract_storage_contract_proto_rawDescGZIP(), []int{2}
}
func (x *SellStorageContract) GetOwnerAddress() []byte {
if x != nil {
return x.OwnerAddress
}
return nil
}
func (x *SellStorageContract) GetStorageBytes() int64 {
if x != nil {
return x.StorageBytes
}
return 0
}
type UpdateBrokerageContract struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`
Brokerage int32 `protobuf:"varint,2,opt,name=brokerage,proto3" json:"brokerage,omitempty"` // 1 mean 1%
}
func (x *UpdateBrokerageContract) Reset() {
*x = UpdateBrokerageContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_storage_contract_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UpdateBrokerageContract) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdateBrokerageContract) ProtoMessage() {}
func (x *UpdateBrokerageContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_storage_contract_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)
}
// Deprecated: Use UpdateBrokerageContract.ProtoReflect.Descriptor instead.
func (*UpdateBrokerageContract) Descriptor() ([]byte, []int) {
return file_core_contract_storage_contract_proto_rawDescGZIP(), []int{3}
}
func (x *UpdateBrokerageContract) GetOwnerAddress() []byte {
if x != nil {
return x.OwnerAddress
}
return nil
}
func (x *UpdateBrokerageContract) GetBrokerage() int32 {
if x != nil {
return x.Brokerage
}
return 0
}
var File_core_contract_storage_contract_proto protoreflect.FileDescriptor
var file_core_contract_storage_contract_proto_rawDesc = []byte{
0x0a, 0x24, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2f,
0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c,
0x22, 0x54, 0x0a, 0x17, 0x42, 0x75, 0x79, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x79,
0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6f,
0x77, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x0c, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52,
0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0x4f, 0x0a, 0x12, 0x42, 0x75, 0x79, 0x53, 0x74, 0x6f,
0x72, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0d,
0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73,
0x73, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
0x52, 0x05, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x22, 0x5f, 0x0a, 0x13, 0x53, 0x65, 0x6c, 0x6c, 0x53,
0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x23,
0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72,
0x65, 0x73, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62,
0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72,
0x61, 0x67, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x5c, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61,
0x74, 0x65, 0x42, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72,
0x61, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64,
0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6f, 0x77, 0x6e, 0x65,
0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x72, 0x6f, 0x6b,
0x65, 0x72, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x62, 0x72, 0x6f,
0x6b, 0x65, 0x72, 0x61, 0x67, 0x65, 0x42, 0x45, 0x0a, 0x18, 0x6f, 0x72, 0x67, 0x2e, 0x74, 0x72,
0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61,
0x63, 0x74, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74,
0x72, 0x6f, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x67, 0x72, 0x70, 0x63,
0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_core_contract_storage_contract_proto_rawDescOnce sync.Once
file_core_contract_storage_contract_proto_rawDescData = file_core_contract_storage_contract_proto_rawDesc
)
func file_core_contract_storage_contract_proto_rawDescGZIP() []byte {
file_core_contract_storage_contract_proto_rawDescOnce.Do(func() {
file_core_contract_storage_contract_proto_rawDescData = protoimpl.X.CompressGZIP(file_core_contract_storage_contract_proto_rawDescData)
})
return file_core_contract_storage_contract_proto_rawDescData
}
var file_core_contract_storage_contract_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_core_contract_storage_contract_proto_goTypes = []interface{}{
(*BuyStorageBytesContract)(nil), // 0: protocol.BuyStorageBytesContract
(*BuyStorageContract)(nil), // 1: protocol.BuyStorageContract
(*SellStorageContract)(nil), // 2: protocol.SellStorageContract
(*UpdateBrokerageContract)(nil), // 3: protocol.UpdateBrokerageContract
}
var file_core_contract_storage_contract_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_core_contract_storage_contract_proto_init() }
func file_core_contract_storage_contract_proto_init() {
if File_core_contract_storage_contract_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_core_contract_storage_contract_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BuyStorageBytesContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_storage_contract_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BuyStorageContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_storage_contract_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SellStorageContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_storage_contract_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateBrokerageContract); 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{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_core_contract_storage_contract_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_core_contract_storage_contract_proto_goTypes,
DependencyIndexes: file_core_contract_storage_contract_proto_depIdxs,
MessageInfos: file_core_contract_storage_contract_proto_msgTypes,
}.Build()
File_core_contract_storage_contract_proto = out.File
file_core_contract_storage_contract_proto_rawDesc = nil
file_core_contract_storage_contract_proto_goTypes = nil
file_core_contract_storage_contract_proto_depIdxs = nil
}

View File

@ -0,0 +1,177 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v4.25.1
// source: core/contract/vote_asset_contract.proto
package core
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type VoteAssetContract struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`
VoteAddress [][]byte `protobuf:"bytes,2,rep,name=vote_address,json=voteAddress,proto3" json:"vote_address,omitempty"`
Support bool `protobuf:"varint,3,opt,name=support,proto3" json:"support,omitempty"`
Count int32 `protobuf:"varint,5,opt,name=count,proto3" json:"count,omitempty"`
}
func (x *VoteAssetContract) Reset() {
*x = VoteAssetContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_vote_asset_contract_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VoteAssetContract) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VoteAssetContract) ProtoMessage() {}
func (x *VoteAssetContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_vote_asset_contract_proto_msgTypes[0]
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 VoteAssetContract.ProtoReflect.Descriptor instead.
func (*VoteAssetContract) Descriptor() ([]byte, []int) {
return file_core_contract_vote_asset_contract_proto_rawDescGZIP(), []int{0}
}
func (x *VoteAssetContract) GetOwnerAddress() []byte {
if x != nil {
return x.OwnerAddress
}
return nil
}
func (x *VoteAssetContract) GetVoteAddress() [][]byte {
if x != nil {
return x.VoteAddress
}
return nil
}
func (x *VoteAssetContract) GetSupport() bool {
if x != nil {
return x.Support
}
return false
}
func (x *VoteAssetContract) GetCount() int32 {
if x != nil {
return x.Count
}
return 0
}
var File_core_contract_vote_asset_contract_proto protoreflect.FileDescriptor
var file_core_contract_vote_asset_contract_proto_rawDesc = []byte{
0x0a, 0x27, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2f,
0x76, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72,
0x61, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x63, 0x6f, 0x6c, 0x22, 0x8b, 0x01, 0x0a, 0x11, 0x56, 0x6f, 0x74, 0x65, 0x41, 0x73, 0x73, 0x65,
0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x77, 0x6e,
0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c,
0x52, 0x0c, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x21,
0x0a, 0x0c, 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02,
0x20, 0x03, 0x28, 0x0c, 0x52, 0x0b, 0x76, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73,
0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01,
0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x42, 0x45, 0x0a, 0x18, 0x6f, 0x72, 0x67, 0x2e, 0x74, 0x72, 0x6f, 0x6e, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5a, 0x29, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x72, 0x6f, 0x6e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65,
0x77, 0x61, 0x79, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_core_contract_vote_asset_contract_proto_rawDescOnce sync.Once
file_core_contract_vote_asset_contract_proto_rawDescData = file_core_contract_vote_asset_contract_proto_rawDesc
)
func file_core_contract_vote_asset_contract_proto_rawDescGZIP() []byte {
file_core_contract_vote_asset_contract_proto_rawDescOnce.Do(func() {
file_core_contract_vote_asset_contract_proto_rawDescData = protoimpl.X.CompressGZIP(file_core_contract_vote_asset_contract_proto_rawDescData)
})
return file_core_contract_vote_asset_contract_proto_rawDescData
}
var file_core_contract_vote_asset_contract_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_core_contract_vote_asset_contract_proto_goTypes = []interface{}{
(*VoteAssetContract)(nil), // 0: protocol.VoteAssetContract
}
var file_core_contract_vote_asset_contract_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_core_contract_vote_asset_contract_proto_init() }
func file_core_contract_vote_asset_contract_proto_init() {
if File_core_contract_vote_asset_contract_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_core_contract_vote_asset_contract_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VoteAssetContract); 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{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_core_contract_vote_asset_contract_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_core_contract_vote_asset_contract_proto_goTypes,
DependencyIndexes: file_core_contract_vote_asset_contract_proto_depIdxs,
MessageInfos: file_core_contract_vote_asset_contract_proto_msgTypes,
}.Build()
File_core_contract_vote_asset_contract_proto = out.File
file_core_contract_vote_asset_contract_proto_rawDesc = nil
file_core_contract_vote_asset_contract_proto_goTypes = nil
file_core_contract_vote_asset_contract_proto_depIdxs = nil
}

View File

@ -0,0 +1,390 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v4.25.1
// source: core/contract/witness_contract.proto
package core
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type WitnessCreateContract struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`
Url []byte `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
}
func (x *WitnessCreateContract) Reset() {
*x = WitnessCreateContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_witness_contract_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *WitnessCreateContract) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WitnessCreateContract) ProtoMessage() {}
func (x *WitnessCreateContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_witness_contract_proto_msgTypes[0]
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 WitnessCreateContract.ProtoReflect.Descriptor instead.
func (*WitnessCreateContract) Descriptor() ([]byte, []int) {
return file_core_contract_witness_contract_proto_rawDescGZIP(), []int{0}
}
func (x *WitnessCreateContract) GetOwnerAddress() []byte {
if x != nil {
return x.OwnerAddress
}
return nil
}
func (x *WitnessCreateContract) GetUrl() []byte {
if x != nil {
return x.Url
}
return nil
}
type WitnessUpdateContract struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`
UpdateUrl []byte `protobuf:"bytes,12,opt,name=update_url,json=updateUrl,proto3" json:"update_url,omitempty"`
}
func (x *WitnessUpdateContract) Reset() {
*x = WitnessUpdateContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_witness_contract_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *WitnessUpdateContract) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WitnessUpdateContract) ProtoMessage() {}
func (x *WitnessUpdateContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_witness_contract_proto_msgTypes[1]
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 WitnessUpdateContract.ProtoReflect.Descriptor instead.
func (*WitnessUpdateContract) Descriptor() ([]byte, []int) {
return file_core_contract_witness_contract_proto_rawDescGZIP(), []int{1}
}
func (x *WitnessUpdateContract) GetOwnerAddress() []byte {
if x != nil {
return x.OwnerAddress
}
return nil
}
func (x *WitnessUpdateContract) GetUpdateUrl() []byte {
if x != nil {
return x.UpdateUrl
}
return nil
}
type VoteWitnessContract struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OwnerAddress []byte `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`
Votes []*VoteWitnessContract_Vote `protobuf:"bytes,2,rep,name=votes,proto3" json:"votes,omitempty"`
Support bool `protobuf:"varint,3,opt,name=support,proto3" json:"support,omitempty"`
}
func (x *VoteWitnessContract) Reset() {
*x = VoteWitnessContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_witness_contract_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VoteWitnessContract) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VoteWitnessContract) ProtoMessage() {}
func (x *VoteWitnessContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_witness_contract_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)
}
// Deprecated: Use VoteWitnessContract.ProtoReflect.Descriptor instead.
func (*VoteWitnessContract) Descriptor() ([]byte, []int) {
return file_core_contract_witness_contract_proto_rawDescGZIP(), []int{2}
}
func (x *VoteWitnessContract) GetOwnerAddress() []byte {
if x != nil {
return x.OwnerAddress
}
return nil
}
func (x *VoteWitnessContract) GetVotes() []*VoteWitnessContract_Vote {
if x != nil {
return x.Votes
}
return nil
}
func (x *VoteWitnessContract) GetSupport() bool {
if x != nil {
return x.Support
}
return false
}
type VoteWitnessContract_Vote struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
VoteAddress []byte `protobuf:"bytes,1,opt,name=vote_address,json=voteAddress,proto3" json:"vote_address,omitempty"`
VoteCount int64 `protobuf:"varint,2,opt,name=vote_count,json=voteCount,proto3" json:"vote_count,omitempty"`
}
func (x *VoteWitnessContract_Vote) Reset() {
*x = VoteWitnessContract_Vote{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_witness_contract_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VoteWitnessContract_Vote) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VoteWitnessContract_Vote) ProtoMessage() {}
func (x *VoteWitnessContract_Vote) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_witness_contract_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)
}
// Deprecated: Use VoteWitnessContract_Vote.ProtoReflect.Descriptor instead.
func (*VoteWitnessContract_Vote) Descriptor() ([]byte, []int) {
return file_core_contract_witness_contract_proto_rawDescGZIP(), []int{2, 0}
}
func (x *VoteWitnessContract_Vote) GetVoteAddress() []byte {
if x != nil {
return x.VoteAddress
}
return nil
}
func (x *VoteWitnessContract_Vote) GetVoteCount() int64 {
if x != nil {
return x.VoteCount
}
return 0
}
var File_core_contract_witness_contract_proto protoreflect.FileDescriptor
var file_core_contract_witness_contract_proto_rawDesc = []byte{
0x0a, 0x24, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2f,
0x77, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c,
0x22, 0x4e, 0x0a, 0x15, 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74,
0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x77, 0x6e,
0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c,
0x52, 0x0c, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x10,
0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x75, 0x72, 0x6c,
0x22, 0x5b, 0x0a, 0x15, 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x77, 0x6e,
0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c,
0x52, 0x0c, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d,
0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x0c, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x72, 0x6c, 0x22, 0xd8, 0x01,
0x0a, 0x13, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e,
0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x61,
0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6f, 0x77,
0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x38, 0x0a, 0x05, 0x76, 0x6f,
0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73,
0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x05, 0x76,
0x6f, 0x74, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x18,
0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0x48,
0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x61,
0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x76, 0x6f,
0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x6f, 0x74,
0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x76,
0x6f, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x45, 0x0a, 0x18, 0x6f, 0x72, 0x67, 0x2e,
0x74, 0x72, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74,
0x72, 0x61, 0x63, 0x74, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
0x2f, 0x74, 0x72, 0x6f, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x67, 0x72,
0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_core_contract_witness_contract_proto_rawDescOnce sync.Once
file_core_contract_witness_contract_proto_rawDescData = file_core_contract_witness_contract_proto_rawDesc
)
func file_core_contract_witness_contract_proto_rawDescGZIP() []byte {
file_core_contract_witness_contract_proto_rawDescOnce.Do(func() {
file_core_contract_witness_contract_proto_rawDescData = protoimpl.X.CompressGZIP(file_core_contract_witness_contract_proto_rawDescData)
})
return file_core_contract_witness_contract_proto_rawDescData
}
var file_core_contract_witness_contract_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_core_contract_witness_contract_proto_goTypes = []interface{}{
(*WitnessCreateContract)(nil), // 0: protocol.WitnessCreateContract
(*WitnessUpdateContract)(nil), // 1: protocol.WitnessUpdateContract
(*VoteWitnessContract)(nil), // 2: protocol.VoteWitnessContract
(*VoteWitnessContract_Vote)(nil), // 3: protocol.VoteWitnessContract.Vote
}
var file_core_contract_witness_contract_proto_depIdxs = []int32{
3, // 0: protocol.VoteWitnessContract.votes:type_name -> protocol.VoteWitnessContract.Vote
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
}
func init() { file_core_contract_witness_contract_proto_init() }
func file_core_contract_witness_contract_proto_init() {
if File_core_contract_witness_contract_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_core_contract_witness_contract_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*WitnessCreateContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_witness_contract_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*WitnessUpdateContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_witness_contract_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VoteWitnessContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_witness_contract_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*VoteWitnessContract_Vote); 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{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_core_contract_witness_contract_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_core_contract_witness_contract_proto_goTypes,
DependencyIndexes: file_core_contract_witness_contract_proto_depIdxs,
MessageInfos: file_core_contract_witness_contract_proto_msgTypes,
}.Build()
File_core_contract_witness_contract_proto = out.File
file_core_contract_witness_contract_proto_rawDesc = nil
file_core_contract_witness_contract_proto_goTypes = nil
file_core_contract_witness_contract_proto_depIdxs = nil
}

16
go.mod Normal file
View File

@ -0,0 +1,16 @@
module gitea.capitan.black/pirate/gotron
go 1.23.1
require (
google.golang.org/genproto/googleapis/api v0.0.0-20241113154021-e0fbfb71d213
google.golang.org/grpc v1.68.0
google.golang.org/protobuf v1.35.1
)
require (
golang.org/x/net v0.29.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/text v0.18.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 // indirect
)

18
go.sum Normal file
View File

@ -0,0 +1,18 @@
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo=
golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0=
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224=
golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
google.golang.org/genproto/googleapis/api v0.0.0-20241113154021-e0fbfb71d213 h1:cNftAhx0Q32f3Fz2+BLargfsMD6pGINE+/mUZneTMyk=
google.golang.org/genproto/googleapis/api v0.0.0-20241113154021-e0fbfb71d213/go.mod h1:Yo94eF2nj7igQt+TiJ49KxjIH8ndLYPZMIRSiRcEbg0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 h1:XVhgTWWV3kGQlwJHR3upFWZeTsei6Oks1apkZSeonIE=
google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI=
google.golang.org/grpc v1.68.0 h1:aHQeeJbo8zAkAa3pRzrVjZlbz6uSfeOXlJNQM0RAbz0=
google.golang.org/grpc v1.68.0/go.mod h1:fmSPC5AsjSBCK54MyHRx48kpOti1/jRfOlwEWywNjWA=
google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA=
google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=