Skip to content

Commit 32ab2e6

Browse files
committed
Fix rebase
1 parent 7313b16 commit 32ab2e6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+330
-318
lines changed

Cargo.lock

Lines changed: 15 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

programs/associated-token-account/src/instructions/create.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use solana_account_view::AccountView;
22
use solana_instruction_view::{
33
cpi::{invoke_signed, Signer},
4-
AccountPrivilege, InstructionView,
4+
AccountRole, InstructionView,
55
};
66
use solana_program_error::ProgramResult;
77

@@ -39,13 +39,13 @@ impl Create<'_> {
3939
#[inline(always)]
4040
pub fn invoke_signed(&self, signers: &[Signer]) -> ProgramResult {
4141
// account metadata
42-
let account_metas: [AccountMeta; 6] = [
43-
AccountMeta::writable_signer(self.funding_account.address()),
44-
AccountMeta::writable(self.account.address()),
45-
AccountMeta::readonly(self.wallet.address()),
46-
AccountMeta::readonly(self.mint.address()),
47-
AccountMeta::readonly(self.system_program.address()),
48-
AccountMeta::readonly(self.token_program.address()),
42+
let account_metas: [AccountRole; 6] = [
43+
AccountRole::writable_signer(self.funding_account.address()),
44+
AccountRole::writable(self.account.address()),
45+
AccountRole::readonly(self.wallet.address()),
46+
AccountRole::readonly(self.mint.address()),
47+
AccountRole::readonly(self.system_program.address()),
48+
AccountRole::readonly(self.token_program.address()),
4949
];
5050

5151
// Instruction data:

programs/associated-token-account/src/instructions/create_idempotent.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use solana_account_view::AccountView;
22
use solana_instruction_view::{
33
cpi::{invoke_signed, Signer},
4-
AccountPrivilege, InstructionView,
4+
AccountRole, InstructionView,
55
};
66
use solana_program_error::ProgramResult;
77

@@ -40,13 +40,13 @@ impl CreateIdempotent<'_> {
4040
#[inline(always)]
4141
pub fn invoke_signed(&self, signers: &[Signer]) -> ProgramResult {
4242
// account metadata
43-
let account_metas: [AccountMeta; 6] = [
44-
AccountMeta::writable_signer(self.funding_account.address()),
45-
AccountMeta::writable(self.account.address()),
46-
AccountMeta::readonly(self.wallet.address()),
47-
AccountMeta::readonly(self.mint.address()),
48-
AccountMeta::readonly(self.system_program.address()),
49-
AccountMeta::readonly(self.token_program.address()),
43+
let account_metas: [AccountRole; 6] = [
44+
AccountRole::writable_signer(self.funding_account.address()),
45+
AccountRole::writable(self.account.address()),
46+
AccountRole::readonly(self.wallet.address()),
47+
AccountRole::readonly(self.mint.address()),
48+
AccountRole::readonly(self.system_program.address()),
49+
AccountRole::readonly(self.token_program.address()),
5050
];
5151

5252
// Instruction data:

programs/associated-token-account/src/instructions/recover_nested.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use solana_account_view::AccountView;
22
use solana_instruction_view::{
33
cpi::{invoke_signed, Signer},
4-
AccountPrivilege, InstructionView,
4+
AccountRole, InstructionView,
55
};
66
use solana_program_error::ProgramResult;
77

@@ -50,14 +50,14 @@ impl RecoverNested<'_> {
5050
#[inline(always)]
5151
pub fn invoke_signed(&self, signers: &[Signer]) -> ProgramResult {
5252
// account metadata
53-
let account_metas: [AccountMeta; 7] = [
54-
AccountMeta::writable(self.account.address()),
55-
AccountMeta::readonly(self.mint.address()),
56-
AccountMeta::writable(self.destination_account.address()),
57-
AccountMeta::readonly(self.owner_account.address()),
58-
AccountMeta::readonly(self.owner_mint.address()),
59-
AccountMeta::writable_signer(self.wallet.address()),
60-
AccountMeta::readonly(self.token_program.address()),
53+
let account_metas: [AccountRole; 7] = [
54+
AccountRole::writable(self.account.address()),
55+
AccountRole::readonly(self.mint.address()),
56+
AccountRole::writable(self.destination_account.address()),
57+
AccountRole::readonly(self.owner_account.address()),
58+
AccountRole::readonly(self.owner_mint.address()),
59+
AccountRole::writable_signer(self.wallet.address()),
60+
AccountRole::readonly(self.token_program.address()),
6161
];
6262

6363
// Instruction data:

programs/memo/src/instructions/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use core::mem::MaybeUninit;
33
use solana_account_view::AccountView;
44
use solana_instruction_view::{
55
cpi::{slice_invoke_signed, Signer, MAX_CPI_ACCOUNTS},
6-
AccountPrivilege, InstructionView,
6+
AccountRole, InstructionView,
77
};
88
use solana_program_error::{ProgramError, ProgramResult};
99

@@ -26,8 +26,7 @@ impl Memo<'_, '_, '_> {
2626

2727
#[inline(always)]
2828
pub fn invoke_signed(&self, signers_seeds: &[Signer]) -> ProgramResult {
29-
const UNINIT_META: MaybeUninit<AccountPrivilege> =
30-
MaybeUninit::<AccountPrivilege>::uninit();
29+
const UNINIT_META: MaybeUninit<AccountRole> = MaybeUninit::<AccountRole>::uninit();
3130

3231
// We don't know num_accounts at compile time, so we use MAX_CPI_ACCOUNTS
3332
let mut account_metas = [UNINIT_META; MAX_CPI_ACCOUNTS];
@@ -43,7 +42,7 @@ impl Memo<'_, '_, '_> {
4342
// SAFETY: i is less than len(self.signers)
4443
account_metas
4544
.get_unchecked_mut(i)
46-
.write(AccountMeta::readonly_signer(
45+
.write(AccountRole::readonly_signer(
4746
self.signers.get_unchecked(i).address(),
4847
));
4948
}

programs/system/src/instructions/advance_nonce_account.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use solana_account_view::AccountView;
22
use solana_instruction_view::{
33
cpi::{invoke_signed, Signer},
4-
AccountPrivilege, InstructionView,
4+
AccountRole, InstructionView,
55
};
66
use solana_program_error::ProgramResult;
77

@@ -31,10 +31,10 @@ impl AdvanceNonceAccount<'_> {
3131
#[inline(always)]
3232
pub fn invoke_signed(&self, signers: &[Signer]) -> ProgramResult {
3333
// account metadata
34-
let account_metas: [AccountMeta; 3] = [
35-
AccountMeta::writable(self.account.address()),
36-
AccountMeta::readonly(self.recent_blockhashes_sysvar.address()),
37-
AccountMeta::readonly_signer(self.authority.address()),
34+
let account_metas: [AccountRole; 3] = [
35+
AccountRole::writable(self.account.address()),
36+
AccountRole::readonly(self.recent_blockhashes_sysvar.address()),
37+
AccountRole::readonly_signer(self.authority.address()),
3838
];
3939

4040
// instruction

programs/system/src/instructions/allocate.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use solana_account_view::AccountView;
22
use solana_instruction_view::{
33
cpi::{invoke_signed, Signer},
4-
AccountPrivilege, InstructionView,
4+
AccountRole, InstructionView,
55
};
66
use solana_program_error::ProgramResult;
77

@@ -26,8 +26,8 @@ impl Allocate<'_> {
2626
#[inline(always)]
2727
pub fn invoke_signed(&self, signers: &[Signer]) -> ProgramResult {
2828
// account metadata
29-
let account_metas: [AccountMeta; 1] =
30-
[AccountMeta::writable_signer(self.account.address())];
29+
let account_metas: [AccountRole; 1] =
30+
[AccountRole::writable_signer(self.account.address())];
3131

3232
// instruction data
3333
// - [0..4 ]: instruction discriminator

programs/system/src/instructions/allocate_with_seed.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use solana_account_view::AccountView;
22
use solana_address::Address;
33
use solana_instruction_view::{
44
cpi::{invoke_signed, Signer},
5-
AccountPrivilege, InstructionView,
5+
AccountRole, InstructionView,
66
};
77
use solana_program_error::ProgramResult;
88

@@ -42,9 +42,9 @@ impl AllocateWithSeed<'_, '_, '_> {
4242
#[inline(always)]
4343
pub fn invoke_signed(&self, signers: &[Signer]) -> ProgramResult {
4444
// account metadata
45-
let account_metas: [AccountMeta; 2] = [
46-
AccountMeta::writable(self.account.address()),
47-
AccountMeta::readonly_signer(self.base.address()),
45+
let account_metas: [AccountRole; 2] = [
46+
AccountRole::writable(self.account.address()),
47+
AccountRole::readonly_signer(self.base.address()),
4848
];
4949

5050
// instruction data

programs/system/src/instructions/assign.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use solana_account_view::AccountView;
22
use solana_address::Address;
33
use solana_instruction_view::{
44
cpi::{invoke_signed, Signer},
5-
AccountPrivilege, InstructionView,
5+
AccountRole, InstructionView,
66
};
77
use solana_program_error::ProgramResult;
88

@@ -27,8 +27,8 @@ impl Assign<'_, '_> {
2727
#[inline(always)]
2828
pub fn invoke_signed(&self, signers: &[Signer]) -> ProgramResult {
2929
// account metadata
30-
let account_metas: [AccountMeta; 1] =
31-
[AccountMeta::writable_signer(self.account.address())];
30+
let account_metas: [AccountRole; 1] =
31+
[AccountRole::writable_signer(self.account.address())];
3232

3333
// instruction data
3434
// - [0..4 ]: instruction discriminator

programs/system/src/instructions/assign_with_seed.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use solana_account_view::AccountView;
22
use solana_address::Address;
33
use solana_instruction_view::{
44
cpi::{invoke_signed, Signer},
5-
AccountPrivilege, InstructionView,
5+
AccountRole, InstructionView,
66
};
77
use solana_program_error::ProgramResult;
88

@@ -38,9 +38,9 @@ impl AssignWithSeed<'_, '_, '_> {
3838
#[inline(always)]
3939
pub fn invoke_signed(&self, signers: &[Signer]) -> ProgramResult {
4040
// account metadata
41-
let account_metas: [AccountMeta; 2] = [
42-
AccountMeta::writable(self.account.address()),
43-
AccountMeta::readonly_signer(self.base.address()),
41+
let account_metas: [AccountRole; 2] = [
42+
AccountRole::writable(self.account.address()),
43+
AccountRole::readonly_signer(self.base.address()),
4444
];
4545

4646
// instruction data

0 commit comments

Comments
 (0)