You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: public/content/developers/docs/transactions/index.md
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -160,15 +160,20 @@ The base fee will be burned **-0.00399 ETH**
160
160
161
161
Validator keeps the tip **+0.000210 ETH**
162
162
163
-
In case of an interaction with a smart contract there is 2 cases possible:
164
-
1. A `view` or `pure` function (as described in [solidity documentation](https://docs.soliditylang.org/en/v0.8.23/contracts.html#view-functions)) is called from an EOA. In that specific case, no gas will be paid by the caller and the result will be returned. The underlying RPC call for this scenario is [eth_call](https://ethereum.org/en/developers/docs/apis/json-rpc#eth_call)
165
-
2. In any other cases gas will be paid by the caller. Which mean: calling a `view` or `pure` function internally (ie: not from an EAO) will cost gas.
166
163
167
164

168
165
_Diagram adapted from [Ethereum EVM illustrated](https://takenobu-hs.github.io/downloads/ethereum_evm_illustrated.pdf)_
169
166
170
167
Any gas not used in a transaction is refunded to the user account.
Gas is required for any transaction that alters the state of a smart contract.
172
+
173
+
Therefore, calling a [`view`](https://docs.soliditylang.org/en/latest/contracts.html#view-functions) or [`pure`](https://docs.soliditylang.org/en/latest/contracts.html#pure-functions) function from an EOA will not require any gas. The underlying RPC call for this scenario is [`eth_call`](/developers/docs/apis/json-rpc#eth_call)
174
+
175
+
However calling a `view` or `pure` function internally (ie: from the contract itself or from another contract) will cost gas.
176
+
172
177
## Transaction lifecycle {#transaction-lifecycle}
173
178
174
179
Once the transaction has been submitted the following happens:
0 commit comments