"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const path_1 = __importDefault(require("path"));
const asa_1 = require("./importers/asa");
const cardanoNative_1 = require("./importers/cardanoNative");
const eip712_1 = require("./importers/eip712");
const esdt_1 = require("./importers/esdt");
const evm_1 = require("./importers/evm");
const filecoin_1 = require("./importers/filecoin");
const spl_1 = require("./importers/spl");
const stellar_1 = require("./importers/stellar");
const ton_1 = require("./importers/ton");
const trc10_1 = require("./importers/trc10");
const trc20_1 = require("./importers/trc20");
const vip180_1 = require("./importers/vip180");
const apt_1 = require("./importers/apt");
const bep20_1 = require("./exchange/bep20");
const coins_1 = require("./exchange/coins");
const erc20_1 = require("./exchange/erc20");
const polygon_erc20_1 = require("./exchange/polygon-erc20");
const trc20_2 = require("./exchange/trc20");
const outputFolder = path_1.default.join(__dirname, "../data");
const importTokens = async () => {
    const promises = [
        (0, eip712_1.importEIP712)(outputFolder),
        (0, eip712_1.importEIP712v2)(outputFolder),
        (0, evm_1.importEVMTokens)(outputFolder),
        (0, asa_1.importAsaTokens)(outputFolder),
        (0, cardanoNative_1.importCardanoNativeTokens)(outputFolder),
        (0, esdt_1.importESDTTokens)(outputFolder),
        (0, spl_1.importSPLTokens)(outputFolder),
        (0, stellar_1.importStellarTokens)(outputFolder),
        (0, trc10_1.importTRC10Tokens)(outputFolder),
        (0, trc20_1.importTRC20Tokens)(outputFolder),
        (0, filecoin_1.importFilecoinERC20Tokens)(outputFolder),
        (0, ton_1.importTonJettonTokens)(outputFolder),
        (0, vip180_1.importVip180Tokens)(outputFolder),
        (0, apt_1.importAptosTokens)(outputFolder, "coin"),
        (0, apt_1.importAptosTokens)(outputFolder, "fungible_asset"),
    ];
    await Promise.allSettled(promises);
};
const importExchangeTokens = async () => {
    const promises = [
        (0, bep20_1.importBEP20Exchange)(outputFolder),
        (0, erc20_1.importERC20Exchange)(outputFolder),
        (0, polygon_erc20_1.importPolygonERC20Exchange)(outputFolder),
        (0, coins_1.importCoinsExchange)(outputFolder),
        (0, trc20_2.importTRC20Exchange)(outputFolder),
    ];
    await Promise.allSettled(promises);
};
const main = async () => {
    console.log("Starting importing cryptoassets from CDN...");
    await importTokens();
    await importExchangeTokens();
    console.log("Import of cryptoassets finished successfully");
};
main();
//# sourceMappingURL=index.js.map