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 {
|
func () time.Duration {
|
||||||
return time.Second * 60 * 1
|
return time.Second * 60 * 1
|
||||||
},
|
},
|
||||||
func (ds *f5.DataSet) bool {
|
this.dispatch)
|
||||||
idx := q5.ToInt64(ds.GetByName("idx"))
|
}
|
||||||
netId := q5.ToInt32(ds.GetByName("net_id"))
|
|
||||||
contractAddress := ds.GetByName("contract_address")
|
func (this* SpecTransfer721) dispatch(ds *f5.DataSet) bool {
|
||||||
tokenId := ds.GetByName("token_id")
|
idx := q5.ToInt64(ds.GetByName("idx"))
|
||||||
fromAddress := ds.GetByName("from_address")
|
netId := q5.ToInt32(ds.GetByName("net_id"))
|
||||||
toAddress := ds.GetByName("toaddress")
|
contractAddress := ds.GetByName("contract_address")
|
||||||
contractMeta := mt.Table.Contract.GetByNetIdAddress(netId, contractAddress)
|
tokenId := ds.GetByName("token_id")
|
||||||
if contractMeta != nil {
|
fromAddress := ds.GetByName("from_address")
|
||||||
if p, ok := this.handleHash.Load(contractMeta.GetName()); ok {
|
toAddress := ds.GetByName("toaddress")
|
||||||
if q5.IsWeb3ZeroAddress(fromAddress) {
|
contractMeta := mt.Table.Contract.GetByNetIdAddress(netId, contractAddress)
|
||||||
(*p).onMint(idx, netId, contractAddress, tokenId, fromAddress, toAddress)
|
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 (
|
const (
|
||||||
CONTRACT_NAME_CFHero = "CFHero"
|
CONTRACT_NAME_CFHero = "CFHero"
|
||||||
CONTRACT_NAME_GoldBrick = "GoldBrick"
|
CONTRACT_NAME_GoldBrick = "GoldBrick"
|
||||||
|
CONTRACT_NAME_NFTLock = "NFTLock"
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user