DYSON
DYSON is an ERC20 contract for the $DYSON token.
rescueERC20
Rescues ERC-20 tokens stuck in the contract and transfers them to a specified address.
Parameters:
tokenAddress
address
Address of the ERC-20 token to be rescued.
to
address
Address that will receive the rescued tokens.
amount
uint
Amount of tokens to be rescued.
addMinter
Enables an address to mint new tokens. Currently, only the Farm contract is authorized as a minter who is responsible for minting $DYSN rewards.
Parameters:
_minter
address
Address to be added as a minter.
removeMinter
Removes an address from the list of minters, preventing it from minting new tokens.
Parameters:
_minter
address
Address to be removed from minters.
approve
Approves the spender to spend a specified amount of tokens on behalf of the owner.
Parameters:
spender
address
Address allowed to spend the tokens.
amount
uint
Amount of tokens to approve.
Return Values:
None
bool
Boolean indicating success.
transfer
Transfers a specified amount of tokens to a target address.
Parameters:
to
address
Address to which tokens will be transferred.
amount
uint
Amount of tokens to transfer.
Return Values:
None
bool
Boolean indicating success.
transferFrom
Transfers a specified amount of tokens from one address to another, subject to approval.
Parameters:
from
address
Address from which tokens will be transferred.
to
address
Address to which tokens will be transferred.
amount
uint
Amount of tokens to transfer.
Return Values:
None
bool
Boolean indicating success.
mint
Mints a specified amount of new tokens and assigns them to a specified address.
Parameters:
to
address
Address to receive the minted tokens.
amount
uint
Amount of tokens to mint.
Return Values:
None
bool
Boolean indicating success.
burn
Burns a specified amount of tokens from a specified address.
Parameters:
from
address
Address from which tokens will be burned.
amount
uint
Amount of tokens to burn.
Return Values:
None
bool
Boolean indicating success.
permit
Implements the EIP-2612 permit function, allowing an owner to approve token spending with a signature.
Parameters:
_owner
address
Token owner's address.
_spender
address
Address allowed to spend the tokens.
_amount
uint
Amount of tokens to approve.
_deadline
uint
Deadline for the permit.
_v
uint8
Must produce a valid secp256k1 signature from the holder along with _r and _s.
_r
bytes32
Must produce a valid secp256k1 signature from the holder along with _v and _s.
_s
bytes32
Must produce a valid secp256k1 signature from the holder along with _v and _r.
Last updated