diff --git a/contracts/test/utils/DistributableTest.sol b/contracts/test/utils/DistributableTest.sol new file mode 100644 index 00000000..ccb1d9e6 --- /dev/null +++ b/contracts/test/utils/DistributableTest.sol @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +import { Distributable } from '../../utils/Distributable.sol'; + +contract DistributableTest is Distributable { + uint256 public nonce; + + constructor(address distributor) { + _addDistributor(distributor); + } + + function testDistributable() external onlyRole(uint8(Roles.DISTRIBUTOR)) { + nonce++; + } + + function getDistributorRole() external pure returns (uint8) { + return uint8(Roles.DISTRIBUTOR); + } +} diff --git a/contracts/test/utils/OperatableTest.sol b/contracts/test/utils/OperatableTest.sol new file mode 100644 index 00000000..34b07258 --- /dev/null +++ b/contracts/test/utils/OperatableTest.sol @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +import { Operatable } from '../../utils/Operatable.sol'; + +contract OperatorableTest is Operatable { + uint256 public nonce; + + constructor(address operator) { + _addOperator(operator); + } + + function testOperatorable() external onlyRole(uint8(Roles.OPERATOR)) { + nonce++; + } + + function getOperatorRole() external pure returns (uint8) { + return uint8(Roles.OPERATOR); + } +}