-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: create mock file for smock, fix TODOs
- Loading branch information
1 parent
9a4d408
commit b97cbd3
Showing
3 changed files
with
121 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity ^0.8.19; | ||
|
||
import {Allo} from "contracts/core/Allo.sol"; | ||
import {IBaseStrategy} from "contracts/core/interfaces/IBaseStrategy.sol"; | ||
import {Metadata} from "contracts/core/libraries/Metadata.sol"; | ||
|
||
contract MockAllo is Allo { | ||
constructor() Allo() {} | ||
|
||
function _initializeOwner(address newOwner) internal override virtual { | ||
super._initializeOwner(newOwner); | ||
} | ||
|
||
function _revokeRole(bytes32 role, address account) internal override virtual { | ||
super._revokeRole(role, account); | ||
} | ||
|
||
function _checkOnlyPoolManager(uint256 _poolId, address _address) internal view override virtual { | ||
super._checkOnlyPoolManager(_poolId, _address); | ||
} | ||
|
||
function _checkOnlyPoolAdmin(uint256 _poolId, address _address) internal view override virtual { | ||
super._checkOnlyPoolAdmin(_poolId, _address); | ||
} | ||
|
||
function _createPool( | ||
address _creator, | ||
uint256 _msgValue, | ||
bytes32 _profileId, | ||
IBaseStrategy _strategy, | ||
bytes memory _initStrategyData, | ||
address _token, | ||
uint256 _amount, | ||
Metadata memory _metadata, | ||
address[] memory _managers | ||
) internal override virtual returns (uint256 poolId) { | ||
return super._createPool( | ||
_creator, | ||
_msgValue, | ||
_profileId, | ||
_strategy, | ||
_initStrategyData, | ||
_token, | ||
_amount, | ||
_metadata, | ||
_managers | ||
); | ||
} | ||
|
||
function _allocate( | ||
uint256 _poolId, | ||
address[] memory _recipients, | ||
uint256[] memory _amounts, | ||
bytes memory _data, | ||
uint256 _value, | ||
address _allocator | ||
) internal virtual override { | ||
super._allocate(_poolId, _recipients, _amounts, _data, _value, _allocator); | ||
} | ||
|
||
function _fundPool(uint256 _amount, address _funder, uint256 _poolId, IBaseStrategy _strategy) internal virtual override { | ||
super._fundPool(_amount, _funder, _poolId, _strategy); | ||
} | ||
|
||
function _isPoolAdmin(uint256 _poolId, address _address) internal view virtual override returns (bool) { | ||
return super._isPoolAdmin(_poolId, _address); | ||
} | ||
|
||
function _isPoolManager(uint256 _poolId, address _address) internal view virtual override returns (bool) { | ||
return super._isPoolManager(_poolId, _address); | ||
} | ||
|
||
function _updateRegistry(address _registry) internal virtual override { | ||
super._updateRegistry(_registry); | ||
} | ||
|
||
function _updateTreasury(address payable _treasury) internal virtual override { | ||
super._updateTreasury(_treasury); | ||
} | ||
|
||
function _updatePercentFee(uint256 _percentFee) internal virtual override { | ||
super._updatePercentFee(_percentFee); | ||
} | ||
|
||
function _updateBaseFee(uint256 _baseFee) internal virtual override { | ||
super._updateBaseFee(_baseFee); | ||
} | ||
|
||
function _updateTrustedForwarder(address __trustedForwarder) internal virtual override { | ||
super._updateTrustedForwarder(__trustedForwarder); | ||
} | ||
|
||
function _addPoolManager(uint256 _poolId, address _manager) internal virtual override { | ||
super._addPoolManager(_poolId, _manager); | ||
} | ||
|
||
function _msgSender() internal view virtual override returns (address) { | ||
return super._msgSender(); | ||
} | ||
} |