Skip to content

Add Authorizable contract #743

@medvedev1088

Description

@medvedev1088

🎉 Description

Something like this:

contract Authorizable is Ownable {

    mapping(address => bool) public authorized;

    modifier onlyAuthorized() {
        require(authorized[msg.sender] || owner == msg.sender);
        _;
    }

    function addAuthorized(address _toAdd) onlyOwner public {
        authorized[_toAdd] = true;
    }

    function removeAuthorized(address _toRemove) onlyOwner public {
        authorized[_toRemove] = false;
    }

}
  • [+] 📈 This is a feature request.

Originally discussed here https://ethereum.stackexchange.com/questions/39654/smart-contract-multiple-owners/39657#39657

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew contracts, functions, or helpers.good first issueLow hanging fruit for new contributors to get involved!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions