Julian M. Rodriguez 9700e6b4bd Use beforeTokenTransfer hook in ERC20Snapshot (#2312) 5 yıl önce
..
ERC20.sol d9fa59f30a Address ERC1155 changes (#2267) 5 yıl önce
ERC20Burnable.sol 56de324afe Add SPX license identifier (#2235) 5 yıl önce
ERC20Capped.sol 56de324afe Add SPX license identifier (#2235) 5 yıl önce
ERC20Pausable.sol 56de324afe Add SPX license identifier (#2235) 5 yıl önce
ERC20Snapshot.sol 9700e6b4bd Use beforeTokenTransfer hook in ERC20Snapshot (#2312) 5 yıl önce
IERC20.sol 56de324afe Add SPX license identifier (#2235) 5 yıl önce
README.adoc 0c667ca32a docs: add note explaining opinionated presets (#2313) 5 yıl önce
SafeERC20.sol 8b58fc7191 feat: add wrapper function for low level calls (#2264) 5 yıl önce
TokenTimelock.sol 52f7b6e03b Remove TokenVesting reference from Timelock docs (#2262) 5 yıl önce

README.adoc

= ERC 20

[.readme-notice]
NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/token/erc20

This set of interfaces, contracts, and utilities are all related to the https://eips.ethereum.org/EIPS/eip-20[ERC20 Token Standard].

TIP: For an overview of ERC20 tokens and a walkthrough on how to create a token contract read our xref:ROOT:erc20.adoc[ERC20 guide].

There a few core contracts that implement the behavior specified in the EIP:

* {IERC20}: the interface all ERC20 implementations should conform to.
* {ERC20}: the implementation of the ERC20 interface, including the <>, <> and <> optional standard extension to the base interface.

Additionally there are multiple custom extensions, including:

* designation of addresses that can pause token transfers for all users ({ERC20Pausable}).
* efficient storage of past token balances to be later queried at any point in time ({ERC20Snapshot}).
* destruction of own tokens ({ERC20Burnable}).
* enforcement of a cap to the total supply when minting tokens ({ERC20Capped}).

Finally, there are some utilities to interact with ERC20 contracts in various ways.

* {SafeERC20} is a wrapper around the interface that eliminates the need to handle boolean return values.
* {TokenTimelock} can hold tokens for a beneficiary until a specified time.

NOTE: This core set of contracts is designed to be unopinionated, allowing developers to access the internal functions in ERC20 (such as <>) and expose them as external functions in the way they prefer. On the other hand, xref:ROOT:erc20.adoc#Presets[ERC20 Presets] (such as {ERC20PresetMinterPauser}) are designed using opinionated patterns to provide developers with ready to use, deployable contracts.

== Core

{{IERC20}}

{{ERC20}}

== Extensions

{{ERC20Snapshot}}

{{ERC20Pausable}}

{{ERC20Burnable}}

{{ERC20Capped}}

== Utilities

{{SafeERC20}}

{{TokenTimelock}}