Skip to content

Instantly share code, notes, and snippets.

@andredublin
Created May 10, 2018 00:32
Show Gist options
  • Save andredublin/f1c601397d1814ca61cfddc67172fbfd to your computer and use it in GitHub Desktop.
Save andredublin/f1c601397d1814ca61cfddc67172fbfd to your computer and use it in GitHub Desktop.
MyToken.sol with multlple agents
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