Add bridge state to Anchor
Change-Id: I3ce0591d6810daf5fe8bd33f5bfd8d5297c0c9b5
This commit is contained in:
parent
21de7a58af
commit
17bda088f1
|
@ -57,6 +57,12 @@ pub struct InitializeData {
|
|||
pub mod anchor_bridge {
|
||||
use super::*;
|
||||
|
||||
#[state]
|
||||
pub struct Bridge {
|
||||
pub guardian_set_version: types::Version,
|
||||
pub config: types::BridgeConfig,
|
||||
}
|
||||
|
||||
pub fn initialize(ctx: Context<Initialize>, data: InitializeData) -> ProgramResult {
|
||||
api::initialize(
|
||||
ctx,
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
use anchor_lang::prelude::*;
|
||||
|
||||
// Distinguishes a Version number from a standard u32.
|
||||
#[derive(AnchorSerialize, AnchorDeserialize, Clone, Copy, Debug)]
|
||||
pub struct Version(u32);
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(AnchorSerialize, AnchorDeserialize, Clone, Copy, Debug)]
|
||||
pub struct BridgeConfig {
|
||||
|
|
Loading…
Reference in New Issue