Skip to content

fundMe contract - payable function #317

Answered by alymurtazamemon
minchillo4 asked this question in Q&A
Discussion options

You must be logged in to vote

@minchillo4

The payable keyword will not force you to send funds while deploying.

Adding the payable keyword in the function's signature will allow us to receive msg.value (funds) inside that function.

require on the other hand will verify that either we have sent the required amount, if not then will throw error (message on the right side).

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by PatrickAlphaC
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants