Skip to content

Commit a3ace4e

Browse files
andrejrakicEmanHerawyemanherawy
authored
v0.2.7 Release (#50)
* 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 * chore: Bump @chainlink/contracts to v1.5.0 and @chainlink/contracts-ccip to v1.6.2. Vendor OpenZeppelin contracts these two packages use (#48) * DEVREL-144 : Data Streams billing mechanism (#47) * feat: Implement fee manager toggle for on-chain and off-chain billing in DataStreamsLocalSimulator * feat: Add developer friendly error messages when wrong Data Streams billing mechanism is used * fix: Vendor Chainlink contracts that caused compilation issues with Hardhat 2 * chore: Merge publishing beta releases into a single workflow file * fix: Update Node.js version to 22 in publish workflow and refine version consistency validation logic (#49) * chore: Prepare for v0.2.7 release --------- Co-authored-by: Eman Herawy <[email protected]> Co-authored-by: emanherawy <[email protected]>
1 parent b6a8950 commit a3ace4e

File tree

114 files changed

+15971
-2025
lines changed

Some content is hidden

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

114 files changed

+15971
-2025
lines changed

.github/workflows/publish-beta-release.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 115 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
1-
name: Manual NPM Publish
1+
name: Publish Package
22

33
on:
4+
push:
5+
tags:
6+
- 'v*'
47
workflow_dispatch:
8+
inputs:
9+
release_type:
10+
description: 'Release type'
11+
required: true
12+
default: 'stable'
13+
type: choice
14+
options:
15+
- stable
16+
- beta
17+
18+
permissions:
19+
id-token: write # Required for OIDC
20+
contents: read
521

622
jobs:
723
publish:
@@ -10,22 +26,110 @@ jobs:
1026

1127
steps:
1228
- name: Checkout code
13-
uses: actions/checkout@v3
29+
uses: actions/checkout@v4
1430

1531
- name: Use Node.js
16-
uses: actions/setup-node@v3
32+
uses: actions/setup-node@v4
1733
with:
18-
node-version: "20.x"
19-
registry-url: "https://registry.npmjs.org"
20-
always-auth: true
34+
node-version: '22'
35+
registry-url: 'https://registry.npmjs.org'
2136

22-
- name: Setup npm authentication
23-
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_CHAINLINK_LOCAL }}" > ~/.npmrc
37+
# Ensure npm 11.5.1 or later is installed
38+
- name: Update npm
39+
run: npm install -g npm@latest
2440

2541
- name: Install dependencies
2642
run: npm ci
2743

