better output

This commit is contained in:
Moon Man 2023-01-30 13:44:41 -05:00
parent 4b4922e40b
commit c2b3b04df7
1 changed files with 5 additions and 2 deletions

View File

@ -8,8 +8,11 @@ module.exports = async (callback) => {
console.log(`Name: "${name}", symbol: "${symbol}"`);
const royaltyInfo = await wrapper.royaltyInfo(1, "10000000000");
console.log(JSON.stringify(royaltyInfo, null, 4));
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}`);
callback();
}