This commit is contained in:
aozhiwei 2023-08-30 16:46:10 +08:00
parent 2392c44402
commit c416d1b7c2
2 changed files with 12 additions and 1 deletions

View File

@ -17,13 +17,19 @@ class Redeem721 extends BaseEventProcess {
async start() {
const returnValues = this.getReturnValues();
const blockData = this.getBlockData();
const redeemTime = blockData['timestamp'];
if (redeemTime) {
this.throwError('Redeem721 blockData error:' + blockData);
return;
}
const params = {
'c': 'Callback',
'a': 'dispatch',
'action': 'redeem721',
'data': utils.jsonEncode(returnValues),
'redeem_time': utils.getUtcTime(),
'redeem_time': redeemTime,
'txhash': this.getTxHash(),
'net_id': this.getNetId()
};

View File

@ -19,6 +19,7 @@ class BaseEventProcess {
this.eventProc = proc;
this.eventDb = eventDb;
this.returnValues = utils.jsonDecode(this.getEventDb()['return_values']);
this.blockData = utils.jsonDecode(this.getEventDb()['block_data']);
this.txHash = this.getEventDb()['txhash'];
this.bcEventConn = null;
this.bcNftConn = null;
@ -76,6 +77,10 @@ class BaseEventProcess {
return this.returnValues;
}
getBlockData() {
return this.blockData;
}
getTxHash() {
return this.txHash;
}