|
| 1 | +import { Callout } from "@doc"; |
| 2 | + |
1 | 3 | # FAQ |
2 | 4 |
|
3 | 5 | ## About Engine |
@@ -45,6 +47,51 @@ Here are three ways to determine when the job is mined: |
45 | 47 | }; |
46 | 48 | ``` |
47 | 49 |
|
| 50 | +### How do I override gas settings? |
| 51 | + |
| 52 | +To override the gas settings, set `txOverrides` in the request body for any write transaction. |
| 53 | +Each field is optional and will be estimated by Engine if omitted. |
| 54 | + |
| 55 | +Here's an example request body for a transfer transaction: |
| 56 | +```json |
| 57 | +{ |
| 58 | + // Arguments for a transfer transaction |
| 59 | + "to": "0xA954fC66de1F90cFB4f29F0ABa391412406820B7", |
| 60 | + "amount": "0.5", |
| 61 | + |
| 62 | + // 👇 Specify these overrides based on your chain's gas settings |
| 63 | + txOverrides: { |
| 64 | + // The limit of gas units to use for this transaction. |
| 65 | + gas: "530000", |
| 66 | + // The max fee (e.g. gas price) to use in wei. |
| 67 | + maxFeePerGas: "1000000000", |
| 68 | + // The max priority fee to use in wei. |
| 69 | + maxPriorityFeePerGas: "1000000000", |
| 70 | +} |
| 71 | +``` |
| 72 | + |
| 73 | +<Callout variant='warning' title="It is highly recommended to set a timeout when setting a maxFeePerGas."> |
| 74 | + |
| 75 | +Otherwise if gas prices don't fall, transactions may be in your queue indefinitely. |
| 76 | + |
| 77 | +</Callout> |
| 78 | + |
| 79 | +### How do I set a timeout on transactions? |
| 80 | + |
| 81 | +To Set the `txOverrides` |
| 82 | +Engine will drop transactions if they are not sent before the timeout. |
| 83 | +Note: A transaction that is already sent may be mined after this timeout. |
| 84 | + |
| 85 | +```json |
| 86 | +{ |
| 87 | + // ...other arguments in the write transaction |
| 88 | + |
| 89 | + // 👇 Specify this override. Here's an example of a 2 hour timeout. |
| 90 | + txOverrides: { |
| 91 | + timeoutSeconds: 7200, |
| 92 | +} |
| 93 | +``` |
| 94 | + |
48 | 95 | ### How do I customize my RPC? |
49 | 96 |
|
50 | 97 | Use [Update Chain Configuration](https://redocly.github.io/redoc/?url=https://demo.web3api.thirdweb.com/json#tag/Configuration/operation/updateChainsConfiguration) to override a chain's settings. |
|
0 commit comments