Here is my contract
pragma solidity ^0.4.14;
contract Sample {
address private receiver;
uint public amount;
function pay(address _receiver, uint _amount) payable public returns (bool) {
receiver = _receiver;
amount =_amount;
receiver.transfer(amount);
return true;
}
}
The error i am getting is,
transact to browser/ballot.sol:Sample.pay errored: VM error: revert. revert The transaction has been reverted to the initial state. Debug the transaction to get more information.