Skip to content

Commit

Permalink
Use ReentrancyGuardTransient in the EntryPoint
Browse files Browse the repository at this point in the history
  • Loading branch information
forshtat committed Dec 17, 2024
1 parent e273e44 commit 9480889
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
4 changes: 2 additions & 2 deletions contracts/core/EntryPoint.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ import "./NonceManager.sol";
import "./UserOperationLib.sol";

import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuardTransient.sol";

/*
* Account-Abstraction (EIP-4337) singleton EntryPoint implementation.
* Only one instance required on each chain.
*/

/// @custom:security-contact https://bounty.ethereum.org
contract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuard, ERC165 {
contract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuardTransient, ERC165 {

using UserOperationLib for PackedUserOperation;

Expand Down
2 changes: 1 addition & 1 deletion contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"url": "https://github.com/eth-infinitism/account-abstraction/issues"
},
"dependencies": {
"@openzeppelin/contracts": "^5.0.0",
"@openzeppelin/contracts": "^5.1.0",
"@uniswap/v3-periphery": "^1.4.3"
}
}
12 changes: 7 additions & 5 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,14 @@ const optimizedComilerSettings = {

const config: HardhatUserConfig = {
solidity: {
compilers: [{
version: '0.8.28',
settings: {
optimizer: { enabled: true, runs: 1000000 }
version: '0.8.28',
settings: {
evmVersion: `cancun`,
optimizer: {
enabled: true,
runs: 1000000
}
}],
},
overrides: {
'contracts/core/EntryPoint.sol': optimizedComilerSettings,
'contracts/samples/SimpleAccount.sol': optimizedComilerSettings
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
},
"dependencies": {
"@nomiclabs/hardhat-etherscan": "^2.1.6",
"@openzeppelin/contracts": "^5.0.0",
"@openzeppelin/contracts": "^5.1.0",
"@thehubbleproject/bls": "^0.5.1",
"@typechain/hardhat": "^2.3.0",
"@types/debug": "^4.1.12",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -806,10 +806,10 @@
resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-3.4.2-solc-0.7.tgz#38f4dbab672631034076ccdf2f3201fab1726635"
integrity sha512-W6QmqgkADuFcTLzHL8vVoNBtkwjvQRpYIAom7KiUNoLKghyx3FgH0GBjt8NRvigV1ZmMOBllvE1By1C+bi8WpA==

"@openzeppelin/contracts@^5.0.0":
version "5.0.0"
resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-5.0.0.tgz#ee0e4b4564f101a5c4ee398cd4d73c0bd92b289c"
integrity sha512-bv2sdS6LKqVVMLI5+zqnNrNU/CA+6z6CmwFXm/MzmOPBRSO5reEJN7z0Gbzvs0/bv/MZZXNklubpwy3v2+azsw==
"@openzeppelin/contracts@^5.1.0":
version "5.1.0"
resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-5.1.0.tgz#4e61162f2a2bf414c4e10c45eca98ce5f1aadbd4"
integrity sha512-p1ULhl7BXzjjbha5aqst+QMLY+4/LCWADXOCsmLHRM77AqiPjnd9vvUN9sosUfhL9JGKpZ0TjEGxgvnizmWGSA==

"@resolver-engine/core@^0.3.3":
version "0.3.3"
Expand Down

0 comments on commit 9480889

Please sign in to comment.