query metadata script
This commit is contained in:
parent
c4d1ab0b7f
commit
c29b0a0336
|
@ -0,0 +1,17 @@
|
||||||
|
const Wrapper = artifacts.require("CurioERC1155Wrapper");
|
||||||
|
|
||||||
|
module.exports = async (callback) => {
|
||||||
|
console.log("Start.");
|
||||||
|
|
||||||
|
const wrapper = await Wrapper.deployed();
|
||||||
|
|
||||||
|
const dataURI = await wrapper.uri(1);
|
||||||
|
console.log(`Data URI: ${dataURI}`);
|
||||||
|
|
||||||
|
const data = dataURI.split(',')[1];
|
||||||
|
const raw = Buffer.from(data, "base64").toString("utf8");
|
||||||
|
console.log(JSON.stringify(JSON.parse(raw), null, 4));
|
||||||
|
|
||||||
|
console.log("Done.");
|
||||||
|
callback();
|
||||||
|
}
|
Loading…
Reference in New Issue