Skip to content

Dynamic dispatch example + testing-wallet-adapter-changes skill#82

Open
iamalwaysuncomfortable wants to merge 32 commits intomasterfrom
feat/dynamic-dispatch-example
Open

Dynamic dispatch example + testing-wallet-adapter-changes skill#82
iamalwaysuncomfortable wants to merge 32 commits intomasterfrom
feat/dynamic-dispatch-example

Conversation

@iamalwaysuncomfortable
Copy link
Copy Markdown
Member

@iamalwaysuncomfortable iamalwaysuncomfortable commented Apr 22, 2026

Summary

  • Adds a Dynamic Dispatch demo under examples/react-app/src/components/functions/DynamicDispatch.tsx that exercises the new TransactionOptions.imports field by calling token_router.aleo/route_transfer with imports: [<token>]. Includes prep buttons for mint_public and approve_public on toka_token.aleo / tokb_token.aleo so the dispatch can finalize end-to-end.
  • Adds .claude/skills/testing-wallet-adapter-changes/SKILL.md — a reusable playbook for validating future wallet-adapter changes against a real extension install.
  • Adds toka_token.aleo, tokb_token.aleo, and token_router.aleo to the example's default programsAtom so first-run Connect negotiates permission for the dispatch flow.

Screenshot
image

Test plan

  • pnpm --filter react-app-example build succeeds.
  • With a Shield extension build that carries the imports plumbing loaded, connect on Testnet, navigate to /dynamic-dispatch, click Mint toka_token, Approve router (toka), then Execute route_transfer — confirm Accepted and a nested toka_token.aleo/transfer_from_public transition on the explorer.

Run the Aleo Dev Toolkit example app

Prerequisites: Node ≥18, pnpm ≥10 (corepack enable), Chromium browser, Shield wallet with a Testnet account.

git clone git@github.com:ProvableHQ/aleo-dev-toolkit.git && cd aleo-dev-toolkit
git checkout feat/dynamic-dispatch-example   # or `master` once this PR merges
pnpm install && pnpm -w build
pnpm --filter react-app-example dev

Open http://localhost:5173/, click Connect Wallet, approve on Testnet.

If you hit "<program>.aleo is not in the allowed programs", open the header Programs dropdown, add the program, then disconnect + reconnect.

Demos

  • Execute — call any program/function with manual inputs.
  • Dynamic Dispatch (this PR) — exercises the new TransactionOptions.imports field via token_router.aleo/route_transfer. Press Mint → Approve router → Execute route_transfer in order.
  • Deploy, Sign, Decrypt, Records, View Keys, Tx History — each has its own sidebar entry.

Running against a local Shield build

Dynamic Dispatch needs a Shield build that threads imports through to the SDK (shield-extension master, commit 3f6eadae+):

cd ~/dev/shield-extension && nvm use && yarn install && yarn build
# chrome://extensions → Load unpacked → dist/chrome-mv3

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
aleo-dev-toolkit-documentation Ready Ready Preview, Comment Apr 28, 2026 7:50pm
aleo-dev-toolkit-react-app Ready Ready Preview, Comment Apr 28, 2026 7:50pm

Request Review

emmaprice082
emmaprice082 previously approved these changes Apr 23, 2026
Copy link
Copy Markdown
Collaborator

@emmaprice082 emmaprice082 left a comment

Choose a reason for hiding this comment

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

looks great @iamalwaysuncomfortable!

My testnet transaction - explorer link

Image

@iamalwaysuncomfortable iamalwaysuncomfortable dismissed emmaprice082’s stale review April 23, 2026 15:16

The merge-base changed after approval.

d0cd
d0cd previously approved these changes Apr 23, 2026
@iamalwaysuncomfortable iamalwaysuncomfortable dismissed d0cd’s stale review April 23, 2026 15:21

The merge-base changed after approval.

@emmaprice082
Copy link
Copy Markdown
Collaborator

Waiting on updates from @iamalwaysuncomfortable
@dms120 will review when updated

emmaprice082
emmaprice082 previously approved these changes Apr 28, 2026
@iamalwaysuncomfortable iamalwaysuncomfortable dismissed emmaprice082’s stale review April 28, 2026 20:29

The merge-base changed after approval.

@emmaprice082
Copy link
Copy Markdown
Collaborator

please wait for @dms120 to review before merging

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.

3 participants