feat: Use Arc instead of & for protocol_state in Swap

- dealing with lifetimes makes refactoring painful for our users.
This commit is contained in:
TAMARA LIPOWSKI
2025-08-20 15:25:16 -04:00
parent 2a68dd117b
commit a2a53195ed
5 changed files with 26 additions and 23 deletions

View File

@@ -422,7 +422,7 @@ mod tests {
// Fee and tick spacing information for this test is obtained by querying the
// USV4 Position Manager contract: 0xbd216513d74c8cf14cf4747e6aaa6420ff64ee9e
// Using the poolKeys function with the first 25 bytes of the pool id
fn swap_usdc_eth_univ4() -> Swap<'static> {
fn swap_usdc_eth_univ4() -> Swap {
let pool_fee_usdc_eth = Bytes::from(BigInt::from(3000).to_signed_bytes_be());
let tick_spacing_usdc_eth = Bytes::from(BigInt::from(60).to_signed_bytes_be());
let mut static_attributes_usdc_eth: HashMap<String, Bytes> = HashMap::new();
@@ -442,7 +442,7 @@ mod tests {
.build()
}
fn swap_eth_pepe_univ4() -> Swap<'static> {
fn swap_eth_pepe_univ4() -> Swap {
let pool_fee_eth_pepe = Bytes::from(BigInt::from(25000).to_signed_bytes_be());
let tick_spacing_eth_pepe = Bytes::from(BigInt::from(500).to_signed_bytes_be());
let mut static_attributes_eth_pepe: HashMap<String, Bytes> = HashMap::new();