CLETH Contract
The CLETH contract operates as an ERC20 token but with expanded functionalities tailored for minting, burning, pausing functionalities, managing rewards, and assigning roles to other contracts or addresses. Here's an overview of its functions:
Functions
This function mints CLETH tokens and assigns them to a specified address. It requires the role of MINTER_ROLE and operates only when the contract is not paused.
burn(address from, uint256 amount):
The burn function removes CLETH tokens from a specified address. It requires the BURNER_ROLE and operates only when the contract is not paused.
addReward, setReward:
These functions adjust reward amounts for users. addReward
increases the reward for an account, while setReward
sets a specific reward amount. Both functions require the MINTER_ROLE.
claimReward(address account):
Users can claim their accumulated reward tokens. The function checks for available rewards, resets the reward amount, and mints the claimed reward tokens for the user.
pause() and unpause():
These functions respectively pause and unpause the minting and burning functionalities of the token. They require the PAUSER_ROLE.
grantRoles(address stakingMaster):
This function assigns roles (MINTER_ROLE, BURNER_ROLE, and PAUSER_ROLE) to another contract or address. It's accessible only by the DEFAULT_ADMIN_ROLE.
Last updated