Skip to content

Commit e06bc40

Browse files
andrejrakicEmanHerawyemanherawy
authored
0.2.4 Release - Support for Data Streams (#37)
* 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 --------- Co-authored-by: Eman Herawy <[email protected]> Co-authored-by: emanherawy <[email protected]>
1 parent 0834d39 commit e06bc40

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+4229
-3452
lines changed

CHANGELOG.md

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,123 @@ 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.4] - 25 March 2025
10+
11+
### Dependencies
12+
13+
| Package | Version |
14+
| ------------------------- | ------------ |
15+
| @chainlink/contracts-ccip | 1.5.1-beta.0 |
16+
| @chainlink/contracts | 1.3.0 |
17+
18+
### Services
19+
20+
- [x] Chainlink CCIP
21+
- [x] Chainlink CCIP v1.5
22+
- [x] Chainlink Data Feeds
23+
- [x] Chainlink Data Streams
24+
- [ ] Chainlink Automation
25+
- [ ] Chainlink VRF 2
26+
- [ ] Chainlink VRF 2.5
27+
28+
### Added
29+
30+
- Added full support for Data Streams by adding `DataStreamsLocalSimulator.sol`
31+
(Foundry/Hardhat/Remix IDE local mode), `DataStreamsLocalSimulatorFork.sol`
32+
(Foundry forked mode), `DataStreamsLocalSimulatorFork.js` (Hardhat forked
33+
mode) and `MockReportGenerator.sol` & `MockReportGenerator.js` to mock
34+
generating unverified reports by Data Streams DON for local modes in Foundry
35+
and Hardhat respectively.
36+
- Instructions to install Chainlink Local using Soldeer
37+
38+
### Changed
39+
40+
- Bumped `@chainlink/contracts` to `1.3.0` version
41+
- Started returning raw Report structs from `generateReportV2`,
42+
`generateReportV3` and`generateReportV4` functions alongside the
43+
`signedReport` bytes blob which is already returned
44+
45+
## [0.2.4-beta.1] - 24 February 2025
46+
47+
### Dependencies
48+
49+
| Package | Version |
50+
| ------------------------- | ------------ |
51+
| @chainlink/contracts-ccip | 1.5.1-beta.0 |
52+
| @chainlink/contracts | 1.3.0 |
53+
54+
### Services
55+
56+
- [x] Chainlink CCIP
57+
- [x] Chainlink CCIP v1.5
58+
- [x] Chainlink Data Feeds
59+
- [x] Chainlink Data Streams
60+
- [ ] Chainlink Automation
61+
- [ ] Chainlink VRF 2
62+
- [ ] Chainlink VRF 2.5
63+
64+
### Changed
65+
66+
- Fixed incorrect import path for `Math.sol` in `MockFeeManager.sol`
67+
68+
## [0.2.4-beta.0] - 23 February 2025
69+
70+
### Dependencies
71+
72+
| Package | Version |
73+
| ------------------------- | ------------ |
74+
| @chainlink/contracts-ccip | 1.5.1-beta.0 |
75+
| @chainlink/contracts | 1.3.0 |
76+
77+
### Services
78+
79+
- [x] Chainlink CCIP
80+
- [x] Chainlink CCIP v1.5
81+
- [x] Chainlink Data Feeds
82+
- [x] Chainlink Data Streams
83+
- [ ] Chainlink Automation
84+
- [ ] Chainlink VRF 2
85+
- [ ] Chainlink VRF 2.5
86+
87+
### Added
88+
89+
- Instructions to install Chainlink Local using Soldeer
90+
91+
### Changed
92+
93+
- Bumped `@chainlink/contracts` to `1.3.0` version
94+
- Started returning raw Report structs from `generateReportV2`,
95+
`generateReportV3` and`generateReportV4` functions alongside the
96+
`signedReport` bytes blob which is already returned
97+
98+
## [0.2.4-beta] - 10 December 2024
99+
100+
### Dependencies
101+
102+
| Package | Version |
103+
| ------------------------- | ------------ |
104+
| @chainlink/contracts-ccip | 1.5.1-beta.0 |
105+
| @chainlink/contracts | 1.1.1 |
106+
107+
### Services
108+
109+
- [x] Chainlink CCIP
110+
- [x] Chainlink CCIP v1.5
111+
- [x] Chainlink Data Feeds
112+
- [x] Chainlink Data Streams
113+
- [ ] Chainlink Automation
114+
- [ ] Chainlink VRF 2
115+
- [ ] Chainlink VRF 2.5
116+
117+
### Added
118+
119+
- Added full support for Data Streams by adding `DataStreamsLocalSimulator.sol`
120+
(Foundry/Hardhat/Remix IDE local mode), `DataStreamsLocalSimulatorFork.sol`
121+
(Foundry forked mode), `DataStreamsLocalSimulatorFork.js` (Hardhat forked
122+
mode) and `MockReportGenerator.sol` & `MockReportGenerator.js` to mock
123+
generating unverified reports by Data Streams DON for local modes in Foundry
124+
and Hardhat respectively.
125+
9126
## [0.2.3] - 30 November 2024
10127