28-
- name: Publish
44+
- name: Validate version consistency
45+
run: |
46+
# Only validate version consistency for tag-based triggers
47+
if [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" =~ ^refs/tags/v.* ]]; then
48+
# Extract version from tag (e.g., v0.2.7-beta -> 0.2.7-beta)
49+
TAG_VERSION="${{ github.ref_name }}"
50+
if [[ "$TAG_VERSION" == v* ]]; then
51+
TAG_VERSION="${TAG_VERSION#v}"
52+
fi
53+
54+
# Get version from package.json
55+
PACKAGE_VERSION=$(node -p "require('./package.json').version")
56+
57+
echo "Tag version: $TAG_VERSION"
58+
echo "Package.json version: $PACKAGE_VERSION"
59+
60+
# Check if versions match
61+
if [[ "$TAG_VERSION" != "$PACKAGE_VERSION" ]]; then
62+
echo "❌ Version mismatch detected!"
63+
echo "Tag version: $TAG_VERSION"
64+
echo "Package.json version: $PACKAGE_VERSION"
65+
echo "Please ensure the tag version matches package.json version"
66+
exit 1
67+
fi
68+
69+
echo "✅ Version consistency validated"
70+
else
71+
echo "⚠️ Manual dispatch detected - skipping version validation"
72+
echo "Using package.json version: $(node -p "require('./package.json').version")"
73+
fi
74+
75+
- name: Determine release type and validate branch
76+
id: release-type
77+
run: |
78+
if [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" =~ ^refs/tags/v.* ]]; then
79+
# Get the branch that was tagged (usually the default branch of the tag)
80+
BRANCH_NAME="${{ github.ref_name }}"
81+
82+
# Check if tag contains 'beta' to determine release type
83+
if [[ "${{ github.ref_name }}" == *"beta"* ]]; then
84+
echo "type=beta" >> $GITHUB_OUTPUT
85+
echo "expected_branch=develop" >> $GITHUB_OUTPUT
86+
else
87+
echo "type=stable" >> $GITHUB_OUTPUT
88+
echo "expected_branch=main" >> $GITHUB_OUTPUT
89+
fi
90+
else
91+
# Manual dispatch - use input
92+
echo "type=${{ github.event.inputs.release_type }}" >> $GITHUB_OUTPUT
93+
if [[ "${{ github.event.inputs.release_type }}" == "beta" ]]; then
94+
echo "expected_branch=develop" >> $GITHUB_OUTPUT
95+
else
96+
echo "expected_branch=main" >> $GITHUB_OUTPUT
97+
fi
98+
fi
99+
100+
- name: Validate branch for release type
101+
run: |
102+
CURRENT_BRANCH="${{ github.ref_name }}"
103+
EXPECTED_BRANCH="${{ steps.release-type.outputs.expected_branch }}"
104+
RELEASE_TYPE="${{ steps.release-type.outputs.type }}"
105+
106+
echo "Current branch: $CURRENT_BRANCH"
107+
echo "Expected branch for $RELEASE_TYPE release: $EXPECTED_BRANCH"
108+
109+
# For manual dispatch, we can't validate branch, so skip
110+
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
111+
echo "⚠️ Manual dispatch detected - skipping branch validation"
112+
echo "Please ensure you're running from the correct branch:"
113+
echo "- Beta releases should be from 'develop' branch"
114+
echo "- Stable releases should be from 'main' branch"
115+
exit 0
116+
fi
117+
118+
# For tag pushes, validate branch
119+
if [[ "$CURRENT_BRANCH" != "$EXPECTED_BRANCH" ]]; then
120+
echo "❌ Branch validation failed!"
121+
echo "Current branch: $CURRENT_BRANCH"
122+
echo "Expected branch for $RELEASE_TYPE release: $EXPECTED_BRANCH"
123+
echo "Please create the tag from the correct branch"
124+
exit 1
125+
fi
126+
127+
echo "✅ Branch validation passed"
128+
129+
- name: Publish stable release
130+
if: steps.release-type.outputs.type == 'stable'
29131
run: npm publish
30-
env:
31-
NODE_AUTH_TOKEN: ${{ secrets.NPM_CHAINLINK_LOCAL }}
132+
133+
- name: Publish beta release
134+
if: steps.release-type.outputs.type == 'beta'
135+
run: npm publish --tag beta

CHANGELOG.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,70 @@ 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.7] - 9 November 2025
10+
11+
### Dependencies
12+
13+
| Package | Version |
14+
| ------------------------- | ------- |
15+
| @chainlink/contracts-ccip | 1.6.2 |
16+
| @chainlink/contracts | 1.5.0 |
17+
18+
### Added
19+
20+
- Data Streams billing mechanism toggle in `DataStreamsLocalSimulator.sol`
21+
- `enableOffChainBilling()` and `enableOnChainBilling()` functions
22+
- `getBillingMechanism()` helper function
23+
- Developer-friendly error messages for billing mechanism mismatches
24+
- Comprehensive test suite for billing mechanisms
25+
- Trusted publishing workflow with OIDC authentication
26+
- Automatic version and branch validation in CI/CD
27+
28+
### Changed
29+
30+
- Bumped `@chainlink/contracts-ccip` to `1.6.2` version
31+
- Bumped `@chainlink/contracts` to `1.5.0` version
32+
- Updated import paths to use vendored OpenZeppelin contracts
33+
- Enhanced `configuration()` function to return current fee manager state
34+
- Unified publish workflows into single automated workflow
35+
36+
### Fixed
37+
38+
- Fixed Hardhat 2 compilation issues by vendoring OpenZeppelin contracts
39+
- Fixed import path issues that occurred with updated dependency versions
40+
41+
## [0.2.7-beta.0] - 9 October 2025
42+
43+
### Dependencies
44+
45+
| Package | Version |
46+
| ------------------------- | ------- |
47+
| @chainlink/contracts-ccip | 1.6.2 |
48+
| @chainlink/contracts | 1.5.0 |
49+
50+
### Added
51+
52+
- Data Streams billing mechanism toggle in `DataStreamsLocalSimulator.sol`
53+
- `enableOffChainBilling()` and `enableOnChainBilling()` functions
54+
- `getBillingMechanism()` helper function
55+
- Developer-friendly error messages for billing mechanism mismatches
56+
- Comprehensive test suite for billing mechanisms
57+
- Trusted publishing workflow with OIDC authentication
58+
- Automatic version and branch validation in CI/CD
59+
60+
### Changed
61+
62+
- Bumped `@chainlink/contracts-ccip` to `1.6.2` version
63+
- Bumped `@chainlink/contracts` to `1.5.0` version
64+
- Updated import paths to use vendored OpenZeppelin contracts
65+
- Enhanced `configuration()` function to return current fee manager state
66+
- Unified publish workflows into single automated workflow
67+
68+
### Fixed
69+
70+
- Fixed Hardhat 2 compilation issues by vendoring OpenZeppelin contracts
71+
- Fixed import path issues that occurred with updated dependency versions
72+
973
## [0.2.6] - 18 September 2025
1074

1175
### Dependencies
@@ -542,3 +606,5 @@ and this project adheres to
542606
[0.2.6-beta.0]:
543607
https://github.com/smartcontractkit/chainlink-local/releases/tag/v0.2.6-beta.0
544608
[0.2.6]: https://github.com/smartcontractkit/chainlink-local/releases/tag/v0.2.6
609+
[0.2.7-beta.0]: https://github.com/smartcontractkit/chainlink-local/releases/tag/v0.2.7-beta.0
610+
[0.2.7]: https://github.com/smartcontractkit/chainlink-local/releases/tag/v0.2.7

foundry.lock

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"lib/forge-std": {
3+
"rev": "77041d2ce690e692d6e03cc812b57d1ddaa4d505"
4+
},
5+
"lib/chainlink-evm": {
6+
"tag": {
7+
"name": "contracts-v1.5.0",
8+
"rev": "86aa5a1d34b20eda8d18fe6eb0e4882948e545ba"
9+
}
10+
},
11+
"lib/chainlink-ccip": {
12+
"tag": {
13+
"name": "contracts-ccip-v1.6.2",
14+
"rev": "0e3e0fc5c0f70f0d50dca66b139142ddf3009294"
15+
}
16+
}
17+
}

foundry.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ remappings = [
1010
'@chainlink/contracts-ccip/=lib/chainlink-ccip/chains/evm/',
1111
'@chainlink/contracts/=lib/chainlink-evm/contracts/',
1212
'@chainlink/local/src/=src/',
13+
'@openzeppelin/[email protected]/=src/vendor/openzeppelin-solidity/v4.8.3/contracts/',
14+
'@openzeppelin/[email protected]/=src/vendor/openzeppelin-solidity/v5.0.2/contracts/',
1315
]

hardhat.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const config: HardhatUserConfig = {
2424
docgen: {
2525
pages: "files",
2626
pageExtension: ".mdx",
27-
exclude: ["test"],
27+
exclude: ["test", "vendor"],
2828
outputDir: "api_reference/solidity",
2929
},
3030
};

lib/chainlink-ccip

Submodule chainlink-ccip updated 2918 files

lib/chainlink-evm

Submodule chainlink-evm updated 1245 files

0 commit comments

Comments
 (0)