1
This commit is contained in:
parent
f9d450e5cb
commit
c8278cc3c9
@ -3,9 +3,19 @@ const bcutils = require('j7/bcutils');
|
|||||||
const basewrap = require('./basewrap');
|
const basewrap = require('./basewrap');
|
||||||
const metaFactory = require('./factory');
|
const metaFactory = require('./factory');
|
||||||
|
|
||||||
|
const tokenIdHash = {};
|
||||||
|
|
||||||
class AirDrop extends basewrap.BaseWrap {
|
class AirDrop extends basewrap.BaseWrap {
|
||||||
|
|
||||||
_init0 () {
|
_init0 () {
|
||||||
|
if (utils.hasKey(tokenIdHash, this['token_id'])) {
|
||||||
|
throw 'airdrop token_id error';
|
||||||
|
}
|
||||||
|
tokenIdHash[this['token_id']] = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
static getAirDropByTokenId(tokenId) {
|
||||||
|
return utils.hasKey(tokenIdHash, tokenId) ? tokenIdHash[tokenId] : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -242,7 +242,8 @@ function getAllTables() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getAirDrop(tokenId, netId, tokenType, contractAddress) {
|
function getAirDrop(tokenId, netId, tokenType, contractAddress) {
|
||||||
|
const airDropMeta = callMetaStatic('AirDrop', tokenId);
|
||||||
|
return airDropMeta;
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.init = init;
|
exports.init = init;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user