Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Init ccipReader e2e tests #1203

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions contracts/scripts/native_solc_compile_all_ccip
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ compileContract ccip/NonceManager.sol
# Test helpers
compileContract ccip/test/helpers/BurnMintERC677Helper.sol
compileContract ccip/test/helpers/CommitStoreHelper.sol
compileContract ccip/test/helpers/CCIPReaderTester.sol
compileContract ccip/test/helpers/MessageHasher.sol
compileContract ccip/test/helpers/ReportCodec.sol
compileContract ccip/test/helpers/receivers/MaybeRevertMessageReceiver.sol
Expand Down
20 changes: 20 additions & 0 deletions contracts/src/v0.8/ccip/test/helpers/CCIPReaderTester.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.24;

contract CCIPReaderTester {
struct SourceChainConfig {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: we can use the struct directly:

import {EVM2EVMMultiOffRamp} from "../../offRamp/EVM2EVMMultiOffRamp.sol";

Usage:

EVM2EVMMultiOffRamp.SourceChainConfig

bool isEnabled;
uint64 minSeqNr;
bytes onRamp;
}

mapping(uint64 sourceChainSelector => SourceChainConfig sourceChainConfig) internal s_sourceChainConfigs;

function getSourceChainConfig(uint64 sourceChainSelector) external view returns (SourceChainConfig memory) {
return s_sourceChainConfigs[sourceChainSelector];
}

function setSourceChainConfig(uint64 sourceChainSelector, SourceChainConfig memory sourceChainConfig) external {
s_sourceChainConfigs[sourceChainSelector] = sourceChainConfig;
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading