Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 64551

The payable modifier in Solidity can be used to make smart contract functions able to receive either, or to make Ether transfers to address variables possible.

1 vote

When does a payable function "claim" or "take" the sent ETH?

msg.value can be accessed globally, so yes check will be performed. In other words, require check will fail if you do not pass non-zero value when you call first() function.
Emrah's user avatar
  • 1,702
0 votes
Accepted

Payable function transaction failing

SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; contract Crowdfund { uint fundLimit = 3 ether; bool contractOpen = true; uint public balance = 0; function donate() external payable
Emrah's user avatar
  • 1,702
2 votes

How is this scam code transferring tokens to the unspecified wallet within?

It looks like coinmarketcap.com is a NPM package that returns the address of the hacker and has the Manager details. When you delete that import line, the Manager gives an error. The npm package is he …
Emrah's user avatar
  • 1,702