diff --git a/.changeset/big-squids-serve.md b/.changeset/big-squids-serve.md new file mode 100644 index 0000000000..18883a8e60 --- /dev/null +++ b/.changeset/big-squids-serve.md @@ -0,0 +1,8 @@ +--- +'@hyperlane-xyz/helloworld': patch +'@hyperlane-xyz/widgets': patch +'@hyperlane-xyz/cli': patch +'@hyperlane-xyz/sdk': patch +--- + +Bump registry version to v6.3.0. diff --git a/.changeset/clever-melons-sell.md b/.changeset/clever-melons-sell.md deleted file mode 100644 index f84c5c2ecb..0000000000 --- a/.changeset/clever-melons-sell.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@hyperlane-xyz/sdk': minor ---- - -Require Sealevel native transfers to cover the rent of the recipient diff --git a/.changeset/empty-lemons-explode.md b/.changeset/empty-lemons-explode.md new file mode 100644 index 0000000000..1116888e23 --- /dev/null +++ b/.changeset/empty-lemons-explode.md @@ -0,0 +1,5 @@ +--- +'@hyperlane-xyz/cli': minor +--- + +Add support for deploying Hooks using a HookConfig within a WarpConfig diff --git a/.changeset/fresh-fishes-bake.md b/.changeset/fresh-fishes-bake.md new file mode 100644 index 0000000000..92b4dfdd2d --- /dev/null +++ b/.changeset/fresh-fishes-bake.md @@ -0,0 +1,6 @@ +--- +'@hyperlane-xyz/sdk': major +--- + +Rename TokenConfig related types and utilities for clarity. E.g. `CollateralConfig` to `CollateralTokenConfig`. +Export more config types and zod schemas diff --git a/.changeset/nice-oranges-glow.md b/.changeset/nice-oranges-glow.md deleted file mode 100644 index 2b844bcf99..0000000000 --- a/.changeset/nice-oranges-glow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@hyperlane-xyz/sdk': minor ---- - -Add `createHookUpdateTxs()` to `WarpModule.update()` such that it 1) deploys a hook for a warp route _without_ an existing hook, or 2) update an existing hook. diff --git a/.changeset/polite-beds-begin.md b/.changeset/polite-beds-begin.md deleted file mode 100644 index b710426be0..0000000000 --- a/.changeset/polite-beds-begin.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@hyperlane-xyz/sdk': minor ---- - -Introduce GcpValidator for retrieving announcements, checkpoints and metadata for a Validator posting to a GCP bucket. Uses GcpStorageWrapper for bucket operations. diff --git a/.changeset/seven-lemons-care.md b/.changeset/seven-lemons-care.md deleted file mode 100644 index 423c7f511e..0000000000 --- a/.changeset/seven-lemons-care.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@hyperlane-xyz/sdk': minor ---- - -Update validators for boba, duckchain, unichain, vana, bsquared, superseed. Update oort's own validator. Update blockpi's viction validator. Adad luganodes/dsrv to flame validator set. diff --git a/.changeset/silver-peas-mate.md b/.changeset/silver-peas-mate.md deleted file mode 100644 index 54a188eeda..0000000000 --- a/.changeset/silver-peas-mate.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@hyperlane-xyz/cli': minor -'@hyperlane-xyz/sdk': minor ---- - -updates the warp deployment config schema to be closer to the ica routing schema diff --git a/.changeset/sixty-plants-tie.md b/.changeset/sixty-plants-tie.md deleted file mode 100644 index 117b32c160..0000000000 --- a/.changeset/sixty-plants-tie.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@hyperlane-xyz/sdk': patch ---- - -Added decimal consistency checks to the Token checker diff --git a/.changeset/smooth-rocks-hammer.md b/.changeset/smooth-rocks-hammer.md new file mode 100644 index 0000000000..8cc170aac9 --- /dev/null +++ b/.changeset/smooth-rocks-hammer.md @@ -0,0 +1,5 @@ +--- +'@hyperlane-xyz/sdk': patch +--- + +Update default validator sets for alephzeroevmmainnet, appchain, lisk, lumiaprism, swell, treasure, vana, zklink. diff --git a/.changeset/sour-wasps-own.md b/.changeset/sour-wasps-own.md deleted file mode 100644 index 648d956e27..0000000000 --- a/.changeset/sour-wasps-own.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@hyperlane-xyz/sdk': minor ---- - -Updated the derivation logic to enable ICA ISM metdata building from on chain data to enable self relaying of ICA messages diff --git a/.changeset/ten-pigs-double.md b/.changeset/ten-pigs-double.md deleted file mode 100644 index 842ae825b9..0000000000 --- a/.changeset/ten-pigs-double.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@hyperlane-xyz/infra': minor ---- - -add USDC, USDT, cbBTC and ETH zeronetwork warp routes support in infra diff --git a/.changeset/tough-roses-allow.md b/.changeset/tough-roses-allow.md deleted file mode 100644 index 5a0d535345..0000000000 --- a/.changeset/tough-roses-allow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@hyperlane-xyz/sdk': minor ---- - -Added a getter to derive ATA payer accounts on Sealevel warp routes diff --git a/.changeset/tricky-clocks-retire.md b/.changeset/tricky-clocks-retire.md deleted file mode 100644 index 1ab12df18f..0000000000 --- a/.changeset/tricky-clocks-retire.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@hyperlane-xyz/sdk': minor ---- - -Implement Sealevel IGP quoting diff --git a/.changeset/twenty-bulldogs-flash.md b/.changeset/twenty-bulldogs-flash.md deleted file mode 100644 index 59a6510f85..0000000000 --- a/.changeset/twenty-bulldogs-flash.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@hyperlane-xyz/infra': minor -'@hyperlane-xyz/cli': minor -'@hyperlane-xyz/sdk': minor ---- - -Add ICAs management in core apply command diff --git a/.changeset/warm-starfishes-carry.md b/.changeset/warm-starfishes-carry.md deleted file mode 100644 index 5dfc281e5b..0000000000 --- a/.changeset/warm-starfishes-carry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@hyperlane-xyz/sdk': minor ---- - -Deploy to swell & lumiaprism. Parallelise router enrollment in HyperlaneRouterDeployer. diff --git a/.changeset/yellow-swans-join.md b/.changeset/yellow-swans-join.md deleted file mode 100644 index 9f0f3e4e07..0000000000 --- a/.changeset/yellow-swans-join.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@hyperlane-xyz/cli': patch ---- - -Fix a bug where it would try to relay the incorrect message from a transaction that dispatches multiple messages. diff --git a/.registryrc b/.registryrc index f299c14578..ed389daa94 100644 --- a/.registryrc +++ b/.registryrc @@ -1 +1 @@ -1591e4a4438c9d5c979e3a400a9831b14e85eeee +c7891cdf0fc6a1541c41e19251611c9152ee8bf9 diff --git a/rust/README.md b/rust/README.md index 289d1dc1d7..35050b1e79 100644 --- a/rust/README.md +++ b/rust/README.md @@ -15,6 +15,15 @@ info: This is the version for the rustup toolchain manager, not the rustc compil info: The currently active `rustc` version is `rustc 1.72.1 (d5c2e9c34 2023-09-13)` ``` +### Overview of Rust Workspaces + +There are two Rust workspaces in this directory: + +- [main](https://github.com/hyperlane-xyz/hyperlane-monorepo/tree/main/rust/main): The offchain agents workspace, most notably comprised of the relayer, validator, scraper and the Rust end-to-end tests (in `utils/run-locally`) +- [sealevel](https://github.com/hyperlane-xyz/hyperlane-monorepo/tree/main/rust/sealevel): Hyperlane smart contracts and tooling for the SVM, implemented in native Rust. + +You can only run `cargo build` after `cd`-ing into one of these workspaces. + #### Apple Silicon If your device has an Apple Silicon processor, you may need to install Rosetta 2: @@ -23,7 +32,9 @@ If your device has an Apple Silicon processor, you may need to install Rosetta 2 softwareupdate --install-rosetta --agree-to-license ``` -### Running Locally +### Running Agents Locally + +Make sure you're in the `main` workspace. To run the validator, run: @@ -174,7 +185,7 @@ For Ethereum and Celo connections we use We use the tokio async runtime environment. Please see the docs [here](https://docs.rs/tokio/1.1.0/tokio/). -### Repo layout +### `main` workspace layout - `hyperlane-base` - lowest dependency hyperlane utilities @@ -190,11 +201,9 @@ We use the tokio async runtime environment. Please see the docs - traits (interfaces) for the on-chain contracts - model implementations of the contracts in rust - merkle tree implementations (for provers) -- `chains/hyperlane-ethereum` +- `chains/hyperlane-*` + - VM-specific integration of the agents - depends on hyperlane-core (and transitively hyperlane-base) - - interfaces to the ethereum contracts -- `chains/hyperlane-fuel` - - depends on hyperlane-core - - interfaces to the fuel contracts + - interfaces with the contracts of that VM (e.g `ethereum`, `sealevel`, `cosmos`, `fuel`, etc) - `agents` - each of the off-chain agents implemented thus far diff --git a/rust/main/Cargo.lock b/rust/main/Cargo.lock index e8831b6029..e29131af94 100644 --- a/rust/main/Cargo.lock +++ b/rust/main/Cargo.lock @@ -2901,7 +2901,7 @@ dependencies = [ [[package]] name = "ethers" version = "1.0.2" -source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-12-03-3#edf703a6e515266245b88bb4f1daad24f7c6566c" +source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-12-10#d9f822ef9dd3d63b88cae74973540ef9e6773015" dependencies = [ "ethers-addressbook", "ethers-contract", @@ -2915,7 +2915,7 @@ dependencies = [ [[package]] name = "ethers-addressbook" version = "1.0.2" -source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-12-03-3#edf703a6e515266245b88bb4f1daad24f7c6566c" +source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-12-10#d9f822ef9dd3d63b88cae74973540ef9e6773015" dependencies = [ "ethers-core", "once_cell", @@ -2926,7 +2926,7 @@ dependencies = [ [[package]] name = "ethers-contract" version = "1.0.2" -source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-12-03-3#edf703a6e515266245b88bb4f1daad24f7c6566c" +source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-12-10#d9f822ef9dd3d63b88cae74973540ef9e6773015" dependencies = [ "ethers-contract-abigen", "ethers-contract-derive", @@ -2944,7 +2944,7 @@ dependencies = [ [[package]] name = "ethers-contract-abigen" version = "1.0.2" -source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-12-03-3#edf703a6e515266245b88bb4f1daad24f7c6566c" +source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-12-10#d9f822ef9dd3d63b88cae74973540ef9e6773015" dependencies = [ "Inflector", "cfg-if", @@ -2968,7 +2968,7 @@ dependencies = [ [[package]] name = "ethers-contract-derive" version = "1.0.2" -source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-12-03-3#edf703a6e515266245b88bb4f1daad24f7c6566c" +source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-12-10#d9f822ef9dd3d63b88cae74973540ef9e6773015" dependencies = [ "ethers-contract-abigen", "ethers-core", @@ -2982,7 +2982,7 @@ dependencies = [ [[package]] name = "ethers-core" version = "1.0.2" -source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-12-03-3#edf703a6e515266245b88bb4f1daad24f7c6566c" +source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-12-10#d9f822ef9dd3d63b88cae74973540ef9e6773015" dependencies = [ "arrayvec", "bytes", @@ -3012,7 +3012,7 @@ dependencies = [ [[package]] name = "ethers-etherscan" version = "1.0.2" -source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-12-03-3#edf703a6e515266245b88bb4f1daad24f7c6566c" +source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-12-10#d9f822ef9dd3d63b88cae74973540ef9e6773015" dependencies = [ "ethers-core", "getrandom 0.2.15", @@ -3028,7 +3028,7 @@ dependencies = [ [[package]] name = "ethers-middleware" version = "1.0.2" -source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-12-03-3#edf703a6e515266245b88bb4f1daad24f7c6566c" +source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-12-10#d9f822ef9dd3d63b88cae74973540ef9e6773015" dependencies = [ "async-trait", "auto_impl 0.5.0", @@ -3076,7 +3076,7 @@ dependencies = [ [[package]] name = "ethers-providers" version = "1.0.2" -source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-12-03-3#edf703a6e515266245b88bb4f1daad24f7c6566c" +source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-12-10#d9f822ef9dd3d63b88cae74973540ef9e6773015" dependencies = [ "async-trait", "auto_impl 1.2.0", @@ -3112,7 +3112,7 @@ dependencies = [ [[package]] name = "ethers-signers" version = "1.0.2" -source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-12-03-3#edf703a6e515266245b88bb4f1daad24f7c6566c" +source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-12-10#d9f822ef9dd3d63b88cae74973540ef9e6773015" dependencies = [ "async-trait", "coins-bip32 0.7.0", @@ -4639,6 +4639,7 @@ dependencies = [ "serializable-account-meta", "solana-account-decoder", "solana-client", + "solana-program", "solana-sdk", "solana-transaction-status", "thiserror", diff --git a/rust/main/Cargo.toml b/rust/main/Cargo.toml index 3fcdfa294c..72e3d6348d 100644 --- a/rust/main/Cargo.toml +++ b/rust/main/Cargo.toml @@ -127,6 +127,7 @@ sha256 = "1.1.4" sha3 = "0.10" solana-account-decoder = "=1.14.13" solana-client = "=1.14.13" +solana-program = "=1.14.13" solana-sdk = "=1.14.13" solana-transaction-status = "=1.14.13" static_assertions = "1.1" @@ -197,27 +198,27 @@ overflow-checks = true [workspace.dependencies.ethers] features = [] git = "https://github.com/hyperlane-xyz/ethers-rs" -tag = "2024-12-03-3" +tag = "2024-12-10" [workspace.dependencies.ethers-contract] features = ["legacy"] git = "https://github.com/hyperlane-xyz/ethers-rs" -tag = "2024-12-03-3" +tag = "2024-12-10" [workspace.dependencies.ethers-core] features = [] git = "https://github.com/hyperlane-xyz/ethers-rs" -tag = "2024-12-03-3" +tag = "2024-12-10" [workspace.dependencies.ethers-providers] features = [] git = "https://github.com/hyperlane-xyz/ethers-rs" -tag = "2024-12-03-3" +tag = "2024-12-10" [workspace.dependencies.ethers-signers] features = ["aws"] git = "https://github.com/hyperlane-xyz/ethers-rs" -tag = "2024-12-03-3" +tag = "2024-12-10" [patch.crates-io.curve25519-dalek] branch = "v3.2.2-relax-zeroize" diff --git a/rust/main/agents/relayer/src/msg/processor.rs b/rust/main/agents/relayer/src/msg/processor.rs index 59ec32cb69..21c6b1def1 100644 --- a/rust/main/agents/relayer/src/msg/processor.rs +++ b/rust/main/agents/relayer/src/msg/processor.rs @@ -86,24 +86,29 @@ impl ForwardBackwardIterator { loop { let high_nonce_message_status = self.high_nonce_iter.try_get_next_nonce(metrics)?; let low_nonce_message_status = self.low_nonce_iter.try_get_next_nonce(metrics)?; - // Always prioritize the high nonce message + match (high_nonce_message_status, low_nonce_message_status) { - // Keep iterating if only processed messages are found + // Always prioritize advancing the the high nonce iterator, as + // we have a preference for higher nonces (MessageStatus::Processed, _) => { self.high_nonce_iter.iterate(); } - (_, MessageStatus::Processed) => { - self.low_nonce_iter.iterate(); - } - // Otherwise return - either a processable message or nothing to process (MessageStatus::Processable(high_nonce_message), _) => { self.high_nonce_iter.iterate(); return Ok(Some(high_nonce_message)); } + + // Low nonce messages are only processed if the high nonce iterator + // can't make any progress + (_, MessageStatus::Processed) => { + self.low_nonce_iter.iterate(); + } (_, MessageStatus::Processable(low_nonce_message)) => { self.low_nonce_iter.iterate(); return Ok(Some(low_nonce_message)); } + + // If both iterators give us unindexed messages, there are no messages at the moment (MessageStatus::Unindexed, MessageStatus::Unindexed) => return Ok(None), } // This loop may iterate through millions of processed messages, blocking the runtime. @@ -157,7 +162,7 @@ impl DirectionalNonceIterator { } fn try_get_next_nonce( - &mut self, + &self, metrics: &MessageProcessorMetrics, ) -> Result> { if let Some(message) = self.indexed_message_with_nonce()? { diff --git a/rust/main/agents/relayer/src/server/message_retry.rs b/rust/main/agents/relayer/src/server/message_retry.rs index 6d04eed86a..6d160355a5 100644 --- a/rust/main/agents/relayer/src/server/message_retry.rs +++ b/rust/main/agents/relayer/src/server/message_retry.rs @@ -96,9 +96,11 @@ mod tests { let (addr, mut rx) = setup_test_server(); let client = reqwest::Client::new(); - let mut message = HyperlaneMessage::default(); - // Use a random destination domain - message.destination = 42; + let message = HyperlaneMessage { + // Use a random destination domain + destination: 42, + ..Default::default() + }; let pending_operation = MockPendingOperation::with_message_data(message.clone()); let matching_list_body = json!([ { @@ -127,9 +129,11 @@ mod tests { let (addr, mut rx) = setup_test_server(); let client = reqwest::Client::new(); - let mut message = HyperlaneMessage::default(); - // Use a random origin domain - message.origin = 42; + let message = HyperlaneMessage { + // Use a random origin domain + origin: 42, + ..Default::default() + }; let pending_operation = MockPendingOperation::with_message_data(message.clone()); let matching_list_body = json!([ { @@ -216,9 +220,11 @@ mod tests { let (addr, mut rx) = setup_test_server(); let client = reqwest::Client::new(); - let mut message = HyperlaneMessage::default(); - // Use a random origin domain - message.origin = 42; + let message = HyperlaneMessage { + // Use a random origin domain + origin: 42, + ..Default::default() + }; let pending_operation = MockPendingOperation::with_message_data(message.clone()); let matching_list_body = json!([ { diff --git a/rust/main/agents/scraper/migration/src/m20230309_000001_create_table_domain.rs b/rust/main/agents/scraper/migration/src/m20230309_000001_create_table_domain.rs index 848bb05e48..606a16c5da 100644 --- a/rust/main/agents/scraper/migration/src/m20230309_000001_create_table_domain.rs +++ b/rust/main/agents/scraper/migration/src/m20230309_000001_create_table_domain.rs @@ -14,6 +14,7 @@ use sea_orm_migration::prelude::*; /// This is why it does not use the domain id lookup tools in the library which /// are subject to change as we deprecate and add new ones. const DOMAINS: &[RawDomain] = &[ + // ---------- Begin: Mainnets and Testnets (alphabetically sorted) ------------- RawDomain { name: "alfajores", token: "CELO", @@ -38,6 +39,14 @@ const DOMAINS: &[RawDomain] = &[ is_test_net: false, is_deprecated: false, }, + RawDomain { + name: "arbitrumsepolia", + token: "ETH", + domain: 421614, + chain_id: 421614, + is_test_net: true, + is_deprecated: false, + }, RawDomain { name: "avalanche", token: "AVAX", @@ -54,6 +63,14 @@ const DOMAINS: &[RawDomain] = &[ is_test_net: false, is_deprecated: false, }, + RawDomain { + name: "basesepolia", + token: "ETH", + domain: 84532, + chain_id: 84532, + is_test_net: true, + is_deprecated: false, + }, RawDomain { name: "blast", token: "ETH", @@ -102,6 +119,38 @@ const DOMAINS: &[RawDomain] = &[ is_test_net: false, is_deprecated: false, }, + RawDomain { + name: "connextsepolia", + token: "ETH", + domain: 6398, + chain_id: 6398, + is_test_net: true, + is_deprecated: false, + }, + RawDomain { + name: "eclipsemainnet", + token: "ETH", + domain: 1408864445, + chain_id: 1408864445, + is_test_net: false, + is_deprecated: false, + }, + RawDomain { + name: "eclipsetestnet", + token: "ETH", + domain: 239092742, + chain_id: 239092742, + is_test_net: true, + is_deprecated: false, + }, + RawDomain { + name: "ecotestnet", + token: "ETH", + domain: 471923, + chain_id: 471923, + is_test_net: true, + is_deprecated: false, + }, RawDomain { name: "endurance", token: "ETH", @@ -158,6 +207,22 @@ const DOMAINS: &[RawDomain] = &[ is_test_net: false, is_deprecated: false, }, + RawDomain { + name: "inevm", + token: "INJ", + domain: 2525, + chain_id: 2525, + is_test_net: false, + is_deprecated: false, + }, + RawDomain { + name: "injective", + token: "INJ", + domain: 6909546, + chain_id: 6909546, + is_test_net: false, + is_deprecated: false, + }, RawDomain { name: "linea", token: "ETH", @@ -206,6 +271,14 @@ const DOMAINS: &[RawDomain] = &[ is_test_net: false, is_deprecated: false, }, + RawDomain { + name: "neutron", + token: "NTRN", + domain: 1853125230, + chain_id: 1853125230, + is_test_net: false, + is_deprecated: false, + }, RawDomain { name: "optimism", token: "ETH", @@ -214,6 +287,22 @@ const DOMAINS: &[RawDomain] = &[ is_test_net: false, is_deprecated: false, }, + RawDomain { + name: "optimismsepolia", + token: "ETH", + domain: 11155420, + chain_id: 11155420, + is_test_net: true, + is_deprecated: false, + }, + RawDomain { + name: "osmosis", + token: "OSMO", + domain: 875, + chain_id: 875, + is_test_net: false, + is_deprecated: false, + }, RawDomain { name: "polygon", token: "MATIC", @@ -222,6 +311,14 @@ const DOMAINS: &[RawDomain] = &[ is_test_net: false, is_deprecated: false, }, + RawDomain { + name: "polygonanoy", + token: "MATIC", + domain: 80002, + chain_id: 80002, + is_test_net: true, + is_deprecated: false, + }, RawDomain { name: "polygonzkevm", token: "ETH", @@ -271,13 +368,29 @@ const DOMAINS: &[RawDomain] = &[ is_deprecated: false, }, RawDomain { - name: "eclipsemainnet", - token: "ETH", - domain: 1408864445, - chain_id: 1408864445, + name: "solanatestnet", + token: "SOL", + domain: 1399811150, + chain_id: 1399811150, + is_test_net: true, + is_deprecated: false, + }, + RawDomain { + name: "stride", + token: "STRD", + domain: 745, + chain_id: 745, is_test_net: false, is_deprecated: false, }, + RawDomain { + name: "superpositiontestnet", + token: "SPN", + domain: 98985, + chain_id: 98985, + is_test_net: true, + is_deprecated: false, + }, RawDomain { name: "taiko", token: "ETH", @@ -294,14 +407,6 @@ const DOMAINS: &[RawDomain] = &[ is_test_net: false, is_deprecated: false, }, - RawDomain { - name: "inevm", - token: "INJ", - domain: 2525, - chain_id: 2525, - is_test_net: false, - is_deprecated: false, - }, RawDomain { name: "xlayer", token: "OKB", @@ -334,62 +439,8 @@ const DOMAINS: &[RawDomain] = &[ is_test_net: false, is_deprecated: false, }, - RawDomain { - name: "connextsepolia", - token: "ETH", - domain: 6398, - chain_id: 6398, - is_test_net: true, - is_deprecated: false, - }, - RawDomain { - name: "superpositiontestnet", - token: "SPN", - domain: 98985, - chain_id: 98985, - is_test_net: true, - is_deprecated: false, - }, - RawDomain { - name: "arbitrumsepolia", - token: "ETH", - domain: 421614, - chain_id: 421614, - is_test_net: true, - is_deprecated: false, - }, - RawDomain { - name: "basesepolia", - token: "ETH", - domain: 84532, - chain_id: 84532, - is_test_net: true, - is_deprecated: false, - }, - RawDomain { - name: "ecotestnet", - token: "ETH", - domain: 471923, - chain_id: 471923, - is_test_net: true, - is_deprecated: false, - }, - RawDomain { - name: "optimismsepolia", - token: "ETH", - domain: 11155420, - chain_id: 11155420, - is_test_net: true, - is_deprecated: false, - }, - RawDomain { - name: "polygonanoy", - token: "MATIC", - domain: 80002, - chain_id: 80002, - is_test_net: true, - is_deprecated: false, - }, + // ---------- End: Mainnets and Testnets (alphabetically sorted) --------------- + // ---------- Begin: E2E tests chains ------------------------------------------ RawDomain { name: "test1", token: "ETH", @@ -414,38 +465,6 @@ const DOMAINS: &[RawDomain] = &[ is_test_net: true, is_deprecated: false, }, - RawDomain { - name: "injective", - token: "INJ", - domain: 6909546, - chain_id: 6909546, - is_test_net: false, - is_deprecated: false, - }, - RawDomain { - name: "neutron", - token: "NTRN", - domain: 1853125230, - chain_id: 1853125230, - is_test_net: false, - is_deprecated: false, - }, - RawDomain { - name: "osmosis", - token: "OSMO", - domain: 875, - chain_id: 875, - is_test_net: false, - is_deprecated: false, - }, - RawDomain { - name: "stride", - token: "STRD", - domain: 745, - chain_id: 745, - is_test_net: false, - is_deprecated: false, - }, RawDomain { name: "cosmostest99990", token: "OSMO", @@ -462,6 +481,23 @@ const DOMAINS: &[RawDomain] = &[ is_test_net: true, is_deprecated: false, }, + RawDomain { + name: "sealeveltest1", + token: "SOL", + domain: 13375, + chain_id: 13375, + is_test_net: true, + is_deprecated: false, + }, + RawDomain { + name: "sealeveltest2", + token: "SOL", + domain: 13376, + chain_id: 13376, + is_test_net: true, + is_deprecated: false, + }, + // ---------- End: E2E tests chains ---------------- ]; #[derive(DeriveMigrationName)] diff --git a/rust/main/agents/scraper/migration/src/m20230309_000003_create_table_cursor.rs b/rust/main/agents/scraper/migration/src/m20230309_000003_create_table_cursor.rs index 2b50414f81..dd8c1d2e96 100644 --- a/rust/main/agents/scraper/migration/src/m20230309_000003_create_table_cursor.rs +++ b/rust/main/agents/scraper/migration/src/m20230309_000003_create_table_cursor.rs @@ -35,7 +35,20 @@ impl MigrationTrait for Migration { ) .to_owned(), ) - .await + .await?; + + manager + .create_index( + Index::create() + .table(Cursor::Table) + .name("cursor_domain_idx") + .col(Cursor::Domain) + .index_type(IndexType::BTree) + .to_owned(), + ) + .await?; + + Ok(()) } async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { diff --git a/rust/main/agents/scraper/migration/src/m20230309_000004_create_table_gas_payment.rs b/rust/main/agents/scraper/migration/src/m20230309_000004_create_table_gas_payment.rs index 90e2e9fa25..9285c83468 100644 --- a/rust/main/agents/scraper/migration/src/m20230309_000004_create_table_gas_payment.rs +++ b/rust/main/agents/scraper/migration/src/m20230309_000004_create_table_gas_payment.rs @@ -1,5 +1,3 @@ -use std::borrow::BorrowMut as _; - use sea_orm::ConnectionTrait; use sea_orm_migration::prelude::*; @@ -41,11 +39,15 @@ impl MigrationTrait for Migration { .big_unsigned() .not_null(), ) - .col(ColumnDef::new(GasPayment::Origin).unsigned()) - .col(ColumnDef::new(GasPayment::Destination).unsigned()) + .col(ColumnDef::new(GasPayment::Origin).unsigned().not_null()) + .col( + ColumnDef::new(GasPayment::Destination) + .unsigned() + .not_null(), + ) .col( ColumnDef::new_with_type(GasPayment::InterchainGasPaymaster, Address) - .borrow_mut(), + .not_null(), ) .col(ColumnDef::new(GasPayment::Sequence).big_integer()) .foreign_key( @@ -63,11 +65,6 @@ impl MigrationTrait for Migration { .from_col(GasPayment::Origin) .to(Domain::Table, Domain::Id), ) - .foreign_key( - ForeignKey::create() - .from_col(GasPayment::Destination) - .to(Domain::Table, Domain::Id), - ) .index( Index::create() // don't need domain because TxId includes it @@ -90,6 +87,19 @@ impl MigrationTrait for Migration { ) .await?; + manager + .create_index( + Index::create() + .table(GasPayment::Table) + .name("gas_payment_origin_interchain_gas_paymaster_sequence_idx") + .col(GasPayment::Origin) + .col(GasPayment::InterchainGasPaymaster) + .col(GasPayment::Sequence) + .index_type(IndexType::BTree) + .to_owned(), + ) + .await?; + manager .get_connection() .execute_unprepared(&format!( diff --git a/rust/main/agents/scraper/src/agent.rs b/rust/main/agents/scraper/src/agent.rs index 95da9aef5e..d1ded9010e 100644 --- a/rust/main/agents/scraper/src/agent.rs +++ b/rust/main/agents/scraper/src/agent.rs @@ -5,7 +5,7 @@ use derive_more::AsRef; use futures::future::try_join_all; use hyperlane_core::{Delivery, HyperlaneDomain, HyperlaneMessage, InterchainGasPayment, H512}; use tokio::{sync::mpsc::Receiver as MpscReceiver, task::JoinHandle}; -use tracing::{info_span, instrument::Instrumented, trace, Instrument}; +use tracing::{info, info_span, instrument::Instrumented, trace, Instrument}; use hyperlane_base::{ broadcast::BroadcastMpscSender, metrics::AgentMetrics, settings::IndexSettings, AgentMetadata, @@ -59,19 +59,24 @@ impl BaseAgent for Scraper { let mut scrapers: HashMap = HashMap::new(); for domain in settings.chains_to_scrape.iter() { + info!(domain = domain.name(), "create chain scraper for domain"); let chain_setup = settings.chain_setup(domain).expect("Missing chain config"); + info!(domain = domain.name(), "create HyperlaneProvider"); + let provider = settings + .build_provider(domain, &metrics.clone()) + .await? + .into(); + info!(domain = domain.name(), "create HyperlaneDbStore"); let store = HyperlaneDbStore::new( db.clone(), domain.clone(), chain_setup.addresses.mailbox, chain_setup.addresses.interchain_gas_paymaster, - settings - .build_provider(domain, &metrics.clone()) - .await? - .into(), + provider, &chain_setup.index.clone(), ) .await?; + info!(domain = domain.name(), "insert chain scraper"); scrapers.insert( domain.id(), ChainScraper { @@ -226,7 +231,7 @@ impl Scraper { let sync = self .as_ref() .settings - .watermark_contract_sync::( + .contract_sync::( &domain, &metrics.clone(), &contract_sync_metrics.clone(), @@ -259,11 +264,11 @@ impl Scraper { let sync = self .as_ref() .settings - .watermark_contract_sync::( + .contract_sync::( &domain, &metrics.clone(), &contract_sync_metrics.clone(), - Arc::new(store.clone()), + Arc::new(store.clone()) as _, true, ) .await diff --git a/rust/main/agents/scraper/src/conversions.rs b/rust/main/agents/scraper/src/conversions.rs index 9252d5cd44..33bbbc229e 100644 --- a/rust/main/agents/scraper/src/conversions.rs +++ b/rust/main/agents/scraper/src/conversions.rs @@ -8,3 +8,31 @@ pub fn u256_to_decimal(v: U256) -> BigDecimal { v.to_little_endian(&mut buf); BigDecimal::from(BigInt::from_bytes_le(Sign::Plus, &buf as &[u8])) } + +pub fn decimal_to_u256(v: BigDecimal) -> U256 { + let (i, _) = v.into_bigint_and_exponent(); + let (_, b) = i.to_bytes_le(); + U256::from_little_endian(&b) +} + +#[cfg(test)] +mod tests { + use hyperlane_core::U256; + + use crate::conversions::{decimal_to_u256, u256_to_decimal}; + + #[test] + fn test() { + // given + let u = U256::from_dec_str( + "76418673493495739447102571088210420170780567439841463646292940247514478199569", + ) + .unwrap(); + + // when + let r = decimal_to_u256(u256_to_decimal(u)); + + // then + assert_eq!(u, r); + } +} diff --git a/rust/main/agents/scraper/src/db/generated/gas_payment.rs b/rust/main/agents/scraper/src/db/generated/gas_payment.rs index 0ec04960be..5df74b084a 100644 --- a/rust/main/agents/scraper/src/db/generated/gas_payment.rs +++ b/rust/main/agents/scraper/src/db/generated/gas_payment.rs @@ -21,9 +21,9 @@ pub struct Model { pub gas_amount: BigDecimal, pub tx_id: i64, pub log_index: i64, - pub origin: Option, - pub destination: Option, - pub interchain_gas_paymaster: Option>, + pub origin: i32, + pub destination: i32, + pub interchain_gas_paymaster: Vec, pub sequence: Option, } @@ -57,7 +57,6 @@ impl PrimaryKeyTrait for PrimaryKey { #[derive(Copy, Clone, Debug, EnumIter)] pub enum Relation { - Destination, Domain, Origin, Transaction, @@ -75,12 +74,10 @@ impl ColumnTrait for Column { Self::GasAmount => ColumnType::Decimal(Some((78u32, 0u32))).def(), Self::TxId => ColumnType::BigInteger.def(), Self::LogIndex => ColumnType::BigInteger.def(), - Self::Origin => ColumnType::Integer.def().null(), - Self::Destination => ColumnType::Integer.def().null(), + Self::Origin => ColumnType::Integer.def(), + Self::Destination => ColumnType::Integer.def(), Self::InterchainGasPaymaster => { - ColumnType::Binary(sea_orm::sea_query::BlobSize::Blob(None)) - .def() - .null() + ColumnType::Binary(sea_orm::sea_query::BlobSize::Blob(None)).def() } Self::Sequence => ColumnType::BigInteger.def().null(), } @@ -90,10 +87,6 @@ impl ColumnTrait for Column { impl RelationTrait for Relation { fn def(&self) -> RelationDef { match self { - Self::Destination => Entity::belongs_to(super::domain::Entity) - .from(Column::Destination) - .to(super::domain::Column::Id) - .into(), Self::Domain => Entity::belongs_to(super::domain::Entity) .from(Column::Domain) .to(super::domain::Column::Id) diff --git a/rust/main/agents/scraper/src/db/payment.rs b/rust/main/agents/scraper/src/db/payment.rs index c4b04f5372..61f521aa27 100644 --- a/rust/main/agents/scraper/src/db/payment.rs +++ b/rust/main/agents/scraper/src/db/payment.rs @@ -6,7 +6,7 @@ use tracing::{debug, instrument}; use hyperlane_core::{address_to_bytes, h256_to_bytes, InterchainGasPayment, LogMeta, H256}; use migration::OnConflict; -use crate::conversions::u256_to_decimal; +use crate::conversions::{decimal_to_u256, u256_to_decimal}; use crate::date_time; use crate::db::ScraperDb; @@ -22,6 +22,61 @@ pub struct StorablePayment<'a> { } impl ScraperDb { + /// Get the payment associated with a sequence. + #[instrument(skip(self))] + pub async fn retrieve_payment_by_sequence( + &self, + origin: u32, + interchain_gas_paymaster: &H256, + sequence: u32, + ) -> Result> { + if let Some(payment) = gas_payment::Entity::find() + .filter(gas_payment::Column::Origin.eq(origin)) + .filter( + gas_payment::Column::InterchainGasPaymaster + .eq(address_to_bytes(interchain_gas_paymaster)), + ) + .filter(gas_payment::Column::Sequence.eq(sequence)) + .one(&self.0) + .await? + { + let payment = InterchainGasPayment { + message_id: H256::from_slice(&payment.msg_id), + destination: payment.destination as u32, + payment: decimal_to_u256(payment.payment), + gas_amount: decimal_to_u256(payment.gas_amount), + }; + Ok(Some(payment)) + } else { + Ok(None) + } + } + + /// Get the transaction id of the gas payment associated with a sequence. + #[instrument(skip(self))] + pub async fn retrieve_payment_tx_id( + &self, + origin: u32, + interchain_gas_paymaster: &H256, + sequence: u32, + ) -> Result> { + if let Some(payment) = gas_payment::Entity::find() + .filter(gas_payment::Column::Origin.eq(origin)) + .filter( + gas_payment::Column::InterchainGasPaymaster + .eq(address_to_bytes(interchain_gas_paymaster)), + ) + .filter(gas_payment::Column::Sequence.eq(sequence)) + .one(&self.0) + .await? + { + let txn_id = payment.tx_id; + Ok(Some(txn_id)) + } else { + Ok(None) + } + } + #[instrument(skip_all)] pub async fn store_payments( &self, @@ -44,9 +99,9 @@ impl ScraperDb { gas_amount: Set(u256_to_decimal(storable.payment.gas_amount)), tx_id: Unchanged(storable.txn_id), log_index: Unchanged(storable.meta.log_index.as_u64() as i64), - origin: Set(Some(domain as i32)), - destination: Set(Some(storable.payment.destination as i32)), - interchain_gas_paymaster: Set(Some(interchain_gas_paymaster.clone())), + origin: Set(domain as i32), + destination: Set(storable.payment.destination as i32), + interchain_gas_paymaster: Set(interchain_gas_paymaster.clone()), sequence: Set(storable.sequence), }) .collect_vec(); diff --git a/rust/main/agents/scraper/src/store/payments.rs b/rust/main/agents/scraper/src/store/payments.rs index 6c988dddda..9fe4888c8b 100644 --- a/rust/main/agents/scraper/src/store/payments.rs +++ b/rust/main/agents/scraper/src/store/payments.rs @@ -5,7 +5,10 @@ use eyre::Result; use itertools::Itertools; use tracing::debug; -use hyperlane_core::{HyperlaneLogStore, Indexed, InterchainGasPayment, LogMeta, H512}; +use hyperlane_core::{ + unwrap_or_none_result, HyperlaneLogStore, HyperlaneSequenceAwareIndexerStoreReader, Indexed, + InterchainGasPayment, LogMeta, H512, +}; use crate::db::StorablePayment; use crate::store::storage::HyperlaneDbStore; @@ -65,3 +68,34 @@ impl HyperlaneLogStore for HyperlaneDbStore { Ok(stored as u32) } } + +#[async_trait] +impl HyperlaneSequenceAwareIndexerStoreReader for HyperlaneDbStore { + /// Gets a gas payment by sequence + async fn retrieve_by_sequence(&self, sequence: u32) -> Result> { + let message = self + .db + .retrieve_payment_by_sequence( + self.domain.id(), + &self.interchain_gas_paymaster_address, + sequence, + ) + .await?; + Ok(message) + } + + /// Gets the block number at which the log occurred. + async fn retrieve_log_block_number_by_sequence(&self, sequence: u32) -> Result> { + let tx_id = unwrap_or_none_result!( + self.db + .retrieve_payment_tx_id( + self.domain.id(), + &self.interchain_gas_paymaster_address, + sequence, + ) + .await? + ); + let block_id = unwrap_or_none_result!(self.db.retrieve_block_id(tx_id).await?); + Ok(self.db.retrieve_block_number(block_id).await?) + } +} diff --git a/rust/main/agents/validator/src/submit.rs b/rust/main/agents/validator/src/submit.rs index 954b8d0d95..f4779c6656 100644 --- a/rust/main/agents/validator/src/submit.rs +++ b/rust/main/agents/validator/src/submit.rs @@ -559,7 +559,7 @@ mod test { let unix_timestamp = chrono::Utc::now().timestamp() as u64; let expected_reorg_period = 12; - let pre_reorg_merke_insertions = vec![ + let pre_reorg_merke_insertions = [ MerkleTreeInsertion::new(0, H256::random()), MerkleTreeInsertion::new(1, H256::random()), MerkleTreeInsertion::new(2, H256::random()), @@ -570,9 +570,9 @@ mod test { } // the last leaf is different post-reorg - let post_reorg_merkle_insertions = vec![ - pre_reorg_merke_insertions[0].clone(), - pre_reorg_merke_insertions[1].clone(), + let post_reorg_merkle_insertions = [ + pre_reorg_merke_insertions[0], + pre_reorg_merke_insertions[1], MerkleTreeInsertion::new(2, H256::random()), ]; let mut mock_onchain_merkle_tree = IncrementalMerkle::default(); @@ -589,9 +589,7 @@ mod test { // the db returns the pre-reorg merkle tree insertions let mut db = MockDb::new(); db.expect_retrieve_merkle_tree_insertion_by_leaf_index() - .returning(move |sequence| { - Ok(Some(pre_reorg_merke_insertions[*sequence as usize].clone())) - }); + .returning(move |sequence| Ok(Some(pre_reorg_merke_insertions[*sequence as usize]))); // boilerplate mocks let mut mock_merkle_tree_hook = MockMerkleTreeHook::new(); diff --git a/rust/main/chains/hyperlane-cosmos/src/libs/account/tests.rs b/rust/main/chains/hyperlane-cosmos/src/libs/account/tests.rs index 0ba8f73d74..1dc7d30331 100644 --- a/rust/main/chains/hyperlane-cosmos/src/libs/account/tests.rs +++ b/rust/main/chains/hyperlane-cosmos/src/libs/account/tests.rs @@ -61,14 +61,14 @@ fn test_ethereum_style() { fn compressed_public_key() -> PublicKey { let hex = hex::decode(COMPRESSED_PUBLIC_KEY).unwrap(); let tendermint = tendermint::PublicKey::from_raw_secp256k1(&hex).unwrap(); - let pub_key = PublicKey::from(tendermint); - pub_key + + PublicKey::from(tendermint) } fn decompressed_public_key() -> PublicKey { let hex = hex::decode(COMPRESSED_PUBLIC_KEY).unwrap(); let decompressed = decompress_public_key(&hex).unwrap(); let tendermint = tendermint::PublicKey::from_raw_secp256k1(&decompressed).unwrap(); - let pub_key = PublicKey::from(tendermint); - pub_key + + PublicKey::from(tendermint) } diff --git a/rust/main/chains/hyperlane-cosmos/src/providers/cosmos/provider/parse.rs b/rust/main/chains/hyperlane-cosmos/src/providers/cosmos/provider/parse.rs index aac9b7ce5a..a2212f6128 100644 --- a/rust/main/chains/hyperlane-cosmos/src/providers/cosmos/provider/parse.rs +++ b/rust/main/chains/hyperlane-cosmos/src/providers/cosmos/provider/parse.rs @@ -153,7 +153,7 @@ mod tests { fn encode_proto(msg: &MsgRecvPacket) -> Any { let mut buf = Vec::with_capacity(msg.encoded_len()); - MsgRecvPacket::encode(&msg, &mut buf).unwrap(); + MsgRecvPacket::encode(msg, &mut buf).unwrap(); Any { type_url: "".to_string(), diff --git a/rust/main/chains/hyperlane-ethereum/src/contracts/mailbox.rs b/rust/main/chains/hyperlane-ethereum/src/contracts/mailbox.rs index cec2b9b45f..1e9bfaa041 100644 --- a/rust/main/chains/hyperlane-ethereum/src/contracts/mailbox.rs +++ b/rust/main/chains/hyperlane-ethereum/src/contracts/mailbox.rs @@ -2,7 +2,7 @@ #![allow(missing_docs)] use std::collections::HashMap; -use std::ops::RangeInclusive; +use std::ops::{Mul, RangeInclusive}; use std::sync::Arc; use async_trait::async_trait; @@ -11,6 +11,7 @@ use ethers::abi::{AbiEncode, Detokenize}; use ethers::prelude::Middleware; use ethers_contract::builders::ContractCall; use ethers_contract::{Multicall, MulticallResult}; +use ethers_core::utils::WEI_IN_ETHER; use futures_util::future::join_all; use hyperlane_core::rpc_clients::call_and_retry_indefinitely; use hyperlane_core::{BatchResult, QueueOperation, ReorgPeriod, H512}; @@ -560,8 +561,8 @@ where arbitrum_node_interface .estimate_retryable_ticket( H160::zero().into(), - // Give the sender a deposit, otherwise it reverts - U256::MAX.into(), + // Give the sender a deposit (100 ETH), otherwise it reverts + WEI_IN_ETHER.mul(100u32), self.contract.address(), U256::zero().into(), H160::zero().into(), diff --git a/rust/main/chains/hyperlane-ethereum/src/tx.rs b/rust/main/chains/hyperlane-ethereum/src/tx.rs index 0c414891d1..e989be11d6 100644 --- a/rust/main/chains/hyperlane-ethereum/src/tx.rs +++ b/rust/main/chains/hyperlane-ethereum/src/tx.rs @@ -31,7 +31,7 @@ pub const GAS_ESTIMATE_MULTIPLIER_NUMERATOR: u32 = 11; pub const GAS_ESTIMATE_MULTIPLIER_DENOMINATOR: u32 = 10; pub fn apply_gas_estimate_buffer(gas: U256, domain: &HyperlaneDomain) -> ChainResult { - // Arbitrum Nitro chains use 2d fees are are especially prone to costs increasing + // Arbitrum Nitro chains use 2d fees are especially prone to costs increasing // by the time the transaction lands on chain, requiring a higher gas limit. // In this case, we apply a multiplier to the gas estimate. let gas = if domain.is_arbitrum_nitro() { diff --git a/rust/main/chains/hyperlane-sealevel/Cargo.toml b/rust/main/chains/hyperlane-sealevel/Cargo.toml index 666ebee877..171e7b31ba 100644 --- a/rust/main/chains/hyperlane-sealevel/Cargo.toml +++ b/rust/main/chains/hyperlane-sealevel/Cargo.toml @@ -18,6 +18,7 @@ serde.workspace = true serde_json.workspace = true solana-account-decoder.workspace = true solana-client.workspace = true +solana-program.workspace = true solana-sdk.workspace = true solana-transaction-status.workspace = true thiserror.workspace = true diff --git a/rust/main/chains/hyperlane-sealevel/src/mailbox.rs b/rust/main/chains/hyperlane-sealevel/src/mailbox.rs index d64963e242..66e58131aa 100644 --- a/rust/main/chains/hyperlane-sealevel/src/mailbox.rs +++ b/rust/main/chains/hyperlane-sealevel/src/mailbox.rs @@ -1,6 +1,7 @@ -#![allow(warnings)] // FIXME remove +// Silence a clippy bug https://github.com/rust-lang/rust-clippy/issues/12281 +#![allow(clippy::blocks_in_conditions)] -use std::{collections::HashMap, num::NonZeroU64, ops::RangeInclusive, str::FromStr as _}; +use std::{collections::HashMap, ops::RangeInclusive, str::FromStr as _}; use async_trait::async_trait; use borsh::{BorshDeserialize, BorshSerialize}; @@ -9,10 +10,9 @@ use hyperlane_sealevel_interchain_security_module_interface::{ }; use hyperlane_sealevel_mailbox::{ accounts::{ - DispatchedMessageAccount, Inbox, InboxAccount, OutboxAccount, ProcessedMessage, - ProcessedMessageAccount, DISPATCHED_MESSAGE_DISCRIMINATOR, PROCESSED_MESSAGE_DISCRIMINATOR, + DispatchedMessageAccount, Inbox, InboxAccount, ProcessedMessageAccount, + DISPATCHED_MESSAGE_DISCRIMINATOR, PROCESSED_MESSAGE_DISCRIMINATOR, }, - instruction, instruction::InboxProcess, mailbox_dispatched_message_pda_seeds, mailbox_inbox_pda_seeds, mailbox_outbox_pda_seeds, mailbox_process_authority_pda_seeds, mailbox_processed_message_pda_seeds, @@ -20,54 +20,36 @@ use hyperlane_sealevel_mailbox::{ use hyperlane_sealevel_message_recipient_interface::{ HandleInstruction, MessageRecipientInstruction, }; -use jsonrpc_core::futures_util::TryFutureExt; +use lazy_static::lazy_static; use serializable_account_meta::SimulationReturnData; -use solana_account_decoder::{UiAccountEncoding, UiDataSliceConfig}; -use solana_client::{ - nonblocking::rpc_client::RpcClient, - rpc_client::SerializableTransaction, - rpc_config::{RpcAccountInfoConfig, RpcProgramAccountsConfig, RpcSendTransactionConfig}, - rpc_filter::{Memcmp, MemcmpEncodedBytes, RpcFilterType}, - rpc_response::Response, -}; +use solana_client::{rpc_client::SerializableTransaction, rpc_response::Response}; +use solana_program::pubkey; use solana_sdk::{ account::Account, bs58, clock::Slot, commitment_config::CommitmentConfig, compute_budget::ComputeBudgetInstruction, - hash::Hash, instruction::{AccountMeta, Instruction}, - message::Message, pubkey::Pubkey, signature::Signature, signer::{keypair::Keypair, Signer as _}, - transaction::{Transaction, VersionedTransaction}, -}; -use solana_transaction_status::{ - EncodedConfirmedBlock, EncodedTransaction, EncodedTransactionWithStatusMeta, TransactionStatus, - UiCompiledInstruction, UiConfirmedBlock, UiInnerInstructions, UiInstruction, UiMessage, - UiParsedInstruction, UiReturnDataEncoding, UiTransaction, UiTransactionReturnData, - UiTransactionStatusMeta, + transaction::Transaction, }; +use solana_transaction_status::TransactionStatus; use tracing::{debug, info, instrument, warn}; use hyperlane_core::{ - accumulator::incremental::IncrementalMerkle, config::StrOrIntParseError, BatchItem, - ChainCommunicationError, ChainCommunicationError::ContractError, ChainResult, Checkpoint, - ContractLocator, Decode as _, Encode as _, FixedPointNumber, HyperlaneAbi, HyperlaneChain, - HyperlaneContract, HyperlaneDomain, HyperlaneMessage, HyperlaneProvider, Indexed, Indexer, - KnownHyperlaneDomain, LogMeta, Mailbox, MerkleTreeHook, ReorgPeriod, SequenceAwareIndexer, - TxCostEstimate, TxOutcome, H256, H512, U256, + config::StrOrIntParseError, ChainCommunicationError, ChainResult, ContractLocator, Decode as _, + Encode as _, FixedPointNumber, HyperlaneChain, HyperlaneContract, HyperlaneDomain, + HyperlaneMessage, HyperlaneProvider, Indexed, Indexer, KnownHyperlaneDomain, LogMeta, Mailbox, + MerkleTreeHook, ReorgPeriod, SequenceAwareIndexer, TxCostEstimate, TxOutcome, H256, H512, U256, }; use crate::account::{search_accounts_by_discriminator, search_and_validate_account}; -use crate::error::HyperlaneSealevelError; use crate::log_meta_composer::{ - is_interchain_payment_instruction, is_message_delivery_instruction, - is_message_dispatch_instruction, LogMetaComposer, + is_message_delivery_instruction, is_message_dispatch_instruction, LogMetaComposer, }; -use crate::utils::{decode_h256, decode_h512, from_base58}; use crate::{ConnectionConf, SealevelProvider, SealevelRpcClient}; const SYSTEM_PROGRAM: &str = "11111111111111111111111111111111"; @@ -87,14 +69,33 @@ const PROCESS_DESIRED_PRIORITIZATION_FEE_LAMPORTS_PER_TX: u64 = 500000; /// In micro-lamports. Multiply this by the compute units to figure out /// the additional cost of processing a message, in addition to the mandatory /// "base" cost of signature verification. +/// Unused at the moment, but kept for future reference. +#[allow(dead_code)] const PROCESS_COMPUTE_UNIT_PRICE_MICRO_LAMPORTS: u64 = - ( - // Convert to micro-lamports - (PROCESS_DESIRED_PRIORITIZATION_FEE_LAMPORTS_PER_TX * 1_000_000) - // Divide by the max compute units - / PROCESS_COMPUTE_UNITS as u64 - ); - + // Convert to micro-lamports + (PROCESS_DESIRED_PRIORITIZATION_FEE_LAMPORTS_PER_TX * 1_000_000) + // Divide by the max compute units + / PROCESS_COMPUTE_UNITS as u64; + +// Earlier versions of collateral warp routes were deployed off a version where the mint +// was requested as a writeable account for handle instruction. This is not necessary, +// and generally requires a higher priority fee to be paid. +// This is a HashMap of of (collateral warp route recipient -> mint address) that is +// used to force the mint address to be readonly. +lazy_static! { + static ref RECIPIENT_FORCED_READONLY_ACCOUNTS: HashMap = HashMap::from([ + // EZSOL + (pubkey!("b5pMgizA9vrGRt3hVqnU7vUVGBQUnLpwPzcJhG1ucyQ"), pubkey!("ezSoL6fY1PVdJcJsUpe5CM3xkfmy3zoVCABybm5WtiC")), + // ORCA + (pubkey!("8acihSm2QTGswniKgdgr4JBvJihZ1cakfvbqWCPBLoSp"), pubkey!("orcaEKTdK7LKz57vaAYr9QeNsVEPfiu6QeMU1kektZE")), + // USDC + (pubkey!("3EpVCPUgyjq2MfGeCttyey6bs5zya5wjYZ2BE6yDg6bm"), pubkey!("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v")), + // USDT + (pubkey!("Bk79wMjvpPCh5iQcCEjPWFcG1V2TfgdwaBsWBEYFYSNU"), pubkey!("Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB")), + // WIF + (pubkey!("CuQmsT4eSF4dYiiGUGYYQxJ7c58pUAD5ADE3BbFGzQKx"), pubkey!("EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm")), + ]); +} /// A reference to a Mailbox contract on some Sealevel chain pub struct SealevelMailbox { pub(crate) program_id: Pubkey, @@ -131,13 +132,17 @@ impl SealevelMailbox { }) } + /// Get the Inbox account pubkey and bump seed. pub fn inbox(&self) -> (Pubkey, u8) { self.inbox } + + /// Get the Outbox account pubkey and bump seed. pub fn outbox(&self) -> (Pubkey, u8) { self.outbox } + /// Get the provider RPC client. pub fn rpc(&self) -> &SealevelRpcClient { self.provider.rpc() } @@ -257,14 +262,26 @@ impl SealevelMailbox { message: message.body.clone(), }); - self.get_account_metas_with_instruction_bytes( - recipient_program_id, - &instruction - .encode() - .map_err(ChainCommunicationError::from_other)?, - hyperlane_sealevel_message_recipient_interface::HANDLE_ACCOUNT_METAS_PDA_SEEDS, - ) - .await + let mut account_metas = self + .get_account_metas_with_instruction_bytes( + recipient_program_id, + &instruction + .encode() + .map_err(ChainCommunicationError::from_other)?, + hyperlane_sealevel_message_recipient_interface::HANDLE_ACCOUNT_METAS_PDA_SEEDS, + ) + .await?; + + if let Some(forced_readonly_account) = + RECIPIENT_FORCED_READONLY_ACCOUNTS.get(&recipient_program_id) + { + account_metas + .iter_mut() + .filter(|account_meta| account_meta.pubkey == *forced_readonly_account) + .for_each(|account_meta| account_meta.is_writable = false); + } + + Ok(account_metas) } async fn get_account_metas_with_instruction_bytes( @@ -306,7 +323,8 @@ impl SealevelMailbox { } } - // Stolen from Solana's non-blocking client, but with Jito! + /// Send a transaction to Jito and wait for it to be confirmed. + /// Logic stolen from Solana's non-blocking client. pub async fn send_and_confirm_transaction_with_jito( &self, transaction: &impl SerializableTransaction, @@ -421,7 +439,7 @@ impl HyperlaneContract for SealevelMailbox { impl HyperlaneChain for SealevelMailbox { fn domain(&self) -> &HyperlaneDomain { - &self.provider.domain() + self.provider.domain() } fn provider(&self) -> Box { @@ -664,6 +682,7 @@ pub struct SealevelMailboxIndexer { } impl SealevelMailboxIndexer { + /// Create a new SealevelMailboxIndexer pub fn new( conf: &ConnectionConf, locator: ContractLocator, @@ -694,7 +713,7 @@ impl SealevelMailboxIndexer { } fn rpc(&self) -> &SealevelRpcClient { - &self.mailbox.rpc() + self.mailbox.rpc() } async fn get_dispatched_message_with_nonce( @@ -707,7 +726,7 @@ impl SealevelMailboxIndexer { let accounts = search_accounts_by_discriminator( self.rpc(), &self.program_id, - &DISPATCHED_MESSAGE_DISCRIMINATOR, + DISPATCHED_MESSAGE_DISCRIMINATOR, &nonce_bytes, unique_dispatched_message_pubkey_offset, unique_dispatch_message_pubkey_length, @@ -715,7 +734,7 @@ impl SealevelMailboxIndexer { .await?; let valid_message_storage_pda_pubkey = search_and_validate_account(accounts, |account| { - self.dispatched_message_account(&account) + self.dispatched_message_account(account) })?; // Now that we have the valid message storage PDA pubkey, we can get the full account data. @@ -800,7 +819,7 @@ impl SealevelMailboxIndexer { let accounts = search_accounts_by_discriminator( self.rpc(), &self.program_id, - &PROCESSED_MESSAGE_DISCRIMINATOR, + PROCESSED_MESSAGE_DISCRIMINATOR, &sequence_bytes, delivered_message_id_offset, delivered_message_id_length, @@ -810,7 +829,7 @@ impl SealevelMailboxIndexer { debug!(account_len = ?accounts.len(), "Found accounts with processed message discriminator"); let valid_message_storage_pda_pubkey = search_and_validate_account(accounts, |account| { - self.delivered_message_account(&account) + self.delivered_message_account(account) })?; // Now that we have the valid delivered message storage PDA pubkey, @@ -965,14 +984,3 @@ impl SequenceAwareIndexer for SealevelMailboxIndexer { Ok((Some(sequence), tip)) } } - -struct SealevelMailboxAbi; - -// TODO figure out how this is used and if we can support it for sealevel. -impl HyperlaneAbi for SealevelMailboxAbi { - const SELECTOR_SIZE_BYTES: usize = 8; - - fn fn_map() -> HashMap, &'static str> { - todo!() - } -} diff --git a/rust/main/config/mainnet_config.json b/rust/main/config/mainnet_config.json index 62546e46b7..dc66d22345 100644 --- a/rust/main/config/mainnet_config.json +++ b/rust/main/config/mainnet_config.json @@ -34,7 +34,7 @@ "interchainAccountIsm": "0xd766e7C7517f2d0D92754b2fe4aE7AdEf7bDEC3e", "interchainAccountRouter": "0x25C87e735021F72d8728438C2130b02E3141f2cb", "interchainGasPaymaster": "0x8F1E22d309baa69D398a03cc88E9b46037e988AA", - "interchainSecurityModule": "0xECd85a9d1215eab1a53364dA71A57634b1a0e1C8", + "interchainSecurityModule": "0x7115c77E844E301693d78F1B19e796083eB0b680", "isTestnet": false, "mailbox": "0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7", "merkleTreeHook": "0x811808Dd29ba8B0FC6C0ec0b5537035E59745162", @@ -100,7 +100,7 @@ "interchainAccountIsm": "0x2A7574358Ec53522CE2452887661AB4c86F7d400", "interchainAccountRouter": "0x91874Dbed74925dFe6059B90385EEb90DdE0B2E6", "interchainGasPaymaster": "0x3b6044acd6767f017e99318AA6Ef93b7B06A5a22", - "interchainSecurityModule": "0x25ebF66b71a3De55D25CcFea5C0d4f974931CeeA", + "interchainSecurityModule": "0xB51De3e8BCE366a871d5ba631ACa843D18d9Bc60", "mailbox": "0x979Ca5202784112f4738403dBec5D0F3B9daabB9", "merkleTreeHook": "0x748040afB89B8FdBb992799808215419d36A0930", "name": "arbitrum", @@ -172,7 +172,7 @@ "interchainAccountIsm": "0x27a3233c05C1Df7c163123301D14bE9349E3Cb48", "interchainAccountRouter": "0xa82a0227e6d6db53AF4B264A852bfF91C6504a51", "interchainGasPaymaster": "0x95519ba800BBd0d34eeAE026fEc620AD978176C0", - "interchainSecurityModule": "0x57576C0A653d3E9697E16f331ef8aBd8f9c9f64e", + "interchainSecurityModule": "0xEc016e4DB2ca7EdB65F40AEF59DdFe12a28344ed", "mailbox": "0xFf06aFcaABaDDd1fb08371f9ccA15D73D51FeBD6", "merkleTreeHook": "0x84eea61D679F42D92145fA052C89900CBAccE95A", "name": "avalanche", @@ -223,7 +223,7 @@ } ], "blocks": { - "confirmations": 1, + "confirmations": 3, "estimateBlockTime": 2, "reorgPeriod": 10 }, @@ -316,7 +316,7 @@ "interchainAccountIsm": "0xe93f2f409ad8B5000431D234472973fe848dcBEC", "interchainAccountRouter": "0x2f4Eb04189e11Af642237Da62d163Ab714614498", "interchainGasPaymaster": "0xB3fCcD379ad66CED0c91028520C64226611A48c9", - "interchainSecurityModule": "0x91c650094f876498B544cFbF47bDf4AD5762571f", + "interchainSecurityModule": "0xdc01bf0D464460bD383B5C81d5962451204ec28b", "mailbox": "0x3a867fCfFeC2B790970eeBDC9023E75B0a172aa7", "merkleTreeHook": "0xC9B8ea6230d6687a4b13fD3C0b8f0Ec607B26465", "name": "blast", @@ -384,7 +384,7 @@ "interchainAccountIsm": "0x451dF8AB0936D85526D816f0b4dCaDD934A034A4", "interchainAccountRouter": "0x5C02157068a52cEcfc98EDb6115DE6134EcB4764", "interchainGasPaymaster": "0x62B7592C1B6D1E43f4630B8e37f4377097840C05", - "interchainSecurityModule": "0xCE12fcDAA985D84CBb9e17EA81AFa23e5756ECf9", + "interchainSecurityModule": "0x6a32F3789Ba8880742d1fB6Cb51aed5EcfdE702C", "mailbox": "0x8358D8291e3bEDb04804975eEa0fe9fe0fAfB147", "merkleTreeHook": "0x781bE492F1232E66990d83a9D3AC3Ec26f56DAfB", "name": "bob", @@ -450,7 +450,7 @@ "interchainAccountIsm": "0x9e22945bE593946618383B108CC5bce09eBA4C26", "interchainAccountRouter": "0x32A07c1B7a7fe8D4A0e44B0181873aB9d64C16c1", "interchainGasPaymaster": "0x78E25e7f84416e69b9339B0A6336EB6EFfF6b451", - "interchainSecurityModule": "0x08b98B5a7ef4AF12c87Efb6848AC56F13072Acc1", + "interchainSecurityModule": "0x0c461142ac54Fa4d24Fe5Ff6643A8386d2C03b29", "mailbox": "0x2971b9Aec44bE4eb673DF1B88cDB57b96eefe8a4", "merkleTreeHook": "0xFDb9Cd5f9daAA2E4474019405A328a88E7484f26", "name": "bsc", @@ -531,7 +531,7 @@ "interchainAccountIsm": "0xB732c83aeE29596E3163Da2260710eAB67Bc0B29", "interchainAccountRouter": "0x27a6cAe33378bB6A6663b382070427A01fc9cB37", "interchainGasPaymaster": "0x571f1435613381208477ac5d6974310d88AC7cB7", - "interchainSecurityModule": "0x75EEa329FAD5680f386d586Ac453b62e858C1CA8", + "interchainSecurityModule": "0x324fedE5dba4729760514913bfD29f626F487e35", "mailbox": "0x50da3B3907A08a24fe4999F4Dcf337E8dC7954bb", "merkleTreeHook": "0x04dB778f05854f26E67e0a66b740BBbE9070D366", "name": "celo", @@ -596,7 +596,7 @@ "interchainAccountIsm": "0x4Eb82Ee35b0a1c1d776E3a3B547f9A9bA6FCC9f2", "interchainAccountRouter": "0xEF9A332Ec1fD233Bf9344A58be56ff9E104B4f60", "interchainGasPaymaster": "0x7E27456a839BFF31CA642c060a2b68414Cb6e503", - "interchainSecurityModule": "0x15f859523466132580AB74Fd27c920CE5372a1b0", + "interchainSecurityModule": "0x53D92225b49932471E6CA7bf1089203e49f5E51E", "mailbox": "0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7", "merkleTreeHook": "0x0054D19613f20dD72721A146ED408971a2CCA9BD", "name": "cheesechain", @@ -659,7 +659,7 @@ "from": 4842212 }, "interchainGasPaymaster": "0x9844aFFaBE17c37F791ff99ABa58B0FbB75e22AF", - "interchainSecurityModule": "0xf563C8347b0b03542d1027e0450166A9E56Ce4b0", + "interchainSecurityModule": "0x3203B23145Cc21f6ba1c9AA49401fa66fBDB113E", "mailbox": "0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7", "merkleTreeHook": "0xF5da68b2577EF5C0A0D98aA2a58483a68C2f232a", "name": "cyber", @@ -726,7 +726,7 @@ "from": 23783929 }, "interchainGasPaymaster": "0x9844aFFaBE17c37F791ff99ABa58B0FbB75e22AF", - "interchainSecurityModule": "0xc6282b9525b43E373BdE5B8C018a486502552B73", + "interchainSecurityModule": "0xf0bE03F3176EA2dEA8b614C5695EF0eF795e79eF", "mailbox": "0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7", "merkleTreeHook": "0xF5da68b2577EF5C0A0D98aA2a58483a68C2f232a", "name": "degenchain", @@ -839,7 +839,7 @@ "interchainAccountIsm": "0xCeafc098e5c3c7768b9229Be2FEC275862A81Abd", "interchainAccountRouter": "0xed9a722c543883FB7e07E78F3879762DE09eA7D5", "interchainGasPaymaster": "0xB30EAB08aa87138D57168D0e236850A530f49921", - "interchainSecurityModule": "0x48Be1A244EbFEe8E66D220004f93e2aa42CC3463", + "interchainSecurityModule": "0xC4F35559a1FBD1ACb7Ba88cEdC157754477FC047", "mailbox": "0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7", "merkleTreeHook": "0xC831271c1fB212012811a91Dd43e5926C1020563", "name": "endurance", @@ -910,7 +910,7 @@ "interchainAccountIsm": "0x292C614ED53DaaDBf971521bc2C652d1ca51cB47", "interchainAccountRouter": "0x5E532F7B610618eE73C2B462978e94CB1F7995Ce", "interchainGasPaymaster": "0x9e6B1022bE9BBF5aFd152483DAD9b88911bC8611", - "interchainSecurityModule": "0x0DCb0e2ceDB8828Ab1809d742C3621c7FE169E5B", + "interchainSecurityModule": "0xcFF5f9d69343f4200100dbA755C794012518Ed38", "mailbox": "0xc005dc82818d67AF737725bD4bf75435d065D239", "merkleTreeHook": "0x48e6c30B97748d1e2e03bf3e9FbE3890ca5f8CCA", "name": "ethereum", @@ -979,7 +979,7 @@ "interchainAccountIsm": "0x7C012DCA02C42cfA3Fd7Da3B0ED7234B52AE68eF", "interchainAccountRouter": "0xbed53B5C5BCE9433f25A2A702e6df13E22d84Ae9", "interchainGasPaymaster": "0x2Fca7f6eC3d4A0408900f2BB30004d4616eE985E", - "interchainSecurityModule": "0xF80aaED3e93c02ceEE812cCAe6d15BDB68e62F4D", + "interchainSecurityModule": "0x7D24f9d82BCC10ab4A02F48D2Aae1AD00Ea47dC3", "mailbox": "0x2f9DB5616fa3fAd1aB06cB2C906830BA63d135e3", "merkleTreeHook": "0x8358D8291e3bEDb04804975eEa0fe9fe0fAfB147", "name": "fraxtal", @@ -1047,7 +1047,7 @@ "interchainAccountIsm": "0x9629c28990F11c31735765A6FD59E1E1bC197DbD", "interchainAccountRouter": "0x2351FBe24C1212F253b7a300ff0cBCFd97952a19", "interchainGasPaymaster": "0xFB9e40D811Cea562cc8a322b029eF2BDcC3ef6ed", - "interchainSecurityModule": "0x58f85b68c664017247E6A65290409953a10adbd8", + "interchainSecurityModule": "0xff36B9B99338CAe60fd794741B5e02a3D92254C2", "mailbox": "0x3071D4DA6020C956Fe15Bfd0a9Ca8D4574f16696", "merkleTreeHook": "0xfBc08389224d23b79cb21cDc16c5d42F0ad0F57f", "name": "fusemainnet", @@ -1121,7 +1121,7 @@ "interchainAccountIsm": "0x07E2062A1bC66a2C1d05cb5C3870a4AF86e0056E", "interchainAccountRouter": "0xBE70Ab882D1F7E37e04a70CDd9Ec23b37a234064", "interchainGasPaymaster": "0xDd260B99d302f0A3fF885728c086f729c06f227f", - "interchainSecurityModule": "0x4845d050F06482960435499e88286808c181F913", + "interchainSecurityModule": "0x8fC6e2011050ccC99B7f8460C23Cc85402D78e85", "mailbox": "0xaD09d78f4c6b9dA2Ae82b1D34107802d380Bb74f", "merkleTreeHook": "0x2684C6F89E901987E1FdB7649dC5Be0c57C61645", "name": "gnosis", @@ -1192,7 +1192,7 @@ "interchainAccountIsm": "0x708E002637792FDC031E6B62f23DD60014AC976a", "interchainAccountRouter": "0xfB8cea1c7F45608Da30655b50bbF355D123A4358", "interchainGasPaymaster": "0x19dc38aeae620380430C200a6E990D5Af5480117", - "interchainSecurityModule": "0xf7CaC1C661fe307CD4Eadb08EE5E64bb34623c11", + "interchainSecurityModule": "0xaee1F6685b0495cc2bFa4F5E5c096466fC9873b8", "mailbox": "0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7", "merkleTreeHook": "0x0972954923a1e2b2aAb04Fa0c4a0797e5989Cd65", "name": "inevm", @@ -1320,7 +1320,7 @@ "from": 14616307 }, "interchainGasPaymaster": "0x9844aFFaBE17c37F791ff99ABa58B0FbB75e22AF", - "interchainSecurityModule": "0xf6AB62267aA88f7219CB9d77e361687e090b224F", + "interchainSecurityModule": "0x66c540f566a52F46931FaBbcED90d7d669da7303", "mailbox": "0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7", "merkleTreeHook": "0xF5da68b2577EF5C0A0D98aA2a58483a68C2f232a", "name": "kroma", @@ -1393,7 +1393,7 @@ "interchainAccountIsm": "0xdcA646C56E7768DD11654956adE24bfFf9Ba4893", "interchainAccountRouter": "0xD59dA396F162Ed93a41252Cebb8d5DD4F093238C", "interchainGasPaymaster": "0x8105a095368f1a184CceA86cCe21318B5Ee5BE28", - "interchainSecurityModule": "0x914E4A88Be1e835b17B6f2F259861989fCB27978", + "interchainSecurityModule": "0x93c9fEeC4Dd4935a65029A4BF03fB6df1130FBB9", "mailbox": "0x02d16BC51af6BfD153d67CA61754cF912E82C4d9", "merkleTreeHook": "0xC077A0Cc408173349b1c9870C667B40FE3C01dd7", "name": "linea", @@ -1464,7 +1464,7 @@ "from": 4195553 }, "interchainGasPaymaster": "0x9844aFFaBE17c37F791ff99ABa58B0FbB75e22AF", - "interchainSecurityModule": "0xEED58BC374386596a848856aDCD07f597B70e2d9", + "interchainSecurityModule": "0xDbe54a99c9550BF6EB7F510b62cfe2d5E74F072e", "mailbox": "0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7", "merkleTreeHook": "0xF5da68b2577EF5C0A0D98aA2a58483a68C2f232a", "name": "lisk", @@ -1528,7 +1528,7 @@ "from": 3088760 }, "interchainGasPaymaster": "0x441a01Fca2eD731C0Fc4633998332f9FEDB17575", - "interchainSecurityModule": "0xf660731c69aF0E1C441bEE544595dbBEE652ebb6", + "interchainSecurityModule": "0x5997a574AbfED0506a5319b669b5f328b1C391A3", "mailbox": "0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7", "merkleTreeHook": "0x062200d92dF6bB7bA89Ce4D6800110450f94784e", "name": "lukso", @@ -1602,7 +1602,7 @@ "interchainAccountIsm": "0x8Ea50255C282F89d1A14ad3F159437EE5EF0507f", "interchainAccountRouter": "0x693A4cE39d99e46B04cb562329e3F0141cA17331", "interchainGasPaymaster": "0x0D63128D887159d63De29497dfa45AFc7C699AE4", - "interchainSecurityModule": "0x4cD0894d9277e62906c788c2F39Ab04610e577B7", + "interchainSecurityModule": "0xF9fecfeAA2A20744eAb207f7c01CA245C49Bab9e", "isTestnet": false, "mailbox": "0x3a464f746D23Ab22155710f44dB16dcA53e0775E", "merkleTreeHook": "0x149db7afD694722747035d5AEC7007ccb6F8f112", @@ -1672,7 +1672,7 @@ "interchainAccountIsm": "0xe039DA3A0071BEd087A12660D7b03cf669c7776E", "interchainAccountRouter": "0x45285463352c53a481e882cD5E2AF2E25BBdAd0D", "interchainGasPaymaster": "0x8105a095368f1a184CceA86cCe21318B5Ee5BE28", - "interchainSecurityModule": "0xA5c6193F340F05feD2064a9e56Bb7b3c6242E21E", + "interchainSecurityModule": "0x244BbF1B35C67De0367E4A02C63bFD4269976A92", "mailbox": "0x398633D19f4371e1DB5a8EFE90468eB70B1176AA", "merkleTreeHook": "0x5332D1AC0A626D265298c14ff681c0A8D28dB86d", "name": "mantle", @@ -1734,7 +1734,7 @@ "from": 13523607 }, "interchainGasPaymaster": "0x9844aFFaBE17c37F791ff99ABa58B0FbB75e22AF", - "interchainSecurityModule": "0xF16b870563cbb181A53D5e8152cAAa3bF4c356D6", + "interchainSecurityModule": "0x3C5672Af5874D2ea59B73edF4489Db73bCE743D0", "mailbox": "0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7", "merkleTreeHook": "0xF5da68b2577EF5C0A0D98aA2a58483a68C2f232a", "name": "merlin", @@ -1801,7 +1801,7 @@ "from": 17966274 }, "interchainGasPaymaster": "0x9844aFFaBE17c37F791ff99ABa58B0FbB75e22AF", - "interchainSecurityModule": "0x015c05e7bCeAB0D16912667cC03282C6276aC7d7", + "interchainSecurityModule": "0xb54D5F3905422BcD7f8d4627ad60c9F3196dEF66", "mailbox": "0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7", "merkleTreeHook": "0xF5da68b2577EF5C0A0D98aA2a58483a68C2f232a", "name": "metis", @@ -1866,7 +1866,7 @@ "from": 3752032 }, "interchainGasPaymaster": "0x9844aFFaBE17c37F791ff99ABa58B0FbB75e22AF", - "interchainSecurityModule": "0xe5E2224EaF5488Cbc992a35C828Ae0006dFbfE27", + "interchainSecurityModule": "0xda17325c9f34cedc06728707eD95eC79d26386a7", "mailbox": "0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7", "merkleTreeHook": "0xF5da68b2577EF5C0A0D98aA2a58483a68C2f232a", "name": "mint", @@ -1933,7 +1933,7 @@ "interchainAccountIsm": "0xa377b8269e0A47cdd2fD5AAeAe860b45623c6d82", "interchainAccountRouter": "0x6e1B9f776bd415d7cC3C7458A5f0d801016918f8", "interchainGasPaymaster": "0x931dFCc8c1141D6F532FD023bd87DAe0080c835d", - "interchainSecurityModule": "0xBE3E3bAe7b14098111dC0bBD0dFce251217E386A", + "interchainSecurityModule": "0xB484705Abc1F351b94B63C93Af83B6d108351137", "mailbox": "0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7", "merkleTreeHook": "0xE2ee936bEa8e42671c400aC96dE198E06F2bA2A6", "name": "mode", @@ -2001,7 +2001,7 @@ "interchainAccountIsm": "0x79b3730CE3685f65802aF1771319992bA960EB9D", "interchainAccountRouter": "0xc4482f66191754a8629D35289043C4EB0285F10E", "interchainGasPaymaster": "0x14760E32C0746094cF14D97124865BC7F0F7368F", - "interchainSecurityModule": "0x0F016E98B570D263cb5E37948bF4D92F328fcA4A", + "interchainSecurityModule": "0xFc907245E3c91cFE8aFFDcCb01ef7053a76C7eDb", "mailbox": "0x094d03E751f49908080EFf000Dd6FD177fd44CC3", "merkleTreeHook": "0x87403b85f6f316e7ba91ba1fa6C3Fb7dD4095547", "name": "moonbeam", @@ -2143,7 +2143,7 @@ "interchainAccountIsm": "0x2c46BF14641d00549ECa4779BF5CBf91602C1DEd", "interchainAccountRouter": "0x03D6cC17d45E9EA27ED757A8214d1F07F7D901aD", "interchainGasPaymaster": "0xD8A76C4D91fCbB7Cc8eA795DFDF870E48368995C", - "interchainSecurityModule": "0x3f8b6df0282D9fAF0d12752cD40166298A67f29B", + "interchainSecurityModule": "0xe12A4A59080320aBC854FE647761D83D00883807", "mailbox": "0xd4C1905BB1D26BC93DAC913e13CaCC278CdCC80D", "merkleTreeHook": "0x68eE9bec9B4dbB61f69D9D293Ae26a5AACb2e28f", "name": "optimism", @@ -2278,7 +2278,7 @@ "interchainAccountIsm": "0xBAC4529cdfE7CCe9E858BF706e41F8Ed096C1BAd", "interchainAccountRouter": "0xF163949AD9F88977ebF649D0461398Ca752E64B9", "interchainGasPaymaster": "0x0071740Bf129b05C4684abfbBeD248D80971cce2", - "interchainSecurityModule": "0x40249639D8b148EBD66FE5b110DEbcE2fa06D683", + "interchainSecurityModule": "0xD94CaFdBe8c9C2C05fD5992B087bc30F237001D2", "mailbox": "0x5d934f4e2f797775e53561bB72aca21ba36B96BB", "merkleTreeHook": "0x73FbD25c3e817DC4B4Cd9d00eff6D83dcde2DfF6", "name": "polygon", @@ -2355,7 +2355,7 @@ "interchainAccountIsm": "0xc1198e241DAe48BF5AEDE5DCE49Fe4A6064cF7a7", "interchainAccountRouter": "0x20a0A32a110362920597F72974E1E0d7e25cA20a", "interchainGasPaymaster": "0x0D63128D887159d63De29497dfa45AFc7C699AE4", - "interchainSecurityModule": "0xAaBb015A97a49eCEa506A3D7b831BFF8458B7421", + "interchainSecurityModule": "0xAbD84C24bC17b3733D094Cf911561F3c088bA8E0", "mailbox": "0x3a464f746D23Ab22155710f44dB16dcA53e0775E", "merkleTreeHook": "0x149db7afD694722747035d5AEC7007ccb6F8f112", "name": "polygonzkevm", @@ -2423,7 +2423,7 @@ "from": 32018468 }, "interchainGasPaymaster": "0x9844aFFaBE17c37F791ff99ABa58B0FbB75e22AF", - "interchainSecurityModule": "0x015c05e7bCeAB0D16912667cC03282C6276aC7d7", + "interchainSecurityModule": "0x1C516BB0B775B2EDF3fA26beb547f2634F23bB11", "mailbox": "0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7", "merkleTreeHook": "0xF5da68b2577EF5C0A0D98aA2a58483a68C2f232a", "name": "proofofplay", @@ -2487,7 +2487,7 @@ "from": 363159 }, "interchainGasPaymaster": "0x3071D4DA6020C956Fe15Bfd0a9Ca8D4574f16696", - "interchainSecurityModule": "0xbFA199Fae108dF18860D847c881EF5F8a7745e85", + "interchainSecurityModule": "0x342766bc19A0bcd47d4269D1804AF4Ad27D4372C", "mailbox": "0xeA87ae93Fa0019a82A727bfd3eBd1cFCa8f64f1D", "merkleTreeHook": "0x55E4F0bc6b7Bb493D50839A8592e7ad8d5e93cf7", "name": "real", @@ -2554,7 +2554,7 @@ "interchainAccountIsm": "0x5DA60220C5dDe35b7aE91c042ff5979047FA0785", "interchainAccountRouter": "0x7a4d31a686A36285d68e14EDD53631417eB19603", "interchainGasPaymaster": "0x2Fa570E83009eaEef3a1cbd496a9a30F05266634", - "interchainSecurityModule": "0xA3A88Cf5b9eB22a9a192d8fC592ac769B1EA150A", + "interchainSecurityModule": "0x020f0b3691383B662Fb0D5799D5516652eFE5124", "mailbox": "0xeA87ae93Fa0019a82A727bfd3eBd1cFCa8f64f1D", "merkleTreeHook": "0x8F1E22d309baa69D398a03cc88E9b46037e988AA", "name": "redstone", @@ -2616,7 +2616,7 @@ "from": 937117 }, "interchainGasPaymaster": "0x9844aFFaBE17c37F791ff99ABa58B0FbB75e22AF", - "interchainSecurityModule": "0xAA379b1f1B425b8174e1bF1614A40845053A86cF", + "interchainSecurityModule": "0x798BC62c7E991c908A7c18131324Eb413ac61cc6", "mailbox": "0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7", "merkleTreeHook": "0xF5da68b2577EF5C0A0D98aA2a58483a68C2f232a", "name": "sanko", @@ -2684,7 +2684,7 @@ "interchainAccountIsm": "0x32af5Df81fEd5E26119F6640FBB13f3d63a94CDe", "interchainAccountRouter": "0x0B48a744698ba8dFa514742dFEB6728f52fD66f7", "interchainGasPaymaster": "0xBF12ef4B9f307463D3FB59c3604F294dDCe287E2", - "interchainSecurityModule": "0x2C63D8BA06b341E73392E4d6ef069064D6fE4CDc", + "interchainSecurityModule": "0x35b219Ee7824b0DB8d0bE01a97Cb88cFC4d8aB22", "mailbox": "0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7", "merkleTreeHook": "0x6119E37Bd66406A1Db74920aC79C15fB8411Ba76", "name": "scroll", @@ -2752,7 +2752,7 @@ "interchainAccountIsm": "0xf35dc7B9eE4Ebf0cd3546Bd6EE3b403dE2b9F5D6", "interchainAccountRouter": "0xBcaedE97a98573A88242B3b0CB0A255F3f90d4d5", "interchainGasPaymaster": "0xFC62DeF1f08793aBf0E67f69257c6be258194F72", - "interchainSecurityModule": "0x9b8e185A2e166e6E2357d23b4626220C656aD8dF", + "interchainSecurityModule": "0x7329fEFd101560d0e56F54768dB5c7f095148a9b", "mailbox": "0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7", "merkleTreeHook": "0xca1b69fA4c4a7c7fD839bC50867c589592bcfe49", "name": "sei", @@ -2867,7 +2867,7 @@ "interchainAccountIsm": "0xAE557e108b3336130370aC74836f1356B4b30Cf2", "interchainAccountRouter": "0x1F8CF09F060A2AE962c0Bb1F92e209a1E7b0E10B", "interchainGasPaymaster": "0x273Bc6b01D9E88c064b6E5e409BdF998246AEF42", - "interchainSecurityModule": "0x68Ea629559Df7041adCf61569576023695C4A76b", + "interchainSecurityModule": "0x38ab08a7cb19757Ba6dc870277780519380DED32", "mailbox": "0x28EFBCadA00A7ed6772b3666F3898d276e88CAe3", "merkleTreeHook": "0x6A55822cf11f9fcBc4c75BC2638AfE8Eb942cAdd", "name": "taiko", @@ -2929,7 +2929,7 @@ "from": 1678063 }, "interchainGasPaymaster": "0x9844aFFaBE17c37F791ff99ABa58B0FbB75e22AF", - "interchainSecurityModule": "0xAA379b1f1B425b8174e1bF1614A40845053A86cF", + "interchainSecurityModule": "0x798BC62c7E991c908A7c18131324Eb413ac61cc6", "isTestnet": false, "mailbox": "0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7", "merkleTreeHook": "0xF5da68b2577EF5C0A0D98aA2a58483a68C2f232a", @@ -2997,7 +2997,7 @@ "interchainAccountIsm": "0x551BbEc45FD665a8C95ca8731CbC32b7653Bc59B", "interchainAccountRouter": "0xc11f8Cf2343d3788405582F65B8af6A4F7a6FfC8", "interchainGasPaymaster": "0x0D63128D887159d63De29497dfa45AFc7C699AE4", - "interchainSecurityModule": "0x00cd5A9d087E1a87779252487c35ba37C399808D", + "interchainSecurityModule": "0x8c5D31F910a08E8ae72a1Ea28c77609be3774e29", "mailbox": "0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7", "merkleTreeHook": "0x149db7afD694722747035d5AEC7007ccb6F8f112", "name": "viction", @@ -3065,7 +3065,7 @@ "interchainAccountIsm": "0xCB9f90EE5d83Ea52ABd922BD70898f0155D54798", "interchainAccountRouter": "0x473884010F0C1742DA8Ad01E7E295624B931076b", "interchainGasPaymaster": "0x7E27456a839BFF31CA642c060a2b68414Cb6e503", - "interchainSecurityModule": "0x34aD800C9e56D75655680401B8c5140ce4cACDBa", + "interchainSecurityModule": "0x586bB821b040491EA7822317cA2316c3B217F9AA", "mailbox": "0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7", "merkleTreeHook": "0x0054D19613f20dD72721A146ED408971a2CCA9BD", "name": "worldchain", @@ -3127,7 +3127,7 @@ "from": 24395308 }, "interchainGasPaymaster": "0x9844aFFaBE17c37F791ff99ABa58B0FbB75e22AF", - "interchainSecurityModule": "0xd69d8FBC4d716d902f40d041596f024B705CE394", + "interchainSecurityModule": "0xb26302055D46090B299b7c01041f246FEEdcE559", "mailbox": "0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7", "merkleTreeHook": "0xF5da68b2577EF5C0A0D98aA2a58483a68C2f232a", "name": "xai", @@ -3195,7 +3195,7 @@ "interchainAccountIsm": "0x29B37088724B745C0ABcE591449Cf042772160C2", "interchainAccountRouter": "0x03cF708E42C89623bd83B281A56935cB562b9258", "interchainGasPaymaster": "0x7E27456a839BFF31CA642c060a2b68414Cb6e503", - "interchainSecurityModule": "0xe88402C8346b055644E9dBBf6125131F73d89763", + "interchainSecurityModule": "0xae69dcB077234da706C6228756Ffb13B8B332970", "mailbox": "0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7", "merkleTreeHook": "0x0054D19613f20dD72721A146ED408971a2CCA9BD", "name": "xlayer", @@ -3263,7 +3263,7 @@ "interchainAccountIsm": "0x2b6d3F7d28B5EC8C3C028fBCAdcf774D9709Dd29", "interchainAccountRouter": "0x3AdCBc94ab8C48EC52D06dc65Bb787fD1981E3d5", "interchainGasPaymaster": "0x931dFCc8c1141D6F532FD023bd87DAe0080c835d", - "interchainSecurityModule": "0xA20Df62dEC7B82ea026CDcaD99774cB667F75d88", + "interchainSecurityModule": "0xFa772A78594a65458B7A6934DA1fA83930B0F51b", "mailbox": "0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7", "merkleTreeHook": "0xE2ee936bEa8e42671c400aC96dE198E06F2bA2A6", "name": "zetachain", @@ -3329,7 +3329,7 @@ "from": 1511458 }, "interchainGasPaymaster": "0x03cF708E42C89623bd83B281A56935cB562b9258", - "interchainSecurityModule": "0x9f5eFA37Aa96676A634eDbBd2E2132a75557a19e", + "interchainSecurityModule": "0x41792A9E3FD2883F5bD6fd38a209483Fc21082f8", "mailbox": "0xc2FbB9411186AB3b1a6AFCCA702D1a80B48b197c", "merkleTreeHook": "0x4C97D35c668EE5194a13c8DE8Afc18cce40C9F28", "name": "zircuit", @@ -3402,7 +3402,7 @@ "interchainAccountIsm": "0xb2674E213019972f937CCFc5e23BF963D915809e", "interchainAccountRouter": "0x11b76D93a9D39Eb51F54eBf5566308640cDe882b", "interchainGasPaymaster": "0x18B0688990720103dB63559a3563f7E8d0f63EDb", - "interchainSecurityModule": "0xB4F0a46314954446aeEb27254569510226ecd3c2", + "interchainSecurityModule": "0xD1Ce8d18B61AfE53D63ba7DC359F0bD3eA915235", "mailbox": "0xF5da68b2577EF5C0A0D98aA2a58483a68C2f232a", "merkleTreeHook": "0x886BB0f329781b98f98FDeb1ce7a8957F2d43B9F", "name": "zoramainnet", @@ -3473,7 +3473,7 @@ "domainRoutingIsmFactory": "0x1052eF3419f26Bec74Ed7CEf4a4FA6812Bc09908", "fallbackRoutingHook": "0xc401e251CCa7A364114504A994D6fC7cb1c243AB", "interchainGasPaymaster": "0x4E55aDA3ef1942049EA43E904EB01F4A0a9c39bd", - "interchainSecurityModule": "0x4b1EF66EB03743D243dca2024af3B6C4BB2afCAC", + "interchainSecurityModule": "0x5d315fD2F9ce3F538F76c2f6b9516495B0a1bCEb", "mailbox": "0x3a464f746D23Ab22155710f44dB16dcA53e0775E", "merkleTreeHook": "0x441a01Fca2eD731C0Fc4633998332f9FEDB17575", "pausableHook": "0x5Ed813B8b41f25c8002B01A72bbDBe6A0232Fe27", @@ -3540,7 +3540,7 @@ "domainRoutingIsmFactory": "0x1052eF3419f26Bec74Ed7CEf4a4FA6812Bc09908", "fallbackRoutingHook": "0xc401e251CCa7A364114504A994D6fC7cb1c243AB", "interchainGasPaymaster": "0x4E55aDA3ef1942049EA43E904EB01F4A0a9c39bd", - "interchainSecurityModule": "0x55bD770A3220A745B62600e3BEE6e6F944948c5B", + "interchainSecurityModule": "0x24326Ebe336Fa9d48615697B39845B6B2F098174", "mailbox": "0x3a464f746D23Ab22155710f44dB16dcA53e0775E", "merkleTreeHook": "0x441a01Fca2eD731C0Fc4633998332f9FEDB17575", "pausableHook": "0x5Ed813B8b41f25c8002B01A72bbDBe6A0232Fe27", @@ -3610,7 +3610,7 @@ "domainRoutingIsmFactory": "0x1052eF3419f26Bec74Ed7CEf4a4FA6812Bc09908", "fallbackRoutingHook": "0xc401e251CCa7A364114504A994D6fC7cb1c243AB", "interchainGasPaymaster": "0x4E55aDA3ef1942049EA43E904EB01F4A0a9c39bd", - "interchainSecurityModule": "0x2D78569De74146D7CDB5A8aabD8Bd451Da641c92", + "interchainSecurityModule": "0x4bD8927F13cCCe50B2bB3603B5Eaf484A56f1638", "mailbox": "0x3a464f746D23Ab22155710f44dB16dcA53e0775E", "merkleTreeHook": "0x441a01Fca2eD731C0Fc4633998332f9FEDB17575", "pausableHook": "0x5Ed813B8b41f25c8002B01A72bbDBe6A0232Fe27", @@ -3686,7 +3686,7 @@ "domainRoutingIsmFactory": "0x1052eF3419f26Bec74Ed7CEf4a4FA6812Bc09908", "fallbackRoutingHook": "0xc401e251CCa7A364114504A994D6fC7cb1c243AB", "interchainGasPaymaster": "0x4E55aDA3ef1942049EA43E904EB01F4A0a9c39bd", - "interchainSecurityModule": "0x574A030c4636De291C42537d1dc0B9079318F839", + "interchainSecurityModule": "0xF53b96635A3e7c57fe481c94efe0F658990E5040", "mailbox": "0x3a464f746D23Ab22155710f44dB16dcA53e0775E", "merkleTreeHook": "0x441a01Fca2eD731C0Fc4633998332f9FEDB17575", "pausableHook": "0x5Ed813B8b41f25c8002B01A72bbDBe6A0232Fe27", @@ -3750,7 +3750,7 @@ "domainRoutingIsmFactory": "0x1052eF3419f26Bec74Ed7CEf4a4FA6812Bc09908", "fallbackRoutingHook": "0xc401e251CCa7A364114504A994D6fC7cb1c243AB", "interchainGasPaymaster": "0x4E55aDA3ef1942049EA43E904EB01F4A0a9c39bd", - "interchainSecurityModule": "0x376F482e4dF14f7d497Ee5bF827Cf7BC7688F9DD", + "interchainSecurityModule": "0x071aeFd19DD91AB9E63ED3BDa36d0b7097A7459f", "mailbox": "0x3a464f746D23Ab22155710f44dB16dcA53e0775E", "merkleTreeHook": "0x441a01Fca2eD731C0Fc4633998332f9FEDB17575", "pausableHook": "0x5Ed813B8b41f25c8002B01A72bbDBe6A0232Fe27", @@ -3823,7 +3823,7 @@ "domainRoutingIsmFactory": "0x1052eF3419f26Bec74Ed7CEf4a4FA6812Bc09908", "fallbackRoutingHook": "0xc401e251CCa7A364114504A994D6fC7cb1c243AB", "interchainGasPaymaster": "0x4E55aDA3ef1942049EA43E904EB01F4A0a9c39bd", - "interchainSecurityModule": "0x53245370532d36e57B2Ef87fAF7Fb389A88aC57e", + "interchainSecurityModule": "0x2769f9B495692BC6135BA71255EeD04A995e74E2", "mailbox": "0x3a464f746D23Ab22155710f44dB16dcA53e0775E", "merkleTreeHook": "0x441a01Fca2eD731C0Fc4633998332f9FEDB17575", "pausableHook": "0x5Ed813B8b41f25c8002B01A72bbDBe6A0232Fe27", @@ -3891,7 +3891,7 @@ "domainRoutingIsmFactory": "0x1052eF3419f26Bec74Ed7CEf4a4FA6812Bc09908", "fallbackRoutingHook": "0xc401e251CCa7A364114504A994D6fC7cb1c243AB", "interchainGasPaymaster": "0x4E55aDA3ef1942049EA43E904EB01F4A0a9c39bd", - "interchainSecurityModule": "0xe8b432a77F1195bD7F27d54f0D354D25E014c1DE", + "interchainSecurityModule": "0xB2fB0a0b676B75cf6Af1ab517023f88Ea90EDd2E", "mailbox": "0x3a464f746D23Ab22155710f44dB16dcA53e0775E", "merkleTreeHook": "0x441a01Fca2eD731C0Fc4633998332f9FEDB17575", "pausableHook": "0x5Ed813B8b41f25c8002B01A72bbDBe6A0232Fe27", @@ -3954,7 +3954,7 @@ "domainRoutingIsmFactory": "0x1052eF3419f26Bec74Ed7CEf4a4FA6812Bc09908", "fallbackRoutingHook": "0xc401e251CCa7A364114504A994D6fC7cb1c243AB", "interchainGasPaymaster": "0x4E55aDA3ef1942049EA43E904EB01F4A0a9c39bd", - "interchainSecurityModule": "0x60DE73a356E9bEFBC73Ca55799ab4AE18d9f0574", + "interchainSecurityModule": "0x604F761705Cf5D1682dD17356b84d96CD41B0734", "mailbox": "0x3a464f746D23Ab22155710f44dB16dcA53e0775E", "merkleTreeHook": "0x441a01Fca2eD731C0Fc4633998332f9FEDB17575", "pausableHook": "0x5Ed813B8b41f25c8002B01A72bbDBe6A0232Fe27", @@ -4024,7 +4024,7 @@ "interchainAccountIsm": "0xcd9D3744512F07AE844c40E27912092d7c503565", "interchainAccountRouter": "0x92cdbF0Ccdf8E93467FA858fb986fa650A02f2A8", "interchainGasPaymaster": "0xb58257cc81E47EC72fD38aE16297048de23163b4", - "interchainSecurityModule": "0x099c96B148fC39c449884D7ABEC6837e51BF7fA9", + "interchainSecurityModule": "0x80D7DDC0b7d8dae6F9CcB0D78558291118815349", "mailbox": "0x7f50C5776722630a0024fAE05fDe8b47571D7B39", "merkleTreeHook": "0xCC3D1659D50461d27a2F025dDb2c9B06B584B7e1", "pausableHook": "0x4E55aDA3ef1942049EA43E904EB01F4A0a9c39bd", @@ -4084,7 +4084,7 @@ "interchainAccountIsm": "0xc23BaF5Eb5848D19701BbE7f139645e6bd58a319", "interchainAccountRouter": "0x7c58Cadcc2b60ACF794eE1843488d6f5703f76BE", "interchainGasPaymaster": "0xb4fc9B5fD57499Ef6FfF3995728a55F7A618ef86", - "interchainSecurityModule": "0x6aF9a16aa08e3ae6B3Cd898407dEfCF1de469783", + "interchainSecurityModule": "0x64bdb8Bfb9DbAc2FD2fD28a9B37605CE73D4410f", "mailbox": "0xb129828B9EDa48192D0B2db35D0E40dCF51B3594", "merkleTreeHook": "0x3E969bA938E6A993eeCD6F65b0dd8712B07dFe59", "pausableHook": "0x6Fb36672365C7c797028C400A61c58c0ECc53cD2", @@ -4215,7 +4215,7 @@ "interchainAccountIsm": "0x6119B76720CcfeB3D256EC1b91218EEfFD6756E1", "interchainAccountRouter": "0x9eaaC366BFD70430cFee6E70265fefFf1CfC9E47", "interchainGasPaymaster": "0x18B0688990720103dB63559a3563f7E8d0f63EDb", - "interchainSecurityModule": "0x03426Cf05E862B4702391Ff7E005E7cDB71cC789", + "interchainSecurityModule": "0x9386BadA88dF2b034614Dcf3CC82aB0dC6C63849", "mailbox": "0x7f50C5776722630a0024fAE05fDe8b47571D7B39", "merkleTreeHook": "0x886BB0f329781b98f98FDeb1ce7a8957F2d43B9F", "pausableHook": "0x2F619Ac5122689180AeBB930ADccdae215d538a9", @@ -4279,7 +4279,7 @@ "interchainAccountIsm": "0xFB9e40D811Cea562cc8a322b029eF2BDcC3ef6ed", "interchainAccountRouter": "0xeE8C0E1EeBfFCC451a013336386eA53E42a44451", "interchainGasPaymaster": "0x145566181A18E23bB6a8A3eC6D87765542A7F754", - "interchainSecurityModule": "0xD70e68A8CBEff2349b3F0455B45d58D555256633", + "interchainSecurityModule": "0xf10dB7FBC4B5d79d217881aB7FeC71A4a33449af", "mailbox": "0x3a867fCfFeC2B790970eeBDC9023E75B0a172aa7", "merkleTreeHook": "0x6963480b05EB58f4d624B014ab92e9aD4d21df6D", "pausableHook": "0xD0dca420feFda68537695A8D887080eeF4030AF7", @@ -4340,7 +4340,7 @@ "interchainAccountIsm": "0xFB9e40D811Cea562cc8a322b029eF2BDcC3ef6ed", "interchainAccountRouter": "0xeE8C0E1EeBfFCC451a013336386eA53E42a44451", "interchainGasPaymaster": "0x145566181A18E23bB6a8A3eC6D87765542A7F754", - "interchainSecurityModule": "0xD91a9416ffd488eEfFD8F3E1dF884d54eaD87673", + "interchainSecurityModule": "0xf48D165f545221766DbEB9D92b1187DD1322170b", "mailbox": "0x3a867fCfFeC2B790970eeBDC9023E75B0a172aa7", "merkleTreeHook": "0x6963480b05EB58f4d624B014ab92e9aD4d21df6D", "pausableHook": "0xD0dca420feFda68537695A8D887080eeF4030AF7", @@ -4419,7 +4419,7 @@ "interchainAccountIsm": "0xFB9e40D811Cea562cc8a322b029eF2BDcC3ef6ed", "interchainAccountRouter": "0xeE8C0E1EeBfFCC451a013336386eA53E42a44451", "interchainGasPaymaster": "0x145566181A18E23bB6a8A3eC6D87765542A7F754", - "interchainSecurityModule": "0xC601666Ca22649b20d642c0eb36047d265928D04", + "interchainSecurityModule": "0x78E7691458EA3Ca38a56fD4eFBE54D30dDDa72Ac", "mailbox": "0x3a867fCfFeC2B790970eeBDC9023E75B0a172aa7", "merkleTreeHook": "0x6963480b05EB58f4d624B014ab92e9aD4d21df6D", "pausableHook": "0xD0dca420feFda68537695A8D887080eeF4030AF7", @@ -4486,7 +4486,7 @@ "interchainAccountIsm": "0x783EC5e105234a570eB90f314284E5dBe53bdd90", "interchainAccountRouter": "0xc5D6aCaafBCcEC6D7fD7d92F4509befce641c563", "interchainGasPaymaster": "0xf3dFf6747E7FC74B431C943961054B7BF6309d8a", - "interchainSecurityModule": "0x1738cd8652a324DD9781D5Ce0f609827761D48dA", + "interchainSecurityModule": "0x3Eb3273A92B6b1653f64CD945506dd67F478C9bd", "mailbox": "0x3a464f746D23Ab22155710f44dB16dcA53e0775E", "merkleTreeHook": "0x5090dF2FBDa7127c7aDa41f60B79F5c55D380Dd8", "pausableHook": "0x886BB0f329781b98f98FDeb1ce7a8957F2d43B9F", @@ -4557,7 +4557,7 @@ "interchainAccountIsm": "0xFB9e40D811Cea562cc8a322b029eF2BDcC3ef6ed", "interchainAccountRouter": "0xeE8C0E1EeBfFCC451a013336386eA53E42a44451", "interchainGasPaymaster": "0x145566181A18E23bB6a8A3eC6D87765542A7F754", - "interchainSecurityModule": "0x9e92E451b71378aBf1cd4769f34528af9C0e97Fd", + "interchainSecurityModule": "0x3428158e7D0D9AD25653ea390EE9a9aA43628a48", "mailbox": "0x3a867fCfFeC2B790970eeBDC9023E75B0a172aa7", "merkleTreeHook": "0x6963480b05EB58f4d624B014ab92e9aD4d21df6D", "pausableHook": "0xD0dca420feFda68537695A8D887080eeF4030AF7", @@ -4622,7 +4622,7 @@ "interchainAccountIsm": "0xFB9e40D811Cea562cc8a322b029eF2BDcC3ef6ed", "interchainAccountRouter": "0xeE8C0E1EeBfFCC451a013336386eA53E42a44451", "interchainGasPaymaster": "0x145566181A18E23bB6a8A3eC6D87765542A7F754", - "interchainSecurityModule": "0xD91a9416ffd488eEfFD8F3E1dF884d54eaD87673", + "interchainSecurityModule": "0xFeAE4cdACEc5E2aC50A0357eed6c13A5d76c88cD", "mailbox": "0x3a867fCfFeC2B790970eeBDC9023E75B0a172aa7", "merkleTreeHook": "0x6963480b05EB58f4d624B014ab92e9aD4d21df6D", "pausableHook": "0xD0dca420feFda68537695A8D887080eeF4030AF7", @@ -4686,7 +4686,7 @@ "interchainAccountIsm": "0xFB9e40D811Cea562cc8a322b029eF2BDcC3ef6ed", "interchainAccountRouter": "0xeE8C0E1EeBfFCC451a013336386eA53E42a44451", "interchainGasPaymaster": "0x145566181A18E23bB6a8A3eC6D87765542A7F754", - "interchainSecurityModule": "0x330063B36D40D1d77DBAd7e9552b97433f281090", + "interchainSecurityModule": "0x18545b46Df0A6cd81FA05C663FAc4ee26a750ad0", "mailbox": "0x3a867fCfFeC2B790970eeBDC9023E75B0a172aa7", "merkleTreeHook": "0x6963480b05EB58f4d624B014ab92e9aD4d21df6D", "pausableHook": "0xD0dca420feFda68537695A8D887080eeF4030AF7", @@ -4753,7 +4753,7 @@ "interchainAccountIsm": "0xFB9e40D811Cea562cc8a322b029eF2BDcC3ef6ed", "interchainAccountRouter": "0xeE8C0E1EeBfFCC451a013336386eA53E42a44451", "interchainGasPaymaster": "0x145566181A18E23bB6a8A3eC6D87765542A7F754", - "interchainSecurityModule": "0xD70e68A8CBEff2349b3F0455B45d58D555256633", + "interchainSecurityModule": "0xc3FFEd2a525a487cfe805193c463CB7BdD704CE9", "mailbox": "0x3a867fCfFeC2B790970eeBDC9023E75B0a172aa7", "merkleTreeHook": "0x6963480b05EB58f4d624B014ab92e9aD4d21df6D", "pausableHook": "0xD0dca420feFda68537695A8D887080eeF4030AF7", @@ -4817,7 +4817,7 @@ "interchainAccountIsm": "0xFB9e40D811Cea562cc8a322b029eF2BDcC3ef6ed", "interchainAccountRouter": "0xeE8C0E1EeBfFCC451a013336386eA53E42a44451", "interchainGasPaymaster": "0x145566181A18E23bB6a8A3eC6D87765542A7F754", - "interchainSecurityModule": "0x0197F4a7ED6db49Ad345214C710206aCfFBA241a", + "interchainSecurityModule": "0xb5813484CD3027FCb4B908a3bD2D9c118423a14B", "mailbox": "0x3a867fCfFeC2B790970eeBDC9023E75B0a172aa7", "merkleTreeHook": "0x6963480b05EB58f4d624B014ab92e9aD4d21df6D", "pausableHook": "0xD0dca420feFda68537695A8D887080eeF4030AF7", @@ -4879,7 +4879,7 @@ "fallbackDomainRoutingHook": "0x671836d35BB15E21ECc92c4936F0e3131efe12B4", "fallbackRoutingHook": "0x671836d35BB15E21ECc92c4936F0e3131efe12B4", "interchainGasPaymaster": "0x318FbdB17d4e743aBF3183658a4730777101B75C", - "interchainSecurityModule": "0x307A9dBD1df2329c3c597aF6853de60660baFFb5", + "interchainSecurityModule": "0xd60690A755C070817AacF88d1FD3F64451D80149", "mailbox": "0xd7b351D2dE3495eA259DD10ab4b9300A378Afbf3", "merkleTreeHook": "0x55379421409961Ef129738c24261379ef8A547Df", "proxyAdmin": "0x72e2A678442Edc65f14476A0E4c94312C0469f4A", @@ -4937,7 +4937,7 @@ "fallbackDomainRoutingHook": "0xe4e98Cc5D0318aBFD2adA8A3C6817b727063F500", "fallbackRoutingHook": "0xe4e98Cc5D0318aBFD2adA8A3C6817b727063F500", "interchainGasPaymaster": "0xf44AdA86a1f765A938d404699B8070Dd47bD2431", - "interchainSecurityModule": "0xec650696FDAE2355A928520AD7d6491c6072cf7f", + "interchainSecurityModule": "0xB3A8a3270D59Ef267E188c40d29FA0d9072796aD", "mailbox": "0x6bD0A2214797Bc81e0b006F7B74d6221BcD8cb6E", "merkleTreeHook": "0x823500D69D77A52212DC93f8836E9c08581487eE", "proxyAdmin": "0xD01274DC164D32F8595bE707F221375E68cE300C", @@ -5003,7 +5003,7 @@ "interchainAccountIsm": "0x4d264424905535E97396Db83bd553D0d73A4EF9d", "interchainAccountRouter": "0x26A29486480BD74f9B830a9B8dB33cb43C40f496", "interchainGasPaymaster": "0x9c2214467Daf9e2e1F45b36d08ce0b9C65BFeA88", - "interchainSecurityModule": "0x28Ce6b8aB49e37f2B386056bB7D9779Ecc89f4EE", + "interchainSecurityModule": "0x5e7Ff7Cb6C828DFda4Ce8934A6f8F4C7B33E2217", "mailbox": "0x5bdADEAD721Eb4C4038fF7c989E3C7BbBA302435", "merkleTreeHook": "0x2684C6F89E901987E1FdB7649dC5Be0c57C61645", "pausableHook": "0xC8E323036AAFB4B4201e7B640E79C4Db285A3FC8", @@ -5067,7 +5067,7 @@ "interchainAccountIsm": "0x545E289B88c6d97b74eC0B96e308cae46Bf5f832", "interchainAccountRouter": "0x4ef363Da5bb09CC6aeA16973786963d0C8820778", "interchainGasPaymaster": "0x561BcA8D862536CD9C88f332C1A1Da0fC8F96e40", - "interchainSecurityModule": "0x5Cd2d33b51b3394A14C11ea79E5E0Ba6bCC81e83", + "interchainSecurityModule": "0x14bF825eE8FaD180d379280963FBB66F6c256a6E", "mailbox": "0x248aDe14C0489E20C9a7Fea5F86DBfC3702208eF", "merkleTreeHook": "0x9c2214467Daf9e2e1F45b36d08ce0b9C65BFeA88", "pausableHook": "0x2f536FB7a37bd817Af644072a904Ddc02Dae429f", @@ -5134,7 +5134,7 @@ "interchainAccountIsm": "0x60bB6D060393D3C206719A7bD61844cC82891cfB", "interchainAccountRouter": "0x9534122Aae7978dB8f5f10dF4432233c53e820A1", "interchainGasPaymaster": "0x61374178e45F65fF9D6252d017Cd580FC60B7654", - "interchainSecurityModule": "0xE97f143373BA2f424a67FC3fc5cf7EfE2095aF0A", + "interchainSecurityModule": "0x969179b1330226bC861aE726Aa1D2Bba03cc5576", "mailbox": "0x3a464f746D23Ab22155710f44dB16dcA53e0775E", "merkleTreeHook": "0xEe08043cf22c80b27BF24d19999231dF4a3fC256", "pausableHook": "0x145566181A18E23bB6a8A3eC6D87765542A7F754", @@ -5199,7 +5199,7 @@ "interchainAccountIsm": "0xcdc31BA959DE8C035A03167ebAE1961208CDf172", "interchainAccountRouter": "0x349831a180eE4265008C5FFB9465Ff97c1CF0028", "interchainGasPaymaster": "0x6AA10748a036a49Cb290C0e12B77319b76792D5E", - "interchainSecurityModule": "0xBB7E1A95C63cc745b6e51127d04e9a957966591e", + "interchainSecurityModule": "0x1Be73077A341D517AcAa2516c0BE356b6444134B", "mailbox": "0xd9Cc2e652A162bb93173d1c44d46cd2c0bbDA59D", "merkleTreeHook": "0x2783D98CC073dbcDa90241C804d16982D3d75821", "pausableHook": "0x3bb2D0a828f7dD91bA786091F421f6d7cF376445", @@ -5269,7 +5269,7 @@ "interchainAccountIsm": "0x545E289B88c6d97b74eC0B96e308cae46Bf5f832", "interchainAccountRouter": "0x4ef363Da5bb09CC6aeA16973786963d0C8820778", "interchainGasPaymaster": "0xc6835e52C1b976F1ebC71Bc8919738E02849FdA9", - "interchainSecurityModule": "0xc622B32Da6Bc983B7aE6Ea7253D39396512e5F70", + "interchainSecurityModule": "0x8021F7b95A9354619c22a3bed3a6549d07Ac34B4", "mailbox": "0x1c6f404800bA49Ed581af734eA0d25c0c7d017B2", "merkleTreeHook": "0xdAa1B65547fB969c9ff5678956AB2FF9771B883D", "pausableHook": "0xA0e0829DA397CcF55d5B779C31728f21Cb8219DF", @@ -5381,7 +5381,7 @@ "interchainAccountIsm": "0x8c794a781327b819416E7b67908f1D22397f1E67", "interchainAccountRouter": "0x16625230dD6cFe1B2bec3eCaEc7d43bA3A902CD6", "interchainGasPaymaster": "0x2b79328DA089E89A9E9c08732b56dd31F01011Db", - "interchainSecurityModule": "0xFdd7f8b8CBe3612609Fe5bf0332B280182dcB74F", + "interchainSecurityModule": "0x14663E42b9b66F79103c5824230CC79a26E24BfD", "mailbox": "0x730f8a4128Fa8c53C777B62Baa1abeF94cAd34a9", "merkleTreeHook": "0x9c64f327F0140DeBd430aab3E2F1d6cbcA921227", "pausableHook": "0x2684C6F89E901987E1FdB7649dC5Be0c57C61645", @@ -5445,7 +5445,7 @@ "interchainAccountIsm": "0xE67Dc24970B482579923551Ede52BD35a2858989", "interchainAccountRouter": "0xDDE46032Baf4da13fDD79BF9dfbaA2749615C409", "interchainGasPaymaster": "0x2f536FB7a37bd817Af644072a904Ddc02Dae429f", - "interchainSecurityModule": "0xcCe65dffEc65798B986969EE9A490AC096d0E54e", + "interchainSecurityModule": "0x846856eeD85eBc6C5FBf94F17e0c9cC76dF6c86E", "mailbox": "0x2f0E57527Bb37E5E064EF243fad56CCE6241906c", "merkleTreeHook": "0xC8E323036AAFB4B4201e7B640E79C4Db285A3FC8", "pausableHook": "0xdAa1B65547fB969c9ff5678956AB2FF9771B883D", @@ -5509,7 +5509,7 @@ "interchainAccountIsm": "0x20a0A32a110362920597F72974E1E0d7e25cA20a", "interchainAccountRouter": "0x5b3EeADcc0E2d4284eA6816e2E503c24d30a9E54", "interchainGasPaymaster": "0x282629Af1A2f9b8e2c5Cbc54C35C7989f21950c6", - "interchainSecurityModule": "0x7B891Aec2e7edA0215Be884f2396615a231A1502", + "interchainSecurityModule": "0xa1080587BA36750d90746A147Ee79F8589Ac0099", "mailbox": "0x5C02157068a52cEcfc98EDb6115DE6134EcB4764", "merkleTreeHook": "0xf147bBD944C610F86DaE6C7668497D22932C1E4A", "pausableHook": "0x872Bd98057931c8809927c6dE2ef39738a80Eb0C", @@ -5576,7 +5576,7 @@ "interchainAccountIsm": "0xf40eE9FF75Fa34910b7C4C8d68d4850B3bD184D3", "interchainAccountRouter": "0xf6fB78dc009C1A4286c0E7d90C10c9E8906a62Ea", "interchainGasPaymaster": "0xDDE46032Baf4da13fDD79BF9dfbaA2749615C409", - "interchainSecurityModule": "0xc09E4b2C7b3884609dded73571a27B8F6D05aA66", + "interchainSecurityModule": "0x008FED472F8d4634C5701B3bEc2380C30064BEb5", "mailbox": "0x65dCf8F6b3f6a0ECEdf3d0bdCB036AEa47A1d615", "merkleTreeHook": "0x8c794a781327b819416E7b67908f1D22397f1E67", "pausableHook": "0x4d264424905535E97396Db83bd553D0d73A4EF9d", @@ -5643,7 +5643,7 @@ "interchainAccountIsm": "0xd9Cc2e652A162bb93173d1c44d46cd2c0bbDA59D", "interchainAccountRouter": "0x7279B1e11142078b8dC9e69620200f4C84FB8aaa", "interchainGasPaymaster": "0x5ae1ECA065aC8ee92Ce98E584fc3CE43070020e7", - "interchainSecurityModule": "0xE367092A59d558a9Ee8894D12f4Fa363A168870e", + "interchainSecurityModule": "0x54BF1a8c5584E844a6b4F9F98e2770A415921f66", "mailbox": "0x96D51cc3f7500d501bAeB1A2a62BB96fa03532F8", "merkleTreeHook": "0x086c3947F71BE98A0bDf4AB7239955e7542b0CbA", "pausableHook": "0x9C6e8d989ea7F212e679191BEb44139d83ac927a", @@ -5713,7 +5713,7 @@ "interchainAccountIsm": "0x8a733038eF4BbC314eE0F7595257D8d3799B6aA9", "interchainAccountRouter": "0xCE8260c1b5cF2fAD15bb4B6542716b050Fdf35c9", "interchainGasPaymaster": "0xa1c3884EbE24Cccb120B2E98a55f85140563aa4C", - "interchainSecurityModule": "0x5D26b61F665FabFF52D6f5260072dc20BC9b0652", + "interchainSecurityModule": "0xBCc50A4e5690251aFF052b415251DfBc634002C7", "mailbox": "0x5e8a0fCc0D1DF583322943e01F02cB243e5300f6", "merkleTreeHook": "0x2f536FB7a37bd817Af644072a904Ddc02Dae429f", "pausableHook": "0xc6835e52C1b976F1ebC71Bc8919738E02849FdA9", @@ -5774,7 +5774,7 @@ "interchainAccountIsm": "0x25EAC2007b0D40E3f0AF112FD346412321038719", "interchainAccountRouter": "0xfF26696DcDb6BbFD27e959b847D4f1399D5BcF64", "interchainGasPaymaster": "0x9534122Aae7978dB8f5f10dF4432233c53e820A1", - "interchainSecurityModule": "0xC83054ee2eFB0B21A738E79b9B79216B8240A1C9", + "interchainSecurityModule": "0x0cF15af1385776F0f853C3525cC9A9eba600c209", "mailbox": "0x3a464f746D23Ab22155710f44dB16dcA53e0775E", "merkleTreeHook": "0x9eaaC366BFD70430cFee6E70265fefFf1CfC9E47", "pausableHook": "0x9eb56085DdbDA60aDf7d2B533AFeD90e38fC9666", @@ -5844,7 +5844,7 @@ "interchainAccountIsm": "0x25EAC2007b0D40E3f0AF112FD346412321038719", "interchainAccountRouter": "0xfF26696DcDb6BbFD27e959b847D4f1399D5BcF64", "interchainGasPaymaster": "0x9534122Aae7978dB8f5f10dF4432233c53e820A1", - "interchainSecurityModule": "0xfc5Ebd43B46e9A8B876603D23E35c8809211686d", + "interchainSecurityModule": "0x319310239BC5c43808Ff1008d0db3B38067F7Ce9", "mailbox": "0x3a464f746D23Ab22155710f44dB16dcA53e0775E", "merkleTreeHook": "0x9eaaC366BFD70430cFee6E70265fefFf1CfC9E47", "pausableHook": "0x9eb56085DdbDA60aDf7d2B533AFeD90e38fC9666", @@ -5905,7 +5905,7 @@ "interchainAccountIsm": "0x25EAC2007b0D40E3f0AF112FD346412321038719", "interchainAccountRouter": "0xfF26696DcDb6BbFD27e959b847D4f1399D5BcF64", "interchainGasPaymaster": "0x9534122Aae7978dB8f5f10dF4432233c53e820A1", - "interchainSecurityModule": "0xC83054ee2eFB0B21A738E79b9B79216B8240A1C9", + "interchainSecurityModule": "0x773daCf7C9944fE6e1Fa740eeC7FD4ae820a9cbb", "mailbox": "0x3a464f746D23Ab22155710f44dB16dcA53e0775E", "merkleTreeHook": "0x9eaaC366BFD70430cFee6E70265fefFf1CfC9E47", "pausableHook": "0x9eb56085DdbDA60aDf7d2B533AFeD90e38fC9666", @@ -5969,7 +5969,7 @@ "interchainAccountIsm": "0x25EAC2007b0D40E3f0AF112FD346412321038719", "interchainAccountRouter": "0xfF26696DcDb6BbFD27e959b847D4f1399D5BcF64", "interchainGasPaymaster": "0x9534122Aae7978dB8f5f10dF4432233c53e820A1", - "interchainSecurityModule": "0xaba2463875441032eF14B0EAfAe3c7754A92B56f", + "interchainSecurityModule": "0x555b95e85640aeE885236327aB91946827ebdB57", "mailbox": "0x3a464f746D23Ab22155710f44dB16dcA53e0775E", "merkleTreeHook": "0x9eaaC366BFD70430cFee6E70265fefFf1CfC9E47", "pausableHook": "0x9eb56085DdbDA60aDf7d2B533AFeD90e38fC9666", @@ -6033,7 +6033,7 @@ "interchainAccountIsm": "0x25EAC2007b0D40E3f0AF112FD346412321038719", "interchainAccountRouter": "0xfF26696DcDb6BbFD27e959b847D4f1399D5BcF64", "interchainGasPaymaster": "0x9534122Aae7978dB8f5f10dF4432233c53e820A1", - "interchainSecurityModule": "0xaba2463875441032eF14B0EAfAe3c7754A92B56f", + "interchainSecurityModule": "0x555b95e85640aeE885236327aB91946827ebdB57", "mailbox": "0x3a464f746D23Ab22155710f44dB16dcA53e0775E", "merkleTreeHook": "0x9eaaC366BFD70430cFee6E70265fefFf1CfC9E47", "pausableHook": "0x9eb56085DdbDA60aDf7d2B533AFeD90e38fC9666", @@ -6106,7 +6106,7 @@ "interchainAccountIsm": "0xfF26696DcDb6BbFD27e959b847D4f1399D5BcF64", "interchainAccountRouter": "0x4D50044335dc1d4D26c343AdeDf6E47808475Deb", "interchainGasPaymaster": "0x70EbA87Cd15616f32C736B3f3BdCfaeD0713a82B", - "interchainSecurityModule": "0xa1095E9076Ce5aC2Bf2325891bf92a07571A6AFa", + "interchainSecurityModule": "0x6d29ffb859D867Faf2705f39b168331960438f31", "mailbox": "0x3a464f746D23Ab22155710f44dB16dcA53e0775E", "merkleTreeHook": "0xbb0AE51BCa526cF313b6a95BfaB020794af6C394", "pausableHook": "0x83475ca5bEB2Eaa59A2FF48a0544ebaa4a32c2de", @@ -6170,7 +6170,7 @@ "interchainAccountIsm": "0x31Bb27f6007C33acD1be83ACEd3164C60f8F7b13", "interchainAccountRouter": "0xEeb5a99a75585fe137c83E7b62b74f87264A5481", "interchainGasPaymaster": "0xb7C9307fE90B9AB093c6D3EdeE3259f5378D5f03", - "interchainSecurityModule": "0xc7d18fFAE0eD75c376aA2c662deD7Cd74f492182", + "interchainSecurityModule": "0x833005B52Ea2785178752f91b51614E40eF56891", "mailbox": "0x0dF25A2d59F03F039b56E90EdC5B89679Ace28Bc", "merkleTreeHook": "0xC88636fFdFAc7cb87b7A76310B7a62AF0A000595", "pausableHook": "0x2AF32cF8e3Cf42d221eDa0c843818fA5ee129E27", @@ -6234,7 +6234,7 @@ "interchainAccountIsm": "0x28291a7062afA569104bEd52F7AcCA3dD2FafD11", "interchainAccountRouter": "0xe9E3444DDD80c50276c0Fcf316026f6d7fEc2c47", "interchainGasPaymaster": "0x25EAC2007b0D40E3f0AF112FD346412321038719", - "interchainSecurityModule": "0xEa325c513Bd54A3d4a04D98843d0523B1477751D", + "interchainSecurityModule": "0xd8d54AA2d31De782C76170328eB3Dca412F171ae", "mailbox": "0x3a464f746D23Ab22155710f44dB16dcA53e0775E", "merkleTreeHook": "0x5C02157068a52cEcfc98EDb6115DE6134EcB4764", "pausableHook": "0x99fEFc1119E86Ee0153eb887cF8E8ab2d92A16e8", @@ -6254,6 +6254,189 @@ "validatorAnnounce": "0x4D50044335dc1d4D26c343AdeDf6E47808475Deb", "index": { "from": 57794 + }, + "gnosisSafeTransactionServiceUrl": "https://trx-swell.safe.protofire.io" + }, + "appchain": { + "blockExplorers": [ + { + "apiUrl": "https://explorer.appchain.xyz/api", + "family": "blockscout", + "name": "AppChain Explorer", + "url": "https://explorer.appchain.xyz" + } + ], + "blocks": { + "confirmations": 1, + "estimateBlockTime": 2, + "reorgPeriod": 0 + }, + "chainId": 466, + "deployer": { + "name": "Abacus Works", + "url": "https://www.hyperlane.xyz" + }, + "displayName": "AppChain", + "domainId": 466, + "gasCurrencyCoinGeckoId": "ethereum", + "index": { + "from": 190 + }, + "name": "appchain", + "nativeToken": { + "decimals": 18, + "name": "Ether", + "symbol": "ETH" + }, + "protocol": "ethereum", + "rpcUrls": [ + { + "http": "https://appchain.calderachain.xyz/http" + } + ], + "technicalStack": "arbitrumnitro", + "aggregationHook": "0xD67829Ba73A4287a870f67280DFb86DB6cA1cC46", + "domainRoutingIsm": "0xBD70Ea9D599a0FC8158B026797177773C3445730", + "domainRoutingIsmFactory": "0x1052eF3419f26Bec74Ed7CEf4a4FA6812Bc09908", + "fallbackRoutingHook": "0xfF26696DcDb6BbFD27e959b847D4f1399D5BcF64", + "interchainAccountIsm": "0x027eFD1695941969435AA640542B690044dF7E06", + "interchainAccountRouter": "0x65F1343AC23D4fF48bf6c7E0c55872d245397567", + "interchainGasPaymaster": "0x28291a7062afA569104bEd52F7AcCA3dD2FafD11", + "interchainSecurityModule": "0xAf8AA677016ee577268Ab6ad19483075605a5671", + "mailbox": "0x3a464f746D23Ab22155710f44dB16dcA53e0775E", + "merkleTreeHook": "0xcd90D49b046772F710250b9119117169CB2e4D8b", + "pausableHook": "0x7CE76f5f0C469bBB4cd7Ea6EbabB54437A093127", + "pausableIsm": "0x25EAC2007b0D40E3f0AF112FD346412321038719", + "protocolFee": "0xD35Aa652C1F808d3f87DA3DC7974fea888D7d625", + "proxyAdmin": "0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7", + "staticAggregationHookFactory": "0xEb9FcFDC9EfDC17c1EC5E1dc085B98485da213D6", + "staticAggregationIsm": "0xAf8AA677016ee577268Ab6ad19483075605a5671", + "staticAggregationIsmFactory": "0x8F7454AC98228f3504Bb91eA3D8Adafe6406110A", + "staticMerkleRootMultisigIsmFactory": "0x2C1FAbEcd7bFBdEBF27CcdB67baADB38b6Df90fC", + "staticMerkleRootWeightedMultisigIsmFactory": "0x0761b0827849abbf7b0cC09CE14e1C93D87f5004", + "staticMessageIdMultisigIsmFactory": "0x8b83fefd896fAa52057798f6426E9f0B080FCCcE", + "staticMessageIdWeightedMultisigIsmFactory": "0x4Ed7d626f1E96cD1C0401607Bf70D95243E3dEd1", + "storageGasOracle": "0xA376b27212D608324808923Add679A2c9FAFe9Da", + "testRecipient": "0xeF7F4367703cdf4863AD6Be34C1627d8b1C2D67a", + "timelockController": "0x0000000000000000000000000000000000000000", + "validatorAnnounce": "0x1196055C61af3e3DA6f8458B07b255a72b64Bcf7" + }, + "treasure": { + "blockExplorers": [ + { + "apiUrl": "https://rpc-explorer-verify.treasure.lol/contract_verification", + "family": "etherscan", + "name": "Treasurescan", + "url": "https://treasurescan.io" + } + ], + "blocks": { + "confirmations": 1, + "estimateBlockTime": 1, + "reorgPeriod": 0 + }, + "chainId": 61166, + "deployer": { + "name": "Abacus Works", + "url": "https://www.hyperlane.xyz" + }, + "displayName": "Treasure", + "domainId": 61166, + "gasCurrencyCoinGeckoId": "magic", + "name": "treasure", + "nativeToken": { + "decimals": 18, + "name": "MAGIC", + "symbol": "MAGIC" + }, + "protocol": "ethereum", + "rpcUrls": [ + { + "http": "https://rpc.treasure.lol" + } + ], + "technicalStack": "zksync", + "domainRoutingIsm": "0xCDfE1782fDC9E74810D3B69E971d752bC4b4D6E6", + "domainRoutingIsmFactory": "0x0000000000000000000000000000000000000000", + "fallbackDomainRoutingHook": "0x697a90753B7dCf6512189c239E612fC12baaE500", + "fallbackRoutingHook": "0x697a90753B7dCf6512189c239E612fC12baaE500", + "interchainGasPaymaster": "0x388289cd5862e17AAfD6ffF7F46A9Ec48a969bCd", + "interchainSecurityModule": "0xCDfE1782fDC9E74810D3B69E971d752bC4b4D6E6", + "mailbox": "0x9BbDf86b272d224323136E15594fdCe487F40ce7", + "merkleTreeHook": "0xc1FC99Ea4D8B2b06b674A2e91b5A4617c1dcFd22", + "proxyAdmin": "0x038F9F4e93e88Af2C688da265222FdE80e455aA4", + "staticAggregationHookFactory": "0x0000000000000000000000000000000000000000", + "staticAggregationIsmFactory": "0x0000000000000000000000000000000000000000", + "staticMerkleRootMultisigIsmFactory": "0x0000000000000000000000000000000000000000", + "staticMerkleRootWeightedMultisigIsmFactory": "0x0000000000000000000000000000000000000000", + "staticMessageIdMultisigIsmFactory": "0x0000000000000000000000000000000000000000", + "staticMessageIdWeightedMultisigIsmFactory": "0x0000000000000000000000000000000000000000", + "storageGasOracle": "0xc364cfedefE854c1275B0f4088EaFA9695e1FC56", + "testRecipient": "0x54E88f2ab58E0Ab4B7Ce081FB20D85b16af041d2", + "validatorAnnounce": "0x73a82061Cd258d02BEa145fe183120456e718c2A", + "index": { + "from": 1552 + } + }, + "zklink": { + "blockExplorers": [ + { + "apiUrl": "https://explorer.zklink.io/contract_verification", + "family": "etherscan", + "name": "zkLink Nova Block Explorer", + "url": "https://explorer.zklink.io" + } + ], + "blocks": { + "confirmations": 1, + "estimateBlockTime": 1, + "reorgPeriod": 0 + }, + "chainId": 810180, + "deployer": { + "name": "Abacus Works", + "url": "https://www.hyperlane.xyz" + }, + "displayName": "zkLink Nova", + "displayNameShort": "zkLink", + "domainId": 810180, + "gasCurrencyCoinGeckoId": "ethereum", + "name": "zklink", + "nativeToken": { + "decimals": 18, + "name": "Ethereum", + "symbol": "ETH" + }, + "protocol": "ethereum", + "rpcUrls": [ + { + "http": "https://rpc.zklink.io" + }, + { + "http": "https://rpc.zklink.network" + } + ], + "technicalStack": "zksync", + "domainRoutingIsm": "0xc364cfedefE854c1275B0f4088EaFA9695e1FC56", + "domainRoutingIsmFactory": "0x0000000000000000000000000000000000000000", + "fallbackDomainRoutingHook": "0x388289cd5862e17AAfD6ffF7F46A9Ec48a969bCd", + "fallbackRoutingHook": "0x388289cd5862e17AAfD6ffF7F46A9Ec48a969bCd", + "interchainGasPaymaster": "0xB35eCb9714e8f48332Af22B48C18ca21E2607438", + "interchainSecurityModule": "0xc364cfedefE854c1275B0f4088EaFA9695e1FC56", + "mailbox": "0x9BbDf86b272d224323136E15594fdCe487F40ce7", + "merkleTreeHook": "0xA1ADFCa9666Bcd68b7b5C8b55e3ecC465DcDfE65", + "proxyAdmin": "0x038F9F4e93e88Af2C688da265222FdE80e455aA4", + "staticAggregationHookFactory": "0x0000000000000000000000000000000000000000", + "staticAggregationIsmFactory": "0x0000000000000000000000000000000000000000", + "staticMerkleRootMultisigIsmFactory": "0x0000000000000000000000000000000000000000", + "staticMerkleRootWeightedMultisigIsmFactory": "0x0000000000000000000000000000000000000000", + "staticMessageIdMultisigIsmFactory": "0x0000000000000000000000000000000000000000", + "staticMessageIdWeightedMultisigIsmFactory": "0x0000000000000000000000000000000000000000", + "storageGasOracle": "0x73a82061Cd258d02BEa145fe183120456e718c2A", + "testRecipient": "0x58e8699b8e0a2A3ba40b380038f64F0B3ef4f2e5", + "validatorAnnounce": "0xf5626c0f33Ca102eb3ca1633A410cd8aa92909e4", + "index": { + "from": 7286869 } } }, diff --git a/rust/main/config/test_sealevel_config.json b/rust/main/config/test_sealevel_config.json index 5eebd592a3..7b7cc1c8a7 100644 --- a/rust/main/config/test_sealevel_config.json +++ b/rust/main/config/test_sealevel_config.json @@ -15,7 +15,7 @@ }, "rpcUrls": [ { - "http": "http://localhost:8899" + "http": "http://127.0.0.1:8899" } ], "index": { @@ -38,7 +38,7 @@ }, "rpcUrls": [ { - "http": "http://localhost:8899" + "http": "http://127.0.0.1:8899" } ], "index": { diff --git a/rust/main/hyperlane-base/src/settings/base.rs b/rust/main/hyperlane-base/src/settings/base.rs index e32771b0e2..7024d67cc6 100644 --- a/rust/main/hyperlane-base/src/settings/base.rs +++ b/rust/main/hyperlane-base/src/settings/base.rs @@ -225,28 +225,10 @@ impl Settings { // TODO: parallelize these calls again let mut syncs = vec![]; for domain in domains { - let sync = match T::indexing_cursor(domain.domain_protocol()) { - CursorType::SequenceAware => self - .sequenced_contract_sync( - domain, - metrics, - sync_metrics, - stores.get(domain).unwrap().clone(), - advanced_log_meta, - ) - .await - .map(|r| r as Arc>)?, - CursorType::RateLimited => self - .watermark_contract_sync( - domain, - metrics, - sync_metrics, - stores.get(domain).unwrap().clone(), - advanced_log_meta, - ) - .await - .map(|r| r as Arc>)?, - }; + let store = stores.get(domain).unwrap().clone(); + let sync = self + .contract_sync(domain, metrics, sync_metrics, store, advanced_log_meta) + .await?; syncs.push(sync); } @@ -255,4 +237,36 @@ impl Settings { .map(|i| Ok((i.domain().clone(), i))) .collect() } + + /// Build single contract sync. + /// All contracts have to implement both sequenced and + /// watermark trait bounds + pub async fn contract_sync( + &self, + domain: &HyperlaneDomain, + metrics: &CoreMetrics, + sync_metrics: &ContractSyncMetrics, + store: Arc, + advanced_log_meta: bool, + ) -> Result>> + where + T: Indexable + Debug + Send + Sync + Clone + Eq + Hash + 'static, + SequenceIndexer: TryFromWithMetrics, + S: HyperlaneLogStore + + HyperlaneSequenceAwareIndexerStoreReader + + HyperlaneWatermarkedLogStore + + 'static, + { + let sync = match T::indexing_cursor(domain.domain_protocol()) { + CursorType::SequenceAware => self + .sequenced_contract_sync(domain, metrics, sync_metrics, store, advanced_log_meta) + .await + .map(|r| r as Arc>)?, + CursorType::RateLimited => self + .watermark_contract_sync(domain, metrics, sync_metrics, store, advanced_log_meta) + .await + .map(|r| r as Arc>)?, + }; + Ok(sync) + } } diff --git a/rust/main/hyperlane-base/src/types/gcs_storage.rs b/rust/main/hyperlane-base/src/types/gcs_storage.rs index a413edb323..93219f8510 100644 --- a/rust/main/hyperlane-base/src/types/gcs_storage.rs +++ b/rust/main/hyperlane-base/src/types/gcs_storage.rs @@ -240,7 +240,8 @@ impl CheckpointSyncer for GcsStorageClient { &self, signed_checkpoint: &SignedCheckpointWithMessageId, ) -> Result<()> { - let object_name = Self::get_checkpoint_key(signed_checkpoint.value.index); + let object_key = Self::get_checkpoint_key(signed_checkpoint.value.index); + let object_name = self.object_path(&object_key); let data = serde_json::to_vec(signed_checkpoint)?; self.upload_and_log(&object_name, data).await } diff --git a/rust/main/utils/run-locally/src/config.rs b/rust/main/utils/run-locally/src/config.rs index 476a10725d..c03f859ba8 100644 --- a/rust/main/utils/run-locally/src/config.rs +++ b/rust/main/utils/run-locally/src/config.rs @@ -1,6 +1,7 @@ use std::env; use std::sync::Arc; +#[derive(Debug)] pub struct Config { pub is_ci_env: bool, pub ci_mode: bool, diff --git a/rust/main/utils/run-locally/src/invariants/termination_invariants.rs b/rust/main/utils/run-locally/src/invariants/termination_invariants.rs index 67bbbb9ac8..cb851af8d2 100644 --- a/rust/main/utils/run-locally/src/invariants/termination_invariants.rs +++ b/rust/main/utils/run-locally/src/invariants/termination_invariants.rs @@ -126,16 +126,6 @@ pub fn termination_invariants_met( "Verbose logs not expected at the log level set in e2e" ); - let gas_payment_sealevel_events_count = fetch_metric( - RELAYER_METRICS_PORT, - "hyperlane_contract_sync_stored_events", - &hashmap! { - "data_type" => "gas_payments", - "chain" => "sealeveltest", - }, - )? - .iter() - .sum::(); // TestSendReceiver randomly breaks gas payments up into // two. So we expect at least as many gas payments as messages. if gas_payment_events_count < total_messages_expected { @@ -163,11 +153,12 @@ pub fn termination_invariants_met( )? .iter() .sum::(); - if dispatched_messages_scraped != eth_messages_expected + ZERO_MERKLE_INSERTION_KATHY_MESSAGES { + if dispatched_messages_scraped != total_messages_expected + ZERO_MERKLE_INSERTION_KATHY_MESSAGES + { log!( "Scraper has scraped {} dispatched messages, expected {}", dispatched_messages_scraped, - eth_messages_expected + total_messages_expected + ZERO_MERKLE_INSERTION_KATHY_MESSAGES, ); return Ok(false); } @@ -179,15 +170,11 @@ pub fn termination_invariants_met( )? .iter() .sum::(); - // The relayer and scraper should have the same number of gas payments. - // TODO: Sealevel gas payments are not yet included in the event count. - // For now, treat as an exception in the invariants. - let expected_gas_payments = gas_payment_events_count - gas_payment_sealevel_events_count; - if gas_payments_scraped != expected_gas_payments { + if gas_payments_scraped != gas_payment_events_count { log!( "Scraper has scraped {} gas payments, expected {}", gas_payments_scraped, - expected_gas_payments + gas_payment_events_count ); return Ok(false); } @@ -199,11 +186,11 @@ pub fn termination_invariants_met( )? .iter() .sum::(); - if delivered_messages_scraped != eth_messages_expected { + if delivered_messages_scraped != total_messages_expected { log!( "Scraper has scraped {} delivered messages, expected {}", delivered_messages_scraped, - eth_messages_expected + total_messages_expected ); return Ok(false); } diff --git a/rust/main/utils/run-locally/src/main.rs b/rust/main/utils/run-locally/src/main.rs index ac91660633..4686c15446 100644 --- a/rust/main/utils/run-locally/src/main.rs +++ b/rust/main/utils/run-locally/src/main.rs @@ -153,6 +153,8 @@ fn main() -> ExitCode { .unwrap(); let config = Config::load(); + log!("Running with config: {:?}", config); + let mut validator_origin_chains = ["test1", "test2", "test3"].to_vec(); let mut validator_keys = ETH_VALIDATOR_KEYS.to_vec(); let mut validator_count: usize = validator_keys.len(); @@ -286,12 +288,19 @@ fn main() -> ExitCode { .hyp_env("CHAINS_TEST2_CUSTOMRPCURLS", "http://127.0.0.1:8545") .hyp_env("CHAINS_TEST3_RPCCONSENSUSTYPE", "quorum") .hyp_env("CHAINS_TEST3_CUSTOMRPCURLS", "http://127.0.0.1:8545") - .hyp_env("CHAINSTOSCRAPE", "test1,test2,test3") .hyp_env("METRICSPORT", SCRAPER_METRICS_PORT) .hyp_env( "DB", "postgresql://postgres:47221c18c610@localhost:5432/postgres", ); + let scraper_env = if config.sealevel_enabled { + scraper_env.hyp_env( + "CHAINSTOSCRAPE", + "test1,test2,test3,sealeveltest1,sealeveltest2", + ) + } else { + scraper_env.hyp_env("CHAINSTOSCRAPE", "test1,test2,test3") + }; let mut state = State::default(); diff --git a/rust/sealevel/environments/local-e2e/chain-config.json b/rust/sealevel/environments/local-e2e/chain-config.json index eadbdf9404..5dd2834a36 100644 --- a/rust/sealevel/environments/local-e2e/chain-config.json +++ b/rust/sealevel/environments/local-e2e/chain-config.json @@ -4,7 +4,7 @@ "name": "sealeveltest1", "rpcUrls": [ { - "http": "http://localhost:8899" + "http": "http://127.0.0.1:8899" } ] }, @@ -13,7 +13,7 @@ "name": "sealeveltest2", "rpcUrls": [ { - "http": "http://localhost:8899" + "http": "http://127.0.0.1:8899" } ] } diff --git a/rust/sealevel/programs/hyperlane-sealevel-token-collateral/src/plugin.rs b/rust/sealevel/programs/hyperlane-sealevel-token-collateral/src/plugin.rs index 0fc224667e..ff8cf8dd7b 100644 --- a/rust/sealevel/programs/hyperlane-sealevel-token-collateral/src/plugin.rs +++ b/rust/sealevel/programs/hyperlane-sealevel-token-collateral/src/plugin.rs @@ -444,7 +444,7 @@ impl HyperlaneSealevelTokenPlugin for CollateralPlugin { vec![ AccountMeta::new_readonly(token.plugin_data.spl_token_program, false).into(), AccountMeta::new_readonly(spl_associated_token_account::id(), false).into(), - AccountMeta::new(token.plugin_data.mint, false).into(), + AccountMeta::new_readonly(token.plugin_data.mint, false).into(), AccountMeta::new(recipient_associated_token_account, false).into(), AccountMeta::new(ata_payer_account_key, false).into(), AccountMeta::new(token.plugin_data.escrow, false).into(), diff --git a/solidity/CHANGELOG.md b/solidity/CHANGELOG.md index c896646514..a0babee028 100644 --- a/solidity/CHANGELOG.md +++ b/solidity/CHANGELOG.md @@ -1,5 +1,11 @@ # @hyperlane-xyz/core +## 5.8.3 + +### Patch Changes + +- @hyperlane-xyz/utils@7.3.0 + ## 5.8.2 ### Patch Changes diff --git a/solidity/contracts/PackageVersioned.sol b/solidity/contracts/PackageVersioned.sol index 19ee043e4e..ced404fe92 100644 --- a/solidity/contracts/PackageVersioned.sol +++ b/solidity/contracts/PackageVersioned.sol @@ -7,5 +7,5 @@ pragma solidity >=0.6.11; **/ abstract contract PackageVersioned { // GENERATED CODE - DO NOT EDIT - string public constant PACKAGE_VERSION = "5.8.2"; + string public constant PACKAGE_VERSION = "5.8.3"; } diff --git a/solidity/package.json b/solidity/package.json index b5c8e68c8a..c2e8d572ac 100644 --- a/solidity/package.json +++ b/solidity/package.json @@ -1,11 +1,11 @@ { "name": "@hyperlane-xyz/core", "description": "Core solidity contracts for Hyperlane", - "version": "5.8.2", + "version": "5.8.3", "dependencies": { "@arbitrum/nitro-contracts": "^1.2.1", "@eth-optimism/contracts": "^0.6.0", - "@hyperlane-xyz/utils": "7.2.0", + "@hyperlane-xyz/utils": "7.3.0", "@layerzerolabs/lz-evm-oapp-v2": "2.0.2", "@openzeppelin/contracts": "^4.9.3", "@openzeppelin/contracts-upgradeable": "^4.9.3", diff --git a/typescript/ccip-server/CHANGELOG.md b/typescript/ccip-server/CHANGELOG.md index 19fb8981b6..a259236246 100644 --- a/typescript/ccip-server/CHANGELOG.md +++ b/typescript/ccip-server/CHANGELOG.md @@ -1,5 +1,7 @@ # @hyperlane-xyz/ccip-server +## 7.3.0 + ## 7.2.0 ## 7.1.0 diff --git a/typescript/ccip-server/package.json b/typescript/ccip-server/package.json index abf2fd2522..0795edf956 100644 --- a/typescript/ccip-server/package.json +++ b/typescript/ccip-server/package.json @@ -1,6 +1,6 @@ { "name": "@hyperlane-xyz/ccip-server", - "version": "7.2.0", + "version": "7.3.0", "description": "CCIP server", "typings": "dist/index.d.ts", "typedocMain": "src/index.ts", diff --git a/typescript/cli/CHANGELOG.md b/typescript/cli/CHANGELOG.md index e56e03eb2b..a7d9962b84 100644 --- a/typescript/cli/CHANGELOG.md +++ b/typescript/cli/CHANGELOG.md @@ -1,5 +1,31 @@ # @hyperlane-xyz/cli +## 7.3.0 + +### Minor Changes + +- aa1ea9a48: updates the warp deployment config schema to be closer to the ica routing schema +- 323f0f158: Add ICAs management in core apply command + +### Patch Changes + +- 455a897fb: Fix a bug where it would try to relay the incorrect message from a transaction that dispatches multiple messages. +- Updated dependencies [2054f4f5b] +- Updated dependencies [a96448fa6] +- Updated dependencies [170a0fc73] +- Updated dependencies [9a09afcc7] +- Updated dependencies [24784af95] +- Updated dependencies [3e8dd70ac] +- Updated dependencies [aa1ea9a48] +- Updated dependencies [665a7b8d8] +- Updated dependencies [f0b98fdef] +- Updated dependencies [ff9e8a72b] +- Updated dependencies [97c1f80b7] +- Updated dependencies [323f0f158] +- Updated dependencies [61157097b] + - @hyperlane-xyz/sdk@7.3.0 + - @hyperlane-xyz/utils@7.3.0 + ## 7.2.0 ### Minor Changes diff --git a/typescript/cli/package.json b/typescript/cli/package.json index 9edfe6504d..608fa3b1b7 100644 --- a/typescript/cli/package.json +++ b/typescript/cli/package.json @@ -1,13 +1,13 @@ { "name": "@hyperlane-xyz/cli", - "version": "7.2.0", + "version": "7.3.0", "description": "A command-line utility for common Hyperlane operations", "dependencies": { "@aws-sdk/client-kms": "^3.577.0", "@aws-sdk/client-s3": "^3.577.0", - "@hyperlane-xyz/registry": "6.1.0", - "@hyperlane-xyz/sdk": "7.2.0", - "@hyperlane-xyz/utils": "7.2.0", + "@hyperlane-xyz/registry": "6.3.0", + "@hyperlane-xyz/sdk": "7.3.0", + "@hyperlane-xyz/utils": "7.3.0", "@inquirer/core": "9.0.10", "@inquirer/figures": "1.0.5", "@inquirer/prompts": "3.3.2", diff --git a/typescript/cli/src/commands/core.ts b/typescript/cli/src/commands/core.ts index 1c42257347..a75f6ae61e 100644 --- a/typescript/cli/src/commands/core.ts +++ b/typescript/cli/src/commands/core.ts @@ -227,7 +227,7 @@ export const check: CommandModuleWithContext<{ }, config: inputFileCommandOption({ defaultPath: DEFAULT_CORE_DEPLOYMENT_CONFIG_PATH, - description: 'The path to a a Core Config JSON or YAML file.', + description: 'The path to a Core Config JSON or YAML file.', demandOption: false, }), }, diff --git a/typescript/cli/src/commands/signCommands.ts b/typescript/cli/src/commands/signCommands.ts index d9fa5391d1..8cfa6d4c1a 100644 --- a/typescript/cli/src/commands/signCommands.ts +++ b/typescript/cli/src/commands/signCommands.ts @@ -32,4 +32,5 @@ export enum CommandType { STATUS = 'status:', SUBMIT = 'submit:', RELAYER = 'relayer:', + CORE_APPLY = 'core:apply', } diff --git a/typescript/cli/src/commands/warp.ts b/typescript/cli/src/commands/warp.ts index f7a90e685a..3cd99fe6a0 100644 --- a/typescript/cli/src/commands/warp.ts +++ b/typescript/cli/src/commands/warp.ts @@ -8,7 +8,6 @@ import { createWarpRouteDeployConfig, readWarpRouteDeployConfig, } from '../config/warp.js'; -import { MultiProtocolSignerManager } from '../context/strategies/signer/MultiProtocolSignerManager.js'; import { CommandModuleWithContext, CommandModuleWithWriteContext, @@ -155,7 +154,6 @@ export const deploy: CommandModuleWithWriteContext<{ export const init: CommandModuleWithContext<{ advanced: boolean; out: string; - multiProtocolSigner?: MultiProtocolSignerManager; }> = { command: 'init', describe: 'Create a warp route configuration.', @@ -167,14 +165,13 @@ export const init: CommandModuleWithContext<{ }, out: outputFileCommandOption(DEFAULT_WARP_ROUTE_DEPLOYMENT_CONFIG_PATH), }, - handler: async ({ context, advanced, out, multiProtocolSigner }) => { + handler: async ({ context, advanced, out }) => { logCommandHeader('Hyperlane Warp Configure'); await createWarpRouteDeployConfig({ context, outPath: out, advanced, - multiProtocolSigner, }); process.exit(0); }, diff --git a/typescript/cli/src/config/warp.ts b/typescript/cli/src/config/warp.ts index cce88ae989..f31069e091 100644 --- a/typescript/cli/src/config/warp.ts +++ b/typescript/cli/src/config/warp.ts @@ -21,7 +21,6 @@ import { promiseObjAll, } from '@hyperlane-xyz/utils'; -import { MultiProtocolSignerManager } from '../context/strategies/signer/MultiProtocolSignerManager.js'; import { CommandContext } from '../context/types.js'; import { errorRed, log, logBlue, logGreen } from '../logger.js'; import { runMultiChainSelectionStep } from '../utils/chains.js'; @@ -116,12 +115,10 @@ export async function createWarpRouteDeployConfig({ context, outPath, advanced = false, - multiProtocolSigner, }: { context: CommandContext; outPath: string; advanced: boolean; - multiProtocolSigner?: MultiProtocolSignerManager; }) { logBlue('Creating a new warp route deployment config...'); diff --git a/typescript/cli/src/context/strategies/chain/ChainResolverFactory.ts b/typescript/cli/src/context/strategies/chain/ChainResolverFactory.ts index fa62038a61..e417ba27b3 100644 --- a/typescript/cli/src/context/strategies/chain/ChainResolverFactory.ts +++ b/typescript/cli/src/context/strategies/chain/ChainResolverFactory.ts @@ -20,6 +20,7 @@ export class ChainResolverFactory { [CommandType.STATUS, () => MultiChainResolver.forOriginDestination()], [CommandType.SUBMIT, () => MultiChainResolver.forStrategyConfig()], [CommandType.RELAYER, () => MultiChainResolver.forRelayer()], + [CommandType.CORE_APPLY, () => MultiChainResolver.forCoreApply()], ]); /** diff --git a/typescript/cli/src/context/strategies/chain/MultiChainResolver.ts b/typescript/cli/src/context/strategies/chain/MultiChainResolver.ts index b61b27a5d8..64f3257520 100644 --- a/typescript/cli/src/context/strategies/chain/MultiChainResolver.ts +++ b/typescript/cli/src/context/strategies/chain/MultiChainResolver.ts @@ -1,7 +1,14 @@ -import { ChainMap, ChainName } from '@hyperlane-xyz/sdk'; +import { + ChainMap, + ChainName, + DeployedCoreAddresses, + DeployedCoreAddressesSchema, + EvmCoreModule, +} from '@hyperlane-xyz/sdk'; import { assert } from '@hyperlane-xyz/utils'; import { DEFAULT_WARP_ROUTE_DEPLOYMENT_CONFIG_PATH } from '../../../commands/options.js'; +import { readCoreDeployConfigs } from '../../../config/core.js'; import { readChainSubmissionStrategyConfig } from '../../../config/strategy.js'; import { log } from '../../../logger.js'; import { @@ -25,6 +32,7 @@ enum ChainSelectionMode { WARP_READ, STRATEGY, RELAYER, + CORE_APPLY, } // This class could be broken down into multiple strategies @@ -48,6 +56,8 @@ export class MultiChainResolver implements ChainResolver { return this.resolveStrategyChains(argv); case ChainSelectionMode.RELAYER: return this.resolveRelayerChains(argv); + case ChainSelectionMode.CORE_APPLY: + return this.resolveCoreApplyChains(argv); case ChainSelectionMode.ORIGIN_DESTINATION: default: return this.resolveOriginDestinationChains(argv); @@ -174,6 +184,41 @@ export class MultiChainResolver implements ChainResolver { return chains; } + private async resolveCoreApplyChains( + argv: Record, + ): Promise { + try { + const config = readCoreDeployConfigs(argv.config); + + if (!config?.interchainAccountRouter) { + return [argv.chain]; + } + + const addresses = await argv.context.registry.getChainAddresses( + argv.chain, + ); + const coreAddresses = DeployedCoreAddressesSchema.parse( + addresses, + ) as DeployedCoreAddresses; + + const evmCoreModule = new EvmCoreModule(argv.context.multiProvider, { + chain: argv.chain, + config, + addresses: coreAddresses, + }); + + const transactions = await evmCoreModule.update(config); + + return Array.from(new Set(transactions.map((tx) => tx.chainId))).map( + (chainId) => argv.context.multiProvider.getChainName(chainId), + ); + } catch (error) { + throw new Error(`Failed to resolve core apply chains`, { + cause: error, + }); + } + } + static forAgentKurtosis(): MultiChainResolver { return new MultiChainResolver(ChainSelectionMode.AGENT_KURTOSIS); } @@ -197,4 +242,8 @@ export class MultiChainResolver implements ChainResolver { static forWarpCoreConfig(): MultiChainResolver { return new MultiChainResolver(ChainSelectionMode.WARP_READ); } + + static forCoreApply(): MultiChainResolver { + return new MultiChainResolver(ChainSelectionMode.CORE_APPLY); + } } diff --git a/typescript/cli/src/context/strategies/signer/MultiProtocolSignerFactory.ts b/typescript/cli/src/context/strategies/signer/MultiProtocolSignerFactory.ts index ab1388cb9e..31c8dbe052 100644 --- a/typescript/cli/src/context/strategies/signer/MultiProtocolSignerFactory.ts +++ b/typescript/cli/src/context/strategies/signer/MultiProtocolSignerFactory.ts @@ -57,6 +57,7 @@ class EthereumSignerStrategy extends BaseMultiProtocolSigner { } } +// 99% overlap with EthereumSignerStrategy for the sake of keeping MultiProtocolSignerFactory clean class ZKSyncSignerStrategy extends BaseMultiProtocolSigner { async getSignerConfig(chain: ChainName): Promise { const submitter = this.config[chain]?.submitter as { diff --git a/typescript/cli/src/deploy/warp.ts b/typescript/cli/src/deploy/warp.ts index 903278782f..b4c72176e0 100644 --- a/typescript/cli/src/deploy/warp.ts +++ b/typescript/cli/src/deploy/warp.ts @@ -2,8 +2,9 @@ import { confirm } from '@inquirer/prompts'; import { groupBy } from 'lodash-es'; import { stringify as yamlStringify } from 'yaml'; +import { ProxyAdmin__factory } from '@hyperlane-xyz/core'; import { buildArtifact as coreBuildArtifact } from '@hyperlane-xyz/core/buildArtifact.js'; -import { ChainAddresses, IRegistry } from '@hyperlane-xyz/registry'; +import { ChainAddresses } from '@hyperlane-xyz/registry'; import { AggregationIsmConfig, AnnotatedEV5Transaction, @@ -15,16 +16,19 @@ import { DestinationGas, EvmERC20WarpModule, EvmERC20WarpRouteReader, + EvmHookModule, EvmIsmModule, ExplorerLicenseType, + HookConfig, HypERC20Deployer, HypERC20Factories, HypERC721Deployer, HypERC721Factories, - HyperlaneAddresses, + HypTokenRouterConfig, HyperlaneContracts, HyperlaneContractsMap, HyperlaneProxyFactoryDeployer, + IsmConfig, IsmType, MultiProvider, MultisigIsmConfig, @@ -46,9 +50,8 @@ import { connectContractsMap, getTokenConnectionId, hypERC20factories, - isCollateralConfig, + isCollateralTokenConfig, isTokenMetadata, - serializeContracts, } from '@hyperlane-xyz/sdk'; import { Address, @@ -181,7 +184,7 @@ async function executeDeploy( const { warpDeployConfig, - context: { registry, multiProvider, isDryRun, dryRunChain }, + context: { multiProvider, isDryRun, dryRunChain }, } = params; const contractVerifier = new ContractVerifier( @@ -205,11 +208,10 @@ async function executeDeploy( ); // For each chain in WarpRouteConfig, deploy each Ism Factory, if it's not in the registry - // Then return a modified config with the ism address as a string - const modifiedConfig = await deployAndResolveWarpIsm( + // Then return a modified config with the ism and/or hook address as a string + const modifiedConfig = await resolveWarpIsmAndHook( config, - multiProvider, - registry, + params.context, ismFactoryDeployer, contractVerifier, ); @@ -231,71 +233,38 @@ async function writeDeploymentArtifacts( log(indentYamlOrJson(yamlStringify(warpCoreConfig, null, 2), 4)); } -async function deployAndResolveWarpIsm( +async function resolveWarpIsmAndHook( warpConfig: WarpRouteDeployConfig, - multiProvider: MultiProvider, - registry: IRegistry, + context: WriteCommandContext, ismFactoryDeployer: HyperlaneProxyFactoryDeployer, contractVerifier?: ContractVerifier, ): Promise { return promiseObjAll( objMap(warpConfig, async (chain, config) => { - if ( - !config.interchainSecurityModule || - typeof config.interchainSecurityModule === 'string' - ) { - logGray( - `Config Ism is ${ - !config.interchainSecurityModule - ? 'empty' - : config.interchainSecurityModule - }, skipping deployment.`, - ); - return config; - } - - logBlue(`Loading registry factory addresses for ${chain}...`); - let chainAddresses = await registry.getChainAddresses(chain); + const chainAddresses = await context.registry.getChainAddresses(chain); if (!chainAddresses) { - logGray( - `Registry factory addresses not found for ${chain}. Deploying...`, - ); - chainAddresses = serializeContracts( - await ismFactoryDeployer.deployContracts(chain), - ) as Record; + throw `Registry factory addresses not found for ${chain}.`; } - logGray( - `Creating ${config.interchainSecurityModule.type} ISM for ${config.type} token on ${chain} chain...`, - ); - - const deployedIsm = await createWarpIsm( + config.interchainSecurityModule = await createWarpIsm({ chain, - warpConfig, - multiProvider, - { - domainRoutingIsmFactory: chainAddresses.domainRoutingIsmFactory, - staticAggregationHookFactory: - chainAddresses.staticAggregationHookFactory, - staticAggregationIsmFactory: - chainAddresses.staticAggregationIsmFactory, - staticMerkleRootMultisigIsmFactory: - chainAddresses.staticMerkleRootMultisigIsmFactory, - staticMessageIdMultisigIsmFactory: - chainAddresses.staticMessageIdMultisigIsmFactory, - staticMerkleRootWeightedMultisigIsmFactory: - chainAddresses.staticMerkleRootWeightedMultisigIsmFactory, - staticMessageIdWeightedMultisigIsmFactory: - chainAddresses.staticMessageIdWeightedMultisigIsmFactory, - }, + chainAddresses, + context, contractVerifier, - ); + ismFactoryDeployer, + warpConfig: config, + }); // TODO write test - logGreen( - `Finished creating ${config.interchainSecurityModule.type} ISM for ${config.type} token on ${chain} chain.`, - ); - return { ...warpConfig[chain], interchainSecurityModule: deployedIsm }; + config.hook = await createWarpHook({ + chain, + chainAddresses, + context, + contractVerifier, + ismFactoryDeployer, + warpConfig: config, + }); + return config; }), ); } @@ -305,14 +274,45 @@ async function deployAndResolveWarpIsm( * * @returns The deployed ism address */ -async function createWarpIsm( - chain: string, - warpConfig: WarpRouteDeployConfig, - multiProvider: MultiProvider, - factoryAddresses: HyperlaneAddresses, - contractVerifier?: ContractVerifier, -): Promise { +async function createWarpIsm({ + chain, + chainAddresses, + context, + contractVerifier, + warpConfig, +}: { + chain: string; + chainAddresses: Record; + context: WriteCommandContext; + contractVerifier?: ContractVerifier; + warpConfig: HypTokenRouterConfig; + ismFactoryDeployer: HyperlaneProxyFactoryDeployer; +}): Promise { + const { interchainSecurityModule } = warpConfig; + if ( + !interchainSecurityModule || + typeof interchainSecurityModule === 'string' + ) { + logGray( + `Config Ism is ${ + !interchainSecurityModule ? 'empty' : interchainSecurityModule + }, skipping deployment.`, + ); + return interchainSecurityModule; + } + + logBlue(`Loading registry factory addresses for ${chain}...`); + + logGray( + `Creating ${interchainSecurityModule.type} ISM for token on ${chain} chain...`, + ); + + logGreen( + `Finished creating ${interchainSecurityModule.type} ISM for token on ${chain} chain.`, + ); + const { + mailbox, domainRoutingIsmFactory, staticAggregationHookFactory, staticAggregationIsmFactory, @@ -320,11 +320,11 @@ async function createWarpIsm( staticMessageIdMultisigIsmFactory, staticMerkleRootWeightedMultisigIsmFactory, staticMessageIdWeightedMultisigIsmFactory, - } = factoryAddresses; + } = chainAddresses; const evmIsmModule = await EvmIsmModule.create({ chain, - multiProvider, - mailbox: warpConfig[chain].mailbox, + mailbox, + multiProvider: context.multiProvider, proxyFactoryFactories: { domainRoutingIsmFactory, staticAggregationHookFactory, @@ -334,13 +334,85 @@ async function createWarpIsm( staticMerkleRootWeightedMultisigIsmFactory, staticMessageIdWeightedMultisigIsmFactory, }, - config: warpConfig[chain].interchainSecurityModule!, + config: interchainSecurityModule, contractVerifier, }); const { deployedIsm } = evmIsmModule.serialize(); return deployedIsm; } +async function createWarpHook({ + chain, + chainAddresses, + context, + contractVerifier, + warpConfig, +}: { + chain: string; + chainAddresses: Record; + context: WriteCommandContext; + contractVerifier?: ContractVerifier; + warpConfig: HypTokenRouterConfig; + ismFactoryDeployer: HyperlaneProxyFactoryDeployer; +}): Promise { + const { hook } = warpConfig; + + if (!hook || typeof hook === 'string') { + logGray(`Config Hook is ${!hook ? 'empty' : hook}, skipping deployment.`); + return hook; + } + + logBlue(`Loading registry factory addresses for ${chain}...`); + + logGray(`Creating ${hook.type} Hook for token on ${chain} chain...`); + + const { + mailbox, + domainRoutingIsmFactory, + staticAggregationHookFactory, + staticAggregationIsmFactory, + staticMerkleRootMultisigIsmFactory, + staticMessageIdMultisigIsmFactory, + staticMerkleRootWeightedMultisigIsmFactory, + staticMessageIdWeightedMultisigIsmFactory, + } = chainAddresses; + const proxyFactoryFactories = { + domainRoutingIsmFactory, + staticAggregationHookFactory, + staticAggregationIsmFactory, + staticMerkleRootMultisigIsmFactory, + staticMessageIdMultisigIsmFactory, + staticMerkleRootWeightedMultisigIsmFactory, + staticMessageIdWeightedMultisigIsmFactory, + }; + + // If config.proxyadmin.address exists, then use that. otherwise deploy a new proxyAdmin + const proxyAdminAddress: Address = + warpConfig.proxyAdmin?.address ?? + ( + await context.multiProvider.handleDeploy( + chain, + new ProxyAdmin__factory(), + [], + ) + ).address; + + const evmHookModule = await EvmHookModule.create({ + chain, + multiProvider: context.multiProvider, + coreAddresses: { + mailbox, + proxyAdmin: proxyAdminAddress, + }, + config: hook, + contractVerifier, + proxyFactoryFactories, + }); + logGreen(`Finished creating ${hook.type} Hook for token on ${chain} chain.`); + const { deployedHook } = evmHookModule.serialize(); + return deployedHook; +} + async function getWarpCoreConfig( { warpDeployConfig, context }: DeployParams, contracts: HyperlaneContractsMap, @@ -386,7 +458,7 @@ function generateTokenConfigs( ): void { for (const [chainName, contract] of Object.entries(contracts)) { const config = warpDeployConfig[chainName]; - const collateralAddressOrDenom = isCollateralConfig(config) + const collateralAddressOrDenom = isCollateralTokenConfig(config) ? config.token // gets set in the above deriveTokenMetadata() : undefined; @@ -806,7 +878,7 @@ function displayWarpDeployPlan(deployConfig: WarpRouteDeployConfig) { } /* only used for transformIsmForDisplay type-sense */ -type IsmConfig = +type IsmDisplayConfig = | RoutingIsmConfig // type, owner, ownerOverrides, domain | AggregationIsmConfig // type, modules, threshold | MultisigIsmConfig // type, validators, threshold @@ -819,7 +891,7 @@ function transformDeployConfigForDisplay(deployConfig: WarpRouteDeployConfig) { const transformedDeployConfig = objMap(deployConfig, (chain, config) => { if (config.interchainSecurityModule) transformedIsmConfigs[chain] = transformIsmConfigForDisplay( - config.interchainSecurityModule as IsmConfig, + config.interchainSecurityModule as IsmDisplayConfig, ); return { @@ -839,7 +911,7 @@ function transformDeployConfigForDisplay(deployConfig: WarpRouteDeployConfig) { }; } -function transformIsmConfigForDisplay(ismConfig: IsmConfig): any[] { +function transformIsmConfigForDisplay(ismConfig: IsmDisplayConfig): any[] { const ismConfigs: any[] = []; switch (ismConfig.type) { case IsmType.AGGREGATION: @@ -849,7 +921,9 @@ function transformIsmConfigForDisplay(ismConfig: IsmConfig): any[] { Modules: 'See table(s) below.', }); ismConfig.modules.forEach((module) => { - ismConfigs.push(...transformIsmConfigForDisplay(module as IsmConfig)); + ismConfigs.push( + ...transformIsmConfigForDisplay(module as IsmDisplayConfig), + ); }); return ismConfigs; case IsmType.ROUTING: diff --git a/typescript/cli/src/send/message.ts b/typescript/cli/src/send/message.ts index 430d3b7bcf..f7d5eb4e15 100644 --- a/typescript/cli/src/send/message.ts +++ b/typescript/cli/src/send/message.ts @@ -97,7 +97,7 @@ async function executeDelivery({ destination, formattedRecipient, messageBody, - // override the the default hook (with IGP) for self-relay to avoid race condition with the production relayer + // override the default hook (with IGP) for self-relay to avoid race condition with the production relayer selfRelay ? chainAddresses[origin].merkleTreeHook : undefined, ); logBlue(`Sent message from ${origin} to ${recipient} on ${destination}.`); diff --git a/typescript/cli/src/tests/commands/helpers.ts b/typescript/cli/src/tests/commands/helpers.ts index 6497cb4d98..7d21425886 100644 --- a/typescript/cli/src/tests/commands/helpers.ts +++ b/typescript/cli/src/tests/commands/helpers.ts @@ -4,7 +4,7 @@ import { $ } from 'zx'; import { ERC20Test__factory, ERC4626Test__factory } from '@hyperlane-xyz/core'; import { ChainAddresses } from '@hyperlane-xyz/registry'; import { - TokenRouterConfig, + HypTokenRouterConfig, WarpCoreConfig, WarpCoreConfigSchema, } from '@hyperlane-xyz/sdk'; @@ -114,7 +114,7 @@ export async function updateOwner( export async function extendWarpConfig(params: { chain: string; chainToExtend: string; - extendedConfig: TokenRouterConfig; + extendedConfig: HypTokenRouterConfig; warpCorePath: string; warpDeployPath: string; strategyUrl?: string; diff --git a/typescript/cli/src/tests/warp-apply.e2e-test.ts b/typescript/cli/src/tests/warp-apply.e2e-test.ts index 48174c09bd..b5f9bab268 100644 --- a/typescript/cli/src/tests/warp-apply.e2e-test.ts +++ b/typescript/cli/src/tests/warp-apply.e2e-test.ts @@ -4,7 +4,7 @@ import { Wallet } from 'ethers'; import { ChainAddresses } from '@hyperlane-xyz/registry'; import { HookType, - TokenRouterConfig, + HypTokenRouterConfig, TokenType, WarpRouteDeployConfig, normalizeConfig, @@ -144,7 +144,7 @@ describe('hyperlane warp apply e2e tests', async function () { await readWarpConfig(CHAIN_NAME_2, WARP_CORE_CONFIG_PATH_2, warpConfigPath); // Extend with new config - const config: TokenRouterConfig = { + const config: HypTokenRouterConfig = { decimals: 18, mailbox: chain2Addresses!.mailbox, name: 'Ether', @@ -197,7 +197,7 @@ describe('hyperlane warp apply e2e tests', async function () { await readWarpConfig(CHAIN_NAME_2, WARP_CORE_CONFIG_PATH_2, warpConfigPath); // Extend with new config - const config: TokenRouterConfig = { + const config: HypTokenRouterConfig = { decimals: 18, mailbox: chain2Addresses!.mailbox, name: 'Ether', @@ -257,7 +257,7 @@ describe('hyperlane warp apply e2e tests', async function () { // Extend with new config const randomOwner = new Wallet(ANVIL_KEY).address; - const extendedConfig: TokenRouterConfig = { + const extendedConfig: HypTokenRouterConfig = { decimals: 18, mailbox: chain2Addresses!.mailbox, name: 'Ether', @@ -317,7 +317,7 @@ describe('hyperlane warp apply e2e tests', async function () { // Extend with new config const GAS = 694200; - const extendedConfig: TokenRouterConfig = { + const extendedConfig: HypTokenRouterConfig = { decimals: 18, mailbox: chain2Addresses!.mailbox, name: 'Ether', diff --git a/typescript/cli/src/tests/warp-deploy.e2e-test.ts b/typescript/cli/src/tests/warp-deploy.e2e-test.ts index 7959126a98..d80508eb6a 100644 --- a/typescript/cli/src/tests/warp-deploy.e2e-test.ts +++ b/typescript/cli/src/tests/warp-deploy.e2e-test.ts @@ -2,7 +2,15 @@ import * as chai from 'chai'; import chaiAsPromised from 'chai-as-promised'; import { ChainAddresses } from '@hyperlane-xyz/registry'; -import { TokenType, WarpRouteDeployConfig } from '@hyperlane-xyz/sdk'; +import { + HookConfig, + HookType, + IsmConfig, + IsmType, + TokenType, + WarpRouteDeployConfig, + normalizeConfig, +} from '@hyperlane-xyz/sdk'; import { WarpSendLogs } from '../send/transfer.js'; import { writeYamlOrJson } from '../utils/files.js'; @@ -106,4 +114,88 @@ describe('hyperlane warp deploy e2e tests', async function () { ); expect(stdout).to.include(WarpSendLogs.SUCCESS); }); + + it('should deploy with an ISM config', async () => { + // 1. Define ISM configuration + const ism: IsmConfig = { + type: IsmType.MESSAGE_ID_MULTISIG, + validators: [chain2Addresses.mailbox], // Using mailbox address as example validator + threshold: 1, + }; + + // 2. Create Warp configuration with ISM + const warpConfig: WarpRouteDeployConfig = { + [CHAIN_NAME_2]: { + type: TokenType.collateralVaultRebase, + token: vault.address, + mailbox: chain2Addresses.mailbox, + owner: chain2Addresses.mailbox, + interchainSecurityModule: ism, // Add ISM config here + }, + [CHAIN_NAME_3]: { + type: TokenType.syntheticRebase, + mailbox: chain3Addresses.mailbox, + owner: chain3Addresses.mailbox, + collateralChainName: CHAIN_NAME_2, + }, + }; + + // 3. Write config and deploy + writeYamlOrJson(WARP_CONFIG_PATH, warpConfig); + await hyperlaneWarpDeploy(WARP_CONFIG_PATH); + + // 4. Verify deployed ISM configuration + const collateralRebaseConfig = ( + await readWarpConfig( + CHAIN_NAME_2, + WARP_CORE_CONFIG_PATH_2_3, + WARP_CONFIG_PATH, + ) + )[CHAIN_NAME_2]; + + expect( + normalizeConfig(collateralRebaseConfig.interchainSecurityModule), + ).to.deep.equal(normalizeConfig(ism)); + }); + + it('should deploy with a hook config', async () => { + const hook: HookConfig = { + type: HookType.PROTOCOL_FEE, + beneficiary: chain2Addresses.mailbox, + owner: chain2Addresses.mailbox, + maxProtocolFee: '1337', + protocolFee: '1337', + }; + const warpConfig: WarpRouteDeployConfig = { + [CHAIN_NAME_2]: { + type: TokenType.collateralVaultRebase, + token: vault.address, + mailbox: chain2Addresses.mailbox, + owner: chain2Addresses.mailbox, + hook, + }, + [CHAIN_NAME_3]: { + type: TokenType.syntheticRebase, + mailbox: chain3Addresses.mailbox, + owner: chain3Addresses.mailbox, + collateralChainName: CHAIN_NAME_2, + }, + }; + + writeYamlOrJson(WARP_CONFIG_PATH, warpConfig); + await hyperlaneWarpDeploy(WARP_CONFIG_PATH); + + // Check collateralRebase + const collateralRebaseConfig = ( + await readWarpConfig( + CHAIN_NAME_2, + WARP_CORE_CONFIG_PATH_2_3, + WARP_CONFIG_PATH, + ) + )[CHAIN_NAME_2]; + + expect(normalizeConfig(collateralRebaseConfig.hook)).to.deep.equal( + normalizeConfig(hook), + ); + }); }); diff --git a/typescript/cli/src/version.ts b/typescript/cli/src/version.ts index 4d429cc34d..af959132f7 100644 --- a/typescript/cli/src/version.ts +++ b/typescript/cli/src/version.ts @@ -1 +1 @@ -export const VERSION = '7.2.0'; +export const VERSION = '7.3.0'; diff --git a/typescript/github-proxy/CHANGELOG.md b/typescript/github-proxy/CHANGELOG.md index 4bf7cd4056..a5237280ae 100644 --- a/typescript/github-proxy/CHANGELOG.md +++ b/typescript/github-proxy/CHANGELOG.md @@ -1,5 +1,7 @@ # @hyperlane-xyz/github-proxy +## 7.3.0 + ## 7.2.0 ## 7.1.0 diff --git a/typescript/github-proxy/package.json b/typescript/github-proxy/package.json index f25270af33..848f3dcafc 100644 --- a/typescript/github-proxy/package.json +++ b/typescript/github-proxy/package.json @@ -1,7 +1,7 @@ { "name": "@hyperlane-xyz/github-proxy", "description": "Github proxy that adds the API key to requests", - "version": "7.2.0", + "version": "7.3.0", "private": true, "scripts": { "deploy": "wrangler deploy", diff --git a/typescript/helloworld/CHANGELOG.md b/typescript/helloworld/CHANGELOG.md index 4ff380704f..89cedf4d32 100644 --- a/typescript/helloworld/CHANGELOG.md +++ b/typescript/helloworld/CHANGELOG.md @@ -1,5 +1,25 @@ # @hyperlane-xyz/helloworld +## 7.3.0 + +### Patch Changes + +- Updated dependencies [2054f4f5b] +- Updated dependencies [a96448fa6] +- Updated dependencies [170a0fc73] +- Updated dependencies [9a09afcc7] +- Updated dependencies [24784af95] +- Updated dependencies [3e8dd70ac] +- Updated dependencies [aa1ea9a48] +- Updated dependencies [665a7b8d8] +- Updated dependencies [f0b98fdef] +- Updated dependencies [ff9e8a72b] +- Updated dependencies [97c1f80b7] +- Updated dependencies [323f0f158] +- Updated dependencies [61157097b] + - @hyperlane-xyz/sdk@7.3.0 + - @hyperlane-xyz/core@5.8.3 + ## 7.2.0 ### Patch Changes diff --git a/typescript/helloworld/package.json b/typescript/helloworld/package.json index 027782383a..a7fdc9bb28 100644 --- a/typescript/helloworld/package.json +++ b/typescript/helloworld/package.json @@ -1,11 +1,11 @@ { "name": "@hyperlane-xyz/helloworld", "description": "A basic skeleton of an Hyperlane app", - "version": "7.2.0", + "version": "7.3.0", "dependencies": { - "@hyperlane-xyz/core": "5.8.2", - "@hyperlane-xyz/registry": "6.1.0", - "@hyperlane-xyz/sdk": "7.2.0", + "@hyperlane-xyz/core": "5.8.3", + "@hyperlane-xyz/registry": "6.3.0", + "@hyperlane-xyz/sdk": "7.3.0", "@openzeppelin/contracts-upgradeable": "^4.9.3", "ethers": "^5.7.2" }, diff --git a/typescript/infra/CHANGELOG.md b/typescript/infra/CHANGELOG.md index 67f5a826cc..1e8ec17676 100644 --- a/typescript/infra/CHANGELOG.md +++ b/typescript/infra/CHANGELOG.md @@ -1,5 +1,31 @@ # @hyperlane-xyz/infra +## 7.3.0 + +### Minor Changes + +- 1ca857451: add USDC, USDT, cbBTC and ETH zeronetwork warp routes support in infra +- 323f0f158: Add ICAs management in core apply command + +### Patch Changes + +- Updated dependencies [2054f4f5b] +- Updated dependencies [a96448fa6] +- Updated dependencies [170a0fc73] +- Updated dependencies [9a09afcc7] +- Updated dependencies [24784af95] +- Updated dependencies [3e8dd70ac] +- Updated dependencies [aa1ea9a48] +- Updated dependencies [665a7b8d8] +- Updated dependencies [f0b98fdef] +- Updated dependencies [ff9e8a72b] +- Updated dependencies [97c1f80b7] +- Updated dependencies [323f0f158] +- Updated dependencies [61157097b] + - @hyperlane-xyz/sdk@7.3.0 + - @hyperlane-xyz/helloworld@7.3.0 + - @hyperlane-xyz/utils@7.3.0 + ## 7.2.0 ### Patch Changes diff --git a/typescript/infra/config/environments/mainnet3/agent.ts b/typescript/infra/config/environments/mainnet3/agent.ts index 07a47580b3..9fa5ede3c2 100644 --- a/typescript/infra/config/environments/mainnet3/agent.ts +++ b/typescript/infra/config/environments/mainnet3/agent.ts @@ -54,6 +54,7 @@ export const hyperlaneContextAgentChainConfig: AgentChainConfig< ancient8: true, alephzeroevmmainnet: true, apechain: true, + appchain: true, arbitrum: true, arbitrumnova: true, astar: true, @@ -134,6 +135,7 @@ export const hyperlaneContextAgentChainConfig: AgentChainConfig< swell: true, taiko: true, tangle: true, + treasure: true, unichain: true, vana: true, viction: true, @@ -143,6 +145,7 @@ export const hyperlaneContextAgentChainConfig: AgentChainConfig< zeronetwork: true, zetachain: true, zircuit: true, + zklink: true, zksync: true, zoramainnet: true, }, @@ -150,6 +153,7 @@ export const hyperlaneContextAgentChainConfig: AgentChainConfig< ancient8: true, alephzeroevmmainnet: true, apechain: true, + appchain: true, arbitrum: true, arbitrumnova: true, astar: true, @@ -231,6 +235,7 @@ export const hyperlaneContextAgentChainConfig: AgentChainConfig< swell: true, taiko: true, tangle: true, + treasure: true, unichain: true, vana: true, viction: true, @@ -240,6 +245,7 @@ export const hyperlaneContextAgentChainConfig: AgentChainConfig< zeronetwork: true, zetachain: true, zircuit: true, + zklink: true, zksync: true, zoramainnet: true, }, @@ -247,6 +253,7 @@ export const hyperlaneContextAgentChainConfig: AgentChainConfig< ancient8: true, alephzeroevmmainnet: true, apechain: true, + appchain: true, arbitrum: true, arbitrumnova: true, astar: true, @@ -269,7 +276,7 @@ export const hyperlaneContextAgentChainConfig: AgentChainConfig< degenchain: true, dogechain: true, duckchain: true, - // Cannot scrape Sealevel chains + // Disabled until we get archival RPC for Eclipse eclipsemainnet: false, endurance: true, ethereum: true, @@ -321,14 +328,14 @@ export const hyperlaneContextAgentChainConfig: AgentChainConfig< sei: true, shibarium: true, snaxchain: true, - // Cannot scrape Sealevel chains - solanamainnet: false, + solanamainnet: true, stride: true, superseed: true, superpositionmainnet: true, swell: true, taiko: true, tangle: true, + treasure: true, unichain: true, vana: true, // Has RPC non-compliance that breaks scraping. @@ -339,6 +346,7 @@ export const hyperlaneContextAgentChainConfig: AgentChainConfig< zeronetwork: true, zetachain: true, zircuit: true, + zklink: true, zksync: true, zoramainnet: true, }, @@ -433,7 +441,7 @@ const metricAppContextsGetter = (): MetricAppContext[] => { const relayerResources = { requests: { cpu: '14000m', - memory: '12Gi', + memory: '15Gi', }, }; @@ -460,7 +468,7 @@ const hyperlane: RootAgentConfig = { rpcConsensusType: RpcConsensusType.Fallback, docker: { repo, - tag: 'd0e53f5-20241203-171412', + tag: 'a7f3967-20241205-163733', }, gasPaymentEnforcement: gasPaymentEnforcement, metricAppContextsGetter, @@ -469,7 +477,7 @@ const hyperlane: RootAgentConfig = { validators: { docker: { repo, - tag: 'b35c105-20241128-172842', + tag: 'a7f3967-20241205-163733', }, rpcConsensusType: RpcConsensusType.Quorum, chains: validatorChainConfig(Contexts.Hyperlane), @@ -479,7 +487,7 @@ const hyperlane: RootAgentConfig = { rpcConsensusType: RpcConsensusType.Fallback, docker: { repo, - tag: 'ae2c3a8-20241203-123123', + tag: '4b280cd-20241206-130519', }, resources: scraperResources, }, @@ -494,7 +502,7 @@ const releaseCandidate: RootAgentConfig = { rpcConsensusType: RpcConsensusType.Fallback, docker: { repo, - tag: 'd0e53f5-20241203-171412', + tag: '4cb2c9a-20241205-142854', }, // We're temporarily (ab)using the RC relayer as a way to increase // message throughput. diff --git a/typescript/infra/config/environments/mainnet3/aw-validators/hyperlane.json b/typescript/infra/config/environments/mainnet3/aw-validators/hyperlane.json index 5c03ab386e..9e39d900ce 100644 --- a/typescript/infra/config/environments/mainnet3/aw-validators/hyperlane.json +++ b/typescript/infra/config/environments/mainnet3/aw-validators/hyperlane.json @@ -8,6 +8,9 @@ "apechain": { "validators": ["0x773d7fe6ffb1ba4de814c28044ff9a2d83a48221"] }, + "appchain": { + "validators": ["0x0531251bbadc1f9f19ccce3ca6b3f79f08eae1be"] + }, "arbitrum": { "validators": [ "0x4d966438fe9e2b1e7124c87bbb90cb4f0f6c59a1", @@ -305,6 +308,9 @@ "tangle": { "validators": ["0x1ee52cbbfacd7dcb0ba4e91efaa6fbc61602b15b"] }, + "treasure": { + "validators": ["0x6ad994819185553e8baa01533f0cd2c7cadfe6cc"] + }, "unichain": { "validators": ["0x9773a382342ebf604a2e5de0a1f462fb499e28b1"] }, @@ -332,6 +338,9 @@ "zircuit": { "validators": ["0x169ec400cc758fef3df6a0d6c51fbc6cdd1015bb"] }, + "zklink": { + "validators": ["0x217a8cb4789fc45abf56cb6e2ca96f251a5ac181"] + }, "zksync": { "validators": ["0xadd1d39ce7a687e32255ac457cf99a6d8c5b5d1a"] }, diff --git a/typescript/infra/config/environments/mainnet3/chains.ts b/typescript/infra/config/environments/mainnet3/chains.ts index 66d12a8937..f0d7f66400 100644 --- a/typescript/infra/config/environments/mainnet3/chains.ts +++ b/typescript/infra/config/environments/mainnet3/chains.ts @@ -65,6 +65,16 @@ export const chainMetadataOverrides: ChainMap> = { // maxFeePerGas: 100000 * 10 ** 9, // 100,000 gwei // }, // }, + // taiko: { + // transactionOverrides: { + // gasPrice: 25 * 10 ** 7, // 0.25 gwei + // }, + // }, + // linea: { + // transactionOverrides: { + // gasPrice: 5 * 10 ** 8, // 0.5 gwei + // }, + // }, // zircuit: { // blocks: { // confirmations: 3, diff --git a/typescript/infra/config/environments/mainnet3/core/verification.json b/typescript/infra/config/environments/mainnet3/core/verification.json index 8801ccea99..44f999186b 100644 --- a/typescript/infra/config/environments/mainnet3/core/verification.json +++ b/typescript/infra/config/environments/mainnet3/core/verification.json @@ -5936,5 +5936,191 @@ "constructorArguments": "0000000000000000000000003a464f746d23ab22155710f44db16dca53e0775e", "isProxy": false } + ], + "zklink": [ + { + "name": "ProxyAdmin", + "address": "0x038F9F4e93e88Af2C688da265222FdE80e455aA4", + "constructorArguments": "", + "isProxy": false + }, + { + "name": "Mailbox", + "address": "0xA3949b37109d64b10De93252EeFebBB2E6B8944F", + "constructorArguments": "00000000000000000000000000000000000000000000000000000000000c5cc4", + "isProxy": false + }, + { + "name": "TransparentUpgradeableProxy", + "address": "0x9BbDf86b272d224323136E15594fdCe487F40ce7", + "constructorArguments": "000000000000000000000000a3949b37109d64b10de93252eefebbb2e6b8944f000000000000000000000000038f9f4e93e88af2c688da265222fde80e455aa400000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000", + "isProxy": true, + "expectedimplementation": "0xA3949b37109d64b10De93252EeFebBB2E6B8944F" + }, + { + "name": "MerkleTreeHook", + "address": "0xA1ADFCa9666Bcd68b7b5C8b55e3ecC465DcDfE65", + "constructorArguments": "0000000000000000000000009bbdf86b272d224323136e15594fdce487f40ce7", + "isProxy": false + }, + { + "name": "FallbackDomainRoutingHook", + "address": "0x388289cd5862e17AAfD6ffF7F46A9Ec48a969bCd", + "constructorArguments": "0000000000000000000000009bbdf86b272d224323136e15594fdce487f40ce7000000000000000000000000a7eccdb9be08178f896c26b7bbd8c3d4e844d9ba000000000000000000000000a1adfca9666bcd68b7b5c8b55e3ecc465dcdfe65", + "isProxy": false + }, + { + "name": "StorageGasOracle", + "address": "0x73a82061Cd258d02BEa145fe183120456e718c2A", + "constructorArguments": "", + "isProxy": false + }, + { + "name": "InterchainGasPaymaster", + "address": "0x54E88f2ab58E0Ab4B7Ce081FB20D85b16af041d2", + "constructorArguments": "", + "isProxy": false + }, + { + "name": "TransparentUpgradeableProxy", + "address": "0xB35eCb9714e8f48332Af22B48C18ca21E2607438", + "constructorArguments": "00000000000000000000000054e88f2ab58e0ab4b7ce081fb20d85b16af041d2000000000000000000000000038f9f4e93e88af2c688da265222fde80e455aa400000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044485cc955000000000000000000000000a7eccdb9be08178f896c26b7bbd8c3d4e844d9ba000000000000000000000000a7eccdb9be08178f896c26b7bbd8c3d4e844d9ba00000000000000000000000000000000000000000000000000000000", + "isProxy": true, + "expectedimplementation": "0x54E88f2ab58E0Ab4B7Ce081FB20D85b16af041d2" + }, + { + "name": "ValidatorAnnounce", + "address": "0xf5626c0f33Ca102eb3ca1633A410cd8aa92909e4", + "constructorArguments": "0000000000000000000000009bbdf86b272d224323136e15594fdce487f40ce7", + "isProxy": false + } + ], + "appchain": [ + { + "name": "ProxyAdmin", + "address": "0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7", + "constructorArguments": "", + "isProxy": false + }, + { + "name": "Mailbox", + "address": "0xeA87ae93Fa0019a82A727bfd3eBd1cFCa8f64f1D", + "constructorArguments": "00000000000000000000000000000000000000000000000000000000000001d2", + "isProxy": false + }, + { + "name": "TransparentUpgradeableProxy", + "address": "0x3a464f746D23Ab22155710f44dB16dcA53e0775E", + "constructorArguments": "000000000000000000000000ea87ae93fa0019a82a727bfd3ebd1cfca8f64f1d0000000000000000000000002f2afae1139ce54fefc03593fee8ab2adf4a85a700000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000", + "isProxy": true, + "expectedimplementation": "0xeA87ae93Fa0019a82A727bfd3eBd1cFCa8f64f1D" + }, + { + "name": "MerkleTreeHook", + "address": "0xcd90D49b046772F710250b9119117169CB2e4D8b", + "constructorArguments": "0000000000000000000000003a464f746d23ab22155710f44db16dca53e0775e", + "isProxy": false + }, + { + "name": "FallbackRoutingHook", + "address": "0xfF26696DcDb6BbFD27e959b847D4f1399D5BcF64", + "constructorArguments": "0000000000000000000000003a464f746d23ab22155710f44db16dca53e0775e000000000000000000000000a7eccdb9be08178f896c26b7bbd8c3d4e844d9ba000000000000000000000000cd90d49b046772f710250b9119117169cb2e4d8b", + "isProxy": false + }, + { + "name": "PausableHook", + "address": "0x7CE76f5f0C469bBB4cd7Ea6EbabB54437A093127", + "constructorArguments": "", + "isProxy": false + }, + { + "name": "StorageGasOracle", + "address": "0xA376b27212D608324808923Add679A2c9FAFe9Da", + "constructorArguments": "", + "isProxy": false + }, + { + "name": "InterchainGasPaymaster", + "address": "0xBC53dACd8c0ac0d2bAC461479EAaf5519eCC8853", + "constructorArguments": "", + "isProxy": false + }, + { + "name": "TransparentUpgradeableProxy", + "address": "0x28291a7062afA569104bEd52F7AcCA3dD2FafD11", + "constructorArguments": "000000000000000000000000bc53dacd8c0ac0d2bac461479eaaf5519ecc88530000000000000000000000002f2afae1139ce54fefc03593fee8ab2adf4a85a700000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044485cc955000000000000000000000000a7eccdb9be08178f896c26b7bbd8c3d4e844d9ba000000000000000000000000a7eccdb9be08178f896c26b7bbd8c3d4e844d9ba00000000000000000000000000000000000000000000000000000000", + "isProxy": true, + "expectedimplementation": "0xBC53dACd8c0ac0d2bAC461479EAaf5519eCC8853" + }, + { + "name": "ProtocolFee", + "address": "0xD35Aa652C1F808d3f87DA3DC7974fea888D7d625", + "constructorArguments": "000000000000000000000000000000000000000000000000000000003b9aca000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a7eccdb9be08178f896c26b7bbd8c3d4e844d9ba000000000000000000000000a7eccdb9be08178f896c26b7bbd8c3d4e844d9ba", + "isProxy": false + }, + { + "name": "ValidatorAnnounce", + "address": "0x1196055C61af3e3DA6f8458B07b255a72b64Bcf7", + "constructorArguments": "0000000000000000000000003a464f746d23ab22155710f44db16dca53e0775e", + "isProxy": false + } + ], + "treasure": [ + { + "name": "ProxyAdmin", + "address": "0x038F9F4e93e88Af2C688da265222FdE80e455aA4", + "constructorArguments": "", + "isProxy": false + }, + { + "name": "Mailbox", + "address": "0xA3949b37109d64b10De93252EeFebBB2E6B8944F", + "constructorArguments": "000000000000000000000000000000000000000000000000000000000000eeee", + "isProxy": false + }, + { + "name": "TransparentUpgradeableProxy", + "address": "0x9BbDf86b272d224323136E15594fdCe487F40ce7", + "constructorArguments": "000000000000000000000000a3949b37109d64b10de93252eefebbb2e6b8944f000000000000000000000000038f9f4e93e88af2c688da265222fde80e455aa400000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000", + "isProxy": true, + "expectedimplementation": "0xA3949b37109d64b10De93252EeFebBB2E6B8944F" + }, + { + "name": "MerkleTreeHook", + "address": "0xc1FC99Ea4D8B2b06b674A2e91b5A4617c1dcFd22", + "constructorArguments": "0000000000000000000000009bbdf86b272d224323136e15594fdce487f40ce7", + "isProxy": false + }, + { + "name": "FallbackDomainRoutingHook", + "address": "0x697a90753B7dCf6512189c239E612fC12baaE500", + "constructorArguments": "0000000000000000000000009bbdf86b272d224323136e15594fdce487f40ce7000000000000000000000000a7eccdb9be08178f896c26b7bbd8c3d4e844d9ba000000000000000000000000c1fc99ea4d8b2b06b674a2e91b5a4617c1dcfd22", + "isProxy": false + }, + { + "name": "StorageGasOracle", + "address": "0xc364cfedefE854c1275B0f4088EaFA9695e1FC56", + "constructorArguments": "", + "isProxy": false + }, + { + "name": "InterchainGasPaymaster", + "address": "0xA1ADFCa9666Bcd68b7b5C8b55e3ecC465DcDfE65", + "constructorArguments": "", + "isProxy": false + }, + { + "name": "TransparentUpgradeableProxy", + "address": "0x388289cd5862e17AAfD6ffF7F46A9Ec48a969bCd", + "constructorArguments": "000000000000000000000000a1adfca9666bcd68b7b5c8b55e3ecc465dcdfe65000000000000000000000000038f9f4e93e88af2c688da265222fde80e455aa400000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044485cc955000000000000000000000000a7eccdb9be08178f896c26b7bbd8c3d4e844d9ba000000000000000000000000a7eccdb9be08178f896c26b7bbd8c3d4e844d9ba00000000000000000000000000000000000000000000000000000000", + "isProxy": true, + "expectedimplementation": "0xA1ADFCa9666Bcd68b7b5C8b55e3ecC465DcDfE65" + }, + { + "name": "ValidatorAnnounce", + "address": "0x73a82061Cd258d02BEa145fe183120456e718c2A", + "constructorArguments": "0000000000000000000000009bbdf86b272d224323136e15594fdce487f40ce7", + "isProxy": false + } ] } diff --git a/typescript/infra/config/environments/mainnet3/funding.ts b/typescript/infra/config/environments/mainnet3/funding.ts index 75cc596167..74f624ed72 100644 --- a/typescript/infra/config/environments/mainnet3/funding.ts +++ b/typescript/infra/config/environments/mainnet3/funding.ts @@ -10,7 +10,7 @@ export const keyFunderConfig: KeyFunderConfig< > = { docker: { repo: 'gcr.io/abacus-labs-dev/hyperlane-monorepo', - tag: 'c96c2fc-20241202-121319', + tag: 'a7f3967-20241205-163749', }, // We're currently using the same deployer/key funder key as mainnet2. // To minimize nonce clobbering we offset the key funder cron @@ -29,6 +29,7 @@ export const keyFunderConfig: KeyFunderConfig< ancient8: '0.5', alephzeroevmmainnet: '100', apechain: '50', + appchain: '0.05', arbitrum: '0.5', arbitrumnova: '0.05', astar: '100', @@ -105,6 +106,7 @@ export const keyFunderConfig: KeyFunderConfig< swell: '0.05', taiko: '0.2', tangle: '2', + treasure: '100', unichain: '0.05', // temporarily low until we're able to fund more vana: '0.001', @@ -115,6 +117,7 @@ export const keyFunderConfig: KeyFunderConfig< zeronetwork: '0.05', zetachain: '20', zircuit: '0.02', + zklink: '0.05', zksync: '0.05', zoramainnet: '0.2', // ignore non-evm chains diff --git a/typescript/infra/config/environments/mainnet3/gasPrices.json b/typescript/infra/config/environments/mainnet3/gasPrices.json index 935eeaa036..1c5f05b28a 100644 --- a/typescript/infra/config/environments/mainnet3/gasPrices.json +++ b/typescript/infra/config/environments/mainnet3/gasPrices.json @@ -11,6 +11,10 @@ "amount": "25.42069", "decimals": 9 }, + "appchain": { + "amount": "0.01", + "decimals": 9 + }, "arbitrum": { "amount": "0.123544", "decimals": 9 @@ -24,7 +28,7 @@ "decimals": 9 }, "astarzkevm": { - "amount": "0.24", + "amount": "0.0988", "decimals": 9 }, "flame": { @@ -32,11 +36,11 @@ "decimals": 9 }, "avalanche": { - "amount": "25.0", + "amount": "27.735398516", "decimals": 9 }, "b3": { - "amount": "0.001000252", + "amount": "0.001000253", "decimals": 9 }, "base": { @@ -56,7 +60,7 @@ "decimals": 9 }, "boba": { - "amount": "0.001000047", + "amount": "0.001000059", "decimals": 9 }, "bsc": { @@ -136,7 +140,7 @@ "decimals": 9 }, "gnosis": { - "amount": "1.500000008", + "amount": "1.500000007", "decimals": 9 }, "gravity": { @@ -172,11 +176,11 @@ "decimals": 9 }, "lisk": { - "amount": "0.00100103", + "amount": "0.001001147", "decimals": 9 }, "lukso": { - "amount": "0.921815267", + "amount": "1.109955713", "decimals": 9 }, "lumia": { @@ -188,7 +192,7 @@ "decimals": 9 }, "mantapacific": { - "amount": "0.00300029", + "amount": "0.003000983", "decimals": 9 }, "mantle": { @@ -212,7 +216,7 @@ "decimals": 9 }, "mode": { - "amount": "0.001000252", + "amount": "0.001001363", "decimals": 9 }, "molten": { @@ -236,7 +240,7 @@ "decimals": 9 }, "optimism": { - "amount": "0.001065045", + "amount": "0.001000469", "decimals": 9 }, "orderly": { @@ -260,7 +264,7 @@ "decimals": 9 }, "prom": { - "amount": "546.0", + "amount": "51.9", "decimals": 9 }, "proofofplay": { @@ -272,7 +276,7 @@ "decimals": 9 }, "real": { - "amount": "0.04", + "amount": "0.022", "decimals": 9 }, "redstone": { @@ -292,7 +296,7 @@ "decimals": 9 }, "sei": { - "amount": "100.0", + "amount": "3.328028877", "decimals": 9 }, "shibarium": { @@ -331,12 +335,16 @@ "amount": "1.0", "decimals": 9 }, + "treasure": { + "amount": "702.999550885", + "decimals": 9 + }, "unichain": { "amount": "0.001000252", "decimals": 9 }, "vana": { - "amount": "0.002488334", + "amount": "0.002986", "decimals": 9 }, "viction": { @@ -344,7 +352,7 @@ "decimals": 9 }, "worldchain": { - "amount": "0.00100026", + "amount": "0.001000255", "decimals": 9 }, "xai": { @@ -367,6 +375,10 @@ "amount": "0.001000253", "decimals": 9 }, + "zklink": { + "amount": "0.125", + "decimals": 9 + }, "zksync": { "amount": "0.04525", "decimals": 9 diff --git a/typescript/infra/config/environments/mainnet3/ism/verification.json b/typescript/infra/config/environments/mainnet3/ism/verification.json index 473cbe5015..5cceb318f4 100644 --- a/typescript/infra/config/environments/mainnet3/ism/verification.json +++ b/typescript/infra/config/environments/mainnet3/ism/verification.json @@ -7604,5 +7604,91 @@ "constructorArguments": "", "isProxy": true } + ], + "appchain": [ + { + "name": "StaticMerkleRootMultisigIsmFactory", + "address": "0x2C1FAbEcd7bFBdEBF27CcdB67baADB38b6Df90fC", + "constructorArguments": "", + "isProxy": false + }, + { + "name": "StaticMerkleRootMultisigIsm", + "address": "0x4725F7b8037513915aAf6D6CBDE2920E28540dDc", + "constructorArguments": "", + "isProxy": true + }, + { + "name": "StaticMessageIdMultisigIsmFactory", + "address": "0x8b83fefd896fAa52057798f6426E9f0B080FCCcE", + "constructorArguments": "", + "isProxy": false + }, + { + "name": "StaticMessageIdMultisigIsm", + "address": "0xAF03386044373E2fe26C5b1dCedF5a7e854a7a3F", + "constructorArguments": "", + "isProxy": true + }, + { + "name": "StaticAggregationIsmFactory", + "address": "0x8F7454AC98228f3504Bb91eA3D8Adafe6406110A", + "constructorArguments": "", + "isProxy": false + }, + { + "name": "StaticAggregationIsm", + "address": "0x882CD0C5D50b6dD74b36Da4BDb059507fddEDdf2", + "constructorArguments": "", + "isProxy": true + }, + { + "name": "StaticAggregationHookFactory", + "address": "0xEb9FcFDC9EfDC17c1EC5E1dc085B98485da213D6", + "constructorArguments": "", + "isProxy": false + }, + { + "name": "StaticAggregationHook", + "address": "0x19930232E9aFC4f4F09d09fe2375680fAc2100D0", + "constructorArguments": "", + "isProxy": true + }, + { + "name": "DomainRoutingIsmFactory", + "address": "0x1052eF3419f26Bec74Ed7CEf4a4FA6812Bc09908", + "constructorArguments": "", + "isProxy": false + }, + { + "name": "DomaingRoutingIsm", + "address": "0x12Ed1BbA182CbC63692F813651BD493B7445C874", + "constructorArguments": "", + "isProxy": true + }, + { + "name": "StaticMerkleRootWeightedMultisigIsmFactory", + "address": "0x0761b0827849abbf7b0cC09CE14e1C93D87f5004", + "constructorArguments": "", + "isProxy": false + }, + { + "name": "StaticMerkleRootWeightedMultisigIsm", + "address": "0x3b9f24fD2ecfed0d3A88fa7f0E4e5747671981D7", + "constructorArguments": "", + "isProxy": true + }, + { + "name": "StaticMessageIdWeightedMultisigIsmFactory", + "address": "0x4Ed7d626f1E96cD1C0401607Bf70D95243E3dEd1", + "constructorArguments": "", + "isProxy": false + }, + { + "name": "StaticMessageIdWeightedMultisigIsm", + "address": "0x71DCcD21B912F7d4f636af0C9eA5DC0C10617354", + "constructorArguments": "", + "isProxy": true + } ] } diff --git a/typescript/infra/config/environments/mainnet3/middleware/accounts/verification.json b/typescript/infra/config/environments/mainnet3/middleware/accounts/verification.json index dd0b9c9562..07944e2a41 100644 --- a/typescript/infra/config/environments/mainnet3/middleware/accounts/verification.json +++ b/typescript/infra/config/environments/mainnet3/middleware/accounts/verification.json @@ -1848,5 +1848,26 @@ "isProxy": true, "expectedimplementation": "0x6a77331cE28E47c3Cb9Fea48AB6cD1e9594ce0A9" } + ], + "appchain": [ + { + "name": "InterchainAccountIsm", + "address": "0x027eFD1695941969435AA640542B690044dF7E06", + "constructorArguments": "0000000000000000000000003a464f746d23ab22155710f44db16dca53e0775e", + "isProxy": false + }, + { + "name": "InterchainAccountRouter", + "address": "0xAE557e108b3336130370aC74836f1356B4b30Cf2", + "constructorArguments": "0000000000000000000000003a464f746d23ab22155710f44db16dca53e0775e", + "isProxy": false + }, + { + "name": "TransparentUpgradeableProxy", + "address": "0x65F1343AC23D4fF48bf6c7E0c55872d245397567", + "constructorArguments": "000000000000000000000000ae557e108b3336130370ac74836f1356b4b30cf20000000000000000000000002f2afae1139ce54fefc03593fee8ab2adf4a85a700000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000064c0c53b8b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000027efd1695941969435aa640542b690044df7e06000000000000000000000000a7eccdb9be08178f896c26b7bbd8c3d4e844d9ba00000000000000000000000000000000000000000000000000000000", + "isProxy": true, + "expectedimplementation": "0xAE557e108b3336130370aC74836f1356B4b30Cf2" + } ] } diff --git a/typescript/infra/config/environments/mainnet3/owners.ts b/typescript/infra/config/environments/mainnet3/owners.ts index f37ac77af8..5b495d316f 100644 --- a/typescript/infra/config/environments/mainnet3/owners.ts +++ b/typescript/infra/config/environments/mainnet3/owners.ts @@ -56,6 +56,7 @@ export const safes: ChainMap
= { endurance: '0xaCD1865B262C89Fb0b50dcc8fB095330ae8F35b5', zircuit: '0x9e2fe7723b018d02cDE4f5cC1A9bC9C65b922Fc8', zeronetwork: '0xCB21F61A3c8139F18e635d45aD1e62A4A61d2c3D', + swell: '0x5F7771EA40546e2932754C263455Cb0023a55ca7', }; export const icaOwnerChain = 'ethereum'; @@ -166,6 +167,12 @@ export const icas: Partial< vana: '0x29dfa34765e29ea353FC8aB70A19e32a5578E603', bsquared: '0xd9564EaaA68A327933f758A54450D3A0531E60BB', superseed: '0x29dfa34765e29ea353FC8aB70A19e32a5578E603', + + // Dec 4, 2024 batch + // ---------------------------------------------------------- + // swell: '0xff8326468e7AaB51c53D3569cf7C45Dd54c11687', // already has a safe + lumiaprism: '0xAFfA863646D1bC74ecEC0dB1070f069Af065EBf5', + appchain: '0x4F25DFFd10A6D61C365E1a605d07B2ab0E82A7E6', } as const; export const DEPLOYER = '0xa7ECcdb9Be08178f896c26b7BbD8C3D4E844d9Ba'; diff --git a/typescript/infra/config/environments/mainnet3/supportedChainNames.ts b/typescript/infra/config/environments/mainnet3/supportedChainNames.ts index c80b0831ad..0b86151222 100644 --- a/typescript/infra/config/environments/mainnet3/supportedChainNames.ts +++ b/typescript/infra/config/environments/mainnet3/supportedChainNames.ts @@ -4,6 +4,7 @@ export const mainnet3SupportedChainNames = [ 'ancient8', 'alephzeroevmmainnet', 'apechain', + 'appchain', 'arbitrum', 'arbitrumnova', 'astar', @@ -84,6 +85,7 @@ export const mainnet3SupportedChainNames = [ 'swell', 'taiko', 'tangle', + 'treasure', 'unichain', 'vana', 'viction', @@ -93,6 +95,7 @@ export const mainnet3SupportedChainNames = [ 'zeronetwork', 'zetachain', 'zircuit', + 'zklink', 'zksync', 'zoramainnet', ] as const; diff --git a/typescript/infra/config/environments/mainnet3/tokenPrices.json b/typescript/infra/config/environments/mainnet3/tokenPrices.json index 757b3b03b0..9567a31775 100644 --- a/typescript/infra/config/environments/mainnet3/tokenPrices.json +++ b/typescript/infra/config/environments/mainnet3/tokenPrices.json @@ -1,96 +1,99 @@ { - "ancient8": "3628.85", - "alephzeroevmmainnet": "0.61841", - "apechain": "1.52", - "arbitrum": "3628.85", - "arbitrumnova": "3628.85", - "astar": "0.078025", - "astarzkevm": "3628.85", - "flame": "7.36", - "avalanche": "48.31", - "b3": "3628.85", - "base": "3628.85", - "bitlayer": "95794", - "blast": "3628.85", - "bob": "3628.85", - "boba": "3628.85", - "bsc": "639.49", - "bsquared": "95794", - "celo": "0.983257", - "cheesechain": "0.00180324", - "chilizmainnet": "0.104233", - "coredao": "1.43", - "cyber": "3628.85", - "degenchain": "0.01711559", - "dogechain": "0.421781", - "duckchain": "6.5", - "eclipsemainnet": "3628.85", - "endurance": "3.09", - "ethereum": "3628.85", - "everclear": "3628.85", - "fantom": "1.034", - "flare": "0.03388989", - "flowmainnet": "1.01", - "fraxtal": "3614.4", - "fusemainnet": "0.03486937", - "gnosis": "0.997956", - "gravity": "0.03730451", - "harmony": "0.02834153", - "immutablezkevmmainnet": "1.94", - "inevm": "30.08", - "injective": "30.08", - "kaia": "0.357047", - "kroma": "3628.85", - "linea": "3628.85", - "lisk": "3628.85", - "lukso": "3.33", - "lumia": "1.7", - "lumiaprism": "1.7", - "mantapacific": "3628.85", - "mantle": "0.888186", - "merlin": "95787", - "metal": "3628.85", - "metis": "60.01", - "mint": "3628.85", - "mode": "3628.85", - "molten": "0.284308", - "moonbeam": "0.313413", - "morph": "3628.85", - "neutron": "0.523303", - "oortmainnet": "0.255252", - "optimism": "3628.85", - "orderly": "3628.85", - "osmosis": "0.589662", - "polygon": "0.621246", - "polygonzkevm": "3628.85", - "polynomialfi": "3628.85", - "prom": "6.5", - "proofofplay": "3628.85", - "rarichain": "3628.85", + "ancient8": "3849.95", + "alephzeroevmmainnet": "0.563568", + "apechain": "1.66", + "appchain": "3849.95", + "arbitrum": "3849.95", + "arbitrumnova": "3849.95", + "astar": "0.078825", + "astarzkevm": "3849.95", + "flame": "7.62", + "avalanche": "49.4", + "b3": "3849.95", + "base": "3849.95", + "bitlayer": "98047", + "blast": "3849.95", + "bob": "3849.95", + "boba": "3849.95", + "bsc": "714.94", + "bsquared": "98047", + "celo": "0.916567", + "cheesechain": "0.0015485", + "chilizmainnet": "0.119182", + "coredao": "1.42", + "cyber": "3849.95", + "degenchain": "0.01880045", + "dogechain": "0.429424", + "duckchain": "6.4", + "eclipsemainnet": "3849.95", + "endurance": "3.21", + "ethereum": "3849.95", + "everclear": "3849.95", + "fantom": "1.23", + "flare": "0.02912373", + "flowmainnet": "1.048", + "fraxtal": "3847.8", + "fusemainnet": "0.04124996", + "gnosis": "1.001", + "gravity": "0.03951512", + "harmony": "0.03939191", + "immutablezkevmmainnet": "1.89", + "inevm": "30.43", + "injective": "30.43", + "kaia": "0.282109", + "kroma": "3849.95", + "linea": "3849.95", + "lisk": "3849.95", + "lukso": "2.81", + "lumia": "2.25", + "lumiaprism": "2.25", + "mantapacific": "3849.95", + "mantle": "1.13", + "merlin": "99320", + "metal": "3849.95", + "metis": "59.74", + "mint": "3849.95", + "mode": "3849.95", + "molten": "0.382952", + "moonbeam": "0.345164", + "morph": "3849.95", + "neutron": "0.571583", + "oortmainnet": "0.22645", + "optimism": "3849.95", + "orderly": "3849.95", + "osmosis": "0.699208", + "polygon": "0.633271", + "polygonzkevm": "3849.95", + "polynomialfi": "3849.95", + "prom": "7.16", + "proofofplay": "3849.95", + "rarichain": "3849.95", "real": "1", - "redstone": "3628.85", - "rootstockmainnet": "95652", - "sanko": "53.86", - "scroll": "3628.85", - "sei": "0.613723", - "shibarium": "0.59728", - "snaxchain": "3628.85", - "solanamainnet": "223.96", - "stride": "0.675504", - "superseed": "3628.85", - "superpositionmainnet": "3628.85", - "swell": "3628.85", - "taiko": "3628.85", + "redstone": "3849.95", + "rootstockmainnet": "98004", + "sanko": "58.27", + "scroll": "3849.95", + "sei": "0.625869", + "shibarium": "0.670964", + "snaxchain": "3849.95", + "solanamainnet": "226.39", + "stride": "0.779753", + "superseed": "3849.95", + "superpositionmainnet": "3849.95", + "swell": "3849.95", + "taiko": "3849.95", "tangle": "1", - "unichain": "3628.85", + "treasure": "0.638598", + "unichain": "3849.95", "vana": "1", - "viction": "0.479042", - "worldchain": "3628.85", - "xai": "0.37142", - "xlayer": "53.81", - "zeronetwork": "3628.85", - "zetachain": "0.819612", - "zircuit": "3628.85", - "zksync": "3628.85", - "zoramainnet": "3628.85" + "viction": "0.50166", + "worldchain": "3849.95", + "xai": "0.368066", + "xlayer": "56.38", + "zeronetwork": "3849.95", + "zetachain": "0.805386", + "zircuit": "3849.95", + "zklink": "3849.95", + "zksync": "3849.95", + "zoramainnet": "3849.95" } diff --git a/typescript/infra/config/environments/mainnet3/validators.ts b/typescript/infra/config/environments/mainnet3/validators.ts index 0bf00eb882..17500268ec 100644 --- a/typescript/infra/config/environments/mainnet3/validators.ts +++ b/typescript/infra/config/environments/mainnet3/validators.ts @@ -1223,5 +1223,36 @@ export const validatorChainConfig = ( 'swell', ), }, + + treasure: { + interval: 5, + reorgPeriod: getReorgPeriod('treasure'), + validators: validatorsConfig( + { + [Contexts.Hyperlane]: ['0x6ad994819185553e8baa01533f0cd2c7cadfe6cc'], + }, + 'treasure', + ), + }, + zklink: { + interval: 5, + reorgPeriod: getReorgPeriod('zklink'), + validators: validatorsConfig( + { + [Contexts.Hyperlane]: ['0x217a8cb4789fc45abf56cb6e2ca96f251a5ac181'], + }, + 'zklink', + ), + }, + appchain: { + interval: 5, + reorgPeriod: getReorgPeriod('appchain'), + validators: validatorsConfig( + { + [Contexts.Hyperlane]: ['0x0531251bbadc1f9f19ccce3ca6b3f79f08eae1be'], + }, + 'appchain', + ), + }, }; }; diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getAncient8EthereumUSDCWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getAncient8EthereumUSDCWarpConfig.ts index 58f60211dc..d4b38bfb4f 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getAncient8EthereumUSDCWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getAncient8EthereumUSDCWarpConfig.ts @@ -2,8 +2,8 @@ import { ethers } from 'ethers'; import { ChainMap, + HypTokenRouterConfig, OwnableConfig, - TokenRouterConfig, TokenType, buildAggregationIsmConfigs, defaultMultisigConfigs, @@ -17,14 +17,14 @@ import { export const getAncient8EthereumUSDCWarpConfig = async ( routerConfig: ChainMap, abacusWorksEnvOwnerConfig: ChainMap, -): Promise> => { +): Promise> => { const ismConfig = buildAggregationIsmConfigs( 'ethereum', ['ancient8'], defaultMultisigConfigs, ).ancient8; - const ethereum: TokenRouterConfig = { + const ethereum: HypTokenRouterConfig = { ...routerConfig.ethereum, ...abacusWorksEnvOwnerConfig.ethereum, type: TokenType.collateral, @@ -36,7 +36,7 @@ export const getAncient8EthereumUSDCWarpConfig = async ( hook: '0x19b2cF952b70b217c90FC408714Fbc1acD29A6A8', }; - const ancient8: TokenRouterConfig = { + const ancient8: HypTokenRouterConfig = { ...routerConfig.ancient8, ...abacusWorksEnvOwnerConfig.ancient8, type: TokenType.synthetic, diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrollZeroNetworkZoraMainnetETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrollZeroNetworkZoraMainnetETHWarpConfig.ts index 4b77a7c680..3f2a52b221 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrollZeroNetworkZoraMainnetETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrollZeroNetworkZoraMainnetETHWarpConfig.ts @@ -2,10 +2,9 @@ import { ethers } from 'ethers'; import { ChainMap, + HypTokenRouterConfig, IsmConfig, OwnableConfig, - RouterConfig, - TokenRouterConfig, TokenType, } from '@hyperlane-xyz/sdk'; @@ -18,10 +17,10 @@ export const getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrol async ( routerConfig: ChainMap, abacusWorksEnvOwnerConfig: ChainMap, - ): Promise> => { + ): Promise> => { const ISM_CONFIG: IsmConfig = ethers.constants.AddressZero; - const arbitrum: TokenRouterConfig = { + const arbitrum: HypTokenRouterConfig = { ...routerConfig.arbitrum, ...abacusWorksEnvOwnerConfig.arbitrum, proxyAdmin: { @@ -32,7 +31,7 @@ export const getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrol interchainSecurityModule: ISM_CONFIG, }; - const base: TokenRouterConfig = { + const base: HypTokenRouterConfig = { ...routerConfig.base, ...abacusWorksEnvOwnerConfig.base, proxyAdmin: { @@ -43,7 +42,7 @@ export const getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrol interchainSecurityModule: ISM_CONFIG, }; - const blast: TokenRouterConfig = { + const blast: HypTokenRouterConfig = { ...routerConfig.blast, ...abacusWorksEnvOwnerConfig.blast, proxyAdmin: { @@ -54,7 +53,7 @@ export const getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrol interchainSecurityModule: ISM_CONFIG, }; - const bsc: TokenRouterConfig = { + const bsc: HypTokenRouterConfig = { ...routerConfig.bsc, ...abacusWorksEnvOwnerConfig.bsc, proxyAdmin: { @@ -66,7 +65,7 @@ export const getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrol interchainSecurityModule: ISM_CONFIG, }; - const ethereum: TokenRouterConfig = { + const ethereum: HypTokenRouterConfig = { ...routerConfig.ethereum, ...abacusWorksEnvOwnerConfig.ethereum, proxyAdmin: { @@ -77,7 +76,7 @@ export const getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrol interchainSecurityModule: ISM_CONFIG, }; - const gnosis: TokenRouterConfig = { + const gnosis: HypTokenRouterConfig = { ...routerConfig.gnosis, ...abacusWorksEnvOwnerConfig.gnosis, proxyAdmin: { @@ -89,7 +88,7 @@ export const getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrol interchainSecurityModule: ISM_CONFIG, }; - const mantle: TokenRouterConfig = { + const mantle: HypTokenRouterConfig = { ...routerConfig.mantle, ...abacusWorksEnvOwnerConfig.mantle, proxyAdmin: { @@ -101,7 +100,7 @@ export const getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrol interchainSecurityModule: ISM_CONFIG, }; - const mode: TokenRouterConfig = { + const mode: HypTokenRouterConfig = { ...routerConfig.mode, ...abacusWorksEnvOwnerConfig.mode, proxyAdmin: { @@ -112,7 +111,7 @@ export const getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrol interchainSecurityModule: ISM_CONFIG, }; - const optimism: TokenRouterConfig = { + const optimism: HypTokenRouterConfig = { ...routerConfig.optimism, ...abacusWorksEnvOwnerConfig.optimism, proxyAdmin: { @@ -123,7 +122,7 @@ export const getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrol interchainSecurityModule: ISM_CONFIG, }; - const polygon: TokenRouterConfig = { + const polygon: HypTokenRouterConfig = { ...routerConfig.polygon, ...abacusWorksEnvOwnerConfig.polygon, proxyAdmin: { @@ -135,7 +134,7 @@ export const getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrol interchainSecurityModule: ISM_CONFIG, }; - const scroll: TokenRouterConfig = { + const scroll: HypTokenRouterConfig = { ...routerConfig.scroll, ...abacusWorksEnvOwnerConfig.scroll, proxyAdmin: { @@ -146,7 +145,7 @@ export const getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrol interchainSecurityModule: ISM_CONFIG, }; - const zeronetwork: TokenRouterConfig = { + const zeronetwork: HypTokenRouterConfig = { ...routerConfig.zeronetwork, ...abacusWorksEnvOwnerConfig.zeronetwork, proxyAdmin: { @@ -157,7 +156,7 @@ export const getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrol interchainSecurityModule: ISM_CONFIG, }; - const zoramainnet: TokenRouterConfig = { + const zoramainnet: HypTokenRouterConfig = { ...routerConfig.zoramainnet, ...abacusWorksEnvOwnerConfig.zoramainnet, proxyAdmin: { @@ -168,7 +167,7 @@ export const getArbitrumBaseBlastBscEthereumGnosisMantleModeOptimismPolygonScrol interchainSecurityModule: ISM_CONFIG, }; - const lisk: TokenRouterConfig = { + const lisk: HypTokenRouterConfig = { ...routerConfig.lisk, ...abacusWorksEnvOwnerConfig.lisk, proxyAdmin: { diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumBaseEthereumOptimismPolygonZeroNetworkUSDCWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumBaseEthereumOptimismPolygonZeroNetworkUSDCWarpConfig.ts index 6249765ef5..9dae492537 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumBaseEthereumOptimismPolygonZeroNetworkUSDCWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumBaseEthereumOptimismPolygonZeroNetworkUSDCWarpConfig.ts @@ -2,9 +2,8 @@ import { ethers } from 'ethers'; import { ChainMap, + HypTokenRouterConfig, OwnableConfig, - RouterConfig, - TokenRouterConfig, TokenType, } from '@hyperlane-xyz/sdk'; @@ -16,10 +15,10 @@ import { export const getArbitrumBaseEthereumOptimismPolygonZeroNetworkUSDC = async ( routerConfig: ChainMap, abacusWorksEnvOwnerConfig: ChainMap, -): Promise> => { +): Promise> => { const ISM_CONFIG = ethers.constants.AddressZero; - const arbitrum: TokenRouterConfig = { + const arbitrum: HypTokenRouterConfig = { ...routerConfig.arbitrum, ...abacusWorksEnvOwnerConfig.arbitrum, proxyAdmin: { @@ -31,7 +30,7 @@ export const getArbitrumBaseEthereumOptimismPolygonZeroNetworkUSDC = async ( interchainSecurityModule: ISM_CONFIG, }; - const base: TokenRouterConfig = { + const base: HypTokenRouterConfig = { ...routerConfig.base, ...abacusWorksEnvOwnerConfig.base, proxyAdmin: { @@ -43,7 +42,7 @@ export const getArbitrumBaseEthereumOptimismPolygonZeroNetworkUSDC = async ( interchainSecurityModule: ISM_CONFIG, }; - const optimism: TokenRouterConfig = { + const optimism: HypTokenRouterConfig = { ...routerConfig.optimism, ...abacusWorksEnvOwnerConfig.optimism, proxyAdmin: { @@ -55,7 +54,7 @@ export const getArbitrumBaseEthereumOptimismPolygonZeroNetworkUSDC = async ( interchainSecurityModule: ISM_CONFIG, }; - const polygon: TokenRouterConfig = { + const polygon: HypTokenRouterConfig = { ...routerConfig.polygon, ...abacusWorksEnvOwnerConfig.polygon, proxyAdmin: { @@ -67,7 +66,7 @@ export const getArbitrumBaseEthereumOptimismPolygonZeroNetworkUSDC = async ( interchainSecurityModule: ISM_CONFIG, }; - const zeronetwork: TokenRouterConfig = { + const zeronetwork: HypTokenRouterConfig = { ...routerConfig.zeronetwork, ...abacusWorksEnvOwnerConfig.zeronetwork, proxyAdmin: { @@ -79,7 +78,7 @@ export const getArbitrumBaseEthereumOptimismPolygonZeroNetworkUSDC = async ( interchainSecurityModule: ISM_CONFIG, }; - const ethereum: TokenRouterConfig = { + const ethereum: HypTokenRouterConfig = { ...routerConfig.ethereum, ...abacusWorksEnvOwnerConfig.ethereum, proxyAdmin: { @@ -91,7 +90,7 @@ export const getArbitrumBaseEthereumOptimismPolygonZeroNetworkUSDC = async ( interchainSecurityModule: ISM_CONFIG, }; - const lisk: TokenRouterConfig = { + const lisk: HypTokenRouterConfig = { ...routerConfig.lisk, ...abacusWorksEnvOwnerConfig.lisk, proxyAdmin: { diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumBscEthereumMantleModePolygonScrollZeronetworkUSDTWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumBscEthereumMantleModePolygonScrollZeronetworkUSDTWarpConfig.ts index 4cd36b4bab..8de2710ee2 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumBscEthereumMantleModePolygonScrollZeronetworkUSDTWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumBscEthereumMantleModePolygonScrollZeronetworkUSDTWarpConfig.ts @@ -2,10 +2,9 @@ import { ethers } from 'ethers'; import { ChainMap, + HypTokenRouterConfig, IsmConfig, OwnableConfig, - RouterConfig, - TokenRouterConfig, TokenType, } from '@hyperlane-xyz/sdk'; @@ -18,10 +17,10 @@ export const getArbitrumEthereumMantleModePolygonScrollZeroNetworkUSDTWarpConfig async ( routerConfig: ChainMap, abacusWorksEnvOwnerConfig: ChainMap, - ): Promise> => { + ): Promise> => { const ISM_CONFIG: IsmConfig = ethers.constants.AddressZero; - const arbitrum: TokenRouterConfig = { + const arbitrum: HypTokenRouterConfig = { ...routerConfig.arbitrum, ...abacusWorksEnvOwnerConfig.arbitrum, proxyAdmin: { @@ -33,7 +32,7 @@ export const getArbitrumEthereumMantleModePolygonScrollZeroNetworkUSDTWarpConfig interchainSecurityModule: ISM_CONFIG, }; - const ethereum: TokenRouterConfig = { + const ethereum: HypTokenRouterConfig = { ...routerConfig.ethereum, ...abacusWorksEnvOwnerConfig.ethereum, proxyAdmin: { @@ -45,7 +44,7 @@ export const getArbitrumEthereumMantleModePolygonScrollZeroNetworkUSDTWarpConfig interchainSecurityModule: ISM_CONFIG, }; - const mantle: TokenRouterConfig = { + const mantle: HypTokenRouterConfig = { ...routerConfig.mantle, ...abacusWorksEnvOwnerConfig.mantle, proxyAdmin: { @@ -57,7 +56,7 @@ export const getArbitrumEthereumMantleModePolygonScrollZeroNetworkUSDTWarpConfig interchainSecurityModule: ISM_CONFIG, }; - const mode: TokenRouterConfig = { + const mode: HypTokenRouterConfig = { ...routerConfig.mode, ...abacusWorksEnvOwnerConfig.mode, proxyAdmin: { @@ -69,7 +68,7 @@ export const getArbitrumEthereumMantleModePolygonScrollZeroNetworkUSDTWarpConfig interchainSecurityModule: ISM_CONFIG, }; - const polygon: TokenRouterConfig = { + const polygon: HypTokenRouterConfig = { ...routerConfig.polygon, ...abacusWorksEnvOwnerConfig.polygon, proxyAdmin: { @@ -81,7 +80,7 @@ export const getArbitrumEthereumMantleModePolygonScrollZeroNetworkUSDTWarpConfig interchainSecurityModule: ISM_CONFIG, }; - const scroll: TokenRouterConfig = { + const scroll: HypTokenRouterConfig = { ...routerConfig.scroll, ...abacusWorksEnvOwnerConfig.scroll, proxyAdmin: { @@ -93,7 +92,7 @@ export const getArbitrumEthereumMantleModePolygonScrollZeroNetworkUSDTWarpConfig interchainSecurityModule: ISM_CONFIG, }; - const zeronetwork: TokenRouterConfig = { + const zeronetwork: HypTokenRouterConfig = { ...routerConfig.zeronetwork, ...abacusWorksEnvOwnerConfig.zeronetwork, proxyAdmin: { diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumEthereumZircuitAmphrETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumEthereumZircuitAmphrETHWarpConfig.ts index 9633354b56..866e3bb9bc 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumEthereumZircuitAmphrETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumEthereumZircuitAmphrETHWarpConfig.ts @@ -2,8 +2,8 @@ import { ethers } from 'ethers'; import { ChainMap, + HypTokenRouterConfig, OwnableConfig, - TokenRouterConfig, TokenType, } from '@hyperlane-xyz/sdk'; @@ -21,15 +21,15 @@ const zircuitOwner = '0xD0673e7F3FB4037CA79F53d2d311D0e017d39963'; export const getArbitrumEthereumZircuitAmphrETHWarpConfig = async ( routerConfig: ChainMap, _abacusWorksEnvOwnerConfig: ChainMap, -): Promise> => { - const arbitrum: TokenRouterConfig = { +): Promise> => { + const arbitrum: HypTokenRouterConfig = { ...routerConfig.arbitrum, ...getOwnerConfigForAddress(arbitrumOwner), type: TokenType.synthetic, interchainSecurityModule: ethers.constants.AddressZero, }; - const ethereum: TokenRouterConfig = { + const ethereum: HypTokenRouterConfig = { ...routerConfig.ethereum, ...getOwnerConfigForAddress(ethereumOwner), type: TokenType.collateral, @@ -37,7 +37,7 @@ export const getArbitrumEthereumZircuitAmphrETHWarpConfig = async ( interchainSecurityModule: ethers.constants.AddressZero, }; - const zircuit: TokenRouterConfig = { + const zircuit: HypTokenRouterConfig = { ...routerConfig.zircuit, ...getOwnerConfigForAddress(zircuitOwner), type: TokenType.synthetic, diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumNeutronEclipWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumNeutronEclipWarpConfig.ts index 2dae8e447b..ad6b921951 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumNeutronEclipWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumNeutronEclipWarpConfig.ts @@ -1,7 +1,7 @@ import { ChainMap, + HypTokenRouterConfig, OwnableConfig, - TokenRouterConfig, TokenType, } from '@hyperlane-xyz/sdk'; @@ -16,11 +16,11 @@ const neutronOwner = export const getArbitrumNeutronEclipWarpConfig = async ( routerConfig: ChainMap, _abacusWorksEnvOwnerConfig: ChainMap, -): Promise> => { +): Promise> => { const neutronRouter = '6b04c49fcfd98bc4ea9c05cd5790462a39537c00028333474aebe6ddf20b73a3'; - const neutron: TokenRouterConfig = { + const neutron: HypTokenRouterConfig = { ...routerConfig.neutron, ...getOwnerConfigForAddress(neutronOwner), type: TokenType.collateral, @@ -28,7 +28,7 @@ export const getArbitrumNeutronEclipWarpConfig = async ( foreignDeployment: neutronRouter, }; - const arbitrum: TokenRouterConfig = { + const arbitrum: HypTokenRouterConfig = { ...routerConfig.arbitrum, ...getOwnerConfigForAddress(arbitrumOwner), type: TokenType.synthetic, diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumNeutronTiaWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumNeutronTiaWarpConfig.ts index 66a6d9e116..0618602550 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumNeutronTiaWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getArbitrumNeutronTiaWarpConfig.ts @@ -1,7 +1,7 @@ import { ChainMap, + HypTokenRouterConfig, OwnableConfig, - TokenRouterConfig, TokenType, } from '@hyperlane-xyz/sdk'; @@ -10,11 +10,11 @@ import { RouterConfigWithoutOwner } from '../../../../../src/config/warp.js'; export const getArbitrumNeutronTiaWarpConfig = async ( routerConfig: ChainMap, abacusWorksEnvOwnerConfig: ChainMap, -): Promise> => { +): Promise> => { const neutronRouter = '910926c4cf95d107237a9cf0b3305fe9c81351ebcba3d218ceb0e4935d92ceac'; - const neutron: TokenRouterConfig = { + const neutron: HypTokenRouterConfig = { ...routerConfig.neutron, ...abacusWorksEnvOwnerConfig.neutron, type: TokenType.collateral, @@ -23,7 +23,7 @@ export const getArbitrumNeutronTiaWarpConfig = async ( foreignDeployment: neutronRouter, }; - const arbitrum: TokenRouterConfig = { + const arbitrum: HypTokenRouterConfig = { ...routerConfig.arbitrum, ...abacusWorksEnvOwnerConfig.arbitrum, type: TokenType.synthetic, diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getBaseZeroNetworkCBBTCWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getBaseZeroNetworkCBBTCWarpConfig.ts index 56570748ab..c61c25a9b5 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getBaseZeroNetworkCBBTCWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getBaseZeroNetworkCBBTCWarpConfig.ts @@ -2,10 +2,9 @@ import { ethers } from 'ethers'; import { ChainMap, + HypTokenRouterConfig, IsmConfig, OwnableConfig, - RouterConfig, - TokenRouterConfig, TokenType, } from '@hyperlane-xyz/sdk'; @@ -17,10 +16,10 @@ import { export const getBaseZeroNetworkCBBTCWarpConfig = async ( routerConfig: ChainMap, abacusWorksEnvOwnerConfig: ChainMap, -): Promise> => { +): Promise> => { const ISM_CONFIG: IsmConfig = ethers.constants.AddressZero; - const base: TokenRouterConfig = { + const base: HypTokenRouterConfig = { ...routerConfig.base, ...abacusWorksEnvOwnerConfig.base, proxyAdmin: { @@ -32,7 +31,7 @@ export const getBaseZeroNetworkCBBTCWarpConfig = async ( interchainSecurityModule: ISM_CONFIG, }; - const zeronetwork: TokenRouterConfig = { + const zeronetwork: HypTokenRouterConfig = { ...routerConfig.zeronetwork, ...abacusWorksEnvOwnerConfig.zeronetwork, proxyAdmin: { diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumApxETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumApxETHWarpConfig.ts index 517836b52c..b27329279b 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumApxETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumApxETHWarpConfig.ts @@ -2,8 +2,8 @@ import { ethers } from 'ethers'; import { ChainMap, + HypTokenRouterConfig, OwnableConfig, - TokenRouterConfig, TokenType, } from '@hyperlane-xyz/sdk'; @@ -12,17 +12,17 @@ import { RouterConfigWithoutOwner, tokens, } from '../../../../../src/config/warp.js'; -import { DEPLOYER } from '../../owners.js'; import { SEALEVEL_WARP_ROUTE_HANDLER_GAS_AMOUNT } from '../consts.js'; -const ethereumOwner = DEPLOYER; -const eclipseOwner = '9bRSUPjfS3xS6n5EfkJzHFTRDa4AHLda8BU2pP4HoWnf'; +// Redacted / Dinero team +const ethereumOwner = '0xA52Fd396891E7A74b641a2Cb1A6999Fcf56B077e'; +const eclipseOwner = 'BwYL3jLky8oHLeQp1S48cVRfZPmcXtg1V33UPmnZK3Jk'; export async function getEclipseEthereumApxEthWarpConfig( routerConfig: ChainMap, _abacusWorksEnvOwnerConfig: ChainMap, -): Promise> { - const eclipsemainnet: TokenRouterConfig = { +): Promise> { + const eclipsemainnet: HypTokenRouterConfig = { ...routerConfig.eclipsemainnet, ...getOwnerConfigForAddress(eclipseOwner), type: TokenType.synthetic, @@ -31,7 +31,7 @@ export async function getEclipseEthereumApxEthWarpConfig( interchainSecurityModule: ethers.constants.AddressZero, }; - let ethereum: TokenRouterConfig = { + let ethereum: HypTokenRouterConfig = { ...routerConfig.ethereum, ...getOwnerConfigForAddress(ethereumOwner), type: TokenType.collateral, diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumSolanaUSDCWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumSolanaUSDCWarpConfig.ts index eaaf5749c6..c5a537ca4e 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumSolanaUSDCWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumSolanaUSDCWarpConfig.ts @@ -2,8 +2,8 @@ import { ethers } from 'ethers'; import { ChainMap, + HypTokenRouterConfig, RouterConfig, - TokenRouterConfig, TokenType, } from '@hyperlane-xyz/sdk'; @@ -12,15 +12,15 @@ import { SEALEVEL_WARP_ROUTE_HANDLER_GAS_AMOUNT } from '../consts.js'; export const getEclipseEthereumSolanaUSDCWarpConfig = async ( routerConfig: ChainMap, -): Promise> => { - const eclipsemainnet: TokenRouterConfig = { +): Promise> => { + const eclipsemainnet: HypTokenRouterConfig = { ...routerConfig.eclipsemainnet, type: TokenType.synthetic, foreignDeployment: 'D6k6T3G74ij6atCtBiWBs5TbFa1hFVcrFUSGZHuV7q3Z', gas: SEALEVEL_WARP_ROUTE_HANDLER_GAS_AMOUNT, }; - const ethereum: TokenRouterConfig = { + const ethereum: HypTokenRouterConfig = { ...routerConfig.ethereum, type: TokenType.collateral, interchainSecurityModule: ethers.constants.AddressZero, diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumSolanaUSDTWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumSolanaUSDTWarpConfig.ts index bbabe4f5dc..c6576138b5 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumSolanaUSDTWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumSolanaUSDTWarpConfig.ts @@ -2,8 +2,8 @@ import { ethers } from 'ethers'; import { ChainMap, + HypTokenRouterConfig, OwnableConfig, - TokenRouterConfig, TokenType, } from '@hyperlane-xyz/sdk'; @@ -16,8 +16,8 @@ import { SEALEVEL_WARP_ROUTE_HANDLER_GAS_AMOUNT } from '../consts.js'; export const getEclipseEthereumSolanaUSDTWarpConfig = async ( routerConfig: ChainMap, abacusWorksEnvOwnerConfig: ChainMap, -): Promise> => { - const eclipsemainnet: TokenRouterConfig = { +): Promise> => { + const eclipsemainnet: HypTokenRouterConfig = { ...routerConfig.eclipsemainnet, ...abacusWorksEnvOwnerConfig.eclipsemainnet, type: TokenType.synthetic, @@ -25,7 +25,7 @@ export const getEclipseEthereumSolanaUSDTWarpConfig = async ( gas: SEALEVEL_WARP_ROUTE_HANDLER_GAS_AMOUNT, interchainSecurityModule: ethers.constants.AddressZero, }; - let ethereum: TokenRouterConfig = { + let ethereum: HypTokenRouterConfig = { ...routerConfig.ethereum, ...abacusWorksEnvOwnerConfig.ethereum, type: TokenType.collateral, diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumTETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumTETHWarpConfig.ts index ca6138df1d..5f48724e6e 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumTETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumTETHWarpConfig.ts @@ -2,8 +2,8 @@ import { ethers } from 'ethers'; import { ChainMap, + HypTokenRouterConfig, RouterConfig, - TokenRouterConfig, TokenType, } from '@hyperlane-xyz/sdk'; @@ -11,15 +11,15 @@ import { SEALEVEL_WARP_ROUTE_HANDLER_GAS_AMOUNT } from '../consts.js'; export const getEthereumEclipseTETHWarpConfig = async ( routerConfig: ChainMap, -): Promise> => { - const eclipsemainnet: TokenRouterConfig = { +): Promise> => { + const eclipsemainnet: HypTokenRouterConfig = { ...routerConfig.eclipsemainnet, type: TokenType.synthetic, foreignDeployment: 'BJa3fPvvjKx8gRCWunoSrWBbsmieub37gsGpjp4BfTfW', gas: SEALEVEL_WARP_ROUTE_HANDLER_GAS_AMOUNT, }; - const ethereum: TokenRouterConfig = { + const ethereum: HypTokenRouterConfig = { ...routerConfig.ethereum, type: TokenType.collateral, interchainSecurityModule: ethers.constants.AddressZero, diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumWBTCWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumWBTCWarpConfig.ts index 0b1fd23431..011d151ba8 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumWBTCWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumWBTCWarpConfig.ts @@ -2,8 +2,8 @@ import { ethers } from 'ethers'; import { ChainMap, + HypTokenRouterConfig, OwnableConfig, - TokenRouterConfig, TokenType, } from '@hyperlane-xyz/sdk'; @@ -16,8 +16,8 @@ import { SEALEVEL_WARP_ROUTE_HANDLER_GAS_AMOUNT } from '../consts.js'; export const getEclipseEthereumWBTCWarpConfig = async ( routerConfig: ChainMap, abacusWorksEnvOwnerConfig: ChainMap, -): Promise> => { - const eclipsemainnet: TokenRouterConfig = { +): Promise> => { + const eclipsemainnet: HypTokenRouterConfig = { ...routerConfig.eclipsemainnet, ...abacusWorksEnvOwnerConfig.eclipsemainnet, type: TokenType.synthetic, @@ -26,7 +26,7 @@ export const getEclipseEthereumWBTCWarpConfig = async ( interchainSecurityModule: ethers.constants.AddressZero, }; - let ethereum: TokenRouterConfig = { + let ethereum: HypTokenRouterConfig = { ...routerConfig.ethereum, ...abacusWorksEnvOwnerConfig.ethereum, type: TokenType.collateral, diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumWeETHsWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumWeETHsWarpConfig.ts index 7df68ccbac..6ec12367dc 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumWeETHsWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseEthereumWeETHsWarpConfig.ts @@ -2,9 +2,8 @@ import { ethers } from 'ethers'; import { ChainMap, + HypTokenRouterConfig, OwnableConfig, - RouterConfig, - TokenRouterConfig, TokenType, } from '@hyperlane-xyz/sdk'; @@ -23,8 +22,8 @@ const eclipseOwner = '4Cj1s2ipALjJk9foQV4oDaZYCZwSsVkAShQL1KFVJG9b'; export async function getEclipseEthereumWeEthsWarpConfig( routerConfig: ChainMap, _abacusWorksEnvOwnerConfig: ChainMap, -): Promise> { - const eclipsemainnet: TokenRouterConfig = { +): Promise> { + const eclipsemainnet: HypTokenRouterConfig = { ...routerConfig.eclipsemainnet, ...getOwnerConfigForAddress(eclipseOwner), type: TokenType.synthetic, @@ -33,7 +32,7 @@ export async function getEclipseEthereumWeEthsWarpConfig( interchainSecurityModule: ethers.constants.AddressZero, }; - let ethereum: TokenRouterConfig = { + let ethereum: HypTokenRouterConfig = { ...routerConfig.ethereum, ...getOwnerConfigForAddress(ethereumOwner), type: TokenType.collateral, diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseStrideSTTIAWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseStrideSTTIAWarpConfig.ts index 158e6e367f..5159a4ddb0 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseStrideSTTIAWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseStrideSTTIAWarpConfig.ts @@ -1,7 +1,7 @@ import { ChainMap, + HypTokenRouterConfig, OwnableConfig, - TokenRouterConfig, TokenType, } from '@hyperlane-xyz/sdk'; @@ -15,8 +15,8 @@ const strideOwner = 'stride1k8c2m5cn322akk5wy8lpt87dd2f4yh9azg7jlh'; export const getEclipseStrideTiaWarpConfig = async ( routerConfig: ChainMap, abacusWorksEnvOwnerConfig: ChainMap, -): Promise> => { - const eclipsemainnet: TokenRouterConfig = { +): Promise> => { + const eclipsemainnet: HypTokenRouterConfig = { ...routerConfig.eclipsemainnet, ...abacusWorksEnvOwnerConfig.eclipsemainnet, type: TokenType.synthetic, @@ -24,7 +24,7 @@ export const getEclipseStrideTiaWarpConfig = async ( gas: SEALEVEL_WARP_ROUTE_HANDLER_GAS_AMOUNT, }; - const stride: TokenRouterConfig = { + const stride: HypTokenRouterConfig = { ...routerConfig.stride, ...getOwnerConfigForAddress(strideOwner), type: TokenType.collateral, diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseStrideTIAWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseStrideTIAWarpConfig.ts index 9364026599..b486686040 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseStrideTIAWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEclipseStrideTIAWarpConfig.ts @@ -1,7 +1,7 @@ import { ChainMap, + HypTokenRouterConfig, OwnableConfig, - TokenRouterConfig, TokenType, } from '@hyperlane-xyz/sdk'; @@ -15,8 +15,8 @@ const strideOwner = 'stride1k8c2m5cn322akk5wy8lpt87dd2f4yh9azg7jlh'; export const getEclipseStrideStTiaWarpConfig = async ( routerConfig: ChainMap, abacusWorksEnvOwnerConfig: ChainMap, -): Promise> => { - const eclipsemainnet: TokenRouterConfig = { +): Promise> => { + const eclipsemainnet: HypTokenRouterConfig = { ...routerConfig.eclipsemainnet, ...abacusWorksEnvOwnerConfig.eclipsemainnet, type: TokenType.synthetic, @@ -24,7 +24,7 @@ export const getEclipseStrideStTiaWarpConfig = async ( gas: SEALEVEL_WARP_ROUTE_HANDLER_GAS_AMOUNT, }; - const stride: TokenRouterConfig = { + const stride: HypTokenRouterConfig = { ...routerConfig.stride, ...getOwnerConfigForAddress(strideOwner), type: TokenType.collateral, diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumBscLumiaLUMIAWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumBscLumiaLUMIAWarpConfig.ts index 20bc3aff24..0551b09bad 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumBscLumiaLUMIAWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumBscLumiaLUMIAWarpConfig.ts @@ -1,7 +1,7 @@ import { ChainMap, + HypTokenRouterConfig, OwnableConfig, - TokenRouterConfig, TokenType, } from '@hyperlane-xyz/sdk'; @@ -15,21 +15,21 @@ const ownerConfig = getOwnerConfigForAddress(owner); export const getEthereumBscLUMIAWarpConfig = async ( routerConfig: ChainMap, _abacusWorksEnvOwnerConfig: ChainMap, -): Promise> => { - const ethereum: TokenRouterConfig = { +): Promise> => { + const ethereum: HypTokenRouterConfig = { ...routerConfig.ethereum, ...ownerConfig, type: TokenType.collateral, token: '0xD9343a049D5DBd89CD19DC6BcA8c48fB3a0a42a7', }; - const bsc: TokenRouterConfig = { + const bsc: HypTokenRouterConfig = { ...routerConfig.bsc, ...ownerConfig, type: TokenType.synthetic, }; - const lumia: TokenRouterConfig = { + const lumia: HypTokenRouterConfig = { ...routerConfig.lumia, ...ownerConfig, type: TokenType.native, diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumFlowCbBTCWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumFlowCbBTCWarpConfig.ts index 3c33919e1c..54acc7fbd4 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumFlowCbBTCWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumFlowCbBTCWarpConfig.ts @@ -2,8 +2,8 @@ import { ethers } from 'ethers'; import { ChainMap, + HypTokenRouterConfig, OwnableConfig, - TokenRouterConfig, TokenType, } from '@hyperlane-xyz/sdk'; @@ -24,8 +24,8 @@ const flowOwnerConfig = getOwnerConfigForAddress(flowOwner); export const getEthereumFlowCbBTCWarpConfig = async ( routerConfig: ChainMap, _abacusWorksEnvOwnerConfig: ChainMap, -): Promise> => { - const ethereum: TokenRouterConfig = { +): Promise> => { + const ethereum: HypTokenRouterConfig = { ...routerConfig.ethereum, ...ethereumOwnerConfig, type: TokenType.collateral, @@ -33,7 +33,7 @@ export const getEthereumFlowCbBTCWarpConfig = async ( interchainSecurityModule: ethers.constants.AddressZero, }; - const flowmainnet: TokenRouterConfig = { + const flowmainnet: HypTokenRouterConfig = { ...routerConfig.flowmainnet, ...flowOwnerConfig, type: TokenType.synthetic, diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumInevmUSDCWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumInevmUSDCWarpConfig.ts index cb5ba7ada2..d08e5fbbf2 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumInevmUSDCWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumInevmUSDCWarpConfig.ts @@ -2,8 +2,8 @@ import { ethers } from 'ethers'; import { ChainMap, + HypTokenRouterConfig, OwnableConfig, - TokenRouterConfig, TokenType, } from '@hyperlane-xyz/sdk'; @@ -15,8 +15,8 @@ import { export const getEthereumInevmUSDCWarpConfig = async ( routerConfig: ChainMap, abacusWorksEnvOwnerConfig: ChainMap, -): Promise> => { - const ethereum: TokenRouterConfig = { +): Promise> => { + const ethereum: HypTokenRouterConfig = { ...routerConfig.ethereum, ...abacusWorksEnvOwnerConfig.ethereum, type: TokenType.collateral, @@ -24,7 +24,7 @@ export const getEthereumInevmUSDCWarpConfig = async ( hook: '0xb87AC8EA4533AE017604E44470F7c1E550AC6F10', // aggregation of IGP and Merkle, arbitrary config not supported for now, TODO: may want to move to zero address in future }; - const inevm: TokenRouterConfig = { + const inevm: HypTokenRouterConfig = { ...routerConfig.inevm, ...abacusWorksEnvOwnerConfig.inevm, type: TokenType.synthetic, diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumInevmUSDTWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumInevmUSDTWarpConfig.ts index b861444f1f..59418498c4 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumInevmUSDTWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumInevmUSDTWarpConfig.ts @@ -2,8 +2,8 @@ import { ethers } from 'ethers'; import { ChainMap, + HypTokenRouterConfig, OwnableConfig, - TokenRouterConfig, TokenType, } from '@hyperlane-xyz/sdk'; @@ -15,8 +15,8 @@ import { export const getEthereumInevmUSDTWarpConfig = async ( routerConfig: ChainMap, abacusWorksEnvOwnerConfig: ChainMap, -): Promise> => { - const ethereum: TokenRouterConfig = { +): Promise> => { + const ethereum: HypTokenRouterConfig = { ...routerConfig.ethereum, ...abacusWorksEnvOwnerConfig.ethereum, type: TokenType.collateral, @@ -24,7 +24,7 @@ export const getEthereumInevmUSDTWarpConfig = async ( hook: '0xb87AC8EA4533AE017604E44470F7c1E550AC6F10', // aggregation of IGP and Merkle, arbitrary config not supported for now, TODO: may want to move to zero address in future }; - const inevm: TokenRouterConfig = { + const inevm: HypTokenRouterConfig = { ...routerConfig.inevm, ...abacusWorksEnvOwnerConfig.inevm, type: TokenType.synthetic, diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumSeiFastUSDWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumSeiFastUSDWarpConfig.ts index 1eb7f4a58c..73c3a5655d 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumSeiFastUSDWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumSeiFastUSDWarpConfig.ts @@ -2,8 +2,8 @@ import { ethers } from 'ethers'; import { ChainMap, + HypTokenRouterConfig, OwnableConfig, - TokenRouterConfig, TokenType, } from '@hyperlane-xyz/sdk'; @@ -20,8 +20,8 @@ const ownerConfig = getOwnerConfigForAddress(owner); export const getEthereumSeiFastUSDWarpConfig = async ( routerConfig: ChainMap, _abacusWorksEnvOwnerConfig: ChainMap, -): Promise> => { - const sei: TokenRouterConfig = { +): Promise> => { + const sei: HypTokenRouterConfig = { ...routerConfig.viction, ...ownerConfig, type: TokenType.XERC20, @@ -32,7 +32,7 @@ export const getEthereumSeiFastUSDWarpConfig = async ( interchainSecurityModule: ethers.constants.AddressZero, }; - const ethereum: TokenRouterConfig = { + const ethereum: HypTokenRouterConfig = { ...routerConfig.ethereum, ...ownerConfig, type: TokenType.collateral, diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumVictionETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumVictionETHWarpConfig.ts index a932b181b2..f058edb64b 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumVictionETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumVictionETHWarpConfig.ts @@ -1,10 +1,10 @@ +import { ethers } from 'ethers'; + import { ChainMap, + HypTokenRouterConfig, OwnableConfig, - TokenRouterConfig, TokenType, - buildAggregationIsmConfigs, - defaultMultisigConfigs, } from '@hyperlane-xyz/sdk'; import { RouterConfigWithoutOwner } from '../../../../../src/config/warp.js'; @@ -12,14 +12,8 @@ import { RouterConfigWithoutOwner } from '../../../../../src/config/warp.js'; export const getEthereumVictionETHWarpConfig = async ( routerConfig: ChainMap, abacusWorksEnvOwnerConfig: ChainMap, -): Promise> => { - const ismConfig = buildAggregationIsmConfigs( - 'ethereum', - ['viction'], - defaultMultisigConfigs, - ).viction; - - const viction: TokenRouterConfig = { +): Promise> => { + const viction: HypTokenRouterConfig = { ...routerConfig.viction, ...abacusWorksEnvOwnerConfig.viction, type: TokenType.synthetic, @@ -28,14 +22,15 @@ export const getEthereumVictionETHWarpConfig = async ( decimals: 18, totalSupply: 0, gas: 50_000, + interchainSecurityModule: ethers.constants.AddressZero, }; - const ethereum: TokenRouterConfig = { + const ethereum: HypTokenRouterConfig = { ...routerConfig.ethereum, ...abacusWorksEnvOwnerConfig.ethereum, type: TokenType.native, gas: 65_000, - interchainSecurityModule: ismConfig, + interchainSecurityModule: ethers.constants.AddressZero, }; return { diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumVictionUSDCWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumVictionUSDCWarpConfig.ts index c046753c91..7bcf283573 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumVictionUSDCWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumVictionUSDCWarpConfig.ts @@ -1,10 +1,10 @@ +import { ethers } from 'ethers'; + import { ChainMap, + HypTokenRouterConfig, OwnableConfig, - TokenRouterConfig, TokenType, - buildAggregationIsmConfigs, - defaultMultisigConfigs, } from '@hyperlane-xyz/sdk'; import { @@ -15,15 +15,8 @@ import { export const getEthereumVictionUSDCWarpConfig = async ( routerConfig: ChainMap, abacusWorksEnvOwnerConfig: ChainMap, -): Promise> => { - // commit that the config was copied from https://github.com/hyperlane-xyz/hyperlane-monorepo/pull/3067/commits/7ed5b460034ea5e140c6ff86bcd6baf6ebb824c4#diff-fab5dd1a27c76e4310699c57ccf92ab6274ef0acf17e079b17270cedf4057775R109 - const ismConfig = buildAggregationIsmConfigs( - 'ethereum', - ['viction'], - defaultMultisigConfigs, - ).viction; - - const viction: TokenRouterConfig = { +): Promise> => { + const viction: HypTokenRouterConfig = { ...routerConfig.viction, ...abacusWorksEnvOwnerConfig.viction, type: TokenType.synthetic, @@ -32,15 +25,16 @@ export const getEthereumVictionUSDCWarpConfig = async ( decimals: 6, totalSupply: 0, gas: 75_000, + interchainSecurityModule: ethers.constants.AddressZero, }; - const ethereum: TokenRouterConfig = { + const ethereum: HypTokenRouterConfig = { ...routerConfig.ethereum, ...abacusWorksEnvOwnerConfig.ethereum, type: TokenType.collateral, token: tokens.ethereum.USDC, gas: 65_000, - interchainSecurityModule: ismConfig, + interchainSecurityModule: ethers.constants.AddressZero, }; return { diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumVictionUSDTWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumVictionUSDTWarpConfig.ts index 5835f96322..3001880aa3 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumVictionUSDTWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getEthereumVictionUSDTWarpConfig.ts @@ -1,10 +1,10 @@ +import { ethers } from 'ethers'; + import { ChainMap, + HypTokenRouterConfig, OwnableConfig, - TokenRouterConfig, TokenType, - buildAggregationIsmConfigs, - defaultMultisigConfigs, } from '@hyperlane-xyz/sdk'; import { @@ -15,14 +15,8 @@ import { export const getEthereumVictionUSDTWarpConfig = async ( routerConfig: ChainMap, abacusWorksEnvOwnerConfig: ChainMap, -): Promise> => { - const ismConfig = buildAggregationIsmConfigs( - 'ethereum', - ['viction'], - defaultMultisigConfigs, - ).viction; - - const viction: TokenRouterConfig = { +): Promise> => { + const viction: HypTokenRouterConfig = { ...routerConfig.viction, ...abacusWorksEnvOwnerConfig.viction, type: TokenType.synthetic, @@ -31,15 +25,16 @@ export const getEthereumVictionUSDTWarpConfig = async ( decimals: 6, totalSupply: 0, gas: 75_000, + interchainSecurityModule: ethers.constants.AddressZero, }; - const ethereum: TokenRouterConfig = { + const ethereum: HypTokenRouterConfig = { ...routerConfig.ethereum, ...abacusWorksEnvOwnerConfig.ethereum, type: TokenType.collateral, token: tokens.ethereum.USDT, gas: 65_000, - interchainSecurityModule: ismConfig, + interchainSecurityModule: ethers.constants.AddressZero, }; return { diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getInevmInjectiveINJWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getInevmInjectiveINJWarpConfig.ts index fd1b5c2b1a..6938e4c739 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getInevmInjectiveINJWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getInevmInjectiveINJWarpConfig.ts @@ -1,7 +1,7 @@ import { ChainMap, + HypTokenRouterConfig, OwnableConfig, - TokenRouterConfig, TokenType, } from '@hyperlane-xyz/sdk'; @@ -10,17 +10,17 @@ import { RouterConfigWithoutOwner } from '../../../../../src/config/warp.js'; export const getInevmInjectiveINJWarpConfig = async ( routerConfig: ChainMap, abacusWorksEnvOwnerConfig: ChainMap, -): Promise> => { +): Promise> => { const injectiveRouter = 'inj1mv9tjvkaw7x8w8y9vds8pkfq46g2vcfkjehc6k'; - const injective: TokenRouterConfig = { + const injective: HypTokenRouterConfig = { ...routerConfig.injective, ...abacusWorksEnvOwnerConfig.injective, type: TokenType.native, foreignDeployment: injectiveRouter, }; - const inevm: TokenRouterConfig = { + const inevm: HypTokenRouterConfig = { ...routerConfig.inevm, ...abacusWorksEnvOwnerConfig.inevm, type: TokenType.native, diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getMantapacificNeutronTiaWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getMantapacificNeutronTiaWarpConfig.ts index a603ec139c..82f5c78223 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getMantapacificNeutronTiaWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getMantapacificNeutronTiaWarpConfig.ts @@ -1,7 +1,7 @@ import { ChainMap, + HypTokenRouterConfig, OwnableConfig, - TokenRouterConfig, TokenType, } from '@hyperlane-xyz/sdk'; @@ -10,16 +10,16 @@ import { RouterConfigWithoutOwner } from '../../../../../src/config/warp.js'; export const getMantapacificNeutronTiaWarpConfig = async ( routerConfig: ChainMap, abacusWorksEnvOwnerConfig: ChainMap, -): Promise> => { +): Promise> => { const neutronRouter = '0xc5fc6899019cb4a7649981d89eb7b1a0929d0a85b2d41802f3315129ad4b581a'; - // @ts-ignore - foreignDeployment configs don't conform to the TokenRouterConfig - const neutron: TokenRouterConfig = { + // @ts-ignore - foreignDeployment configs don't conform to the HypTokenRouterConfig + const neutron: HypTokenRouterConfig = { foreignDeployment: neutronRouter, }; - const mantapacific: TokenRouterConfig = { + const mantapacific: HypTokenRouterConfig = { ...routerConfig.mantapacific, ...abacusWorksEnvOwnerConfig.mantapacific, type: TokenType.synthetic, diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts index 198a708d1c..8928f2fb58 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoEZETHWarpConfig.ts @@ -1,8 +1,8 @@ import { ChainMap, + HypTokenRouterConfig, IsmType, MultisigConfig, - TokenRouterConfig, TokenType, buildAggregationIsmConfigs, } from '@hyperlane-xyz/sdk'; @@ -182,7 +182,7 @@ export const ezEthSafes: Record = { }; export const getRenzoEZETHWarpConfig = async (): Promise< - ChainMap + ChainMap > => { const registry = await getMainnet3Registry(); @@ -218,11 +218,11 @@ export const getRenzoEZETHWarpConfig = async (): Promise< ); } - const tokenConfig = Object.fromEntries( + const tokenConfig = Object.fromEntries( await Promise.all( chainsToDeploy.map( - async (chain): Promise<[string, TokenRouterConfig]> => { - const ret: [string, TokenRouterConfig] = [ + async (chain): Promise<[string, HypTokenRouterConfig]> => { + const ret: [string, HypTokenRouterConfig] = [ chain, { isNft: false, diff --git a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.ts b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.ts index b9e9b42bbd..9c269f5413 100644 --- a/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.ts +++ b/typescript/infra/config/environments/mainnet3/warp/configGetters/getRenzoPZETHWarpConfig.ts @@ -1,7 +1,7 @@ import { ChainMap, + HypTokenRouterConfig, IsmType, - TokenRouterConfig, TokenType, buildAggregationIsmConfigs, } from '@hyperlane-xyz/sdk'; @@ -30,7 +30,7 @@ const pzEthSafes: Record = { }; export const getRenzoPZETHWarpConfig = async (): Promise< - ChainMap + ChainMap > => { const registry = await getMainnet3Registry(); @@ -55,11 +55,11 @@ export const getRenzoPZETHWarpConfig = async (): Promise< ); } - const tokenConfig = Object.fromEntries( + const tokenConfig = Object.fromEntries( await Promise.all( chainsToDeploy.map( - async (chain): Promise<[string, TokenRouterConfig]> => { - const ret: [string, TokenRouterConfig] = [ + async (chain): Promise<[string, HypTokenRouterConfig]> => { + const ret: [string, HypTokenRouterConfig] = [ chain, { isNft: false, diff --git a/typescript/infra/config/environments/testnet4/agent.ts b/typescript/infra/config/environments/testnet4/agent.ts index fbf6b4b885..2bab1291ac 100644 --- a/typescript/infra/config/environments/testnet4/agent.ts +++ b/typescript/infra/config/environments/testnet4/agent.ts @@ -121,7 +121,6 @@ export const hyperlaneContextAgentChainConfig: AgentChainConfig< citreatestnet: true, connextsepolia: false, ecotestnet: true, - // Cannot scrape non-EVM chains eclipsetestnet: false, formtestnet: true, fuji: true, @@ -135,7 +134,6 @@ export const hyperlaneContextAgentChainConfig: AgentChainConfig< polygonamoy: true, scrollsepolia: true, sepolia: true, - // Cannot scrape non-EVM chains solanatestnet: false, soneiumtestnet: true, sonictestnet: true, @@ -252,7 +250,7 @@ const hyperlane: RootAgentConfig = { rpcConsensusType: RpcConsensusType.Fallback, docker: { repo, - tag: 'bb4e82b-20241107-190434', + tag: '4b280cd-20241206-130519', }, resources: scraperResources, }, diff --git a/typescript/infra/config/warp.ts b/typescript/infra/config/warp.ts index 0d93e10ddc..5c9049eb7d 100644 --- a/typescript/infra/config/warp.ts +++ b/typescript/infra/config/warp.ts @@ -1,8 +1,8 @@ import { ChainMap, + HypTokenRouterConfig, MultiProvider, OwnableConfig, - TokenRouterConfig, } from '@hyperlane-xyz/sdk'; import { objMap } from '@hyperlane-xyz/utils'; @@ -43,7 +43,7 @@ import { WarpRouteIds } from './environments/mainnet3/warp/warpIds.js'; type WarpConfigGetter = ( routerConfig: ChainMap, abacusWorksEnvOwnerConfig: ChainMap, -) => Promise>; +) => Promise>; export const warpConfigGetterMap: Record = { [WarpRouteIds.Ancient8EthereumUSDC]: getAncient8EthereumUSDCWarpConfig, @@ -84,7 +84,7 @@ export async function getWarpConfig( multiProvider: MultiProvider, envConfig: EnvironmentConfig, warpRouteId: string, -): Promise> { +): Promise> { const routerConfig = await getRouterConfigsForAllVms( envConfig, multiProvider, diff --git a/typescript/infra/package.json b/typescript/infra/package.json index cecef43323..6f67d4ae23 100644 --- a/typescript/infra/package.json +++ b/typescript/infra/package.json @@ -1,7 +1,7 @@ { "name": "@hyperlane-xyz/infra", "description": "Infrastructure utilities for the Hyperlane Network", - "version": "7.2.0", + "version": "7.3.0", "dependencies": { "@arbitrum/sdk": "^4.0.0", "@aws-sdk/client-iam": "^3.74.0", @@ -13,10 +13,10 @@ "@ethersproject/hardware-wallets": "^5.7.0", "@ethersproject/providers": "*", "@google-cloud/secret-manager": "^5.5.0", - "@hyperlane-xyz/helloworld": "7.2.0", - "@hyperlane-xyz/registry": "6.1.0", - "@hyperlane-xyz/sdk": "7.2.0", - "@hyperlane-xyz/utils": "7.2.0", + "@hyperlane-xyz/helloworld": "7.3.0", + "@hyperlane-xyz/registry": "6.3.0", + "@hyperlane-xyz/sdk": "7.3.0", + "@hyperlane-xyz/utils": "7.3.0", "@inquirer/prompts": "3.3.2", "@nomiclabs/hardhat-etherscan": "^3.0.3", "@safe-global/api-kit": "1.3.0", diff --git a/typescript/infra/scripts/check/check-utils.ts b/typescript/infra/scripts/check/check-utils.ts index a8289671a0..ef7a2b1215 100644 --- a/typescript/infra/scripts/check/check-utils.ts +++ b/typescript/infra/scripts/check/check-utils.ts @@ -30,6 +30,7 @@ import { DeployEnvironment } from '../../src/config/environment.js'; import { HyperlaneAppGovernor } from '../../src/govern/HyperlaneAppGovernor.js'; import { HyperlaneCoreGovernor } from '../../src/govern/HyperlaneCoreGovernor.js'; import { HyperlaneHaasGovernor } from '../../src/govern/HyperlaneHaasGovernor.js'; +import { HyperlaneICAChecker } from '../../src/govern/HyperlaneICAChecker.js'; import { HyperlaneIgpGovernor } from '../../src/govern/HyperlaneIgpGovernor.js'; import { ProxiedRouterGovernor } from '../../src/govern/ProxiedRouterGovernor.js'; import { Role } from '../../src/roles.js'; @@ -148,7 +149,7 @@ export async function getGovernor( governor = new ProxiedRouterGovernor(checker); } else if (module === Modules.HAAS) { chainsToSkip.forEach((chain) => delete routerConfig[chain]); - const icaChecker = new InterchainAccountChecker( + const icaChecker = new HyperlaneICAChecker( multiProvider, ica, objFilter( diff --git a/typescript/infra/scripts/safes/parse-txs.ts b/typescript/infra/scripts/safes/parse-txs.ts index 94e974abdc..21e8f87eed 100644 --- a/typescript/infra/scripts/safes/parse-txs.ts +++ b/typescript/infra/scripts/safes/parse-txs.ts @@ -1,7 +1,12 @@ import { BigNumber } from 'ethers'; import { AnnotatedEV5Transaction } from '@hyperlane-xyz/sdk'; -import { stringifyObject } from '@hyperlane-xyz/utils'; +import { + LogFormat, + LogLevel, + configureRootLogger, + stringifyObject, +} from '@hyperlane-xyz/utils'; import { GovernTransactionReader } from '../../src/tx/govern-transaction-reader.js'; import { getSafeTx } from '../../src/utils/safe.js'; @@ -13,15 +18,21 @@ async function main() { withChainsRequired(getArgs()), ).argv; + configureRootLogger(LogFormat.Pretty, LogLevel.Info); + const config = getEnvironmentConfig(environment); const multiProvider = await config.getMultiProvider(); const { chainAddresses } = await getHyperlaneCore(environment, multiProvider); + const registry = await config.getRegistry(); + const warpRoutes = await registry.getWarpRoutes(); + const reader = new GovernTransactionReader( environment, multiProvider, chainAddresses, config.core, + warpRoutes, ); const chainResultEntries = await Promise.all( diff --git a/typescript/infra/src/config/chain.ts b/typescript/infra/src/config/chain.ts index a7bb7c9f95..49156cb125 100644 --- a/typescript/infra/src/config/chain.ts +++ b/typescript/infra/src/config/chain.ts @@ -24,6 +24,9 @@ export const chainsToSkip: ChainName[] = [ // mainnets 'zksync', 'zeronetwork', + 'zklink', + 'treasure', + // testnets 'abstracttestnet', 'treasuretopaz', diff --git a/typescript/infra/src/config/warp.ts b/typescript/infra/src/config/warp.ts index 467386f07d..2ee4314cbe 100644 --- a/typescript/infra/src/config/warp.ts +++ b/typescript/infra/src/config/warp.ts @@ -1,9 +1,4 @@ -import { - ChainMap, - OwnableConfig, - RouterConfig, - TokenRouterConfig, -} from '@hyperlane-xyz/sdk'; +import { ChainMap, OwnableConfig, RouterConfig } from '@hyperlane-xyz/sdk'; import { Address } from '@hyperlane-xyz/utils'; // Common collateral tokens to be used by warp route deployments. diff --git a/typescript/infra/src/govern/HyperlaneAppGovernor.ts b/typescript/infra/src/govern/HyperlaneAppGovernor.ts index a704b3d9b8..1d7b5167e3 100644 --- a/typescript/infra/src/govern/HyperlaneAppGovernor.ts +++ b/typescript/infra/src/govern/HyperlaneAppGovernor.ts @@ -486,6 +486,20 @@ export abstract class HyperlaneAppGovernor< await this.checkSubmitterBalance(chain, submitterAddress, call.value); } + // Check if the submitter is the owner of the contract + try { + const ownable = Ownable__factory.connect(call.to, signer); + const owner = await ownable.owner(); + const isOwner = eqAddress(owner, submitterAddress); + + if (!isOwner) { + return false; + } + } catch { + // If the contract does not implement Ownable, just continue + // with the next check. + } + // Check if the transaction has additional success criteria if ( additionalTxSuccessCriteria && diff --git a/typescript/infra/src/govern/HyperlaneHaasGovernor.ts b/typescript/infra/src/govern/HyperlaneHaasGovernor.ts index 921649c5b9..6fa6ebcd18 100644 --- a/typescript/infra/src/govern/HyperlaneHaasGovernor.ts +++ b/typescript/infra/src/govern/HyperlaneHaasGovernor.ts @@ -5,7 +5,6 @@ import { HyperlaneCore, HyperlaneCoreChecker, InterchainAccount, - InterchainAccountChecker, } from '@hyperlane-xyz/sdk'; import { @@ -13,6 +12,7 @@ import { HyperlaneAppGovernor, } from './HyperlaneAppGovernor.js'; import { HyperlaneCoreGovernor } from './HyperlaneCoreGovernor.js'; +import { HyperlaneICAChecker } from './HyperlaneICAChecker.js'; import { ProxiedRouterGovernor } from './ProxiedRouterGovernor.js'; export class HyperlaneHaasGovernor extends HyperlaneAppGovernor< @@ -24,7 +24,7 @@ export class HyperlaneHaasGovernor extends HyperlaneAppGovernor< constructor( ica: InterchainAccount, - private readonly icaChecker: InterchainAccountChecker, + private readonly icaChecker: HyperlaneICAChecker, private readonly coreChecker: HyperlaneCoreChecker, ) { super(coreChecker, ica); diff --git a/typescript/infra/src/govern/HyperlaneICAChecker.ts b/typescript/infra/src/govern/HyperlaneICAChecker.ts new file mode 100644 index 0000000000..cb72bd73a6 --- /dev/null +++ b/typescript/infra/src/govern/HyperlaneICAChecker.ts @@ -0,0 +1,63 @@ +import { + ChainMap, + ChainName, + InterchainAccountChecker, + RouterViolation, + RouterViolationType, +} from '@hyperlane-xyz/sdk'; +import { AddressBytes32, addressToBytes32 } from '@hyperlane-xyz/utils'; + +export class HyperlaneICAChecker extends InterchainAccountChecker { + /* + * Check that the Ethereum router is enrolled correctly, + * and that remote chains have the correct router enrolled. + */ + async checkEthRouterEnrollment(chain: ChainName): Promise { + // If the chain is Ethereum, do the regular full check + if (chain === 'ethereum') { + return super.checkEnrolledRouters(chain); + } + + // Get the Ethereum router address and domain id + const ethereumRouterAddress = this.app.routerAddress('ethereum'); + const ethereumDomainId = this.multiProvider.getDomainId('ethereum'); + // Get the expected Ethereum router address (with padding) + const expectedRouter = addressToBytes32(ethereumRouterAddress); + + // Get the actual Ethereum router address + const router = this.app.router(this.app.getContracts(chain)); + const actualRouter = await router.routers(ethereumDomainId); + + // Check if the actual router address matches the expected router address + if (actualRouter !== expectedRouter) { + const currentRouters: ChainMap = { ethereum: actualRouter }; + const expectedRouters: ChainMap = { + ethereum: expectedRouter, + }; + const routerDiff: ChainMap<{ + actual: AddressBytes32; + expected: AddressBytes32; + }> = { + ethereum: { actual: actualRouter, expected: expectedRouter }, + }; + + const violation: RouterViolation = { + chain, + type: RouterViolationType.EnrolledRouter, + contract: router, + actual: currentRouters, + expected: expectedRouters, + routerDiff, + description: `Ethereum router is not enrolled correctly`, + }; + this.addViolation(violation); + } + } + + async checkChain(chain: ChainName): Promise { + await this.checkMailboxClient(chain); + await this.checkEthRouterEnrollment(chain); + await this.checkProxiedContracts(chain); + await this.checkOwnership(chain); + } +} diff --git a/typescript/infra/src/tx/govern-transaction-reader.ts b/typescript/infra/src/tx/govern-transaction-reader.ts index 1a6108697d..ef82ab1e1a 100644 --- a/typescript/infra/src/tx/govern-transaction-reader.ts +++ b/typescript/infra/src/tx/govern-transaction-reader.ts @@ -4,9 +4,11 @@ import { MetaTransactionData, OperationType, } from '@safe-global/safe-core-sdk-types'; +import assert from 'assert'; import chalk from 'chalk'; import { BigNumber, ethers } from 'ethers'; +import { ProxyAdmin__factory, TokenRouter__factory } from '@hyperlane-xyz/core'; import { AnnotatedEV5Transaction, ChainMap, @@ -16,6 +18,7 @@ import { EvmIsmReader, InterchainAccount, MultiProvider, + WarpCoreConfig, coreFactories, interchainAccountFactories, normalizeConfig, @@ -83,12 +86,28 @@ export class GovernTransactionReader { module: 'GovernTransactionReader', }); + readonly warpRouteIndex: ChainMap< + Record + > = {}; + constructor( readonly environment: DeployEnvironment, readonly multiProvider: MultiProvider, readonly chainAddresses: ChainMap>, readonly coreConfig: ChainMap, - ) {} + warpRoutes: Record, + ) { + // Populate maps with warp route addresses and additional token details + for (const warpRoute of Object.values(warpRoutes)) { + for (const token of Object.values(warpRoute.tokens)) { + const address = token.addressOrDenom?.toLowerCase() ?? ''; + if (!this.warpRouteIndex[token.chainName]) { + this.warpRouteIndex[token.chainName] = {}; + } + this.warpRouteIndex[token.chainName][address] = token; + } + } + } async read( chain: ChainName, @@ -104,10 +123,21 @@ export class GovernTransactionReader { return this.readMailboxTransaction(chain, tx); } + // If it's to a Proxy Admin + if (this.isProxyAdminTransaction(chain, tx)) { + return this.readProxyAdminTransaction(chain, tx); + } + + // If it's a Multisend if (await this.isMultisendTransaction(chain, tx)) { return this.readMultisendTransaction(chain, tx); } + // If it's a Warp Module transaction + if (this.isWarpModuleTransaction(chain, tx)) { + return this.readWarpModuleTransaction(chain, tx); + } + const insight = '⚠️ Unknown transaction type'; // If we get here, it's an unknown transaction this.errors.push({ @@ -123,6 +153,121 @@ export class GovernTransactionReader { }; } + private isWarpModuleTransaction( + chain: ChainName, + tx: AnnotatedEV5Transaction, + ): boolean { + return ( + tx.to !== undefined && + this.warpRouteIndex[chain] !== undefined && + this.warpRouteIndex[chain][tx.to.toLowerCase()] !== undefined + ); + } + + private async readWarpModuleTransaction( + chain: ChainName, + tx: AnnotatedEV5Transaction, + ): Promise { + if (!tx.data) { + throw new Error('No data in Warp Module transaction'); + } + + const { symbol } = await this.multiProvider.getNativeToken(chain); + const tokenRouterInterface = TokenRouter__factory.createInterface(); + + const decoded = tokenRouterInterface.parseTransaction({ + data: tx.data, + value: tx.value, + }); + + const args = formatFunctionFragmentArgs( + decoded.args, + decoded.functionFragment, + ); + + let insight = ''; + + if ( + decoded.functionFragment.name === + tokenRouterInterface.functions['setHook(address)'].name + ) { + const [hookAddress] = decoded.args; + insight = `Set hook to ${hookAddress}`; + } + + if ( + decoded.functionFragment.name === + tokenRouterInterface.functions['setInterchainSecurityModule(address)'] + .name + ) { + const [ismAddress] = decoded.args; + insight = `Set ISM to ${ismAddress}`; + } + + if ( + decoded.functionFragment.name === + tokenRouterInterface.functions['setDestinationGas((uint32,uint256)[])'] + .name + ) { + const [gasConfigs] = decoded.args; + const insights = gasConfigs.map( + (config: { domain: number; gas: BigNumber }) => { + const chainName = this.multiProvider.getChainName(config.domain); + return `domain ${ + config.domain + } (${chainName}) to ${config.gas.toString()}`; + }, + ); + insight = `Set destination gas for ${insights.join(', ')}`; + } + + if ( + decoded.functionFragment.name === + tokenRouterInterface.functions['enrollRemoteRouters(uint32[],bytes32[])'] + .name + ) { + const [domains, routers] = decoded.args; + const insights = domains.map((domain: number, index: number) => { + const chainName = this.multiProvider.getChainName(domain); + return `domain ${domain} (${chainName}) to ${routers[index]}`; + }); + insight = `Enroll remote routers for ${insights.join(', ')}`; + } + + if ( + decoded.functionFragment.name === + tokenRouterInterface.functions['unenrollRemoteRouter(uint32)'].name + ) { + const [domain] = decoded.args; + const chainName = this.multiProvider.getChainName(domain); + insight = `Unenroll remote router for domain ${domain} (${chainName})`; + } + + if ( + decoded.functionFragment.name === + tokenRouterInterface.functions['unenrollRemoteRouters(uint32[])'].name + ) { + const [domains] = decoded.args; + const insights = domains.map((domain: number) => { + const chainName = this.multiProvider.getChainName(domain); + return `domain ${domain} (${chainName})`; + }); + insight = `Unenroll remote routers for ${insights.join(', ')}`; + } + + assert(tx.to, 'Warp Module transaction must have a to address'); + const token = this.warpRouteIndex[chain][tx.to.toLowerCase()]; + + return { + chain, + to: `${token.symbol} (${token.name}, ${token.standard})`, + insight, + value: `${ethers.utils.formatEther(decoded.value)} ${symbol}`, + signature: decoded.signature, + args, + }; + } + private async readIcaTransaction( chain: ChainName, tx: AnnotatedEV5Transaction, @@ -242,6 +387,43 @@ export class GovernTransactionReader { }; } + private async readProxyAdminTransaction( + chain: ChainName, + tx: AnnotatedEV5Transaction, + ): Promise { + if (!tx.data) { + throw new Error('⚠️ No data in proxyAdmin transaction'); + } + + const proxyAdminInterface = ProxyAdmin__factory.createInterface(); + const decoded = proxyAdminInterface.parseTransaction({ + data: tx.data, + value: tx.value, + }); + + const args = formatFunctionFragmentArgs( + decoded.args, + decoded.functionFragment, + ); + + let insight; + if ( + decoded.functionFragment.name === + proxyAdminInterface.functions['transferOwnership(address)'].name + ) { + const [newOwner] = decoded.args; + insight = `Transfer ownership to ${newOwner}`; + } + + return { + chain, + to: `Proxy Admin (${chain} ${this.chainAddresses[chain].proxyAdmin})`, + insight, + signature: decoded.signature, + args, + }; + } + private ismDerivationsInProgress: ChainMap = {}; private async deriveIsmConfig( @@ -461,6 +643,16 @@ export class GovernTransactionReader { ); } + isProxyAdminTransaction( + chain: ChainName, + tx: AnnotatedEV5Transaction, + ): boolean { + return ( + tx.to !== undefined && + eqAddress(tx.to, this.chainAddresses[chain].proxyAdmin) + ); + } + async isMultisendTransaction( chain: ChainName, tx: AnnotatedEV5Transaction, diff --git a/typescript/sdk/CHANGELOG.md b/typescript/sdk/CHANGELOG.md index 32548ed297..97f1f2a252 100644 --- a/typescript/sdk/CHANGELOG.md +++ b/typescript/sdk/CHANGELOG.md @@ -1,5 +1,28 @@ # @hyperlane-xyz/sdk +## 7.3.0 + +### Minor Changes + +- 2054f4f5b: Require Sealevel native transfers to cover the rent of the recipient +- a96448fa6: Add logic into SDK to enable warp route unenrollment +- 170a0fc73: Add `createHookUpdateTxs()` to `WarpModule.update()` such that it 1) deploys a hook for a warp route _without_ an existing hook, or 2) update an existing hook. +- 9a09afcc7: Deploy to appchain, treasure, zklink. +- 24784af95: Introduce GcpValidator for retrieving announcements, checkpoints and metadata for a Validator posting to a GCP bucket. Uses GcpStorageWrapper for bucket operations. +- 3e8dd70ac: Update validators for boba, duckchain, unichain, vana, bsquared, superseed. Update oort's own validator. Update blockpi's viction validator. Adad luganodes/dsrv to flame validator set. +- aa1ea9a48: updates the warp deployment config schema to be closer to the ica routing schema +- f0b98fdef: Updated the derivation logic to enable ICA ISM metadata building from on chain data to enable self relaying of ICA messages +- ff9e8a72b: Added a getter to derive ATA payer accounts on Sealevel warp routes +- 97c1f80b7: Implement Sealevel IGP quoting +- 323f0f158: Add ICAs management in core apply command +- 61157097b: Deploy to swell & lumiaprism. Parallelise router enrollment in HyperlaneRouterDeployer. + +### Patch Changes + +- 665a7b8d8: Added decimal consistency checks to the Token checker + - @hyperlane-xyz/utils@7.3.0 + - @hyperlane-xyz/core@5.8.3 + ## 7.2.0 ### Minor Changes diff --git a/typescript/sdk/package.json b/typescript/sdk/package.json index 2a70af0756..6415bb0e2b 100644 --- a/typescript/sdk/package.json +++ b/typescript/sdk/package.json @@ -1,7 +1,7 @@ { "name": "@hyperlane-xyz/sdk", "description": "The official SDK for the Hyperlane Network", - "version": "7.2.0", + "version": "7.3.0", "dependencies": { "@arbitrum/sdk": "^4.0.0", "@aws-sdk/client-s3": "^3.577.0", @@ -9,8 +9,8 @@ "@cosmjs/cosmwasm-stargate": "^0.32.4", "@cosmjs/stargate": "^0.32.4", "@google-cloud/storage": "7.14.0", - "@hyperlane-xyz/core": "5.8.2", - "@hyperlane-xyz/utils": "7.2.0", + "@hyperlane-xyz/core": "5.8.3", + "@hyperlane-xyz/utils": "7.3.0", "@safe-global/api-kit": "1.3.0", "@safe-global/protocol-kit": "1.3.0", "@safe-global/safe-deployments": "1.37.8", diff --git a/typescript/sdk/src/consts/multisigIsm.ts b/typescript/sdk/src/consts/multisigIsm.ts index 377da588f7..867059be1d 100644 --- a/typescript/sdk/src/consts/multisigIsm.ts +++ b/typescript/sdk/src/consts/multisigIsm.ts @@ -45,7 +45,7 @@ export const defaultMultisigConfigs: ChainMap = { }, alephzeroevmmainnet: { - threshold: 2, + threshold: 3, validators: [ { address: '0x33f20e6e775747d60301c6ea1c50e51f0389740c', @@ -53,6 +53,10 @@ export const defaultMultisigConfigs: ChainMap = { }, DEFAULT_MERKLY_VALIDATOR, DEFAULT_MITOSIS_VALIDATOR, + { + address: '0xCbf382214825F8c2f347dd4f23F0aDFaFad55dAa', + alias: 'Aleph Zero', + }, ], }, @@ -114,6 +118,18 @@ export const defaultMultisigConfigs: ChainMap = { ], }, + appchain: { + threshold: 2, + validators: [ + { + address: '0x0531251bbadc1f9f19ccce3ca6b3f79f08eae1be', + alias: AW_VALIDATOR_ALIAS, + }, + DEFAULT_MERKLY_VALIDATOR, + DEFAULT_MITOSIS_VALIDATOR, + ], + }, + arbitrum: { threshold: 3, validators: [ @@ -878,6 +894,10 @@ export const defaultMultisigConfigs: ChainMap = { address: '0xf0da628f3fb71652d48260bad4691054045832ce', alias: 'Luganodes', }, + { + address: '0xead4141b6ea149901ce4f4b556953f66d04b1d0c', + alias: 'Lisk', + }, ], }, @@ -909,12 +929,14 @@ export const defaultMultisigConfigs: ChainMap = { }, lumiaprism: { - threshold: 1, + threshold: 2, validators: [ { address: '0xb69731640ffd4338a2c9358a935b0274c6463f85', alias: AW_VALIDATOR_ALIAS, }, + DEFAULT_MERKLY_VALIDATOR, + DEFAULT_MITOSIS_VALIDATOR, ], }, @@ -1573,12 +1595,18 @@ export const defaultMultisigConfigs: ChainMap = { }, swell: { - threshold: 1, + threshold: 3, validators: [ { address: '0x4f51e4f4c7fb45d82f91568480a1a2cfb69216ed', alias: AW_VALIDATOR_ALIAS, }, + { + address: '0x9eadf9217be22d9878e0e464727a2176d5c69ff8', + alias: 'Luganodes', + }, + DEFAULT_MERKLY_VALIDATOR, + DEFAULT_MITOSIS_VALIDATOR, ], }, @@ -1613,6 +1641,25 @@ export const defaultMultisigConfigs: ChainMap = { ], }, + treasure: { + threshold: 3, + validators: [ + { + address: '0x6ad994819185553e8baa01533f0cd2c7cadfe6cc', + alias: AW_VALIDATOR_ALIAS, + }, + { + address: '0x278460fa51ff448eb53ffa62951b4b8e3e8f74e3', + alias: 'P2P', + }, + { + address: '0xe92ff70bb463e2aa93426fd2ba51afc39567d426', + alias: 'Treasure', + }, + DEFAULT_MITOSIS_VALIDATOR, + ], + }, + treasuretopaz: { threshold: 1, validators: [ @@ -1646,7 +1693,7 @@ export const defaultMultisigConfigs: ChainMap = { }, vana: { - threshold: 2, + threshold: 3, validators: [ { address: '0xfdf3b0dfd4b822d10cacb15c8ae945ea269e7534', @@ -1654,6 +1701,10 @@ export const defaultMultisigConfigs: ChainMap = { }, DEFAULT_MERKLY_VALIDATOR, DEFAULT_MITOSIS_VALIDATOR, + { + address: '0xba2f4f89cae6863d8b49e4ca0208ed48ad9ac354', + alias: 'P2P', + }, ], }, @@ -1761,6 +1812,18 @@ export const defaultMultisigConfigs: ChainMap = { ], }, + zklink: { + threshold: 2, + validators: [ + { + address: '0x217a8cb4789fc45abf56cb6e2ca96f251a5ac181', + alias: AW_VALIDATOR_ALIAS, + }, + DEFAULT_MERKLY_VALIDATOR, + DEFAULT_MITOSIS_VALIDATOR, + ], + }, + zksync: { threshold: 3, validators: [ diff --git a/typescript/sdk/src/contracts/contracts.ts b/typescript/sdk/src/contracts/contracts.ts index 52f6606cf5..df235c7e3f 100644 --- a/typescript/sdk/src/contracts/contracts.ts +++ b/typescript/sdk/src/contracts/contracts.ts @@ -14,11 +14,10 @@ import { promiseObjAll, } from '@hyperlane-xyz/utils'; -import { OwnableConfig } from '../deploy/types.js'; import { ChainMetadataManager } from '../metadata/ChainMetadataManager.js'; import { MultiProvider } from '../providers/MultiProvider.js'; import { AnnotatedEV5Transaction } from '../providers/ProviderType.js'; -import { ChainMap, Connection } from '../types.js'; +import { ChainMap, Connection, OwnableConfig } from '../types.js'; import { HyperlaneAddresses, diff --git a/typescript/sdk/src/core/EvmCoreModule.ts b/typescript/sdk/src/core/EvmCoreModule.ts index cc9c8793e7..cf6e06d132 100644 --- a/typescript/sdk/src/core/EvmCoreModule.ts +++ b/typescript/sdk/src/core/EvmCoreModule.ts @@ -23,8 +23,12 @@ import { HyperlaneAddresses, HyperlaneContractsMap, } from '../contracts/types.js'; -import { CoreConfigSchema, DeployedCoreAddresses } from '../core/schemas.js'; -import { CoreConfig, DerivedCoreConfig } from '../core/types.js'; +import { + CoreConfig, + CoreConfigSchema, + DeployedCoreAddresses, + DerivedCoreConfig, +} from '../core/types.js'; import { HyperlaneProxyFactoryDeployer } from '../deploy/HyperlaneProxyFactoryDeployer.js'; import { ProxyFactoryFactories, diff --git a/typescript/sdk/src/core/EvmCoreReader.ts b/typescript/sdk/src/core/EvmCoreReader.ts index 6b9630ecd2..f6ff5089b4 100644 --- a/typescript/sdk/src/core/EvmCoreReader.ts +++ b/typescript/sdk/src/core/EvmCoreReader.ts @@ -10,12 +10,11 @@ import { import { DEFAULT_CONTRACT_READ_CONCURRENCY } from '../consts/concurrency.js'; import { proxyAdmin } from '../deploy/proxy.js'; -import { DeployedOwnableConfig } from '../deploy/types.js'; import { EvmHookReader } from '../hook/EvmHookReader.js'; import { EvmIcaRouterReader } from '../ica/EvmIcaReader.js'; import { EvmIsmReader } from '../ism/EvmIsmReader.js'; import { MultiProvider } from '../providers/MultiProvider.js'; -import { ChainNameOrId } from '../types.js'; +import { ChainNameOrId, DeployedOwnableConfig } from '../types.js'; import { CoreConfig, DerivedCoreConfig } from './types.js'; diff --git a/typescript/sdk/src/core/HyperlaneCore.ts b/typescript/sdk/src/core/HyperlaneCore.ts index 1623e23d95..43940105db 100644 --- a/typescript/sdk/src/core/HyperlaneCore.ts +++ b/typescript/sdk/src/core/HyperlaneCore.ts @@ -30,13 +30,12 @@ import { HyperlaneAddressesMap, HyperlaneContracts, } from '../contracts/types.js'; -import { OwnableConfig } from '../deploy/types.js'; import { DerivedHookConfig, EvmHookReader } from '../hook/EvmHookReader.js'; import { DerivedIsmConfig, EvmIsmReader } from '../ism/EvmIsmReader.js'; import { ChainTechnicalStack } from '../metadata/chainMetadataTypes.js'; import { MultiProvider } from '../providers/MultiProvider.js'; import { RouterConfig } from '../router/types.js'; -import { ChainMap, ChainName } from '../types.js'; +import { ChainMap, ChainName, OwnableConfig } from '../types.js'; import { findMatchingLogEvents } from '../utils/logUtils.js'; import { CoreFactories, coreFactories } from './contracts.js'; diff --git a/typescript/sdk/src/core/HyperlaneRelayer.ts b/typescript/sdk/src/core/HyperlaneRelayer.ts index 48ddfd3234..9b82f90cbb 100644 --- a/typescript/sdk/src/core/HyperlaneRelayer.ts +++ b/typescript/sdk/src/core/HyperlaneRelayer.ts @@ -2,7 +2,6 @@ import { ethers, providers } from 'ethers'; import { Logger } from 'pino'; import { z } from 'zod'; -import { ChainMap } from '@hyperlane-xyz/sdk'; import { Address, ParsedMessage, @@ -22,7 +21,7 @@ import { DerivedIsmConfig, EvmIsmReader } from '../ism/EvmIsmReader.js'; import { BaseMetadataBuilder } from '../ism/metadata/builder.js'; import { IsmConfigSchema } from '../ism/types.js'; import { MultiProvider } from '../providers/MultiProvider.js'; -import { ChainName } from '../types.js'; +import { ChainMap, ChainName } from '../types.js'; import { HyperlaneCore } from './HyperlaneCore.js'; import { DispatchedMessage } from './types.js'; diff --git a/typescript/sdk/src/core/schemas.ts b/typescript/sdk/src/core/schemas.ts deleted file mode 100644 index 193d52e27c..0000000000 --- a/typescript/sdk/src/core/schemas.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { z } from 'zod'; - -import { ProxyFactoryFactoriesSchema } from '../deploy/schemas.js'; -import { HookConfigSchema } from '../hook/types.js'; -import { - DerivedIcaRouterConfigSchema, - IcaRouterConfigSchema, -} from '../ica/schemas.js'; -import { IsmConfigSchema } from '../ism/types.js'; -import { DeployedOwnableSchema, OwnableSchema } from '../schemas.js'; - -export const CoreConfigSchema = OwnableSchema.extend({ - defaultIsm: IsmConfigSchema, - defaultHook: HookConfigSchema, - requiredHook: HookConfigSchema, - // These field are set as optional because the old core config - // did not have them and we want to maintain backward compatibility - proxyAdmin: DeployedOwnableSchema.optional(), - interchainAccountRouter: IcaRouterConfigSchema.optional(), -}); - -export const DerivedCoreConfigSchema = CoreConfigSchema.merge( - z.object({ - interchainAccountRouter: DerivedIcaRouterConfigSchema.optional(), - }), -); - -export const DeployedCoreAddressesSchema = ProxyFactoryFactoriesSchema.extend({ - mailbox: z.string(), - validatorAnnounce: z.string(), - proxyAdmin: z.string(), - testRecipient: z.string(), - timelockController: z.string().optional(), - interchainAccountRouter: z.string(), - interchainAccountIsm: z.string(), - merkleTreeHook: z.string().optional(), - interchainGasPaymaster: z.string().optional(), -}); - -export type DeployedCoreAddresses = z.infer; diff --git a/typescript/sdk/src/core/types.ts b/typescript/sdk/src/core/types.ts index 1772c7a5c6..d14eca1173 100644 --- a/typescript/sdk/src/core/types.ts +++ b/typescript/sdk/src/core/types.ts @@ -5,10 +5,46 @@ import type { Address, ParsedMessage } from '@hyperlane-xyz/utils'; import type { UpgradeConfig } from '../deploy/proxy.js'; import type { CheckerViolation } from '../deploy/types.js'; +import { ProxyFactoryFactoriesSchema } from '../deploy/types.js'; +import { HookConfigSchema } from '../hook/types.js'; +import { + DerivedIcaRouterConfigSchema, + IcaRouterConfigSchema, +} from '../ica/types.js'; import type { IsmConfig } from '../ism/types.js'; +import { IsmConfigSchema } from '../ism/types.js'; import type { ChainName } from '../types.js'; +import { DeployedOwnableSchema, OwnableSchema } from '../types.js'; -import { CoreConfigSchema, DerivedCoreConfigSchema } from './schemas.js'; +export const CoreConfigSchema = OwnableSchema.extend({ + defaultIsm: IsmConfigSchema, + defaultHook: HookConfigSchema, + requiredHook: HookConfigSchema, + // These field are set as optional because the old core config + // did not have them and we want to maintain backward compatibility + proxyAdmin: DeployedOwnableSchema.optional(), + interchainAccountRouter: IcaRouterConfigSchema.optional(), +}); + +export const DerivedCoreConfigSchema = CoreConfigSchema.merge( + z.object({ + interchainAccountRouter: DerivedIcaRouterConfigSchema.optional(), + }), +); + +export const DeployedCoreAddressesSchema = ProxyFactoryFactoriesSchema.extend({ + mailbox: z.string(), + validatorAnnounce: z.string(), + proxyAdmin: z.string(), + testRecipient: z.string(), + timelockController: z.string().optional(), + interchainAccountRouter: z.string(), + interchainAccountIsm: z.string(), + merkleTreeHook: z.string().optional(), + interchainGasPaymaster: z.string().optional(), +}); + +export type DeployedCoreAddresses = z.infer; export type CoreConfig = z.infer & { remove?: boolean; diff --git a/typescript/sdk/src/deploy/HyperlaneDeployer.ts b/typescript/sdk/src/deploy/HyperlaneDeployer.ts index c578ee30bf..74febabe91 100644 --- a/typescript/sdk/src/deploy/HyperlaneDeployer.ts +++ b/typescript/sdk/src/deploy/HyperlaneDeployer.ts @@ -39,7 +39,7 @@ import { import { InterchainAccount } from '../middleware/account/InterchainAccount.js'; import { MultiProvider } from '../providers/MultiProvider.js'; import { MailboxClientConfig } from '../router/types.js'; -import { ChainMap, ChainName } from '../types.js'; +import { ChainMap, ChainName, OwnableConfig } from '../types.js'; import { getZKSyncArtifactByContractName } from '../utils/zksync.js'; import { @@ -50,7 +50,6 @@ import { proxyConstructorArgs, proxyImplementation, } from './proxy.js'; -import { OwnableConfig } from './types.js'; import { ContractVerifier } from './verify/ContractVerifier.js'; import { ZKSyncContractVerifier } from './verify/ZKSyncContractVerifier.js'; import { diff --git a/typescript/sdk/src/deploy/proxy.ts b/typescript/sdk/src/deploy/proxy.ts index 1cd8eb6b17..dd895643bd 100644 --- a/typescript/sdk/src/deploy/proxy.ts +++ b/typescript/sdk/src/deploy/proxy.ts @@ -6,8 +6,7 @@ import { Address, ChainId, eqAddress } from '@hyperlane-xyz/utils'; import { transferOwnershipTransactions } from '../contracts/contracts.js'; import { AnnotatedEV5Transaction } from '../providers/ProviderType.js'; - -import { DeployedOwnableConfig } from './types.js'; +import { DeployedOwnableConfig } from '../types.js'; type Provider = ethers.providers.Provider | ZKSyncProvider; diff --git a/typescript/sdk/src/deploy/schemas.ts b/typescript/sdk/src/deploy/schemas.ts deleted file mode 100644 index 72d70947f9..0000000000 --- a/typescript/sdk/src/deploy/schemas.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { z } from 'zod'; - -export const OwnerSchema = z.string(); - -export const OwnableConfigSchema = z.object({ - owner: OwnerSchema, -}); - -export const ProxyFactoryFactoriesSchema = z.object({ - staticMerkleRootMultisigIsmFactory: z.string(), - staticMessageIdMultisigIsmFactory: z.string(), - staticAggregationIsmFactory: z.string(), - staticAggregationHookFactory: z.string(), - domainRoutingIsmFactory: z.string(), - staticMerkleRootWeightedMultisigIsmFactory: z.string(), - staticMessageIdWeightedMultisigIsmFactory: z.string(), -}); - -export type ProxyFactoryFactoriesAddresses = z.infer< - typeof ProxyFactoryFactoriesSchema ->; diff --git a/typescript/sdk/src/deploy/types.ts b/typescript/sdk/src/deploy/types.ts index c1612d10d2..62ba684d09 100644 --- a/typescript/sdk/src/deploy/types.ts +++ b/typescript/sdk/src/deploy/types.ts @@ -8,12 +8,21 @@ import type { } from '@hyperlane-xyz/core'; import { Address } from '@hyperlane-xyz/utils'; -import { DeployedOwnableSchema, OwnableSchema } from '../schemas.js'; import type { ChainName } from '../types.js'; -export type OwnableConfig = z.infer; +export const ProxyFactoryFactoriesSchema = z.object({ + staticMerkleRootMultisigIsmFactory: z.string(), + staticMessageIdMultisigIsmFactory: z.string(), + staticAggregationIsmFactory: z.string(), + staticAggregationHookFactory: z.string(), + domainRoutingIsmFactory: z.string(), + staticMerkleRootWeightedMultisigIsmFactory: z.string(), + staticMessageIdWeightedMultisigIsmFactory: z.string(), +}); -export type DeployedOwnableConfig = z.infer; +export type ProxyFactoryFactoriesAddresses = z.infer< + typeof ProxyFactoryFactoriesSchema +>; export interface CheckerViolation { chain: ChainName; diff --git a/typescript/sdk/src/hook/types.ts b/typescript/sdk/src/hook/types.ts index 0dafccd907..51dbe48641 100644 --- a/typescript/sdk/src/hook/types.ts +++ b/typescript/sdk/src/hook/types.ts @@ -1,10 +1,13 @@ import { z } from 'zod'; -import { OwnableConfig } from '../deploy/types.js'; import { StorageGasOracleConfigSchema } from '../gas/oracle/types.js'; import { ZHash } from '../metadata/customZodTypes.js'; -import { OwnableSchema, PausableSchema } from '../schemas.js'; -import { ChainMap } from '../types.js'; +import { + ChainMap, + OwnableConfig, + OwnableSchema, + PausableSchema, +} from '../types.js'; // As found in IPostDispatchHook.sol export enum OnchainHookType { diff --git a/typescript/sdk/src/ica/EvmIcaReader.ts b/typescript/sdk/src/ica/EvmIcaReader.ts index 48f3ff696a..1ee29896b1 100644 --- a/typescript/sdk/src/ica/EvmIcaReader.ts +++ b/typescript/sdk/src/ica/EvmIcaReader.ts @@ -9,8 +9,10 @@ import { Address, Domain, isZeroishAddress } from '@hyperlane-xyz/utils'; import { proxyAdmin } from '../deploy/proxy.js'; -import { DerivedIcaRouterConfigSchema } from './schemas.js'; -import { DerivedIcaRouterConfig } from './types.js'; +import { + DerivedIcaRouterConfig, + DerivedIcaRouterConfigSchema, +} from './types.js'; export class EvmIcaRouterReader { constructor(private readonly provider: providers.Provider) {} diff --git a/typescript/sdk/src/ica/schemas.ts b/typescript/sdk/src/ica/schemas.ts deleted file mode 100644 index 69ed2e1a3e..0000000000 --- a/typescript/sdk/src/ica/schemas.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { z } from 'zod'; - -import { ZHash } from '../metadata/customZodTypes.js'; -import { RemoteRouterDomain, RemoteRouterRouter } from '../router/types.js'; -import { DerivedOwnableSchema } from '../schemas.js'; - -export const RemoteIcaRouterConfigSchema = z.record( - RemoteRouterDomain, - RemoteRouterRouter.merge( - z.object({ - interchainSecurityModule: ZHash.optional().describe( - 'Optional ISM override to be used on the chain', - ), - }), - ), -); - -export const IcaRouterConfigSchema = z.object({ - owner: ZHash, - mailbox: ZHash, - proxyAdmin: z.object({ - address: ZHash.optional(), - owner: ZHash, - }), - remoteIcaRouters: RemoteIcaRouterConfigSchema.optional(), -}); - -export const DerivedIcaRouterConfigSchema = DerivedOwnableSchema.merge( - z - .object({ - owner: ZHash, - mailbox: ZHash, - proxyAdmin: DerivedOwnableSchema, - remoteIcaRouters: RemoteIcaRouterConfigSchema, - }) - .strict(), -); diff --git a/typescript/sdk/src/ica/types.ts b/typescript/sdk/src/ica/types.ts index 4f7bd845ce..4c44c9f446 100644 --- a/typescript/sdk/src/ica/types.ts +++ b/typescript/sdk/src/ica/types.ts @@ -1,12 +1,43 @@ import { z } from 'zod'; -import { - DerivedIcaRouterConfigSchema, - IcaRouterConfigSchema, -} from './schemas.js'; +import { ZHash } from '../metadata/customZodTypes.js'; +import { RemoteRouterDomain, RemoteRouterRouter } from '../router/types.js'; +import { DerivedOwnableSchema } from '../types.js'; + +export const RemoteIcaRouterConfigSchema = z.record( + RemoteRouterDomain, + RemoteRouterRouter.merge( + z.object({ + interchainSecurityModule: ZHash.optional().describe( + 'Optional ISM override to be used on the chain', + ), + }), + ), +); + +export const IcaRouterConfigSchema = z.object({ + owner: ZHash, + mailbox: ZHash, + proxyAdmin: z.object({ + address: ZHash.optional(), + owner: ZHash, + }), + remoteIcaRouters: RemoteIcaRouterConfigSchema.optional(), +}); export type IcaRouterConfig = z.infer; +export const DerivedIcaRouterConfigSchema = DerivedOwnableSchema.merge( + z + .object({ + owner: ZHash, + mailbox: ZHash, + proxyAdmin: DerivedOwnableSchema, + remoteIcaRouters: RemoteIcaRouterConfigSchema, + }) + .strict(), +); + export type DerivedIcaRouterConfig = z.infer< typeof DerivedIcaRouterConfigSchema >; diff --git a/typescript/sdk/src/index.ts b/typescript/sdk/src/index.ts index d1d8614610..d01014aa93 100644 --- a/typescript/sdk/src/index.ts +++ b/typescript/sdk/src/index.ts @@ -70,12 +70,6 @@ export { RelayerCacheSchema, } from './core/HyperlaneRelayer.js'; export { MultiProtocolCore } from './core/MultiProtocolCore.js'; -export { - CoreConfigSchema, - DeployedCoreAddresses, - DeployedCoreAddressesSchema, - DerivedCoreConfigSchema, -} from './core/schemas.js'; export { TestCoreApp } from './core/TestCoreApp.js'; export { TestCoreDeployer } from './core/TestCoreDeployer.js'; export { @@ -84,8 +78,12 @@ export { } from './core/TestRecipientDeployer.js'; export { CoreConfig, + CoreConfigSchema, CoreViolationType, + DeployedCoreAddresses, + DeployedCoreAddressesSchema, DerivedCoreConfig, + DerivedCoreConfigSchema, DispatchedMessage, MailboxMultisigIsmViolation, MailboxViolation, @@ -100,10 +98,10 @@ export { export { HyperlaneProxyFactoryDeployer } from './deploy/HyperlaneProxyFactoryDeployer.js'; export { CheckerViolation, - DeployedOwnableConfig, - OwnableConfig, OwnerViolation, ProxyAdminViolation, + ProxyFactoryFactoriesAddresses, + ProxyFactoryFactoriesSchema, ViolationType, } from './deploy/types.js'; export { ContractVerifier } from './deploy/verify/ContractVerifier.js'; @@ -129,7 +127,10 @@ export { IgpFactories, igpFactories } from './gas/contracts.js'; export { HyperlaneIgp } from './gas/HyperlaneIgp.js'; export { HyperlaneIgpChecker } from './gas/HyperlaneIgpChecker.js'; export { HyperlaneIgpDeployer } from './gas/HyperlaneIgpDeployer.js'; -export { StorageGasOracleConfig } from './gas/oracle/types.js'; +export { + StorageGasOracleConfig, + StorageGasOracleConfigSchema, +} from './gas/oracle/types.js'; export { CoinGeckoTokenPriceGetter } from './gas/token-prices.js'; export { IgpBeneficiaryViolation, @@ -143,16 +144,26 @@ export { EvmHookReader } from './hook/EvmHookReader.js'; export { HyperlaneHookDeployer } from './hook/HyperlaneHookDeployer.js'; export { AggregationHookConfig, + AggregationHookConfigSchema, + ArbL2ToL1HookConfig, + ArbL2ToL1HookSchema, DomainRoutingHookConfig, + DomainRoutingHookConfigSchema, FallbackRoutingHookConfig, + FallbackRoutingHookConfigSchema, HookConfig, HookConfigSchema, HookType, IgpHookConfig, + IgpSchema, MerkleTreeHookConfig, + MerkleTreeSchema, OpStackHookConfig, + OpStackHookSchema, PausableHookConfig, + PausableHookSchema, ProtocolFeeHookConfig, + ProtocolFeeSchema, } from './hook/types.js'; export { DerivedIsmConfig, EvmIsmReader } from './ism/EvmIsmReader.js'; export { HyperlaneIsmFactory } from './ism/HyperlaneIsmFactory.js'; @@ -164,17 +175,31 @@ export { } from './ism/multisig.js'; export { AggregationIsmConfig, + AggregationIsmConfigSchema, + ArbL2ToL1IsmConfig, + ArbL2ToL1IsmConfigSchema, DeployedIsm, + DeployedIsmType, + DomainRoutingIsmConfig, + IcaRoutingIsmConfig, IsmConfig, + IsmConfigSchema, IsmType, ModuleType, MultisigConfig, + MultisigConfigSchema, MultisigIsmConfig, + MultisigIsmConfigSchema, OpStackIsmConfig, + OpStackIsmConfigSchema, PausableIsmConfig, + PausableIsmConfigSchema, RoutingIsmConfig, + RoutingIsmConfigSchema, TrustedRelayerIsmConfig, + TrustedRelayerIsmConfigSchema, WeightedMultisigIsmConfig, + WeightedMultisigIsmConfigSchema, } from './ism/types.js'; export { collectValidators, moduleCanCertainlyVerify } from './ism/utils.js'; export { @@ -242,13 +267,11 @@ export { InterchainAccountConfig, InterchainAccountDeployer, } from './middleware/account/InterchainAccountDeployer.js'; -export { - AccountConfigSchema, - GetCallRemoteSettingsSchema, -} from './middleware/account/schemas.js'; export { AccountConfig, + AccountConfigSchema, GetCallRemoteSettings, + GetCallRemoteSettingsSchema, } from './middleware/account/types.js'; export { liquidityLayerFactories } from './middleware/liquidity-layer/contracts.js'; export { LiquidityLayerApp } from './middleware/liquidity-layer/LiquidityLayerApp.js'; @@ -335,31 +358,29 @@ export { ProviderRetryOptions, SmartProviderOptions, } from './providers/SmartProvider/types.js'; -export { CallData } from './providers/transactions/types.js'; +export { CallData, CallDataSchema } from './providers/transactions/types.js'; export { randomAddress } from './test/testUtils.js'; -export { SubmitterMetadataSchema } from './providers/transactions/submitter/schemas.js'; export { TxSubmitterInterface } from './providers/transactions/submitter/TxSubmitterInterface.js'; export { TxSubmitterType } from './providers/transactions/submitter/TxSubmitterTypes.js'; -export { SubmitterMetadata } from './providers/transactions/submitter/types.js'; - export { - EV5GnosisSafeTxSubmitterPropsSchema, - EV5ImpersonatedAccountTxSubmitterPropsSchema, -} from './providers/transactions/submitter/ethersV5/schemas.js'; + SubmitterMetadata, + SubmitterMetadataSchema, +} from './providers/transactions/submitter/types.js'; + export { EV5GnosisSafeTxSubmitterProps, + EV5GnosisSafeTxSubmitterPropsSchema, EV5ImpersonatedAccountTxSubmitterProps, + EV5ImpersonatedAccountTxSubmitterPropsSchema, } from './providers/transactions/submitter/ethersV5/types.js'; -export { - ChainSubmissionStrategySchema, - SubmissionStrategySchema, -} from './providers/transactions/submitter/builder/schemas.js'; export { TxSubmitterBuilder } from './providers/transactions/submitter/builder/TxSubmitterBuilder.js'; export { ChainSubmissionStrategy, + ChainSubmissionStrategySchema, SubmissionStrategy, + SubmissionStrategySchema, } from './providers/transactions/submitter/builder/types.js'; export { EV5GnosisSafeTxBuilder } from './providers/transactions/submitter/ethersV5/EV5GnosisSafeTxBuilder.js'; @@ -368,20 +389,50 @@ export { EV5ImpersonatedAccountTxSubmitter } from './providers/transactions/subm export { EV5JsonRpcTxSubmitter } from './providers/transactions/submitter/ethersV5/EV5JsonRpcTxSubmitter.js'; export { EV5TxSubmitterInterface } from './providers/transactions/submitter/ethersV5/EV5TxSubmitterInterface.js'; -export { TransformerMetadataSchema } from './providers/transactions/transformer/schemas.js'; export { TxTransformerInterface } from './providers/transactions/transformer/TxTransformerInterface.js'; export { TxTransformerType } from './providers/transactions/transformer/TxTransformerTypes.js'; -export { TransformerMetadata } from './providers/transactions/transformer/types.js'; +export { + TransformerMetadata, + TransformerMetadataSchema, +} from './providers/transactions/transformer/types.js'; export { EV5InterchainAccountTxTransformer } from './providers/transactions/transformer/ethersV5/EV5InterchainAccountTxTransformer.js'; export { EV5TxTransformerInterface } from './providers/transactions/transformer/ethersV5/EV5TxTransformerInterface.js'; -export { EV5InterchainAccountTxTransformerPropsSchema } from './providers/transactions/transformer/ethersV5/schemas.js'; -export { EV5InterchainAccountTxTransformerProps } from './providers/transactions/transformer/ethersV5/types.js'; +export { + EV5InterchainAccountTxTransformerProps, + EV5InterchainAccountTxTransformerPropsSchema, +} from './providers/transactions/transformer/ethersV5/types.js'; +export { EvmCoreModule } from './core/EvmCoreModule.js'; +export { + isProxy, + proxyAdmin, + proxyConstructorArgs, + proxyImplementation, +} from './deploy/proxy.js'; +export { + ChainGasOracleParams, + GasPriceConfig, + NativeTokenPriceConfig, + getCosmosChainGasPrice, + getGasPrice, + getLocalStorageGasOracleConfig, + getTokenExchangeRateFromValues, +} from './gas/utils.js'; +export { GcpValidator } from './gcp/validator.js'; +export { + DerivedIcaRouterConfig, + DerivedIcaRouterConfigSchema, + IcaRouterConfig, + IcaRouterConfigSchema, + RemoteIcaRouterConfigSchema, +} from './ica/types.js'; +export { EvmIsmModule } from './ism/EvmIsmModule.js'; export { chainMetadataToCosmosChain, chainMetadataToViemChain, } from './metadata/chainMetadataConversion.js'; +export { AnnotatedEV5Transaction } from './providers/ProviderType.js'; export { EvmGasRouterAdapter, EvmRouterAdapter, @@ -406,6 +457,7 @@ export { DestinationGas, GasRouterConfig, MailboxClientConfig, + MailboxClientConfigSchema, ProxiedFactories, ProxiedRouterConfig, RemoteRouters, @@ -471,6 +523,7 @@ export { hypERC20factories, } from './token/contracts.js'; export { HypERC20Deployer, HypERC721Deployer } from './token/deploy.js'; +export { EvmERC20WarpModule } from './token/EvmERC20WarpModule.js'; export { EvmERC20WarpRouteReader } from './token/EvmERC20WarpRouteReader.js'; export { IToken, TokenArgs, TokenConfigSchema } from './token/IToken.js'; export { Token } from './token/Token.js'; @@ -496,8 +549,46 @@ export { TOKEN_TYPE_TO_STANDARD, TokenStandard, } from './token/TokenStandard.js'; -export { TokenRouterConfig, WarpRouteDeployConfig } from './token/types.js'; -export { ChainMap, ChainName, ChainNameOrId, Connection } from './types.js'; +export { + CollateralRebaseTokenConfigSchema, + CollateralTokenConfig, + CollateralTokenConfigSchema, + HypTokenConfig, + HypTokenConfigSchema, + HypTokenRouterConfig, + HypTokenRouterConfigSchema, + NativeTokenConfig, + NativeTokenConfigSchema, + SyntheticRebaseTokenConfig, + SyntheticRebaseTokenConfigSchema, + SyntheticTokenConfig, + SyntheticTokenConfigSchema, + TokenMetadata, + TokenMetadataSchema, + WarpRouteDeployConfig, + WarpRouteDeployConfigSchema, + WarpRouteDeployConfigSchemaErrors, + isCollateralRebaseTokenConfig, + isCollateralTokenConfig, + isNativeTokenConfig, + isSyntheticRebaseTokenConfig, + isSyntheticTokenConfig, + isTokenMetadata, +} from './token/types.js'; +export { + ChainMap, + ChainName, + ChainNameOrId, + Connection, + DeployedOwnableConfig, + DeployedOwnableSchema, + DerivedOwnableConfig, + DerivedOwnableSchema, + OwnableConfig, + OwnableSchema, + PausableConfig, + PausableSchema, +} from './types.js'; export { getCosmosRegistryChain } from './utils/cosmos.js'; export { filterByChains } from './utils/filter.js'; export { @@ -508,9 +599,17 @@ export { setFork, stopImpersonatingAccount, } from './utils/fork.js'; -export { multisigIsmVerificationCost, normalizeConfig } from './utils/ism.js'; +export { + canProposeSafeTransactions, + getSafe, + getSafeDelegates, + getSafeService, + // @ts-ignore +} from './utils/gnosisSafe.js'; export { HyperlaneReader } from './utils/HyperlaneReader.js'; +export { multisigIsmVerificationCost, normalizeConfig } from './utils/ism.js'; export { MultiGeneric } from './utils/MultiGeneric.js'; +export { isCompliant, validateZodResult } from './utils/schemas.js'; export { SealevelAccountDataWrapper, SealevelInstructionWrapper, @@ -587,3 +686,4 @@ export { EvmIsmModule } from './ism/EvmIsmModule.js'; export { AnnotatedEV5Transaction } from './providers/ProviderType.js'; export { EvmERC20WarpModule } from './token/EvmERC20WarpModule.js'; export { GcpValidator } from './gcp/validator.js'; +export { EvmHookModule } from './hook/EvmHookModule.js'; diff --git a/typescript/sdk/src/ism/types.ts b/typescript/sdk/src/ism/types.ts index b3248c67f1..87adb2cff2 100644 --- a/typescript/sdk/src/ism/types.ts +++ b/typescript/sdk/src/ism/types.ts @@ -14,10 +14,13 @@ import { } from '@hyperlane-xyz/core'; import type { Address, Domain, ValueOf } from '@hyperlane-xyz/utils'; -import { OwnableConfig } from '../deploy/types.js'; import { ZHash } from '../metadata/customZodTypes.js'; -import { OwnableSchema, PausableSchema } from '../schemas.js'; -import { ChainMap } from '../types.js'; +import { + ChainMap, + OwnableConfig, + OwnableSchema, + PausableSchema, +} from '../types.js'; // this enum should match the IInterchainSecurityModule.sol enum // meant for the relayer diff --git a/typescript/sdk/src/middleware/account/schemas.ts b/typescript/sdk/src/middleware/account/schemas.ts deleted file mode 100644 index 6e90b1a193..0000000000 --- a/typescript/sdk/src/middleware/account/schemas.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { z } from 'zod'; - -import { ZChainName, ZHash } from '../../metadata/customZodTypes.js'; -import { - BigNumberSchema, - CallDataSchema, -} from '../../providers/transactions/schemas.js'; - -export const AccountConfigSchema = z.object({ - origin: ZChainName, - owner: ZHash, - localRouter: ZHash.optional(), - routerOverride: ZHash.optional(), - ismOverride: ZHash.optional(), -}); - -/* For InterchainAccount::getCallRemote() */ -export const GetCallRemoteSettingsSchema = z.object({ - chain: ZChainName, - destination: ZChainName, - innerCalls: z.array(CallDataSchema), - config: AccountConfigSchema, - hookMetadata: BigNumberSchema.optional(), -}); diff --git a/typescript/sdk/src/middleware/account/types.ts b/typescript/sdk/src/middleware/account/types.ts index 58dd28d14b..519d96fab1 100644 --- a/typescript/sdk/src/middleware/account/types.ts +++ b/typescript/sdk/src/middleware/account/types.ts @@ -1,7 +1,29 @@ import { z } from 'zod'; -import { AccountConfigSchema, GetCallRemoteSettingsSchema } from './schemas.js'; +import { ZChainName, ZHash } from '../../metadata/customZodTypes.js'; +import { + BigNumberSchema, + CallDataSchema, +} from '../../providers/transactions/types.js'; + +export const AccountConfigSchema = z.object({ + origin: ZChainName, + owner: ZHash, + localRouter: ZHash.optional(), + routerOverride: ZHash.optional(), + ismOverride: ZHash.optional(), +}); export type AccountConfig = z.infer; + /* For InterchainAccount::getCallRemote() */ +export const GetCallRemoteSettingsSchema = z.object({ + chain: ZChainName, + destination: ZChainName, + innerCalls: z.array(CallDataSchema), + config: AccountConfigSchema, + hookMetadata: BigNumberSchema.optional(), +}); +/* For InterchainAccount::getCallRemote() */ + export type GetCallRemoteSettings = z.infer; diff --git a/typescript/sdk/src/providers/explorerHealthTest.ts b/typescript/sdk/src/providers/explorerHealthTest.ts index 4e6d8be3ff..904044fbdf 100644 --- a/typescript/sdk/src/providers/explorerHealthTest.ts +++ b/typescript/sdk/src/providers/explorerHealthTest.ts @@ -1,4 +1,3 @@ -import { ChainMetadata } from '@hyperlane-xyz/sdk'; import { Address, ProtocolType, rootLogger } from '@hyperlane-xyz/utils'; import { @@ -6,6 +5,7 @@ import { getExplorerBaseUrl, getExplorerTxUrl, } from '../metadata/blockExplorer.js'; +import { ChainMetadata } from '../metadata/chainMetadataTypes.js'; const PROTOCOL_TO_ADDRESS: Record = { [ProtocolType.Ethereum]: '0x0000000000000000000000000000000000000000', diff --git a/typescript/sdk/src/providers/transactions/schemas.ts b/typescript/sdk/src/providers/transactions/schemas.ts deleted file mode 100644 index 7547f47e4e..0000000000 --- a/typescript/sdk/src/providers/transactions/schemas.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { z } from 'zod'; - -import { ZHash } from '../../metadata/customZodTypes.js'; - -export const BigNumberSchema = z.string(); - -export const CallDataSchema = z.object({ - to: ZHash, - data: z.string(), - value: BigNumberSchema.optional(), -}); diff --git a/typescript/sdk/src/providers/transactions/submitter/builder/schemas.ts b/typescript/sdk/src/providers/transactions/submitter/builder/schemas.ts deleted file mode 100644 index cec2d81935..0000000000 --- a/typescript/sdk/src/providers/transactions/submitter/builder/schemas.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { z } from 'zod'; - -import { ZChainName } from '../../../../metadata/customZodTypes.js'; -import { TransformerMetadataSchema } from '../../transformer/schemas.js'; -import { SubmitterMetadataSchema } from '../schemas.js'; - -export const SubmissionStrategySchema = z.object({ - submitter: SubmitterMetadataSchema, - transforms: z.array(TransformerMetadataSchema).optional(), -}); - -export const ChainSubmissionStrategySchema = z.record( - ZChainName, - SubmissionStrategySchema, -); diff --git a/typescript/sdk/src/providers/transactions/submitter/builder/types.ts b/typescript/sdk/src/providers/transactions/submitter/builder/types.ts index ea4460cd4e..6a4987dbf6 100644 --- a/typescript/sdk/src/providers/transactions/submitter/builder/types.ts +++ b/typescript/sdk/src/providers/transactions/submitter/builder/types.ts @@ -1,11 +1,21 @@ import { z } from 'zod'; -import { - ChainSubmissionStrategySchema, - SubmissionStrategySchema, -} from './schemas.js'; +import { ZChainName } from '../../../../metadata/customZodTypes.js'; +import { TransformerMetadataSchema } from '../../transformer/types.js'; +import { SubmitterMetadataSchema } from '../types.js'; + +export const SubmissionStrategySchema = z.object({ + submitter: SubmitterMetadataSchema, + transforms: z.array(TransformerMetadataSchema).optional(), +}); export type SubmissionStrategy = z.infer; + +export const ChainSubmissionStrategySchema = z.record( + ZChainName, + SubmissionStrategySchema, +); + export type ChainSubmissionStrategy = z.infer< typeof ChainSubmissionStrategySchema >; diff --git a/typescript/sdk/src/providers/transactions/submitter/ethersV5/schemas.ts b/typescript/sdk/src/providers/transactions/submitter/ethersV5/schemas.ts deleted file mode 100644 index cef774e738..0000000000 --- a/typescript/sdk/src/providers/transactions/submitter/ethersV5/schemas.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { z } from 'zod'; - -import { ZChainName, ZHash } from '../../../../metadata/customZodTypes.js'; - -export const EV5GnosisSafeTxSubmitterPropsSchema = z.object({ - chain: ZChainName, - safeAddress: ZHash, -}); - -export const EV5GnosisSafeTxBuilderPropsSchema = z.object({ - version: z.string().default('1.0'), - chain: ZChainName, - safeAddress: ZHash, -}); - -export const EV5JsonRpcTxSubmitterPropsSchema = z.object({ - chain: ZChainName, - userAddress: ZHash.optional(), - privateKey: ZHash.optional(), -}); - -export const EV5ImpersonatedAccountTxSubmitterPropsSchema = - EV5JsonRpcTxSubmitterPropsSchema.extend({ - userAddress: ZHash, - }); diff --git a/typescript/sdk/src/providers/transactions/submitter/ethersV5/schemas.test.ts b/typescript/sdk/src/providers/transactions/submitter/ethersV5/types.test.ts similarity index 98% rename from typescript/sdk/src/providers/transactions/submitter/ethersV5/schemas.test.ts rename to typescript/sdk/src/providers/transactions/submitter/ethersV5/types.test.ts index 7cce08cadf..6718410a32 100644 --- a/typescript/sdk/src/providers/transactions/submitter/ethersV5/schemas.test.ts +++ b/typescript/sdk/src/providers/transactions/submitter/ethersV5/types.test.ts @@ -4,13 +4,11 @@ import { Address } from '@hyperlane-xyz/utils'; import { ChainName } from '../../../../types.js'; -import { - EV5GnosisSafeTxSubmitterPropsSchema, - EV5ImpersonatedAccountTxSubmitterPropsSchema, -} from './schemas.js'; import { EV5GnosisSafeTxSubmitterProps, + EV5GnosisSafeTxSubmitterPropsSchema, EV5ImpersonatedAccountTxSubmitterProps, + EV5ImpersonatedAccountTxSubmitterPropsSchema, } from './types.js'; describe('ethersV5 submitter props schemas', () => { diff --git a/typescript/sdk/src/providers/transactions/submitter/ethersV5/types.ts b/typescript/sdk/src/providers/transactions/submitter/ethersV5/types.ts index 71a8458419..bf0d29d540 100644 --- a/typescript/sdk/src/providers/transactions/submitter/ethersV5/types.ts +++ b/typescript/sdk/src/providers/transactions/submitter/ethersV5/types.ts @@ -1,21 +1,41 @@ import { z } from 'zod'; -import { - EV5GnosisSafeTxBuilderPropsSchema, - EV5GnosisSafeTxSubmitterPropsSchema, - EV5ImpersonatedAccountTxSubmitterPropsSchema, - EV5JsonRpcTxSubmitterPropsSchema, -} from './schemas.js'; +import { ZChainName, ZHash } from '../../../../metadata/customZodTypes.js'; + +export const EV5GnosisSafeTxSubmitterPropsSchema = z.object({ + chain: ZChainName, + safeAddress: ZHash, +}); export type EV5GnosisSafeTxSubmitterProps = z.infer< typeof EV5GnosisSafeTxSubmitterPropsSchema >; + +export const EV5GnosisSafeTxBuilderPropsSchema = z.object({ + version: z.string().default('1.0'), + chain: ZChainName, + safeAddress: ZHash, +}); + export type EV5GnosisSafeTxBuilderProps = z.infer< typeof EV5GnosisSafeTxBuilderPropsSchema >; + +export const EV5JsonRpcTxSubmitterPropsSchema = z.object({ + chain: ZChainName, + userAddress: ZHash.optional(), + privateKey: ZHash.optional(), +}); + export type EV5JsonRpcTxSubmitterProps = z.infer< typeof EV5JsonRpcTxSubmitterPropsSchema >; + +export const EV5ImpersonatedAccountTxSubmitterPropsSchema = + EV5JsonRpcTxSubmitterPropsSchema.extend({ + userAddress: ZHash, + }); + export type EV5ImpersonatedAccountTxSubmitterProps = z.infer< typeof EV5ImpersonatedAccountTxSubmitterPropsSchema >; diff --git a/typescript/sdk/src/providers/transactions/submitter/schemas.ts b/typescript/sdk/src/providers/transactions/submitter/schemas.ts deleted file mode 100644 index 998d4404bd..0000000000 --- a/typescript/sdk/src/providers/transactions/submitter/schemas.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { z } from 'zod'; - -import { TxSubmitterType } from './TxSubmitterTypes.js'; -import { - EV5GnosisSafeTxBuilderPropsSchema, - EV5GnosisSafeTxSubmitterPropsSchema, - EV5ImpersonatedAccountTxSubmitterPropsSchema, - EV5JsonRpcTxSubmitterPropsSchema, -} from './ethersV5/schemas.js'; - -export const SubmitterMetadataSchema = z.discriminatedUnion('type', [ - z.object({ - type: z.literal(TxSubmitterType.JSON_RPC), - ...EV5JsonRpcTxSubmitterPropsSchema.shape, - }), - z.object({ - type: z.literal(TxSubmitterType.IMPERSONATED_ACCOUNT), - ...EV5ImpersonatedAccountTxSubmitterPropsSchema.shape, - }), - z.object({ - type: z.literal(TxSubmitterType.GNOSIS_SAFE), - ...EV5GnosisSafeTxSubmitterPropsSchema.shape, - }), - z.object({ - type: z.literal(TxSubmitterType.GNOSIS_TX_BUILDER), - ...EV5GnosisSafeTxBuilderPropsSchema.shape, - }), -]); diff --git a/typescript/sdk/src/providers/transactions/submitter/types.ts b/typescript/sdk/src/providers/transactions/submitter/types.ts index 92e79f9b4b..6f0b66c84a 100644 --- a/typescript/sdk/src/providers/transactions/submitter/types.ts +++ b/typescript/sdk/src/providers/transactions/submitter/types.ts @@ -1,5 +1,30 @@ import { z } from 'zod'; -import { SubmitterMetadataSchema } from './schemas.js'; +import { TxSubmitterType } from './TxSubmitterTypes.js'; +import { + EV5GnosisSafeTxBuilderPropsSchema, + EV5GnosisSafeTxSubmitterPropsSchema, + EV5ImpersonatedAccountTxSubmitterPropsSchema, + EV5JsonRpcTxSubmitterPropsSchema, +} from './ethersV5/types.js'; + +export const SubmitterMetadataSchema = z.discriminatedUnion('type', [ + z.object({ + type: z.literal(TxSubmitterType.JSON_RPC), + ...EV5JsonRpcTxSubmitterPropsSchema.shape, + }), + z.object({ + type: z.literal(TxSubmitterType.IMPERSONATED_ACCOUNT), + ...EV5ImpersonatedAccountTxSubmitterPropsSchema.shape, + }), + z.object({ + type: z.literal(TxSubmitterType.GNOSIS_SAFE), + ...EV5GnosisSafeTxSubmitterPropsSchema.shape, + }), + z.object({ + type: z.literal(TxSubmitterType.GNOSIS_TX_BUILDER), + ...EV5GnosisSafeTxBuilderPropsSchema.shape, + }), +]); export type SubmitterMetadata = z.infer; diff --git a/typescript/sdk/src/providers/transactions/transformer/ethersV5/schemas.ts b/typescript/sdk/src/providers/transactions/transformer/ethersV5/schemas.ts deleted file mode 100644 index 7d49b0e919..0000000000 --- a/typescript/sdk/src/providers/transactions/transformer/ethersV5/schemas.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { GetCallRemoteSettingsSchema } from '../../../../middleware/account/schemas.js'; - -export const EV5InterchainAccountTxTransformerPropsSchema = - GetCallRemoteSettingsSchema.pick({ - chain: true, - config: true, - hookMetadata: true, - }); diff --git a/typescript/sdk/src/providers/transactions/transformer/ethersV5/schemas.test.ts b/typescript/sdk/src/providers/transactions/transformer/ethersV5/types.test.ts similarity index 91% rename from typescript/sdk/src/providers/transactions/transformer/ethersV5/schemas.test.ts rename to typescript/sdk/src/providers/transactions/transformer/ethersV5/types.test.ts index 5418f31fe7..72bb52ed23 100644 --- a/typescript/sdk/src/providers/transactions/transformer/ethersV5/schemas.test.ts +++ b/typescript/sdk/src/providers/transactions/transformer/ethersV5/types.test.ts @@ -4,8 +4,10 @@ import { Address } from '@hyperlane-xyz/utils'; import { ChainName } from '../../../../types.js'; -import { EV5InterchainAccountTxTransformerPropsSchema } from './schemas.js'; -import { EV5InterchainAccountTxTransformerProps } from './types.js'; +import { + EV5InterchainAccountTxTransformerProps, + EV5InterchainAccountTxTransformerPropsSchema, +} from './types.js'; describe('ethersV5 transformer props schemas', () => { const CHAIN_MOCK: ChainName = 'ethereum'; diff --git a/typescript/sdk/src/providers/transactions/transformer/ethersV5/types.ts b/typescript/sdk/src/providers/transactions/transformer/ethersV5/types.ts index f4b848f429..4e4457fd18 100644 --- a/typescript/sdk/src/providers/transactions/transformer/ethersV5/types.ts +++ b/typescript/sdk/src/providers/transactions/transformer/ethersV5/types.ts @@ -1,6 +1,13 @@ import { z } from 'zod'; -import { EV5InterchainAccountTxTransformerPropsSchema } from './schemas.js'; +import { GetCallRemoteSettingsSchema } from '../../../../middleware/account/types.js'; + +export const EV5InterchainAccountTxTransformerPropsSchema = + GetCallRemoteSettingsSchema.pick({ + chain: true, + config: true, + hookMetadata: true, + }); export type EV5InterchainAccountTxTransformerProps = z.infer< typeof EV5InterchainAccountTxTransformerPropsSchema diff --git a/typescript/sdk/src/providers/transactions/transformer/schemas.ts b/typescript/sdk/src/providers/transactions/transformer/schemas.ts deleted file mode 100644 index 621e5d0c6e..0000000000 --- a/typescript/sdk/src/providers/transactions/transformer/schemas.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { z } from 'zod'; - -import { TxTransformerType } from './TxTransformerTypes.js'; -import { EV5InterchainAccountTxTransformerPropsSchema } from './ethersV5/schemas.js'; - -export const TransformerMetadataSchema = z.discriminatedUnion('type', [ - z.object({ - type: z.literal(TxTransformerType.INTERCHAIN_ACCOUNT), - ...EV5InterchainAccountTxTransformerPropsSchema.shape, - }), -]); diff --git a/typescript/sdk/src/providers/transactions/transformer/types.ts b/typescript/sdk/src/providers/transactions/transformer/types.ts index 7f5e479124..4eedeb9cc4 100644 --- a/typescript/sdk/src/providers/transactions/transformer/types.ts +++ b/typescript/sdk/src/providers/transactions/transformer/types.ts @@ -1,5 +1,13 @@ import { z } from 'zod'; -import { TransformerMetadataSchema } from './schemas.js'; +import { TxTransformerType } from './TxTransformerTypes.js'; +import { EV5InterchainAccountTxTransformerPropsSchema } from './ethersV5/types.js'; + +export const TransformerMetadataSchema = z.discriminatedUnion('type', [ + z.object({ + type: z.literal(TxTransformerType.INTERCHAIN_ACCOUNT), + ...EV5InterchainAccountTxTransformerPropsSchema.shape, + }), +]); export type TransformerMetadata = z.infer; diff --git a/typescript/sdk/src/providers/transactions/schemas.test.ts b/typescript/sdk/src/providers/transactions/types.test.ts similarity index 93% rename from typescript/sdk/src/providers/transactions/schemas.test.ts rename to typescript/sdk/src/providers/transactions/types.test.ts index 8631a3f556..e6c50ba5ff 100644 --- a/typescript/sdk/src/providers/transactions/schemas.test.ts +++ b/typescript/sdk/src/providers/transactions/types.test.ts @@ -2,8 +2,7 @@ import { expect } from 'chai'; import { Address } from '@hyperlane-xyz/utils'; -import { CallDataSchema } from './schemas.js'; -import { CallData } from './types.js'; +import { CallData, CallDataSchema } from './types.js'; describe('transactions schemas', () => { const ADDRESS_MOCK: Address = '0x1234567890123456789012345678901234567890'; diff --git a/typescript/sdk/src/providers/transactions/types.ts b/typescript/sdk/src/providers/transactions/types.ts index 49585f2154..e3d6d28abf 100644 --- a/typescript/sdk/src/providers/transactions/types.ts +++ b/typescript/sdk/src/providers/transactions/types.ts @@ -1,5 +1,13 @@ import { z } from 'zod'; -import { CallDataSchema } from './schemas.js'; +import { ZHash } from '../../metadata/customZodTypes.js'; + +export const BigNumberSchema = z.string(); + +export const CallDataSchema = z.object({ + to: ZHash, + data: z.string(), + value: BigNumberSchema.optional(), +}); export type CallData = z.infer; diff --git a/typescript/sdk/src/router/types.ts b/typescript/sdk/src/router/types.ts index 9329ed7d9d..a4dd355f2f 100644 --- a/typescript/sdk/src/router/types.ts +++ b/typescript/sdk/src/router/types.ts @@ -14,8 +14,7 @@ import { CheckerViolation } from '../deploy/types.js'; import { HookConfigSchema } from '../hook/types.js'; import { IsmConfigSchema } from '../ism/types.js'; import { ZHash } from '../metadata/customZodTypes.js'; -import { DeployedOwnableSchema, OwnableSchema } from '../schemas.js'; -import { ChainMap } from '../types.js'; +import { ChainMap, DeployedOwnableSchema, OwnableSchema } from '../types.js'; export type RouterAddress = { router: Address; diff --git a/typescript/sdk/src/schemas.ts b/typescript/sdk/src/schemas.ts deleted file mode 100644 index bbd9923136..0000000000 --- a/typescript/sdk/src/schemas.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { z } from 'zod'; - -import { ZHash } from './metadata/customZodTypes.js'; - -export const OwnableSchema = z.object({ - owner: ZHash, - ownerOverrides: z.record(ZHash).optional(), -}); - -export const DeployedOwnableSchema = OwnableSchema.extend({ - address: ZHash.optional(), -}); - -export const DerivedOwnableSchema = DeployedOwnableSchema.omit({ - ownerOverrides: true, -}).required(); - -export const PausableSchema = OwnableSchema.extend({ - paused: z.boolean(), -}); diff --git a/typescript/sdk/src/token/EvmERC20WarpModule.hardhat-test.ts b/typescript/sdk/src/token/EvmERC20WarpModule.hardhat-test.ts index 82d3190daa..40471f8409 100644 --- a/typescript/sdk/src/token/EvmERC20WarpModule.hardhat-test.ts +++ b/typescript/sdk/src/token/EvmERC20WarpModule.hardhat-test.ts @@ -27,6 +27,7 @@ import { proxyAdmin, serializeContracts, } from '@hyperlane-xyz/sdk'; +import { randomInt } from '@hyperlane-xyz/utils'; import { TestCoreApp } from '../core/TestCoreApp.js'; import { TestCoreDeployer } from '../core/TestCoreDeployer.js'; @@ -43,7 +44,7 @@ import { normalizeConfig } from '../utils/ism.js'; import { EvmERC20WarpModule } from './EvmERC20WarpModule.js'; import { TokenType } from './config.js'; -import { TokenRouterConfig } from './schemas.js'; +import { HypTokenRouterConfig } from './types.js'; const randomRemoteRouters = (n: number) => { const routers: RemoteRouters = {}; @@ -111,7 +112,7 @@ describe('EvmERC20WarpHyperlaneModule', async () => { }); it('should create with a collateral config', async () => { - const config: TokenRouterConfig = { + const config: HypTokenRouterConfig = { ...baseConfig, type: TokenType.collateral, token: token.address, @@ -139,7 +140,7 @@ describe('EvmERC20WarpHyperlaneModule', async () => { TOKEN_NAME, TOKEN_NAME, ); - const config: TokenRouterConfig = { + const config: HypTokenRouterConfig = { type: TokenType.collateralVault, token: vault.address, ...baseConfig, @@ -172,7 +173,7 @@ describe('EvmERC20WarpHyperlaneModule', async () => { }); it('should create with a synthetic config', async () => { - const config: TokenRouterConfig = { + const config: HypTokenRouterConfig = { ...baseConfig, type: TokenType.synthetic, name: TOKEN_NAME, @@ -211,7 +212,7 @@ describe('EvmERC20WarpHyperlaneModule', async () => { const config = { type: TokenType.native, ...baseConfig, - } as TokenRouterConfig; + } as HypTokenRouterConfig; // Deploy using WarpModule const evmERC20WarpModule = await EvmERC20WarpModule.create({ @@ -241,7 +242,7 @@ describe('EvmERC20WarpHyperlaneModule', async () => { ...baseConfig, type: TokenType.native, remoteRouters: randomRemoteRouters(numOfRouters), - } as TokenRouterConfig; + } as HypTokenRouterConfig; // Deploy using WarpModule const evmERC20WarpModule = await EvmERC20WarpModule.create({ @@ -298,7 +299,7 @@ describe('EvmERC20WarpHyperlaneModule', async () => { ...baseConfig, type: TokenType.native, interchainSecurityModule: ismAddress, - } as TokenRouterConfig; + } as HypTokenRouterConfig; // Deploy using WarpModule const evmERC20WarpModule = await EvmERC20WarpModule.create({ @@ -310,7 +311,7 @@ describe('EvmERC20WarpHyperlaneModule', async () => { const actualConfig = await evmERC20WarpModule.read(); for (const interchainSecurityModule of ismConfigToUpdate) { - const expectedConfig: TokenRouterConfig = { + const expectedConfig: HypTokenRouterConfig = { ...actualConfig, interchainSecurityModule, }; @@ -328,7 +329,7 @@ describe('EvmERC20WarpHyperlaneModule', async () => { ...baseConfig, type: TokenType.native, interchainSecurityModule: ismAddress, - } as TokenRouterConfig; + } as HypTokenRouterConfig; // Deploy using WarpModule const evmERC20WarpModule = await EvmERC20WarpModule.create({ @@ -345,7 +346,7 @@ describe('EvmERC20WarpHyperlaneModule', async () => { owner, paused: false, }; - const expectedConfig: TokenRouterConfig = { + const expectedConfig: HypTokenRouterConfig = { ...actualConfig, interchainSecurityModule, }; @@ -368,7 +369,7 @@ describe('EvmERC20WarpHyperlaneModule', async () => { const config = { ...baseConfig, type: TokenType.native, - } as TokenRouterConfig; + } as HypTokenRouterConfig; // Deploy using WarpModule const evmERC20WarpModule = await EvmERC20WarpModule.create({ @@ -380,7 +381,7 @@ describe('EvmERC20WarpHyperlaneModule', async () => { const actualConfig = await evmERC20WarpModule.read(); for (const hook of hookConfigToUpdate) { - const expectedConfig: TokenRouterConfig = { + const expectedConfig: HypTokenRouterConfig = { ...actualConfig, hook, }; @@ -396,7 +397,7 @@ describe('EvmERC20WarpHyperlaneModule', async () => { const config = { ...baseConfig, type: TokenType.native, - } as TokenRouterConfig; + } as HypTokenRouterConfig; // Deploy using WarpModule const evmERC20WarpModule = await EvmERC20WarpModule.create({ @@ -406,7 +407,7 @@ describe('EvmERC20WarpHyperlaneModule', async () => { proxyFactoryFactories: ismFactoryAddresses, }); const actualConfig = await evmERC20WarpModule.read(); - const expectedConfig: TokenRouterConfig = { + const expectedConfig: HypTokenRouterConfig = { ...actualConfig, hook: hookConfigToUpdate.find( (c: any) => c.type === HookType.MERKLE_TREE, @@ -428,7 +429,7 @@ describe('EvmERC20WarpHyperlaneModule', async () => { const config = { ...baseConfig, type: TokenType.native, - } as TokenRouterConfig; + } as HypTokenRouterConfig; // Deploy using WarpModule const evmERC20WarpModule = await EvmERC20WarpModule.create({ @@ -438,7 +439,7 @@ describe('EvmERC20WarpHyperlaneModule', async () => { proxyFactoryFactories: ismFactoryAddresses, }); const actualConfig = await evmERC20WarpModule.read(); - const expectedConfig: TokenRouterConfig = { + const expectedConfig: HypTokenRouterConfig = { ...actualConfig, hook: hookConfigToUpdate.find( (c: any) => c.type === HookType.INTERCHAIN_GAS_PAYMASTER, @@ -479,7 +480,7 @@ describe('EvmERC20WarpHyperlaneModule', async () => { ...baseConfig, type: TokenType.native, interchainSecurityModule: deployedIsm, - } as TokenRouterConfig; + } as HypTokenRouterConfig; const evmERC20WarpModule = await EvmERC20WarpModule.create({ chain, @@ -488,7 +489,7 @@ describe('EvmERC20WarpHyperlaneModule', async () => { proxyFactoryFactories: ismFactoryAddresses, }); const actualConfig = await evmERC20WarpModule.read(); - const expectedConfig: TokenRouterConfig = { + const expectedConfig: HypTokenRouterConfig = { ...actualConfig, interchainSecurityModule: { type: IsmType.ROUTING, @@ -510,12 +511,12 @@ describe('EvmERC20WarpHyperlaneModule', async () => { ); }); - it('should update connected routers', async () => { + it('should enroll connected routers', async () => { const config = { ...baseConfig, type: TokenType.native, ismFactoryAddresses, - } as TokenRouterConfig; + } as HypTokenRouterConfig; // Deploy using WarpModule const evmERC20WarpModule = await EvmERC20WarpModule.create({ @@ -527,7 +528,7 @@ describe('EvmERC20WarpHyperlaneModule', async () => { multiProvider, proxyFactoryFactories: ismFactoryAddresses, }); - const numOfRouters = Math.floor(Math.random() * 10); + const numOfRouters = randomInt(10, 0); await sendTxs( await evmERC20WarpModule.update({ ...config, @@ -541,12 +542,49 @@ describe('EvmERC20WarpHyperlaneModule', async () => { ); }); - it('should only extend routers if they are new ones are different', async () => { + it('should unenroll connected routers', async () => { const config = { ...baseConfig, type: TokenType.native, ismFactoryAddresses, - } as TokenRouterConfig; + } as HypTokenRouterConfig; + + // Deploy using WarpModule + const evmERC20WarpModule = await EvmERC20WarpModule.create({ + chain, + config: { + ...config, + interchainSecurityModule: ismAddress, + }, + multiProvider, + proxyFactoryFactories: ismFactoryAddresses, + }); + const numOfRouters = randomInt(10, 0); + await sendTxs( + await evmERC20WarpModule.update({ + ...config, + remoteRouters: randomRemoteRouters(numOfRouters), + }), + ); + // Read config & delete remoteRouters + const existingConfig = await evmERC20WarpModule.read(); + for (let i = 0; i < numOfRouters; i++) { + delete existingConfig.remoteRouters?.[i.toString()]; + await sendTxs(await evmERC20WarpModule.update(existingConfig)); + + const updatedConfig = await evmERC20WarpModule.read(); + expect(Object.keys(updatedConfig.remoteRouters!).length).to.be.equal( + numOfRouters - (i + 1), + ); + } + }); + + it('should replace an enrollment if they are new one different, if the config lengths are the same', async () => { + const config = { + ...baseConfig, + type: TokenType.native, + ismFactoryAddresses, + } as HypTokenRouterConfig; // Deploy using WarpModule const evmERC20WarpModule = await EvmERC20WarpModule.create({ @@ -579,20 +617,24 @@ describe('EvmERC20WarpHyperlaneModule', async () => { await sendTxs(txs); // Try to extend with the different remoteRouters, but same length + const extendedRemoteRouter = { + 3: { + address: randomAddress(), + }, + }; txs = await evmERC20WarpModule.update({ ...config, - remoteRouters: { - 3: { - address: randomAddress(), - }, - }, + remoteRouters: extendedRemoteRouter, }); - expect(txs.length).to.equal(1); + expect(txs.length).to.equal(2); await sendTxs(txs); updatedConfig = await evmERC20WarpModule.read(); - expect(Object.keys(updatedConfig.remoteRouters!).length).to.be.equal(2); + expect(Object.keys(updatedConfig.remoteRouters!).length).to.be.equal(1); + expect(updatedConfig.remoteRouters?.['3'].address.toLowerCase()).to.be.eq( + extendedRemoteRouter['3'].address.toLowerCase(), + ); }); it('should update the owner only if they are different', async () => { @@ -600,7 +642,7 @@ describe('EvmERC20WarpHyperlaneModule', async () => { ...baseConfig, type: TokenType.native, ismFactoryAddresses, - } as TokenRouterConfig; + } as HypTokenRouterConfig; const owner = signer.address.toLowerCase(); const evmERC20WarpModule = await EvmERC20WarpModule.create({ @@ -636,7 +678,7 @@ describe('EvmERC20WarpHyperlaneModule', async () => { }); it('should update the ProxyAdmin owner only if they are different', async () => { - const config: TokenRouterConfig = { + const config: HypTokenRouterConfig = { ...baseConfig, type: TokenType.native, }; @@ -656,7 +698,7 @@ describe('EvmERC20WarpHyperlaneModule', async () => { expect(currentConfig.proxyAdmin?.owner.toLowerCase()).to.equal(owner); const newOwner = randomAddress(); - const updatedWarpCoreConfig: TokenRouterConfig = { + const updatedWarpCoreConfig: HypTokenRouterConfig = { ...config, proxyAdmin: { address: currentConfig.proxyAdmin!.address, @@ -665,7 +707,7 @@ describe('EvmERC20WarpHyperlaneModule', async () => { }; await sendTxs(await evmERC20WarpModule.update(updatedWarpCoreConfig)); - const latestConfig: TokenRouterConfig = normalizeConfig( + const latestConfig: HypTokenRouterConfig = normalizeConfig( await evmERC20WarpModule.read(), ); expect(latestConfig.proxyAdmin?.owner).to.equal(newOwner); @@ -679,7 +721,7 @@ describe('EvmERC20WarpHyperlaneModule', async () => { it('should update the destination gas', async () => { const domain = 3; - const config: TokenRouterConfig = { + const config: HypTokenRouterConfig = { ...baseConfig, type: TokenType.native, remoteRouters: { diff --git a/typescript/sdk/src/token/EvmERC20WarpModule.ts b/typescript/sdk/src/token/EvmERC20WarpModule.ts index fd497196e5..eaea93dac9 100644 --- a/typescript/sdk/src/token/EvmERC20WarpModule.ts +++ b/typescript/sdk/src/token/EvmERC20WarpModule.ts @@ -6,11 +6,6 @@ import { TokenRouter__factory, } from '@hyperlane-xyz/core'; import { buildArtifact as coreBuildArtifact } from '@hyperlane-xyz/core/buildArtifact.js'; -import { - ContractVerifier, - ExplorerLicenseType, - HyperlaneAddresses, -} from '@hyperlane-xyz/sdk'; import { Address, Domain, @@ -19,6 +14,7 @@ import { addressToBytes32, assert, deepEquals, + difference, eqAddress, isObjEmpty, objMap, @@ -26,12 +22,15 @@ import { } from '@hyperlane-xyz/utils'; import { transferOwnershipTransactions } from '../contracts/contracts.js'; +import { HyperlaneAddresses } from '../contracts/types.js'; import { HyperlaneModule, HyperlaneModuleParams, } from '../core/AbstractHyperlaneModule.js'; import { ProxyFactoryFactories } from '../deploy/contracts.js'; import { proxyAdminUpdateTxs } from '../deploy/proxy.js'; +import { ContractVerifier } from '../deploy/verify/ContractVerifier.js'; +import { ExplorerLicenseType } from '../deploy/verify/types.js'; import { EvmHookModule } from '../hook/EvmHookModule.js'; import { DerivedHookConfig } from '../hook/EvmHookReader.js'; import { EvmIsmModule } from '../ism/EvmIsmModule.js'; @@ -39,18 +38,17 @@ import { DerivedIsmConfig } from '../ism/EvmIsmReader.js'; import { MultiProvider } from '../providers/MultiProvider.js'; import { AnnotatedEV5Transaction } from '../providers/ProviderType.js'; import { ChainName, ChainNameOrId } from '../types.js'; -import { normalizeConfig } from '../utils/ism.js'; import { EvmERC20WarpRouteReader } from './EvmERC20WarpRouteReader.js'; import { HypERC20Deployer } from './deploy.js'; -import { TokenRouterConfig, TokenRouterConfigSchema } from './schemas.js'; +import { HypTokenRouterConfig, HypTokenRouterConfigSchema } from './types.js'; type WarpRouteAddresses = HyperlaneAddresses & { deployedTokenRoute: Address; }; export class EvmERC20WarpModule extends HyperlaneModule< ProtocolType.Ethereum, - TokenRouterConfig, + HypTokenRouterConfig, WarpRouteAddresses > { protected logger = rootLogger.child({ @@ -63,7 +61,7 @@ export class EvmERC20WarpModule extends HyperlaneModule< constructor( protected readonly multiProvider: MultiProvider, - args: HyperlaneModuleParams, + args: HyperlaneModuleParams, protected readonly contractVerifier?: ContractVerifier, ) { super(args); @@ -86,7 +84,7 @@ export class EvmERC20WarpModule extends HyperlaneModule< * @param address - The address to derive the token router configuration from. * @returns A promise that resolves to the token router configuration. */ - async read(): Promise { + async read(): Promise { return this.reader.deriveWarpRouteConfig( this.args.addresses.deployedTokenRoute, ); @@ -99,9 +97,9 @@ export class EvmERC20WarpModule extends HyperlaneModule< * @returns An array of Ethereum transactions that were executed to update the contract, or an error if the update failed. */ async update( - expectedConfig: TokenRouterConfig, + expectedConfig: HypTokenRouterConfig, ): Promise { - TokenRouterConfigSchema.parse(expectedConfig); + HypTokenRouterConfigSchema.parse(expectedConfig); const actualConfig = await this.read(); const transactions = []; @@ -115,7 +113,11 @@ export class EvmERC20WarpModule extends HyperlaneModule< transactions.push( ...(await this.createIsmUpdateTxs(actualConfig, expectedConfig)), ...(await this.createHookUpdateTxs(actualConfig, expectedConfig)), - ...this.createRemoteRoutersUpdateTxs(actualConfig, expectedConfig), + ...this.createEnrollRemoteRoutersUpdateTxs(actualConfig, expectedConfig), + ...this.createUnenrollRemoteRoutersUpdateTxs( + actualConfig, + expectedConfig, + ), ...this.createSetDestinationGasUpdateTxs(actualConfig, expectedConfig), ...this.createOwnershipUpdateTxs(actualConfig, expectedConfig), ...proxyAdminUpdateTxs( @@ -136,9 +138,9 @@ export class EvmERC20WarpModule extends HyperlaneModule< * @param expectedConfig - The expected token router configuration. * @returns A array with a single Ethereum transaction that need to be executed to enroll the routers */ - createRemoteRoutersUpdateTxs( - actualConfig: TokenRouterConfig, - expectedConfig: TokenRouterConfig, + createEnrollRemoteRoutersUpdateTxs( + actualConfig: HypTokenRouterConfig, + expectedConfig: HypTokenRouterConfig, ): AnnotatedEV5Transaction[] { const updateTransactions: AnnotatedEV5Transaction[] = []; if (!expectedConfig.remoteRouters) { @@ -148,46 +150,84 @@ export class EvmERC20WarpModule extends HyperlaneModule< assert(actualConfig.remoteRouters, 'actualRemoteRouters is undefined'); assert(expectedConfig.remoteRouters, 'actualRemoteRouters is undefined'); - // We normalize the addresses for comparison - actualConfig.remoteRouters = Object.fromEntries( - Object.entries(actualConfig.remoteRouters).map(([key, value]) => [ - key, - // normalizeConfig removes the address property but we don't want to lose that info - { ...normalizeConfig(value), address: normalizeConfig(value.address) }, - ]), + const { remoteRouters: actualRemoteRouters } = actualConfig; + const { remoteRouters: expectedRemoteRouters } = expectedConfig; + + const routesToEnroll = Array.from( + difference( + new Set(Object.keys(expectedRemoteRouters)), + new Set(Object.keys(actualRemoteRouters)), + ), ); - expectedConfig.remoteRouters = Object.fromEntries( - Object.entries(expectedConfig.remoteRouters).map(([key, value]) => [ - key, - // normalizeConfig removes the address property but we don't want to lose that info - { ...normalizeConfig(value), address: normalizeConfig(value.address) }, - ]), + + if (routesToEnroll.length === 0) { + return updateTransactions; + } + + const contractToUpdate = TokenRouter__factory.connect( + this.args.addresses.deployedTokenRoute, + this.multiProvider.getProvider(this.domainId), ); + updateTransactions.push({ + chainId: this.chainId, + annotation: `Enrolling Router ${this.args.addresses.deployedTokenRoute} on ${this.args.chain}`, + to: contractToUpdate.address, + data: contractToUpdate.interface.encodeFunctionData( + 'enrollRemoteRouters', + [ + routesToEnroll.map((k) => Number(k)), + routesToEnroll.map((a) => + addressToBytes32(expectedRemoteRouters[a].address), + ), + ], + ), + }); + + return updateTransactions; + } + + createUnenrollRemoteRoutersUpdateTxs( + actualConfig: HypTokenRouterConfig, + expectedConfig: HypTokenRouterConfig, + ): AnnotatedEV5Transaction[] { + const updateTransactions: AnnotatedEV5Transaction[] = []; + if (!expectedConfig.remoteRouters) { + return []; + } + + assert(actualConfig.remoteRouters, 'actualRemoteRouters is undefined'); + assert(expectedConfig.remoteRouters, 'actualRemoteRouters is undefined'); + const { remoteRouters: actualRemoteRouters } = actualConfig; const { remoteRouters: expectedRemoteRouters } = expectedConfig; - if (!deepEquals(actualRemoteRouters, expectedRemoteRouters)) { - const contractToUpdate = TokenRouter__factory.connect( - this.args.addresses.deployedTokenRoute, - this.multiProvider.getProvider(this.domainId), - ); + const routesToUnenroll = Array.from( + difference( + new Set(Object.keys(actualRemoteRouters)), + new Set(Object.keys(expectedRemoteRouters)), + ), + ); - updateTransactions.push({ - chainId: this.chainId, - annotation: `Enrolling Router ${this.args.addresses.deployedTokenRoute} on ${this.args.chain}`, - to: contractToUpdate.address, - data: contractToUpdate.interface.encodeFunctionData( - 'enrollRemoteRouters', - [ - Object.keys(expectedRemoteRouters).map((k) => Number(k)), - Object.values(expectedRemoteRouters).map((a) => - addressToBytes32(a.address), - ), - ], - ), - }); + if (routesToUnenroll.length === 0) { + return updateTransactions; } + + const contractToUpdate = TokenRouter__factory.connect( + this.args.addresses.deployedTokenRoute, + this.multiProvider.getProvider(this.domainId), + ); + + updateTransactions.push({ + annotation: `Unenrolling Router ${this.args.addresses.deployedTokenRoute} on ${this.args.chain}`, + chainId: this.chainId, + to: contractToUpdate.address, + data: contractToUpdate.interface.encodeFunctionData( + 'unenrollRemoteRouters(uint32[])', + [routesToUnenroll.map((k) => Number(k))], + ), + }); + return updateTransactions; } @@ -199,8 +239,8 @@ export class EvmERC20WarpModule extends HyperlaneModule< * @returns A array with a single Ethereum transaction that need to be executed to enroll the routers */ createSetDestinationGasUpdateTxs( - actualConfig: TokenRouterConfig, - expectedConfig: TokenRouterConfig, + actualConfig: HypTokenRouterConfig, + expectedConfig: HypTokenRouterConfig, ): AnnotatedEV5Transaction[] { const updateTransactions: AnnotatedEV5Transaction[] = []; if (!expectedConfig.destinationGas) { @@ -250,8 +290,8 @@ export class EvmERC20WarpModule extends HyperlaneModule< * @returns Ethereum transaction that need to be executed to update the ISM configuration. */ async createIsmUpdateTxs( - actualConfig: TokenRouterConfig, - expectedConfig: TokenRouterConfig, + actualConfig: HypTokenRouterConfig, + expectedConfig: HypTokenRouterConfig, ): Promise { const updateTransactions: AnnotatedEV5Transaction[] = []; if (!expectedConfig.interchainSecurityModule) { @@ -292,8 +332,8 @@ export class EvmERC20WarpModule extends HyperlaneModule< } async createHookUpdateTxs( - actualConfig: TokenRouterConfig, - expectedConfig: TokenRouterConfig, + actualConfig: HypTokenRouterConfig, + expectedConfig: HypTokenRouterConfig, ): Promise { const updateTransactions: AnnotatedEV5Transaction[] = []; @@ -340,8 +380,8 @@ export class EvmERC20WarpModule extends HyperlaneModule< * @returns Ethereum transaction that need to be executed to update the owner. */ createOwnershipUpdateTxs( - actualConfig: TokenRouterConfig, - expectedConfig: TokenRouterConfig, + actualConfig: HypTokenRouterConfig, + expectedConfig: HypTokenRouterConfig, ): AnnotatedEV5Transaction[] { return transferOwnershipTransactions( this.multiProvider.getEvmChainId(this.args.chain), @@ -358,8 +398,8 @@ export class EvmERC20WarpModule extends HyperlaneModule< * @returns Object with deployedIsm address, and update Transactions */ async deployOrUpdateIsm( - actualConfig: TokenRouterConfig, - expectedConfig: TokenRouterConfig, + actualConfig: HypTokenRouterConfig, + expectedConfig: HypTokenRouterConfig, ): Promise<{ deployedIsm: Address; updateTransactions: AnnotatedEV5Transaction[]; @@ -398,8 +438,8 @@ export class EvmERC20WarpModule extends HyperlaneModule< * @returns Object with deployedHook address, and update Transactions */ async deployOrUpdateHook( - actualConfig: TokenRouterConfig, - expectedConfig: TokenRouterConfig, + actualConfig: HypTokenRouterConfig, + expectedConfig: HypTokenRouterConfig, ): Promise<{ deployedHook: Address; updateTransactions: AnnotatedEV5Transaction[]; @@ -413,7 +453,7 @@ export class EvmERC20WarpModule extends HyperlaneModule< return this.updateExistingHook(expectedConfig, actualConfig); } - async deployNewHook(expectedConfig: TokenRouterConfig): Promise<{ + async deployNewHook(expectedConfig: HypTokenRouterConfig): Promise<{ deployedHook: Address; updateTransactions: AnnotatedEV5Transaction[]; }> { @@ -461,8 +501,8 @@ export class EvmERC20WarpModule extends HyperlaneModule< } async updateExistingHook( - expectedConfig: TokenRouterConfig, - actualConfig: TokenRouterConfig, + expectedConfig: HypTokenRouterConfig, + actualConfig: HypTokenRouterConfig, ): Promise<{ deployedHook: Address; updateTransactions: AnnotatedEV5Transaction[]; @@ -520,7 +560,7 @@ export class EvmERC20WarpModule extends HyperlaneModule< */ static async create(params: { chain: ChainNameOrId; - config: TokenRouterConfig; + config: HypTokenRouterConfig; multiProvider: MultiProvider; contractVerifier?: ContractVerifier; proxyFactoryFactories: HyperlaneAddresses; diff --git a/typescript/sdk/src/token/EvmERC20WarpRouteReader.ts b/typescript/sdk/src/token/EvmERC20WarpRouteReader.ts index 7940cde7af..0908378462 100644 --- a/typescript/sdk/src/token/EvmERC20WarpRouteReader.ts +++ b/typescript/sdk/src/token/EvmERC20WarpRouteReader.ts @@ -9,12 +9,6 @@ import { ProxyAdmin__factory, TokenRouter__factory, } from '@hyperlane-xyz/core'; -import { - MailboxClientConfig, - TokenConfig, - TokenRouterConfig, - TokenType, -} from '@hyperlane-xyz/sdk'; import { Address, bytes32ToAddress, @@ -24,20 +18,25 @@ import { } from '@hyperlane-xyz/utils'; import { DEFAULT_CONTRACT_READ_CONCURRENCY } from '../consts/concurrency.js'; -import { DeployedOwnableConfig } from '../deploy/types.js'; import { EvmHookReader } from '../hook/EvmHookReader.js'; import { EvmIsmReader } from '../ism/EvmIsmReader.js'; import { MultiProvider } from '../providers/MultiProvider.js'; import { DestinationGas, + MailboxClientConfig, RemoteRouters, RemoteRoutersSchema, } from '../router/types.js'; -import { ChainNameOrId } from '../types.js'; +import { ChainNameOrId, DeployedOwnableConfig } from '../types.js'; import { HyperlaneReader } from '../utils/HyperlaneReader.js'; import { proxyAdmin } from './../deploy/proxy.js'; -import { TokenMetadata } from './types.js'; +import { TokenType } from './config.js'; +import { + HypTokenConfig, + HypTokenRouterConfig, + TokenMetadata, +} from './types.js'; export class EvmERC20WarpRouteReader extends HyperlaneReader { protected readonly logger = rootLogger.child({ @@ -65,7 +64,7 @@ export class EvmERC20WarpRouteReader extends HyperlaneReader { */ async deriveWarpRouteConfig( warpRouteAddress: Address, - ): Promise { + ): Promise { // Derive the config type const type = await this.deriveTokenType(warpRouteAddress); const baseMetadata = await this.fetchMailboxClientConfig(warpRouteAddress); @@ -81,7 +80,7 @@ export class EvmERC20WarpRouteReader extends HyperlaneReader { proxyAdmin, destinationGas, type, - } as TokenRouterConfig; + } as HypTokenRouterConfig; } /** @@ -196,7 +195,7 @@ export class EvmERC20WarpRouteReader extends HyperlaneReader { async fetchTokenConfig( type: TokenType, tokenAddress: Address, - ): Promise { + ): Promise { if ( type === TokenType.collateral || type === TokenType.collateralVault || diff --git a/typescript/sdk/src/token/app.ts b/typescript/sdk/src/token/app.ts index ae3cf95ccb..746c184f12 100644 --- a/typescript/sdk/src/token/app.ts +++ b/typescript/sdk/src/token/app.ts @@ -1,11 +1,6 @@ import { Logger } from 'pino'; import { TokenRouter } from '@hyperlane-xyz/core'; -import { - ChainMap, - ProxiedFactories, - proxiedFactories, -} from '@hyperlane-xyz/sdk'; import { Address, objKeys } from '@hyperlane-xyz/utils'; import { appFromAddressesMapHelper } from '../contracts/contracts.js'; @@ -16,6 +11,8 @@ import { } from '../contracts/types.js'; import { MultiProvider } from '../providers/MultiProvider.js'; import { GasRouterApp } from '../router/RouterApps.js'; +import { ProxiedFactories, proxiedFactories } from '../router/types.js'; +import { ChainMap } from '../types.js'; import { HypERC20Factories, hypERC20factories } from './contracts.js'; diff --git a/typescript/sdk/src/token/checker.ts b/typescript/sdk/src/token/checker.ts index 54ed772d0b..cf29d28c81 100644 --- a/typescript/sdk/src/token/checker.ts +++ b/typescript/sdk/src/token/checker.ts @@ -18,17 +18,17 @@ import { HypERC20App } from './app.js'; import { TokenType } from './config.js'; import { HypERC20Factories } from './contracts.js'; import { - TokenRouterConfig, - isCollateralConfig, - isNativeConfig, - isSyntheticConfig, -} from './schemas.js'; -import { TokenMetadata } from './types.js'; + HypTokenRouterConfig, + TokenMetadata, + isCollateralTokenConfig, + isNativeTokenConfig, + isSyntheticTokenConfig, +} from './types.js'; export class HypERC20Checker extends ProxiedRouterChecker< HypERC20Factories & ProxiedFactories, HypERC20App, - TokenRouterConfig + HypTokenRouterConfig > { async checkChain(chain: ChainName): Promise { await super.checkChain(chain); @@ -38,7 +38,7 @@ export class HypERC20Checker extends ProxiedRouterChecker< async checkToken(chain: ChainName): Promise { const checkERC20 = async ( token: ERC20, - config: TokenRouterConfig, + config: HypTokenRouterConfig, ): Promise => { const checks: { method: keyof ERC20 & keyof TokenMetadata; @@ -91,7 +91,7 @@ export class HypERC20Checker extends ProxiedRouterChecker< false, ); - if (isNativeConfig(expectedConfig)) { + if (isNativeTokenConfig(expectedConfig)) { try { await this.multiProvider.estimateGas(chain, { to: hypToken.address, @@ -108,9 +108,9 @@ export class HypERC20Checker extends ProxiedRouterChecker< }; this.addViolation(violation); } - } else if (isSyntheticConfig(expectedConfig)) { + } else if (isSyntheticTokenConfig(expectedConfig)) { await checkERC20(hypToken as unknown as ERC20, expectedConfig); - } else if (isCollateralConfig(expectedConfig)) { + } else if (isCollateralTokenConfig(expectedConfig)) { const collateralToken = await this.getCollateralToken(chain); const actualToken = await ( hypToken as unknown as HypERC20Collateral @@ -154,12 +154,12 @@ export class HypERC20Checker extends ProxiedRouterChecker< const expectedConfig = this.configMap[chain]; let decimals: number | undefined = undefined; - if (isNativeConfig(expectedConfig)) { + if (isNativeTokenConfig(expectedConfig)) { decimals = this.multiProvider.getChainMetadata(chain).nativeToken?.decimals; - } else if (isSyntheticConfig(expectedConfig)) { + } else if (isSyntheticTokenConfig(expectedConfig)) { decimals = await (hypToken as unknown as ERC20).decimals(); - } else if (isCollateralConfig(expectedConfig)) { + } else if (isCollateralTokenConfig(expectedConfig)) { const collateralToken = await this.getCollateralToken(chain); decimals = await collateralToken.decimals(); } @@ -175,7 +175,7 @@ export class HypERC20Checker extends ProxiedRouterChecker< const expectedConfig = this.configMap[chain]; let collateralToken: ERC20 | undefined = undefined; - if (isCollateralConfig(expectedConfig)) { + if (isCollateralTokenConfig(expectedConfig)) { const provider = this.multiProvider.getProvider(chain); if (expectedConfig.type === TokenType.XERC20Lockbox) { diff --git a/typescript/sdk/src/token/deploy.hardhat-test.ts b/typescript/sdk/src/token/deploy.hardhat-test.ts index 772813943c..3c7d74b22a 100644 --- a/typescript/sdk/src/token/deploy.hardhat-test.ts +++ b/typescript/sdk/src/token/deploy.hardhat-test.ts @@ -15,8 +15,7 @@ import { MultiProvider } from '../providers/MultiProvider.js'; import { EvmERC20WarpRouteReader } from './EvmERC20WarpRouteReader.js'; import { TokenType } from './config.js'; import { HypERC20Deployer } from './deploy.js'; -import { TokenRouterConfig } from './schemas.js'; -import { WarpRouteDeployConfig } from './types.js'; +import { HypTokenRouterConfig, WarpRouteDeployConfig } from './types.js'; const chain = TestChainName.test1; @@ -40,7 +39,7 @@ describe('TokenDeployer', async () => { const routerConfigMap = coreApp.getRouterConfig(signer.address); config = objMap( routerConfigMap, - (chain, c): TokenRouterConfig => ({ + (chain, c): HypTokenRouterConfig => ({ type: TokenType.synthetic, name: chain, symbol: `u${chain}`, @@ -91,7 +90,7 @@ describe('TokenDeployer', async () => { routerAddress = warpRoute[chain][type].address; }); - it(`should derive TokenRouterConfig correctly`, async () => { + it(`should derive HypTokenRouterConfig correctly`, async () => { const derivedConfig = await reader.deriveWarpRouteConfig(routerAddress); expect(derivedConfig.type).to.equal(config[chain].type); }); diff --git a/typescript/sdk/src/token/deploy.ts b/typescript/sdk/src/token/deploy.ts index 87f77bc882..29aeac28ef 100644 --- a/typescript/sdk/src/token/deploy.ts +++ b/typescript/sdk/src/token/deploy.ts @@ -7,7 +7,6 @@ import { IERC4626__factory, IXERC20Lockbox__factory, } from '@hyperlane-xyz/core'; -import { TokenType } from '@hyperlane-xyz/sdk'; import { assert, objKeys, objMap, rootLogger } from '@hyperlane-xyz/utils'; import { HyperlaneContracts } from '../contracts/types.js'; @@ -17,7 +16,7 @@ import { MultiProvider } from '../providers/MultiProvider.js'; import { GasRouterDeployer } from '../router/GasRouterDeployer.js'; import { ChainName } from '../types.js'; -import { gasOverhead } from './config.js'; +import { TokenType, gasOverhead } from './config.js'; import { HypERC20Factories, HypERC721Factories, @@ -28,19 +27,20 @@ import { hypERC721factories, } from './contracts.js'; import { + HypTokenRouterConfig, + TokenMetadata, TokenMetadataSchema, - TokenRouterConfig, - isCollateralConfig, - isNativeConfig, - isSyntheticConfig, - isSyntheticRebaseConfig, + WarpRouteDeployConfig, + isCollateralTokenConfig, + isNativeTokenConfig, + isSyntheticRebaseTokenConfig, + isSyntheticTokenConfig, isTokenMetadata, -} from './schemas.js'; -import { TokenMetadata, WarpRouteDeployConfig } from './types.js'; +} from './types.js'; abstract class TokenDeployer< Factories extends TokenFactories, -> extends GasRouterDeployer { +> extends GasRouterDeployer { constructor( multiProvider: MultiProvider, factories: Factories, @@ -57,15 +57,18 @@ abstract class TokenDeployer< }); // factories not used in deploy } - async constructorArgs(_: ChainName, config: TokenRouterConfig): Promise { - if (isCollateralConfig(config)) { + async constructorArgs( + _: ChainName, + config: HypTokenRouterConfig, + ): Promise { + if (isCollateralTokenConfig(config)) { return [config.token, config.mailbox]; - } else if (isNativeConfig(config)) { + } else if (isNativeTokenConfig(config)) { return config.scale ? [config.scale, config.mailbox] : [config.mailbox]; - } else if (isSyntheticConfig(config)) { + } else if (isSyntheticTokenConfig(config)) { assert(config.decimals, 'decimals is undefined for config'); // decimals must be defined by this point return [config.decimals, config.mailbox]; - } else if (isSyntheticRebaseConfig(config)) { + } else if (isSyntheticRebaseTokenConfig(config)) { const collateralDomain = this.multiProvider.getDomainId( config.collateralChainName, ); @@ -77,7 +80,7 @@ abstract class TokenDeployer< async initializeArgs( chain: ChainName, - config: TokenRouterConfig, + config: HypTokenRouterConfig, ): Promise { const signer = await this.multiProvider.getSigner(chain).getAddress(); const defaultArgs = [ @@ -86,11 +89,11 @@ abstract class TokenDeployer< // TransferOwnership will happen later in RouterDeployer signer, ]; - if (isCollateralConfig(config) || isNativeConfig(config)) { + if (isCollateralTokenConfig(config) || isNativeTokenConfig(config)) { return defaultArgs; - } else if (isSyntheticConfig(config)) { + } else if (isSyntheticTokenConfig(config)) { return [config.totalSupply, config.name, config.symbol, ...defaultArgs]; - } else if (isSyntheticRebaseConfig(config)) { + } else if (isSyntheticRebaseTokenConfig(config)) { return [0, config.name, config.symbol, ...defaultArgs]; } else { throw new Error('Unknown collateral type when initializing arguments'); @@ -109,7 +112,7 @@ abstract class TokenDeployer< return TokenMetadataSchema.parse(config); } - if (isNativeConfig(config)) { + if (isNativeTokenConfig(config)) { const nativeToken = multiProvider.getChainMetadata(chain).nativeToken; if (nativeToken) { return TokenMetadataSchema.parse({ @@ -119,7 +122,7 @@ abstract class TokenDeployer< } } - if (isCollateralConfig(config)) { + if (isCollateralTokenConfig(config)) { const provider = multiProvider.getProvider(chain); if (config.isNft) { @@ -223,12 +226,12 @@ export class HypERC20Deployer extends TokenDeployer { throw new Error('No matching contract found'); } - routerContractKey(config: TokenRouterConfig): keyof HypERC20Factories { + routerContractKey(config: HypTokenRouterConfig): keyof HypERC20Factories { assert(config.type in hypERC20factories, 'Invalid ERC20 token type'); return config.type as keyof HypERC20Factories; } - routerContractName(config: TokenRouterConfig): string { + routerContractName(config: HypTokenRouterConfig): string { return hypERC20contracts[this.routerContractKey(config)]; } } @@ -257,12 +260,12 @@ export class HypERC721Deployer extends TokenDeployer { throw new Error('No matching contract found'); } - routerContractKey(config: TokenRouterConfig): keyof HypERC721Factories { + routerContractKey(config: HypTokenRouterConfig): keyof HypERC721Factories { assert(config.type in hypERC721factories, 'Invalid ERC721 token type'); return config.type as keyof HypERC721Factories; } - routerContractName(config: TokenRouterConfig): string { + routerContractName(config: HypTokenRouterConfig): string { return hypERC721contracts[this.routerContractKey(config)]; } } diff --git a/typescript/sdk/src/token/schemas.ts b/typescript/sdk/src/token/schemas.ts deleted file mode 100644 index 7c975530f1..0000000000 --- a/typescript/sdk/src/token/schemas.ts +++ /dev/null @@ -1,147 +0,0 @@ -import { z } from 'zod'; - -import { objMap } from '@hyperlane-xyz/utils'; - -import { GasRouterConfigSchema } from '../router/types.js'; -import { isCompliant } from '../utils/schemas.js'; - -import { TokenType } from './config.js'; - -export const WarpRouteDeployConfigSchemaErrors = { - ONLY_SYNTHETIC_REBASE: `Config with ${TokenType.collateralVaultRebase} must be deployed with ${TokenType.syntheticRebase}`, - NO_SYNTHETIC_ONLY: `Config must include Native or Collateral OR all synthetics must define token metadata`, -}; -export const TokenMetadataSchema = z.object({ - name: z.string(), - symbol: z.string(), - totalSupply: z.string().or(z.number()), - decimals: z.number().optional(), - scale: z.number().optional(), - isNft: z.boolean().optional(), -}); - -export const CollateralConfigSchema = TokenMetadataSchema.partial().extend({ - type: z.enum([ - TokenType.collateral, - TokenType.collateralVault, - TokenType.collateralVaultRebase, - TokenType.XERC20, - TokenType.XERC20Lockbox, - TokenType.collateralFiat, - TokenType.fastCollateral, - TokenType.collateralUri, - ]), - token: z - .string() - .describe('Existing token address to extend with Warp Route functionality'), -}); - -export const NativeConfigSchema = TokenMetadataSchema.partial().extend({ - type: z.enum([TokenType.native, TokenType.nativeScaled]), -}); - -export const CollateralRebaseConfigSchema = TokenMetadataSchema.omit({ - totalSupply: true, -}) - .partial() - .extend({ - type: z.literal(TokenType.collateralVaultRebase), - }); - -export const SyntheticRebaseConfigSchema = TokenMetadataSchema.partial().extend( - { - type: z.literal(TokenType.syntheticRebase), - collateralChainName: z.string(), - }, -); - -export const SyntheticConfigSchema = TokenMetadataSchema.partial().extend({ - type: z.enum([ - TokenType.synthetic, - TokenType.syntheticUri, - TokenType.fastSynthetic, - ]), -}); - -/** - * @remarks - * The discriminatedUnion is basically a switch statement for zod schemas - * It uses the 'type' key to pick from the array of schemas to validate - */ -export const TokenConfigSchema = z.discriminatedUnion('type', [ - NativeConfigSchema, - CollateralConfigSchema, - SyntheticConfigSchema, - SyntheticRebaseConfigSchema, -]); -export type TokenConfig = z.infer; - -export const TokenRouterConfigSchema = TokenConfigSchema.and( - GasRouterConfigSchema, -); - -export type TokenRouterConfig = z.infer; -export type NativeConfig = z.infer; -export type CollateralConfig = z.infer; - -export const isSyntheticConfig = isCompliant(SyntheticConfigSchema); -export const isSyntheticRebaseConfig = isCompliant(SyntheticRebaseConfigSchema); -export const isCollateralRebaseConfig = isCompliant( - CollateralRebaseConfigSchema, -); -export const isCollateralConfig = isCompliant(CollateralConfigSchema); -export const isNativeConfig = isCompliant(NativeConfigSchema); -export const isTokenMetadata = isCompliant(TokenMetadataSchema); - -export const WarpRouteDeployConfigSchema = z - .record(TokenRouterConfigSchema) - .refine((configMap) => { - const entries = Object.entries(configMap); - return ( - entries.some( - ([_, config]) => - isCollateralConfig(config) || - isCollateralRebaseConfig(config) || - isNativeConfig(config), - ) || entries.every(([_, config]) => isTokenMetadata(config)) - ); - }, WarpRouteDeployConfigSchemaErrors.NO_SYNTHETIC_ONLY) - .transform((warpRouteDeployConfig, ctx) => { - const collateralRebaseEntry = Object.entries(warpRouteDeployConfig).find( - ([_, config]) => isCollateralRebaseConfig(config), - ); - if (!collateralRebaseEntry) return warpRouteDeployConfig; // Pass through for other token types - - if (isCollateralRebasePairedCorrectly(warpRouteDeployConfig)) { - const collateralChainName = collateralRebaseEntry[0]; - return objMap(warpRouteDeployConfig, (_, config) => { - if (config.type === TokenType.syntheticRebase) - config.collateralChainName = collateralChainName; - return config; - }) as Record; - } - - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message: WarpRouteDeployConfigSchemaErrors.ONLY_SYNTHETIC_REBASE, - }); - - return z.NEVER; // Causes schema validation to throw with above issue - }); - -function isCollateralRebasePairedCorrectly( - warpRouteDeployConfig: Record, -): boolean { - // Filter out all the non-collateral rebase configs to check if they are only synthetic rebase tokens - const otherConfigs = Object.entries(warpRouteDeployConfig).filter( - ([_, config]) => !isCollateralRebaseConfig(config), - ); - - if (otherConfigs.length === 0) return false; - - // The other configs MUST be synthetic rebase - const allOthersSynthetic: boolean = otherConfigs.every( - ([_, config], _index) => isSyntheticRebaseConfig(config), - ); - return allOthersSynthetic; -} diff --git a/typescript/sdk/src/token/schemas.test.ts b/typescript/sdk/src/token/types.test.ts similarity index 97% rename from typescript/sdk/src/token/schemas.test.ts rename to typescript/sdk/src/token/types.test.ts index 1a8d606ea1..eba79c928d 100644 --- a/typescript/sdk/src/token/schemas.test.ts +++ b/typescript/sdk/src/token/types.test.ts @@ -5,11 +5,11 @@ import { assert } from '@hyperlane-xyz/utils'; import { TokenType } from './config.js'; import { + WarpRouteDeployConfig, WarpRouteDeployConfigSchema, WarpRouteDeployConfigSchemaErrors, - isCollateralConfig, -} from './schemas.js'; -import { WarpRouteDeployConfig } from './types.js'; + isCollateralTokenConfig, +} from './types.js'; const SOME_ADDRESS = ethers.Wallet.createRandom().address; const COLLATERAL_TYPES = [ @@ -65,7 +65,7 @@ describe('WarpRouteDeployConfigSchema refine', () => { it('should throw if collateral type and token is empty', async () => { for (const type of COLLATERAL_TYPES) { config.arbitrum.type = type; - assert(isCollateralConfig(config.arbitrum), 'must be collateral'); + assert(isCollateralTokenConfig(config.arbitrum), 'must be collateral'); //@ts-ignore config.arbitrum.token = undefined; diff --git a/typescript/sdk/src/token/types.ts b/typescript/sdk/src/token/types.ts index 8cbead3317..400a40d263 100644 --- a/typescript/sdk/src/token/types.ts +++ b/typescript/sdk/src/token/types.ts @@ -1,11 +1,156 @@ import { z } from 'zod'; -import { - TokenMetadataSchema, - TokenRouterConfigSchema, - WarpRouteDeployConfigSchema, -} from './schemas.js'; +import { objMap } from '@hyperlane-xyz/utils'; +import { GasRouterConfigSchema } from '../router/types.js'; +import { isCompliant } from '../utils/schemas.js'; + +import { TokenType } from './config.js'; + +export const WarpRouteDeployConfigSchemaErrors = { + ONLY_SYNTHETIC_REBASE: `Config with ${TokenType.collateralVaultRebase} must be deployed with ${TokenType.syntheticRebase}`, + NO_SYNTHETIC_ONLY: `Config must include Native or Collateral OR all synthetics must define token metadata`, +}; +export const TokenMetadataSchema = z.object({ + name: z.string(), + symbol: z.string(), + totalSupply: z.string().or(z.number()), + decimals: z.number().optional(), + scale: z.number().optional(), + isNft: z.boolean().optional(), +}); export type TokenMetadata = z.infer; -export type TokenRouterConfig = z.infer; +export const isTokenMetadata = isCompliant(TokenMetadataSchema); + +export const NativeTokenConfigSchema = TokenMetadataSchema.partial().extend({ + type: z.enum([TokenType.native, TokenType.nativeScaled]), +}); +export type NativeTokenConfig = z.infer; +export const isNativeTokenConfig = isCompliant(NativeTokenConfigSchema); + +export const CollateralTokenConfigSchema = TokenMetadataSchema.partial().extend( + { + type: z.enum([ + TokenType.collateral, + TokenType.collateralVault, + TokenType.collateralVaultRebase, + TokenType.XERC20, + TokenType.XERC20Lockbox, + TokenType.collateralFiat, + TokenType.fastCollateral, + TokenType.collateralUri, + ]), + token: z + .string() + .describe( + 'Existing token address to extend with Warp Route functionality', + ), + }, +); +export type CollateralTokenConfig = z.infer; +export const isCollateralTokenConfig = isCompliant(CollateralTokenConfigSchema); + +export const CollateralRebaseTokenConfigSchema = TokenMetadataSchema.omit({ + totalSupply: true, +}) + .partial() + .extend({ + type: z.literal(TokenType.collateralVaultRebase), + }); +export const isCollateralRebaseTokenConfig = isCompliant( + CollateralRebaseTokenConfigSchema, +); + +export const SyntheticTokenConfigSchema = TokenMetadataSchema.partial().extend({ + type: z.enum([ + TokenType.synthetic, + TokenType.syntheticUri, + TokenType.fastSynthetic, + ]), +}); +export type SyntheticTokenConfig = z.infer; +export const isSyntheticTokenConfig = isCompliant(SyntheticTokenConfigSchema); + +export const SyntheticRebaseTokenConfigSchema = + TokenMetadataSchema.partial().extend({ + type: z.literal(TokenType.syntheticRebase), + collateralChainName: z.string(), + }); +export type SyntheticRebaseTokenConfig = z.infer< + typeof CollateralTokenConfigSchema +>; +export const isSyntheticRebaseTokenConfig = isCompliant( + SyntheticRebaseTokenConfigSchema, +); + +/** + * @remarks + * The discriminatedUnion is basically a switch statement for zod schemas + * It uses the 'type' key to pick from the array of schemas to validate + */ +export const HypTokenConfigSchema = z.discriminatedUnion('type', [ + NativeTokenConfigSchema, + CollateralTokenConfigSchema, + SyntheticTokenConfigSchema, + SyntheticRebaseTokenConfigSchema, +]); +export type HypTokenConfig = z.infer; + +export const HypTokenRouterConfigSchema = HypTokenConfigSchema.and( + GasRouterConfigSchema, +); +export type HypTokenRouterConfig = z.infer; + +export const WarpRouteDeployConfigSchema = z + .record(HypTokenRouterConfigSchema) + .refine((configMap) => { + const entries = Object.entries(configMap); + return ( + entries.some( + ([_, config]) => + isCollateralTokenConfig(config) || + isCollateralRebaseTokenConfig(config) || + isNativeTokenConfig(config), + ) || entries.every(([_, config]) => isTokenMetadata(config)) + ); + }, WarpRouteDeployConfigSchemaErrors.NO_SYNTHETIC_ONLY) + .transform((warpRouteDeployConfig, ctx) => { + const collateralRebaseEntry = Object.entries(warpRouteDeployConfig).find( + ([_, config]) => isCollateralRebaseTokenConfig(config), + ); + if (!collateralRebaseEntry) return warpRouteDeployConfig; // Pass through for other token types + + if (isCollateralRebasePairedCorrectly(warpRouteDeployConfig)) { + const collateralChainName = collateralRebaseEntry[0]; + return objMap(warpRouteDeployConfig, (_, config) => { + if (config.type === TokenType.syntheticRebase) + config.collateralChainName = collateralChainName; + return config; + }) as Record; + } + + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: WarpRouteDeployConfigSchemaErrors.ONLY_SYNTHETIC_REBASE, + }); + + return z.NEVER; // Causes schema validation to throw with above issue + }); export type WarpRouteDeployConfig = z.infer; + +function isCollateralRebasePairedCorrectly( + warpRouteDeployConfig: Record, +): boolean { + // Filter out all the non-collateral rebase configs to check if they are only synthetic rebase tokens + const otherConfigs = Object.entries(warpRouteDeployConfig).filter( + ([_, config]) => !isCollateralRebaseTokenConfig(config), + ); + + if (otherConfigs.length === 0) return false; + + // The other configs MUST be synthetic rebase + const allOthersSynthetic: boolean = otherConfigs.every( + ([_, config], _index) => isSyntheticRebaseTokenConfig(config), + ); + return allOthersSynthetic; +} diff --git a/typescript/sdk/src/types.ts b/typescript/sdk/src/types.ts index aad0b5d9c8..3641592812 100644 --- a/typescript/sdk/src/types.ts +++ b/typescript/sdk/src/types.ts @@ -1,7 +1,10 @@ import type { ethers } from 'ethers'; +import { z } from 'zod'; import type { Domain } from '@hyperlane-xyz/utils'; +import { ZHash } from './metadata/customZodTypes.js'; + // An alias for string to clarify type is a chain name export type ChainName = string; // A map of chain names to a value type @@ -10,3 +13,24 @@ export type ChainMap = Record; export type ChainNameOrId = ChainName | Domain; export type Connection = ethers.providers.Provider | ethers.Signer; + +export const OwnableSchema = z.object({ + owner: ZHash, + ownerOverrides: z.record(ZHash).optional(), +}); +export type OwnableConfig = z.infer; + +export const DeployedOwnableSchema = OwnableSchema.extend({ + address: ZHash.optional(), +}); +export type DeployedOwnableConfig = z.infer; + +export const DerivedOwnableSchema = DeployedOwnableSchema.omit({ + ownerOverrides: true, +}).required(); +export type DerivedOwnableConfig = z.infer; + +export const PausableSchema = OwnableSchema.extend({ + paused: z.boolean(), +}); +export type PausableConfig = z.infer; diff --git a/typescript/utils/CHANGELOG.md b/typescript/utils/CHANGELOG.md index 62f8c89399..3cf2756603 100644 --- a/typescript/utils/CHANGELOG.md +++ b/typescript/utils/CHANGELOG.md @@ -1,5 +1,7 @@ # @hyperlane-xyz/utils +## 7.3.0 + ## 7.2.0 ### Minor Changes diff --git a/typescript/utils/package.json b/typescript/utils/package.json index 327ec241aa..8b24cb7106 100644 --- a/typescript/utils/package.json +++ b/typescript/utils/package.json @@ -1,7 +1,7 @@ { "name": "@hyperlane-xyz/utils", "description": "General utilities and types for the Hyperlane network", - "version": "7.2.0", + "version": "7.3.0", "dependencies": { "@cosmjs/encoding": "^0.32.4", "@solana/web3.js": "^1.95.4", diff --git a/typescript/widgets/CHANGELOG.md b/typescript/widgets/CHANGELOG.md index ba6dd93bd1..be73ca35c6 100644 --- a/typescript/widgets/CHANGELOG.md +++ b/typescript/widgets/CHANGELOG.md @@ -1,5 +1,25 @@ # @hyperlane-xyz/widgets +## 7.3.0 + +### Patch Changes + +- Updated dependencies [2054f4f5b] +- Updated dependencies [a96448fa6] +- Updated dependencies [170a0fc73] +- Updated dependencies [9a09afcc7] +- Updated dependencies [24784af95] +- Updated dependencies [3e8dd70ac] +- Updated dependencies [aa1ea9a48] +- Updated dependencies [665a7b8d8] +- Updated dependencies [f0b98fdef] +- Updated dependencies [ff9e8a72b] +- Updated dependencies [97c1f80b7] +- Updated dependencies [323f0f158] +- Updated dependencies [61157097b] + - @hyperlane-xyz/sdk@7.3.0 + - @hyperlane-xyz/utils@7.3.0 + ## 7.2.0 ### Patch Changes diff --git a/typescript/widgets/package.json b/typescript/widgets/package.json index 90e1e6778a..f662fa2a29 100644 --- a/typescript/widgets/package.json +++ b/typescript/widgets/package.json @@ -1,7 +1,7 @@ { "name": "@hyperlane-xyz/widgets", "description": "Common react components for Hyperlane projects", - "version": "7.2.0", + "version": "7.3.0", "peerDependencies": { "react": "^18", "react-dom": "^18" @@ -9,8 +9,8 @@ "dependencies": { "@cosmos-kit/react": "^2.18.0", "@headlessui/react": "^2.1.8", - "@hyperlane-xyz/sdk": "7.2.0", - "@hyperlane-xyz/utils": "7.2.0", + "@hyperlane-xyz/sdk": "7.3.0", + "@hyperlane-xyz/utils": "7.3.0", "@interchain-ui/react": "^1.23.28", "@rainbow-me/rainbowkit": "^2.2.0", "@solana/wallet-adapter-react": "^0.15.32", @@ -27,7 +27,7 @@ "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0", "@eslint/js": "^9.15.0", - "@hyperlane-xyz/registry": "6.1.0", + "@hyperlane-xyz/registry": "6.3.0", "@storybook/addon-essentials": "^7.6.14", "@storybook/addon-interactions": "^7.6.14", "@storybook/addon-links": "^7.6.14", diff --git a/yarn.lock b/yarn.lock index 18938a11e0..a50cd88b14 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7374,9 +7374,9 @@ __metadata: "@eslint/js": "npm:^9.15.0" "@ethersproject/abi": "npm:*" "@ethersproject/providers": "npm:*" - "@hyperlane-xyz/registry": "npm:6.1.0" - "@hyperlane-xyz/sdk": "npm:7.2.0" - "@hyperlane-xyz/utils": "npm:7.2.0" + "@hyperlane-xyz/registry": "npm:6.3.0" + "@hyperlane-xyz/sdk": "npm:7.3.0" + "@hyperlane-xyz/utils": "npm:7.3.0" "@inquirer/core": "npm:9.0.10" "@inquirer/figures": "npm:1.0.5" "@inquirer/prompts": "npm:3.3.2" @@ -7414,13 +7414,13 @@ __metadata: languageName: unknown linkType: soft -"@hyperlane-xyz/core@npm:5.8.2, @hyperlane-xyz/core@workspace:solidity": +"@hyperlane-xyz/core@npm:5.8.3, @hyperlane-xyz/core@workspace:solidity": version: 0.0.0-use.local resolution: "@hyperlane-xyz/core@workspace:solidity" dependencies: "@arbitrum/nitro-contracts": "npm:^1.2.1" "@eth-optimism/contracts": "npm:^0.6.0" - "@hyperlane-xyz/utils": "npm:7.2.0" + "@hyperlane-xyz/utils": "npm:7.3.0" "@layerzerolabs/lz-evm-oapp-v2": "npm:2.0.2" "@layerzerolabs/solidity-examples": "npm:^1.1.0" "@matterlabs/hardhat-zksync-solc": "npm:^1.2.4" @@ -7473,14 +7473,14 @@ __metadata: languageName: unknown linkType: soft -"@hyperlane-xyz/helloworld@npm:7.2.0, @hyperlane-xyz/helloworld@workspace:typescript/helloworld": +"@hyperlane-xyz/helloworld@npm:7.3.0, @hyperlane-xyz/helloworld@workspace:typescript/helloworld": version: 0.0.0-use.local resolution: "@hyperlane-xyz/helloworld@workspace:typescript/helloworld" dependencies: "@eslint/js": "npm:^9.15.0" - "@hyperlane-xyz/core": "npm:5.8.2" - "@hyperlane-xyz/registry": "npm:6.1.0" - "@hyperlane-xyz/sdk": "npm:7.2.0" + "@hyperlane-xyz/core": "npm:5.8.3" + "@hyperlane-xyz/registry": "npm:6.3.0" + "@hyperlane-xyz/sdk": "npm:7.3.0" "@nomiclabs/hardhat-ethers": "npm:^2.2.3" "@nomiclabs/hardhat-waffle": "npm:^2.0.6" "@openzeppelin/contracts-upgradeable": "npm:^4.9.3" @@ -7529,10 +7529,10 @@ __metadata: "@ethersproject/hardware-wallets": "npm:^5.7.0" "@ethersproject/providers": "npm:*" "@google-cloud/secret-manager": "npm:^5.5.0" - "@hyperlane-xyz/helloworld": "npm:7.2.0" - "@hyperlane-xyz/registry": "npm:6.1.0" - "@hyperlane-xyz/sdk": "npm:7.2.0" - "@hyperlane-xyz/utils": "npm:7.2.0" + "@hyperlane-xyz/helloworld": "npm:7.3.0" + "@hyperlane-xyz/registry": "npm:6.3.0" + "@hyperlane-xyz/sdk": "npm:7.3.0" + "@hyperlane-xyz/utils": "npm:7.3.0" "@inquirer/prompts": "npm:3.3.2" "@nomiclabs/hardhat-ethers": "npm:^2.2.3" "@nomiclabs/hardhat-etherscan": "npm:^3.0.3" @@ -7592,17 +7592,17 @@ __metadata: languageName: unknown linkType: soft -"@hyperlane-xyz/registry@npm:6.1.0": - version: 6.1.0 - resolution: "@hyperlane-xyz/registry@npm:6.1.0" +"@hyperlane-xyz/registry@npm:6.3.0": + version: 6.3.0 + resolution: "@hyperlane-xyz/registry@npm:6.3.0" dependencies: yaml: "npm:2.4.5" zod: "npm:^3.21.2" - checksum: 10/a0e1ecc02d83604793ddda0a3e00a9ffcaa38b1cddf9883b47cf8f1919b4474abd6cc2ee84846e6a35e1bc7539299b9bec92bfdf06be72beecff6aa44b73d382 + checksum: 10/7a1b7226593edf8e12c7e3d425b7889679d46abae1e8c5a389a0b472e2e0a08b292ba89f60572eff9e844c7b5f7322e4420a8888fabef9967c206d5b39f391a1 languageName: node linkType: hard -"@hyperlane-xyz/sdk@npm:7.2.0, @hyperlane-xyz/sdk@workspace:typescript/sdk": +"@hyperlane-xyz/sdk@npm:7.3.0, @hyperlane-xyz/sdk@workspace:typescript/sdk": version: 0.0.0-use.local resolution: "@hyperlane-xyz/sdk@workspace:typescript/sdk" dependencies: @@ -7613,8 +7613,8 @@ __metadata: "@cosmjs/stargate": "npm:^0.32.4" "@eslint/js": "npm:^9.15.0" "@google-cloud/storage": "npm:7.14.0" - "@hyperlane-xyz/core": "npm:5.8.2" - "@hyperlane-xyz/utils": "npm:7.2.0" + "@hyperlane-xyz/core": "npm:5.8.3" + "@hyperlane-xyz/utils": "npm:7.3.0" "@nomiclabs/hardhat-ethers": "npm:^2.2.3" "@nomiclabs/hardhat-waffle": "npm:^2.0.6" "@safe-global/api-kit": "npm:1.3.0" @@ -7658,7 +7658,7 @@ __metadata: languageName: unknown linkType: soft -"@hyperlane-xyz/utils@npm:7.2.0, @hyperlane-xyz/utils@workspace:typescript/utils": +"@hyperlane-xyz/utils@npm:7.3.0, @hyperlane-xyz/utils@workspace:typescript/utils": version: 0.0.0-use.local resolution: "@hyperlane-xyz/utils@workspace:typescript/utils" dependencies: @@ -7699,9 +7699,9 @@ __metadata: "@emotion/styled": "npm:^11.13.0" "@eslint/js": "npm:^9.15.0" "@headlessui/react": "npm:^2.1.8" - "@hyperlane-xyz/registry": "npm:6.1.0" - "@hyperlane-xyz/sdk": "npm:7.2.0" - "@hyperlane-xyz/utils": "npm:7.2.0" + "@hyperlane-xyz/registry": "npm:6.3.0" + "@hyperlane-xyz/sdk": "npm:7.3.0" + "@hyperlane-xyz/utils": "npm:7.3.0" "@interchain-ui/react": "npm:^1.23.28" "@rainbow-me/rainbowkit": "npm:^2.2.0" "@solana/wallet-adapter-react": "npm:^0.15.32"