Skip to content

Commit

Permalink
feat(remote_executor): update eclipse_mainnet (#1813)
Browse files Browse the repository at this point in the history
* update xc-admin-frontend to show eclipse_mainnet proposals

* fix test

* precommit

* revert specific files to match main

* dont show text if targetNetwork is not resolved
  • Loading branch information
cctdaniel authored Aug 6, 2024
1 parent e73fff2 commit 5f9e78c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ pythnet = []
pythtest = []
eclipse_devnet = []
eclipse_testnet = []
eclipse_mainnet = []

[dependencies]
anchor-lang = {version = "0.25.0", features = ["init-if-needed"]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ pub const CHAIN_ID_ARRAY: &[(&str, u16)] = &[
("pythtest", 26),
("eclipse_devnet", 40001),
("eclipse_testnet", 40002),
("eclipse_mainnet", 40003),
];

#[cfg(any(feature = "pythnet", feature = "pythtest"))]
Expand All @@ -30,6 +31,9 @@ pub const CHAIN_ID: u16 = 40001;
#[cfg(feature = "eclipse_testnet")]
pub const CHAIN_ID: u16 = 40002;

#[cfg(feature = "eclipse_mainnet")]
pub const CHAIN_ID: u16 = 40003;

#[derive(AnchorDeserialize, AnchorSerialize, Debug, PartialEq, Eq)]
pub struct ExecutorPayload {
pub header: GovernanceHeader,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ impl Owner for AnchorVaa {
Pubkey::from_str("EUrRARh92Cdc54xrDn6qzaqjA77NRrCcfbr8kPwoTL4z").unwrap()
}

#[cfg(any(feature = "eclipse_devnet", feature = "eclipse_testnet"))]
#[cfg(any(
feature = "eclipse_devnet",
feature = "eclipse_testnet",
feature = "eclipse_mainnet"
))]
fn owner() -> Pubkey {
Pubkey::from_str("HDwcJBJXjL9FpJ7UBsYBtaDjsBUhuLCUYoz3zr8SWWaQ").unwrap()
}
Expand Down
5 changes: 5 additions & 0 deletions governance/xc_admin/packages/xc_admin_common/src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ export const RECEIVER_CHAINS = {
arbitrum: 23,
optimism: 24,

// SVM chains
eclipse_devnet: 40001,
eclipse_testnet: 40002,
eclipse_mainnet: 40003,

cronos: 60001,
kcc: 60002,
zksync: 60003,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ export const Proposal = ({
{uniqueTargetCluster
? `Target network: ${targetClusters[0]}`
: targetClusters.length == 0
? 'No target network detected'
? ''
: `Multiple target networks detected ${targetClusters.join(' ')}`}
</h4>
</div>
Expand Down

0 comments on commit 5f9e78c

Please sign in to comment.