mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-13 23:16:52 +00:00
61 lines
2.3 KiB
Markdown
61 lines
2.3 KiB
Markdown
# ORE
|
||
|
||
ORE is a crypto mining game.
|
||
|
||
|
||
## API
|
||
- [`Consts`](api/src/consts.rs) – Program constants.
|
||
- [`Error`](api/src/error.rs) – Custom program errors.
|
||
- [`Event`](api/src/error.rs) – Custom program events.
|
||
- [`Instruction`](api/src/instruction.rs) – Declared instructions and arguments.
|
||
|
||
## Instructions
|
||
|
||
#### Mining
|
||
- [`Automate`](program/src/automate.rs) - Configures a new automation.
|
||
- [`ClaimORE`](program/src/claim_ore.rs) - Claims ORE mining rewards.
|
||
- [`ClaimSOL`](program/src/claim_sol.rs) - Claims SOL mining rewards.
|
||
- [`Deploy`](program/src/deploy.rs) – Deploys SOL to claim space on the board.
|
||
- [`Initialize`](program/src/initialize.rs) - Initializes program variables.
|
||
- [`Log`](program/src/log.rs) – Logs non-truncatable event data.
|
||
- [`Reset`](program/src/reset.rs) - Resets the board for a new round.
|
||
- [`Reset`](program/src/reset.rs) - Resets the board for a new round.
|
||
|
||
#### Staking
|
||
- [`Deposit`](program/src/deposit.rs) - Deposits ORE into a stake account.
|
||
- [`Withdraw`](program/src/withdraw.rs) - Withdraws ORE from a stake account.
|
||
- [`ClaimSeeker`](program/src/claim_seeker.rs) - Claims a Seeker genesis token.
|
||
- [`ClaimYield`](program/src/claim_yield.rs) - Claims staking yield.
|
||
|
||
#### Admin
|
||
- [`Bury`](program/src/bury.rs) - Executes a buy-and-bury transaction.
|
||
- [`Wrap`](program/src/wrap.rs) - Wraps SOL in the treasury for swap transactions.
|
||
- [`SetAdmin`](program/src/set_admin.rs) - Re-assigns the admin authority.
|
||
- [`SetFeeCollector`](program/src/set_admin.rs) - Updates the fee collection address.
|
||
- [`SetFeeRate`](program/src/set_admin.rs) - Updates the fee charged per swap.
|
||
|
||
## State
|
||
- [`Automation`](api/src/state/automation.rs) - Tracks automation configs.
|
||
- [`Board`](api/src/state/board.rs) - Holds current game state.
|
||
- [`Config`](api/src/state/config.rs) - Global program configs.
|
||
- [`Miner`](api/src/state/miner.rs) - Tracks a miner's game state.
|
||
- [`Seeker`](api/src/state/seeker.rs) - Tracks whether a Seeker token has been claimed.
|
||
- [`Square`](api/src/state/square.rs) - The blockspace state and claims.
|
||
- [`Stake`](api/src/state/stake.rs) - Manages a user's staking activity.
|
||
- [`Treasury`](api/src/state/treasury.rs) - Mints, burns, and escrows ORE tokens.
|
||
|
||
|
||
## Tests
|
||
|
||
To run the test suite, use the Solana toolchain:
|
||
|
||
```
|
||
cargo test-sbf
|
||
```
|
||
|
||
For line coverage, use llvm-cov:
|
||
|
||
```
|
||
cargo llvm-cov
|
||
```
|