This commit is contained in:
aozhiwei 2023-07-11 17:42:54 +08:00
parent 27880bebce
commit b145a8d2d3
3 changed files with 13 additions and 2 deletions

View File

@ -136,6 +136,10 @@ class DbEventProcess extends BaseService {
return this.eventConf['contract_name'];
}
getContractAddressByName(name) {
return this.net['getContractAddressByName'](name);
}
getInstanceName() {
const instName = this.getNetId() + ' ' + this.getContractName() + '.' + this.getEventName() + ' dbprocess';
return instName;

View File

@ -59,9 +59,13 @@ class Activate721Nft extends BaseEventProcess {
this.throwError('error transId:2');
return;
}
const contractAddress = this.getContractAddressByName();
if (!contractAddress) {
this.throwError('error error contractAddress transId:' + transId);
return;
}
await this.updateGameDbInfo(transId, itemUniId, itemId, tokenId, tokenType);
const nowTime = utils.getUtcTime();
const contractAddress = this.getContractAddress();
const fieldList = [
['token_id', tokenId],
['token_type', tokenType],
@ -86,7 +90,6 @@ class Activate721Nft extends BaseEventProcess {
],
fieldList
);
console.log(this.getNetId(), this.getContractAddress());
if (err) {
this.throwError('mintNft transId:' + transId);
}

View File

@ -62,6 +62,10 @@ class BaseEventProcess {
return this.eventProc.getContractName();
}
getContractAddressByName(name) {
return this.eventProc.getContractName(name);
}
getReturnValues() {
return this.returnValues;
}