-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CCIPReader e2e tests using simulated backend (#1209)
Add CCIPReader e2e tests using the simulated backend. First merge: smartcontractkit/chainlink-ccip#48 and update commitHash of chainlink-common dependency in this branch.
- Loading branch information
Showing
14 changed files
with
1,236 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
pragma solidity 0.8.24; | ||
|
||
import {Internal} from "../../libraries/Internal.sol"; | ||
import {EVM2EVMMultiOffRamp} from "../../offRamp/EVM2EVMMultiOffRamp.sol"; | ||
|
||
contract CCIPReaderTester { | ||
event CCIPSendRequested(uint64 indexed destChainSelector, Internal.EVM2AnyRampMessage message); | ||
|
||
mapping(uint64 sourceChainSelector => EVM2EVMMultiOffRamp.SourceChainConfig sourceChainConfig) internal | ||
s_sourceChainConfigs; | ||
|
||
function getSourceChainConfig(uint64 sourceChainSelector) | ||
external | ||
view | ||
returns (EVM2EVMMultiOffRamp.SourceChainConfig memory) | ||
{ | ||
return s_sourceChainConfigs[sourceChainSelector]; | ||
} | ||
|
||
function setSourceChainConfig( | ||
uint64 sourceChainSelector, | ||
EVM2EVMMultiOffRamp.SourceChainConfig memory sourceChainConfig | ||
) external { | ||
s_sourceChainConfigs[sourceChainSelector] = sourceChainConfig; | ||
} | ||
|
||
function emitCCIPSendRequested(uint64 destChainSelector, Internal.EVM2AnyRampMessage memory message) external { | ||
emit CCIPSendRequested(destChainSelector, message); | ||
} | ||
|
||
event ExecutionStateChanged( | ||
uint64 indexed sourceChainSelector, | ||
uint64 indexed sequenceNumber, | ||
bytes32 indexed messageId, | ||
Internal.MessageExecutionState state, | ||
bytes returnData | ||
); | ||
|
||
function emitExecutionStateChanged( | ||
uint64 sourceChainSelector, | ||
uint64 sequenceNumber, | ||
bytes32 messageId, | ||
Internal.MessageExecutionState state, | ||
bytes memory returnData | ||
) external { | ||
emit ExecutionStateChanged(sourceChainSelector, sequenceNumber, messageId, state, returnData); | ||
} | ||
|
||
event CommitReportAccepted(EVM2EVMMultiOffRamp.CommitReport report); | ||
|
||
function emitCommitReportAccepted(EVM2EVMMultiOffRamp.CommitReport memory report) external { | ||
emit CommitReportAccepted(report); | ||
} | ||
} |
761 changes: 761 additions & 0 deletions
761
core/gethwrappers/ccip/generated/ccip_reader_tester/ccip_reader_tester.go
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.