11128
### Dependencies
@@ -299,3 +416,10 @@ and this project adheres to
299416
https://github.com/smartcontractkit/chainlink-local/releases/tag/v0.2.2-beta.1
300417
[0.2.2]: https://github.com/smartcontractkit/chainlink-local/releases/tag/v0.2.2
301418
[0.2.3]: https://github.com/smartcontractkit/chainlink-local/releases/tag/v0.2.3
419+
[0.2.4-beta]:
420+
https://github.com/smartcontractkit/chainlink-local/releases/tag/0.2.4-beta
421+
[0.2.4-beta.0]:
422+
https://github.com/smartcontractkit/chainlink-local/releases/tag/0.2.4-beta.0
423+
[0.2.4-beta.1]:
424+
https://github.com/smartcontractkit/chainlink-local/releases/tag/0.2.4-beta.1
425+
[0.2.4]: https://github.com/smartcontractkit/chainlink-local/releases/tag/v0.2.4

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ forge install smartcontractkit/chainlink-local
2626

2727
and then set remappings to: `@chainlink/local/=lib/chainlink-local/` in either `remappings.txt` or `foundry.toml` file
2828

29+
#### Foundry (soldeer)
30+
31+
```
32+
forge soldeer install chainlink-local~v0.2.4-beta https://github.com/smartcontractkit/chainlink-local.git
33+
```
34+
Replace `v0.2.4-beta` with your desired version number.
35+
2936
#### Hardhat (npm)
3037

