Skip to content

Commit

Permalink
logging and aim for more consistent ids
Browse files Browse the repository at this point in the history
  • Loading branch information
apexearth committed Dec 6, 2024
1 parent 5e07ab8 commit a7b465d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/templates/erc20/erc20-rebasing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,8 @@ export const createRebasingERC20Tracker = ({
const balance = await contract.balanceOf(account)
if (holder.balance === balance) {
correctBalances++
} else {
console.log(`${account} has incorrect balance: ${holder.balance} vs ${balance}`)
}
}
console.timeEnd('Checking balances')
Expand Down
4 changes: 2 additions & 2 deletions src/templates/otoken/otoken.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import dayjs from 'dayjs'
import { findLast } from 'lodash'
import { findLast, sortBy } from 'lodash'
import { Between, LessThanOrEqual } from 'typeorm'
import { formatUnits } from 'viem'

Expand Down Expand Up @@ -553,7 +553,7 @@ export const createOTokenProcessor = (params: {
)
const yieldDelegationBalances = await getYieldDelegationBalances(ctx, block)

for (const address of owners!.values()) {
for (const address of sortBy([...owners!.values()], 'address')) {
if (!address.credits || address.rebasingOption === RebasingOption.OptOut) {
continue
}
Expand Down

0 comments on commit a7b465d

Please sign in to comment.