Feature flag for bridge address (#289)

* Feature flag for bridge address

* Feature flag for bridge address
This commit is contained in:
guibescos 2022-09-20 15:20:18 -05:00 committed by GitHub
parent c367812fe4
commit e7b9c883ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -15,7 +15,7 @@ use crate::{
error::ExecutorError,
};
pub const MAGIC_NUMBER: u32 = 0x4d475450; // Reverse order of the solidity contract because borsh uses little endian numbers
pub const MAGIC_NUMBER: u32 = 0x4d475450; // Reverse order of the solidity contract because borsh uses little endian numbers (the solidity contract uses 0x5054474d)
#[derive(AnchorDeserialize, AnchorSerialize)]
pub struct ExecutorPayload {

View File

@ -6,10 +6,16 @@ use std::{
};
use wormhole_solana::VAA;
// The current chain's wormhole bridge owns the VAA accounts
impl Owner for AnchorVaa {
#[cfg(not(feature = "pythtest"))]
fn owner() -> Pubkey {
Pubkey::from_str("H3fxXJ86ADW2PNuDDmZJg6mzTtPxkYCpNuQUTgmJ7AjU").unwrap()
// Pythnet bridge address
}
#[cfg(feature = "pythtest")]
fn owner() -> Pubkey {
Pubkey::from_str("EUrRARh92Cdc54xrDn6qzaqjA77NRrCcfbr8kPwoTL4z").unwrap()
}
}