Skip to content

Commit

Permalink
more WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
coffee-converter committed Jan 6, 2021
1 parent bb10a72 commit e98eb8b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/mapping-wiseToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

0 comments on commit e98eb8b

Please sign in to comment.