Skip to content

feat(docs): add hash custom instructions and rearange guides#1400

Merged
nikerzetic-aflabs merged 6 commits into
mainfrom
hash-custom-instructions
May 21, 2026
Merged

feat(docs): add hash custom instructions and rearange guides#1400
nikerzetic-aflabs merged 6 commits into
mainfrom
hash-custom-instructions

Conversation

@nikerzetic-aflabs
Copy link
Copy Markdown
Collaborator

No description provided.

@nikerzetic-aflabs nikerzetic-aflabs changed the title feat: add hash custom instructions feat(docs): add hash custom instructions and rearange guides May 20, 2026
@nikerzetic-aflabs nikerzetic-aflabs requested a review from fassko May 20, 2026 12:00
Comment thread docs/smart-accounts/1-overview.mdx Outdated
Comment thread docs/smart-accounts/1-overview.mdx Outdated
Comment thread docs/smart-accounts/3-custom-instruction.mdx Outdated
Comment thread docs/smart-accounts/3-custom-instruction.mdx Outdated
Comment thread docs/smart-accounts/3-custom-instruction.mdx Outdated

Unlike the custom instruction, which carries only `keccak256(userOp)` in the memo, this header is followed by the full ABI-encoded `PackedUserOperation` - hence the memo cap problem above.

## Sending the user operation
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Sending the user operation
## Sending the User Operation


## Sending the user operation

The XRPL `Payment` is sent to the FAssets **direct minting payment address** read from the `AssetManagerFXRP` contract - not to an operator wallet.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The XRPL `Payment` is sent to the FAssets **direct minting payment address** read from the `AssetManagerFXRP` contract - not to an operator wallet.
The XRPL `Payment` is sent to the FAssets [direct minting payment address](/fassets/reference/IAssetManager#directmintingpaymentaddress) read from the `AssetManagerFXRP` contract - not to an operator wallet.

There is no `(data, totalCallValue)` to hand off to an executor here: the entire user operation already lives in the memo, so the only handoff is the XRPL payment itself.
The `xrplClient` and `xrplWallet` are the `Client` and `Wallet` classes from the `xrpl` library, initialized from the `.env` file.

## Waiting for execution
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Waiting for execution
## Waiting for Execution

If any inner call reverts, the whole user operation reverts with [`CallFailed`](/smart-accounts/reference/IPersonalAccount#callfailed) and the nonce does not increment.
The FXRP transfer, however, is performed before the memo is decoded, so the mint succeeds even when the user operation reverts - see [`DirectMintingExecuted`](/smart-accounts/reference/IMasterAccountController#directmintingexecuted).

## Full script
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Full script
## Full Script

{RawCustomInstructionsScript}
</CodeBlock>

## Expected output
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Expected output
## Expected Output

Copy link
Copy Markdown
Collaborator

@fassko fassko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somehow, I don't like the raw custom instruction name, but that can stay.

Co-authored-by: Kristaps Grinbergs <fassko@gmail.com>
@nikerzetic-aflabs nikerzetic-aflabs force-pushed the hash-custom-instructions branch from ef39bd7 to dddcfaf Compare May 21, 2026 08:03
@nikerzetic-aflabs nikerzetic-aflabs requested a review from fassko May 21, 2026 09:27
Copy link
Copy Markdown
Collaborator

@fassko fassko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small tweaks

Comment thread docs/smart-accounts/guides/typescript-viem/02-custom-instruction.mdx Outdated
Comment thread docs/smart-accounts/guides/typescript-viem/02-custom-instruction.mdx Outdated
Comment thread docs/smart-accounts/1-overview.mdx Outdated
Comment thread docs/smart-accounts/1-overview.mdx Outdated
Comment thread docs/smart-accounts/3-custom-instruction.mdx Outdated
@nikerzetic-aflabs nikerzetic-aflabs force-pushed the hash-custom-instructions branch from 5f029da to d0c9a6f Compare May 21, 2026 11:32
@nikerzetic-aflabs nikerzetic-aflabs requested a review from fassko May 21, 2026 11:37
@nikerzetic-aflabs nikerzetic-aflabs merged commit 6825ab5 into main May 21, 2026
15 checks passed
@nikerzetic-aflabs nikerzetic-aflabs deleted the hash-custom-instructions branch May 21, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants