From c2b3b04df7e22a8d9782fb058409ed3b00dc5d9b Mon Sep 17 00:00:00 2001 From: Moon Date: Mon, 30 Jan 2023 13:44:41 -0500 Subject: [PATCH] better output --- scripts/contract-info.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/contract-info.js b/scripts/contract-info.js index c16356f..0637a52 100644 --- a/scripts/contract-info.js +++ b/scripts/contract-info.js @@ -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(); }