Files
ore/README.md
Hardhat Chad 4138fc2b66 scaffolding
2025-06-05 16:14:08 -07:00

1.5 KiB
Raw Blame History

ORE

Mine blockspace. Trade hashpower. Win rewards.

API

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

Instructions

Mine

  • Open - Opens a new block for mining.
  • Close - Closes a block and pays out rewards.
  • Mine - Mines the current block by computing hashes.

Stake

  • Deposit - Deposits stake into a miner account.
  • Withdraw - Withdraws stake from a miner account.
  • Free - Frees up miner capacity after block ends.

Trade

  • Buy - Buys hash tokens from the market.
  • Sell - Sells hash tokens to the market.

State

  • Block - A period of time for mining.
  • Config - Global program configuration.
  • Market - Hashpower market for a given block.
  • Miner - A user's mining and staking state.
  • Receipt - Tracks a miner's deployed capital.
  • Treasury - The mint authority on the ORE token.

Tests

To run the test suite, use the Solana toolchain:

cargo test-sbf

For line coverage, use llvm-cov:

cargo llvm-cov