diff --git a/src/Container.sol b/src/Container.sol index e9823a8..71d31aa 100644 --- a/src/Container.sol +++ b/src/Container.sol @@ -18,16 +18,6 @@ contract Container is IContainer, Ownable, ModuleManager { using SafeERC20 for IERC20; using ExcessivelySafeCall for address; - /*////////////////////////////////////////////////////////////////////////// - PUBLIC STORAGE - //////////////////////////////////////////////////////////////////////////*/ - - /// @inheritdoc IContainer - uint256 public override nativeLocked; - - /// @inheritdoc IContainer - mapping(IERC20 asset => uint256) public override erc20Locked; - /*////////////////////////////////////////////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////////*/ @@ -66,7 +56,7 @@ contract Container is IContainer, Ownable, ModuleManager { /// @inheritdoc IContainer function withdrawERC20(IERC20 asset, uint256 amount) public onlyOwner { // Checks: the available ERC20 balance of the container is greater enough to support the withdrawal - if (amount > asset.balanceOf(address(this)) - erc20Locked[asset]) revert Errors.InsufficientERC20ToWithdraw(); + if (amount > asset.balanceOf(address(this))) revert Errors.InsufficientERC20ToWithdraw(); // Interactions: withdraw by transferring the amount to the sender asset.safeTransfer({ to: msg.sender, value: amount }); @@ -78,7 +68,7 @@ contract Container is IContainer, Ownable, ModuleManager { /// @inheritdoc IContainer function withdrawNative(uint256 amount) public onlyOwner { // Checks: the native balance of the container minus the amount locked for operations is greater than the requested amount - if (amount > address(this).balance - nativeLocked) revert Errors.InsufficientNativeToWithdraw(); + if (amount > address(this).balance) revert Errors.InsufficientNativeToWithdraw(); // Interactions: withdraw by transferring the amount to the sender (bool success, ) = payable(msg.sender).call{ value: amount }(""); diff --git a/src/interfaces/IContainer.sol b/src/interfaces/IContainer.sol index dfab640..861059b 100644 --- a/src/interfaces/IContainer.sol +++ b/src/interfaces/IContainer.sol @@ -29,18 +29,6 @@ interface IContainer is IERC165 { /// @param data The ABI-encoded method called on the module event ModuleExecutionSucceded(address indexed module, uint256 value, bytes data); - /*////////////////////////////////////////////////////////////////////////// - CONSTANT FUNCTIONS - //////////////////////////////////////////////////////////////////////////*/ - - /// @notice Retrieves the amount of native token (ETH) locked in the container for current/upcoming operations - function nativeLocked() external view returns (uint256 balance); - - /// @notice Retrieves the amount of `asset` ERC-20 asset locked in the container for current/upcoming operations - /// @param asset The address of the ERC-20 token - /// @return balance The amount of ERC-20 token locked - function erc20Locked(IERC20 asset) external view returns (uint256 balance); - /*////////////////////////////////////////////////////////////////////////// NON-CONSTANT FUNCTIONS //////////////////////////////////////////////////////////////////////////*/