Skip to content

Commit b6a8950

Browse files
andrejrakicEmanHerawyemanherawy
authored
0.2.6 Release (#46)
* feat: Add Mock Data Feeds contracts * feat: Add MockOffchainAggregator contract that expose minAnswer and maxAnswer functions. Add functionality to MockV3Aggregator to change underlying aggregator * chore: Forge install @chainlink/[email protected] * feat: Add mock data feeds smoke test * chore: List upcoming release in Changelog * feat: Add unit tests for mock data feeds contracts * feat: Add smoke test for mock data feeds using Hardhat * feat: Add forking test example and prepare for beta release * Support for CCIP v1.5 and preparing for 0.2.2-beta release (#19) * feat: Add new changes to support CCIP v1.5 version * forge: Update ccip * chore: Add CCIP v1.5 config details to Register for all available testnet lanes. Prepare for 0.2.2-beta.0 release (#21) * fix: Use the latest version of EVM2EVMOffRamp contract in the switchChainAndRouteMessage function of CCIPLocalSimulatorFork (#23) * chore: Prepare repo for the 0.2.2 release - Bump @chainlink/contracts-ccip to v1.5.0 - Delete DOCUMENTATION.md and related assets, and point to official documentation at README - Update CHANGELOG * Support for Chainlink Data Streams (#25) * feat: Add mock data streams contracts * feat: smoke test data streams in local mode in Foundry with docs examples * feat: Add GMX-like test example * feat: Add DataStreamsLocalSimulatorFork implemented in both Solidity and JavaScript * feat: Add MockReportGenerator.js to support local mode in Hardhat; Support Forking mode in Hardhat * chore: Prepare for 0.2.4-beta release * chore: Generate docs artifacts * chore: Include JavaScript Data Strems scripts into package.json * Update README to include installation instructions for Foundry (soldeer) with chainlink-local versioning (#31) Co-authored-by: emanherawy <[email protected]> * Data Streams fixes - v0.2.4-beta.0 release candidate (#34) * chore: Bumped @chainlink/contracts to 1.3.0. Started returning raw report structs from generateReportV- functions which is handful for tests * chore: Generate docs artifacts for this adjustment * Fix year in CHANGELOG (#35) * chore: Bumped @chainlink/contracts to 1.3.0. Started returning raw report structs from generateReportV- functions which is handful for tests * chore: Generate docs artifacts for this adjustment * fix: Year should be 2025 instead of 2024 * fix: Fix incorrect import path (#36) * fix: Fix incorrect import path * chore: Prepared changelog and package.json for v0.2.4-beta.1 release * chore: Prepare for 0.2.4 release * Add support for CCIP v1.6 (#38) * feat: Add support for CCIP v1.6 * chore: Removed lib/ccip and lib/chainlink-brownie-contracts dependencies * fix: Accept copilot's suggestions * fix: Update npm authentication token in publish workflows * chore: Prepare for v0.2.5-beta.0 release, bump @chainlink/contracts to v1.4.0 and @chainlink/contracts-ccip to v1.6.0 * chore: Prepare for 0.2.5 release * V0.2.6-beta release (#41) * fix: Refactored CCIPLocalSimulatorFork.sol so it can route all CCIP messages sent from a loop and not just the first one * fix: Correct loop variable k * CCIP Fork: Route multiple messages to multiple chains at once (#45) * fix: Refactor switchChainAndRouteMessage to deliver more than 1 message to more than 1 chain in a same call * chore: Ran `npm run generate-docs` * fix: Correct offRamp index in executeSingleMessage call in CCIPLocalSimulatorFork * chore: Prepare repo for 0.2.6 release --------- Co-authored-by: Eman Herawy <[email protected]> Co-authored-by: emanherawy <[email protected]>
1 parent 3bb414f commit b6a8950

File tree

9 files changed

+548
-128
lines changed

9 files changed

+548
-128
lines changed

CHANGELOG.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,58 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to
77
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88

9+
## [0.2.6] - 18 September 2025
10+
11+
### Dependencies
12+
13+
| Package | Version |
14+
| ------------------------- | ------- |
15+
| @chainlink/contracts-ccip | 1.6.0 |
16+
| @chainlink/contracts | 1.4.0 |
17+
18+
### Added
19+
20+
- Added `switchChainAndRouteMessage(uint256[] memory chainIds)` function which is an overlap of already existing `switchChainAndRouteMessage(chainId)` in the `CCIPLocalSimulatorFork.sol` contract. This new function can be used to route multiple CCIP messages to multiple chains in a single call.
21+
22+
### Changed
23+
24+
- Refactored `CCIPLocalSimulatorFork.sol` so it can route all CCIP messages sent from a loop and not just the first one
25+
26+
## [0.2.6-beta.0] - 10 September 2025
27+
28+
### Dependencies
29+
30+
| Package | Version |
31+
| ------------------------- | ------- |
32+
| @chainlink/contracts-ccip | 1.6.0 |
33+
| @chainlink/contracts | 1.4.0 |
34+
35+
### Services
36+
37+
- [x] Chainlink CCIP v1.6
38+
39+
### Changed
40+
41+
- Refactored `CCIPLocalSimulatorFork.sol` to deliver more than one message to more than one chain in a same call
42+
43+
## [0.2.6-beta] - 11 June 2025
44+
45+
### Dependencies
46+
47+
| Package | Version |
48+
| ------------------------- | ------- |
49+
| @chainlink/contracts-ccip | 1.6.0 |
50+
| @chainlink/contracts | 1.4.0 |
51+
52+
### Services
53+
54+
- [x] Chainlink CCIP v1.6
55+
56+
### Changed
57+
58+
- Refactored `CCIPLocalSimulatorFork.sol` so it can route all CCIP messages sent
59+
from a loop and not just the first one
60+
961
## [0.2.5] - 10 June 2025
1062

1163
### Dependencies
@@ -485,3 +537,8 @@ and this project adheres to
485537
[0.2.5-beta.0]:
486538
https://github.com/smartcontractkit/chainlink-local/releases/tag/v0.2.5-beta.0
487539
[0.2.5]: https://github.com/smartcontractkit/chainlink-local/releases/tag/v0.2.5
540+
[0.2.6-beta]:
541+
https://github.com/smartcontractkit/chainlink-local/releases/tag/v0.2.6-beta
542+
[0.2.6-beta.0]:
543+
https://github.com/smartcontractkit/chainlink-local/releases/tag/v0.2.6-beta.0
544+
[0.2.6]: https://github.com/smartcontractkit/chainlink-local/releases/tag/v0.2.6

api_reference/javascript/CCIPLocalSimulatorFork.mdx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@
2424
decodes it to an object
2525
</p>
2626
</dd>
27+
<dt>
28+
<a href="#getEvm2AnyRampMessage">getEvm2AnyRampMessage(receipt)</a> ⇒{' '}
29+
<code>object</code> | <code>null</code>
30+
</dt>
31+
<dd>
32+
<p>
33+
Parses a transaction receipt to extract the sent message from
34+
CCIPMessageSent
35+
</p>
36+
</dd>
2737
<dt>
2838
<a href="#routeMessage">routeMessage(routerAddress, evm2EvmMessage)</a> ⇒{' '}
2939
<code>Promise.&lt;void&gt;</code>
@@ -78,6 +88,20 @@ does not contain `CCIPSendRequested` log
7888
| ------- | ------------------- | ------------------------------------------------ |
7989
| receipt | <code>object</code> | The transaction receipt from the `ccipSend` call |
8090

91+
<a name="getEvm2AnyRampMessage"></a>
92+
93+
## getEvm2AnyRampMessage(receipt) ⇒ <code>object</code> \| <code>null</code>
94+
95+
Parses a transaction receipt to extract the sent message from CCIPMessageSent
96+
97+
**Kind**: global function
98+
**Returns**: <code>object</code> \| <code>null</code> - Returns {
99+
destChainSelector, sequenceNumber, EVM2AnyRampMessage message } or null
100+
101+
| Param | Type | Description |
102+
| ------- | ------------------- | ------------------------------------------ |
103+
| receipt | <code>object</code> | – The tx receipt from the on-ramp contract |
104+
81105
<a name="routeMessage"></a>
82106

83107
## routeMessage(routerAddress, evm2EvmMessage) ⇒ <code>Promise.&lt;void&gt;</code>

api_reference/solidity/ccip/CCIPLocalSimulatorFork.mdx

Lines changed: 131 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,21 @@ struct OffRamp {
1818
}
1919
```
2020

21+
### getOnRamp
22+
23+
```solidity
24+
function getOnRamp(uint64 destChainSelector) external view returns (address)
25+
```
26+
27+
Return the configured onramp for specific a destination chain. @param
28+
destChainSelector The destination chain Id to get the onRamp for.
29+
30+
#### Return Values
31+
32+
| Name | Type | Description |
33+
| ---- | ------- | -------------------------- |
34+
| [0] | address | The address of the onRamp. |
35+
2136
### getOffRamps
2237

2338
```solidity
@@ -37,18 +52,48 @@ Gets the list of offRamps
3752
### executeSingleMessage
3853

3954
```solidity
40-
function executeSingleMessage(struct Internal.EVM2EVMMessage message, bytes[] offchainTokenData, uint32[] tokenGasOverrides) external
55+
function executeSingleMessage(struct Internal.Any2EVMRampMessage message, bytes[] offchainTokenData, uint32[] tokenGasOverrides) external
4156
```
4257

4358
Executes a single CCIP message on the offRamp
4459

4560
#### Parameters
4661

47-
| Name | Type | Description |
48-
| ----------------- | ------------------------------ | --------------------------------- |
49-
| message | struct Internal.EVM2EVMMessage | - The CCIP message to be executed |
50-
| offchainTokenData | bytes[] | - Additional offchain token data |
51-
| tokenGasOverrides | uint32[] | |
62+
| Name | Type | Description |
63+
| ----------------- | ---------------------------------- | --------------------------------- |
64+
| message | struct Internal.Any2EVMRampMessage | - The CCIP message to be executed |
65+
| offchainTokenData | bytes[] | - Additional offchain token data |
66+
| tokenGasOverrides | uint32[] | |
67+
68+
## InternalPreV1dot6
69+
70+
### EVM2EVMMessage
71+
72+
```solidity
73+
struct EVM2EVMMessage {
74+
uint64 sourceChainSelector;
75+
address sender;
76+
address receiver;
77+
uint64 sequenceNumber;
78+
uint256 gasLimit;
79+
bool strict;
80+
uint64 nonce;
81+
address feeToken;
82+
uint256 feeTokenAmount;
83+
bytes data;
84+
struct Client.EVMTokenAmount[] tokenAmounts;
85+
bytes[] sourceTokenData;
86+
bytes32 messageId;
87+
}
88+
```
89+
90+
## IEVM2EVMOffRampPreV1dot6Fork
91+
92+
### executeSingleMessage
93+
94+
```solidity
95+
function executeSingleMessage(struct InternalPreV1dot6.EVM2EVMMessage message, bytes[] offchainTokenData, uint32[] tokenGasOverrides) external
96+
```
5297

5398
## CCIPLocalSimulatorFork
5499

@@ -57,16 +102,28 @@ Works with Foundry only
57102
### CCIPSendRequested
58103

59104
```solidity
60-
event CCIPSendRequested(struct Internal.EVM2EVMMessage message)
105+
event CCIPSendRequested(struct InternalPreV1dot6.EVM2EVMMessage message)
61106
```
62107

63-
Event emitted when a CCIP send request is made
108+
Events emitted when a CCIP send request is made
64109

65-
#### Parameters
110+
### CCIPMessageSent
111+
112+
```solidity
113+
event CCIPMessageSent(uint64 destChainSelector, uint64 sequenceNumber, struct Internal.EVM2AnyRampMessage message)
114+
```
115+
116+
### InvalidExtraArgsTag
117+
118+
```solidity
119+
error InvalidExtraArgsTag()
120+
```
121+
122+
### DEFAULT_GAS_LIMIT
66123

67-
| Name | Type | Description |
68-
| ------- | ------------------------------ | ----------------------------------- |
69-
| message | struct Internal.EVM2EVMMessage | - The EVM2EVM message that was sent |
124+
```solidity
125+
uint32 DEFAULT_GAS_LIMIT
126+
```
70127

71128
### i_register
72129

@@ -107,16 +164,37 @@ function switchChainAndRouteMessage(uint256 forkId) external
107164
```
108165

109166
To be called after the sending of the cross-chain message (`ccipSend`). Goes
110-
through the list of past logs and looks for the `CCIPSendRequested` event.
111-
Switches to a destination network fork. Routes the sent cross-chain message on
112-
the destination network.
167+
through the list of past logs and looks for the `CCIPSendRequested` and
168+
`CCIPMessageSent` events. Switches to a destination network fork. Routes the
169+
sent cross-chain message on the destination network. If you sent more than one
170+
message, it will try to route all of them to `forkId`.
113171

114172
#### Parameters
115173

116174
| Name | Type | Description |
117175
| ------ | ------- | -------------------------------------------------------------------------------------------------------------- |
118176
| forkId | uint256 | - The ID of the destination network fork. This is the returned value of `createFork()` or `createSelectFork()` |
119177

178+
### switchChainAndRouteMessage
179+
180+
```solidity
181+
function switchChainAndRouteMessage(uint256[] forkIds) external
182+
```
183+
184+
To be called after the sending of the cross-chain message (`ccipSend`). Override
185+
variant of the `switchChainAndRouteMessage(uint256 forkId)` function in case of
186+
multiple destination forks. Goes through the list of past logs and looks for the
187+
`CCIPSendRequested` and `CCIPMessageSent` events. Loops through provided
188+
`forkIds` and tries to route the message to correct destination. If you haven't
189+
provide correct `forkId`, the message will get lost. If you sent more than one
190+
message, it will try to route all of them to correct destinations.
191+
192+
#### Parameters
193+
194+
| Name | Type | Description |
195+
| ------- | --------- | ------------------------------------------------------------------------------------------------------------------- |
196+
| forkIds | uint256[] | - The IDs of the destination network forks. These are the returned values of `createFork()` or `createSelectFork()` |
197+
120198
### getNetworkDetails
121199

122200
```solidity
@@ -176,3 +254,41 @@ transferred to provided destination address.
176254
| Name | Type | Description |
177255
| ------- | ---- | ----------------------------------------------------------------------------- |
178256
| success | bool | - Returns `true` if the transfer of tokens was successful, otherwise `false`. |
257+
258+
### \_routeCapturedMessages
259+
260+
```solidity
261+
function _routeCapturedMessages(uint256[] forkIds, uint256 sourceForkId, address sourceRouterAddress) internal
262+
```
263+
264+
Internal function to route captured messages to their respective destination
265+
forks.
266+
267+
#### Parameters
268+
269+
| Name | Type | Description |
270+
| ------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------- |
271+
| forkIds | uint256[] | - The IDs of the destination network forks. These are the returned values of `createFork()` or `createSelectFork()`, not chainIds. |
272+
| sourceForkId | uint256 | - The ID of the source network fork. This is the returned value of `createFork()` or `createSelectFork()`, not chainId. |
273+
| sourceRouterAddress | address | - The address of the Router on the source chain. |
274+
275+
### \_fromBytes
276+
277+
```solidity
278+
function _fromBytes(bytes extraArgs) internal pure returns (struct Client.GenericExtraArgsV2)
279+
```
280+
281+
Internal helper function to decode extraArgs bytes to GenericExtraArgsV2 struct.
282+
Supports decoding of both GenericExtraArgsV2 and EVMExtraArgsV1 structs.
283+
284+
#### Parameters
285+
286+
| Name | Type | Description |
287+
| --------- | ----- | --------------------------------------------- |
288+
| extraArgs | bytes | - The bytes representing the extra arguments. |
289+
290+
#### Return Values
291+
292+
| Name | Type | Description |
293+
| ---- | -------------------------------- | --------------------------------------------------------- |
294+
| [0] | struct Client.GenericExtraArgsV2 | genericExtraArgs - The decoded GenericExtraArgsV2 struct. |
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Solidity API
2+
3+
## ITypeAndVersion
4+
5+
### typeAndVersion
6+
7+
```solidity
8+
function typeAndVersion() external pure returns (string)
9+
```
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Shared API Reference
22

3+
- [ITypeAndVersion](ITypeAndVersion.mdx)
34
- [LinkToken](LinkToken.mdx)
45
- [WETH9](WETH9.mdx)

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@chainlink/local",
33
"description": "Chainlink Local Simulator",
44
"license": "MIT",
5-
"version": "0.2.5",
5+
"version": "0.2.6",
66
"files": [
77
"src/**/*.sol",
88
"!src/test/**/*",

0 commit comments

Comments
 (0)