Skip to content

totalSupply should be a function, not state variable #434

@3sGgpQ8H

Description

@3sGgpQ8H

In ERC20.sol and ERC20Basic.sol interfaces totalSupply is declared as a state variable rather than function:

uint256 public totalSupply;

This makes it impossible to use theses interfaces for token contracts that calculate totalSupply value like this one: https://github.com/BCAPtoken/BCAPToken/blob/004c49da7d4f58309c1fc0018dae8260ea03d8f2/sol/StandardToken.sol#L31

So, the declaration should be changed to:

function totalSupply () constant returns (uint256 result);

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions