Can any one help me to find the solution, if I received a Ether in my wallet, I should be able to send 1% back to the Payee automatically?
Thanks Amit M
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.
Sign up to join this communityCan any one help me to find the solution, if I received a Ether in my wallet, I should be able to send 1% back to the Payee automatically?
Thanks Amit M
This can not be achieved from a 'normal' wallet address. Instead you will need to write and deploy a smart contract.
Here is an example of a smart contract written in Solidity.
Have a read through, and have a play. Distic has detailed a basic example which will achieve what you want.
You can get some free Ether on the Ropsten test network to practice and verify that your code works as expected.
I don't think you can do that directly, but you can deploy a smart contract with the following instructions:
function () public payable {
msg.sender.send(msg.value*0.01);
myAddress.send(msg.value*0.99);
}
where myAddress is your address. Then you will have to ask the payee to send his ether to your contract's address.