Deprecate upgrade (#101)

* deprecate upgrade function

* bump versions

* move flag
This commit is contained in:
Hardhat Chad
2024-11-01 16:08:02 -05:00
committed by GitHub
parent cb24b65133
commit 0e1460e2a4
7 changed files with 11 additions and 69 deletions

View File

@@ -12,6 +12,7 @@ pub enum OreInstruction {
#[deprecated(since = "2.4.0", note = "Please stake with the boost program")]
Stake = 5,
Update = 6,
#[deprecated(since = "2.6.0", note = "v1 tokens are no longer eligable to upgrade")]
Upgrade = 7,
// Admin
@@ -57,6 +58,7 @@ pub struct Stake {
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct Update {}
#[deprecated(since = "2.6.0", note = "v1 tokens are no longer eligable to upgrade")]
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct Upgrade {

View File

@@ -125,10 +125,10 @@ pub fn reset(signer: Pubkey) -> Instruction {
}
/// Build a stake instruction.
#[allow(deprecated)]
#[deprecated(since = "2.4.0", note = "Please stake with the boost program")]
pub fn stake(signer: Pubkey, sender: Pubkey, amount: u64) -> Instruction {
let proof = proof_pda(signer).0;
#[allow(deprecated)]
Instruction {
program_id: crate::ID,
accounts: vec![
@@ -160,6 +160,8 @@ pub fn update(signer: Pubkey, miner: Pubkey) -> Instruction {
}
// Build an upgrade instruction.
#[allow(deprecated)]
#[deprecated(since = "2.6.0", note = "v1 tokens are no longer eligable to upgrade")]
pub fn upgrade(signer: Pubkey, beneficiary: Pubkey, sender: Pubkey, amount: u64) -> Instruction {
Instruction {
program_id: crate::ID,