mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-16 15:10:20 +00:00
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:
@@ -16,11 +16,14 @@ pub fn process_claim(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramResult
|
||||
signer_info.is_signer()?;
|
||||
beneficiary_info
|
||||
.is_writable()?
|
||||
.to_token_account()?
|
||||
.check(|t| t.mint == MINT_ADDRESS)?;
|
||||
.as_token_account()?
|
||||
.assert(|t| t.mint == MINT_ADDRESS)?;
|
||||
let proof = proof_info
|
||||
.to_account_mut::<Proof>(&ore_api::ID)?
|
||||
.check_mut(|p| p.authority == *signer_info.key)?;
|
||||
.as_account_mut::<Proof>(&ore_api::ID)?
|
||||
.assert_mut_err(
|
||||
|p| p.authority == *signer_info.key,
|
||||
ProgramError::MissingRequiredSignature,
|
||||
)?;
|
||||
treasury_info.is_treasury()?;
|
||||
treasury_tokens_info.is_writable()?.is_treasury_tokens()?;
|
||||
token_program.is_program(&spl_token::ID)?;
|
||||
@@ -38,7 +41,7 @@ pub fn process_claim(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramResult
|
||||
beneficiary_info,
|
||||
token_program,
|
||||
amount,
|
||||
&[&[TREASURY, &[TREASURY_BUMP]]],
|
||||
&[TREASURY],
|
||||
)?;
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user