Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

✅Execute and Verify the Transfer

Audience: Nexus adopters and integrators.

Goal: Execute the Talus Agent Package (TAP) transfer flow with disposable funds and verify the resulting Task, execution, state change, and recovery boundary.

Time to run the skill. From here on you need the values captured on the previous page:

PKG=<published TAP package id>
STATE=<TutorialState object id>
AGENT=<agent id from tap bind>
SKILL=<skill id from tap bind>

Pick a recipient address. The example uses a complete illustrative address; use an address you control if you want to inspect the received coin later:

RECIPIENT=0x000000000000000000000000000000000000000000000000000000000000face

1. Fund the treasury

The Tool empties whatever coin is sitting in TutorialState.treasury. Deposit 0.1 SUI before scheduling the workflow. fund_treasury is a public Move function, so a small PTB can split a coin from gas and pass it in:

sui client ptb \
  --split-coins gas '[100000000]' \
  --assign deposit \
  --move-call "$PKG::tutorial_transfer::fund_treasury" "@$STATE" deposit.0 \
  --gas-budget 50000000 \
  --json > fund-treasury.json

jq '.effects.status' fund-treasury.json

The 100000000 is MIST (0.1 SUI). The PTB:

  • splits one 0.1 SUI coin from the transaction's gas coin;

  • consumes that coin in fund_treasury(state, coin);

  • leaves the remainder of the gas coin with its owner.

Confirm the shared state after the transaction:

The exact parsed JSON wrapper depends on the Sui CLI response shape, but the decoded treasury option must contain the deposited coin. The transaction effects plus the fresh state read are stronger evidence than terminal text alone.

2. Fund and schedule the Task

The V2 LTS target uses the durable Task → Occurrence → Execution model. A Task owns the reusable operation, controller, funding reserve, failure policy, and Schedule. Each scheduling opportunity becomes a permanent Occurrence; dispatch creates the Execution that contains walks and Tool results.

This skill is UserFunded, so the default address-funded path reserves MIST from the configured signer's Nexus SUI balance. Inspect and fund that balance first:

The scheduling command below withdraws 50,000,000 MIST for the Task reserve and uses address-balance gas with a default 100,000,000-MIST gas budget. Before submitting, confirm at least 150,000,000 MIST remains in that address balance; the 200,000,000-MIST deposit provides a margin when starting from zero. nexus gas deposit itself selects an owned SUI coin, which must cover both the deposit and its transaction gas budget. Owned coin balances alone do not satisfy the later Task's address-balance requirement. Keep enough address balance, or supply --sui-gas-coin, for settlement and closure too.

Build the entry input once and schedule one immediate Occurrence:

The receipt identifies the shared Task and every Occurrence allocated by the transaction. Never assume the first occurrence number is zero; read it from the receipt:

Scheduling performs four durable actions:

  1. Resolves the Agent skill and its pinned DAG and requirements.

  2. Creates a Task controlled by the configured signer and reserves its address-funded MIST.

  3. Adds an immediate Occurrence to the Task's Schedule.

  4. Makes that Occurrence available for leader dispatch; dispatch creates the deterministic Execution.

3. Wait for the recipient balance to increase

Follow the Occurrence until it either completes or needs an operator action:

Then inspect the Execution selected by that Task/Occurrence pair:

On success, the leader called transfer_vertex::execute(requirements, result, state, recipient, ctx). The Tool consumed the treasury coin, transferred it to RECIPIENT, satisfied the registered witness, and finalized a transferred result.

Verify both sides of the business-state change:

The recipient balance should include the transferred amount and the treasury option should be empty. A balance can include unrelated coins, so retain execution.json, the state before/after, and transaction effects when you need auditable proof.

4. Inspect the Execution and settle the Occurrence

Capture the inspection output and transaction effects immediately after the transfer. Testnet transaction history can be pruned after only a few days, so an older successful run may report history is incomplete: missing transaction …. The Task/Occurrence record can remain available while Execution reconstruction is unavailable. Keep the original receipts, collection time, CLI version, network, and IDs; a new walk does not recover the old history. See Capture Testnet evidence promptly before retrying.

nexus execution inspect replays the ordered Execution history. Look for the transferred OnchainToolResult variant with amount and recipient matching the funded state and submitted input. The Execution is runtime history; the Occurrence is the durable scheduler record that must be settled.

Inspect cost and settlement state:

If the Occurrence is finished, settle it into the Task:

Settlement records the final outcome, returns unused reserve according to the address-funded policy, and clears the Task's in-flight accounting. If the occurrence missed its deadline, use nexus task occurrence expire; if an Execution exceeded its workflow timeout, inspect it and use nexus task occurrence abort-expired only when the CLI reports that action.

5. Cost summary and Task cleanup

Read cost again after settlement and inspect the Task:

The cost view explains reserve, consumption, and refund for this occurrence. The Task is closable only when it is not finalized, its Schedule is idle, and it has no in-flight occurrences. This one-shot tutorial can then release Task resources:

Do not close a Task that still has advertised, pending, recurring, or in-flight work. Use pause, cancel, occurrence settlement/recovery, and a fresh task inspect until the Task is idle.

What you built

End-to-end, your skill now does this on every call:

  1. The invoker funds a Task reserve and schedules an Occurrence for the Agent skill.

  2. The scheduler advertises the Occurrence; a leader dispatch creates its Execution.

  3. The leader calls transfer_vertex::execute with framework-owned requirements/result inputs plus TutorialState and the recipient.

  4. The Tool transfers the coin, satisfies its witness, and finalizes the durable transferred result.

  5. The Execution records runtime history; the Occurrence records scheduler state and settlement; the Task owns the remaining reserve until cleanup.

  6. The operator verifies the recipient/state change, settles the Occurrence, and closes the idle one-shot Task.

Re-running means funding the treasury again and scheduling a new Task. Each run receives new Task, Occurrence, Execution, transaction, and object-version identities.

Next steps

The natural follow-up reading is:

Last updated