-
//transfer
payable(msg.sender).transfer(address(this).balance);
//send
bool sendSuccess = payable(msg.sender).send(address(this).balance);
require(sendSuccess, "Send failed");
// call
(bool callSuccess, ) = payable(msg.sender).call{value: address(this).balance}(""); this code transfers the complete amount from contract to account |
Beta Was this translation helpful? Give feedback.
Answered by
alfaqi
Jul 23, 2023
Replies: 1 comment
-
just change |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Atharv-02
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
just change
address(this).balance
to amount you want like10000000000000000
=> 0.01ETH