Pythnet mainnet deploy (#1388)
This commit is contained in:
parent
910eb0f3e0
commit
f0b7225591
|
@ -55,6 +55,13 @@ export type EVMChainName =
|
|||
| "optimism"
|
||||
| "gnosis"
|
||||
| "ropsten";
|
||||
/**
|
||||
*
|
||||
* All the Solana-based chain names that Wormhole supports
|
||||
*/
|
||||
export type SolanaChainName =
|
||||
| "solana"
|
||||
| "pythnet";
|
||||
|
||||
export type TerraChainName = "terra" | "terra2";
|
||||
|
||||
|
@ -201,7 +208,7 @@ const MAINNET = {
|
|||
nft_bridge: undefined,
|
||||
},
|
||||
pythnet: {
|
||||
core: undefined,
|
||||
core: "H3fxXJ86ADW2PNuDDmZJg6mzTtPxkYCpNuQUTgmJ7AjU",
|
||||
token_bridge: undefined,
|
||||
nft_bridge: undefined,
|
||||
},
|
||||
|
@ -350,7 +357,7 @@ const TESTNET = {
|
|||
nft_bridge: undefined,
|
||||
},
|
||||
pythnet: {
|
||||
core: undefined,
|
||||
core: "EUrRARh92Cdc54xrDn6qzaqjA77NRrCcfbr8kPwoTL4z",
|
||||
token_bridge: undefined,
|
||||
nft_bridge: undefined,
|
||||
},
|
||||
|
|
|
@ -36,7 +36,7 @@ use crate::{
|
|||
},
|
||||
DeserializePayload,
|
||||
PayloadMessage,
|
||||
CHAIN_ID_SOLANA,
|
||||
CHAIN_ID_GOVERANCE,
|
||||
};
|
||||
|
||||
/// Fail if the emitter is not the known governance key, or the emitting chain is not Solana.
|
||||
|
@ -46,7 +46,7 @@ where
|
|||
{
|
||||
let expected_emitter = std::env!("EMITTER_ADDRESS");
|
||||
let current_emitter = format!("{}", Pubkey::new_from_array(vaa.meta().emitter_address));
|
||||
if expected_emitter != current_emitter || vaa.meta().emitter_chain != CHAIN_ID_SOLANA {
|
||||
if expected_emitter != current_emitter || vaa.meta().emitter_chain != CHAIN_ID_GOVERANCE {
|
||||
Err(InvalidGovernanceKey.into())
|
||||
} else {
|
||||
Ok(())
|
||||
|
|
|
@ -44,7 +44,7 @@ use crate::{
|
|||
UpgradeContractData,
|
||||
UpgradeGuardianSetData,
|
||||
VerifySignaturesData,
|
||||
CHAIN_ID_SOLANA,
|
||||
CHAIN_ID_GOVERANCE,
|
||||
};
|
||||
|
||||
pub fn initialize(
|
||||
|
@ -254,7 +254,7 @@ pub fn upgrade_contract(
|
|||
let claim = Claim::<'_>::key(
|
||||
&ClaimDerivationData {
|
||||
emitter_address: emitter.to_bytes(),
|
||||
emitter_chain: CHAIN_ID_SOLANA,
|
||||
emitter_chain: CHAIN_ID_GOVERANCE,
|
||||
sequence,
|
||||
},
|
||||
&program_id,
|
||||
|
@ -308,7 +308,7 @@ pub fn upgrade_guardian_set(
|
|||
let claim = Claim::<'_>::key(
|
||||
&ClaimDerivationData {
|
||||
emitter_address: emitter.to_bytes(),
|
||||
emitter_chain: CHAIN_ID_SOLANA,
|
||||
emitter_chain: CHAIN_ID_GOVERANCE,
|
||||
sequence,
|
||||
},
|
||||
&program_id,
|
||||
|
@ -357,7 +357,7 @@ pub fn set_fees(
|
|||
let claim = Claim::<'_>::key(
|
||||
&ClaimDerivationData {
|
||||
emitter_address: emitter.to_bytes(),
|
||||
emitter_chain: CHAIN_ID_SOLANA,
|
||||
emitter_chain: CHAIN_ID_GOVERANCE,
|
||||
sequence,
|
||||
},
|
||||
&program_id,
|
||||
|
@ -392,7 +392,7 @@ pub fn transfer_fees(
|
|||
let claim = Claim::<'_>::key(
|
||||
&ClaimDerivationData {
|
||||
emitter_address: emitter.to_bytes(),
|
||||
emitter_chain: CHAIN_ID_SOLANA,
|
||||
emitter_chain: CHAIN_ID_GOVERANCE,
|
||||
sequence,
|
||||
},
|
||||
&program_id,
|
||||
|
|
|
@ -6,6 +6,7 @@ use solitaire::*;
|
|||
|
||||
pub const MAX_LEN_GUARDIAN_KEYS: usize = 19;
|
||||
pub const CHAIN_ID_SOLANA: u16 = 1;
|
||||
pub const CHAIN_ID_GOVERANCE: u16 = 1;
|
||||
|
||||
#[cfg(feature = "instructions")]
|
||||
pub mod instructions;
|
||||
|
|
Loading…
Reference in New Issue