commit
6f09ca8d13
@ -40,8 +40,8 @@ module.exports = async function(callback) {
|
|||||||
|
|
||||||
console.log(table.toString());
|
console.log(table.toString());
|
||||||
|
|
||||||
let totalContributionBalances = await kredits.Contribution.functions.totalCount(true);
|
let totalKreditsEarned = await kredits.Contribution.functions.totalKreditsEarned(true);
|
||||||
console.log(`Total confirmed balance: ${totalContributionBalances}`);
|
console.log(`Total confirmed kredits: ${totalKreditsEarned}`);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
}
|
}
|
||||||
|
@ -21,26 +21,25 @@ module.exports = async function(callback) {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const contributors = await kredits.Contributor.all()
|
const contributors = await kredits.Contributor.all()
|
||||||
|
|
||||||
|
contributors.forEach((c) => {
|
||||||
|
table.push([
|
||||||
|
c.id.toString(),
|
||||||
|
c.account,
|
||||||
|
`${c.name}`,
|
||||||
|
c.isCore,
|
||||||
|
ethers.utils.formatEther(c.balance),
|
||||||
|
c.totalKreditsEarned.toString(),
|
||||||
|
c.contributionsCount.toString(),
|
||||||
|
c.ipfsHash
|
||||||
|
])
|
||||||
|
})
|
||||||
|
|
||||||
|
console.log(table.toString())
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
callback(e);
|
callback(e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
contributors.forEach((c) => {
|
|
||||||
table.push([
|
|
||||||
c.id.toString(),
|
|
||||||
c.account,
|
|
||||||
`${c.name}`,
|
|
||||||
c.isCore,
|
|
||||||
ethers.utils.formatEther(c.balance),
|
|
||||||
c.totalKreditsEarned.toString(),
|
|
||||||
c.contributionsCount.toString(),
|
|
||||||
c.ipfsHash
|
|
||||||
])
|
|
||||||
})
|
|
||||||
|
|
||||||
console.log(table.toString())
|
|
||||||
|
|
||||||
callback()
|
callback()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user