curio-wrapper-truffle/scripts/contract-info.js

19 lines
579 B
JavaScript
Raw Normal View History

2023-01-30 17:47:43 +00:00
const Wrapper = artifacts.require("CurioERC1155Wrapper");
module.exports = async (callback) => {
const wrapper = await Wrapper.deployed();
const name = await wrapper.name();
const symbol = await wrapper.symbol();
console.log(`Name: "${name}", symbol: "${symbol}"`);
2023-01-30 18:44:41 +00:00
const { 0:receiver, 1:hexAmount} = await wrapper.royaltyInfo(1, "1000000000000000000");
console.log(`Default royalty recipient: ${receiver}`);
const ubiqAmount = web3.utils.fromWei(hexAmount, "ether");
console.log(`Royalty on a 1 Ubiq fee: ${ubiqAmount}`);
2023-01-30 17:47:43 +00:00
callback();
}