This commit is contained in:
aozhiwei 2024-07-20 20:23:46 +08:00
parent abdb4cd477
commit d014209b8d
3 changed files with 18 additions and 5 deletions

View File

@ -1,3 +0,0 @@
[
13473
]

View File

@ -0,0 +1 @@
../../backtask/config/nets.json

View File

@ -1 +0,0 @@
../../../../../third_party/contracts-imtbl/out/imtbl_test_dev.json

View File

@ -3,6 +3,7 @@ package task
import (
"q5"
"f5"
"mt"
"jccommon"
"main/constant"
"time"
@ -10,10 +11,25 @@ import (
)
type contribution struct {
lockMetas []*mt.Contract
}
func (this* contribution) init() {
this.lockMetas = []*mt.Contract{}
mt.Table.Contract.Traverse(func (ele *mt.Contract) bool {
if ele.GetName() == jccommon.CONTRACT_NAME_NFTLock {
q5.AppendSlice(&this.lockMetas, ele)
f5.GetSysLog().Info("task.contribution.init load lockMetas net_id:%d name:%s contract_address:%s",
ele.GetNetId(),
ele.GetName(),
ele.GetAddress())
}
return true
})
if len(this.lockMetas) <= 0 {
panic("task.contribution.init lockMetas is empty")
return
}
go this.calc()
}