You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Flare Smart Accounts let an XRPL user execute arbitrary contract calls on Flare trough the [`Payment`](https://xrpl.org/docs/references/protocol/transactions/types/payment) transaction on the XRPL blockchain.
22
+
Flare Smart Accounts let an XRPL user execute arbitrary contract calls on Flare through an XRPL [`Payment`](https://xrpl.org/docs/references/protocol/transactions/types/payment) transaction.
23
23
Each personal account exposes an [EIP-4337](https://eips.ethereum.org/EIPS/eip-4337) style `executeUserOp` entry point that the [`MasterAccountController`](/smart-accounts/reference/IMasterAccountController) invokes when it processes a custom instruction memo.
24
24
25
-
Custom instructions carry the full call payload in the XRPL **memo** field.
26
-
The user signs a `PackedUserOperation`, ships it on XRPL, and the smart account replays it on the Flare blockchain.
25
+
The **full** custom instruction (memo opcode `0xFF`) carries the entire ABI-encoded `PackedUserOperation` in the XRPL memo immediately after a 10-byte header.
26
+
The user signs an XRPL `Payment`, ships the payload on XRPL, and the smart account replays the user operation on Flare with no further off-chain data.
27
+
For the alternative that ships only a 32-byte hash of the user operation and lets an executor deliver the bytes on Flare, see the [Hash Custom Instruction](/smart-accounts/hash-custom-instruction); the [comparison guide](/smart-accounts/custom-instruction-comparison) covers when to pick which.
27
28
28
29
:::warning No destination tags
29
30
XRPL transactions targeting smart accounts must not use a destination tag.
30
31
A destination tag forces [FAssets direct minting](/fassets/direct-minting) to credit the tag-holder, which would let an unrelated party front-run the user operation.
31
32
:::
32
33
34
+
## Memo layout
35
+
36
+
The XRPL memo carries a 10-byte instruction header followed by the ABI-encoded `PackedUserOperation`:
|`0`|`instructionId`|`0xFF` — full custom instruction |
41
+
|`1`|`walletId`| One-byte wallet identifier assigned by Flare; `0` if not registered |
42
+
|`2-9`|`executorFeeUBA`| Executor fee in the FAsset's smallest unit, big-endian `uint64`|
43
+
|`10+`|`userOpData`|`abi.encode(PackedUserOperation)` — the call payload the facet decodes |
44
+
45
+
The total memo length is `10 + len(abi.encode(userOp))` bytes.
46
+
The XRPL caps each memo at roughly `1024` bytes, so large or repetitive call batches may need to be split across multiple XRPL payments.
47
+
33
48
## User operation payload
34
49
35
50
The custom instruction payload has two layers: the outer EIP-4337 [`PackedUserOperation`](https://eips.ethereum.org/EIPS/eip-4337#useroperation) carried in the XRPL memo, and the inner [`executeUserOp(Call[])`](/smart-accounts/reference/IPersonalAccount#executeuserop) that the personal account runs once the controller dispatches it.
The [Custom Instruction overview](/smart-accounts/custom-instruction) explains how Flare smart accounts replay an [EIP-4337](https://eips.ethereum.org/EIPS/eip-4337)`PackedUserOperation` carried in an XRPL `Payment` memo.
24
-
This guide walks through a TypeScript script that builds the user operation with Viem library, sends a payment transaction with the user operation on XRPL, and waits for the [`UserOperationExecuted`](/smart-accounts/reference/IMasterAccountController#useroperationexecuted) event on Flare.
23
+
The [Full Custom Instruction overview](/smart-accounts/full-custom-instruction) explains how Flare smart accounts replay an [EIP-4337](https://eips.ethereum.org/EIPS/eip-4337)`PackedUserOperation` carried in full in an XRPL `Payment` memo (opcode `0xFF`).
24
+
This guide walks through a TypeScript script that builds the user operation with the Viem library, sends a payment transaction with the user operation on XRPL, and waits for the [`UserOperationExecuted`](/smart-accounts/reference/IMasterAccountController#useroperationexecuted) event on Flare.
25
+
26
+
If your batch overflows the XRPL memo cap, or you want to keep call payloads off the public XRPL ledger, see the [Hash Custom Instruction guide](/smart-accounts/guides/typescript-viem/hash-custom-instruction-ts) for the 0xFE variant that ships only `keccak256(userOp)` in the memo.
25
27
26
28
The script executes three calls on three example smart contracts on the Flare blockchain.
27
29
Because the XRPL memo field is capped at roughly `1024` bytes, the calls are split into two user operations sent in sequence.
0 commit comments