Skip to content
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
62 changes: 62 additions & 0 deletions apps/portal/src/app/engine/faq/page.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { Callout } from "@doc";

# FAQ

## About Engine
Expand Down Expand Up @@ -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"
}
}
```

<Callout variant='warning' title="It is highly recommended to set a timeout when setting a maxFeePerGas.">

Otherwise if gas prices don't fall, transactions may be in your queue indefinitely.

</Callout>

### 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.
Expand Down
26 changes: 4 additions & 22 deletions apps/portal/src/app/engine/features/contracts/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading