-
Hello eveyrone, First, I highly appreciate Patrick and all the community members here to help out the newbies like I am. My query for the FundMe.sol project in the course, screenshot uploaded below: The transfer function uses 2300 gas. When I withdrew funds, it costs 37,146 gas. Does this include both 21,000 as well as 2300 gas ? Also, this is my first post in the discussion section. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
It is because the |
Beta Was this translation helpful? Give feedback.
It is because the
withdraw()
function is gas-intensive as it employs the use of a for loop - Patrick explains gas optimization in the early chapters, so look out for that! Let me know if this helps!