mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #5288 from ethereum/docs-external-call-tx-faq
DOCS: Move FAQ item regarding contract to contract calls and tx
This commit is contained in:
commit
f5f977eaf5
@ -126,6 +126,10 @@ actual contract has not been created yet.
|
|||||||
Functions of other contracts have to be called externally. For an external call,
|
Functions of other contracts have to be called externally. For an external call,
|
||||||
all function arguments have to be copied to memory.
|
all function arguments have to be copied to memory.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
A function call from one contract to another does not create its own transaction,
|
||||||
|
it is a message call as part of the overall transaction.
|
||||||
|
|
||||||
When calling functions of other contracts, the amount of Wei sent with the call and
|
When calling functions of other contracts, the amount of Wei sent with the call and
|
||||||
the gas can be specified with special options ``.value()`` and ``.gas()``, respectively::
|
the gas can be specified with special options ``.value()`` and ``.gas()``, respectively::
|
||||||
|
|
||||||
|
@ -213,14 +213,6 @@ It gets added to the total balance of the contract, just like when you send ethe
|
|||||||
You can only send ether along to a function that has the ``payable`` modifier,
|
You can only send ether along to a function that has the ``payable`` modifier,
|
||||||
otherwise an exception is thrown.
|
otherwise an exception is thrown.
|
||||||
|
|
||||||
Is it possible to get a tx receipt for a transaction executed contract-to-contract?
|
|
||||||
===================================================================================
|
|
||||||
|
|
||||||
No, a function call from one contract to another does not create its own transaction,
|
|
||||||
you have to look in the overall transaction. This is also the reason why several
|
|
||||||
block explorer do not show Ether sent between contracts correctly.
|
|
||||||
|
|
||||||
|
|
||||||
******************
|
******************
|
||||||
Advanced Questions
|
Advanced Questions
|
||||||
******************
|
******************
|
||||||
|
Loading…
Reference in New Issue
Block a user