From 795e1e8d1e74cc29d5685e145863037c9b108b52 Mon Sep 17 00:00:00 2001 From: shuhei tanaka Date: Thu, 19 Sep 2024 20:34:42 +0900 Subject: [PATCH] chore --- src/CEP.sol | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/CEP.sol b/src/CEP.sol index 06f1c95..eb0891e 100644 --- a/src/CEP.sol +++ b/src/CEP.sol @@ -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(); _; @@ -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"); }