SPELL
Abracadabra's Governance Token
Spell Token Contract
The Spell token contract is an ERC20 token contract that inherits from the BoringOwnable contract, making it owned by a specific address (the "owner") that has exclusive permission to perform certain operations.
Token Information
The contract declares the following constants for the ERC20 token:
symbol: The token's symbol is "SPELL".name: The token's name is "Spell Token".decimals: The token has 18 decimal.
Total Supply and Max Supply
The contract maintains a totalSupply variable, which tracks the total number of tokens that have been minted and are in existence. It also declares a MAX_SUPPLY constant which is set to 420 billion, representing the maximum number of SPELL tokens that can ever be minted.
Minting Mechanism
The contract includes a mint function, which allows the contract owner to create new tokens. This function takes two parameters:
to: The address to which the new tokens will be minted.amount: The number of tokens to be minted.
The function has a couple of requirements that must be met:
The
toaddress must not be the zero address, ensuring that tokens are not minted to an address that can't use them.The total supply of tokens after minting must not exceed the
MAX_SUPPLY.
If these conditions are met, the tokens are minted by increasing the totalSupply and the balance of the to address by the amount. A Transfer event is emitted, with the zero address as the sender and the to address as the recipient, signifying the creation of new tokens.
Last updated