1
This commit is contained in:
parent
27880bebce
commit
b145a8d2d3
@ -136,6 +136,10 @@ class DbEventProcess extends BaseService {
|
|||||||
return this.eventConf['contract_name'];
|
return this.eventConf['contract_name'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getContractAddressByName(name) {
|
||||||
|
return this.net['getContractAddressByName'](name);
|
||||||
|
}
|
||||||
|
|
||||||
getInstanceName() {
|
getInstanceName() {
|
||||||
const instName = this.getNetId() + ' ' + this.getContractName() + '.' + this.getEventName() + ' dbprocess';
|
const instName = this.getNetId() + ' ' + this.getContractName() + '.' + this.getEventName() + ' dbprocess';
|
||||||
return instName;
|
return instName;
|
||||||
|
@ -59,9 +59,13 @@ class Activate721Nft extends BaseEventProcess {
|
|||||||
this.throwError('error transId:2');
|
this.throwError('error transId:2');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const contractAddress = this.getContractAddressByName();
|
||||||
|
if (!contractAddress) {
|
||||||
|
this.throwError('error error contractAddress transId:' + transId);
|
||||||
|
return;
|
||||||
|
}
|
||||||
await this.updateGameDbInfo(transId, itemUniId, itemId, tokenId, tokenType);
|
await this.updateGameDbInfo(transId, itemUniId, itemId, tokenId, tokenType);
|
||||||
const nowTime = utils.getUtcTime();
|
const nowTime = utils.getUtcTime();
|
||||||
const contractAddress = this.getContractAddress();
|
|
||||||
const fieldList = [
|
const fieldList = [
|
||||||
['token_id', tokenId],
|
['token_id', tokenId],
|
||||||
['token_type', tokenType],
|
['token_type', tokenType],
|
||||||
@ -86,7 +90,6 @@ class Activate721Nft extends BaseEventProcess {
|
|||||||
],
|
],
|
||||||
fieldList
|
fieldList
|
||||||
);
|
);
|
||||||
console.log(this.getNetId(), this.getContractAddress());
|
|
||||||
if (err) {
|
if (err) {
|
||||||
this.throwError('mintNft transId:' + transId);
|
this.throwError('mintNft transId:' + transId);
|
||||||
}
|
}
|
||||||
|
@ -62,6 +62,10 @@ class BaseEventProcess {
|
|||||||
return this.eventProc.getContractName();
|
return this.eventProc.getContractName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getContractAddressByName(name) {
|
||||||
|
return this.eventProc.getContractName(name);
|
||||||
|
}
|
||||||
|
|
||||||
getReturnValues() {
|
getReturnValues() {
|
||||||
return this.returnValues;
|
return this.returnValues;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user