Skip to content

Conversation

@Voxelot
Copy link
Member

@Voxelot Voxelot commented Sep 24, 2025

[Link to related issue(s) here, if any]

[Short description of the changes.]
This pull request adds documentation for a new instruction to the Fuel VM instruction set, specifically describing the TRE operation for transferring coins to an external context. The most important changes are grouped below:

Instruction Set Documentation Updates

  • Added a new entry for the TRE instruction ("Transfer coins to external context") to the instruction index list in src/fuel-vm/instruction-set.md.
  • Provided a detailed specification for the TRE instruction, including its description, operation, syntax, encoding, effects, usage notes, panic conditions, receipt structure, and state changes. This explains how assets are transferred from an internal contract context to the external script context and the requirements for successful execution.

This functionality enables simpler patterns for chaining multi-calls across different applications with scripts. If TRE is used to return the funds to the user after each operation such as "swap" or "borrow", applications won't need to have any special logic to manage transfers between each other (see workarounds here).

Before requesting review

  • I have reviewed the code myself

After merging, notify other teams

[Add or remove entries as needed]

@Voxelot Voxelot changed the title TRE TRE Instruction for simpler multicalls Sep 24, 2025
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.

1 participant