Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions crates/bloom-proto/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ fn default_preinstalled_petals() -> Vec<String> {
"polymarket".to_string(),
"near-intents".to_string(),
"enso".to_string(),
"hyperliquid".to_string(),
]
}

Expand Down Expand Up @@ -596,7 +597,7 @@ impl Config {
let mut seen_preinstalled = std::collections::BTreeSet::new();
for name in &self.petals.preinstalled {
validate_petal_runtime_name("preinstalled entry", name)?;
if !matches!(name.as_str(), "polymarket" | "near-intents" | "enso") {
if !matches!(name.as_str(), "polymarket" | "near-intents" | "enso" | "hyperliquid") {
return Err(ConfigError::Invalid(format!(
"unknown preinstalled Petal {name:?}"
)));
Expand Down Expand Up @@ -677,7 +678,7 @@ mod tests {
assert!(cfg.enso.is_none());
assert_eq!(
cfg.petals.preinstalled,
["polymarket", "near-intents", "enso"]
["polymarket", "near-intents", "enso", "hyperliquid"]
);
let hyperliquid = cfg
.hyperliquid
Expand Down Expand Up @@ -917,7 +918,7 @@ allow_broadcast = false
let explicitly_enabled = Config::load(&path).unwrap();
assert_eq!(
explicitly_enabled.petals.preinstalled,
vec!["polymarket", "near-intents", "enso"]
vec!["polymarket", "near-intents", "enso", "hyperliquid"]
);
}

Expand Down
11 changes: 11 additions & 0 deletions crates/bloom/src/github_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const TRUSTED_GITHUB_OWNER: &str = "bloom-directory";
const POLYMARKET_PARITY_COMMIT: &str = "e2e898b69046c9f5d905dd2cd66b3a57ef195542";
const NEAR_INTENTS_RELEASE_COMMIT: &str = "08e9bd83786425656bdd87e35031030cb7f3dc14";
const ENSO_RELEASE_COMMIT: &str = "59e3c884f83c9c97b69b1b415becf8572791273b";
const HYPERLIQUID_RELEASE_COMMIT: &str = "fa722a986c2a0a23977e9e00df54ebd291a686db";

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub(crate) struct PreinstalledPetal {
Expand Down Expand Up @@ -55,6 +56,15 @@ const PREINSTALLED_ENSO: PreinstalledPetal = PreinstalledPetal {
expected_hash: Some("82e541b237cd8dde0a566dfca7f3d20d6e688aacd23f62b1d0f1306f9c76ecb7"),
};

const PREINSTALLED_HYPERLIQUID: PreinstalledPetal = PreinstalledPetal {
name: "hyperliquid",
repository: "https://github.com/bloom-directory/bloom-petal-hyperliquid",
commit: HYPERLIQUID_RELEASE_COMMIT,
release_tag: "v0.1.4",
archive: "hyperliquid-v0.1.4.petal.tar.gz",
expected_hash: Some("1de2eb50b7ce0f0da03d3ef1ae6554c6f1b89393096d50183fe4f2dbca6b2af7"),
};

#[derive(Debug, Clone, PartialEq, Eq)]
pub(crate) struct GitHubRepo {
pub owner: String,
Expand Down Expand Up @@ -571,6 +581,7 @@ fn preinstalled_petal(name: &str) -> Option<&'static PreinstalledPetal> {
"polymarket" => Some(&PREINSTALLED_POLYMARKET),
"near-intents" => Some(&PREINSTALLED_NEAR_INTENTS),
"enso" => Some(&PREINSTALLED_ENSO),
"hyperliquid" => Some(&PREINSTALLED_HYPERLIQUID),
_ => None,
}
}
Expand Down