From e98eb8b20f9a24783c4f73c352b4311b3d63851d Mon Sep 17 00:00:00 2001 From: coffee-converter Date: Tue, 5 Jan 2021 20:44:51 -0600 Subject: [PATCH] more WIP --- src/mapping-wiseToken.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mapping-wiseToken.ts b/src/mapping-wiseToken.ts index 7691b59..a40be2c 100644 --- a/src/mapping-wiseToken.ts +++ b/src/mapping-wiseToken.ts @@ -96,11 +96,11 @@ export function handleStakeEnd (event: StakeEnd): void { export function handleInterestScraped (event: InterestScraped): void { let stake = Stake.load(event.params.stakerAddress.toHexString()) - stake.scrapeCount = stake.scrapeCount + ONE + stake.scrapeCount = stake.scrapeCount.plus(ONE) stake.lastScrapeDay = event.params.scrapeDay - stake.scrapedTotalYodas = stake.scrapedTotalYodas + event.params.scrapeAmount - stake.currentShares = stake.currentShares - event.params.stakersPenalty - stake.sharesPenalized = stake.sharesPenalized + event.params.stakersPenalty - stake.referrerSharesPenalized = stake.referrerSharesPenalized + event.params.referrerPenalty + stake.scrapedTotalYodas = stake.scrapedTotalYodas.plus(event.params.scrapeAmount) + stake.currentShares = stake.currentShares.minus(event.params.stakersPenalty) + stake.sharesPenalized = stake.sharesPenalized.plus(event.params.stakersPenalty) + stake.referrerSharesPenalized = stake.referrerSharesPenalized.plus(event.params.referrerPenalty) stake.save() } \ No newline at end of file