Code Audit/Overview
Last updated
Last updated
0x5B4B330C5488Cbde25F0740C8DAB73CE44e950A8
Solidity contract represents the "Mater" token, which is an ERC-20 compliant token with several features and customizations.
Token Properties: The token has the following properties:
Name: "Mater"
Symbol: "MATER"
Initial Supply : 432000000000
Decimals: 18
Transfer Fees: The contract enforces a 2% transfer fee and a 1% burn fee on token transfers. These fees are deducted from the transferred amount, and the remainder is sent to the recipient.
Max Fee Limits: The contract sets maximum fee limits of 2% for both the transfer fee and the burn fee. Transactions that would result in fees exceeding these limits are rejected.
Fee Management:
maxTransferFeeRate
: Sets the maximum transaction fee rate (in percentage) for transfers. Default is 2%.
maxBurnFeeRate
: Sets the maximum fee rate (in percentage) for burning tokens. Default is 2%.
transferFeeRate
: The actual transaction fee rate for transfers. Default is 2%.
burnFeeRate
: The actual fee rate for burning tokens. Default is 1%.
Ownership Control: The contract includes ownership functionality, allowing the current owner to transfer ownership to another address, renounce ownership entirely, and perform administrative functions.
Maximum Transfer Amount:
maxTransferAmount
: Sets the maximum amount of tokens that can be transferred in a single transaction. Default is 10 billion tokens.
Balances and Allowances:
_balances
: A mapping that stores the token balances of all addresses.
_allowances
: A mapping that tracks the approved allowances for token transfers.
Exclusion from Fees:
isExcludedFromFees
: A mapping that allows certain addresses to be excluded from transaction fees.
Global Maximum Balance Limit:
globalMaxBalance
: A variable that sets a global maximum balance limit for all addresses.
excludeFromMaxBalance
: A mapping that allows specific addresses to be excluded from the global maximum balance limit.
Constructor:
The constructor initializes the token contract with an initial supply and sets the fee collection address.
ERC20 Functions:
The contract implements standard ERC20 functions including totalSupply
, balanceOf
, transfer
, transferFrom
, approve
, allowance
, increaseAllowance
, and decreaseAllowance
.
Internal Functions:
_approve
: An internal function to approve a spender to spend a specific amount on behalf of the owner.
_burn
: An internal function to burn a specific amount of tokens from an account.
_transferFee
: An internal function to transfer a fee to the fee address.
Owner-Only Functions:
Several functions are restricted to the contract owner, including:
setTransferFeeRate
: Set the transaction fee rate (in percentage).
setBurnFeeRate
: Set the burn fee rate (in percentage).
setFeeAddress
: Set the fee collection address.
excludeFromFees
: Exclude an address from transaction fees.
includeInFees
: Include an address in transaction fees.
setMaxTransferAmount
: Set the maximum transfer amount per transaction.
setGlobalMaxBalance
: Set the global maximum balance limit for all addresses.
excludeFromMaxBalance
: Exclude an address from the global maximum balance limit.
includeInMaxBalance
: Include an address in the global maximum balance limit.
Global Maximum Balance Limit Enforcement:
The contract enforces a global maximum balance limit for all addresses, ensuring that no address can hold more tokens than the specified limit.
Exclusion from Global Maximum Balance Limit:
Specific addresses can be excluded from the global maximum balance limit to allow for exceptions.
This contract provides control over various token parameters, transaction fees, burning, and maximum balance limits, allowing for flexibility and customization in managing the MATER token (MATER) on the Ethereum blockchain.