Created
May 10, 2018 00:32
-
-
Save andredublin/f1c601397d1814ca61cfddc67172fbfd to your computer and use it in GitHub Desktop.
MyToken.sol with multlple agents
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
pragma solidity ^0.4.23; | |
import "./Ownable.sol"; | |
contract MyToken is Ownable { | |
mapping (address => bool) public agents; | |
modifier onlyAgent { | |
require(agents[msg.sender]); | |
_; | |
} | |
setAgent(address _agent, bool _enabled) public onlyOwner { | |
agents[_agent] = _enabled; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment