Skip to content

Commit 14b48f8

Browse files
authored
Fix/ci (#102)
* ci * ci * fmt * changed min solc * use 0.8.21 * use 0.8.23 * path fix...? * plz * maybe..? * typo * typos * removed intense * removed yarn lock from codespell * removed intense completely
1 parent ce2bc50 commit 14b48f8

File tree

11 files changed

+46
-61
lines changed

11 files changed

+46
-61
lines changed

.github/workflows/test.yml

Lines changed: 13 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ name: ci
22

33
on:
44
pull_request:
5-
branches: [dev]
5+
branches: [dev,fix/ci]
66
paths:
77
- '**.sol'
88
- '**.yml'
99
push:
10-
branches: [dev]
10+
branches: [dev,fix/ci]
1111
paths:
1212
- '**.sol'
1313
- '**.yml'
@@ -18,7 +18,7 @@ jobs:
1818

1919
strategy:
2020
matrix:
21-
profile: [post-cancun,post-cancun-via-ir,solc-past-versions-0,solc-past-versions-1,via-ir,min-solc,min-solc-via-ir,intense]
21+
profile: [post-cancun,post-cancun-via-ir,solc-past-versions-0,via-ir,min-solc,min-solc-via-ir]
2222

2323
steps:
2424
- uses: actions/checkout@v4
@@ -30,6 +30,12 @@ jobs:
3030

3131
- name: Install Dependencies
3232
run: forge install
33+
34+
- name: show list
35+
run: ls
36+
37+
- name : pwd
38+
run: pwd
3339

3440
- name: Run Tests with ${{ matrix.profile }}
3541
run: >
@@ -40,26 +46,6 @@ jobs:
4046
forge test --use 0.8.25 --evm-version "cancun" --via-ir
4147
) ||
4248
( [ "${{ matrix.profile }}" = "solc-past-versions-0" ] &&
43-
forge test --use 0.8.5 --fuzz-runs 16 &&
44-
forge test --use 0.8.6 --fuzz-runs 16 &&
45-
forge test --use 0.8.7 --fuzz-runs 16 &&
46-
forge test --use 0.8.8 --fuzz-runs 16 &&
47-
forge test --use 0.8.9 --fuzz-runs 16 &&
48-
forge test --use 0.8.10 --fuzz-runs 16 &&
49-
forge test --use 0.8.11 --fuzz-runs 16 &&
50-
forge test --use 0.8.12 --fuzz-runs 16
51-
) ||
52-
( [ "${{ matrix.profile }}" = "solc-past-versions-1" ] &&
53-
forge test --use 0.8.13 --fuzz-runs 16 &&
54-
forge test --use 0.8.14 --fuzz-runs 16 &&
55-
forge test --use 0.8.15 --fuzz-runs 16 &&
56-
forge test --use 0.8.16 --fuzz-runs 16 &&
57-
forge test --use 0.8.17 --fuzz-runs 16 &&
58-
forge test --use 0.8.18 --fuzz-runs 16 &&
59-
forge test --use 0.8.19 --fuzz-runs 16 &&
60-
forge test --use 0.8.20 --fuzz-runs 16 &&
61-
forge test --use 0.8.21 --fuzz-runs 16 &&
62-
forge test --use 0.8.22 --fuzz-runs 16 &&
6349
forge test --use 0.8.23 --fuzz-runs 16 &&
6450
forge test --use 0.8.24 --fuzz-runs 16
6551
) ||
@@ -68,14 +54,11 @@ jobs:
6854
) ||
6955
( [ "${{ matrix.profile }}" = "min-solc" ] &&
7056
forge fmt --check &&
71-
forge test --use 0.8.4
57+
forge test --use 0.8.23
7258
) ||
7359
( [ "${{ matrix.profile }}" = "min-solc-via-ir" ] &&
74-
forge test --use 0.8.4 --via-ir
75-
) ||
76-
( [ "${{ matrix.profile }}" = "intense" ] &&
77-
forge test --fuzz-runs 5000
78-
)
60+
forge test --use 0.8.23 --via-ir
61+
)
7962
8063
codespell:
8164
runs-on: ${{ matrix.os }}
@@ -93,4 +76,4 @@ jobs:
9376
with:
9477
check_filenames: true
9578
ignore_words_list: usera
96-
skip: ./.git,package-lock.json,ackee-blockchain-solady-report.pdf,EIP712Mock.sol
79+
skip: ./.git,package-lock.json,ackee-blockchain-solady-report.pdf,EIP712Mock.sol,yarn.lock

foundry.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ libs = ["lib"]
55
bytecode_hash = "none"
66
cbor_metadata = false
77
optimize = true
8-
via-ir = true
8+
via-ir = false
99
runs = 1000
1010

