Compare commits

..

5 Commits

Author SHA1 Message Date
anon
54bdad99f1 check checksum in NewFromBase58 2024-12-28 17:25:50 -03:00
anon
b3a47c5c7b update gen versions 2024-11-21 23:29:58 -03:00
anon
6cbe88a00a Merge remote-tracking branch 'origin/main' 2024-11-13 19:50:10 -03:00
anon
73ad51f9c1 tron address 2024-11-13 19:49:54 -03:00
e86f0075b9 Update README.md 2024-11-13 22:43:29 +00:00
23 changed files with 2067 additions and 4682 deletions

View File

@ -1,7 +1,7 @@
# Install
```shell
go get -u go get -u gitea.capitan.black/public/gotron/gen/core
go get -u go get -u gitea.capitan.black/public/gotron/gen/api
go get -u gitea.capitan.black/public/gotron/gen/core
go get -u gitea.capitan.black/public/gotron/gen/api
```
# Generate
```shell

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc-gen-go v1.35.2
// protoc v5.28.0
// source: api/zksnark.proto
@ -80,11 +80,9 @@ type ZksnarkRequest struct {
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)
}
mi := &file_api_zksnark_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ZksnarkRequest) String() string {
@ -95,7 +93,7 @@ func (*ZksnarkRequest) ProtoMessage() {}
func (x *ZksnarkRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_zksnark_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -148,11 +146,9 @@ type ZksnarkResponse struct {
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)
}
mi := &file_api_zksnark_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ZksnarkResponse) String() string {
@ -163,7 +159,7 @@ func (*ZksnarkResponse) ProtoMessage() {}
func (x *ZksnarkResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_zksnark_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -235,7 +231,7 @@ func file_api_zksnark_proto_rawDescGZIP() []byte {
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{}{
var file_api_zksnark_proto_goTypes = []any{
(ZksnarkResponse_Code)(0), // 0: protocol.ZksnarkResponse.Code
(*ZksnarkRequest)(nil), // 1: protocol.ZksnarkRequest
(*ZksnarkResponse)(nil), // 2: protocol.ZksnarkResponse
@ -258,32 +254,6 @@ 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{

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc-gen-go-grpc v1.5.1
// - protoc v5.28.0
// source: api/zksnark.proto
@ -15,8 +15,12 @@ import (
// 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
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
TronZksnark_CheckZksnarkProof_FullMethodName = "/protocol.TronZksnark/CheckZksnarkProof"
)
// TronZksnarkClient is the client API for TronZksnark service.
//
@ -34,8 +38,9 @@ func NewTronZksnarkClient(cc grpc.ClientConnInterface) TronZksnarkClient {
}
func (c *tronZksnarkClient) CheckZksnarkProof(ctx context.Context, in *ZksnarkRequest, opts ...grpc.CallOption) (*ZksnarkResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ZksnarkResponse)
err := c.cc.Invoke(ctx, "/protocol.TronZksnark/CheckZksnarkProof", in, out, opts...)
err := c.cc.Invoke(ctx, TronZksnark_CheckZksnarkProof_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -44,20 +49,24 @@ func (c *tronZksnarkClient) CheckZksnarkProof(ctx context.Context, in *ZksnarkRe
// TronZksnarkServer is the server API for TronZksnark service.
// All implementations must embed UnimplementedTronZksnarkServer
// for forward compatibility
// 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 {
}
// UnimplementedTronZksnarkServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedTronZksnarkServer struct{}
func (UnimplementedTronZksnarkServer) CheckZksnarkProof(context.Context, *ZksnarkRequest) (*ZksnarkResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CheckZksnarkProof not implemented")
}
func (UnimplementedTronZksnarkServer) mustEmbedUnimplementedTronZksnarkServer() {}
func (UnimplementedTronZksnarkServer) testEmbeddedByValue() {}
// 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
@ -67,6 +76,13 @@ type UnsafeTronZksnarkServer interface {
}
func RegisterTronZksnarkServer(s grpc.ServiceRegistrar, srv TronZksnarkServer) {
// If the following call pancis, it indicates UnimplementedTronZksnarkServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&TronZksnark_ServiceDesc, srv)
}
@ -80,7 +96,7 @@ func _TronZksnark_CheckZksnarkProof_Handler(srv interface{}, ctx context.Context
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/protocol.TronZksnark/CheckZksnarkProof",
FullMethod: TronZksnark_CheckZksnarkProof_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TronZksnarkServer).CheckZksnarkProof(ctx, req.(*ZksnarkRequest))

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc-gen-go v1.35.2
// protoc v5.28.0
// source: core/Discover.proto
@ -32,11 +32,9 @@ type Endpoint struct {
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)
}
mi := &file_core_Discover_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Endpoint) String() string {
@ -47,7 +45,7 @@ func (*Endpoint) ProtoMessage() {}
func (x *Endpoint) ProtoReflect() protoreflect.Message {
mi := &file_core_Discover_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -96,11 +94,9 @@ type PingMessage struct {
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)
}
mi := &file_core_Discover_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *PingMessage) String() string {
@ -111,7 +107,7 @@ func (*PingMessage) ProtoMessage() {}
func (x *PingMessage) ProtoReflect() protoreflect.Message {
mi := &file_core_Discover_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -166,11 +162,9 @@ type PongMessage struct {
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)
}
mi := &file_core_Discover_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *PongMessage) String() string {
@ -181,7 +175,7 @@ func (*PongMessage) ProtoMessage() {}
func (x *PongMessage) ProtoReflect() protoreflect.Message {
mi := &file_core_Discover_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -229,11 +223,9 @@ type FindNeighbours struct {
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)
}
mi := &file_core_Discover_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *FindNeighbours) String() string {
@ -244,7 +236,7 @@ func (*FindNeighbours) ProtoMessage() {}
func (x *FindNeighbours) ProtoReflect() protoreflect.Message {
mi := &file_core_Discover_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -292,11 +284,9 @@ type Neighbours struct {
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)
}
mi := &file_core_Discover_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Neighbours) String() string {
@ -307,7 +297,7 @@ func (*Neighbours) ProtoMessage() {}
func (x *Neighbours) ProtoReflect() protoreflect.Message {
mi := &file_core_Discover_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -354,11 +344,9 @@ type BackupMessage struct {
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)
}
mi := &file_core_Discover_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *BackupMessage) String() string {
@ -369,7 +357,7 @@ func (*BackupMessage) ProtoMessage() {}
func (x *BackupMessage) ProtoReflect() protoreflect.Message {
mi := &file_core_Discover_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -464,7 +452,7 @@ func file_core_Discover_proto_rawDescGZIP() []byte {
}
var file_core_Discover_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_core_Discover_proto_goTypes = []interface{}{
var file_core_Discover_proto_goTypes = []any{
(*Endpoint)(nil), // 0: protocol.Endpoint
(*PingMessage)(nil), // 1: protocol.PingMessage
(*PongMessage)(nil), // 2: protocol.PongMessage
@ -491,80 +479,6 @@ 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{

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc-gen-go v1.35.2
// protoc v5.28.0
// source: core/TronInventoryItems.proto
@ -31,11 +31,9 @@ type InventoryItems struct {
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)
}
mi := &file_core_TronInventoryItems_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *InventoryItems) String() string {
@ -46,7 +44,7 @@ func (*InventoryItems) ProtoMessage() {}
func (x *InventoryItems) ProtoReflect() protoreflect.Message {
mi := &file_core_TronInventoryItems_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -105,7 +103,7 @@ func file_core_TronInventoryItems_proto_rawDescGZIP() []byte {
}
var file_core_TronInventoryItems_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_core_TronInventoryItems_proto_goTypes = []interface{}{
var file_core_TronInventoryItems_proto_goTypes = []any{
(*InventoryItems)(nil), // 0: protocol.InventoryItems
}
var file_core_TronInventoryItems_proto_depIdxs = []int32{
@ -121,20 +119,6 @@ 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{

View File

@ -14,7 +14,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc-gen-go v1.35.2
// protoc v5.28.0
// source: core/contract/account_contract.proto
@ -46,11 +46,9 @@ type AccountCreateContract struct {
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)
}
mi := &file_core_contract_account_contract_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *AccountCreateContract) String() string {
@ -61,7 +59,7 @@ func (*AccountCreateContract) ProtoMessage() {}
func (x *AccountCreateContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_account_contract_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -109,11 +107,9 @@ type AccountUpdateContract struct {
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)
}
mi := &file_core_contract_account_contract_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *AccountUpdateContract) String() string {
@ -124,7 +120,7 @@ func (*AccountUpdateContract) ProtoMessage() {}
func (x *AccountUpdateContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_account_contract_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -165,11 +161,9 @@ type SetAccountIdContract struct {
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)
}
mi := &file_core_contract_account_contract_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *SetAccountIdContract) String() string {
@ -180,7 +174,7 @@ func (*SetAccountIdContract) ProtoMessage() {}
func (x *SetAccountIdContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_account_contract_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -222,11 +216,9 @@ type AccountPermissionUpdateContract struct {
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)
}
mi := &file_core_contract_account_contract_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *AccountPermissionUpdateContract) String() string {
@ -237,7 +229,7 @@ func (*AccountPermissionUpdateContract) ProtoMessage() {}
func (x *AccountPermissionUpdateContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_account_contract_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -342,7 +334,7 @@ func file_core_contract_account_contract_proto_rawDescGZIP() []byte {
}
var file_core_contract_account_contract_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_core_contract_account_contract_proto_goTypes = []interface{}{
var file_core_contract_account_contract_proto_goTypes = []any{
(*AccountCreateContract)(nil), // 0: protocol.AccountCreateContract
(*AccountUpdateContract)(nil), // 1: protocol.AccountUpdateContract
(*SetAccountIdContract)(nil), // 2: protocol.SetAccountIdContract
@ -368,56 +360,6 @@ func file_core_contract_account_contract_proto_init() {
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{

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc-gen-go v1.35.2
// protoc v5.28.0
// source: core/contract/asset_issue_contract.proto
@ -48,11 +48,9 @@ type AssetIssueContract struct {
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)
}
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 {
@ -63,7 +61,7 @@ func (*AssetIssueContract) ProtoMessage() {}
func (x *AssetIssueContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_asset_issue_contract_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -224,11 +222,9 @@ type TransferAssetContract struct {
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)
}
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 {
@ -239,7 +235,7 @@ func (*TransferAssetContract) ProtoMessage() {}
func (x *TransferAssetContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_asset_issue_contract_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -292,11 +288,9 @@ type UnfreezeAssetContract struct {
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)
}
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 {
@ -307,7 +301,7 @@ func (*UnfreezeAssetContract) ProtoMessage() {}
func (x *UnfreezeAssetContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_asset_issue_contract_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -343,11 +337,9 @@ type UpdateAssetContract struct {
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)
}
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 {
@ -358,7 +350,7 @@ func (*UpdateAssetContract) ProtoMessage() {}
func (x *UpdateAssetContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_asset_issue_contract_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -421,11 +413,9 @@ type ParticipateAssetIssueContract struct {
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)
}
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 {
@ -436,7 +426,7 @@ func (*ParticipateAssetIssueContract) ProtoMessage() {}
func (x *ParticipateAssetIssueContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_asset_issue_contract_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -490,11 +480,9 @@ type AssetIssueContract_FrozenSupply struct {
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)
}
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 {
@ -505,7 +493,7 @@ 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 {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -644,7 +632,7 @@ func file_core_contract_asset_issue_contract_proto_rawDescGZIP() []byte {
}
var file_core_contract_asset_issue_contract_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_core_contract_asset_issue_contract_proto_goTypes = []interface{}{
var file_core_contract_asset_issue_contract_proto_goTypes = []any{
(*AssetIssueContract)(nil), // 0: protocol.AssetIssueContract
(*TransferAssetContract)(nil), // 1: protocol.TransferAssetContract
(*UnfreezeAssetContract)(nil), // 2: protocol.UnfreezeAssetContract
@ -666,80 +654,6 @@ 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{

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc-gen-go v1.35.2
// protoc v5.28.0
// source: core/contract/balance_contract.proto
@ -34,11 +34,9 @@ type FreezeBalanceContract struct {
func (x *FreezeBalanceContract) Reset() {
*x = FreezeBalanceContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_balance_contract_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_balance_contract_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *FreezeBalanceContract) String() string {
@ -49,7 +47,7 @@ func (*FreezeBalanceContract) ProtoMessage() {}
func (x *FreezeBalanceContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_balance_contract_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -111,11 +109,9 @@ type UnfreezeBalanceContract struct {
func (x *UnfreezeBalanceContract) Reset() {
*x = UnfreezeBalanceContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_balance_contract_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_balance_contract_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *UnfreezeBalanceContract) String() string {
@ -126,7 +122,7 @@ func (*UnfreezeBalanceContract) ProtoMessage() {}
func (x *UnfreezeBalanceContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_balance_contract_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -172,11 +168,9 @@ type WithdrawBalanceContract struct {
func (x *WithdrawBalanceContract) Reset() {
*x = WithdrawBalanceContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_balance_contract_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_balance_contract_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *WithdrawBalanceContract) String() string {
@ -187,7 +181,7 @@ func (*WithdrawBalanceContract) ProtoMessage() {}
func (x *WithdrawBalanceContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_balance_contract_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -221,11 +215,9 @@ type TransferContract struct {
func (x *TransferContract) Reset() {
*x = TransferContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_balance_contract_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_balance_contract_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *TransferContract) String() string {
@ -236,7 +228,7 @@ func (*TransferContract) ProtoMessage() {}
func (x *TransferContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_balance_contract_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -285,11 +277,9 @@ type TransactionBalanceTrace struct {
func (x *TransactionBalanceTrace) Reset() {
*x = TransactionBalanceTrace{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_balance_contract_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_balance_contract_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *TransactionBalanceTrace) String() string {
@ -300,7 +290,7 @@ func (*TransactionBalanceTrace) ProtoMessage() {}
func (x *TransactionBalanceTrace) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_balance_contract_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -355,11 +345,9 @@ type BlockBalanceTrace struct {
func (x *BlockBalanceTrace) Reset() {
*x = BlockBalanceTrace{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_balance_contract_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_balance_contract_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *BlockBalanceTrace) String() string {
@ -370,7 +358,7 @@ func (*BlockBalanceTrace) ProtoMessage() {}
func (x *BlockBalanceTrace) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_balance_contract_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -417,11 +405,9 @@ type AccountTrace struct {
func (x *AccountTrace) Reset() {
*x = AccountTrace{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_balance_contract_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_balance_contract_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *AccountTrace) String() string {
@ -432,7 +418,7 @@ func (*AccountTrace) ProtoMessage() {}
func (x *AccountTrace) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_balance_contract_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -471,11 +457,9 @@ type AccountIdentifier struct {
func (x *AccountIdentifier) Reset() {
*x = AccountIdentifier{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_balance_contract_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_balance_contract_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *AccountIdentifier) String() string {
@ -486,7 +470,7 @@ func (*AccountIdentifier) ProtoMessage() {}
func (x *AccountIdentifier) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_balance_contract_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -519,11 +503,9 @@ type AccountBalanceRequest struct {
func (x *AccountBalanceRequest) Reset() {
*x = AccountBalanceRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_balance_contract_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_balance_contract_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *AccountBalanceRequest) String() string {
@ -534,7 +516,7 @@ func (*AccountBalanceRequest) ProtoMessage() {}
func (x *AccountBalanceRequest) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_balance_contract_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -574,11 +556,9 @@ type AccountBalanceResponse struct {
func (x *AccountBalanceResponse) Reset() {
*x = AccountBalanceResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_balance_contract_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_balance_contract_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *AccountBalanceResponse) String() string {
@ -589,7 +569,7 @@ func (*AccountBalanceResponse) ProtoMessage() {}
func (x *AccountBalanceResponse) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_balance_contract_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -630,11 +610,9 @@ type FreezeBalanceV2Contract struct {
func (x *FreezeBalanceV2Contract) Reset() {
*x = FreezeBalanceV2Contract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_balance_contract_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_balance_contract_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *FreezeBalanceV2Contract) String() string {
@ -645,7 +623,7 @@ func (*FreezeBalanceV2Contract) ProtoMessage() {}
func (x *FreezeBalanceV2Contract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_balance_contract_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -693,11 +671,9 @@ type UnfreezeBalanceV2Contract struct {
func (x *UnfreezeBalanceV2Contract) Reset() {
*x = UnfreezeBalanceV2Contract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_balance_contract_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_balance_contract_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *UnfreezeBalanceV2Contract) String() string {
@ -708,7 +684,7 @@ func (*UnfreezeBalanceV2Contract) ProtoMessage() {}
func (x *UnfreezeBalanceV2Contract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_balance_contract_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -754,11 +730,9 @@ type WithdrawExpireUnfreezeContract struct {
func (x *WithdrawExpireUnfreezeContract) Reset() {
*x = WithdrawExpireUnfreezeContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_balance_contract_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_balance_contract_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *WithdrawExpireUnfreezeContract) String() string {
@ -769,7 +743,7 @@ func (*WithdrawExpireUnfreezeContract) ProtoMessage() {}
func (x *WithdrawExpireUnfreezeContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_balance_contract_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -806,11 +780,9 @@ type DelegateResourceContract struct {
func (x *DelegateResourceContract) Reset() {
*x = DelegateResourceContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_balance_contract_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_balance_contract_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *DelegateResourceContract) String() string {
@ -821,7 +793,7 @@ func (*DelegateResourceContract) ProtoMessage() {}
func (x *DelegateResourceContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_balance_contract_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -891,11 +863,9 @@ type UnDelegateResourceContract struct {
func (x *UnDelegateResourceContract) Reset() {
*x = UnDelegateResourceContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_balance_contract_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_balance_contract_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *UnDelegateResourceContract) String() string {
@ -906,7 +876,7 @@ func (*UnDelegateResourceContract) ProtoMessage() {}
func (x *UnDelegateResourceContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_balance_contract_proto_msgTypes[14]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -959,11 +929,9 @@ type CancelAllUnfreezeV2Contract struct {
func (x *CancelAllUnfreezeV2Contract) Reset() {
*x = CancelAllUnfreezeV2Contract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_balance_contract_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_balance_contract_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *CancelAllUnfreezeV2Contract) String() string {
@ -974,7 +942,7 @@ func (*CancelAllUnfreezeV2Contract) ProtoMessage() {}
func (x *CancelAllUnfreezeV2Contract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_balance_contract_proto_msgTypes[15]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -1008,11 +976,9 @@ type TransactionBalanceTrace_Operation struct {
func (x *TransactionBalanceTrace_Operation) Reset() {
*x = TransactionBalanceTrace_Operation{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_balance_contract_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_balance_contract_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *TransactionBalanceTrace_Operation) String() string {
@ -1023,7 +989,7 @@ func (*TransactionBalanceTrace_Operation) ProtoMessage() {}
func (x *TransactionBalanceTrace_Operation) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_balance_contract_proto_msgTypes[16]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -1070,11 +1036,9 @@ type BlockBalanceTrace_BlockIdentifier struct {
func (x *BlockBalanceTrace_BlockIdentifier) Reset() {
*x = BlockBalanceTrace_BlockIdentifier{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_balance_contract_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_balance_contract_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *BlockBalanceTrace_BlockIdentifier) String() string {
@ -1085,7 +1049,7 @@ func (*BlockBalanceTrace_BlockIdentifier) ProtoMessage() {}
func (x *BlockBalanceTrace_BlockIdentifier) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_balance_contract_proto_msgTypes[17]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -1300,7 +1264,7 @@ func file_core_contract_balance_contract_proto_rawDescGZIP() []byte {
}
var file_core_contract_balance_contract_proto_msgTypes = make([]protoimpl.MessageInfo, 18)
var file_core_contract_balance_contract_proto_goTypes = []interface{}{
var file_core_contract_balance_contract_proto_goTypes = []any{
(*FreezeBalanceContract)(nil), // 0: protocol.FreezeBalanceContract
(*UnfreezeBalanceContract)(nil), // 1: protocol.UnfreezeBalanceContract
(*WithdrawBalanceContract)(nil), // 2: protocol.WithdrawBalanceContract
@ -1347,224 +1311,6 @@ func file_core_contract_balance_contract_proto_init() {
return
}
file_core_contract_common_proto_init()
if !protoimpl.UnsafeEnabled {
file_core_contract_balance_contract_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FreezeBalanceContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_balance_contract_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UnfreezeBalanceContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_balance_contract_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*WithdrawBalanceContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_balance_contract_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TransferContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_balance_contract_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TransactionBalanceTrace); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_balance_contract_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BlockBalanceTrace); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_balance_contract_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AccountTrace); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_balance_contract_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AccountIdentifier); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_balance_contract_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AccountBalanceRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_balance_contract_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AccountBalanceResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_balance_contract_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FreezeBalanceV2Contract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_balance_contract_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UnfreezeBalanceV2Contract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_balance_contract_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*WithdrawExpireUnfreezeContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_balance_contract_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DelegateResourceContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_balance_contract_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UnDelegateResourceContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_balance_contract_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CancelAllUnfreezeV2Contract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_balance_contract_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TransactionBalanceTrace_Operation); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_balance_contract_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BlockBalanceTrace_BlockIdentifier); 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{

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc-gen-go v1.35.2
// protoc v5.28.0
// source: core/contract/common.proto
@ -98,7 +98,7 @@ func file_core_contract_common_proto_rawDescGZIP() []byte {
}
var file_core_contract_common_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_core_contract_common_proto_goTypes = []interface{}{
var file_core_contract_common_proto_goTypes = []any{
(ResourceCode)(0), // 0: protocol.ResourceCode
}
var file_core_contract_common_proto_depIdxs = []int32{

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc-gen-go v1.35.2
// protoc v5.28.0
// source: core/contract/exchange_contract.proto
@ -34,11 +34,9 @@ type ExchangeCreateContract struct {
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)
}
mi := &file_core_contract_exchange_contract_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ExchangeCreateContract) String() string {
@ -49,7 +47,7 @@ func (*ExchangeCreateContract) ProtoMessage() {}
func (x *ExchangeCreateContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_exchange_contract_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -112,11 +110,9 @@ type ExchangeInjectContract struct {
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)
}
mi := &file_core_contract_exchange_contract_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ExchangeInjectContract) String() string {
@ -127,7 +123,7 @@ func (*ExchangeInjectContract) ProtoMessage() {}
func (x *ExchangeInjectContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_exchange_contract_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -183,11 +179,9 @@ type ExchangeWithdrawContract struct {
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)
}
mi := &file_core_contract_exchange_contract_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ExchangeWithdrawContract) String() string {
@ -198,7 +192,7 @@ func (*ExchangeWithdrawContract) ProtoMessage() {}
func (x *ExchangeWithdrawContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_exchange_contract_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -255,11 +249,9 @@ type ExchangeTransactionContract struct {
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)
}
mi := &file_core_contract_exchange_contract_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ExchangeTransactionContract) String() string {
@ -270,7 +262,7 @@ func (*ExchangeTransactionContract) ProtoMessage() {}
func (x *ExchangeTransactionContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_exchange_contract_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -391,7 +383,7 @@ func file_core_contract_exchange_contract_proto_rawDescGZIP() []byte {
}
var file_core_contract_exchange_contract_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_core_contract_exchange_contract_proto_goTypes = []interface{}{
var file_core_contract_exchange_contract_proto_goTypes = []any{
(*ExchangeCreateContract)(nil), // 0: protocol.ExchangeCreateContract
(*ExchangeInjectContract)(nil), // 1: protocol.ExchangeInjectContract
(*ExchangeWithdrawContract)(nil), // 2: protocol.ExchangeWithdrawContract
@ -410,56 +402,6 @@ 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{

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc-gen-go v1.35.2
// protoc v5.28.0
// source: core/contract/market_contract.proto
@ -34,11 +34,9 @@ type MarketSellAssetContract struct {
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)
}
mi := &file_core_contract_market_contract_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *MarketSellAssetContract) String() string {
@ -49,7 +47,7 @@ func (*MarketSellAssetContract) ProtoMessage() {}
func (x *MarketSellAssetContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_market_contract_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -110,11 +108,9 @@ type MarketCancelOrderContract struct {
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)
}
mi := &file_core_contract_market_contract_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *MarketCancelOrderContract) String() string {
@ -125,7 +121,7 @@ func (*MarketCancelOrderContract) ProtoMessage() {}
func (x *MarketCancelOrderContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_market_contract_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -200,7 +196,7 @@ func file_core_contract_market_contract_proto_rawDescGZIP() []byte {
}
var file_core_contract_market_contract_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_core_contract_market_contract_proto_goTypes = []interface{}{
var file_core_contract_market_contract_proto_goTypes = []any{
(*MarketSellAssetContract)(nil), // 0: protocol.MarketSellAssetContract
(*MarketCancelOrderContract)(nil), // 1: protocol.MarketCancelOrderContract
}
@ -217,32 +213,6 @@ 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{

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc-gen-go v1.35.2
// protoc v5.28.0
// source: core/contract/proposal_contract.proto
@ -32,11 +32,9 @@ type ProposalApproveContract struct {
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)
}
mi := &file_core_contract_proposal_contract_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ProposalApproveContract) String() string {
@ -47,7 +45,7 @@ func (*ProposalApproveContract) ProtoMessage() {}
func (x *ProposalApproveContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_proposal_contract_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -94,11 +92,9 @@ type ProposalCreateContract struct {
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)
}
mi := &file_core_contract_proposal_contract_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ProposalCreateContract) String() string {
@ -109,7 +105,7 @@ func (*ProposalCreateContract) ProtoMessage() {}
func (x *ProposalCreateContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_proposal_contract_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -149,11 +145,9 @@ type ProposalDeleteContract struct {
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)
}
mi := &file_core_contract_proposal_contract_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ProposalDeleteContract) String() string {
@ -164,7 +158,7 @@ func (*ProposalDeleteContract) ProtoMessage() {}
func (x *ProposalDeleteContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_proposal_contract_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -247,7 +241,7 @@ func file_core_contract_proposal_contract_proto_rawDescGZIP() []byte {
}
var file_core_contract_proposal_contract_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_core_contract_proposal_contract_proto_goTypes = []interface{}{
var file_core_contract_proposal_contract_proto_goTypes = []any{
(*ProposalApproveContract)(nil), // 0: protocol.ProposalApproveContract
(*ProposalCreateContract)(nil), // 1: protocol.ProposalCreateContract
(*ProposalDeleteContract)(nil), // 2: protocol.ProposalDeleteContract
@ -267,44 +261,6 @@ 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{

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc-gen-go v1.35.2
// protoc v5.28.0
// source: core/contract/shield_contract.proto
@ -30,11 +30,9 @@ type AuthenticationPath struct {
func (x *AuthenticationPath) Reset() {
*x = AuthenticationPath{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_shield_contract_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_shield_contract_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *AuthenticationPath) String() string {
@ -45,7 +43,7 @@ func (*AuthenticationPath) ProtoMessage() {}
func (x *AuthenticationPath) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_shield_contract_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -79,11 +77,9 @@ type MerklePath struct {
func (x *MerklePath) Reset() {
*x = MerklePath{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_shield_contract_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_shield_contract_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *MerklePath) String() string {
@ -94,7 +90,7 @@ func (*MerklePath) ProtoMessage() {}
func (x *MerklePath) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_shield_contract_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -141,11 +137,9 @@ type OutputPoint struct {
func (x *OutputPoint) Reset() {
*x = OutputPoint{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_shield_contract_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_shield_contract_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *OutputPoint) String() string {
@ -156,7 +150,7 @@ func (*OutputPoint) ProtoMessage() {}
func (x *OutputPoint) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_shield_contract_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -196,11 +190,9 @@ type OutputPointInfo struct {
func (x *OutputPointInfo) Reset() {
*x = OutputPointInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_shield_contract_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_shield_contract_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *OutputPointInfo) String() string {
@ -211,7 +203,7 @@ func (*OutputPointInfo) ProtoMessage() {}
func (x *OutputPointInfo) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_shield_contract_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -250,11 +242,9 @@ type PedersenHash struct {
func (x *PedersenHash) Reset() {
*x = PedersenHash{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_shield_contract_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_shield_contract_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *PedersenHash) String() string {
@ -265,7 +255,7 @@ func (*PedersenHash) ProtoMessage() {}
func (x *PedersenHash) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_shield_contract_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -299,11 +289,9 @@ type IncrementalMerkleTree struct {
func (x *IncrementalMerkleTree) Reset() {
*x = IncrementalMerkleTree{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_shield_contract_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_shield_contract_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *IncrementalMerkleTree) String() string {
@ -314,7 +302,7 @@ func (*IncrementalMerkleTree) ProtoMessage() {}
func (x *IncrementalMerkleTree) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_shield_contract_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -365,11 +353,9 @@ type IncrementalMerkleVoucher struct {
func (x *IncrementalMerkleVoucher) Reset() {
*x = IncrementalMerkleVoucher{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_shield_contract_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_shield_contract_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *IncrementalMerkleVoucher) String() string {
@ -380,7 +366,7 @@ func (*IncrementalMerkleVoucher) ProtoMessage() {}
func (x *IncrementalMerkleVoucher) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_shield_contract_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -448,11 +434,9 @@ type IncrementalMerkleVoucherInfo struct {
func (x *IncrementalMerkleVoucherInfo) Reset() {
*x = IncrementalMerkleVoucherInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_shield_contract_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_shield_contract_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *IncrementalMerkleVoucherInfo) String() string {
@ -463,7 +447,7 @@ func (*IncrementalMerkleVoucherInfo) ProtoMessage() {}
func (x *IncrementalMerkleVoucherInfo) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_shield_contract_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -507,11 +491,9 @@ type SpendDescription struct {
func (x *SpendDescription) Reset() {
*x = SpendDescription{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_shield_contract_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_shield_contract_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *SpendDescription) String() string {
@ -522,7 +504,7 @@ func (*SpendDescription) ProtoMessage() {}
func (x *SpendDescription) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_shield_contract_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -594,11 +576,9 @@ type ReceiveDescription struct {
func (x *ReceiveDescription) Reset() {
*x = ReceiveDescription{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_shield_contract_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_shield_contract_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ReceiveDescription) String() string {
@ -609,7 +589,7 @@ func (*ReceiveDescription) ProtoMessage() {}
func (x *ReceiveDescription) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_shield_contract_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -682,11 +662,9 @@ type ShieldedTransferContract struct {
func (x *ShieldedTransferContract) Reset() {
*x = ShieldedTransferContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_shield_contract_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_shield_contract_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ShieldedTransferContract) String() string {
@ -697,7 +675,7 @@ func (*ShieldedTransferContract) ProtoMessage() {}
func (x *ShieldedTransferContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_shield_contract_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -898,7 +876,7 @@ func file_core_contract_shield_contract_proto_rawDescGZIP() []byte {
}
var file_core_contract_shield_contract_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_core_contract_shield_contract_proto_goTypes = []interface{}{
var file_core_contract_shield_contract_proto_goTypes = []any{
(*AuthenticationPath)(nil), // 0: protocol.AuthenticationPath
(*MerklePath)(nil), // 1: protocol.MerklePath
(*OutputPoint)(nil), // 2: protocol.OutputPoint
@ -936,140 +914,6 @@ func file_core_contract_shield_contract_proto_init() {
if File_core_contract_shield_contract_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_core_contract_shield_contract_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AuthenticationPath); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_shield_contract_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MerklePath); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_shield_contract_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OutputPoint); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_shield_contract_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OutputPointInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_shield_contract_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PedersenHash); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_shield_contract_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IncrementalMerkleTree); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_shield_contract_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IncrementalMerkleVoucher); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_shield_contract_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IncrementalMerkleVoucherInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_shield_contract_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SpendDescription); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_shield_contract_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ReceiveDescription); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_shield_contract_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ShieldedTransferContract); 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{

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc-gen-go v1.35.2
// protoc v5.28.0
// source: core/contract/smart_contract.proto
@ -156,11 +156,9 @@ type SmartContract struct {
func (x *SmartContract) Reset() {
*x = SmartContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_smart_contract_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_smart_contract_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *SmartContract) String() string {
@ -171,7 +169,7 @@ func (*SmartContract) ProtoMessage() {}
func (x *SmartContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_smart_contract_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -275,11 +273,9 @@ type ContractState struct {
func (x *ContractState) Reset() {
*x = ContractState{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_smart_contract_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_smart_contract_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ContractState) String() string {
@ -290,7 +286,7 @@ func (*ContractState) ProtoMessage() {}
func (x *ContractState) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_smart_contract_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -339,11 +335,9 @@ type CreateSmartContract struct {
func (x *CreateSmartContract) Reset() {
*x = CreateSmartContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_smart_contract_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_smart_contract_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *CreateSmartContract) String() string {
@ -354,7 +348,7 @@ func (*CreateSmartContract) ProtoMessage() {}
func (x *CreateSmartContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_smart_contract_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -412,11 +406,9 @@ type TriggerSmartContract struct {
func (x *TriggerSmartContract) Reset() {
*x = TriggerSmartContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_smart_contract_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_smart_contract_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *TriggerSmartContract) String() string {
@ -427,7 +419,7 @@ func (*TriggerSmartContract) ProtoMessage() {}
func (x *TriggerSmartContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_smart_contract_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -495,11 +487,9 @@ type ClearABIContract struct {
func (x *ClearABIContract) Reset() {
*x = ClearABIContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_smart_contract_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_smart_contract_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ClearABIContract) String() string {
@ -510,7 +500,7 @@ func (*ClearABIContract) ProtoMessage() {}
func (x *ClearABIContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_smart_contract_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -551,11 +541,9 @@ type UpdateSettingContract struct {
func (x *UpdateSettingContract) Reset() {
*x = UpdateSettingContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_smart_contract_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_smart_contract_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *UpdateSettingContract) String() string {
@ -566,7 +554,7 @@ func (*UpdateSettingContract) ProtoMessage() {}
func (x *UpdateSettingContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_smart_contract_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -614,11 +602,9 @@ type UpdateEnergyLimitContract struct {
func (x *UpdateEnergyLimitContract) Reset() {
*x = UpdateEnergyLimitContract{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_smart_contract_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_smart_contract_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *UpdateEnergyLimitContract) String() string {
@ -629,7 +615,7 @@ func (*UpdateEnergyLimitContract) ProtoMessage() {}
func (x *UpdateEnergyLimitContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_smart_contract_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -677,11 +663,9 @@ type SmartContractDataWrapper struct {
func (x *SmartContractDataWrapper) Reset() {
*x = SmartContractDataWrapper{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_smart_contract_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_smart_contract_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *SmartContractDataWrapper) String() string {
@ -692,7 +676,7 @@ func (*SmartContractDataWrapper) ProtoMessage() {}
func (x *SmartContractDataWrapper) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_smart_contract_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -738,11 +722,9 @@ type SmartContract_ABI struct {
func (x *SmartContract_ABI) Reset() {
*x = SmartContract_ABI{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_smart_contract_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_smart_contract_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *SmartContract_ABI) String() string {
@ -753,7 +735,7 @@ func (*SmartContract_ABI) ProtoMessage() {}
func (x *SmartContract_ABI) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_smart_contract_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -792,11 +774,9 @@ type SmartContract_ABI_Entry struct {
func (x *SmartContract_ABI_Entry) Reset() {
*x = SmartContract_ABI_Entry{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_smart_contract_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_smart_contract_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *SmartContract_ABI_Entry) String() string {
@ -807,7 +787,7 @@ func (*SmartContract_ABI_Entry) ProtoMessage() {}
func (x *SmartContract_ABI_Entry) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_smart_contract_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -890,11 +870,9 @@ type SmartContract_ABI_Entry_Param struct {
func (x *SmartContract_ABI_Entry_Param) Reset() {
*x = SmartContract_ABI_Entry_Param{}
if protoimpl.UnsafeEnabled {
mi := &file_core_contract_smart_contract_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_core_contract_smart_contract_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *SmartContract_ABI_Entry_Param) String() string {
@ -905,7 +883,7 @@ func (*SmartContract_ABI_Entry_Param) ProtoMessage() {}
func (x *SmartContract_ABI_Entry_Param) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_smart_contract_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -1116,7 +1094,7 @@ func file_core_contract_smart_contract_proto_rawDescGZIP() []byte {
var file_core_contract_smart_contract_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_core_contract_smart_contract_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_core_contract_smart_contract_proto_goTypes = []interface{}{
var file_core_contract_smart_contract_proto_goTypes = []any{
(SmartContract_ABI_Entry_EntryType)(0), // 0: protocol.SmartContract.ABI.Entry.EntryType
(SmartContract_ABI_Entry_StateMutabilityType)(0), // 1: protocol.SmartContract.ABI.Entry.StateMutabilityType
(*SmartContract)(nil), // 2: protocol.SmartContract
@ -1154,140 +1132,6 @@ func file_core_contract_smart_contract_proto_init() {
return
}
file_core_Tron_proto_init()
if !protoimpl.UnsafeEnabled {
file_core_contract_smart_contract_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SmartContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_smart_contract_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ContractState); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_smart_contract_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreateSmartContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_smart_contract_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TriggerSmartContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_smart_contract_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ClearABIContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_smart_contract_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateSettingContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_smart_contract_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateEnergyLimitContract); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_smart_contract_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SmartContractDataWrapper); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_smart_contract_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SmartContract_ABI); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_smart_contract_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SmartContract_ABI_Entry); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_core_contract_smart_contract_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SmartContract_ABI_Entry_Param); 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{

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc-gen-go v1.35.2
// protoc v5.28.0
// source: core/contract/storage_contract.proto
@ -31,11 +31,9 @@ type BuyStorageBytesContract struct {
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)
}
mi := &file_core_contract_storage_contract_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *BuyStorageBytesContract) String() string {
@ -46,7 +44,7 @@ func (*BuyStorageBytesContract) ProtoMessage() {}
func (x *BuyStorageBytesContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_storage_contract_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -86,11 +84,9 @@ type BuyStorageContract struct {
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)
}
mi := &file_core_contract_storage_contract_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *BuyStorageContract) String() string {
@ -101,7 +97,7 @@ func (*BuyStorageContract) ProtoMessage() {}
func (x *BuyStorageContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_storage_contract_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -141,11 +137,9 @@ type SellStorageContract struct {
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)
}
mi := &file_core_contract_storage_contract_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *SellStorageContract) String() string {
@ -156,7 +150,7 @@ func (*SellStorageContract) ProtoMessage() {}
func (x *SellStorageContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_storage_contract_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -196,11 +190,9 @@ type UpdateBrokerageContract struct {
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)
}
mi := &file_core_contract_storage_contract_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *UpdateBrokerageContract) String() string {
@ -211,7 +203,7 @@ func (*UpdateBrokerageContract) ProtoMessage() {}
func (x *UpdateBrokerageContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_storage_contract_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -289,7 +281,7 @@ func file_core_contract_storage_contract_proto_rawDescGZIP() []byte {
}
var file_core_contract_storage_contract_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_core_contract_storage_contract_proto_goTypes = []interface{}{
var file_core_contract_storage_contract_proto_goTypes = []any{
(*BuyStorageBytesContract)(nil), // 0: protocol.BuyStorageBytesContract
(*BuyStorageContract)(nil), // 1: protocol.BuyStorageContract
(*SellStorageContract)(nil), // 2: protocol.SellStorageContract
@ -308,56 +300,6 @@ 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{

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc-gen-go v1.35.2
// protoc v5.28.0
// source: core/contract/vote_asset_contract.proto
@ -33,11 +33,9 @@ type VoteAssetContract struct {
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)
}
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 {
@ -48,7 +46,7 @@ func (*VoteAssetContract) ProtoMessage() {}
func (x *VoteAssetContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_vote_asset_contract_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -126,7 +124,7 @@ func file_core_contract_vote_asset_contract_proto_rawDescGZIP() []byte {
}
var file_core_contract_vote_asset_contract_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_core_contract_vote_asset_contract_proto_goTypes = []interface{}{
var file_core_contract_vote_asset_contract_proto_goTypes = []any{
(*VoteAssetContract)(nil), // 0: protocol.VoteAssetContract
}
var file_core_contract_vote_asset_contract_proto_depIdxs = []int32{
@ -142,20 +140,6 @@ 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{

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc-gen-go v1.35.2
// protoc v5.28.0
// source: core/contract/witness_contract.proto
@ -31,11 +31,9 @@ type WitnessCreateContract struct {
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)
}
mi := &file_core_contract_witness_contract_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *WitnessCreateContract) String() string {
@ -46,7 +44,7 @@ func (*WitnessCreateContract) ProtoMessage() {}
func (x *WitnessCreateContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_witness_contract_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -86,11 +84,9 @@ type WitnessUpdateContract struct {
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)
}
mi := &file_core_contract_witness_contract_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *WitnessUpdateContract) String() string {
@ -101,7 +97,7 @@ func (*WitnessUpdateContract) ProtoMessage() {}
func (x *WitnessUpdateContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_witness_contract_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -142,11 +138,9 @@ type VoteWitnessContract struct {
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)
}
mi := &file_core_contract_witness_contract_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *VoteWitnessContract) String() string {
@ -157,7 +151,7 @@ func (*VoteWitnessContract) ProtoMessage() {}
func (x *VoteWitnessContract) ProtoReflect() protoreflect.Message {
mi := &file_core_contract_witness_contract_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -204,11 +198,9 @@ type VoteWitnessContract_Vote struct {
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)
}
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 {
@ -219,7 +211,7 @@ 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 {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@ -299,7 +291,7 @@ func file_core_contract_witness_contract_proto_rawDescGZIP() []byte {
}
var file_core_contract_witness_contract_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_core_contract_witness_contract_proto_goTypes = []interface{}{
var file_core_contract_witness_contract_proto_goTypes = []any{
(*WitnessCreateContract)(nil), // 0: protocol.WitnessCreateContract
(*WitnessUpdateContract)(nil), // 1: protocol.WitnessUpdateContract
(*VoteWitnessContract)(nil), // 2: protocol.VoteWitnessContract
@ -319,56 +311,6 @@ 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{

6
go.mod
View File

@ -3,12 +3,18 @@ module gitea.capitan.black/public/gotron
go 1.23.1
require (
github.com/ethereum/go-ethereum v1.14.11
github.com/mr-tron/base58 v1.2.0
google.golang.org/genproto/googleapis/api v0.0.0-20241113202542-65e8d215514f
google.golang.org/grpc v1.68.0
google.golang.org/protobuf v1.35.1
)
require (
github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
github.com/holiman/uint256 v1.3.1 // indirect
golang.org/x/crypto v0.29.0 // indirect
golang.org/x/net v0.31.0 // indirect
golang.org/x/sys v0.27.0 // indirect
golang.org/x/text v0.20.0 // indirect

18
go.sum
View File

@ -1,7 +1,25 @@
github.com/btcsuite/btcd/btcec/v2 v2.3.4 h1:3EJjcN70HCu/mwqlUsGK8GcNVyLVxFDlWurTXGPFfiQ=
github.com/btcsuite/btcd/btcec/v2 v2.3.4/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04=
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U=
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0=
github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc=
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc=
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs=
github.com/ethereum/go-ethereum v1.14.11 h1:8nFDCUUE67rPc6AKxFj7JKaOa2W/W1Rse3oS6LvvxEY=
github.com/ethereum/go-ethereum v1.14.11/go.mod h1:+l/fr42Mma+xBnhefL/+z11/hcmJ2egl+ScIVPjhc7E=
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=
github.com/holiman/uint256 v1.3.1 h1:JfTzmih28bittyHM8z360dCjIA9dbPIBlcTI6lmctQs=
github.com/holiman/uint256 v1.3.1/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E=
github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o=
github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc=
golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ=
golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg=
golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo=
golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM=
golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s=

134
pkg/address/address.go Normal file
View File

@ -0,0 +1,134 @@
package address
import (
"bytes"
"crypto/ecdsa"
"crypto/sha256"
"encoding/hex"
"encoding/json"
"fmt"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/mr-tron/base58"
"strings"
)
type Address [21]byte
func (a *Address) UnmarshalJSON(bytes []byte) error {
s := ""
if err := json.Unmarshal(bytes, &s); err != nil {
return fmt.Errorf("unmarshal string: %w", err)
}
addr, err := NewFromBase58(s)
if err != nil {
return fmt.Errorf("parse address: %w", err)
}
*a = addr
return nil
}
func (a Address) String() string {
return a.Base58()
}
func (a Address) Bytes() []byte {
return a[:]
}
func (a Address) Hex() string {
return hex.EncodeToString(a[:])
}
func (a Address) Base58() string {
var tmp []byte
tmp = append(tmp, a[:]...)
hash := SHA256(SHA256(tmp))
checksum := hash[:4]
tmp = append(tmp, checksum...)
return base58.Encode(tmp)
}
func (a Address) ETH() common.Address {
return common.BytesToAddress(a[1:])
}
func NewFromETH(eth common.Address) Address {
return Address(append([]byte{65}, eth.Bytes()...))
}
func NewFromBytes(b []byte) (Address, error) {
if len(b) != 21 {
return Address{}, fmt.Errorf("tron address is not 21 bytes but %d", len(b))
}
return *(*[21]byte)(b), nil
}
func NewFromHex(s string) (Address, error) {
addrBytes, err := hex.DecodeString(s)
if err != nil {
return Address{}, err
}
return *(*[21]byte)(addrBytes), nil
}
func NewFromBase58(s string) (Address, error) {
b, err := base58.Decode(s)
if err != nil {
return Address{}, err
}
if len(b) != 25 {
return Address{}, fmt.Errorf("tron address is not 25 bytes but %d", len(b))
}
hash := SHA256(SHA256(b[:21]))
checksum := hash[:4]
if !bytes.Equal(checksum, b[21:]) {
return Address{}, fmt.Errorf("invalid checksum")
}
return *(*[21]byte)(b[:21]), nil
}
func NewFromString(s string) (Address, error) {
if strings.HasPrefix(s, "T") {
return NewFromBase58(s)
}
if strings.HasPrefix(s, "41") {
return NewFromHex(s)
}
return [21]byte{}, fmt.Errorf("%s is not a Tron address", s)
}
func NewFromKey(k *ecdsa.PrivateKey) Address {
return NewFromETH(crypto.PubkeyToAddress(k.PublicKey))
}
func NewFromKeyBytes(k []byte) (Address, error) {
key, err := crypto.ToECDSA(k)
if err != nil {
return Address{}, err
}
return NewFromKey(key), nil
}
func NewFromKeyHex(k string) (Address, error) {
keyBytes, err := hex.DecodeString(k)
if err != nil {
return Address{}, err
}
return NewFromKeyBytes(keyBytes)
}
func SHA256(s []byte) []byte {
h := sha256.New()
h.Write(s)
bs := h.Sum(nil)
return bs
}