Skip to content

Instantly share code, notes, and snippets.

@GalloDaSballo
Created September 22, 2022 17:12
Show Gist options
  • Save GalloDaSballo/da6170481d9628c770a810f92c77cd1b to your computer and use it in GitHub Desktop.
Save GalloDaSballo/da6170481d9628c770a810f92c77cd1b to your computer and use it in GitHub Desktop.
    /**
     * @notice Set/unset Admin Access for a given address.
     *
     * @param admin - Address of the new admin (or the one to be removed)
     * @param isEnabled - Enable/Disable Admin Access
     */
    function setAdmin(address admin, bool isEnabled) public onlyAdmin {
        require(admin != address(0), "INVALID_ADDRESS");
        _admins[admin] = isEnabled;
        emit AdminAccessSet(admin, isEnabled);
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment