LeverageToken
This contract implements a leverage token with upgradeable capabilities, access control, and pausability.
State Variables
MINTER_ROLE
Role identifier for accounts with minting privileges
GOV_ROLE
Role identifier for accounts with governance privileges
Functions
constructor
Note: constructor
initialize
Initializes the contract with a name, symbol, minter, and governance address.
Parameters
mint
Can only be called by addresses with the MINTER_ROLE.
Mints new tokens to the specified address.
Parameters
burn
Can only be called by addresses with the MINTER_ROLE.
Burns tokens from the specified account.
Parameters
_update
This function is called during token transfer and is paused when the contract is paused.
Internal function to update user assets after a transfer.
Parameters
grantRole
Can only be called by addresses with the GOV_ROLE.
Grants a role to an account.
Parameters
revokeRole
Can only be called by addresses with the GOV_ROLE.
Revokes a role from an account.
Parameters
pause
Can only be called by addresses with the GOV_ROLE. Does not prevent contract upgrades.
Pauses all token transfers, mints, burns, and indexing updates.
unpause
Can only be called by addresses with the GOV_ROLE.
Unpauses all token transfers, mints, burns, and indexing updates.
_authorizeUpgrade
Can only be called by the owner of the contract.
Internal function to authorize an upgrade to a new implementation.
Parameters
Last updated