Skip to content

[DOCS] Merge payable FAQ item #5796

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

Merged
merged 1 commit into from
Jan 21, 2019
Merged

[DOCS] Merge payable FAQ item #5796

merged 1 commit into from
Jan 21, 2019

Conversation

ChrisChinchilla
Copy link
Contributor

@ChrisChinchilla ChrisChinchilla commented Jan 16, 2019

Merge payable FAQ item into docs, part of #1219

Checklist

  • Code compiles correctly
  • All tests are passing
  • New tests have been created which fail without the change (if possible)
  • README / documentation was extended, if necessary
  • Changelog entry (if change is visible to the user)
  • Used meaningful commit messages

@codecov
Copy link

codecov bot commented Jan 16, 2019

Codecov Report

Merging #5796 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #5796   +/-   ##
========================================
  Coverage    88.35%   88.35%           
========================================
  Files          348      348           
  Lines        33378    33378           
  Branches      3998     3998           
========================================
  Hits         29492    29492           
  Misses        2532     2532           
  Partials      1354     1354
Flag Coverage Δ
#all 88.35% <ø> (ø) ⬆️
#syntax 28.35% <ø> (ø) ⬆️

What happens if you send ether along with a function call to a contract?
========================================================================

It gets added to the total balance of the contract, just like when you send ether when creating a contract.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd add this to https://solidity.readthedocs.io/en/v0.5.2/structure-of-a-contract.html#functions. Or is this explained somewhere else?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I feel like it's mentioned enough in docs/contracts/functions.rst (See the commits), but let me know what you think. When that's done I'll rebase @ekpyron

Copy link
Member

@axic axic Jan 18, 2019

Choose a reason for hiding this comment

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

This is the current functions sections:

Function Calls can happen internally or externally and have different levels of visibility towards other contracts. Functions accept parameters and return variables to pass parameters and values between them.

I'd say it would be reasonable to include something along the lines "Functions can also have special attributes (modifiers?), like payable [link here]"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@axic In the section below this paragraph is a section about function modifiers. Thing is, in your suggestion you mention linking to a list of function modifiers, and I agree, there isn't really a list (in one place) of what's available. So I think creating one is a good idea, but perhaps out of scope of this PR?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@ChrisChinchilla That sounds like a good idea. Let's create an issue for that and merge this one :)

@ekpyron
Copy link
Member

ekpyron commented Jan 17, 2019

Needs to be rebased.

erak
erak previously approved these changes Jan 21, 2019
What happens if you send ether along with a function call to a contract?
========================================================================

It gets added to the total balance of the contract, just like when you send ether when creating a contract.
Copy link
Collaborator

Choose a reason for hiding this comment

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

@ChrisChinchilla That sounds like a good idea. Let's create an issue for that and merge this one :)

@ChrisChinchilla
Copy link
Contributor Author

ChrisChinchilla commented Jan 21, 2019

@bit-shift And there was a merge conflict, will need that approval again, sorry!

@chriseth chriseth merged commit 8f694d5 into develop Jan 21, 2019
@axic axic deleted the faq-send-payable branch January 22, 2019 02:24
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.

5 participants