feat: rename "uniswap_v4" to "uniswap_v4_hooks"
to match the indexer
This commit is contained in:
@@ -12,7 +12,7 @@ pub const PROTOCOL_SPECIFIC_CONFIG: &str =
|
||||
/// transfers.
|
||||
pub static GROUPABLE_PROTOCOLS: LazyLock<HashSet<&'static str>> = LazyLock::new(|| {
|
||||
let mut set = HashSet::new();
|
||||
set.insert("uniswap_v4");
|
||||
set.insert("uniswap_v4_hooks");
|
||||
set.insert("vm:balancer_v3");
|
||||
set.insert("ekubo_v2");
|
||||
set
|
||||
@@ -28,7 +28,7 @@ pub static IN_TRANSFER_REQUIRED_PROTOCOLS: LazyLock<HashSet<&'static str>> = Laz
|
||||
set.insert("pancakeswap_v2");
|
||||
set.insert("uniswap_v3");
|
||||
set.insert("pancakeswap_v3");
|
||||
set.insert("uniswap_v4");
|
||||
set.insert("uniswap_v4_hooks");
|
||||
set.insert("ekubo_v2");
|
||||
set.insert("vm:maverick_v2");
|
||||
set.insert("vm:balancer_v3");
|
||||
@@ -45,7 +45,7 @@ pub static CALLBACK_CONSTRAINED_PROTOCOLS: LazyLock<HashSet<&'static str>> = Laz
|
||||
let mut set = HashSet::new();
|
||||
set.insert("uniswap_v3");
|
||||
set.insert("pancakeswap_v3");
|
||||
set.insert("uniswap_v4");
|
||||
set.insert("uniswap_v4_hooks");
|
||||
set.insert("ekubo_v2");
|
||||
set.insert("vm:balancer_v3");
|
||||
set
|
||||
|
||||
@@ -107,7 +107,7 @@ mod tests {
|
||||
|
||||
let swap_weth_wbtc = Swap {
|
||||
component: ProtocolComponent {
|
||||
protocol_system: "uniswap_v4".to_string(),
|
||||
protocol_system: "uniswap_v4_hooks".to_string(),
|
||||
..Default::default()
|
||||
},
|
||||
token_in: weth.clone(),
|
||||
@@ -120,7 +120,7 @@ mod tests {
|
||||
};
|
||||
let swap_wbtc_usdc = Swap {
|
||||
component: ProtocolComponent {
|
||||
protocol_system: "uniswap_v4".to_string(),
|
||||
protocol_system: "uniswap_v4_hooks".to_string(),
|
||||
..Default::default()
|
||||
},
|
||||
token_in: wbtc.clone(),
|
||||
@@ -150,7 +150,7 @@ mod tests {
|
||||
swaps: vec![swap_weth_wbtc, swap_wbtc_usdc],
|
||||
token_in: weth,
|
||||
token_out: usdc.clone(),
|
||||
protocol_system: "uniswap_v4".to_string(),
|
||||
protocol_system: "uniswap_v4_hooks".to_string(),
|
||||
split: 0f64,
|
||||
},
|
||||
SwapGroup {
|
||||
@@ -181,7 +181,7 @@ mod tests {
|
||||
|
||||
let swap_wbtc_weth = Swap {
|
||||
component: ProtocolComponent {
|
||||
protocol_system: "uniswap_v4".to_string(),
|
||||
protocol_system: "uniswap_v4_hooks".to_string(),
|
||||
..Default::default()
|
||||
},
|
||||
token_in: wbtc.clone(),
|
||||
@@ -192,7 +192,7 @@ mod tests {
|
||||
};
|
||||
let swap_weth_usdc = Swap {
|
||||
component: ProtocolComponent {
|
||||
protocol_system: "uniswap_v4".to_string(),
|
||||
protocol_system: "uniswap_v4_hooks".to_string(),
|
||||
..Default::default()
|
||||
},
|
||||
token_in: weth.clone(),
|
||||
@@ -203,7 +203,7 @@ mod tests {
|
||||
};
|
||||
let swap_weth_dai = Swap {
|
||||
component: ProtocolComponent {
|
||||
protocol_system: "uniswap_v4".to_string(),
|
||||
protocol_system: "uniswap_v4_hooks".to_string(),
|
||||
..Default::default()
|
||||
},
|
||||
token_in: weth.clone(),
|
||||
@@ -216,7 +216,7 @@ mod tests {
|
||||
};
|
||||
let swap_dai_usdc = Swap {
|
||||
component: ProtocolComponent {
|
||||
protocol_system: "uniswap_v4".to_string(),
|
||||
protocol_system: "uniswap_v4_hooks".to_string(),
|
||||
..Default::default()
|
||||
},
|
||||
token_in: dai.clone(),
|
||||
@@ -240,21 +240,21 @@ mod tests {
|
||||
swaps: vec![swap_wbtc_weth],
|
||||
token_in: wbtc.clone(),
|
||||
token_out: weth.clone(),
|
||||
protocol_system: "uniswap_v4".to_string(),
|
||||
protocol_system: "uniswap_v4_hooks".to_string(),
|
||||
split: 0f64,
|
||||
},
|
||||
SwapGroup {
|
||||
swaps: vec![swap_weth_usdc],
|
||||
token_in: weth.clone(),
|
||||
token_out: usdc.clone(),
|
||||
protocol_system: "uniswap_v4".to_string(),
|
||||
protocol_system: "uniswap_v4_hooks".to_string(),
|
||||
split: 0.5f64,
|
||||
},
|
||||
SwapGroup {
|
||||
swaps: vec![swap_weth_dai, swap_dai_usdc],
|
||||
token_in: weth,
|
||||
token_out: usdc,
|
||||
protocol_system: "uniswap_v4".to_string(),
|
||||
protocol_system: "uniswap_v4_hooks".to_string(),
|
||||
split: 0f64,
|
||||
}
|
||||
]
|
||||
@@ -299,7 +299,7 @@ mod tests {
|
||||
};
|
||||
let swap_weth_dai = Swap {
|
||||
component: ProtocolComponent {
|
||||
protocol_system: "uniswap_v4".to_string(),
|
||||
protocol_system: "uniswap_v4_hooks".to_string(),
|
||||
..Default::default()
|
||||
},
|
||||
token_in: weth.clone(),
|
||||
@@ -312,7 +312,7 @@ mod tests {
|
||||
};
|
||||
let swap_dai_usdc = Swap {
|
||||
component: ProtocolComponent {
|
||||
protocol_system: "uniswap_v4".to_string(),
|
||||
protocol_system: "uniswap_v4_hooks".to_string(),
|
||||
..Default::default()
|
||||
},
|
||||
token_in: dai.clone(),
|
||||
@@ -344,7 +344,7 @@ mod tests {
|
||||
swaps: vec![swap_weth_dai, swap_dai_usdc],
|
||||
token_in: weth,
|
||||
token_out: usdc,
|
||||
protocol_system: "uniswap_v4".to_string(),
|
||||
protocol_system: "uniswap_v4_hooks".to_string(),
|
||||
split: 0f64,
|
||||
}
|
||||
]
|
||||
|
||||
@@ -66,7 +66,7 @@ impl SwapEncoderBuilder {
|
||||
self.chain,
|
||||
self.config,
|
||||
)?)),
|
||||
"uniswap_v4" => Ok(Box::new(UniswapV4SwapEncoder::new(
|
||||
"uniswap_v4_hooks" => Ok(Box::new(UniswapV4SwapEncoder::new(
|
||||
self.executor_address,
|
||||
self.chain,
|
||||
self.config,
|
||||
|
||||
@@ -445,7 +445,7 @@ mod tests {
|
||||
component: ProtocolComponent {
|
||||
id: "0xdce6394339af00981949f5f3baf27e3610c76326a700af57e4b3e3ae4977f78d"
|
||||
.to_string(),
|
||||
protocol_system: "uniswap_v4".to_string(),
|
||||
protocol_system: "uniswap_v4_hooks".to_string(),
|
||||
static_attributes: static_attributes_usdc_eth,
|
||||
..Default::default()
|
||||
},
|
||||
@@ -467,7 +467,7 @@ mod tests {
|
||||
component: ProtocolComponent {
|
||||
id: "0xecd73ecbf77219f21f129c8836d5d686bbc27d264742ddad620500e3e548e2c9"
|
||||
.to_string(),
|
||||
protocol_system: "uniswap_v4".to_string(),
|
||||
protocol_system: "uniswap_v4_hooks".to_string(),
|
||||
static_attributes: static_attributes_eth_pepe,
|
||||
..Default::default()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user