1
This commit is contained in:
parent
120fea95b6
commit
5484ba53b2
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,7 @@
|
||||
const fs = require('fs');
|
||||
const app = require('j7/app');
|
||||
const utils = require('j7/utils');
|
||||
const bcutils = require('j7/bcutils');
|
||||
const event = require('j7/event');
|
||||
const config = require('j7/config');
|
||||
const bchelper = require('common/bchelper');
|
||||
@ -28,10 +29,19 @@ function jsonToCsv(fileName, data, fields) {
|
||||
|
||||
const airDropDate = utils.getArgv('f');
|
||||
const json = utils.readJsonFromFile
|
||||
(`../bin_dev/web3dbspider/config/airdrops/${airDropDate}.airdop.json`);
|
||||
(`../bin_dev/web3tools/config/airdrops/${airDropDate}.airdrop@${airDropDate}.airdrop.json`);
|
||||
let seqId = 1;
|
||||
json.forEach(
|
||||
(item) => {
|
||||
item['address'] = bcutils.toNormalAddress(item['address']);
|
||||
if (!bcutils.isValidAddress(item['address'])) {
|
||||
console.log(item);
|
||||
throw new Error('error address');
|
||||
}
|
||||
item['type'] = 'hero';
|
||||
item['item_id'] = 1;
|
||||
item['level'] = 1;
|
||||
item['quality'] = 1;
|
||||
item['token_id'] = bchelper.genAirDropTokenId(airDropDate, utils.pad(seqId, 7));
|
||||
++seqId;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user