0

I am making Dapp in which a user wants to pay or transfer certain number of Ethers to another Account. I am using truffle to build the dapp. In which including other features Users has a frontend to transfer Ether from his account to account he provides. i.e

Input for Number of ethers

Input for account address

Send ethers button

The problem i am facing is how can i transfer ethers from my account to account i have provided with Smart Contract?

reciever.transfer(amount)

is throwing an gas limit error which is confusing me as i have 100 ethers in my account.

Sending funds to a contract and have it immediately forward to a given address?

whatever the workaround could be, just that does the job of moving Ethers from one account to the given account. From frontend of my app.

  • 1
    You may want to edit your question to clarify more what you're trying to accomplish. Sending funds to a contract and have it immediately forward to a given address? Send funds to a contract and then send it in another transaction? Or have a contract withdraw from your wallet and send to another address? – flygoing Nov 15 '17 at 14:20
1

A contract can only send its own funds. It cannot send funds that belong to another address.

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.