Skip to content

Commit

Permalink
we actually need those.
Browse files Browse the repository at this point in the history
  • Loading branch information
Foivos committed Oct 31, 2023
1 parent b0fa164 commit eca8bef
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
21 changes: 21 additions & 0 deletions contracts/test/utils/DistributableTest.sol
Original file line number Diff line number Diff line change
@@ -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);
}
}
21 changes: 21 additions & 0 deletions contracts/test/utils/OperatableTest.sol
Original file line number Diff line number Diff line change
@@ -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);
}
}

0 comments on commit eca8bef

Please sign in to comment.