Skip to content

Commit

Permalink
update token contract
Browse files Browse the repository at this point in the history
  • Loading branch information
4samad committed Sep 15, 2022
1 parent 2f837d8 commit 89f2976
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions packages/hardhat/contracts/JudgesToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,8 @@ contract JudgesToken is ERC20, AccessControl, ERC20Permit, ERC20Votes {
super._burn(account, amount);
}

// grant admin and minter powers
function grantAccess (address to) public onlyRole(DEFAULT_ADMIN_ROLE) {
_grantRole(DEFAULT_ADMIN_ROLE, to);
_grantRole(MINTER_ROLE, to);
}
// use grantRole(bytes32 role, address account) to grant admin powers
// use revokeRole(bytes32 role, address account) revoke admin andinter powers
// DEFAULT_ADMIN_ROLE and MINTER_ROLE available

// revoke admin and inter powers
function revokeAccess () public onlyRole(DEFAULT_ADMIN_ROLE) {
_revokeRole(DEFAULT_ADMIN_ROLE, msg.sender);
_revokeRole(MINTER_ROLE, msg.sender);
}
}

0 comments on commit 89f2976

Please sign in to comment.