Skip to content

oil-protocol/oil

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OIL

OIL is a crypto mining protocol.

API

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

Instructions

Mining

  • Automate - Configures a new automation.
  • Checkpoint - Checkpoints rewards from an prior round.
  • ClaimOIL - Claims OIL mining rewards.
  • ClaimSOL - Claims SOL mining rewards.
  • Deploy – Deploys SOL to claim space on the board.
  • Initialize - Initializes program variables.
  • Log – Logs non-truncatable event data.
  • ReloadSOL - Reloads SOL mining rewards into automation.
  • Reset - Resets the board for a new round.

Staking

Admin

  • Barrel - Executes a buy-and-barrel transaction.
  • Wrap - Wraps SOL in the treasury for swap transactions.
  • SetAdmin - Re-assigns the admin authority.
  • SetFeeCollector - Updates the fee collection address.
  • SetFeeRate - Updates the fee charged per swap.

State

  • Automation - Tracks automation configs.
  • Board - Tracks the current round number and timestamps.
  • Config - Global program configs.
  • Miner - Tracks a miner's game state.
  • Round - Tracks the game state of a given round.
  • Seeker - Tracks whether a Seeker token has been claimed.
  • Stake - Manages a user's staking activity.
  • Treasury - Mints, burns, and escrows OIL tokens.

Tests

To run the test suite, use the Solana toolchain:

cargo test-sbf

For line coverage, use llvm-cov:

cargo llvm-cov

About

It's time to drill.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 99.8%
  • Shell 0.2%