Created
January 3, 2023 13:07
-
-
Save DanielZlotin/e35deb0f5d7b2ffbc8b5145ac6361770 to your computer and use it in GitHub Desktop.
Read historical staked ORBS in Staking Contract
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const team = "0xC200f98F3C088B868D80d8eb0aeb9D7eE18d604B"; | |
const date = new Date(Date.UTC(2022, 11, 31, 23, 59, 59)); | |
console.log(date); | |
const block = await findBlock(date.getTime()); | |
await resetNetworkFork(block.number); | |
const c = contract(abi as any, "0x01D59Af68E2dcb44e04C50e05F62E7043F2656C3"); //ETH | |
// const c = contract(abi as any, "0xEeAE6791F684117B7028b48Cb5dD21186dF80B9c");//POLY | |
const r = await c.methods.getTotalStakedTokens().call(); | |
const t = await c.methods.getStakeBalanceOf(team).call(); | |
console.log(date, BN(r).minus(t).div(1e18).toFormat()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment