This commit is contained in:
aozhiwei 2024-06-23 13:41:43 +08:00
parent 699034aa75
commit d1d5e4847c
3 changed files with 18 additions and 7 deletions

View File

@ -17,3 +17,8 @@ func (this *goldBullion) onUnlock(dbIdx int64, netId int32, contractAddress stri
from string, to string) bool {
return true
}
func newGoldBullion() *goldBullion {
p := new(goldBullion)
return p
}

View File

@ -17,3 +17,8 @@ func (this *hero) onUnlock(dbIdx int64, netId int32, contractAddress string, tok
from string, to string) bool {
return true
}
func newHero() *hero {
p := new(hero)
return p
}

View File

@ -5,8 +5,8 @@ import (
"f5"
"time"
"fmt"
//"mt"
//"jccommon"
"mt"
"jccommon"
"main/constant"
)
@ -16,8 +16,8 @@ type SpecTransfer721 struct {
func (this* SpecTransfer721) Init() {
this.handleHash = new(q5.ConcurrentMap[string, specTransfer721Handle])
//this.handleHash.Store(jccommon.CONTRACT_NAME_CFHero, this.procHero)
//this.handleHash.Store(jccommon.CONTRACT_NAME_GoldBrick, this.procGoldBullion)
this.handleHash.Store(jccommon.CONTRACT_NAME_CFHero, newHero())
this.handleHash.Store(jccommon.CONTRACT_NAME_GoldBrick, newGoldBullion())
go this.process()
}
@ -46,7 +46,6 @@ SELECT * FROM t_721nft_spec_transfer WHERE idx > %d AND status = 0 AND createtim
return time.Second * 60 * 1
},
func (ds *f5.DataSet) bool {
/*
idx := q5.ToInt64(ds.GetByName("idx"))
netId := q5.ToInt32(ds.GetByName("net_id"))
contractAddress := ds.GetByName("contract_address")
@ -56,9 +55,11 @@ SELECT * FROM t_721nft_spec_transfer WHERE idx > %d AND status = 0 AND createtim
contractMeta := mt.Table.Contract.GetByNetIdAddress(netId, contractAddress)
if contractMeta != nil {
if p, ok := this.handleHash.Load(contractMeta.GetName()); ok {
return (*p)(idx, netId, contractAddress, tokenId, fromAddress, toAddress)
if q5.IsWeb3ZeroAddress(fromAddress) {
(*p).onMint(idx, netId, contractAddress, tokenId, fromAddress, toAddress)
}
}
}
}*/
return true
})
}