Coder Social home page Coder Social logo

token_erc20's Introduction

Token_ERC20

= 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 walk through 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.
  • {IERC20Metadata}: the extended ERC20 interface including the <<ERC20-name,name>>, <<ERC20-symbol,symbol>> and <<ERC20-decimals,decimals>> functions.
  • {ERC20}: the implementation of the ERC20 interface, including the <<ERC20-name,name>>, <<ERC20-symbol,symbol>> and <<ERC20-decimals,decimals>> optional standard extension to the base interface.

Additionally there are multiple custom extensions, including:

  • {ERC20Burnable}: destruction of own tokens.
  • {ERC20Capped}: enforcement of a cap to the total supply when minting tokens.
  • {ERC20Pausable}: ability to pause token transfers.
  • {ERC20Snapshot}: efficient storage of past token balances to be later queried at any point in time.
  • {ERC20Permit}: gasless approval of tokens (standardized as ERC2612).
  • {ERC20FlashMint}: token level support for flash loans through the minting and burning of ephemeral tokens (standardized as ERC3156).
  • {ERC20Votes}: support for voting and vote delegation.
  • {ERC20VotesComp}: support for voting and vote delegation (compatible with Compound's token, with uint96 restrictions).
  • {ERC20Wrapper}: wrapper to create an ERC20 backed by another ERC20, with deposit and withdraw methods. Useful in conjunction with {ERC20Votes}.

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

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

The following related EIPs are in draft status.

  • {ERC20Permit}

NOTE: This core set of contracts is designed to be unopinionated, allowing developers to access the internal functions in ERC20 (such as <<ERC20-_mint-address-uint256-,_mint>>) 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}}

{{IERC20Metadata}}

{{ERC20}}

== Extensions

{{ERC20Burnable}}

{{ERC20Capped}}

{{ERC20Pausable}}

{{ERC20Snapshot}}

{{ERC20Votes}}

{{ERC20VotesComp}}

{{ERC20Wrapper}}

{{ERC20FlashMint}}

== Draft EIPs

The following EIPs are still in Draft status. Due to their nature as drafts, the details of these contracts may change and we cannot guarantee their xref:ROOT:releases-stability.adoc[stability]. Minor releases of OpenZeppelin Contracts may contain breaking changes for the contracts in this directory, which will be duly announced in the https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/CHANGELOG.md[changelog]. The EIPs included here are used by projects in production and this may make them less likely to change significantly.

{{ERC20Permit}}

== Presets

These contracts are preconfigured combinations of the above features. They can be used through inheritance or as models to copy and paste their source code.

{{ERC20PresetMinterPauser}}

{{ERC20PresetFixedSupply}}

== Utilities

{{SafeERC20}}

{{TokenTimelock}}

token_erc20's People

Contributors

rubyredmoon avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.