From da25b06254b2a5920aae0ab7388c5a0170e06ee8 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 13 Jul 2023 21:28:12 +0200 Subject: [PATCH] CCIP Read ISM (#2398) ### Description CCIP Read ISM implementation, - [x] Contracts - [x] Relayer - [x] Example HTTP backend ### Drive-by changes _Are there any minor or drive-by changes also included?_ ### Related issues - Fixes #[2211] ### Backward compatibility _Are these changes backward compatible?_ Yes, relayers will skip messages they can't handle. _Are there any infrastructure implications, e.g. changes that would prohibit deploying older commits using this infra tooling?_ Yes, relayers won't be able to submit messages that have a CCIP Read ISM. ### Testing _What kind of testing have these changes undergone?_ - [x] Manual - [x] Unit Tests ### General approach - [x] Get a basic [CCIP Read implementation working](https://github.com/AlexBHarley/permissionless-chainlink-feeds/tree/main/contracts) - [x] Build a [mock service that serves CCIP Read compatible data](https://github.com/AlexBHarley/permissionless-chainlink-feeds/tree/main/apps/api) - [x] Update the Relayer to support CCIP Read ISMs --- .github/pull_request_template.md | 2 +- rust/Cargo.lock | 714 ++++++++++-------- rust/agents/relayer/Cargo.toml | 1 + rust/agents/relayer/src/msg/metadata/base.rs | 14 +- .../relayer/src/msg/metadata/ccip_read.rs | 102 +++ rust/agents/relayer/src/msg/metadata/mod.rs | 2 + .../abis/ICcipReadIsm.abi.json | 83 ++ .../hyperlane-ethereum/src/ccip_read_ism.rs | 109 +++ rust/chains/hyperlane-ethereum/src/lib.rs | 11 +- rust/hyperlane-base/src/settings/chains.rs | 25 +- .../src/traits/ccip_read_ism.rs | 14 + .../src/traits/interchain_security_module.rs | 2 + rust/hyperlane-core/src/traits/mod.rs | 2 + .../interfaces/IInterchainSecurityModule.sol | 3 +- .../interfaces/isms/ICcipReadIsm.sol | 28 + .../isms/ccip-read/AbstractCcipReadIsm.sol | 32 + solidity/package.json | 1 + yarn.lock | 14 + 18 files changed, 816 insertions(+), 343 deletions(-) create mode 100644 rust/agents/relayer/src/msg/metadata/ccip_read.rs create mode 100644 rust/chains/hyperlane-ethereum/abis/ICcipReadIsm.abi.json create mode 100644 rust/chains/hyperlane-ethereum/src/ccip_read_ism.rs create mode 100644 rust/hyperlane-core/src/traits/ccip_read_ism.rs create mode 100644 solidity/contracts/interfaces/isms/ICcipReadIsm.sol create mode 100644 solidity/contracts/isms/ccip-read/AbstractCcipReadIsm.sol diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 2f0739ea0..773d8e7c3 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -18,7 +18,7 @@ Are there any minor or drive-by changes also included? ### Backward compatibility -