Skip to content

Commit 92b677c

Browse files
committed
feat(cli): npx witwrap supplies --signer
1 parent 694ea73 commit 92b677c

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@witnet/wrapped-wit",
3-
"version": "1.3.4",
3+
"version": "1.3.5",
44
"author": "Witnet Foundation <info@witnet.foundation>",
55
"description": "Wrapped/WIT Solidity contracts and CLI tools",
66
"license": "MIT",

src/bin/cli/index.cjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ async function main () {
145145
options: [
146146
"limit",
147147
"since",
148+
"signer",
148149
],
149150
envars: [
150151
...(WrappedWIT.isNetworkCanonical(ethRpcNetwork)
@@ -518,7 +519,7 @@ async function contract (flags = {}) {
518519
}
519520

520521
async function supplies (flags = {}) {
521-
let { network, provider, force, from, gasPrice, confirmations, verbose, limit, since } = flags
522+
let { network, provider, force, from, gasPrice, confirmations, verbose, limit, since, signer } = flags
522523
let contract = await WrappedWIT.fetchContractFromEthersProvider(provider)
523524

524525
const records = []
@@ -595,7 +596,7 @@ async function supplies (flags = {}) {
595596

596597
// create Witnet Wallet
597598
const wallet = await _loadWitnetWalletFromEnv({ provider: witnet, strategy: "slim-fit" })
598-
const ledger = (utils.totalCoins(await wallet.getBalance()).nanowits === 0) ? wallet.coinbase : wallet
599+
const ledger = signer ? wallet.getSigner(signer) : wallet
599600

600601
// fetch proof-of-reserve radon bytecode from the token contract
601602
const bytecode = await contract.witOracleProofOfReserveRadonBytecode()

0 commit comments

Comments
 (0)