pragma solidity ^0.4.23; contract Hotelbooking{ address receiver; function deposit(uint256 _amount) payable public { require(msg.value == _amount); // nothing else to do! } function Execution (address _Address, uint _Amount) { receiver = _Address; receiver.transfer(_Amount); } function getBalance() public view returns (uint256) { return address(this).balance; } } I want to write a block chain application to transfer ether from one account to another
I tried more blogs and stack overflow questions but nothing is helping me.
I deployed using truffle with following commands
Hotelbooking.deployed().then(function(i){app = i})
app.Execution(web3.eth.accounts[1],10)
I tried every blog and stack overflow q&a. I want to transfer ether from one account to another I am getting following error
at XMLHttpRequest._onHttpResponseEnd (/usr/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:509:1) at XMLHttpRequest._setReadyState (/usr/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:354:1) at XMLHttpRequestEventTarget.dispatchEvent (/usr/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:64:1) at XMLHttpRequest.request.onreadystatechange (/usr/lib/node_modules/truffle/build/webpack:/~/web3/lib/web3/httpprovider.js:128:1) at /usr/lib/node_modules/truffle/build/webpack:/packages/truffle-provider/wrapper.js:134:1 at /usr/lib/node_modules/truffle/build/webpack:/~/web3/lib/web3/requestmanager.js:86:1 at Object.InvalidResponse (/usr/lib/node_modules/truffle/build/webpack:/~/web3/lib/web3/errors.js:38:1)