npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@owlprotocol/contracts-account-abstraction

v3.1.2

Published

ERC4337 Account Abstraction support for deploying relevant smart contracts and interacting with UserOps.

Downloads

20

Readme

Contracts Account Abstraction

ERC4337 Account Abstraction support for deploying relevant smart contracts and interacting with UserOps.

Contracts

Public Infrastructure Contracts

Public infrastructure contracts from eth-infinitism/account-abstraction that have no config or owner. Once deployed, these can be used by anyone.

  • EntryPoint: Core ERC4337 v0.7 Entrypoint for executing UserOps
  • SimpleAccountFactory: Simple factory for deploying user-owned smart accounts
  • EntryPointSimulations: Smart contract to simulate ERC4337 UserOps for gas estimation. Modified version from pimlicolabs/alto
  • PimlicoEntryPointSimulations: Additional util for ERC4337 UserOp gas estimation. Originally from pimlicolabs/alto but updated to support simpler deployment (the address of the EntryPointSimulations contract it uses is passed in the constructor instead of being deployed)

These contracts are deployed by the setupERC4337Contracts function.

Smart Account Contracts

These contracts contain the core logic for a user's "smart wallet". They are controlled by the user(s) or some more advanced logic.

  • SimpleAccount: A simple smart account implementation by eth-infinitism/account-abstraction which has an owner. Can call exec or execBatch to execute one or multiple transactions from the smart account. Uses simple personal_sign signatures over the UserOp.

Paymaster Contracts

These contracts sponsor the gas for UserOps. Instead of paying the bundler for the UserOp using the ether balance on the smart account, funds are pulled from the paymaster contract. Paymaster's often have an owner or some configuration to determine whether a UserOp is approved for sponsorship.

  • VerifyingPaymaster: A simple paymaster implementation by eth-infinitism/account-abstraction which has a verifyingSigner. All UserOps must be signed by the verifyingSigner with the signature being passed to the paymasterAndData field of the UserOp.

ERC4337 Utils

Many parts of the code are inspired from pimlico/alto but with certain changes such as removing OOP patterns, removing unecessary abstractions, and sticking to only providing utils and not a full bundler.

UserOperation

UserOperation defines the fields of a UserOp in the form of a simple developer-friendly abstraction. This is imported from pimlicolabs/permissionless.js but we also export a Hex encoded version for use cases in encoding/decoding.

PackedUserOperation

PackedUserOperation defines the fields of a UserOp that is encoded for use with smart contracts. In this situation, certain fields such as maxFeePerGas and maxPriorityFeePerGas get encoded in a packed gasFees field.

ExecutionResult

ExecutionResult defines the fields of the decoded output from estimating the execution of a UserOp.

TargetCallResult

TargetCallResult defines the fields of the decoded output from estimating the execution of specific call such as the exec function of the smart account. This estimation is used to get a more specific gas estimation of the portion of the UserOp that executes on the smart account.