@@ -35,30 +35,10 @@ impl BaselineSolvable for Edge {
3535 }
3636 if in_token == this. asset && out_token == this. vault {
3737 // asset -> vault
38- let res = this. contract . preview_deposit ( in_amount) . call ( ) . await . ok ( ) ;
39- if let Some ( ref shares_out) = res {
40- tracing:: debug!(
41- vault = ?this. vault,
42- asset = ?this. asset,
43- assets_in = ?in_amount,
44- shares_out = ?shares_out,
45- "Baseline ERC4626 get_amount_out wrap: preview_deposit"
46- ) ;
47- }
48- res
38+ this. contract . preview_deposit ( in_amount) . call ( ) . await . ok ( )
4939 } else if in_token == this. vault && out_token == this. asset {
5040 // vault -> asset
51- let res = this. contract . preview_redeem ( in_amount) . call ( ) . await . ok ( ) ;
52- if let Some ( ref assets_out) = res {
53- tracing:: debug!(
54- vault = ?this. vault,
55- asset = ?this. asset,
56- shares_in = ?in_amount,
57- assets_out = ?assets_out,
58- "Baseline ERC4626 get_amount_out unwrap: preview_redeem"
59- ) ;
60- }
61- res
41+ this. contract . preview_redeem ( in_amount) . call ( ) . await . ok ( )
6242 } else {
6343 None
6444 }
@@ -77,30 +57,10 @@ impl BaselineSolvable for Edge {
7757 }
7858 if in_token == this. asset && out_token == this. vault {
7959 // asset -> vault (exact shares out)
80- let res = this. contract . preview_mint ( out_amount) . call ( ) . await . ok ( ) ;
81- if let Some ( ref assets_in) = res {
82- tracing:: debug!(
83- vault = ?this. vault,
84- asset = ?this. asset,
85- shares_out = ?out_amount,
86- assets_preview_in = ?assets_in,
87- "Baseline ERC4626 get_amount_in wrap exact-out: preview_mint"
88- ) ;
89- }
90- res
60+ this. contract . preview_mint ( out_amount) . call ( ) . await . ok ( )
9161 } else if in_token == this. vault && out_token == this. asset {
9262 // vault -> asset (exact assets out)
93- let res = this. contract . preview_withdraw ( out_amount) . call ( ) . await . ok ( ) ;
94- if let Some ( ref shares_in) = res {
95- tracing:: debug!(
96- vault = ?this. vault,
97- asset = ?this. asset,
98- assets_out = ?out_amount,
99- shares_preview_in = ?shares_in,
100- "Baseline ERC4626 get_amount_in unwrap exact-out: preview_withdraw"
101- ) ;
102- }
103- res
63+ this. contract . preview_withdraw ( out_amount) . call ( ) . await . ok ( )
10464 } else {
10565 None
10666 }
0 commit comments