scaffold upgrade

This commit is contained in:
Hardhat Chad
2024-04-27 18:27:28 +00:00
parent b30cee7eb2
commit c80e3ac5b3
6 changed files with 108 additions and 2 deletions

View File

@@ -63,6 +63,16 @@ pub enum OreInstruction {
#[account(5, name = "token_program", desc = "SPL token program")]
Stake = 4,
#[account(0, name = "ore_program", desc = "Ore program")]
#[account(1, name = "signer", desc = "Signer", signer)]
#[account(2, name = "beneficiary", desc = "Beneficiary token account", writable)]
#[account(3, name = "sender", desc = "Signer token account", writable)]
#[account(4, name = "treasury", desc = "Ore treasury account", writable)]
#[account(5, name = "mint", desc = "Ore token mint account", writable)]
#[account(6, name = "mint_v1", desc = "Ore v1 token mint account", writable)]
#[account(7, name = "token_program", desc = "SPL token program")]
Upgrade = 5,
#[account(0, name = "ore_program", desc = "Ore program")]
#[account(1, name = "signer", desc = "Admin signer", signer)]
#[account(2, name = "bus_0", desc = "Ore bus account 0", writable)]
@@ -137,6 +147,12 @@ pub struct StakeArgs {
pub amount: [u8; 8],
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct UpgradeArgs {
pub amount: [u8; 8],
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct UpdateAdminArgs {
@@ -148,6 +164,7 @@ impl_to_bytes!(RegisterArgs);
impl_to_bytes!(MineArgs);
impl_to_bytes!(ClaimArgs);
impl_to_bytes!(StakeArgs);
impl_to_bytes!(UpgradeArgs);
impl_to_bytes!(UpdateAdminArgs);
impl_instruction_from_bytes!(InitializeArgs);
@@ -155,6 +172,7 @@ impl_instruction_from_bytes!(RegisterArgs);
impl_instruction_from_bytes!(MineArgs);
impl_instruction_from_bytes!(ClaimArgs);
impl_instruction_from_bytes!(StakeArgs);
impl_instruction_from_bytes!(UpgradeArgs);
impl_instruction_from_bytes!(UpdateAdminArgs);
/// Builds a reset instruction.