becrypto/init_scripts/generate_presale_20221122.js
2023-01-05 17:35:33 +08:00

122 lines
3.2 KiB
JavaScript

const Box = artifacts.require("tokens/erc721/BEPresaleBox");
const config = require("../config/config");
module.exports = async function main(callback) {
try {
const boxInstance = await Box.deployed();
console.log(boxInstance.address);
let datas = [
{
account: "0xAd28E32C56006d273941208B00c1498bd7e0Dd18",
id: "6025896162100001",
type: "2",
},
{
account: "0x1040Afa5767F19f3D07A1fC12D9362c773977ee8",
id: "6025896162100002",
type: "302",
},
{
account: "0x96E38c261d0a95B70E56B52813d0C6e4eF3f998e",
id: "6025896162100003",
type: "302",
},
{
account: "0x78Ecc748f04c31347D7A6D8eBF47b4ebBBf3C5bB",
id: "6025896162100004",
type: "302",
},
{
account: "0x5f47e37f7FE74F92de5Df15B3b61F0ef3053eAd4",
id: "6025896162100005",
type: "302",
},
{
account: "0x831c09ed701b4BB35C0e1731C80A08B60DD7eB74",
id: "6025896162100006",
type: "302",
},
{
account: "0xA450cC0A298d99C2794b2F26b9f8e4302a8fE5e1",
id: "6025896162100007",
type: "302",
},
{
account: "0x11B335147a20aa142f210726abE13f30CF3B1163",
id: "6025896162100008",
type: "2",
},
{
account: "0x848b613Ab4Af039c1337627570ac77ff92be21ed",
id: "6025896162100009",
type: "2",
},
{
account: "0xCF453BA83FeBA2ed9f578F501Ca4dCeA00dEa60a",
id: "6025896162100010",
type: "2",
},
{
account: "0x13470aB63700D8d1f7e1D948598d5d9cFEb297ba",
id: "6025896162100011",
type: "2",
},
{
account: "0xf9118D63abE20D804f99cFd89F11f91D88b306B8",
id: "6025896162100012",
type: "2",
},
{
account: "0x63Fc8126e04CecAabDa22DD72CF895E77F9656C6",
id: "6025896162100013",
type: "2",
},
{
account: "0x88f1B2d114d5730e246abFFA467dEf7fC7EEA649",
id: "6025896162100014",
type: "302",
},
{
account: "0x22dcB6342Ef319A4d8B92B19fb280A0983940c7b",
id: "6025896162100015",
type: "302",
},
{
account: "0xd4141256C701562540E85742eCF8A9BA14D5EA7F",
id: "6025896162100016",
type: "2",
},
{
account: "0xff674AEe650a766fb2248C2e950c1129DBB2830E",
id: "6025896162100017",
type: "2",
},
{
account: "0x98777FCaF767AEABC055B49ca9561CCB051E131B",
id: "6025896162100018",
type: "302",
},
];
let errorList = [];
for (let i = 0, l = datas.length; i < l; i++) {
let { account, id, type } = datas[i];
try {
await boxInstance.mintBox(account, id, type);
console.log(
`success mint NFTID: ${id}, type: ${type} address: ${account}`
);
} catch (err) {
console.log(
`error mint NFTID: ${id}, type: ${type} address: ${account}`
);
errorList.push({ account, id, type });
}
}
console.dir(errorList);
callback(0);
} catch (err) {
console.log(err);
callback(1);
}
};