3138
```
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Solidity API
2+
3+
## DataStreamsLocalSimulator
4+
5+
### s_mockVerifier
6+
7+
```solidity
8+
contract MockVerifier s_mockVerifier
9+
```
10+
11+
### s_mockVerifierProxy
12+
13+
```solidity
14+
contract MockVerifierProxy s_mockVerifierProxy
15+
```
16+
17+
### s_mockFeeManager
18+
19+
```solidity
20+
contract MockFeeManager s_mockFeeManager
21+
```
22+
23+
### s_mockRewardManager
24+
25+
```solidity
26+
contract MockRewardManager s_mockRewardManager
27+
```
28+
29+
### i_wrappedNative
30+
31+
```solidity
32+
contract WETH9 i_wrappedNative
33+
```
34+
35+
The wrapped native token instance
36+
37+
### i_linkToken
38+
39+
```solidity
40+
contract LinkToken i_linkToken
41+
```
42+
43+
The LINK token instance
44+
45+
### constructor
46+
47+
```solidity
48+
constructor() public
49+
```
50+
51+
### requestLinkFromFaucet
52+
53+
```solidity
54+
function requestLinkFromFaucet(address to, uint256 amount) external returns (bool success)
55+
```
56+
57+
Requests LINK tokens from the faucet. The provided amount of tokens are
58+
transferred to provided destination address.
59+
60+
#### Parameters
61+
62+
| Name | Type | Description |
63+
| ------ | ------- | -------------------------------------------------- |
64+
| to | address | - The address to which LINK tokens are to be sent. |
65+
| amount | uint256 | - The amount of LINK tokens to send. |
66+
67+
#### Return Values
68+
69+
| Name | Type | Description |
70+
| ------- | ---- | ----------------------------------------------------------------------------- |
71+
| success | bool | - Returns `true` if the transfer of tokens was successful, otherwise `false`. |
72+
73+
### configuration
74+
75+
```solidity
76+
function configuration() public view returns (contract WETH9 wrappedNative_, contract LinkToken linkToken_, contract MockVerifier mockVerifier_, contract MockVerifierProxy mockVerifierProxy_, contract MockFeeManager mockFeeManager_, contract MockRewardManager mockRewardManager_)
77+
```
78+
79+
@notice Returns configuration details for pre-deployed contracts and services
80+
needed for local Data Streams simulations.
81+
82+
#### Return Values
83+
84+
| Name | Type | Description |
85+
| ------------------- | -------------------------- | ----------------------------------- |
86+
| wrappedNative\_ | contract WETH9 | - The wrapped native token. |
87+
| linkToken\_ | contract LinkToken | - The LINK token. |
88+
| mockVerifier\_ | contract MockVerifier | - The mock verifier contract. |
89+
| mockVerifierProxy\_ | contract MockVerifierProxy | - The mock verifier proxy contract. |
90+
| mockFeeManager\_ | contract MockFeeManager | - The mock fee manager contract. |
91+
| mockRewardManager\_ | contract MockRewardManager | - The mock reward manager contract. |
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# Solidity API
2+
3+
## DataStreamsLocalSimulatorFork
4+
5+
### i_register
6+
7+
```solidity
8+
contract Register i_register
9+
```
10+
11+
The immutable register instance
12+
13+
### LINK_FAUCET
14+
15+
```solidity
16+
address LINK_FAUCET
17+
```
18+
19+
The address of the LINK faucet
20+
21+
### constructor
22+
23+
```solidity
24+
constructor() public
25+
```
26+
27+
Constructor to initialize the contract
28+
29+
### getNetworkDetails
30+
31+
```solidity
32+
function getNetworkDetails(uint256 chainId) external view returns (struct Register.NetworkDetails)
33+
```
34+
35+
Returns the default values for currently Data Streams supported networks. If
36+
network is not present or some of the values are changed, user can manually add
37+
new network details using the `setNetworkDetails` function.
38+
39+
#### Parameters
40+
41+
| Name | Type | Description |
42+
| ------- | ------- | ----------------------------------------------------------------------------- |
43+
| chainId | uint256 | - The blockchain network chain ID. For example 11155111 for Ethereum Sepolia. |
44+
45+
#### Return Values
46+
47+
| Name | Type | Description |
48+
| ---- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
49+
| [0] | struct Register.NetworkDetails | networkDetails - The tuple containing: verifierProxyAddress - The address of the Verifier Proxy smart contract. linkAddress - The address of the LINK token. |
50+
51+
### setNetworkDetails
52+
53+
```solidity
54+
function setNetworkDetails(uint256 chainId, struct Register.NetworkDetails networkDetails) external
55+
```
56+
57+
If network details are not present or some of the values are changed, user can
58+
manually add new network details using the `setNetworkDetails` function.
59+
60+
#### Parameters
61+
62+
| Name | Type | Description |
63+
| -------------- | ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- |
64+
| chainId | uint256 | - The blockchain network chain ID. For example 11155111 for Ethereum Sepolia. |
65+
| networkDetails | struct Register.NetworkDetails | - The tuple containing: verifierProxyAddress - The address of the Verifier Proxy smart contract. linkAddress - The address of the LINK token. |
66+
67+
### requestLinkFromFaucet
68+
69+
```solidity
70+
function requestLinkFromFaucet(address to, uint256 amount) external returns (bool success)
71+
```
72+
73+
Requests LINK tokens from the faucet. The provided amount of tokens are
74+
transferred to provided destination address.
75+
76+
#### Parameters
77+
78+
| Name | Type | Description |
79+
| ------ | ------- | -------------------------------------------------- |
80+
| to | address | - The address to which LINK tokens are to be sent. |
81+
| amount | uint256 | - The amount of LINK tokens to send. |
82+
83+
#### Return Values
84+
85+
| Name | Type | Description |
86+
| ------- | ---- | ----------------------------------------------------------------------------- |
87+
| success | bool | - Returns `true` if the transfer of tokens was successful, otherwise `false`. |
88+
89+
### requestNativeFromFaucet
90+
91+
```solidity
92+
function requestNativeFromFaucet(address to, uint256 amount) external
93+
```
94+
95+
Requests native coints from the faucet.
96+
97+
#### Parameters
98+
99+
| Name | Type | Description |
100+
| ------ | ------- | --------------------------------------------------- |
101+
| to | address | - The address to which native coins are to be sent. |
102+
| amount | uint256 | - The amount of native coins to send. |

0 commit comments

Comments
 (0)