Skip to content

Commit

Permalink
refactor: Switch to Viems multicall as it does support blockNumber. R…
Browse files Browse the repository at this point in the history
…emove multicallV3 abi, etc.
  • Loading branch information
johngrantuk committed Oct 12, 2023
1 parent 1c644be commit 84402ef
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 550 deletions.
5 changes: 2 additions & 3 deletions .changeset/few-mayflies-change.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
"@balancer/sdk": minor
---

Replace dataQueries with multicallV3:
Replace dataQueries with multicall (using Viem):

- Add multicallV3 ABI
- Add manual batching (instead of Viems) so we can maintain custom blockNo
- Add `BATCHSIZE` config per network
- Onchain calls correctly mapped to pool/version
- Filter bricked pools from vulnerability
- Fix scalingFactor scaling
2 changes: 0 additions & 2 deletions debug/multicall.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// bun run debug/multicall.ts
import {
OnChainPoolDataEnricher,
MULTICALL,
BATCHSIZE,
ProviderSwapOptions,
VAULT,
Expand Down Expand Up @@ -43,7 +42,6 @@ const pools = await fetch(
const onChainEnricher = new OnChainPoolDataEnricher(
chain.id,
rpc,
MULTICALL[chain.id],
BATCHSIZE[chain.id],
VAULT[chain.id],
);
Expand Down
1 change: 0 additions & 1 deletion src/abi/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from './vault';
export * from './balancerQueries';
export * from './erc20';
export * from './multicallV3';
Loading

0 comments on commit 84402ef

Please sign in to comment.