Merge branch 'main' into router/tnl/ENG-4409-pancake-v3-callback
This commit is contained in:
16
foundry/lib/ekubo/interfaces/ICore.sol
Normal file
16
foundry/lib/ekubo/interfaces/ICore.sol
Normal file
@@ -0,0 +1,16 @@
|
||||
// SPDX-License-Identifier: UNLICENSED
|
||||
pragma solidity ^0.8.26;
|
||||
|
||||
import {IFlashAccountant} from "./IFlashAccountant.sol";
|
||||
import {PoolKey} from "../types/poolKey.sol";
|
||||
import {SqrtRatio} from "../types/sqrtRatio.sol";
|
||||
|
||||
interface ICore is IFlashAccountant {
|
||||
function swap_611415377(
|
||||
PoolKey memory poolKey,
|
||||
int128 amount,
|
||||
bool isToken1,
|
||||
SqrtRatio sqrtRatioLimit,
|
||||
uint256 skipAhead
|
||||
) external payable returns (int128 delta0, int128 delta1);
|
||||
}
|
||||
16
foundry/lib/ekubo/interfaces/IFlashAccountant.sol
Normal file
16
foundry/lib/ekubo/interfaces/IFlashAccountant.sol
Normal file
@@ -0,0 +1,16 @@
|
||||
// SPDX-License-Identifier: UNLICENSED
|
||||
pragma solidity ^0.8.26;
|
||||
|
||||
interface ILocker {
|
||||
function locked(uint256 id) external;
|
||||
}
|
||||
|
||||
interface IPayer {
|
||||
function payCallback(uint256 id, address token) external;
|
||||
}
|
||||
|
||||
interface IFlashAccountant {
|
||||
// Withdraws a token amount from the accountant to the given recipient.
|
||||
// The contract must be locked, as it tracks the withdrawn amount against the current locker's delta.
|
||||
function withdraw(address token, address recipient, uint128 amount) external;
|
||||
}
|
||||
5
foundry/lib/ekubo/math/constants.sol
Normal file
5
foundry/lib/ekubo/math/constants.sol
Normal file
@@ -0,0 +1,5 @@
|
||||
// SPDX-License-Identifier: UNLICENSED
|
||||
pragma solidity ^0.8.26;
|
||||
|
||||
// We use this address to represent the native token within the protocol
|
||||
address constant NATIVE_TOKEN_ADDRESS = address(0);
|
||||
12
foundry/lib/ekubo/types/poolKey.sol
Normal file
12
foundry/lib/ekubo/types/poolKey.sol
Normal file
@@ -0,0 +1,12 @@
|
||||
// SPDX-License-Identifier: UNLICENSED
|
||||
pragma solidity ^0.8.26;
|
||||
|
||||
// address (20 bytes) | fee (8 bytes) | tickSpacing (4 bytes)
|
||||
type Config is bytes32;
|
||||
|
||||
// Each pool has its own state associated with this key
|
||||
struct PoolKey {
|
||||
address token0;
|
||||
address token1;
|
||||
Config config;
|
||||
}
|
||||
9
foundry/lib/ekubo/types/sqrtRatio.sol
Normal file
9
foundry/lib/ekubo/types/sqrtRatio.sol
Normal file
@@ -0,0 +1,9 @@
|
||||
// SPDX-License-Identifier: UNLICENSED
|
||||
pragma solidity ^0.8.26;
|
||||
|
||||
type SqrtRatio is uint96;
|
||||
|
||||
uint96 constant MIN_SQRT_RATIO_RAW = 4611797791050542631;
|
||||
SqrtRatio constant MIN_SQRT_RATIO = SqrtRatio.wrap(MIN_SQRT_RATIO_RAW);
|
||||
uint96 constant MAX_SQRT_RATIO_RAW = 79227682466138141934206691491;
|
||||
SqrtRatio constant MAX_SQRT_RATIO = SqrtRatio.wrap(MAX_SQRT_RATIO_RAW);
|
||||
1
foundry/lib/solady
Submodule
1
foundry/lib/solady
Submodule
Submodule foundry/lib/solady added at c9e079c0ca
Reference in New Issue
Block a user