Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Polymarket/ctf-exchange/llms.txt
Use this file to discover all available pages before exploring further.
Overview
TheAuth mixin manages authenticated addresses with two distinct tiers: admins and operators. Admins have the highest level of access control and can add or remove both admins and operators. All admins are equal in authority. The contract deployer is initially designated as the only admin and operator.
Source: src/exchange/mixins/Auth.sol
State Variables
admins
1 indicates the address is an admin.
operators
1 indicates the address is an operator.
Modifiers
onlyAdmin
admins[msg.sender] equals 1.
Reverts: NotAdmin() if the caller is not an admin.
onlyOperator
operators[msg.sender] equals 1.
Reverts: NotOperator() if the caller is not an operator.
Constructor
Functions
isAdmin
Parameters
usr(address): The address to check for admin status
Returns
bool:trueif the address is an admin,falseotherwise
isOperator
Parameters
usr(address): The address to check for operator status
Returns
bool:trueif the address is an operator,falseotherwise
addAdmin
1 in the admins mapping.
Parameters
admin_(address): The address to add as an admin
Requirements
- Caller must be an admin (
onlyAdmin)
Emits
NewAdmin(admin_, msg.sender)
addOperator
1 in the operators mapping.
Parameters
operator_(address): The address to add as an operator
Requirements
- Caller must be an admin (
onlyAdmin)
Emits
NewOperator(operator_, msg.sender)
removeAdmin
0 in the admins mapping.
Parameters
admin(address): The address to remove as an admin
Requirements
- Caller must be an admin (
onlyAdmin)
Emits
RemovedAdmin(admin, msg.sender)
removeOperator
0 in the operators mapping.
Parameters
operator(address): The address to remove as an operator
Requirements
- Caller must be an admin (
onlyAdmin)
Emits
RemovedOperator(operator, msg.sender)
renounceAdminRole
Requirements
- Caller must be an admin (
onlyAdmin)
Emits
RemovedAdmin(msg.sender, msg.sender)
renounceOperatorRole
Requirements
- Caller must be an operator (
onlyOperator)
Emits
RemovedOperator(msg.sender, msg.sender)