Skip to content

Feat/new spl flow#67

Merged
GabrielePicco merged 12 commits intomainfrom
feat/new-spl-flow
Mar 19, 2026
Merged

Feat/new spl flow#67
GabrielePicco merged 12 commits intomainfrom
feat/new-spl-flow

Conversation

@GabrielePicco
Copy link
Copy Markdown
Contributor

@GabrielePicco GabrielePicco commented Mar 19, 2026

Summary by CodeRabbit

Release Notes

  • New Features

    • Transfer visibility control: choose between public and private transfer modes
    • Balance source/destination selection: route transfers between base and ephemeral balances
    • Private transfer queue configuration: adjust minimum/maximum delay and split count for private transfers
  • Improvements

    • Enhanced error reporting with detailed transaction logs for troubleshooting
  • Dependencies

    • Updated ephemeral rollups SDK to the latest version

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 19, 2026

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

Project Deployment Actions Updated (UTC)
er-rolldice Ready Ready Preview, Comment Mar 19, 2026 4:03pm
magicblock-engine-examples Ready Ready Preview, Comment Mar 19, 2026 4:03pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 19, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 34abb33a-16f9-4eab-9418-bc9f1b7fdf86

📥 Commits

Reviewing files that changed from the base of the PR and between c0a3653 and 9363814.

⛔ Files ignored due to path filters (2)
  • spl-tokens/app/app/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
  • spl-tokens/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (4)
  • spl-tokens/app/app/package.json
  • spl-tokens/app/app/src/App.tsx
  • spl-tokens/app/app/tsconfig.tsbuildinfo
  • spl-tokens/package.json

Walkthrough

Updated @magicblock-labs/ephemeral-rollups-sdk from version 0.7.2 to ^0.10.0 and changed its reference from a registry version to a local filesystem path. Removed @solana/spl-token dependency. Refactored App.tsx to replace transfer mode logic with new visibility and balance configuration options, implement enhanced error handling, and update balance subscription and delegation workflows.

Changes

Cohort / File(s) Summary
Dependency updates
spl-tokens/app/app/package.json
Updated @magicblock-labs/ephemeral-rollups-sdk from 0.7.2 to ^0.10.0 and removed @solana/spl-token dependency entirely.
Local SDK reference
spl-tokens/package.json
Changed @magicblock-labs/ephemeral-rollups-sdk from pinned registry version (0.7.1) to local filesystem path (file:/Users/.../ephemeral-rollups-sdk/ts/web3js).
App refactoring
spl-tokens/app/app/src/App.tsx
Replaced boolean useEphemeral with multi-option state (transferVisibility, fromBalance, toBalance, private queue parameters); added formatTransactionError for richer error handling; reworked balance subscriptions using onAccountChange; refactored transfer execution, setup flow, and delegation workflows to use SDK helpers; updated UI controls.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/new-spl-flow
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9363814db3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

"dependencies": {
"@coral-xyz/anchor": "0.31.1",
"@magicblock-labs/ephemeral-rollups-sdk": "0.7.1"
"@magicblock-labs/ephemeral-rollups-sdk": "file:/Users/gabrielepicco/Documents/Solana/ephemeral-rollups-sdk/ts/web3js"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Restore a published SDK dependency in spl-tokens/package.json

This replaces the SDK with a machine-local file: path. The spl-tokens package owns the example's test script, so any clone or CI runner outside /Users/gabrielepicco/... will fail yarn install before it can run the tests or the example. Please keep this on a published version (or a repo-relative workspace path) instead of an absolute host path.

Useful? React with 👍 / 👎.

setTransactionSuccess(`Transfer confirmed: ${sig.substring(0, 10)}...${sig.substring(sig.length - 10, sig.length)}`);
setTransactionSuccess(`${usesQueuedPrivateTransfer ? 'Private transfer queued' : 'Transfer confirmed'}: ${sig.substring(0, 10)}...${sig.substring(sig.length - 10, sig.length)}`);
console.log("Transfer: ", sig);
await ephemeralConnection!.current!.getAccountInfo(shuttleWalletAta);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Don't turn confirmed L1 transfers into UI errors

After conn.confirmTransaction(...) succeeds, this unconditional read against ephemeralConnection.current can still throw. For transfers that actually ran on connection (fromBalance === 'base', including base→base queueing), an ephemeral RPC outage or propagation lag now sends execution into the catch path and reports the transfer as failed even though it already landed on L1. This follow-up read should be best-effort or limited to the flows that truly require the ephemeral account.

Useful? React with 👍 / 👎.

Comment on lines +890 to +893
initRentPdaIx(
payer.publicKey,
rentPda,
),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid re-initializing the shared rent PDA on every setup

deriveRentPda() returns a singleton PDA, but setupAll now unconditionally appends initRentPdaIx(...) to every mint-setup transaction. That makes the exposed Reset Mint → Setup flow brittle: once a previous run has already created the rent sponsor PDA on this cluster, the next setup will try to initialize the same account again and fail. This needs an existence check or an idempotent init path.

Useful? React with 👍 / 👎.

This was referenced Mar 22, 2026
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