Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
a79f304
migration to hardhat 3: dependencies and tests
Amxx Aug 24, 2026
34024d9
update dependency
Amxx Sep 16, 2026
a022e26
update imports
Amxx Sep 16, 2026
8bd17a1
reorder imports
Amxx Sep 16, 2026
774104b
fix sol linting
Amxx Sep 16, 2026
3955d22
fix enumerable set & map (missing removeAt)
Amxx Sep 16, 2026
d7b34cc
Bound ERC7786OpenBridge recipient return data copy
Amxx Sep 16, 2026
97f1049
Drop unused _wormholeChainId from WormholeGatewayAdapter
Amxx Sep 16, 2026
dbab7a9
Merge remote-tracking branch 'origin/master' into hardhat3
Amxx Sep 16, 2026
0714276
Deduplicate ERC7786OpenBridge return bomb test
Amxx Sep 16, 2026
09c9167
Restore lib/ exclusion in the js linting scripts
Amxx Sep 16, 2026
26d1c4b
Apply suggestion from @Amxx
Amxx Sep 16, 2026
4ad1318
Fix inheritance ordering
james-toussaint Sep 21, 2026
1f7b30d
update scripts
Amxx Sep 22, 2026
3b5b37e
fix inheritance ordering script
Amxx Sep 22, 2026
f264fe6
Derive inheritance-ordering check scope from package.json files
Amxx Sep 22, 2026
ce2ac7c
dependency update
Amxx Sep 23, 2026
7285741
Merge branch 'hardhat3' into fix/inheritance-ordering
Amxx Sep 23, 2026
0d1308f
Fix inheritance ordering (#286)
james-toussaint Sep 23, 2026
09efe3d
update .github actions and workflows
Amxx Sep 23, 2026
88eac67
checkout submodules in the lint and slither jobs
Amxx Sep 23, 2026
ef4b8ff
add missing workflows
Amxx Sep 23, 2026
37ddfe1
fix halmos
Amxx Sep 23, 2026
67fbe9b
remove unused imports
Amxx Sep 23, 2026
94455b5
link missing script
Amxx Sep 23, 2026
5247491
disable fv workflows (keep files as .yml.disabled)
Amxx Sep 23, 2026
f53f4c6
fix forge lint unused-import
Amxx Sep 23, 2026
9732ad5
fix gas-compare: pass --root to list-dependencies
Amxx Sep 23, 2026
452e9cc
docs: port the documentation pipeline to Hardhat 3 (#288)
Amxx Sep 24, 2026
387bc9e
Merge remote-tracking branch 'origin/master' into hardhat3
Amxx Nov 12, 2026
a33d9fa
Update OpenZeppelin Contracts submodules and make ERC7540 deposit/min…
Amxx Nov 12, 2026
8600cc2
Transpile upgradeable variant with the hardhat-transpiler plugin
Amxx Nov 12, 2026
778353b
Minimize pragmas and mark files copied from OpenZeppelin Contracts
Amxx Nov 12, 2026
7ebbf0e
Remove disabled formal verification workflows
Amxx Nov 12, 2026
e93170a
Mark gas-compare action as a copy of the OpenZeppelin Contracts one
Amxx Nov 12, 2026
91d9849
Use the OpenZeppelin Contracts setup action
Amxx Nov 12, 2026
83ba966
Update lib/@openzeppelin-contracts to fix setup action quotes
Amxx Nov 12, 2026
b90ba49
Align checks workflow with OpenZeppelin Contracts
Amxx Nov 12, 2026
5548062
Restore the submodules checkout in the docs workflow
Amxx Nov 12, 2026
35ad4e6
Fix the pragma of mocks
Amxx Nov 12, 2026
e4cb365
Mark docs files copied from OpenZeppelin Contracts
Amxx Nov 12, 2026
adc215c
Mark docs helpers as a copy of the OpenZeppelin Contracts one
Amxx Nov 12, 2026
290299c
Update package.json
Amxx Nov 12, 2026
bbe5717
Fix CI: regenerate package-lock.json and lint the ERC-7540 Foundry tests
Amxx Nov 12, 2026
a96400b
Use the OpenZeppelin Contracts codecov config and pre-commit hook
Amxx Nov 12, 2026
25c4c39
ERC4626Fees: silence slither locked-ether false positive
Amxx Nov 12, 2026
ac56bdd
Allow manually triggering the upgradeable transpilation
Amxx Nov 12, 2026
db53359
Update the OpenZeppelin Contracts submodule
Amxx Nov 13, 2026
6c11428
Update the OpenZeppelin Contracts submodule
Amxx Nov 13, 2026
45a5f94
Track OpenZeppelin Contracts master now that #6872 is merged
Amxx Nov 13, 2026
0b30583
Symlink scripts that are exact copies of the OpenZeppelin Contracts ones
Amxx Nov 13, 2026
3bc09b6
Publish the docs from master again
Amxx Nov 13, 2026
d6596ab
Resolve @openzeppelin/contracts through the submodule for Foundry
Amxx Nov 13, 2026
6f0c765
Destructure connection in AxelarHelper and WormholeHelper
james-toussaint Nov 17, 2026
0537d30
Remove unused imports from the mocks import file
Amxx Nov 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is an exact copy of lib/@openzeppelin-contracts/.codecov.yml.

comment: off
github_checks:
annotations: false
Expand All @@ -12,4 +14,6 @@ coverage:
threshold: 1%
ignore:
- "test"
- "contracts/mocks"
- "contracts/mocks"
- "contracts/vendor"
- "contracts-exposed"
35 changes: 31 additions & 4 deletions .github/actions/gas-compare/action.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is an exact copy of lib/@openzeppelin-contracts/.github/actions/gas-compare/action.yml.

name: Compare gas costs
description: Compare gas costs between branches
inputs:
Expand Down Expand Up @@ -29,22 +31,47 @@ runs:
GITHUB_TOKEN: ${{ inputs.token }}
shell: bash
continue-on-error: true
id: reference
- name: Compare reports
if: steps.reference.outcome == 'success' && github.event_name == 'pull_request'
if: github.event_name == 'pull_request' && hashFiles(inputs.ref_report) != ''
run: |
node scripts/checks/compare-gas-reports.js ${{ inputs.report }} ${{ inputs.ref_report }} >> $GITHUB_STEP_SUMMARY
gh pr diff '${{ github.event.number }}' --repo '${{ github.repository }}' --name-only > changed.txt
# Produce small report if the diff touches any contracts, otherwise fall back to full report
if [ -s changed.txt ]; then
node scripts/list-dependencies.js --root=. --src=contracts,contracts-exposed --ext=.sol < changed.txt > diff.json
Comment thread
Copilot marked this conversation as resolved.
Resolved
filter=(--filtered diff.json)
else
filter=()
fi
node scripts/checks/compare-gas-reports.js ${{ inputs.report }} ${{ inputs.ref_report }} "${filter[@]}" | tee gas-report.md >> $GITHUB_STEP_SUMMARY
# The comparison is posted from another workflow, which only gets the artifact: it needs the number too.
echo '${{ github.event.number }}' > pr-number.txt
env:
GITHUB_TOKEN: ${{ inputs.token }}
STYLE: markdown
shell: bash
id: comparison
# NOTE: the comment itself is NOT posted here. This job runs with a read-only
# GITHUB_TOKEN whenever the PR comes from a fork, so any write to the issues
# API fails with "Resource not accessible by integration". Instead we hand the
# rendered comment off as an artifact; .github/workflows/gas-comment.yml picks
# it up via `workflow_run` and posts it with a writable token.
- name: Upload comparison
if: steps.comparison.outcome == 'success' && github.event_name == 'pull_request'
uses: actions/upload-artifact@v7
with:
name: gas-comparison
overwrite: true
path: |
gas-report.md
pr-number.txt
- name: Rename report for upload
if: github.event_name != 'pull_request'
run: |
mv ${{ inputs.report }} ${{ inputs.out_report }}
shell: bash
- name: Save report
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: gasreport
overwrite: true
Expand Down
88 changes: 80 additions & 8 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,94 @@
# This file is an exact copy of lib/@openzeppelin-contracts/.github/actions/setup/action.yml.

name: Setup
description: Common environment setup
inputs:
node:
description: Whether to set up node
required: false
default: 'on' # 'off' | 'on' | <specific version>
foundry:
description: Whether to set up Foundry
required: false
default: 'off' # 'off' | 'on' | <specific version>
python:
description: Whether to set up Python
required: false
default: 'off' # 'off' | 'on' | <specific version>
python-requirements:
description: Path to Python requirements file (if python is true)
required: false
default: 'requirements.txt'
cache:
description: How this job may use the shared dependency cache
required: false
# 'restore' reads the cache but never writes it back. A job that runs untrusted code MUST use it:
# the cache scope is keyed on the branch, so a write from such a job lands where every other
# workflow reads from.
default: 'on' # 'off' | 'restore' | 'on'

runs:
using: composite
steps:
- uses: actions/setup-node@v4
- name: 'Determine versions to install'
id: versions
shell: bash
run: |
(
[[ "${{ inputs.node }}" = "on" ]] \
&& echo "node=$NODE_DEFAULT_VERSION" \
|| echo "node=${{ inputs.node }}"
[[ "${{ inputs.foundry }}" = "on" ]] \
&& echo "foundry=$FOUNDRY_DEFAULT_VERSION" \
|| echo "foundry=${{ inputs.foundry }}"
[[ "${{ inputs.python }}" = "on" ]] \
&& echo "python=$PYTHON_DEFAULT_VERSION" \
|| echo "python=${{ inputs.python }}"
) > $GITHUB_OUTPUT
env:
NODE_DEFAULT_VERSION: '24.x'
FOUNDRY_DEFAULT_VERSION: 'stable'
PYTHON_DEFAULT_VERSION: '3.13'
# Node & npm setup
- name: Install Node (${{ steps.versions.outputs.node }})
if: inputs.node != 'off'
uses: actions/setup-node@v7
with:
node-version: 22.x
- uses: actions/cache@v4
node-version: ${{ steps.versions.outputs.node }}
- name: Try fetch node modules from cache
id: cache
if: inputs.node != 'off' && inputs.cache == 'on'
uses: actions/cache@v6
with:
path: '**/node_modules'
key: npm-${{ steps.versions.outputs.node }}-${{ hashFiles('**/package-lock.json') }}
- name: Try fetch node modules from cache (read only)
id: cache-restore
if: inputs.node != 'off' && inputs.cache == 'restore'
uses: actions/cache/restore@v6
with:
path: '**/node_modules'
key: npm-v3-${{ hashFiles('**/package-lock.json') }}
key: npm-${{ steps.versions.outputs.node }}-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
run: npm ci
if: inputs.node != 'off' && steps.cache.outputs.cache-hit != 'true' && steps.cache-restore.outputs.cache-hit != 'true'
shell: bash
if: steps.cache.outputs.cache-hit != 'true'
- name: Install Foundry
run: npm ci
# Foundry setup
- name: Install Foundry (${{ steps.versions.outputs.foundry }})
if: inputs.foundry != 'off'
uses: foundry-rs/foundry-toolchain@v1
with:
version: stable
version: ${{ steps.versions.outputs.foundry }}
# Python setup
- name: Install python (${{ steps.versions.outputs.python }})
if: inputs.python != 'off'
uses: actions/setup-python@v7
with:
python-version: ${{ steps.versions.outputs.python }}
# `setup-python` has no read-only mode, so any caller that cannot write the cache goes without
cache: ${{ inputs.cache == 'on' && 'pip' || '' }}
cache-dependency-path: ${{ inputs.python-requirements }}
- name: Install python packages
if: inputs.python != 'off'
shell: bash
run: pip install -r ${{ inputs.python-requirements }}
20 changes: 20 additions & 0 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This file is an exact copy of lib/@openzeppelin-contracts/.github/workflows/actionlint.yml.

name: lint workflows

on:
pull_request:
paths:
- '.github/**/*.ya?ml'

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Add problem matchers
run: |
# https://github.com/rhysd/actionlint/blob/3a2f2c7/docs/usage.md#problem-matchers
curl -LO https://raw.githubusercontent.com/rhysd/actionlint/main/.github/actionlint-matcher.json
echo "::add-matcher::actionlint-matcher.json"
- uses: docker://rhysd/actionlint:latest
Comment on lines +12 to +20
56 changes: 28 additions & 28 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,51 @@ on:
push:
branches:
- master
- next-v*
- release-v*
pull_request: {}
workflow_dispatch: {}

concurrency:
group: checks-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read # actions/checkout
actions: read # gas-compare: gh run list / gh run download
pull-requests: read # gas-compare: gh pr diff

env:
NODE_OPTIONS: --max_old_space_size=8192

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
submodules: recursive
- name: Set up environment
uses: ./.github/actions/setup
with:
foundry: 'on'
- run: npm run lint
- run: forge compile && forge lint --deny notes --only-lint unused-import

tests:
runs-on: ubuntu-latest
env:
FORCE_COLOR: 1
# Needed for "eth-gas-reporter" to produce a "gasReporterOutput.json" as documented in
# https://github.com/cgewecke/eth-gas-reporter/blob/v0.2.27/docs/gasReporterOutput.md
CI: true
GAS: true
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
submodules: recursive
- name: Set up environment
uses: ./.github/actions/setup
with:
foundry: 'on' # needed by npm run test:pragma
- name: Run tests and generate gas report
run: npm run test
run: npm run test -- --gas-stats-json gasReport.json
- name: Check linearisation of the inheritance graph
run: npm run test:inheritance
- name: Check pragma validity
Expand All @@ -51,6 +59,7 @@ jobs:
uses: ./.github/actions/gas-compare
with:
token: ${{ github.token }}
report: gasReport.json

tests-upgradeable:
# Skip on transpiled branches, which are already upgradeable
Expand All @@ -59,12 +68,14 @@ jobs:
env:
FORCE_COLOR: 1
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
submodules: recursive
fetch-depth: 0 # Include history so patch conflicts are resolved automatically
- name: Set up environment
uses: ./.github/actions/setup
with:
foundry: 'on' # needed by npm run test:pragma
- name: Copy non-upgradeable contracts as dependency
run: |
mkdir -p lib/openzeppelin-community-contracts
Expand All @@ -73,55 +84,44 @@ jobs:
run: bash scripts/upgradeable/transpile.sh
- name: Run tests
run: npm run test
- name: Run Foundry tests
run: forge test -vvv
- name: Check linearisation of the inheritance graph
run: npm run test:inheritance
- name: Check pragma validity
run: npm run test:pragma -- --concurrency 1

tests-foundry:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up environment
uses: ./.github/actions/setup
- name: Run tests
run: forge test -vvv

coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
submodules: recursive
- name: Set up environment
uses: ./.github/actions/setup
- name: Run coverage
run: npm run coverage
- uses: codecov/codecov-action@v5
- uses: codecov/codecov-action@v7
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

slither:
runs-on: ubuntu-latest
env:
FOUNDRY_PROFILE: slither
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
submodules: recursive
- name: Set up environment
uses: ./.github/actions/setup
- uses: crytic/slither-action@v0.4.1
- uses: crytic/slither-action@v0.4.2

codespell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- name: Run CodeSpell
uses: codespell-project/actions-codespell@v2.1
uses: codespell-project/actions-codespell@v2.4.3
with:
check_hidden: true
check_filenames: true
skip: package-lock.json
skip: package-lock.json,*.pdf,vendor
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
Comment thread
Copilot marked this conversation as resolved.
Resolved
with:
submodules: recursive
- name: Set up environment
Expand Down
Loading
Loading