bug fix: 修正founder tag数据可claim数据结构错误的bug

This commit is contained in:
CounterFire2023 2024-09-09 10:31:57 +08:00
parent 2a3c5dae0b
commit 8595bc0e47

View File

@ -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)
}