Skip to content

Commit e7b9c88

Browse files
authored
Feature flag for bridge address (#289)
* Feature flag for bridge address * Feature flag for bridge address
1 parent c367812 commit e7b9c88

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

pythnet/remote-executor/programs/remote-executor/src/state/governance_payload.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use crate::{
1515
error::ExecutorError,
1616
};
1717

18-
pub const MAGIC_NUMBER: u32 = 0x4d475450; // Reverse order of the solidity contract because borsh uses little endian numbers
18+
pub const MAGIC_NUMBER: u32 = 0x4d475450; // Reverse order of the solidity contract because borsh uses little endian numbers (the solidity contract uses 0x5054474d)
1919

2020
#[derive(AnchorDeserialize, AnchorSerialize)]
2121
pub struct ExecutorPayload {

pythnet/remote-executor/programs/remote-executor/src/state/posted_vaa.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,16 @@ use std::{
66
};
77
use wormhole_solana::VAA;
88

9+
// The current chain's wormhole bridge owns the VAA accounts
910
impl Owner for AnchorVaa {
11+
#[cfg(not(feature = "pythtest"))]
1012
fn owner() -> Pubkey {
1113
Pubkey::from_str("H3fxXJ86ADW2PNuDDmZJg6mzTtPxkYCpNuQUTgmJ7AjU").unwrap()
12-
// Pythnet bridge address
14+
}
15+
16+
#[cfg(feature = "pythtest")]
17+
fn owner() -> Pubkey {
18+
Pubkey::from_str("EUrRARh92Cdc54xrDn6qzaqjA77NRrCcfbr8kPwoTL4z").unwrap()
1319
}
1420
}
1521

0 commit comments

Comments
 (0)