Lesson 4: what does the line "addressToAmountFunded[msg.sender] += msg.value;" in Fundme.sol means? #3240
Replies: 1 comment 2 replies
-
An address on the blockchain has sent funds to your contract. Keep track of that blockchain address and the amount that was sent to your contract from that address.
An address on the blockchain has sent funds to your contract. Keep track of that blockchain address and the amount that was sent to your contract from that address. If that address has previously sent funds to your contract, add the new value to the last value that was sent.
is short hand for
SEE: https://docs.soliditylang.org/en/v0.8.13/control-structures.html?#scoping-and-declarations
or
is a better way to write it than
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
In the Contract FundMe in lesson 4 at line 20 at time 4:29:46 the code is "addressToAmountFunded[msg.sender] = msg.value;"
, but later the code has been changed to "addressToAmountFunded[msg.sender] += msg.value;" , what does the new code signifies?
Beta Was this translation helpful? Give feedback.
All reactions