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: docs/sdk-and-tools/mxpy/mxpy-cli.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -305,6 +305,26 @@ We can remove an address from the config using the alias of the address and the
305
305
mxpy config-wallet remove --alias alice
306
306
```
307
307
308
+
## Estimating the Gas Limit for transactions
309
+
310
+
mxpy (version 11.1.0 and later) can automatically estimate the required gas limit for transactions when a proxy URL is provided. The estimation works by simulating the transaction before sending it.
311
+
312
+
While the estimation is generally accurate, it's recommended to add a safety margin to account for potential state changes. This can be done in two ways:
313
+
314
+
1. Per transaction, using the `--gas-limit-multiplier` flag:
315
+
316
+
```sh
317
+
mxpy tx new --gas-limit-multiplier 1.1 ...
318
+
```
319
+
320
+
2. As a global default setting in the config:
321
+
322
+
```sh
323
+
mxpy config set gas_limit_multiplier 1.1
324
+
```
325
+
326
+
A multiplier of 1.1 (10% increase) is typically sufficient for most transactions.
0 commit comments