Skip to content

Commit

Permalink
Contracts compile ok now
Browse files Browse the repository at this point in the history
  • Loading branch information
mehranhydary committed Aug 29, 2024
1 parent 9acde8f commit ae7a275
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 32 deletions.
25 changes: 0 additions & 25 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,6 @@ src = "src"
out = "out"
libs = ["lib"]
fs_permissions = [{ access = "read-write", path = "./"}]

remappings = [
"@eigenlayer/=lib/eigenlayer-middleware/lib/eigenlayer-contracts/src/",
"@eigenlayer-scripts/=lib/eigenlayer-middleware/lib/eigenlayer-contracts/script/",
"@eigenlayer-middleware/=lib/eigenlayer-middleware/",
"@credible-squaring/=src/",
"@openzeppelin/=lib/eigenlayer-middleware/lib/eigenlayer-contracts/lib/openzeppelin-contracts/",
"@openzeppelin-upgrades/=lib/eigenlayer-middleware/lib/eigenlayer-contracts/lib/openzeppelin-contracts-upgradeable/",
"ds-test/=lib/forge-std/lib/ds-test/src/"
"@ensdomains/=lib/v4-periphery/lib/v4-core/node_modules/@ensdomains/",
"@openzeppelin/=lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/",
"@openzeppelin/contracts/=lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/contracts/",
"@uniswap/v4-core/=lib/v4-periphery/lib/v4-core/",
"ds-test/=lib/v4-periphery/lib/v4-core/lib/forge-std/lib/ds-test/src/",
"erc4626-tests/=lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/lib/erc4626-tests/",
"forge-gas-snapshot/=lib/v4-periphery/lib/v4-core/lib/forge-gas-snapshot/src/",
"forge-std/=lib/forge-std/src/",
"hardhat/=lib/v4-periphery/lib/v4-core/node_modules/hardhat/",
"openzeppelin-contracts/=lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/",
"permit2/=lib/v4-periphery/lib/permit2/",
"solmate/=lib/v4-periphery/lib/v4-core/lib/solmate/",
"v4-core/=lib/v4-periphery/lib/v4-core/src/",
"v4-periphery/=lib/v4-periphery/",
]

gas_reports = ["*"]
optimizer = true
optimizer_runs = 800
Expand Down
21 changes: 21 additions & 0 deletions remappings.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@eigenlayer/=lib/eigenlayer-middleware/lib/eigenlayer-contracts/src/
@eigenlayer-scripts/=lib/eigenlayer-middleware/lib/eigenlayer-contracts/script/
@eigenlayer-middleware/=lib/eigenlayer-middleware/
@openzeppelin/=lib/eigenlayer-middleware/lib/eigenlayer-contracts/lib/openzeppelin-contracts/
@openzeppelin-upgrades/=lib/eigenlayer-middleware/lib/eigenlayer-contracts/lib/openzeppelin-contracts-upgradeable/
ds-test/=lib/forge-std/lib/ds-test/src/
@ensdomains/=lib/v4-periphery/lib/v4-core/node_modules/@ensdomains/
@uniswap/v4-core/=lib/v4-periphery/lib/v4-core/
erc4626-tests/=lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/lib/erc4626-tests/
forge-gas-snapshot/=lib/v4-periphery/lib/v4-core/lib/forge-gas-snapshot/src/
forge-std/=lib/forge-std/src/
hardhat/=lib/v4-periphery/lib/v4-core/node_modules/hardhat/
openzeppelin-contracts/=lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/
permit2/=lib/v4-periphery/lib/permit2/
solmate/=lib/v4-periphery/lib/v4-core/lib/solmate/
v4-core/=lib/v4-periphery/lib/v4-core/src/
v4-periphery/=lib/v4-periphery/
eigenlayer-contracts/=lib/eigenlayer-middleware/lib/eigenlayer-contracts/
eigenlayer-middleware/=lib/eigenlayer-middleware/
openzeppelin-contracts-upgradeable/=lib/eigenlayer-middleware/lib/openzeppelin-contracts-upgradeable/
@openzeppelin/contracts/=lib/eigenlayer-middleware/lib/eigenlayer-contracts/lib/openzeppelin-contracts/contracts/
13 changes: 7 additions & 6 deletions src/MiladyPoolTaskManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
pragma solidity ^0.8.26;

import {BaseHook} from "v4-periphery/src/base/hooks/BaseHook.sol";
import {IPoolManager} from "v4-core/src/interfaces/IPoolManager.sol";
import {PoolId, PoolIdLibrary} from "v4-core/src/types/PoolId.sol";
import {IPoolManager} from "v4-core/interfaces/IPoolManager.sol";
import {PoolId, PoolIdLibrary} from "v4-core/types/PoolId.sol";
import {Hooks} from "v4-core/libraries/Hooks.sol";
import {PoolKey} from "v4-core/types/PoolKey.sol";
import {StateLibrary} from "v4-core/libraries/StateLibrary.sol";

import "@openzeppelin-upgrades/contracts/proxy/utils/Initializable.sol";
import "@openzeppelin-upgrades/contracts/access/OwnableUpgradeable.sol";
Expand Down Expand Up @@ -41,7 +42,7 @@ contract MiladyPoolTaskManager is
IRegistryCoordinator _registryCoordinator,
IPoolManager _poolManager
) BLSSignatureChecker(_registryCoordinator) BaseHook(_poolManager) {
TASK_RESPONSE_WINDOW_BLOCK = 100;
// TASK_RESPONSE_WINDOW_BLOCK = 100;
}

function getHookPermissions()
Expand Down Expand Up @@ -77,10 +78,10 @@ contract MiladyPoolTaskManager is
_transferOwnership(initialOwner);
}

function createNewOrder(Order calldata order) external payable {
function createOrder(
Order calldata order
) external payable returns (uint32) {
// TODO: Figure out what the actual order will be
Order calldata order = Order({orderId: 1});

// TODO: Update the global state variables (order ids, hashes, etc.)
}

Expand Down
4 changes: 3 additions & 1 deletion src/interfaces/IMiladyPoolTaskManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ interface IMiladyPoolTaskManager {
}
// TODO: Figure out what other structs you need here (look at Arena X, Uniswap X, etc.)
// Need functions
function createOrder(Order calldata order) external returns (uint32);
function createOrder(
Order calldata order
) external payable returns (uint32);
function cancelOrder(uint32 orderId) external;
// TODO: Look at Uniswap X and Arena X for inspiration
}

0 comments on commit ae7a275

Please sign in to comment.