pass id on command line for metadata query
This commit is contained in:
parent
c29b0a0336
commit
9a206ffbd3
|
@ -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];
|
||||
|
|
Loading…
Reference in New Issue