mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-22 15:10:36 +00:00
remove admin stuff
This commit is contained in:
@@ -108,11 +108,6 @@ pub enum OreInstruction {
|
||||
#[account(1, name = "signer", desc = "Admin signer", signer)]
|
||||
#[account(2, name = "config", desc = "Ore config account", writable)]
|
||||
UpdateAdmin = 101,
|
||||
|
||||
#[account(0, name = "ore_program", desc = "Ore program")]
|
||||
#[account(1, name = "signer", desc = "Admin signer", signer)]
|
||||
#[account(2, name = "config", desc = "Ore config account", writable)]
|
||||
UpdateTolerance = 102,
|
||||
|
||||
#[account(0, name = "ore_program", desc = "Ore program")]
|
||||
#[account(1, name = "signer", desc = "Admin signer", signer)]
|
||||
@@ -180,13 +175,6 @@ pub struct UpdateAdminArgs {
|
||||
pub new_admin: Pubkey,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
|
||||
pub struct UpdateToleranceArgs {
|
||||
pub tolerance_liveness: u64,
|
||||
pub tolerance_spam: u64,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
|
||||
pub struct PauseArgs {
|
||||
@@ -200,7 +188,6 @@ impl_to_bytes!(ClaimArgs);
|
||||
impl_to_bytes!(StakeArgs);
|
||||
impl_to_bytes!(UpgradeArgs);
|
||||
impl_to_bytes!(UpdateAdminArgs);
|
||||
impl_to_bytes!(UpdateToleranceArgs);
|
||||
impl_to_bytes!(PauseArgs);
|
||||
|
||||
impl_instruction_from_bytes!(InitializeArgs);
|
||||
@@ -210,7 +197,6 @@ impl_instruction_from_bytes!(ClaimArgs);
|
||||
impl_instruction_from_bytes!(StakeArgs);
|
||||
impl_instruction_from_bytes!(UpgradeArgs);
|
||||
impl_instruction_from_bytes!(UpdateAdminArgs);
|
||||
impl_instruction_from_bytes!(UpdateToleranceArgs);
|
||||
impl_instruction_from_bytes!(PauseArgs);
|
||||
|
||||
/// Builds a reset instruction.
|
||||
@@ -445,31 +431,6 @@ pub fn update_admin(signer: Pubkey, new_admin: Pubkey) -> Instruction {
|
||||
}
|
||||
}
|
||||
|
||||
/// Build an update_tolerance instruction.
|
||||
pub fn update_tolerance(
|
||||
signer: Pubkey,
|
||||
new_liveness_tolerance: u64,
|
||||
new_spam_tolerance: u64,
|
||||
) -> Instruction {
|
||||
Instruction {
|
||||
program_id: crate::id(),
|
||||
accounts: vec![
|
||||
AccountMeta::new(signer, true),
|
||||
AccountMeta::new(CONFIG_ADDRESS, false),
|
||||
],
|
||||
data: [
|
||||
OreInstruction::UpdateTolerance.to_vec(),
|
||||
UpdateToleranceArgs {
|
||||
tolerance_liveness: new_liveness_tolerance,
|
||||
tolerance_spam: new_spam_tolerance,
|
||||
}
|
||||
.to_bytes()
|
||||
.to_vec(),
|
||||
]
|
||||
.concat(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Build a pause instruction.
|
||||
pub fn pause(signer: Pubkey, paused: bool) -> Instruction {
|
||||
Instruction {
|
||||
|
||||
Reference in New Issue
Block a user