@@ -4,7 +4,7 @@ use tycho_client::feed::{synchronizer::ComponentWithState, BlockHeader};
44use tycho_common:: { models:: token:: Token , Bytes } ;
55
66use crate :: {
7- evm:: protocol:: { cpmm:: protocol:: cpmm_try_from_with_block , uniswap_v2:: state:: UniswapV2State } ,
7+ evm:: protocol:: { cpmm:: protocol:: cpmm_try_from_with_header , uniswap_v2:: state:: UniswapV2State } ,
88 protocol:: { errors:: InvalidSnapshotError , models:: TryFromWithBlock } ,
99} ;
1010
@@ -13,13 +13,13 @@ impl TryFromWithBlock<ComponentWithState, BlockHeader> for UniswapV2State {
1313
1414 /// Decodes a `ComponentWithState` into a `UniswapV2State`. Errors with a `InvalidSnapshotError`
1515 /// if either reserve0 or reserve1 attributes are missing.
16- async fn try_from_with_block (
16+ async fn try_from_with_header (
1717 snapshot : ComponentWithState ,
1818 _block : BlockHeader ,
1919 _account_balances : & HashMap < Bytes , HashMap < Bytes , Bytes > > ,
2020 _all_tokens : & HashMap < Bytes , Token > ,
2121 ) -> Result < Self , Self :: Error > {
22- let ( reserve0, reserve1) = cpmm_try_from_with_block ( snapshot) ?;
22+ let ( reserve0, reserve1) = cpmm_try_from_with_header ( snapshot) ?;
2323 Ok ( Self :: new ( reserve0, reserve1) )
2424 }
2525}
@@ -62,7 +62,7 @@ mod tests {
6262 entrypoints : Vec :: new ( ) ,
6363 } ;
6464
65- let result = UniswapV2State :: try_from_with_block (
65+ let result = UniswapV2State :: try_from_with_header (
6666 snapshot,
6767 header ( ) ,
6868 & HashMap :: new ( ) ,
@@ -96,7 +96,7 @@ mod tests {
9696 entrypoints : Vec :: new ( ) ,
9797 } ;
9898
99- let result = UniswapV2State :: try_from_with_block (
99+ let result = UniswapV2State :: try_from_with_header (
100100 snapshot,
101101 header ( ) ,
102102 & HashMap :: new ( ) ,
0 commit comments