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:
@@ -4,7 +4,7 @@ pragma solidity ^0.8.26;
|
||||
import "@interfaces/IExecutor.sol";
|
||||
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
|
||||
|
||||
error CurveExecutor__InvalidAddresses();
|
||||
error CurveExecutor__AddressZero();
|
||||
|
||||
interface CryptoPool {
|
||||
// slither-disable-next-line naming-convention
|
||||
@@ -39,7 +39,7 @@ contract CurveExecutor is IExecutor {
|
||||
|
||||
constructor(address _nativeToken) {
|
||||
if (_nativeToken == address(0)) {
|
||||
revert CurveExecutor__InvalidAddresses();
|
||||
revert CurveExecutor__AddressZero();
|
||||
}
|
||||
nativeToken = _nativeToken;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user