Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions src/ShellToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,21 @@ import "openzeppelin-contracts/contracts/access/Ownable.sol";

contract ShellToken is ERC20, Ownable {

mapping(address => bool) public isAdmin;
mapping(address => uint) public multipler; //percentage out of 100

mapping(address => bool) public allowedToTransfer;

constructor() ERC20("ShellToken", "SHELL") Ownable(msg.sender) {
}

function mintShells(address to, uint256 amount) public onlyOwner {
function mintShells(address to, uint256 amount) public {
require(isAdmin[msg.sender], "Not an admin");
_mint(to, amount);
}

function deleteShells(address from, uint256 amount) public onlyOwner {
function deleteShells(address from, uint256 amount) public {
require(isAdmin[msg.sender], "Not an admin");
_burn(from, amount);
}

Expand All @@ -29,5 +34,9 @@ contract ShellToken is ERC20, Ownable {
function updateAllowedToTransfer(address user, bool allowed) public onlyOwner {
allowedToTransfer[user] = allowed;
}

function updateIsAdmin(address user, bool _isAdmin) public onlyOwner {
isAdmin[user] = _isAdmin;
}
}

Loading