Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

``` #20505

Closed
846200 opened this issue May 19, 2022 · 0 comments
Closed

``` #20505

846200 opened this issue May 19, 2022 · 0 comments

Comments

@846200
Copy link

846200 commented May 19, 2022

ERC: 179
Title: Simpler Token standard
Status: Draft
Type: Informational
Created: 18-11.2016
Resolution: https://github.com/ethereum/wiki/wiki/Standardized_Contract_APIs

Abstract

The following describes standard functions a token contract can implement.
This ERC describes a simpler version of the ERC20 standard token contract, removing transfer approvals.

Motivation

Some dapps need interfaces simpler than ERC20 as a base for their tokens. We've seen some projects take this approach already (1). The main problems with ERC20 standard token are:

  • Lack of reference implementation and tests
  • Higher complexity due to approve functionality, which not all projects need.
  • Returns boolean values to signal failure instead of throwing.
  • Function totalSupply() could just be implemented as a state variable in most cases.

Specification

totalSupply

uint public totalSupply;

The total token supply

balanceOf

function balanceOf(address who) constant returns (uint);

Get the account balance of another account with address who

transfer

function transfer(address to, uint value);

Send value amount of tokens to address to

Transfer event

event Transfer(address indexed from, address indexed to, uint value);

Triggered when tokens are transferred.

Reference Implementation and tests

https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/token/ERC20Basic.sol
https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/token/BasicToken.sol
https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/test/BasicToken.js

As you can see, the code is simpler and very concise. Comments appreciated.

Originally posted by @maraoz in ethereum/EIPs#179

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants