pass id on command line for metadata query

This commit is contained in:
Moon Man 2023-01-29 22:28:42 -05:00
parent c29b0a0336
commit 9a206ffbd3
1 changed files with 3 additions and 2 deletions

View File

@ -1,11 +1,12 @@
const Wrapper = artifacts.require("CurioERC1155Wrapper");
module.exports = async (callback) => {
console.log("Start.");
const nftId = parseInt(process.argv[6]);
console.log(`Querying metadata for ID: ${nftId}`);
const wrapper = await Wrapper.deployed();
const dataURI = await wrapper.uri(1);
const dataURI = await wrapper.uri(nftId);
console.log(`Data URI: ${dataURI}`);
const data = dataURI.split(',')[1];