File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -6,16 +6,21 @@ import "openzeppelin-contracts/contracts/access/Ownable.sol";
66
77contract ShellToken is ERC20 , Ownable {
88
9+ mapping (address => bool ) public isAdmin;
10+ mapping (address => uint ) public multipler; //percentage out of 100
11+
912 mapping (address => bool ) public allowedToTransfer;
1013
1114 constructor () ERC20 ("ShellToken " , "SHELL " ) Ownable (msg .sender ) {
1215 }
1316
14- function mintShells (address to , uint256 amount ) public onlyOwner {
17+ function mintShells (address to , uint256 amount ) public {
18+ require (isAdmin[msg .sender ], "Not an admin " );
1519 _mint (to, amount);
1620 }
1721
18- function deleteShells (address from , uint256 amount ) public onlyOwner {
22+ function deleteShells (address from , uint256 amount ) public {
23+ require (isAdmin[msg .sender ], "Not an admin " );
1924 _burn (from, amount);
2025 }
2126
@@ -29,5 +34,9 @@ contract ShellToken is ERC20, Ownable {
2934 function updateAllowedToTransfer (address user , bool allowed ) public onlyOwner {
3035 allowedToTransfer[user] = allowed;
3136 }
37+
38+ function updateIsAdmin (address user , bool _isAdmin ) public onlyOwner {
39+ isAdmin[user] = _isAdmin;
40+ }
3241}
3342
You can’t perform that action at this time.
0 commit comments