Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
tnkshuuhei committed Sep 19, 2024
1 parent 007acc1 commit 795e1e8
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/CEP.sol
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ contract CEP is Initializable, OwnableUpgradeable, AccessControlUpgradeable, Ree

event TreasuryUpdated(address treasury);

event PoolFunded(uint256 indexed id, uint256 amount);

modifier onlyAdmin() {
_checkAdmin();
_;
Expand Down Expand Up @@ -139,6 +141,21 @@ contract CEP is Initializable, OwnableUpgradeable, AccessControlUpgradeable, Ree
return evaluationAddress;
}

function fundPool(uint256 _poolId, uint256 _amount) external payable {
if (_amount == 0 || _amount != msg.value) revert INVALID();
_fundPool();

emit PoolFunded(_poolId, _amount);
}

function _fundPool() internal pure {
// TODO: implement the fundPool function
}

function updateTreasury(address payable _treasury) external onlyAdmin {
_updateTreasury(_treasury);
}

function _checkAdmin() internal view {
require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "CEP: caller is not an admin");
}
Expand Down

0 comments on commit 795e1e8

Please sign in to comment.