22 lines
762 B
TypeScript
22 lines
762 B
TypeScript
|
import fs from "fs";
|
||
|
import path from "path";
|
||
|
|
||
|
import { getStakersLockedBalancesSum } from "../utils/stakers";
|
||
|
import { currentProposalVotingStartBlock } from "../utils/config";
|
||
|
|
||
|
async function main() {
|
||
|
const stakersLockedBalanceSum = await getStakersLockedBalancesSum(currentProposalVotingStartBlock);
|
||
|
|
||
|
console.log("Locked balance of stakers to who we want restore rewards:", stakersLockedBalanceSum.div(1e18).toFixed(2), "TORN");
|
||
|
|
||
|
fs.writeFileSync(
|
||
|
path.join("data", "stakersLockedBalanceSum.txt"),
|
||
|
`Locked balance of stakers to who we want restore rewards: ${stakersLockedBalanceSum.toString(10)} (~ ${stakersLockedBalanceSum
|
||
|
.div(1e18)
|
||
|
.toFixed(2)} TORN)`,
|
||
|
{ encoding: "utf-8" }
|
||
|
);
|
||
|
}
|
||
|
|
||
|
main();
|