Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarified behaviour of eth_call strict parameter #1454

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion docs/public-networks/reference/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1980,7 +1980,12 @@ By default, the `eth_call` error response includes the [revert reason](../../../

:::note

By default, `eth_call` does not fail if the sender account has an insufficient balance. This is done by setting the balance of the account to a large amount of ether. To enforce balance rules, set the [`strict` parameter](objects.md#transaction-call-object) in the transaction call object to `true`.
The [`strict` parameter](objects.md#transaction-call-object) determines if the sender account balance is checked:
* If `strict:true`, the balance is checked and `eth_call` fails if the sender account has an insufficient balance to send the transaction with the specified gas parameters.
* If `strict:false`, the balance is not checked and `eth_call` can succeed even if the sender account has an insufficient balance.
* If `strict` is not specified, the balance is checked against the gas parameters if supplied.

If you do not want the sender account balance checked, send zero gas or specify `strict:false`.

:::

Expand Down
2 changes: 1 addition & 1 deletion docs/public-networks/reference/api/objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ All transaction call object parameters are optional.
| `value` | Quantity, Integer | Value transferred, in Wei. |
| `data` or `input` | Data | Hash of the method signature and encoded parameters. For details, see [Ethereum Contract ABI](https://solidity.readthedocs.io/en/develop/abi-spec.html). |
| `accessList` | Array | List of addresses and storage keys that the transaction plans to access. Used only in non-[`FRONTIER`](../../concepts/transactions/types.md#frontier-transactions) transactions. |
| `strict` | Tag | If `true`, checks that the `from` account’s ether balance is sufficient to cover the transaction and gas fee. If `false`, the `gasPrice` and `baseFee` are set to zero, in order to simulate a transaction without enforcing a balance check. The default is `false`. |
| `strict` | Tag | Determines if the sender account balance is checked. If `true`, the balance is checked. If `false`, the balance is not checked. If not specified, the balance is checked against the gas parameters if supplied.|

## Transaction receipt object

Expand Down