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.
Got the SFPM and Factory addresses from: https://github.com/panoptic-labs/panoptic-subgraph/blob/v4-support/config/mainnet.json
Got the start block from this deploy tx: https://etherscan.io/tx/0x54cd540d3ba3f7b069e39192cc374730e4fc10326cd995f6be84f5ce1ed01013
The chunks and pool objects on the subgraph seem to still support all the same fields we need
The PoolDeployed event changed slightly, but only dropped two fields we didn't need (and weren't even in the ABI this adapter uses anyways). The
PoolInitialized
event is unchanged (and also unused in the adapter, it seems - maybe we could delete that line?).A bit unrelated: I also made it so that we use the /prod alias in subgraph URL, so that this adapter is always tracking the most recent subgraph logic.
TODO: Call PoolManager to get token0/token1/slot0 for the univ4 pools: https://docs.uniswap.org/contracts/v4/guides/read-pool-state