Migrate to steel v2 (#102)

* migrate to steel v2

* migrate to steel v2

* assert with err

* args ordering

* new close

* logging

* bump deps

* bump ore-boost-api version

* deprecate bumps in sdk

* remove msg

* remove comment

* remove unused import

* bump version
This commit is contained in:
Hardhat Chad
2024-10-25 17:22:41 -05:00
committed by GitHub
parent ac31c75201
commit cb24b65133
13 changed files with 165 additions and 190 deletions

View File

@@ -128,6 +128,9 @@ pub const METADATA_ADDRESS: Pubkey = Pubkey::new_from_array(
pub const MINT_ADDRESS: Pubkey =
Pubkey::new_from_array(ed25519::derive_program_address(&[MINT, &MINT_NOISE], &PROGRAM_ID).0);
/// The bump of the mint account.
pub const MINT_BUMP: u8 = ed25519::derive_program_address(&[MINT, &MINT_NOISE], &PROGRAM_ID).1;
/// The address of the v1 mint account.
pub const MINT_V1_ADDRESS: Pubkey = pubkey!("oreoN2tQbHXVaZsr3pf66A48miqcBXCDJozganhEJgz");

View File

@@ -38,6 +38,7 @@ pub struct Mine {
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct Open {
#[deprecated(since = "2.5.0", note = "Bump no longer used")]
pub bump: u8,
}
@@ -65,17 +66,29 @@ pub struct Upgrade {
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct Initialize {
#[deprecated(since = "2.5.0", note = "Bump no longer used")]
pub bus_0_bump: u8,
#[deprecated(since = "2.5.0", note = "Bump no longer used")]
pub bus_1_bump: u8,
#[deprecated(since = "2.5.0", note = "Bump no longer used")]
pub bus_2_bump: u8,
#[deprecated(since = "2.5.0", note = "Bump no longer used")]
pub bus_3_bump: u8,
#[deprecated(since = "2.5.0", note = "Bump no longer used")]
pub bus_4_bump: u8,
#[deprecated(since = "2.5.0", note = "Bump no longer used")]
pub bus_5_bump: u8,
#[deprecated(since = "2.5.0", note = "Bump no longer used")]
pub bus_6_bump: u8,
#[deprecated(since = "2.5.0", note = "Bump no longer used")]
pub bus_7_bump: u8,
#[deprecated(since = "2.5.0", note = "Bump no longer used")]
pub config_bump: u8,
#[deprecated(since = "2.5.0", note = "Bump no longer used")]
pub metadata_bump: u8,
#[deprecated(since = "2.5.0", note = "Bump no longer used")]
pub mint_bump: u8,
#[deprecated(since = "2.5.0", note = "Bump no longer used")]
pub treasury_bump: u8,
}

View File

@@ -83,6 +83,7 @@ pub fn mine(
}
/// Builds an open instruction.
#[allow(deprecated)]
pub fn open(signer: Pubkey, miner: Pubkey, payer: Pubkey) -> Instruction {
let proof_pda = proof_pda(signer);
Instruction {
@@ -179,6 +180,7 @@ pub fn upgrade(signer: Pubkey, beneficiary: Pubkey, sender: Pubkey, amount: u64)
}
/// Builds an initialize instruction.
#[allow(deprecated)]
pub fn initialize(signer: Pubkey) -> Instruction {
let bus_pdas = [
bus_pda(0),