This commit is contained in:
Hardhat Chad
2025-07-16 16:51:23 -07:00
parent 084757cc8d
commit 39ff6f51cd
9 changed files with 213 additions and 457 deletions

View File

@@ -8,11 +8,14 @@ pub enum OreInstruction {
Mine = 2,
Swap = 3,
Initialize = 4,
Open = 5,
Close = 6,
Reset = 7,
// Admin
SetAdmin = 9,
SetFeeCollector = 10,
SetFeeRate = 11,
SetAdmin = 8,
SetFeeCollector = 9,
SetFeeRate = 10,
}
#[repr(C)]
@@ -25,6 +28,10 @@ pub struct Open {
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct Close {}
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct Reset {}
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct Commit {
@@ -47,7 +54,7 @@ pub struct Log {
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct Mine {
pub amount: [u8; 8],
pub nonce: [u8; 8],
}
#[repr(C)]
@@ -82,10 +89,13 @@ pub struct SetFeeRate {
pub fee_rate: [u8; 8],
}
instruction!(OreInstruction, Open);
instruction!(OreInstruction, Close);
instruction!(OreInstruction, Reset);
instruction!(OreInstruction, Initialize);
instruction!(OreInstruction, Log);
instruction!(OreInstruction, Mine);
instruction!(OreInstruction, Swap);
instruction!(OreInstruction, Initialize);
instruction!(OreInstruction, SetAdmin);
instruction!(OreInstruction, SetFeeCollector);
instruction!(OreInstruction, SetFeeRate);