1
This commit is contained in:
parent
3c3311dfc2
commit
343118e2ef
@ -70,7 +70,6 @@ type Config struct {
|
||||
net_id int32
|
||||
immutable_base_url string
|
||||
chain_name string
|
||||
hero_contract_address string
|
||||
immutable_api_key string
|
||||
|
||||
_flags1_ uint64
|
||||
@ -405,14 +404,6 @@ func (this *Config) HasChainName() bool {
|
||||
return (this._flags1_ & (uint64(1) << 4)) > 0
|
||||
}
|
||||
|
||||
func (this *Config) GetHeroContractAddress() string {
|
||||
return this.hero_contract_address
|
||||
}
|
||||
|
||||
func (this *Config) HasHeroContractAddress() bool {
|
||||
return (this._flags1_ & (uint64(1) << 5)) > 0
|
||||
}
|
||||
|
||||
func (this *Config) GetImmutableApiKey() string {
|
||||
return this.immutable_api_key
|
||||
}
|
||||
@ -617,7 +608,6 @@ func (this *Config) LoadFromKv(kv map[string]interface{}) {
|
||||
f5.ReadMetaTableField(&this.net_id, "net_id", &this._flags1_, 2, kv)
|
||||
f5.ReadMetaTableField(&this.immutable_base_url, "immutable_base_url", &this._flags1_, 3, kv)
|
||||
f5.ReadMetaTableField(&this.chain_name, "chain_name", &this._flags1_, 4, kv)
|
||||
f5.ReadMetaTableField(&this.hero_contract_address, "hero_contract_address", &this._flags1_, 5, kv)
|
||||
f5.ReadMetaTableField(&this.immutable_api_key, "immutable_api_key", &this._flags1_, 6, kv)
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,6 @@ message Config
|
||||
optional int32 net_id = 2;
|
||||
optional string immutable_base_url = 3;
|
||||
optional string chain_name = 4;
|
||||
optional string hero_contract_address = 5;
|
||||
optional string immutable_api_key = 6;
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,8 @@ func (this* refreshMeta) process() {
|
||||
},
|
||||
func (lastIdx int64) string {
|
||||
sql := fmt.Sprintf(`
|
||||
SELECT * FROM t_nft WHERE idx > %d AND last_refresh_meta_time = 0 LIMIT 200`,
|
||||
SELECT * FROM t_nft WHERE idx > %d AND net_id = %d AND last_refresh_meta_time = 0 ORDER BY idx LIMIT 200`,
|
||||
mt.Table.Config.GetById(0).GetNetId(),
|
||||
lastIdx,
|
||||
)
|
||||
return sql
|
||||
@ -151,7 +152,7 @@ func (this* refreshMeta) doRefresh() {
|
||||
url := fmt.Sprintf("%s/v1/chains/%s/collections/%s/nfts/refresh-metadata",
|
||||
mt.Table.Config.GetById(0).GetImmutableBaseUrl(),
|
||||
mt.Table.Config.GetById(0).GetChainName(),
|
||||
mt.Table.Config.GetById(0).GetHeroContractAddress())
|
||||
"") //mt.Table.Config.GetById(0).GetHeroContractAddress())
|
||||
data.NftMetaData = nftMetas
|
||||
req, _ := http.NewRequest("POST",
|
||||
url,
|
||||
|
Loading…
x
Reference in New Issue
Block a user