Skip to content

Commit 0f78794

Browse files
ernestognwAmxx
andauthored
Run forge update and paginated functions to Enumerable* (#177)
Co-authored-by: Hadrien Croubois <[email protected]>
1 parent 0bfaf09 commit 0f78794

File tree

56 files changed

+615
-338
lines changed

Some content is hidden

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

56 files changed

+615
-338
lines changed

.github/actions/setup/action.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
name: Setup
2+
description: Common environment setup
23

34
runs:
45
using: composite
56
steps:
67
- uses: actions/setup-node@v4
78
with:
8-
node-version: 20.x
9+
node-version: 22.x
910
- uses: actions/cache@v4
1011
id: cache
1112
with:
@@ -18,4 +19,4 @@ runs:
1819
- name: Install Foundry
1920
uses: foundry-rs/foundry-toolchain@v1
2021
with:
21-
version: nightly
22+
version: stable

.github/workflows/checks.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,39 +43,39 @@ jobs:
4343
run: npm run test
4444
- name: Check linearisation of the inheritance graph
4545
run: npm run test:inheritance
46-
- name: Check pragma consistency between files
47-
run: npm run test:pragma
46+
- name: Check pragma validity
47+
run: npm run test:pragma -- --concurrency 1
4848
- name: Check procedurally generated contracts are up-to-date
4949
run: npm run test:generation
5050
- name: Compare gas costs
5151
uses: ./.github/actions/gas-compare
5252
with:
5353
token: ${{ github.token }}
5454

55-
coverage:
55+
tests-foundry:
5656
runs-on: ubuntu-latest
5757
steps:
5858
- uses: actions/checkout@v4
5959
with:
6060
submodules: recursive
6161
- name: Set up environment
6262
uses: ./.github/actions/setup
63-
- name: Run coverage
64-
run: npm run coverage
65-
- uses: codecov/codecov-action@v5
66-
env:
67-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
63+
- name: Run tests
64+
run: forge test -vvv
6865

69-
tests-foundry:
66+
coverage:
7067
runs-on: ubuntu-latest
7168
steps:
7269
- uses: actions/checkout@v4
7370
with:
7471
submodules: recursive
7572
- name: Set up environment
7673
uses: ./.github/actions/setup
77-
- name: Run tests
78-
run: forge test -vv
74+
- name: Run coverage
75+
run: npm run coverage
76+
- uses: codecov/codecov-action@v5
77+
env:
78+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
7979

8080
slither:
8181
runs-on: ubuntu-latest
@@ -85,14 +85,15 @@ jobs:
8585
submodules: recursive
8686
- name: Set up environment
8787
uses: ./.github/actions/setup
88-
- uses: crytic/[email protected].0
88+
- uses: crytic/[email protected].1
8989

9090
codespell:
9191
runs-on: ubuntu-latest
9292
steps:
9393
- uses: actions/checkout@v4
9494
- name: Run CodeSpell
95-
uses: codespell-project/actions-codespell@v2.0
95+
uses: codespell-project/actions-codespell@v2.1
9696
with:
97+
check_hidden: true
9798
check_filenames: true
9899
skip: package-lock.json

contracts/account/extensions/AccountERC7579.sol

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,16 @@ pragma solidity ^0.8.27;
44

55
import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";
66
import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";
7-
import {IERC7579Module, IERC7579Validator, IERC7579Execution, IERC7579AccountConfig, IERC7579ModuleConfig, MODULE_TYPE_VALIDATOR, MODULE_TYPE_EXECUTOR, MODULE_TYPE_FALLBACK} from "@openzeppelin/contracts/interfaces/draft-IERC7579.sol";
7+
import {
8+
IERC7579Module,
9+
IERC7579Validator,
10+
IERC7579Execution,
11+
IERC7579AccountConfig,
12+
IERC7579ModuleConfig,
13+
MODULE_TYPE_VALIDATOR,
14+
MODULE_TYPE_EXECUTOR,
15+
MODULE_TYPE_FALLBACK
16+
} from "@openzeppelin/contracts/interfaces/draft-IERC7579.sol";
817
import {ERC7579Utils, Mode, CallType, ExecType} from "@openzeppelin/contracts/account/utils/draft-ERC7579Utils.sol";
918
import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
1019
import {Bytes} from "@openzeppelin/contracts/utils/Bytes.sol";

contracts/account/extensions/ERC7821.sol

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
pragma solidity ^0.8.20;
44

5-
import {ERC7579Utils, Mode, CallType, ExecType, ModeSelector} from "@openzeppelin/contracts/account/utils/draft-ERC7579Utils.sol";
5+
import {
6+
ERC7579Utils,
7+
Mode,
8+
CallType,
9+
ExecType,
10+
ModeSelector
11+
} from "@openzeppelin/contracts/account/utils/draft-ERC7579Utils.sol";
612
import {IERC7821} from "../../interfaces/IERC7821.sol";
713
import {Account} from "../Account.sol";
814

contracts/account/modules/ERC7579Executor.sol

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity ^0.8.27;
33

4-
import {IERC7579Module, MODULE_TYPE_EXECUTOR, IERC7579Execution} from "@openzeppelin/contracts/interfaces/draft-IERC7579.sol";
4+
import {
5+
IERC7579Module,
6+
MODULE_TYPE_EXECUTOR,
7+
IERC7579Execution
8+
} from "@openzeppelin/contracts/interfaces/draft-IERC7579.sol";
59

610
/**
711
* @dev Basic implementation for ERC-7579 executor modules that provides execution functionality

contracts/account/modules/ERC7579Validator.sol

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22

33
pragma solidity ^0.8.27;
44

5-
import {IERC7579Module, IERC7579Validator, MODULE_TYPE_VALIDATOR} from "@openzeppelin/contracts/interfaces/draft-IERC7579.sol";
5+
import {
6+
IERC7579Module,
7+
IERC7579Validator,
8+
MODULE_TYPE_VALIDATOR
9+
} from "@openzeppelin/contracts/interfaces/draft-IERC7579.sol";
610
import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";
711
import {ERC4337Utils} from "@openzeppelin/contracts/account/utils/draft-ERC4337Utils.sol";
812
import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";

contracts/interfaces/IERC7786.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: MIT
22

3-
pragma solidity ^0.8.0;
3+
pragma solidity ^0.8.4;
44

55
/**
66
* @dev Interface for ERC-7786 source gateways.

contracts/interfaces/IERC7913.sol

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

contracts/mocks/CallReceiverMock.sol

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

contracts/mocks/ERC7913VerifierMock.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
pragma solidity ^0.8.20;
44

5-
import {IERC7913SignatureVerifier} from "../../contracts/interfaces/IERC7913.sol";
5+
import {IERC7913SignatureVerifier} from "@openzeppelin/contracts/interfaces/IERC7913.sol";
66

77
contract ERC7913VerifierMock is IERC7913SignatureVerifier {
88
// Store valid keys and their corresponding signatures

0 commit comments

Comments
 (0)