Skip to content

Make standard token compileable.#1594

Merged
chriseth merged 3 commits intodevelopfrom
fixStdToken
Jan 31, 2017
Merged

Make standard token compileable.#1594
chriseth merged 3 commits intodevelopfrom
fixStdToken

Conversation

@chriseth
Copy link
Contributor

Fixes #1480

balanceOf[_to] += _value;
if (m_allowance[_from][msg.sender] >= _value && balance[_to] + _value >= balance[_to]) {
m_allowance[_from][msg.sender] -= _value;
balance[_to] += _value;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think balance[_from] should be decreased.

@axic
Copy link
Contributor

axic commented Jan 23, 2017

Why cannot we make public accessor fulfil the method signature requirement? I.e. Token defines function balanceOf(address) and mapping (address => uint) balanceOf should match that signature.

@chriseth
Copy link
Contributor Author

@axic the interface requires an external and an internal implementation. The accessor function only provides the external implementation.

@pirapira pirapira dismissed their stale review January 23, 2017 14:03

The problem was fixed.

@pirapira
Copy link
Contributor

I guess now it's between @axic and @chriseth .

@chriseth
Copy link
Contributor Author

@axic can this be merged?

@axic
Copy link
Contributor

axic commented Jan 26, 2017

The accessor function only provides the external implementation.

I would have assumed it provides both the internal and the external interface. Isn't that a bug in that case?

@chriseth
Copy link
Contributor Author

No, internally, you get a storage variable and not a function that returns the value of the storage variable.

@chriseth
Copy link
Contributor Author

@axic Please note that this particular PR just fixes the token so that it compiles again. This is unrelated to the decision about whether or not public storage variables are considered implementors of public functions.

@chriseth chriseth merged commit f9af2de into develop Jan 31, 2017
@axic axic deleted the fixStdToken branch February 1, 2017 22:04
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

Successfully merging this pull request may close these issues.

3 participants