Skip to content

Commit

Permalink
feat: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
daopunk committed Dec 26, 2024
1 parent a6a4616 commit 0912020
Show file tree
Hide file tree
Showing 19 changed files with 50 additions and 551 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "lib/eigenlayer-middleware"]
path = lib/eigenlayer-middleware
url = https://github.com/Layr-Labs/eigenlayer-middleware
94 changes: 0 additions & 94 deletions LICENSE

This file was deleted.

1 change: 1 addition & 0 deletions lib/eigenlayer-middleware
Submodule eigenlayer-middleware added at 512ce7
2 changes: 2 additions & 0 deletions remappings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ halmos-cheatcodes=node_modules/halmos-cheatcodes
@oz/=node_modules/@openzeppelin/contracts/
@oz-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/

@eigenlayer-middleware/=lib/eigenlayer-middleware/src/

contracts/=src/contracts
interfaces/=src/interfaces
30 changes: 3 additions & 27 deletions script/Common.sol
Original file line number Diff line number Diff line change
@@ -1,40 +1,16 @@
// SPDX-License-Identifier: PPL
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;

import {IERC20} from '@oz/token/ERC20/IERC20.sol';
import {Greeter, IGreeter} from 'contracts/Greeter.sol';
import {Script} from 'forge-std/Script.sol';
// solhint-disable-next-line
import 'script/Registry.sol';

/**
* @title Common Contract
* @author Breadchain
* @notice This contract is used to deploy the Greeter contract
* @dev This contract is intended for use in Scripts and Integration Tests
*/
contract Common is Script {
struct DeploymentParams {
string greeting;
IERC20 token;
}
function setUp() public virtual {}

IGreeter public greeter;

/// @notice Deployment parameters for each chain
mapping(uint256 _chainId => DeploymentParams _params) internal _deploymentParams;

function setUp() public virtual {
// Optimism
_deploymentParams[10] = DeploymentParams('Hello, Optimism!', IERC20(OPTIMISM_DAI));

// Gnosis
_deploymentParams[100] = DeploymentParams('Hello, Gnosis!', IERC20(GNOSIS_BREAD));
}

function _deployContracts() internal {
DeploymentParams memory _params = _deploymentParams[block.chainid];

greeter = new Greeter(_params.greeting, _params.token);
}
function _deployContracts() internal {}
}
2 changes: 1 addition & 1 deletion script/Deploy.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: PPL
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;

import {Common} from 'script/Common.sol';
Expand Down
17 changes: 1 addition & 16 deletions script/Registry.sol
Original file line number Diff line number Diff line change
@@ -1,17 +1,2 @@
// SPDX-License-Identifier: PPL
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;

/// @dev Example of addresses that may be stored in the Registry for use throughout the repository

// Tokens (Optimism Chain)
address constant OPTIMISM_DAI = 0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1;

// Tokens (Gnosis Chain)
address constant GNOSIS_BREAD = 0xa555d5344f6FB6c65da19e403Cb4c1eC4a1a5Ee3;
address constant GNOSIS_XDAI = 0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d;

// Curve Factory (Gnosis Chain)
address constant GNOSIS_CURVE_STABLE_SWAP_FACTORY = 0xbC0797015fcFc47d9C1856639CaE50D0e69FbEE8;

// Liquidity Pools (Gnosis Chain)
address constant GNOSIS_CURVE_POOL_XDAI_BREAD = 0xf3D8F3dE71657D342db60dd714c8a2aE37Eac6B4;
7 changes: 7 additions & 0 deletions src/contracts/AVSConsumer.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;

// import {ECDSAStakeRegistry} from '@eigenlayer-middleware/unaudited/ECDSAStakeRegistry.sol';
import {IAVSConsumer} from 'interfaces/IAVSConsumer.sol';

contract AVSConsumer is IAVSConsumer {}
59 changes: 0 additions & 59 deletions src/contracts/Greeter.sol

This file was deleted.

25 changes: 25 additions & 0 deletions src/interfaces/IAVSConsumer.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;

/**
* @title AVSConsumer Contract
* @author Breadchain
* @notice
*/
interface IAVSConsumer {
/*///////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////*/

/*///////////////////////////////////////////////////////////////
ERRORS
//////////////////////////////////////////////////////////////*/

/*///////////////////////////////////////////////////////////////
VARIABLES
//////////////////////////////////////////////////////////////*/

/*///////////////////////////////////////////////////////////////
LOGIC
//////////////////////////////////////////////////////////////*/
}
74 changes: 0 additions & 74 deletions src/interfaces/IGreeter.sol

This file was deleted.

28 changes: 0 additions & 28 deletions test/integration/Greeter.t.sol

This file was deleted.

29 changes: 0 additions & 29 deletions test/integration/IntegrationBase.sol

This file was deleted.

4 changes: 0 additions & 4 deletions test/invariants/PROPERTIES.md

This file was deleted.

37 changes: 0 additions & 37 deletions test/invariants/fuzz/Greeter.t.sol

This file was deleted.

Loading

0 comments on commit 0912020

Please sign in to comment.