This commit is contained in:
aozhiwei 2023-07-22 20:12:18 +08:00
parent 96df7903ab
commit 55029efca5

View File

@ -1,18 +1,30 @@
const log = require('j7/log'); const log = require('j7/log');
const bcutils = require('j7/bcutils');
const utils = require('j7/utils'); const utils = require('j7/utils');
const BaseEventProcess = require('../common/BaseEventProcess'); const BaseEventProcess = require('../common/BaseEventProcess');
const metaFactory = require('../../../metadata/factory');
class Transfer extends BaseEventProcess { class Transfer extends BaseEventProcess {
async start() { async start() {
const returnValues = this.getReturnValues(); const returnValues = this.getReturnValues();
const from = returnValues['from'];
const to = returnValues['to'];
const tokenId = returnValues['tokenId'];
await this.add721NftRefresh await this.add721NftRefresh
( (
this.getNetId(), this.getNetId(),
this.getContractAddress(), this.getContractAddress(),
this.getContractName(), this.getContractName(),
returnValues['tokenId'] tokenId
); );
if (bcutils.isSysAddress(from)) {
const airDropMeta = metaFactory.getAirDrop(tokenId);
if (airDropMeta) {
}
}
await this.markOk(); await this.markOk();
} }