Fix accounts required for calling Initialize/PostMessage
Change-Id: Ide3fa8401bac6b1b05bc4c5ec1f552a98178ad06
This commit is contained in:
parent
de31d0d381
commit
146b368fc0
|
@ -41,6 +41,8 @@ impl<'a> From<&PostMessage<'a>> for SequenceDerivationData<'a> {
|
|||
pub struct PostMessage<'b> {
|
||||
pub bridge: Bridge<'b, { AccountState::Initialized }>,
|
||||
|
||||
pub fee_vault: FeeAccount<'b>,
|
||||
|
||||
/// Account to store the posted message
|
||||
pub message: UninitializedMessage<'b>,
|
||||
|
||||
|
|
|
@ -59,18 +59,6 @@ impl From<&PostVAAData> for GuardianSetDerivationData {
|
|||
|
||||
#[derive(FromAccounts)]
|
||||
pub struct PostVAA<'b> {
|
||||
/// Required by Anchor for associated accounts.
|
||||
pub system_program: Info<'b>,
|
||||
|
||||
/// Required by Anchor for associated accounts.
|
||||
pub rent: Info<'b>,
|
||||
|
||||
/// Clock used for timestamping.
|
||||
pub clock: Sysvar<'b, Clock>,
|
||||
|
||||
/// State struct, derived by #[state], used for associated accounts.
|
||||
pub state: Info<'b>,
|
||||
|
||||
/// Information about the current guardian set.
|
||||
pub guardian_set: GuardianSet<'b, { AccountState::Initialized }>,
|
||||
|
||||
|
@ -80,11 +68,14 @@ pub struct PostVAA<'b> {
|
|||
/// Signature Info
|
||||
pub signature_set: SignatureSet<'b, { AccountState::Initialized }>,
|
||||
|
||||
/// Message the VAA is associated with.
|
||||
pub message: Message<'b, { AccountState::MaybeInitialized }>,
|
||||
|
||||
/// Account used to pay for auxillary instructions.
|
||||
pub payer: Info<'b>,
|
||||
|
||||
/// Message the VAA is associated with.
|
||||
pub message: Message<'b, { AccountState::MaybeInitialized }>,
|
||||
/// Clock used for timestamping.
|
||||
pub clock: Sysvar<'b, Clock>,
|
||||
}
|
||||
|
||||
impl<'b> InstructionContext<'b> for PostVAA<'b> {
|
||||
|
|
|
@ -11,7 +11,7 @@ pub mod vaa;
|
|||
|
||||
use solitaire::*;
|
||||
|
||||
use api::{
|
||||
pub use api::{
|
||||
initialize,
|
||||
post_message,
|
||||
post_vaa,
|
||||
|
|
|
@ -201,6 +201,21 @@ dependencies = [
|
|||
"syn 1.0.73",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bridge"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"borsh",
|
||||
"byteorder",
|
||||
"primitive-types",
|
||||
"sha3",
|
||||
"solana-client",
|
||||
"solana-program",
|
||||
"solana-sdk",
|
||||
"solitaire",
|
||||
"solitaire-client",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bs58"
|
||||
version = "0.3.1"
|
||||
|
|
|
@ -144,6 +144,7 @@ impl<'a, 'b: 'a, K, T: AccountSize + Seeded<K> + Keyed<'a, 'b> + Owned> Creatabl
|
|||
size as u64,
|
||||
&self.owner_pubkey(ctx.program_id)?,
|
||||
);
|
||||
|
||||
Ok(invoke_signed(&ix, ctx.accounts, &[seed_slice])?)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue