Skip to content

Commit 5a0655b

Browse files
andrejrakicEmanHerawyemanherawyNalon
authored
v0.2.8 Release (#56)
* 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/contracts@v1.1.1 * 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 <eman.herawy@gmaail.com> * 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 * DEVREL-155: Auto populate Register.sol (#51) * Added script to update Register.sol - Added script to query CCIP API and update Register.sol constructor - Updated Register.sol with latest contents * Added npm scripts - Added npm script to update the register contract - Added pre script that updates the register contract whenever generate-docs is called * Include both testnet and mainnet networks in ccip register.sol - Updated updateRegisterContract.js to include both mainnet and testnet networks in Register.sol - Updated Register.sol with latest contents for both mainnet and testnet networks - Updated package.json scripts to reflect the changes * chore: Prepare for 0.2.8-beta release --------- Co-authored-by: andrejrakic <andrej.rakic@smartcontract.com> * Improved update register helper Modified the updateRegisterContract helper to use a base url from env variables. Includes new helper function to construct apiUrl from path and parameters. Base url can be set with: CCIP_API_BASE_URL=<base_url> Commit includes update to Register contract. * feat: Add Data Stream Report Schemas V1, V5-V13 (#55) * chore: Prepare for v0.2.8 release --------- Co-authored-by: Eman Herawy <eman.herawy@gmail.com> Co-authored-by: emanherawy <eman.herawy@gmaail.com> Co-authored-by: nje <8985830+Nalon@users.noreply.github.com>
1 parent a3ace4e commit 5a0655b

15 files changed

Lines changed: 3789 additions & 185 deletions

File tree

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Release Playbook
2+
3+
Step-by-step guide for publishing beta and stable releases of `@chainlink/local`.
4+
5+
## Release and Publish Rules
6+
- Publishing workflow: `.github/workflows/publish.yml`
7+
- Triggers:
8+
- automatic on tag push `v*`
9+
- manual fallback via `workflow_dispatch`
10+
- Before publishing any beta or stable release, `CHANGELOG.md` must be updated for that version using [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
11+
- Version check:
12+
- tag version must match `package.json` version
13+
- Branch policy:
14+
- beta tag (`vX.Y.Z-beta`) must come from `develop`
15+
- stable tag (`vX.Y.Z`) must come from `main`
16+
17+
## Feature Development (beta track)
18+
1. Branch from `develop` (for example `feat/<name>`, or `devrel-123/<name>`).
19+
2. Open a draft PR targeting `develop`.
20+
3. Commit incrementally using [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).
21+
4. Keep docs/tests updated (`npm run generate-docs` when docs sources changed).
22+
5. Mark PR ready, get review, merge into `develop`.
23+
24+
## Publish Beta Release
25+
1. Ensure `package.json` version is beta-formatted (for example `0.3.1-beta`).
26+
2. Update `CHANGELOG.md` for the new release using [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) + [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
27+
3. Draft GitHub release with:
28+
- tag: `v<version>-beta`
29+
- target: `develop`
30+
- pre-release: enabled
31+
- release title: `v<version>-beta`
32+
4. Publish the release (tag push triggers publish workflow automatically).
33+
5. If needed, use manual `workflow_dispatch` fallback from `develop` with `release_type=beta`.
34+
35+
## Promote to Stable Release
36+
1. Open PR from `develop` to `main`.
37+
2. Update `package.json` version to stable (remove `-beta` suffix).
38+
3. Update `CHANGELOG.md` for the stable release using [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) + [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
39+
4. Merge into `main` after review.
40+
5. Draft GitHub release with:
41+
- tag: `v<version>`
42+
- target: `main`
43+
- pre-release: disabled
44+
- release title: `v<version>`
45+
6. Publish release (tag push triggers stable publish automatically).
46+
7. If needed, run manual fallback from `main` with `release_type=stable`.

.claude/skills/release.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
name: release
3+
description: Use when publishing a beta or stable release, creating release tags, or following the release workflow
4+
---
5+
6+
Read `.agent/playbooks/RELEASE_PLAYBOOK.md` in the repository root and follow the instructions for the requested release type (beta or stable).

.cursor/rules/general.mdc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
description: General project rules for Chainlink Local
3+
globs:
4+
---
5+
6+
All project rules, conventions, and commands are in [AGENTS.md](../../AGENTS.md) at the repository root. Read it before starting any task.

.github/workflows/publish.yml

Lines changed: 43 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
steps:
2828
- name: Checkout code
2929
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 0
3032

3133
- name: Use Node.js
3234
uses: actions/setup-node@v4
@@ -76,11 +78,8 @@ jobs:
7678
id: release-type
7779
run: |
7880
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-
8281
# Check if tag contains 'beta' to determine release type
83-
if [[ "${{ github.ref_name }}" == *"beta"* ]]; then
82+
if [[ "${{ github.ref_name }}" == *"-beta"* ]]; then
8483
echo "type=beta" >> $GITHUB_OUTPUT
8584
echo "expected_branch=develop" >> $GITHUB_OUTPUT
8685
else
@@ -99,32 +98,56 @@ jobs:
9998
10099
- name: Validate branch for release type
101100
run: |
102-
CURRENT_BRANCH="${{ github.ref_name }}"
103101
EXPECTED_BRANCH="${{ steps.release-type.outputs.expected_branch }}"
104102
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"
103+
104+
if [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" =~ ^refs/tags/v.* ]]; then
105+
TAG_NAME="${{ github.ref_name }}"
106+
TAG_SHA="${{ github.sha }}"
107+
108+
echo "Tag: $TAG_NAME"
109+
echo "Tag commit: $TAG_SHA"
110+
echo "Expected branch for $RELEASE_TYPE release: $EXPECTED_BRANCH"
111+
112+
# Ensure expected branch ref exists locally.
113+
if ! git fetch --no-tags --prune origin "${EXPECTED_BRANCH}"; then
114+
echo "❌ Branch validation failed!"
115+
echo "Could not fetch expected branch from origin: $EXPECTED_BRANCH"
116+
exit 1
117+
fi
118+
119+
if ! git show-ref --verify --quiet "refs/remotes/origin/${EXPECTED_BRANCH}"; then
120+
echo "❌ Branch validation failed!"
121+
echo "Could not fetch expected branch: $EXPECTED_BRANCH"
122+
exit 1
123+
fi
124+
125+
# Validate the tagged commit belongs to expected branch history.
126+
if ! git merge-base --is-ancestor "$TAG_SHA" "origin/${EXPECTED_BRANCH}"; then
127+
echo "❌ Branch validation failed!"
128+
echo "Tag commit is not contained in branch: $EXPECTED_BRANCH"
129+
echo "Please create the tag from the correct branch"
130+
exit 1
131+
fi
132+
133+
echo "✅ Tag ancestry validation passed"
115134
exit 0
116135
fi
117-
118-
# For tag pushes, validate branch
136+
137+
# workflow_dispatch: validate selected branch directly.
138+
CURRENT_BRANCH="${{ github.ref_name }}"
139+
echo "Selected workflow branch: $CURRENT_BRANCH"
140+
echo "Expected branch for $RELEASE_TYPE release: $EXPECTED_BRANCH"
141+
119142
if [[ "$CURRENT_BRANCH" != "$EXPECTED_BRANCH" ]]; then
120143
echo "❌ Branch validation failed!"
121144
echo "Current branch: $CURRENT_BRANCH"
122145
echo "Expected branch for $RELEASE_TYPE release: $EXPECTED_BRANCH"
123-
echo "Please create the tag from the correct branch"
146+
echo "For manual runs, choose the correct branch in 'Use workflow from'."
124147
exit 1
125148
fi
126-
127-
echo "✅ Branch validation passed"
149+
150+
echo "✅ Manual branch validation passed"
128151
129152
- name: Publish stable release
130153
if: steps.release-type.outputs.type == 'stable'

AGENTS.md

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
# Chainlink Local - Agents Guide
2+
3+
Guide for AI coding agents working in `smartcontractkit/chainlink-local`.
4+
5+
## What this library does
6+
7+
Chainlink Local is a developer-focused testing package that simulates Chainlink services (especially CCIP) in local and forked environments.
8+
9+
- Local mode (`CCIPLocalSimulator`, `DataStreamsLocalSimulator`) lets developers test app logic quickly without waiting for live offchain systems.
10+
- Fork mode (`CCIPLocalSimulatorFork`, `DataStreamsLocalSimulatorFork`) runs against forked networks so integrations behave closer to real testnet conditions.
11+
- The intent is parity of user app behavior between local/fork testing and testnet deployment (minus environment-specific addresses/config).
12+
- It is available for usage in Foundry, Hardhat 3, Hardhat 2 and Remix IDE environments.
13+
- Official documentation is available at: https://docs.chain.link/chainlink-local
14+
15+
## Goal
16+
- Make minimal, correct changes that preserve simulator behavior and test ergonomics.
17+
- Prefer targeted edits and targeted tests over broad refactors.
18+
19+
## Context Budget First
20+
Load files in this order and stop as soon as you have enough context:
21+
1. `package.json` (scripts, versions, docs/release commands)
22+
2. `foundry.toml` and `hardhat.config.ts` (tooling layout)
23+
3. Only the relevant `src/**` files and matching tests in `test/**`
24+
4. If docs task: `helper_doc/*.mjs` and `api_reference/**`
25+
5. If release/publish task: `.github/workflows/publish.yml`
26+
27+
Avoid loading large/unnecessary trees unless explicitly required:
28+
- `lib/**`, `out/**`, `cache/**`, `artifacts/**`, `node_modules/**`
29+
30+
## Directory layout
31+
- `src/`: production contracts by service (`ccip`, `data-feeds`, `data-streams`)
32+
- `src/test/`: helper/example contracts used by tests
33+
- `test/smoke/`: local-mode tests
34+
- `test/e2e/`: fork-mode tests
35+
- `test/unit/`: unit-level tests
36+
- `scripts/`: helpers for Hardhat users that write tests using JavaScript or TypeScript
37+
- `helper_doc/`: docs generation scripts (you shouldn't touch these)
38+
- `api_reference/`: generated docs output (read only; do not edit directly)
39+
40+
## Hard Rules
41+
- Never edit `lib/**`. If user explicitly asks, use forge for dependency management.
42+
- Never edit `node_modules/**`. If user explicitly asks, use npm for dependency management.
43+
- Keep changes surgical; do not refactor unrelated code.
44+
- Preserve test placement conventions:
45+
- local mode -> `test/smoke/**`
46+
- fork mode -> `test/e2e/**`
47+
- Do not hand-edit generated docs in `api_reference/**`; regenerate via scripts.
48+
- If a command fails after deleting generated docs, restore state before continuing.
49+
50+
## Common Commands
51+
- Compile:
52+
- `npm run forge-compile`
53+
- `npm run hardhat-compile`
54+
- Test:
55+
- `npm run forge-test`
56+
- `npm run hardhat-test`
57+
- `forge test <path-to-test>`
58+
- Docs:
59+
- `npm run generate-docs` (deterministic; does not fetch Register data)
60+
- `npm run update-register` (networked; updates `src/ccip/Register.sol`)
61+
62+
## Release and Publish
63+
For the full release workflow (beta, stable, branch policy, CHANGELOG requirements), see [`.agent/playbooks/RELEASE_PLAYBOOK.md`](.agent/playbooks/RELEASE_PLAYBOOK.md).
64+
65+
## Dependency Policy
66+
- Keep `@chainlink/contracts` and `@chainlink/contracts-ccip` as direct `dependencies`.
67+
- Avoid introducing new tooling dependencies unless there is a clear maintenance win.
68+
- If bumping Chainlink packages, do not move them to `devDependencies` or `peerDependencies`.
69+
70+
### Current core npm dependency versions
71+
| Package | Version |
72+
| --- | --- |
73+
| `@chainlink/contracts-ccip` | `1.6.2` |
74+
| `@chainlink/contracts` | `1.5.0` |
75+
76+
## Dependency Update Playbook
77+
Use these commands unless a maintainer requests something different.
78+
79+
### npm / Hardhat dependencies
80+
- Add runtime dependency:
81+
- `npm install <package>@<version>`
82+
- Add dev dependency:
83+
- `npm install --save-dev <package>@<version>`
84+
- Update existing dependency:
85+
- `npm install <package>@<new-version>`
86+
- Verify:
87+
- check `package.json` (`dependencies` vs `devDependencies` placement)
88+
- run the smallest relevant compile/test command
89+
- Example (`@chainlink/contracts` -> `1.2.0`):
90+
- `npm install @chainlink/contracts@1.2.0`
91+
92+
### Foundry dependencies
93+
- Optional: pull latest submodule state first (all or specific):
94+
- `forge update`
95+
- `forge update lib/chainlink-evm lib/chainlink-ccip`
96+
- Install/update with pinned tag:
97+
- `forge install <org>/<repo>@<tag>`
98+
- For direct dependencies:
99+
- `@chainlink/contracts` equivalent:
100+
- `forge install smartcontractkit/chainlink-evm@contracts-v<version>`
101+
- `@chainlink/contracts-ccip` equivalent:
102+
- `forge install smartcontractkit/chainlink-ccip@contracts-ccip-v<version>`
103+
- Historical note:
104+
- older docs may reference `chainlink-brownie-contracts`; this repo uses `chainlink-evm`.
105+
- After install:
106+
- verify `lib/` points to the expected tag/commit
107+
- verify npm versions in `package.json`
108+
- run `forge build` and relevant tests
109+
- never edit vendored files manually inside `lib/**` or `node_modules/**`
110+
111+
## Change Checklist
112+
Before finishing:
113+
1. Run the smallest relevant compile/test command(s).
114+
2. Regenerate docs if your change affects docs sources.
115+
3. Confirm no accidental edits in unrelated files.
116+
4. Summarize:
117+
- what changed
118+
- what was intentionally not touched
119+
- any residual risk or follow-up
120+
121+
## Known Good Defaults
122+
- Node.js `22.x` is the safe default for workflow parity.
123+
- Prefer `rg` for search.
124+
- Prefer explicit, boring solutions over abstraction-heavy changes.

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,33 @@ 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.8] - 5 May 2026
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 Report versions V1, V5-V13
21+
- CCIP Network Details Update Script to fetch and update CCIP network details from Chainlink's API
22+
23+
## [0.2.8-beta] - 14 January 2026
24+
25+
### Dependencies
26+
27+
| Package | Version |
28+
| ------------------------- | ------- |
29+
| @chainlink/contracts-ccip | 1.6.2 |
30+
| @chainlink/contracts | 1.5.0 |
31+
32+
### Added
33+
34+
- CCIP Network Details Update Script to fetch and update CCIP network details from Chainlink's API
35+
936
## [0.2.7] - 9 November 2025
1037

1138
### Dependencies
@@ -608,3 +635,5 @@ and this project adheres to
608635
[0.2.6]: https://github.com/smartcontractkit/chainlink-local/releases/tag/v0.2.6
609636
[0.2.7-beta.0]: https://github.com/smartcontractkit/chainlink-local/releases/tag/v0.2.7-beta.0
610637
[0.2.7]: https://github.com/smartcontractkit/chainlink-local/releases/tag/v0.2.7
638+
[0.2.8-beta]: https://github.com/smartcontractkit/chainlink-local/releases/tag/v0.2.8-beta
639+
[0.2.8]: https://github.com/smartcontractkit/chainlink-local/releases/tag/v0.2.8

CLAUDE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Claude Code Instructions
2+
3+
All project rules, conventions, and commands are in [`AGENTS.md`](AGENTS.md). Read it before starting any task.

package-lock.json

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

package.json

Lines changed: 4 additions & 2 deletions
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.7",
5+
"version": "0.2.8",
66
"files": [
77
"src/**/*.sol",
88
"!src/test/**/*",
@@ -27,7 +27,9 @@
2727
"generate-solidity": "rimraf api_reference/solidity && npm run hardhat-compile && npm run forge-compile && npx hardhat docgen",
2828
"generate-jsdoc": "rimraf api_reference/javascript && npx ts-node helper_doc/generate-jsdoc.ts",
2929
"generate-index": "npx ts-node helper_doc/generate-index-files.ts",
30-
"generate-docs": "npm run generate-solidity && npm run generate-jsdoc && npm run generate-index && npm run prettier"
30+
"pregenerate-docs": "npm run update-register",
31+
"generate-docs": "npm run generate-solidity && npm run generate-jsdoc && npm run generate-index && npm run prettier",
32+
"update-register": "node scripts/ccip/updateRegisterContract.js"
3133
},
3234
"devDependencies": {
3335
"@nomicfoundation/hardhat-foundry": "^1.1.1",

0 commit comments

Comments
 (0)