From e72cf97a6e8714f2b27fd8a0a93d0840fe7dc7a9 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Tue, 11 Jun 2024 03:06:26 -0700 Subject: [PATCH] add message to sign on ledger (#2) --- commands/release-rewards.js | 1 + commands/set-min-balance-for-transfer.js | 1 + commands/set-next-round-length.js | 1 + commands/set-round-reward.js | 1 + commands/tick.js | 1 + 5 files changed, 5 insertions(+) diff --git a/commands/release-rewards.js b/commands/release-rewards.js index daca38f..39bfbb5 100644 --- a/commands/release-rewards.js +++ b/commands/release-rewards.js @@ -4,6 +4,7 @@ import { fileURLToPath } from 'node:url' export const releaseRewards = async opts => { const { contractWithSigner } = await createContract(opts) + console.error('Please sign on your ledger...') const tx = await contractWithSigner.releaseRewards() console.log(tx.hash) console.log('Awaiting confirmation...') diff --git a/commands/set-min-balance-for-transfer.js b/commands/set-min-balance-for-transfer.js index ca3ef69..284566b 100644 --- a/commands/set-min-balance-for-transfer.js +++ b/commands/set-min-balance-for-transfer.js @@ -6,6 +6,7 @@ export const setMinBalanceForTransfer = async ({ minBalance, ...opts }) => { console.log(`setting min balance for transfer to ${ethers.formatEther(minBalance)} FIL`) console.log(`current value: ${ethers.formatEther(await contract.minBalanceForTransfer())} FIL`) + console.error('Please sign on your ledger...') const tx = await contractWithSigner.setMinBalanceForTransfer(minBalance) console.log(tx.hash) } diff --git a/commands/set-next-round-length.js b/commands/set-next-round-length.js index 0bfbb3c..4aaf5a2 100644 --- a/commands/set-next-round-length.js +++ b/commands/set-next-round-length.js @@ -5,6 +5,7 @@ export const setNextRoundLength = async ({ blocks, ...opts }) => { console.log(`setting next round length to ${blocks} blocks`) console.log(`current value: ${await contract.nextRoundLength()} blocks`) + console.error('Please sign on your ledger...') const tx = await contractWithSigner.setNextRoundLength(blocks) console.log(tx.hash) console.log('Awaiting confirmation...') diff --git a/commands/set-round-reward.js b/commands/set-round-reward.js index fe534eb..c9500a9 100644 --- a/commands/set-round-reward.js +++ b/commands/set-round-reward.js @@ -6,6 +6,7 @@ export const setRoundReward = async ({ reward, ...opts }) => { console.log(`setting round reward to ${ethers.formatEther(reward)} FIL`) console.log(`current value: ${ethers.formatEther(await contract.roundReward())} FIL`) + console.error('Please sign on your ledger...') const tx = await contractWithSigner.setRoundReward(reward) console.log(tx.hash) console.log('Awaiting confirmation...') diff --git a/commands/tick.js b/commands/tick.js index 7b06f33..48fb49e 100644 --- a/commands/tick.js +++ b/commands/tick.js @@ -2,6 +2,7 @@ import { createContract } from '../index.js' export const tick = async opts => { const { contractWithSigner } = await createContract(opts) + console.error('Please sign on your ledger...') const tx = await contractWithSigner.tick() console.log(tx.hash) }