Skip to content

regolith-labs/ore-boost

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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