There are 3 different ways to send ether in solidity. #17
AnandK-2024
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
There are 3 different ways to send ether in solidity.
𝙒𝙝𝙞𝙘𝙝 𝙤𝙣𝙚 𝙞𝙨 𝙗𝙚𝙨𝙩 𝙩𝙝𝙚𝙣⁉️
Well it depends on the situation of the user. If we have just to log an event at the receiving contract then .send or .transfer is good to follow. I would prefer .transfer in this two as it propagates every exception.🤔
But if we want to send some extra gas then we should use .call.value but on the other fact we should make sure to check the re-entrancy.
Beta Was this translation helpful? Give feedback.
All reactions