diff --git a/apps/portal/src/app/engine/faq/page.mdx b/apps/portal/src/app/engine/faq/page.mdx index b36169a4364..875d8ecdefa 100644 --- a/apps/portal/src/app/engine/faq/page.mdx +++ b/apps/portal/src/app/engine/faq/page.mdx @@ -1,3 +1,5 @@ +import { Callout } from "@doc"; + # FAQ ## About Engine @@ -45,6 +47,66 @@ Here are three ways to determine when the job is mined: }; ``` +### How do I send native currency with my transaction? + +To send native tokens (e.g. ETH on Ethereum), set `txOverrides.value`. +This may be required when calling a `payable` contract method. + +Here's an example of sending 0.2 ETH: + +```json +{ + // ...other arguments in the write transaction + + "txOverrides": { + "value": "200000000000000000" + } +} +``` + +### How do I override gas settings? + +To override the gas settings, set relevant `txOverrides` gas fields. +Each field is optional and will be estimated by Engine if omitted. + +Here's an example of setting a gas limit of 210,000 gas units, 1 gwei max fee, and 1 gwei max priority fee: + +```json +{ + // ...other arguments in the write transaction + + "txOverrides": { + "gas": "210000", + "maxFeePerGas": "1000000000", + "maxPriorityFeePerGas": "1000000000" + } +} +``` + + + +Otherwise if gas prices don't fall, transactions may be in your queue indefinitely. + + + +### How do I set a timeout on transactions? + +To specify a transaction timeout, set `txOverrides.timeoutSeconds`. +Engine flags transactions as `errored` if they are not sent before the timeout. An `errored` webhook will be sent. + +Note: A transaction sent before the timeout may be mined after the timeout. + +Here's an example of a 2-hour timeout: +```json +{ + // ...other arguments in the write transaction + + "txOverrides": { + "timeoutSeconds": 7200 + } +} +``` + ### How do I customize my RPC? 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. diff --git a/apps/portal/src/app/engine/features/contracts/page.mdx b/apps/portal/src/app/engine/features/contracts/page.mdx index 705264d7cbd..183f47c6894 100644 --- a/apps/portal/src/app/engine/features/contracts/page.mdx +++ b/apps/portal/src/app/engine/features/contracts/page.mdx @@ -75,32 +75,14 @@ To send native tokens to a payable method (e.g. ETH on Ethereum), set `txOverrid ```json { - functionName: "...", - args: [ ... ], - txOverrides: { - value: 1000000000000000, // 0.001 ETH in wei + "functionName": "...", + "args": [ ... ], + "txOverrides": { + "value": "1000000000000000", // 0.001 ETH in wei } } ``` -### Override gas settings - -To override the gas settings for your transaction, set `txOverrides` in the request body to any write transaction. Each of these fields are optional and will be estimated by Engine if omitted. - -```json -{ - functionName: "...", - args: [ ... ], - txOverrides: { - // The limit of gas units to use for this transaction. - gas: "530000", - // The max fee (e.g. gas price) to use in wei. - maxFeePerGas: "1000000000", - // The max priority fee to use in wei. - maxPriorityFeePerGas: "1000000000", -} -``` - ## Read from a contract ```ts