proposal-47/scripts/calculateAirdrop.js
2024-01-31 12:04:44 +00:00

19 lines
763 B
JavaScript

const stakers = require("../data/stakers.json");
const fs = require("fs");
const { ethers } = require("hardhat");
async function getTorn() {
return await ethers.getContractAt(require("../test/abi/torn.abi.json"), "0x77777FeDdddFfC19Ff86DB637967013e6C6A116C");
}
async function main() {
const governanceAddr = "0x5efda50f22d34F262c29268506C5Fa42cB56A1Ce";
const governanceContract = await ethers.getContractAt(require("../test/abi/governance.abi.json"), governanceAddr);
const airdropAmount = 1000000n * 10n ** 18n;
const stakeAmount = stakers.reduce((acc, staker) => acc + BigInt(staker.balance), 0n);
const vaultBalance = await (await getTorn()).balanceOf(await governanceContract.userVault());
console.log(stakeAmount, vaultBalance);
}
main();