Dagora ERC20 Wizard
Below is the technical documentation for the Dagora ERC20 wizard contract.
DagoraERC20
a template for creating new ERC20 contracts.
isPaused
Boolean to determine if the contract is paused.
default value is false, contract is not paused on deployment.
maxSupply
The maximum number of tokens that can be minted.
constructor
The Contract that will be used to check if the user is a member.
Parameters
_name
string
The name of the token.
_symbol
string
The symbol of the token.
_newOwner
address
The address that will be the owner of the contract.
initialSupply
uint256
The initial supply of the token to be minted to the _newOwner.
_maxSupply
uint256
The maximum supply of the token.
mint
OnlyOwner function to mint tokens.
Parameters
to
address
The address that will receive the tokens.
amount
uint256
The amount of tokens to be minted.
burn
OnlyOwner function to burn tokens.
Parameters
from
address
The address that will have the tokens burned.
amount
uint256
The amount of tokens to be burned.
togglePaused
OnlyOwner function to toggle the paused state of the contract.
_beforeTokenTransfer
check before every token transfer if the contract is paused.
_This function overrides the beforeTokenTransfer function from the ERC20 contract, and will fail if the contract is paused.
Parameters
from
address
The address that will send the tokens.
to
address
The address that will receive the tokens.
amount
uint256
The amount of tokens to be transferred.
typeOf
Function to get the type of the contract.
Return Values
[0]
string
string The type of the contract.
version
Function to get the version of the contract.
Return Values
[0]
string
string The version of the contract.
Last updated
Was this helpful?