Skip to main content
Building with an AI coding agent? Install the MagicBlock Dev Skill to give your agent MagicBlock-specific patterns — delegation flows, Magic Actions, cranks, VRF, and more.Hit an error? Ask your coding agent with the skill installed, not the docs assistant. The assistant only sees the docs, so it cannot debug your code.Quick install for Claude Code:
Using Cursor, Codex, Windsurf, Cline, or another agent? See the AI Dev Skill page for all install targets.

Quick Access

Magic Actions Example

Explore reference implementation on GitHub

Prediction-market settlement

Compare ER custody with post-commit base-layer payouts in a complete protocol flow.

What are Magic Actions?

Magic Actions let you attach one or more call instructions that run automatically on the Solana base layer immediately after an Ephemeral Rollup (ER) commit. Use committed state as inputs to orchestrate multi-step workflows in a single transaction.
  • State sync: propagate ER changes to base-layer accounts
  • Cross-program composition: invoke other programs after commit
  • Automated workflows: chain complex operations from one commit
  • Event-driven actions: branch logic based on committed state

How it works

  1. Delegate accounts to an Ephemeral Rollup
  2. Execute low-latency transactions on Ephemeral Rollup
  3. Commit to base layer with attached instruction actions while staying delegated
  4. Handlers execute automatically using the freshly committed state

See also

Magic Action work along with Ephemeral Rollups.

Ephemeral Rollups

Delegation, Commitment & Undelegation