magicblock-delegation-program

Crates.iomagicblock-delegation-program
lib.rsmagicblock-delegation-program
version1.1.1
created_at2024-12-11 10:18:25.400385+00
updated_at2025-09-24 08:50:23.586236+00
descriptionDelegation program for the Ephemeral Rollups
homepagehttps://www.magicblock.gg/
repositoryhttps://github.com/magicblock-labs/delegation-program
max_upload_size
id1479917
size10,722,516
Gabriele Picco (GabrielePicco)

documentation

https://docs.magicblock.gg/

README

Delegation program

Delegation module for https://arxiv.org/pdf/2311.02650.pdf

Public Api

Program

Important Instructions

Tests

To run the test suite, use the Solana toolchain:

cargo test-sbf --features unit_test_config

For line coverage, use llvm-cov:

cargo llvm-cov --test test_commit_state

(llvm-cov currently does not work with instructions with CPIs e.g.: delegate, undelegate)

Integration Tests

The integration tests are located in the tests/integration directory. The tests consist of a Bolt/Anchor program that uses the delegation program to delegate, commit, and undelegate accounts. This can be also used a reference for how to interact with the program.

To run the integration test, use Bolt or Anchor:

cd tests/integration && bolt test

or:

cd tests/integration && anchor test
Commit count: 96

cargo fmt