Conversation
…ated getReserveData (closes #419) Two related defects on the Aave V3 BSC flash-loan path that together silenced the only flash-loan source on every fork demo and live run: 1. `config/default.toml` and `config/fork.toml` baked the PoolDataProvider as 0x41393e5e337606dc3821075Af65AeE84D7688CBD, which has no code on BSC mainnet — `cast code` returns 0x at any block. Calls returned an empty buffer and surfaced as "buffer overrun" decode errors at every quote step. Sourced the correct address from IPoolAddressesProvider.getPoolDataProvider() on BSC: 0xc90Df74A7c16245c5F5C5870327Ceb38Fe5d5328. Updated both profiles with a comment pointing at the on-chain source-of-truth so future drift is easier to spot. 2. With the right data provider in place, `getReserveData` returns 12 fields on BSC, not the 15 our `sol!` ABI declares — newer-Aave fields (`accruedToTreasury`, `unbacked`, `isolationModeTotalDebt`) are absent on BSC's deploy. The strict typed decoder still rejects the truncated tuple, breaking every paused/frozen-bitmap probe. We only consume the leading `configuration` word for that check, so issue the call ourselves and lift the first 32 bytes via a new `read_uint256_first_word` helper. `getReserveConfigurationData` stays on the typed decode (its 10-tuple matches BSC). Local validation: replay against block 91323624 with the four documented seed borrowers now reaches the flash-loan quote stage without buffer-overrun warnings (build pending in companion test branch that also carries #418's vToken decoder relaxation).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two related defects on the Aave V3 BSC flash-loan path that together silenced the only flash-loan source on every fork demo and live run:
Fix
Test plan