feat: Support Curve ETH
Curve pools use a different address from ETH (native token) - Pass Chain into the SwapEncoderBuilder and SwapEncoder - Add native_token_curve_address and native_token_address to CurveSwapEncoder - Added integration test for this curve case --- don't change below this line --- ENG-4306 Took 1 hour 4 minutes Took 11 seconds
This commit is contained in:
@@ -38,7 +38,7 @@ impl SwapEncoderRegistry {
|
||||
.get(&chain.name)
|
||||
.ok_or(EncodingError::FatalError("No executors found for chain".to_string()))?;
|
||||
for (protocol, executor_address) in executors {
|
||||
let builder = SwapEncoderBuilder::new(protocol, executor_address);
|
||||
let builder = SwapEncoderBuilder::new(protocol, executor_address, chain.clone());
|
||||
let encoder = builder.build()?;
|
||||
encoders.insert(protocol.to_string(), encoder);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user