This commit is contained in:
aozhiwei 2024-07-23 19:34:57 +08:00
parent 6c56a720c5
commit 999b4652f4

View File

@ -119,11 +119,15 @@ func (this* chainActivity) saveToDb(ds *f5.DataSet) bool {
}
} else if eventName == "UnLock" {
p := new(unLockReturnValues)
sender := q5.SafeToString(p.User)
if q5.DecodeJson(returnValues, p) == nil {
for _, nft := range p.NftList {
tokenId := q5.SafeToString(nft[0])
sender := q5.SafeToString(nft[1])
to := q5.SafeToString(nft[1])
isMint := 0
if nft[2].(bool) {
isMint = 1
}
f5.GetGoStyleDb().Upsert(
constant.BCEVENT_DB,
"t_chain_activity",
@ -148,6 +152,7 @@ func (this* chainActivity) saveToDb(ds *f5.DataSet) bool {
{"src_idx", idx},
{"sender_address", strings.ToLower(sender)},
{"to_address", strings.ToLower(to)},
{"is_mint", q5.ToString(isMint)},
{"createtime", createTime},
{"modifytime", modifyTime},
},