TokenController
TokenController
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.
Solidity API
accessControlManager
Access control manager contract address.
address accessControlManager
minterToCap
A mapping is used to keep track of the maximum amount a minter is permitted to mint.
mapping(address => uint256) minterToCap
minterToMintedAmount
A Mapping used to keep track of the amount i.e already minted by minter.
mapping(address => uint256) minterToMintedAmount
pause
Pauses Token
function pause() external
βοΈ Access Requirements
Controlled by AccessControlManager.
unpause
Resumes Token
function unpause() external
βοΈ Access Requirements
Controlled by AccessControlManager.
updateBlacklist
Function to update blacklist.
function updateBlacklist(address user_, bool value_) external
Parameters
user_
address
User address to be affected.
value_
bool
Boolean to toggle value.
π Events
Emits BlacklistUpdated event.
βοΈ Access Requirements
Controlled by AccessControlManager.
setMintCap
Sets the minting cap for minter.
function setMintCap(address minter_, uint256 amount_) external
Parameters
minter_
address
Minter address.
amount_
uint256
Cap for the minter.
π Events
Emits MintCapChanged.
βοΈ Access Requirements
Controlled by AccessControlManager.
setAccessControlManager
Sets the address of the access control manager of this contract.
function setAccessControlManager(address newAccessControlAddress_) external
Parameters
newAccessControlAddress_
address
New address for the access control.
π Events
Emits NewAccessControlManager.
βοΈ Access Requirements
Only owner.
β Errors
ZeroAddressNotAllowed is thrown when newAccessControlAddress_ contract address is zero.
isBlackListed
Returns the blacklist status of the address.
function isBlackListed(address user_) external view returns (bool)
Parameters
user_
address
Address of user to check blacklist status.
Return Values
[0]
bool
bool status of blacklist.
Last updated