34: Sending Ether
Using send
function sendEther() public {
address recipient = 0x12345...;
uint amount = 10 ether;
address(this).send(amount);
}Using transfer
function sendEther() public {
address recipient = 0x12345...;
uint amount = 10 ether;
address(this).transfer(recipient, amount);
}Using call
Last updated