Skip to content

Commit

Permalink
feat: change ready-to-transfer output to CSV (#3)
Browse files Browse the repository at this point in the history
Signed-off-by: Miroslav Bajtoš <[email protected]>
  • Loading branch information
bajtos authored Aug 1, 2024
1 parent 448b547 commit 43daeff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion commands/ready-for-transfer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ import { formatEther } from 'ethers'

export const readyForTransfer = async opts => {
const { contract } = await createContract(opts)
console.log('address,fil_amount')
for (let i = 0; ; i++) {
try {
const address = await contract.readyForTransfer(i)
const amount = await contract.rewardsScheduledFor(address)
console.log(`${address} FIL ${formatEther(amount)}`)
console.log(`${address},${formatEther(amount)}`)
} catch (err) {
break
}
Expand Down

0 comments on commit 43daeff

Please sign in to comment.