2

I am using MetaMask chrome extension, for my Dapp. I have a function which needs to transfer some amount to another account. This amount is of the order 200 to 800 wei. How do I set msg.value() attribute in MetaMask popup window?

This feature can be seen on remix, but I could not find it on MetaMask?

2

Worked for me:

web3.eth.sendTransaction({
  to:'0xf17f52151EbEF6C7334FAD080c5704D77216b732', 
  from:'0xf17f52151EbEF6C7334FAD080c5704D77216b732', 
  value:web3.toWei("0.5", "ether")
}, console.log)

enter image description here

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.