1111
[profile.deploy]

src/Kernel.sol

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -336,18 +336,18 @@ contract Kernel is IAccount, IAccountExecute, IERC7579Account, ValidationManager
336336
_installHook(IHook(address(bytes20(initData[4:24]))), hookData);
337337
} else if (moduleType == MODULE_TYPE_HOOK) {
338338
// force call onInstall for hook
339-
// NOTE: for hook, kernel does not support independant hook install,
339+
// NOTE: for hook, kernel does not support independent hook install,
340340
// hook is expected to be paired with proper validator/executor/selector
341341
IHook(module).onInstall(initData);
342342
} else if (moduleType == MODULE_TYPE_POLICY) {
343343
// force call onInstall for policy
344-
// NOTE: for policy, kernel does not support independant policy install,
344+
// NOTE: for policy, kernel does not support independent policy install,
345345
// policy is expected to be paired with proper permissionId
346346
// to "ADD" permission, use "installValidations()" function
347347
IPolicy(module).onInstall(initData);
348348
} else if (moduleType == MODULE_TYPE_SIGNER) {
349349
// force call onInstall for signer
350-
// NOTE: for signer, kernel does not support independant signer install,
350+
// NOTE: for signer, kernel does not support independent signer install,
351351
// signer is expected to be paired with proper permissionId
352352
// to "ADD" permission, use "installValidations()" function
353353
ISigner(module).onInstall(initData);
@@ -400,7 +400,7 @@ contract Kernel is IAccount, IAccountExecute, IERC7579Account, ValidationManager
400400
_validationStorage().validationConfig[vId].hook = IHook(address(1));
401401
}
402402
// force call onInstall for hook
403-
// NOTE: for hook, kernel does not support independant hook install,
403+
// NOTE: for hook, kernel does not support independent hook install,
404404
// hook is expected to be paired with proper validator/executor/selector
405405
ModuleLib.uninstallModule(module, deInitData);
406406
} else if (moduleType == 5) {
@@ -412,7 +412,7 @@ contract Kernel is IAccount, IAccountExecute, IERC7579Account, ValidationManager
412412
}
413413
}
414414
// force call onInstall for policy
415-
// NOTE: for policy, kernel does not support independant policy install,
415+
// NOTE: for policy, kernel does not support independent policy install,
416416
// policy is expected to be paired with proper permissionId
417417
// to "REMOVE" permission, use "uninstallValidation()" function
418418
ModuleLib.uninstallModule(module, deInitData);
@@ -425,7 +425,7 @@ contract Kernel is IAccount, IAccountExecute, IERC7579Account, ValidationManager
425425
}
426426
}
427427
// force call onInstall for signer
428-
// NOTE: for signer, kernel does not support independant signer install,
428+
// NOTE: for signer, kernel does not support independent signer install,
429429
// signer is expected to be paired with proper permissionId
430430
// to "REMOVE" permission, use "uninstallValidation()" function
431431
ModuleLib.uninstallModule(module, deInitData);

