ERC20 - GitHub
- Notifications You must be signed in to change notification settings
- Fork 12.4k
- Star 27k
- Code
- Issues 242
- Pull requests 90
- Actions
- Security 20
- Insights
Files
masterBreadcrumbs
- openzeppelin-contracts
- contracts
- token
Directory actions
More options
Directory actions
More options
Latest commit
History
History masterBreadcrumbs
- openzeppelin-contracts
- contracts
- token
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
parent directory.. | ||||
| extensions | extensions | |||
| utils | utils | |||
| ERC20.sol | ERC20.sol | |||
| IERC20.sol | IERC20.sol | |||
| README.adoc | README.adoc | |||
| View all files | ||||
README.adoc
ERC-20| 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 ERC-20 Token Standard.
| Tip | For an overview of ERC-20 tokens and a walk through on how to create a token contract read our ERC-20 guide. |
There are a few core contracts that implement the behavior specified in the ERC-20 standard:
-
{IERC20}: the interface all ERC-20 implementations should conform to.
-
{IERC20Metadata}: the extended ERC-20 interface including the name, symbol and decimals functions.
-
{ERC20}: the implementation of the ERC-20 interface, including the name, symbol and decimals optional extensions to the standard interface.
Additionally there are multiple custom extensions, including:
-
{ERC20Permit}: gasless approval of tokens (standardized as ERC-2612).
-
{ERC20Bridgeable}: compatibility with crosschain bridges through ERC-7802.
-
{ERC20Burnable}: destruction of own tokens.
-
{ERC20Capped}: enforcement of a cap to the total supply when minting tokens.
-
{ERC20Crosschain}: embedded {BridgeFungible} bridge, making the token crosschain through the use of ERC-7786 gateways.
-
{ERC20Pausable}: ability to pause token transfers.
-
{ERC20FlashMint}: token level support for flash loans through the minting and burning of ephemeral tokens (standardized as ERC-3156).
-
{ERC20Votes}: support for voting and vote delegation. See the governance guide for a minimal example (with the required overrides when combining ERC20 + ERC20Permit + ERC20Votes).
-
{ERC20Wrapper}: wrapper to create an ERC-20 backed by another ERC-20, with deposit and withdraw methods. Useful in conjunction with {ERC20Votes}.
-
{ERC20TemporaryApproval}: support for approvals lasting for only one transaction, as defined in ERC-7674.
-
{ERC1363}: support for calling the target of a transfer or approval, enabling code execution on the receiver within a single transaction.
-
{ERC4626}: tokenized vault that manages shares (represented as ERC-20) that are backed by assets (another ERC-20).
Finally, there are some utilities to interact with ERC-20 contracts in various ways:
-
{SafeERC20}: a wrapper around the interface that eliminates the need to handle boolean return values.
Other utilities that support ERC-20 assets can be found in the codebase:
-
ERC-20 tokens can be timelocked (held for a beneficiary until a specified time) or vested (released following a given schedule) using a {VestingWallet}.
| Note | This core set of contracts is designed to be unopinionated, allowing developers to access the internal functions in ERC-20 (such as _mint) and expose them as external functions in the way they prefer. |
Core
{{IERC20}}
{{IERC20Metadata}}
{{ERC20}}
Extensions
{{IERC20Permit}}
{{ERC20Permit}}
{{ERC20Bridgeable}}
{{ERC20Burnable}}
{{ERC20Capped}}
{{ERC20Crosschain}}
{{ERC20Pausable}}
{{ERC20Votes}}
{{ERC20Wrapper}}
{{ERC20FlashMint}}
{{ERC20TemporaryApproval}}
{{ERC1363}}
{{ERC4626}}
Utilities
{{SafeERC20}}
{{ERC1363Utils}}
You can’t perform that action at this time.Từ khóa » Erc20 Github
-
Openzeppelin-contracts/l At Master - GitHub
-
Erc20-smart-contract · GitHub Topics
-
Openzeppelin-contracts/l At Master - GitHub
-
EIPs/eip- At Master · Ethereum/EIPs - GitHub
-
Erc20-token · GitHub Topics
-
Ethereum-org/token-l At Master - GitHub
-
Erc20 · GitHub Topics
-
Erc20 · GitHub Topics
-
Erc-20 · GitHub Topics
-
Eth-contracts/l At Master - Token - GitHub
-
Necessary Code To Generate An ERC20 Token - Gists · GitHub
-
Erc20 · GitHub Topics
-
Erc20 · GitHub Topics
-
ERC20 Token On-boarding On The OpenZeppelin SDK Platform