feat: Support Ekubo callback in TychoRouter
- add integration test - cannot directly call _handleCallback from the locked method of the tycho router because of bytes memory to bytes callback conversion - Rename to EkuboPoolKey because of conflict with USV4 pool key - Bonus: fix bug where input token to swap method must be ERC20 (we should also support ETH)
This commit is contained in:
@@ -2,12 +2,12 @@
|
||||
pragma solidity ^0.8.26;
|
||||
|
||||
import {IFlashAccountant} from "./IFlashAccountant.sol";
|
||||
import {PoolKey} from "../types/poolKey.sol";
|
||||
import {EkuboPoolKey} from "../types/poolKey.sol";
|
||||
import {SqrtRatio} from "../types/sqrtRatio.sol";
|
||||
|
||||
interface ICore is IFlashAccountant {
|
||||
function swap_611415377(
|
||||
PoolKey memory poolKey,
|
||||
EkuboPoolKey memory poolKey,
|
||||
int128 amount,
|
||||
bool isToken1,
|
||||
SqrtRatio sqrtRatioLimit,
|
||||
|
||||
@@ -5,7 +5,7 @@ pragma solidity ^0.8.26;
|
||||
type Config is bytes32;
|
||||
|
||||
// Each pool has its own state associated with this key
|
||||
struct PoolKey {
|
||||
struct EkuboPoolKey {
|
||||
address token0;
|
||||
address token1;
|
||||
Config config;
|
||||
|
||||
Reference in New Issue
Block a user