Skip to content

Commit

Permalink
Bump NPM and Forge dependencies (#14093)
Browse files Browse the repository at this point in the history
* bump npm

* more npm

* bump foundry dep

* make snapshot

* rm gas tests

* fix change in gas cost

* fix blockhash, this breaks the proof

* Regenerated VRF proofs and fixed payment outputs in Foundry tests

* Updated gas cost for LINK payments in unit tests

* try with no coverage, exclude test files from Slither

* add support for extra code coverage params

* fix warnings and snapshot

* changeset

* fix codeowners

* fix tests and bump foundry

* add missing changes quantifier

---------

Co-authored-by: Iva Brajer <iva.brajer@smartcontract.com>
Co-authored-by: Bartek Tofel <bartek.tofel@smartcontract.com>
  • Loading branch information
3 people authored Aug 26, 2024
1 parent 3257b8f commit 95ae744
Show file tree
Hide file tree
Showing 29 changed files with 761 additions and 1,682 deletions.
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ core/scripts/functions @smartcontractkit/functions
core/scripts/gateway @smartcontractkit/functions

# Contracts
/contracts/ @RensR
/contracts/ @RensR @matYang @RayXpub @elatoskinas

# First we match on project names to catch files like the compilation scripts,
# gas snapshots and other files not places in the project directories.
Expand All @@ -74,7 +74,7 @@ core/scripts/gateway @smartcontractkit/functions
/contracts/src/v0.8/llo-feeds @smartcontractkit/mercury-team
# TODO: mocks folder, folder should be removed and files moved to the correct folders
/contracts/src/v0.8/operatorforwarder @smartcontractkit/data-feeds-engineers
/contracts/src/v0.8/shared @RensR
/contracts/src/v0.8/shared @RensR @matYang @RayXpub @elatoskinas
# TODO: tests folder, folder should be removed and files moved to the correct folders
# TODO: transmission folder, owner should be found
/contracts/src/v0.8/vrf @smartcontractkit/vrf-team
Expand Down
37 changes: 32 additions & 5 deletions .github/workflows/solidity-foundry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
{ "name": "liquiditymanager", "setup": { "run-coverage": true, "min-coverage": 46.3, "run-gas-snapshot": true, "run-forge-fmt": false }},
{ "name": "llo-feeds", "setup": { "run-coverage": true, "min-coverage": 49.3, "run-gas-snapshot": true, "run-forge-fmt": false }},
{ "name": "operatorforwarder", "setup": { "run-coverage": true, "min-coverage": 55.7, "run-gas-snapshot": true, "run-forge-fmt": false }},
{ "name": "shared", "setup": { "run-coverage": true, "min-coverage": 32.6, "run-gas-snapshot": true, "run-forge-fmt": false }},
{ "name": "shared", "setup": { "run-coverage": true, "extra-coverage-params": "--no-match-path='*CallWithExactGas*'", "min-coverage": 32.6, "run-gas-snapshot": true, "run-forge-fmt": false }},
{ "name": "transmission", "setup": { "run-coverage": true, "min-coverage": 65.6, "run-gas-snapshot": true, "run-forge-fmt": false }},
{ "name": "vrf", "setup": { "run-coverage": false, "min-coverage": 98.5, "run-gas-snapshot": false, "run-forge-fmt": false }}
]
Expand All @@ -62,13 +62,14 @@ jobs:
sol_modified_added_files: ${{ steps.changes.outputs.sol_files }}
sol_mod_only: ${{ steps.changes.outputs.sol_mod_only }}
sol_mod_only_files: ${{ steps.changes.outputs.sol_mod_only_files }}
not_test_sol_modified: ${{ steps.changes.outputs.not_test_sol }}
not_test_sol_modified_files: ${{ steps.changes.outputs.not_test_sol_files }}
not_test_sol_modified: ${{ steps.changes-non-test.outputs.not_test_sol }}
not_test_sol_modified_files: ${{ steps.changes-non-test.outputs.not_test_sol_files }}
all_changes: ${{ steps.changes.outputs.changes }}
steps:
- name: Checkout the repo
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
- name: Detect changes
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changes
with:
list-files: 'shell'
Expand Down Expand Up @@ -111,6 +112,26 @@ jobs:
transmission:
- 'contracts/src/v0.8/transmission/**/*.sol'
- name: Detect non-test changes
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changes-non-test
with:
list-files: 'shell'
# This is a valid input, see https://github.com/dorny/paths-filter/pull/226
predicate-quantifier: every
filters: |
not_test_sol:
- modified|added: 'contracts/src/v0.8/**/!(*.t).sol'
- '!contracts/src/v0.8/**/test/**'
- '!contracts/src/v0.8/**/tests/**'
- '!contracts/src/v0.8/**/mock/**'
- '!contracts/src/v0.8/**/mocks/**'
- '!contracts/src/v0.8/**/*.t.sol'
- '!contracts/src/v0.8/*.t.sol'
- '!contracts/src/v0.8/**/testhelpers/**'
- '!contracts/src/v0.8/testhelpers/**'
- '!contracts/src/v0.8/vendor/**'
tests:
if: ${{ needs.changes.outputs.non_src_changes == 'true' || needs.changes.outputs.sol_modified_added == 'true' }}
strategy:
Expand Down Expand Up @@ -198,7 +219,13 @@ jobs:
|| needs.changes.outputs.non_src_changes == 'true')
&& matrix.product.setup.run-coverage }}
working-directory: contracts
run: forge coverage --report lcov
shell: bash
run: |
if [[ -n "${{ matrix.product.setup.extra-coverage-params }}" ]]; then
forge coverage --report lcov ${{ matrix.product.setup.extra-coverage-params }}
else
forge coverage --report lcov
fi
env:
FOUNDRY_PROFILE: ${{ matrix.product.name }}

Expand Down
5 changes: 5 additions & 0 deletions contracts/.changeset/few-camels-tan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@chainlink/contracts': patch
---

bump dependencies
2 changes: 1 addition & 1 deletion contracts/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ mockery: $(mockery) ## Install mockery.

.PHONY: foundry
foundry: ## Install foundry.
foundryup --version nightly-de33b6af53005037b463318d2628b5cfcaf39916
foundryup --version nightly-515a4cc8aba1627a717a1057ff4f09c8cd3bf51f

.PHONY: foundry-refresh
foundry-refresh: foundry
Expand Down
Loading

0 comments on commit 95ae744

Please sign in to comment.