Skip to content
Open
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
8 changes: 4 additions & 4 deletions src/build/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const HYPERWARE_WIT_1_0_0_URL: &str =
"https://raw.githubusercontent.com/hyperware-ai/hyperware-wit/v1.0.0/hyperware.wit";
const WASI_VERSION: &str = "33.0.0"; // TODO: un-hardcode
const DEFAULT_WORLD_1_0_0: &str = "process-v1";
const KINODE_PROCESS_LIB_CRATE_NAME: &str = "hyperware_process_lib";
const HYPER_PROCESS_LIB_CRATE_NAME: &str = "hyperware_process_lib";

#[derive(Debug, Clone, Serialize, Deserialize)]
struct CargoFile {
Expand Down Expand Up @@ -538,19 +538,19 @@ fn check_process_lib_version(cargo_toml_path: &Path) -> Result<()> {
.iter()
.map(|package| (package.id.clone(), package))
.collect();
let versions = find_crate_versions(KINODE_PROCESS_LIB_CRATE_NAME, &packages)?;
let versions = find_crate_versions(HYPER_PROCESS_LIB_CRATE_NAME, &packages)?;
if versions.len() > 1 {
return Err(eyre!(
"Found different versions of {} in different crates:{}",
KINODE_PROCESS_LIB_CRATE_NAME,
HYPER_PROCESS_LIB_CRATE_NAME,
versions.iter().fold(String::new(), |s, (version, crates)| {
format!("{s}\n{version}\t{crates:?}")
})
)
.with_suggestion(|| {
format!(
"Set all {} versions to be the same to avoid hard-to-debug errors.",
KINODE_PROCESS_LIB_CRATE_NAME,
HYPER_PROCESS_LIB_CRATE_NAME,
)
}));
}
Expand Down
24 changes: 12 additions & 12 deletions src/publish/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ sol! {
) external payable returns (uint256 blockNumber, bytes[] memory returnData);
}

const FAKE_KIMAP_ADDRESS: &str = "0xEce71a05B36CA55B895427cD9a440eEF7Cf3669D";
const REAL_KIMAP_ADDRESS: &str = "0x000000000044C6B8Cb4d8f0F889a3E47664EAeda";
const FAKE_HYPERMAP_ADDRESS: &str = "0xEce71a05B36CA55B895427cD9a440eEF7Cf3669D";
const REAL_HYPERMAP_ADDRESS: &str = "0x000000000044C6B8Cb4d8f0F889a3E47664EAeda";

const FAKE_KINO_ACCOUNT_IMPL: &str = "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0";
const REAL_KINO_ACCOUNT_IMPL: &str = "0x0000000000691b70A051CFAF82F9622E150369f3";
const FAKE_HYPER_ACCOUNT_IMPL: &str = "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0";
const REAL_HYPER_ACCOUNT_IMPL: &str = "0x0000000000691b70A051CFAF82F9622E150369f3";

const REAL_CHAIN_ID: u64 = 8453;
const FAKE_CHAIN_ID: u64 = 31337;
Expand Down Expand Up @@ -288,7 +288,7 @@ async fn prepare_hypermap_put(
hypermap: Address,
provider: &RootProvider<PubSubFrontend>,
wallet_address: Address,
kino_account_impl: Address,
hyper_account_impl: Address,
) -> Result<(Address, Vec<u8>)> {
// if app_tba exists, update existing state;
// else mint it & add new state
Expand All @@ -304,7 +304,7 @@ async fn prepare_hypermap_put(
who: wallet_address,
label: name.into(),
initialization: multicall.into(),
implementation: kino_account_impl,
implementation: hyper_account_impl,
}
.abi_encode();
let call = executeCall {
Expand Down Expand Up @@ -335,15 +335,15 @@ pub async fn build_tx(
max_fee_per_gas: Option<u128>,
) -> Result<(Address, Vec<u8>, TransactionRequest)> {
let hypermap = Address::from_str(if *real {
REAL_KIMAP_ADDRESS
REAL_HYPERMAP_ADDRESS
} else {
FAKE_KIMAP_ADDRESS
FAKE_HYPERMAP_ADDRESS
})?;
let multicall_address = Address::from_str(MULTICALL_ADDRESS)?;
let kino_account_impl = Address::from_str(if *real {
REAL_KINO_ACCOUNT_IMPL
let hyper_account_impl = Address::from_str(if *real {
REAL_HYPER_ACCOUNT_IMPL
} else {
FAKE_KINO_ACCOUNT_IMPL
FAKE_HYPER_ACCOUNT_IMPL
})?;

let (to, call) = if *unpublish {
Expand All @@ -366,7 +366,7 @@ pub async fn build_tx(
hypermap,
&provider,
wallet_address,
kino_account_impl,
hyper_account_impl,
)
.await?
};
Expand Down