Skip to content

Mention that constant and payable are deprecated in the ABI spec#4549

Merged
axic merged 2 commits intodevelopfrom
deprecate-abi
Jul 25, 2018
Merged

Mention that constant and payable are deprecated in the ABI spec#4549
axic merged 2 commits intodevelopfrom
deprecate-abi

Conversation

@axic
Copy link
Copy Markdown
Contributor

@axic axic commented Jul 23, 2018

No description provided.

leonardoalt
leonardoalt previously approved these changes Jul 23, 2018
* ``components``: used for tuple types (more below).

- ``outputs``: an array of objects similar to ``inputs``, can be omitted if function doesn't return anything;
- ``payable``: ``true`` if function accepts ether, defaults to ``false``;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@axic One quick thing here… With lists, you can end the bullet points with whatever you want, but keep them consistent, or follow grammatically. So here the semi-colons might not really be needed. It's a very small thing, so feel free to ignore, and I can polish in the future.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I kept the original punctuation, not sure why semi-colon was used in the first place.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@axic No worries, an overall overhaul is due very soon anyway :)

The fields ``constant`` and ``payable`` are deprecated and will be removed in the future. Instead, the ``stateMutability`` field can be used to determine the same properties.

.. note::
Sending non-zero ether to non-payable function will throw. Don't do it.
Copy link
Copy Markdown

@ChrisChinchilla ChrisChinchilla Jul 25, 2018

Choose a reason for hiding this comment

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

@axic Throw what? Clarify what this means, and I think, if this is related to reverting state, @chriseth mentioned he wanted to start using that terminology instead of 'throw'.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good idea, will change all occurrences in this file. Before we had revert and "reverting the state", it was usually just "throw" referring to the language statement.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@axic Did you do this? Or was this more for me to do in the future?

@axic
Copy link
Copy Markdown
Contributor Author

axic commented Jul 25, 2018

@ChrisChinchilla @leonardoalt updated, ok to merge?

@axic axic merged commit e94eb1e into develop Jul 25, 2018
@axic axic deleted the deprecate-abi branch July 25, 2018 11:38
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