Skip to content

Commit 6347a73

Browse files
committed
add value, fix json
1 parent db9b663 commit 6347a73

File tree

2 files changed

+39
-24
lines changed

2 files changed

+39
-24
lines changed

apps/portal/src/app/engine/faq/page.mdx

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -47,26 +47,39 @@ Here are three ways to determine when the job is mined:
4747
};
4848
```
4949

50+
### How do I send native currency with my transaction?
51+
52+
To send native tokens (e.g. ETH on Ethereum), set `txOverrides.value`.
53+
This may be required when calling a `payable` contract method.
54+
55+
Here's an example of sending 0.2 ETH:
56+
57+
```json
58+
{
59+
// ...other arguments in the write transaction
60+
61+
"txOverrides": {
62+
"value": "200000000000000000"
63+
}
64+
}
65+
```
66+
5067
### How do I override gas settings?
5168

52-
To override the gas settings, set `txOverrides` in the request body for any write transaction.
69+
To override the gas settings, set relevant `txOverrides` gas fields.
5370
Each field is optional and will be estimated by Engine if omitted.
5471

55-
Here's an example request body for a transfer transaction:
72+
Here's an example of setting a gas limit of 210,000 gas units, 1 gwei max fee, and 1 gwei max priority fee:
73+
5674
```json
5775
{
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",
76+
// ...other arguments in the write transaction
77+
78+
"txOverrides": {
79+
"gas": "210000",
80+
"maxFeePerGas": "1000000000",
81+
"maxPriorityFeePerGas": "1000000000"
82+
}
7083
}
7184
```
7285

@@ -78,17 +91,19 @@ Otherwise if gas prices don't fall, transactions may be in your queue indefinite
7891

7992
### How do I set a timeout on transactions?
8093

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.
94+
To specify a transaction timeout, set `txOverrides.timeoutSeconds`.
95+
Engine flags transactions as `errored` if they are not sent before the timeout. An `errored` webhook will be sent.
96+
97+
Note: A transaction sent before the timeout may be mined after the timeout.
8498

99+
Here's an example of a 2-hour timeout:
85100
```json
86101
{
87102
// ...other arguments in the write transaction
88103

89-
// 👇 Specify this override. Here's an example of a 2 hour timeout.
90-
txOverrides: {
91-
timeoutSeconds: 7200,
104+
"txOverrides": {
105+
"timeoutSeconds": 7200
106+
}
92107
}
93108
```
94109

apps/portal/src/app/engine/features/contracts/page.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ To send native tokens to a payable method (e.g. ETH on Ethereum), set `txOverrid
7575

7676
```json
7777
{
78-
functionName: "...",
79-
args: [ ... ],
80-
txOverrides: {
81-
value: 1000000000000000, // 0.001 ETH in wei
78+
"functionName": "...",
79+
"args": [ ... ],
80+
"txOverrides": {
81+
"value": "1000000000000000", // 0.001 ETH in wei
8282
}
8383
}
8484
```

0 commit comments

Comments
 (0)