How use payable function using interface of browser solidity IDE Remix ? http://ethereum.github.io/browser-solidity/#version=soljson-v0.4.11+commit.68ef5810.js

enter image description here

1 Answer 1


A payable function like in the following contract

pragma solidity ^0.4.0;
contract testPay {
    function pay() payable {

can be used just like a normal function call by clicking the button. Additionally, you can send Ether to the smart contract by filling out the Value field on the top, e.g. here I sent along 1 Ether enter image description here

Once you click the button, not only your function will be called but also the contract will receive 1 Ether. Note that the default units are Ether not Wei.

  • Thanks for the answer. My question is then, how and where the received Ether is stored?
    – user153465
    Aug 9, 2017 at 15:35
  • It is stored at the contract address.
    – Bryan
    Jan 27 at 0:42

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.