Use ProgramState and stubs to enforce account owners.

Change-Id: I7c653af6abd771ceb9ceb60460dbf742fe9fe9ec
This commit is contained in:
Reisen 2021-04-26 15:14:56 +00:00 committed by Stanislaw Drozd
parent 030697693b
commit 35efbbe87f
1 changed files with 8 additions and 2 deletions

View File

@ -4,6 +4,12 @@ use sha3::Digest;
use std::io::Write; use std::io::Write;
#[account]
struct BridgeInfo {}
#[account]
struct GuardianSetInfo {}
#[derive(Accounts)] #[derive(Accounts)]
pub struct VerifySig<'info> { pub struct VerifySig<'info> {
bridge: AccountInfo<'info>, bridge: AccountInfo<'info>,
@ -11,9 +17,9 @@ pub struct VerifySig<'info> {
// TODO: Make this a `Sysvar<'info, Instructions>` like you can do // TODO: Make this a `Sysvar<'info, Instructions>` like you can do
// with `Rent` when `Sysvar` gets implemented for `Instructions` inside Solana. // with `Rent` when `Sysvar` gets implemented for `Instructions` inside Solana.
instruction_sysvar: AccountInfo<'info>, instruction_sysvar: AccountInfo<'info>,
bridge_info: AccountInfo<'info>, bridge_info: ProgramState<'info, BridgeInfo>,
sig_info: AccountInfo<'info>, sig_info: AccountInfo<'info>,
guardian_set_info: AccountInfo<'info>, guardian_set_info: ProgramState<'info, GuardianSetInfo>,
payer_info: AccountInfo<'info>, payer_info: AccountInfo<'info>,
} }