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

Cleaned up and modified global variables documentation #612

Merged
merged 23 commits into from
Jun 6, 2016
Merged

Cleaned up and modified global variables documentation #612

merged 23 commits into from
Jun 6, 2016

Conversation

Denton-L
Copy link
Contributor

No description provided.

Address Related
---------------

``<address>.balance`` (``uint256``):
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add links to the address type here and from the address type to here, so that we do not forget updating both if something changes.

To be sure that your contract can receive Ether in that way, check the gas requirements of the fallback function.
- If you want to send ether using ``address.send``, there are certain details to be aware of:
1. If the recipient is a contract, it causes its fallback function to be executed which can in turn call back into the sending contract
2. Sending Ether can fail due to the call depth going above 1024. Since the caller is in total control of the call
Copy link
Contributor Author

Choose a reason for hiding this comment

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

What is the maximum call depth? Is it >1024 or >= 1024? This line, and the line mentioning 1023, makes this a little confusing.

Copy link
Contributor

@chriseth chriseth Jun 1, 2016

Choose a reason for hiding this comment

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

The maximum depth is 1024, but it is not clear whether the first call is at depth 0 or at depth 1 :-)

@Denton-L
Copy link
Contributor Author

Denton-L commented Jun 2, 2016

Updated. Also, it actually passes the Travis CI build now.

``<address>.send(uint256 amount) returns (bool)``:
send given amount of Wei to address, returns ``false`` on failure

For more information, see the section on :ref:`address`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you delete this line?

Copy link
Contributor Author

@Denton-L Denton-L Jun 2, 2016

Choose a reason for hiding this comment

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

I incorporated the links into the lines above, in the description. This is more in line with how it was done in other sections, like the one right below it.

Copy link
Contributor

Choose a reason for hiding this comment

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

But now it does not say anymore that more information can be found behind that link. Shouldn't we mention that?

@Denton-L
Copy link
Contributor Author

Denton-L commented Jun 3, 2016

Alright, added that section back in.

@chriseth chriseth merged commit e97ac4f into ethereum:develop Jun 6, 2016
@Denton-L Denton-L deleted the global-variables branch June 10, 2016 17:51
@Denton-L Denton-L restored the global-variables branch June 16, 2016 15:17
@Denton-L Denton-L deleted the global-variables branch June 16, 2016 15:17
axic pushed a commit that referenced this pull request Nov 20, 2018
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.

2 participants