TokenController contract acts as a governance and access control mechanism, allowing the owner to manage minting restrictions and blacklist certain addresses to maintain control and security within the token ecosystem. It provides a flexible framework for token-related operations.
Access control manager contract address.
A mapping is used to keep track of the maximum amount a minter is permitted to mint.
A Mapping used to keep track of the amount i.e already minted by minter.
Pauses Token
⛔️ Access Requirements
Controlled by AccessControlManager.
Resumes Token
⛔️ Access Requirements
Controlled by AccessControlManager.
Function to update blacklist.
Parameters
📅 Events
Emits BlacklistUpdated event.
⛔️ Access Requirements
Controlled by AccessControlManager.
Sets the minting cap for minter.
Parameters
📅 Events
Emits MintCapChanged.
⛔️ Access Requirements
Controlled by AccessControlManager.
Sets the address of the access control manager of this contract.
Parameters
📅 Events
Emits NewAccessControlManager.
⛔️ Access Requirements
Only owner.
❌ Errors
ZeroAddressNotAllowed is thrown when newAccessControlAddress_ contract address is zero.
Returns the blacklist status of the address.
Parameters
Return Values
user_
address
User address to be affected.
value_
bool
Boolean to toggle value.
minter_
address
Minter address.
amount_
uint256
Cap for the minter.
newAccessControlAddress_
address
New address for the access control.
user_
address
Address of user to check blacklist status.
[0]
bool
bool status of blacklist.
address accessControlManagermapping(address => uint256) minterToCapmapping(address => uint256) minterToMintedAmountfunction pause() externalfunction unpause() externalfunction updateBlacklist(address user_, bool value_) externalfunction setMintCap(address minter_, uint256 amount_) externalfunction setAccessControlManager(address newAccessControlAddress_) externalfunction isBlackListed(address user_) external view returns (bool)