This commit is contained in:
aozhiwei 2024-09-04 17:11:38 +08:00
parent dd23217085
commit 1ce08003bb
7 changed files with 57 additions and 15 deletions

View File

@ -128,6 +128,16 @@ type Item struct {
_flags2_ uint64
}
type Erc20 struct {
net_id int32
rpc_url string
account_address string
token_address string
_flags1_ uint64
_flags2_ uint64
}
func (this *AdminCluster) GetInstanceId() int32 {
return this.instance_id
}
@ -592,6 +602,38 @@ func (this *Item) HasSubType() bool {
return (this._flags1_ & (uint64(1) << 4)) > 0
}
func (this *Erc20) GetNetId() int32 {
return this.net_id
}
func (this *Erc20) HasNetId() bool {
return (this._flags1_ & (uint64(1) << 2)) > 0
}
func (this *Erc20) GetRpcUrl() string {
return this.rpc_url
}
func (this *Erc20) HasRpcUrl() bool {
return (this._flags1_ & (uint64(1) << 3)) > 0
}
func (this *Erc20) GetAccountAddress() string {
return this.account_address
}
func (this *Erc20) HasAccountAddress() bool {
return (this._flags1_ & (uint64(1) << 4)) > 0
}
func (this *Erc20) GetTokenAddress() string {
return this.token_address
}
func (this *Erc20) HasTokenAddress() bool {
return (this._flags1_ & (uint64(1) << 5)) > 0
}
func (this *AdminCluster) LoadFromKv(kv map[string]interface{}) {
f5.ReadMetaTableField(&this.instance_id, "instance_id", &this._flags1_, 1, kv)
@ -683,3 +725,10 @@ func (this *Item) LoadFromKv(kv map[string]interface{}) {
f5.ReadMetaTableField(&this.type_, "type", &this._flags1_, 3, kv)
f5.ReadMetaTableField(&this.sub_type, "sub_type", &this._flags1_, 4, kv)
}
func (this *Erc20) LoadFromKv(kv map[string]interface{}) {
f5.ReadMetaTableField(&this.net_id, "net_id", &this._flags1_, 2, kv)
f5.ReadMetaTableField(&this.rpc_url, "rpc_url", &this._flags1_, 3, kv)
f5.ReadMetaTableField(&this.account_address, "account_address", &this._flags1_, 4, kv)
f5.ReadMetaTableField(&this.token_address, "token_address", &this._flags1_, 5, kv)
}

View File

@ -1,3 +0,0 @@
syntax = "proto2";
package cs;
option go_package = ".;cs";

View File

@ -1,3 +0,0 @@
syntax = "proto2";
package cs;
option go_package = ".;cs";

View File

@ -103,3 +103,11 @@ message Item
optional int32 type = 3;
optional int32 sub_type = 4;
}
message Erc20
{
optional int32 net_id = 2;
optional string rpc_url = 3;
optional string account_address = 4;
optional string token_address = 5;
}

View File

@ -1,2 +0,0 @@
protoc --go_out=..\cs .\cs_*.proto
protoc --go_out=..\ss .\ss_*.proto

View File

@ -1,3 +0,0 @@
syntax = "proto2";
package ss;
option go_package = ".;ss";

View File

@ -1,4 +0,0 @@
syntax = "proto2";
package ss;
option go_package = ".;ss";