Skip to content

Commit

Permalink
Merge pull request #522 from balancer/chore/logMulticallStateError
Browse files Browse the repository at this point in the history
chore: log multicall v2 pool state error
  • Loading branch information
agualis authored Dec 9, 2024
2 parents 7759f83 + 20aeefc commit e8819c5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/chilled-hornets-explode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@balancer/sdk": patch
---

chore: debug v2 pool state multicall errors
10 changes: 10 additions & 0 deletions src/entities/utils/getPoolStateWithBalancesV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ export const getPoolStateWithBalancesV2 = async (
});

if (outputs.some((output) => output.status === 'failure')) {
console.log(
'Multicall error/s getting pool state with balances for v2 pool',
{
errors: outputs
.filter((o) => o.status === 'failure')
.map((o) => o.error),
chainId,
poolId: poolState.id,
},
);
throw new Error(
'Error: Unable to get pool state with balances for v2 pool.',
);
Expand Down

0 comments on commit e8819c5

Please sign in to comment.