
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
@rhinestone/erc4337-validation
Advanced tools
A library to validate the ERC-4337 rules within Foundry
A library to validate the ERC-4337 rules within Foundry
This library allows you to validate:
*CALLsEXT* opcodesCREATE opcodeIt also supports both v0.6 and v0.7 of ERC-4337.
This library is in active development and is subject to breaking changes. If you spot a bug, please take out an issue and we will fix it as soon as we can.
forge install rhinestonewtf/erc4337-validation
pnpm i @rhinestone/erc4337-validation
To use this library, simply import the Simulator and set it up as follows:
contract Example {
using Simulator for PackedUserOperation; // or UserOperation
function verify(PackedUserOperation memory userOp) external view {
// Verify the ERC-4337 rules
userOp.simulateUserOp(entryPointAddress);
}
}
If the userOp breaks any of the rules, the function will revert with a message indicating which rule was broken.
Note that the entryPointAddress needs to be the address of the EntryPointSimulations contract if you are using v0.7 of ERC-4337. For an example see the Simulator test, the Simulator test v0.6 and the relevant test bases.
To install the dependencies, run:
pnpm install
To build the project, run:
forge build
To run the tests, run:
forge test
For feature or change requests, feel free to open a PR, start a discussion or get in touch with us.
FAQs
A library to validate the ERC-4337 rules within Foundry
The npm package @rhinestone/erc4337-validation receives a total of 1,009 weekly downloads. As such, @rhinestone/erc4337-validation popularity was classified as popular.
We found that @rhinestone/erc4337-validation demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.