Skip to content

Commit 3952cdc

Browse files
authored
Merge pull request #1081 from multiversx/relayed-fix-18
Update docs for relayed transactions
2 parents 5a59458 + 8b14cac commit 3952cdc

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

docs/developers/relayed-transactions.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ Once all applications will completely transition to relayed v3 model, v1 and v2
3030

3131
## Relayed transactions version 1
3232

33+
:::note
34+
Legacy version. Please use [version 3](#relayed-transactions-version-3), instead.
35+
:::
36+
3337
A relayed transaction version 1 relies on having the inner transaction JSON serialized and given as an argument to the `relayedTx` protocol function.
3438

3539
It would look like:
@@ -165,6 +169,10 @@ gasLimit = 61040000 // just like the gas limit set in the relayed transaction
165169

166170
## Relayed transactions version 2
167171

172+
:::note
173+
Legacy version. Please use [version 3](#relayed-transactions-version-3), instead.
174+
:::
175+
168176
In contrast with version 1, relayed transactions version 2 have only certain fields of the inner transaction included
169177
in the data field, making the payload smaller, therefore the tx fee smaller. It also eliminates the need of calculating
170178
the matching gas limit values between the relayed and inner transactions.
@@ -249,10 +257,6 @@ Decoding the arguments ([useful resources here](/developers/sc-calls-format/)) w
249257

250258
## Relayed transactions version 3
251259

252-
:::note
253-
This feature is not yet available on **Mainnet**. See [Spica Protocol Upgrade](https://governance.multiversx.com/proposal/erd1qqqqqqqqqqqqqpgq4qvrwlr2e6ld50f3qfc94am38p8298kthg4s3f0vfn/1).
254-
:::
255-
256260
Relayed transactions v3 feature comes with a change on the entire transaction structure, adding two new optional fields:
257261
- `relayer`, which is the relayer address that will pay the fees.
258262
- `relayerSignature`, the signature of the relayer that proves the agreement of the relayer.
@@ -316,3 +320,11 @@ Here's an example of a relayed v3 transaction. Its intent is to call the `add` m
316320
"relayerSignature": "..."
317321
}
318322
```
323+
324+
### Preparing relayed transactions using the SDKs
325+
326+
The SDKs have built-in support for relayed transactions. Please follow:
327+
- [mxpy support](/sdk-and-tools/sdk-py/mxpy-cli/#relayed-transactions-v3)
328+
- [sdk-py support](/sdk-and-tools/sdk-py/sdk-py-cookbook/#relayed-transactions)
329+
- [sdk-js v14 support](/sdk-and-tools/sdk-js/sdk-js-cookbook-v14#relayed-transactions)
330+
- [sdk-js v13 support (legacy)](/sdk-and-tools/sdk-js/sdk-js-cookbook-v13#preparing-a-relayed-transaction)

0 commit comments

Comments
 (0)