-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
42 additions
and
0 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
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); | ||
} | ||
} |
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,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); | ||
} | ||
} |