feat: add Pancakeswap v3 Substreams module (#178)

* feat: Add Pancakeswap V3 Substreams module

At this point it's just hard copy of Uniswap V3. It will be adapted in the following commits to make reviewing easier.

* refactor: adapt uniswapv3 module logic for pancakeswap v3

The main change is how they handle protocol fees. Protocol fees are set by default depending on the fee of the pool.

* refactor: use new protobuf structs

The "EntityChanges" got deprecated in favor of the hybrid messages. This commit makes PancakeswapV3 module use the new structs.

* fix: set correct factory address

---------

Co-authored-by: zizou <111426680+flopell@users.noreply.github.com>
Co-authored-by: Louise Poole <louise@datarevenue.com>
This commit is contained in:
Zizou
2025-03-17 13:39:05 +01:00
committed by GitHub
parent 503a83595e
commit 4c1e773b1b
26 changed files with 10156 additions and 0 deletions

20
substreams/Cargo.lock generated
View File

@@ -260,6 +260,26 @@ dependencies = [
"tycho-substreams 0.2.0 (git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=b8aeaa3)",
]
[[package]]
name = "ethereum-pancakeswap-v3"
version = "0.1.0"
dependencies = [
"anyhow",
"ethabi 18.0.0",
"getrandom",
"hex",
"hex-literal 0.4.1",
"itertools 0.13.0",
"num-bigint",
"prost 0.11.9",
"substreams",
"substreams-entity-change",
"substreams-ethereum",
"substreams-helper 0.0.2 (git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=b8aeaa3)",
"tiny-keccak",
"tycho-substreams 0.2.0 (git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=b8aeaa3)",
]
[[package]]
name = "ethereum-sfrax"
version = "0.1.0"