3 unstable releases

new 0.1.0 Jun 13, 2024
0.0.2 May 29, 2024
0.0.1 May 25, 2024

#9 in #delegation

Download history 139/week @ 2024-05-20 166/week @ 2024-05-27 41/week @ 2024-06-03

346 downloads per month
Used in bolt-lang

MIT license

51KB
424 lines

Delegation program

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

Program

  • Consts – Program constants.
  • Entrypoint – The program entrypoint.
  • Errors – Custom program errors.
  • Idl – Interface for clients, explorers, and programs.
  • Instruction – Declared instructions and arguments.
  • Loaders – Validation logic for loading Solana accounts.

Instructions

State

Tests

To run the test suite, use the Solana toolchain:

cargo test-sbf

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

Dependencies

~16–24MB
~422K SLoC