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
16 changes: 7 additions & 9 deletions cookbook/cookbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -2402,18 +2402,16 @@ After the `10-epoch unbonding period` is complete, we can proceed with withdrawi
```

### Relayed transactions
We are currently on the `third iteration (V3)` of relayed transactions. V1 and V2 will soon be deactivated, so we will focus on V3.
We are currently on the third iteration (V3) of relayed transactions. V1 and V2 will be deactivated soon, so we'll focus on V3.

For V3, two new fields have been added to transactions:
- relayer
- relayerSignature
For V3, two new fields have been added on transactions: `relayer` and `relayerSignature`.

Signing Process:
1. The relayer must be set before the sender signs the transaction.
2. Once the sender has signed, the relayer can also sign the transaction and broadcast it.
Note that:
1. the sender and the relayer can sign the transaction in any order.
2. before any of the sender or relayer can sign the transaction, the `relayer` field must be set.
Comment thread
andreibancioiu marked this conversation as resolved.
3. relayed transactions require an additional `50,000` of gas.
4. the sender and the relayer must be in the same network shard.
Comment thread
andreibancioiu marked this conversation as resolved.

**Important Consideration**:
Relayed V3 transactions require an additional `50,000` gas.
Let’s see how to create a relayed transaction:

```js
Expand Down
22 changes: 10 additions & 12 deletions cookbook/relayed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,16 @@ import { Account, Address, DevnetEntrypoint, Transaction } from "../src"; // md-
// md-start
(async () => {
// ### Relayed transactions
// We are currently on the `third iteration (V3)` of relayed transactions. V1 and V2 will soon be deactivated, so we will focus on V3.

// For V3, two new fields have been added to transactions:
// - relayer
// - relayerSignature

// Signing Process:
// 1. The relayer must be set before the sender signs the transaction.
// 2. Once the sender has signed, the relayer can also sign the transaction and broadcast it.

// **Important Consideration**:
// Relayed V3 transactions require an additional `50,000` gas.
// We are currently on the third iteration (V3) of relayed transactions. V1 and V2 will be deactivated soon, so we'll focus on V3.
//
// For V3, two new fields have been added on transactions: `relayer` and `relayerSignature`.
//
// Note that:
// 1. the sender and the relayer can sign the transaction in any order.
// 2. before any of the sender or relayer can sign the transaction, the `relayer` field must be set.
Comment thread
andreibancioiu marked this conversation as resolved.
// 3. relayed transactions require an additional `50,000` of gas.
// 4. the sender and the relayer must be in the same network shard.
Comment thread
andreibancioiu marked this conversation as resolved.
//
// Let’s see how to create a relayed transaction:

// ```js
Expand Down
Loading