src/interfaces/IERC7579Account.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ interface IERC7579Account {
5353

5454
/**
5555
* @dev installs a Module of a certain type on the smart account
56-
* @dev Implement Authorization control of your chosing
56+
* @dev Implement Authorization control of your choosing
5757
* @param moduleTypeId the module type ID according the ERC-7579 spec
5858
* @param module the module address
5959
* @param initData arbitrary data that may be required on the module during `onInstall`
@@ -63,7 +63,7 @@ interface IERC7579Account {
6363

6464
/**
6565
* @dev uninstalls a Module of a certain type on the smart account
66-
* @dev Implement Authorization control of your chosing
66+
* @dev Implement Authorization control of your choosing
6767
* @param moduleTypeId the module type ID according the ERC-7579 spec
6868
* @param module the module address
6969
* @param deInitData arbitrary data that may be required on the module during `onUninstall`
@@ -90,7 +90,7 @@ interface IERC7579Account {
9090
* thus may be necessary to query multiple module types
9191
* @param module the module address
9292
* @param additionalContext additional context data that the smart account may interpret to
93-
* identifiy conditions under which the module is installed.
93+
* identify conditions under which the module is installed.
9494
* usually this is not necessary, but for some special hooks that
9595
* are stored in mappings, this param might be needed
9696
*/

src/interfaces/IERC7579Modules.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ interface IValidator is IModule {
4545
/**
4646
* @dev Validates a transaction on behalf of the account.
4747
* This function is intended to be called by the MSA during the ERC-4337 validaton phase
48-
* Note: solely relying on bytes32 hash and signature is not suffcient for some
48+
* Note: solely relying on bytes32 hash and signature is not sufficient for some
4949
* validation implementations (i.e. SessionKeys often need access to userOp.calldata)
5050
* @param userOp The user operation to be validated. The userOp MUST NOT contain any metadata.
5151
* The MSA MUST clean up the userOp before sending it to the validator.

src/interfaces/IEntryPoint.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ interface IEntryPoint is IStakeManager, INonceManager {
9595
* A custom revert error of handleOps, to report a revert by account or paymaster.
9696
* @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).
9797
* @param reason - Revert reason. see FailedOp(uint256,string), above
98-
* @param inner - data from inner cought revert reason
98+
* @param inner - data from inner caught revert reason
9999
* @dev note that inner is truncated to 2048 bytes
100100
*/
101101
error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity ^0.8.0;
33

4-
import "src/Kernel.sol";
5-
import "src/factory/KernelFactory.sol";
6-
import "src/factory/FactoryStaker.sol";
4+
import "../Kernel.sol";
5+
import "../factory/KernelFactory.sol";
6+
import "../factory/FactoryStaker.sol";
77
import "forge-std/Test.sol";
8-
import "src/mock/MockValidator.sol";
9-
import "src/mock/MockPolicy.sol";
10-
import "src/mock/MockSigner.sol";
11-
import "src/mock/MockAction.sol";
12-
import "src/mock/MockHook.sol";
13-
import "src/mock/MockExecutor.sol";
14-
import "src/mock/MockFallback.sol";
15-
import "src/core/ValidationManager.sol";
16-
import "./erc4337Util.sol";
8+
import "../mock/MockValidator.sol";
9+
import "../mock/MockPolicy.sol";
10+
import "../mock/MockSigner.sol";
11+
import "../mock/MockAction.sol";
12+
import "../mock/MockHook.sol";
13+
import "../mock/MockExecutor.sol";
14+
import "../mock/MockFallback.sol";
15+
import "../core/ValidationManager.sol";
16+
import "./TestBase/erc4337Util.sol";
1717

1818
contract MockCallee {
1919
uint256 public value;

src/signer/MultiSignatureSigner.sol

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,25 @@ struct ECDSAValidatorStorage {
2323
contract MultiSignatureECDSASigner is SignerBase {
2424
mapping(address => uint256) public usedIds;
2525
mapping(bytes32 id => mapping(address wallet => address)) public signer;
26+
2627
event SignerRegistered(address indexed kernel, bytes32 indexed id, address indexed owner);
28+
2729
error NoSignerRegistered();
28-
30+
2931
function isInitialized(address wallet) external view override returns (bool) {
3032
return usedIds[wallet] > 0;
3133
}
3234

3335
function _signerOninstall(bytes32 id, bytes calldata _data) internal override {
34-
if(signer[id][msg.sender] == address(0)) {
36+
if (signer[id][msg.sender] == address(0)) {
3537
usedIds[msg.sender]++;
3638
}
3739
signer[id][msg.sender] = address(bytes20(_data[0:20]));
3840
emit SignerRegistered(msg.sender, id, address(bytes20(_data[0:20])));
3941
}
4042

4143
function _signerOnUninstall(bytes32 id, bytes calldata) internal override {
42-
if(signer[id][msg.sender] == address(0)) {
44+
if (signer[id][msg.sender] == address(0)) {
4345
revert NoSignerRegistered();
4446
}
4547
delete signer[id][msg.sender];

src/validator/WeightedECDSAValidator.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.0;
44

5-
import "src/types/Types.sol";
5+
import "../types/Types.sol";
66
import {ECDSA} from "solady/utils/ECDSA.sol";
77
import {EIP712} from "solady/utils/EIP712.sol";
88
import {PackedUserOperation} from "../interfaces/PackedUserOperation.sol";

test/ECDSAValidator.t.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
pragma solidity ^0.8.0;
22

3-
import {MockCallee, KernelTestBase} from "../src/sdk/testBase/KernelTestBase.sol";
43
import {ECDSAValidator} from "../src/validator/ECDSAValidator.sol";
4+
import {MockCallee, KernelTestBase} from "../src/sdk/KernelTestBase.sol";
55
import {ECDSA} from "solady/utils/ECDSA.sol";
6-
import {PackedUserOperation} from "src/interfaces/PackedUserOperation.sol";
6+
import {PackedUserOperation} from "../src/interfaces/PackedUserOperation.sol";
77
import {ValidatorLib} from "../src/utils/ValidationTypeLib.sol";
88
import {ExecLib} from "../src/utils/ExecLib.sol";
99
import {IHook} from "../src/interfaces/IERC7579Modules.sol";

0 commit comments

Comments
 (0)