feat: Add protocol state to Swap object

- This consists of lots of necessary battles with lifetimes.
This commit is contained in:
TAMARA LIPOWSKI
2025-07-22 12:13:39 -04:00
parent a057588270
commit c217702560
18 changed files with 210 additions and 39 deletions

View File

@@ -82,6 +82,7 @@ fn main() {
token_out: usdc.clone(),
split: 0f64,
user_data: None,
protocol_state: None,
};
let swap_usdc_usdt = Swap {
component: ProtocolComponent {
@@ -99,6 +100,7 @@ fn main() {
token_out: usdt.clone(),
split: 0f64,
user_data: None,
protocol_state: None,
};
// Then we create a solution object with the previous swap