Avatar
0
monkey Enlightened
monkey Enlightened
Blockchain: làm sao chuyển eth ra khỏi contract?
Làm sao chuyển eth ra khỏi contract?
  • Answer
blockchain contract
Remain: 5
1 Answer
Avatar
monkey Enlightened
monkey Enlightened
Trong contract tạo ra hàm thế này:

function returnBNB(address to, uint amount) public onlyOwner {
   payable(to).transfer(amount);
}

Tham khảo: https://medium.com/coinmonks/solidity-transfer-vs-send-vs-call-function-64c92cfc878a

  • 0
  • Reply