diff --git a/solana/anchor-bridge/programs/anchor-bridge/src/account.rs b/solana/anchor-bridge/programs/anchor-bridge/src/account.rs deleted file mode 100644 index 952350a1..00000000 --- a/solana/anchor-bridge/programs/anchor-bridge/src/account.rs +++ /dev/null @@ -1,20 +0,0 @@ -use anchor_lang::{prelude::*, solana_program}; - -use crate::{types::Index, MAX_LEN_GUARDIAN_KEYS}; - -#[account] -pub struct BridgeInfo {} - -#[account] -pub struct GuardianSetInfo { - /// Version number of this guardian set. - pub index: Index, - /// Number of keys stored - pub len_keys: u8, - /// public key hashes of the guardian set - pub keys: [[u8; 20]; MAX_LEN_GUARDIAN_KEYS], - /// creation time - pub creation_time: u32, - /// expiration time when VAAs issued by this set are no longer valid - pub expiration_time: u32, -} diff --git a/solana/anchor-bridge/programs/anchor-bridge/src/lib.rs b/solana/anchor-bridge/programs/anchor-bridge/src/lib.rs index e8605bbd..0a223ecc 100644 --- a/solana/anchor-bridge/programs/anchor-bridge/src/lib.rs +++ b/solana/anchor-bridge/programs/anchor-bridge/src/lib.rs @@ -1,11 +1,9 @@ use anchor_lang::{prelude::*, solana_program}; -mod account; mod api; mod types; -use account::{BridgeInfo, GuardianSetInfo}; -use types::BridgeConfig; +use types::{Index, BridgeConfig}; /// An enum with labeled network identifiers. These must be consistent accross all wormhole /// contracts deployed on each chain. @@ -156,3 +154,20 @@ pub enum ErrorCode { #[msg("System account pubkey did not match expected address.")] InvalidSysVar, } + +#[account] +pub struct BridgeInfo {} + +#[account] +pub struct GuardianSetInfo { + /// Version number of this guardian set. + pub index: Index, + /// Number of keys stored + pub len_keys: u8, + /// public key hashes of the guardian set + pub keys: [[u8; 20]; MAX_LEN_GUARDIAN_KEYS], + /// creation time + pub creation_time: u32, + /// expiration time when VAAs issued by this set are no longer valid + pub expiration_time: u32, +}