I have a contract that sends a small fee to the owner. It works perfectly fine but when I change the owner to an address which contains another contract it always causes an error when viewed on the block chain explorer (that and the balance is never received by the receiving contract).

The bug seems to have been recognized on Github but I'm having trouble with the work around suggested:


My implementation looks like:


It compiles fine but the fee is never sent. Am I doing it wrong or is this a current limitation of the platform?


1 Answer 1


Often, when you send to another contract, you run into an out-of-gas error. This can be fixed by manually setting the gas that you want to supply, using the .gas() property.


This will supply all of the remaining gas, minus 5000 for any computations you need to do later. You can also use a fixed value, and adjust as needed. The call will return true if the transfer succeeded, and false if it ran out of gas and reverted, so check the value and plan accordingly.


Not the answer you're looking for? Browse other questions tagged or ask your own question.