Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add panoptic v1.1 tvl #1

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

flanagansteve
Copy link

@flanagansteve flanagansteve commented Jan 31, 2025

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

}
})

const v1point1PoolDeployedLogs = await getLogs2({ api, target: V1_POINT_1_FACTORY, fromBlock: v1point1StartBlock, eventAbi: abi.PoolDeployed, })
const univ4Pools = v1point1PoolDeployedLogs.map(log => log.uniswapPool.toLowerCase())
// TODO: get the token0, token1 and slot0 for each univ4pool and then also push those onto ownerTokens and poolData
Copy link
Author

Choose a reason for hiding this comment

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

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.

1 participant