Skip to content

Conversation

@apexearth
Copy link
Collaborator

No description provided.

@apexearth apexearth requested a review from nick December 22, 2023 21:45
import { type Transaction, activityFromTx } from '../../../utils/activityFromTx'
import { ADDRESS_ZERO } from '../../../utils/addresses'
import { DECIMALS_18 } from '../../../utils/constants'
import { multicall } from '../../../utils/multicall'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

viem has a built in multicall btw https://viem.sh/docs/contract/multicall.html

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am using a multicall contract in most cases, however when we are prior to that contract's deploy date I make an rpc batch call instead. It does result in less back and forth which improves performance still. This function gives us a single interface no matter what block height we're at.

Copy link
Contributor

@nick nick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicee

@apexearth apexearth merged commit 248f8f6 into main Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants