Skip to content

Commit 73e9679

Browse files
authored
Merge pull request #350 from propeller-heads/tl/improve-price-printer
feat: Fix amount overflow and add filters to price printer
2 parents 5c914b8 + 261ceee commit 73e9679

File tree

2 files changed

+268
-62
lines changed

2 files changed

+268
-62
lines changed

examples/price_printer/main.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ use tycho_simulation::{
1616
protocol::{
1717
ekubo::state::EkuboState,
1818
filters::{balancer_v2_pool_filter, curve_pool_filter},
19+
pancakeswap_v2::state::PancakeswapV2State,
1920
uniswap_v2::state::UniswapV2State,
2021
uniswap_v3::state::UniswapV3State,
2122
uniswap_v4::state::UniswapV4State,
@@ -46,7 +47,10 @@ fn register_exchanges(
4647
Chain::Ethereum => {
4748
builder = builder
4849
.exchange::<UniswapV2State>("uniswap_v2", tvl_filter.clone(), None)
50+
.exchange::<UniswapV2State>("sushiswap_v2", tvl_filter.clone(), None)
51+
.exchange::<PancakeswapV2State>("pancakeswap_v2", tvl_filter.clone(), None)
4952
.exchange::<UniswapV3State>("uniswap_v3", tvl_filter.clone(), None)
53+
.exchange::<UniswapV3State>("pancakeswap_v3", tvl_filter.clone(), None)
5054
.exchange::<EVMPoolState<PreCachedDB>>(
5155
"vm:balancer_v2",
5256
tvl_filter.clone(),
@@ -58,10 +62,9 @@ fn register_exchanges(
5862
Some(curve_pool_filter),
5963
)
6064
.exchange::<EkuboState>("ekubo_v2", tvl_filter.clone(), None)
61-
.exchange::<UniswapV4State>("uniswap_v4", tvl_filter.clone(), None);
65+
.exchange::<UniswapV4State>("uniswap_v4", tvl_filter.clone(), None)
66+
.exchange::<UniswapV4State>("uniswap_v4_hooks", tvl_filter.clone(), None);
6267
// COMING SOON!
63-
// .exchange::<UniswapV4State>("uniswap_v4_hooks", tvl_filter.clone(),
64-
// Some(uniswap_v4_pool_with_euler_hook_filter));
6568
// .exchange::<EVMPoolState<PreCachedDB>>("vm:maverick_v2", tvl_filter.clone(), None)
6669
}
6770
Chain::Base => {

0 commit comments

Comments
 (0)