I want to transfer 10 ether from smart contract to an account in metamask. I used the following script inside my smart contract :

 function transferBalance(address payable Add) public{
       Add.transfer(10 ether);

It is not working and I got the following message on metamsak.

enter image description here

and I got the following error on the console: enter image description here

I would appreciate your help.

  • Does the contract have 10 ether? – Rob Hitchens Mar 15 at 17:25
  • If not, send 10 eth to the contract and then try it. – Rob Hitchens Mar 15 at 17:34
  • contract has balance more than 10 ether but not sure why it is not working. – Heba Mar 15 at 17:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.