Добавил прогресс бар и вывел id в cli args

This commit is contained in:
2022-01-23 02:22:11 +03:00
parent 7f4c9bcd79
commit 55905704a6
5 changed files with 58 additions and 9 deletions

View File

@@ -4,11 +4,13 @@ dotenv.config();
import Rareterm from 'rareterm.node';
import getImages from './getImages.js';
const entity = process.argv[2];
(async () => {
const rarepress = new Rareterm();
await rarepress.init({ host: "https://rinkeby-beta.rarepress.org/v1" });
(await getImages(-1)).forEach(async (image, index) => {
(await getImages(entity)).forEach(async (image, index) => {
const cid = await rarepress.fs.add(Buffer.from(image));
const token = await rarepress.token.create({
type: "ERC721",