1
This commit is contained in:
parent
d1d5e4847c
commit
d5c012c201
@ -45,21 +45,30 @@ SELECT * FROM t_721nft_spec_transfer WHERE idx > %d AND status = 0 AND createtim
|
||||
func () time.Duration {
|
||||
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")
|
||||
tokenId := ds.GetByName("token_id")
|
||||
fromAddress := ds.GetByName("from_address")
|
||||
toAddress := ds.GetByName("toaddress")
|
||||
contractMeta := mt.Table.Contract.GetByNetIdAddress(netId, contractAddress)
|
||||
if contractMeta != nil {
|
||||
if p, ok := this.handleHash.Load(contractMeta.GetName()); ok {
|
||||
if q5.IsWeb3ZeroAddress(fromAddress) {
|
||||
(*p).onMint(idx, netId, contractAddress, tokenId, fromAddress, toAddress)
|
||||
}
|
||||
this.dispatch)
|
||||
}
|
||||
|
||||
func (this* SpecTransfer721) dispatch(ds *f5.DataSet) bool {
|
||||
idx := q5.ToInt64(ds.GetByName("idx"))
|
||||
netId := q5.ToInt32(ds.GetByName("net_id"))
|
||||
contractAddress := ds.GetByName("contract_address")
|
||||
tokenId := ds.GetByName("token_id")
|
||||
fromAddress := ds.GetByName("from_address")
|
||||
toAddress := ds.GetByName("toaddress")
|
||||
contractMeta := mt.Table.Contract.GetByNetIdAddress(netId, contractAddress)
|
||||
nftLockMeta := mt.Table.Contract.GetByNetIdName(netId, jccommon.CONTRACT_NAME_NFTLock)
|
||||
if contractMeta != nil {
|
||||
if p, ok := this.handleHash.Load(contractMeta.GetName()); ok {
|
||||
if q5.IsWeb3ZeroAddress(fromAddress) {
|
||||
return (*p).onMint(idx, netId, contractAddress, tokenId, fromAddress, toAddress)
|
||||
} else if nftLockMeta != nil {
|
||||
if toAddress == nftLockMeta.GetAddress() {
|
||||
return (*p).onLock(idx, netId, contractAddress, tokenId, fromAddress, toAddress)
|
||||
} else if fromAddress == nftLockMeta.GetAddress() {
|
||||
return (*p).onUnlock(idx, netId, contractAddress, tokenId, fromAddress, toAddress)
|
||||
}
|
||||
}
|
||||
return true
|
||||
})
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
@ -28,4 +28,5 @@ const (
|
||||
const (
|
||||
CONTRACT_NAME_CFHero = "CFHero"
|
||||
CONTRACT_NAME_GoldBrick = "GoldBrick"
|
||||
CONTRACT_NAME_NFTLock = "NFTLock"
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user