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 {
|
pub mod anchor_bridge {
|
||||||
use super::*;
|
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 {
|
pub fn initialize(ctx: Context<Initialize>, data: InitializeData) -> ProgramResult {
|
||||||
api::initialize(
|
api::initialize(
|
||||||
ctx,
|
ctx,
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
use anchor_lang::prelude::*;
|
use anchor_lang::prelude::*;
|
||||||
|
|
||||||
|
// Distinguishes a Version number from a standard u32.
|
||||||
|
#[derive(AnchorSerialize, AnchorDeserialize, Clone, Copy, Debug)]
|
||||||
|
pub struct Version(u32);
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(AnchorSerialize, AnchorDeserialize, Clone, Copy, Debug)]
|
#[derive(AnchorSerialize, AnchorDeserialize, Clone, Copy, Debug)]
|
||||||
pub struct BridgeConfig {
|
pub struct BridgeConfig {
|
||||||
|
|
Loading…
Reference in New Issue