diff --git a/src/importCEC.ts b/src/importCEC.ts index 1a6c78b..810ed4f 100644 --- a/src/importCEC.ts +++ b/src/importCEC.ts @@ -150,12 +150,50 @@ const loadLoyalty = async () => { console.timeEnd('loyalty') } +const loadTagHolder = async () => { + console.time('load founder tag test') + let datas = fs.readFileSync('initdatas/cec_tag_holer.txt', 'utf-8').split('\n') + console.timeEnd('load founder tag test') + console.time('insert founder tag test') + let actionsUaw = [] + const descUaw = "Founder's Tag Airdrop Rewards" + const timeUaw = 'Wed, 28 Aug 2024' + for (let data of datas) { + if (!data) { + continue + } + let [address, amount] = data.split(' ') + address = address.toLowerCase() + amount = ethers.utils.parseEther(amount).toString() + actionsUaw.push({ + insertOne: { + document: { + address, + amount, + desc: descUaw, + earnTime: timeUaw, + status: 1, + firstRate: 100, + bit: 19, + claimStatus: {'1': {bit: 19, rate: 100, status: 1, time: 0}}, + createdAt: new Date(), + updatedAt: new Date(), + __v: 0.0, + }, + }, + }) + } + await dbMain.collection('cec_record_total').bulkWrite(actionsUaw) + console.timeEnd('insert founder tag test') +} + ;(async () => { try { // await loadUaw() // await loadIngame() // await loadGameTest1() - await loadLoyalty() + // await loadLoyalty() + await loadTagHolder() } catch (e) { console.log(e) }