Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: reduce solc version #9

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion src/Simulator.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;
pragma solidity ^0.8.0;

import {
PackedUserOperation,
Expand All @@ -7,7 +7,7 @@
IEntryPointSimulationsV060,
UserOperation,
UserOperationDetails,
IStakeManager

Check warning on line 10 in src/Simulator.sol

View workflow job for this annotation

GitHub Actions / lint / forge-lint

imported name IStakeManager is not used
} from "./lib/ERC4337.sol";
import { VmSafe } from "forge-std/Vm.sol";
import {
Expand All @@ -19,7 +19,7 @@
stopMappingRecording,
stopAndReturnDebugTraceRecording,
revertToState,
expectRevert

Check warning on line 22 in src/Simulator.sol

View workflow job for this annotation

GitHub Actions / lint / forge-lint

imported name expectRevert is not used
} from "./lib/Vm.sol";
import { ERC4337SpecsParser } from "./SpecsParser.sol";

Expand Down Expand Up @@ -120,7 +120,7 @@
// selector (4 bytes) + length(32 bytes) + preOpGas(32 bytes)
// + prefund (32 bytes) + sigFailed (32 bytes)
uint256 pos = 4 + 32 + 32 + 32;
assembly {

Check warning on line 123 in src/Simulator.sol

View workflow job for this annotation

GitHub Actions / lint / forge-lint

Avoid to use inline assembly. It is acceptable only in rare cases
sigFailed := mload(add(reason, pos))
}
}
Expand Down Expand Up @@ -148,7 +148,7 @@

// Store the snapshot id so that it can be reverted to after simulation
bytes32 snapShotSlot = keccak256(abi.encodePacked("Simulator.SnapshotId"));
assembly {

Check warning on line 151 in src/Simulator.sol

View workflow job for this annotation

GitHub Actions / lint / forge-lint

Avoid to use inline assembly. It is acceptable only in rare cases
sstore(snapShotSlot, snapShotId)
}

Expand Down Expand Up @@ -178,7 +178,7 @@
// Get the snapshot id
uint256 snapShotId;
bytes32 snapShotSlot = keccak256(abi.encodePacked("Simulator.SnapshotId"));
assembly {

Check warning on line 181 in src/Simulator.sol

View workflow job for this annotation

GitHub Actions / lint / forge-lint

Avoid to use inline assembly. It is acceptable only in rare cases
snapShotId := sload(snapShotSlot)
}

Expand Down
2 changes: 1 addition & 1 deletion src/SpecsParser.sol
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;
pragma solidity ^0.8.0;

