#mining #solana #crypto

ore-boost-api

API for interacting with the ORE boost program

5 releases (2 stable)

new 1.1.0 Jan 11, 2025
1.0.0 Jan 11, 2025
0.3.0 Oct 25, 2024
0.2.0 Oct 10, 2024
0.1.0 Sep 23, 2024

#27 in Magic Beans

Download history 171/week @ 2024-09-22 26/week @ 2024-09-29 178/week @ 2024-10-06 971/week @ 2024-10-13 649/week @ 2024-10-20 2280/week @ 2024-10-27 882/week @ 2024-11-03 257/week @ 2024-11-10 594/week @ 2024-11-17 363/week @ 2024-11-24 314/week @ 2024-12-01 442/week @ 2024-12-08 332/week @ 2024-12-15 587/week @ 2024-12-22 157/week @ 2024-12-29 408/week @ 2025-01-05

1,554 downloads per month
Used in 4 crates

Apache-2.0 and LGPL-3.0-only

21KB
469 lines

ORE Boost

ORE Boost is a staking program for earning multipliers on ORE mining rewards.

API

  • Consts – Program constants.
  • Error – Custom program errors.
  • Event – Custom program events.
  • Instruction – Declared instructions and arguments.

Instructions

  • Close – Closes a stake account.
  • Deposit – Deposits tokens into a stake account.
  • Initialize – Initializes the program and creates the global accounts.
  • New – Creates a new boost account.
  • Open – Opens a new stake account.
  • UpdateAdmin – Updates the admin key.
  • UpdateBoost – Updates the data on a boost.
  • Withdraw – Withdraws tokens from a stake account.

State

  • Boost - An account (1 per mint) which records how much of a multiplier should be paid out for staked tokens of a given mint.
  • Config – A singleton account which manages program-wide variables.
  • Stake - An account (1 per user per mint) which records how many tokens of a given mint a user has staked.

Tests

To run the test suite, use the Solana toolchain:

cargo test-sbf

For line coverage, use llvm-cov:

cargo llvm-cov

Dependencies

~39MB
~586K SLoC