Rewriting Solidity statements on sending money

by user3509406   Last Updated April 15, 2019 07:28 AM - source

I want to rewrite




But I am not sure what a signature string must be given for the part of the three question marks. The original statement is simply a sending of money amounting 'amount', and so if the receiver account is a contract, its fallback function must be called. This is my understanding. Then, my question seems to be what is a signature for fallback function.

The reason for the rewriting is because of this.

I have a solc compiler version 0.5.7 but the Solidity example program that I try to compile has a declaration of pragma 0.4.8.

If I simply change the version number, I will get a compilation error for


because the style of the statement seems to be old and it is not supported by the solidity compiler version 0.5.7.

Can you please help me out to resolve this issue?

Thanks in advance.

Tags : solidity

Related Questions

How to map an address with a string array in solidity?

Updated October 09, 2018 12:28 PM

How to handle dynamic size string array in solidity?

Updated November 28, 2018 04:28 AM

What is the status of forbidden call in constructor?

Updated December 12, 2018 08:28 AM

How can I pass struct from one contract to another?

Updated January 10, 2019 23:28 PM

How to transfer Ether to ERC20 token contract?

Updated July 23, 2018 00:28 AM