import {
IEntryPoint,

Check warning on line 5 in src/SpecsParser.sol

View workflow job for this annotation

GitHub Actions / lint / forge-lint

imported name IEntryPoint is not used
IEntryPointSimulations,

Check warning on line 6 in src/SpecsParser.sol

View workflow job for this annotation

GitHub Actions / lint / forge-lint

imported name IEntryPointSimulations is not used
IStakeManager,
UserOperationDetails
} from "./lib/ERC4337.sol";
Expand All @@ -18,9 +18,9 @@
*/
library ERC4337SpecsParser {
// Minimum stake delay
uint256 constant MIN_UNSTAKE_DELAY = 1 days;

Check warning on line 21 in src/SpecsParser.sol

View workflow job for this annotation

GitHub Actions / lint / forge-lint

Explicitly mark visibility of state
// Minimum stake value
uint256 constant MIN_STAKE_VALUE = 0.5 ether;

Check warning on line 23 in src/SpecsParser.sol

View workflow job for this annotation

GitHub Actions / lint / forge-lint

Explicitly mark visibility of state

// Emitted if an invalid storage location is accessed
error InvalidStorageLocation(
Expand Down Expand Up @@ -224,7 +224,7 @@
}

// Update the filtered debug steps lengths
assembly {

Check warning on line 227 in src/SpecsParser.sol

View workflow job for this annotation

GitHub Actions / lint / forge-lint

Avoid to use inline assembly. It is acceptable only in rare cases
mstore(filteredUserOpSteps, filteredUserOpStepsLength)
mstore(filteredPaymasterUserOpSteps, filteredPaymasterUserOpStepsLength)
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/ERC4337.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;
pragma solidity ^0.8.0;

// ERC-4337 v0.7 imports
import { PackedUserOperation } from "account-abstraction/interfaces/PackedUserOperation.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Vm.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;
pragma solidity ^0.8.0;

import { Vm, VmSafe } from "forge-std/Vm.sol";

Expand Down
2 changes: 1 addition & 1 deletion test/Simulator.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;
pragma solidity ^0.8.0;

import { TestBaseUtil, PackedUserOperation } from "test/utils/TestBaseUtil.sol";
import { MockValidator } from "test/utils/MockValidator.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/SimulatorV060.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;
pragma solidity ^0.8.0;

import { TestBaseUtil, UserOperation } from "test/utils/TestBaseUtilV060.sol";
import { MockValidator } from "test/utils/MockValidator.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/specs-parser/EntryPoint.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;
pragma solidity ^0.8.0;

import { TestBaseUtil } from "test/utils/TestBaseUtil.sol";
import { TargetValidator } from "test/specs-parser/mocks/TargetValidator.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/specs-parser/Opcodes.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;
pragma solidity ^0.8.0;

import { TestBaseUtil } from "test/utils/TestBaseUtil.sol";
import { ERC4337SpecsParser } from "src/SpecsParser.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/specs-parser/Precompile.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;
pragma solidity ^0.8.0;

import { TestBaseUtil } from "test/utils/TestBaseUtil.sol";
import { TargetValidator } from "test/specs-parser/mocks/TargetValidator.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/specs-parser/Storage.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;
pragma solidity ^0.8.0;

import { TestBaseUtil } from "test/utils/TestBaseUtil.sol";
import { StorageValidator } from "test/specs-parser/mocks/StorageValidator.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/specs-parser/mocks/OpcodeValidator.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;
pragma solidity ^0.8.0;

import { PackedUserOperation, UserOperation } from "src/lib/ERC4337.sol";
import { IValidator } from "test/utils/IValidator.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/specs-parser/mocks/StorageValidator.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;
pragma solidity ^0.8.0;

import { PackedUserOperation, UserOperation } from "src/lib/ERC4337.sol";
import { IValidator } from "test/utils/IValidator.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/specs-parser/mocks/TargetValidator.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;
pragma solidity ^0.8.0;

import { PackedUserOperation, UserOperation } from "src/lib/ERC4337.sol";

Expand Down
2 changes: 1 addition & 1 deletion test/utils/IValidator.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;
pragma solidity ^0.8.0;

import { PackedUserOperation, UserOperation } from "src/lib/ERC4337.sol";

Expand Down
2 changes: 1 addition & 1 deletion test/utils/MockAccount.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;
pragma solidity ^0.8.0;

import { PackedUserOperation, UserOperation } from "src/lib/ERC4337.sol";
import { IValidator } from "./IValidator.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/utils/MockFactory.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;
pragma solidity ^0.8.0;

import { LibClone } from "solady/src/utils/LibClone.sol";

Expand Down
2 changes: 1 addition & 1 deletion test/utils/MockTargetAccount.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;
pragma solidity ^0.8.0;

import { PackedUserOperation, UserOperation } from "src/lib/ERC4337.sol";

Expand Down
2 changes: 1 addition & 1 deletion test/utils/MockValidator.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;
pragma solidity ^0.8.0;

import { PackedUserOperation, UserOperation } from "src/lib/ERC4337.sol";
import { IValidator } from "test/utils/IValidator.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/utils/TestBaseUtil.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;
pragma solidity ^0.8.0;

import "forge-std/Test.sol";
import { MockAccount } from "./MockAccount.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/utils/TestBaseUtilV060.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;
pragma solidity ^0.8.0;

import "forge-std/Test.sol";
import { MockAccount } from "./MockAccount.sol";
Expand Down