UNPKG

@volare.finance/volare.js

Version:
29 lines 941 B
"use strict"; /** * @file erc20.ts * @author astra <astra@volare.finance> * @date 2022 */ Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const axios_1 = tslib_1.__importDefault(require("axios")); const dotenv_1 = require("dotenv"); const erc20_1 = require("../../src/apis/erc20"); (0, dotenv_1.config)({ path: '.env', encoding: 'utf8', }); const URL = String(process.env.API_URL); (() => tslib_1.__awaiter(void 0, void 0, void 0, function* () { const instance = axios_1.default.create({ baseURL: URL, headers: { 'Content-Type': 'application/json; charset=utf-8', }, }); const erc20 = new erc20_1.ERC20(instance); const metadata = yield erc20.metadata('0xa8c00e4bb8ac43a83061475fca6505f4b71ff8e0'); console.log(JSON.stringify(metadata, undefined, 2)); yield erc20.metadata('0x'); }))(); //# sourceMappingURL=erc20.js.map