ERC-20 Token Contract
A minimal, standard-compliant ERC-20 fungible token implementation in Solidity. A minimal, standard-compliant ERC-20 fungible token implementation in Solidity.Explanation
This contract inherits from OpenZeppelin’sERC20 implementation, which handles all standard token logic (transfers, allowances, balances).
Key points:
- The constructor mints
initialSupplytokens to the deployer. decimals()defaults to 18 (standard for ERC-20).- Using OpenZeppelin means the contract is audited and standard-compliant.
1000000 for one million tokens.
Code
Canonical knowledge ID:
code-example:erc-20-token-contract