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

@biconomy-devx/account-contracts-v2

v2.0.3

Published

Smart Contract Wallet (SCW) contracts for Biconomy SDK. Enables Account Abstraction, Smart Account, ERC4337, and ERC6900 functionalities.

Downloads

3,528

Readme

Solidity Hardhat Foundry Test Coverage

Biconomy Smart Account: Leading Implementation of Account Abstraction 🌐

Biconomy Smart Account is a smart contract wallet focused on implementing Account Abstraction. It builds on the core concepts of Gnosis and Argent safes and is compliant with ERC-4337 and ERC-6900.

📜 Smart Contracts

  • BaseSmartAccount.sol: An abstract contract implementing the EIP4337 IWallet interface.
  • Proxy.sol: A lightweight proxy upgradeable through the UUPS pattern.
  • SmartAccountFactory.sol: This factory contract manages the deployment of Smart Account (Account Abstraction).
  • SmartAccount.sol: The primary implementation contract for a Smart Account (Account Abstraction).
  • EntryPoint.sol: Implements the EIP4337 Entry Point contract.
  • StakeManager.sol: A stake manager for wallet and paymaster deposits/stakes.
  • Executor.sol: A helper contract facilitating calls and delegate calls to dapp contracts.
  • FallbackManager.sol: Manages a fallback handler for delegate calls.
  • ModuleManager.sol: Adopts the Gnosis Safe module manager pattern.
  • DefaultCallbackHandler.sol: Handles hooks to respond to token receipts.
  • MultiSend.sol & MultiSendCallOnly.sol: Facilitates batching multiple transactions into one.

🛠️ Prerequisites

  • Node.js
  • Yarn or npm
  • Hardhat

🚀 How to Run the Project

Before diving in, place a mnemonic in a .secret file at the root. Remember: Never commit this file or share it publicly.

Setup

Setup: Clone the repository and install dependencies.

git clone https://github.com/bcnmy/scw-contracts.git
cd scw-contracts
npm install

Configuration: Create a .secret file at the root to store your mnemonic. Note: Never commit this file. shell echo "your mnemonic here" > .secret

🛠️ Development Commands

Below are the commands you can use for various tasks:

🧪 Testing

Note if there are issues with submodules

to init or update submodules git submodule update --remote git submodule update --init

you can alternatively also run forge install.

Run regular tests:

npx hardhat test

For Bundler Integration Tests, first install realpath:

brew install coreutils

Then, run the Bundler Integration Tests:

yarn bundler-test

📦 Compilation & Deployment

Compile contracts:

npx hardhat compile

Clean the environment:

npx hardhat clean

Start a local Ethereum node:

npx hardhat node

Deploy contracts:

npx hardhat run scripts/deploy.ts
TS_NODE_FILES=true npx ts-node scripts/deploy.ts

📈 Analysis & Reporting

Display available accounts:

npx hardhat accounts

Get help on Hardhat commands:

npx hardhat help

Test with gas report:

REPORT_GAS=true npx hardhat test

Generate code coverage report:

npx hardhat coverage

🧹 Code Quality & Formatting

Lint JavaScript and TypeScript files:

npx eslint '**/*.{js,ts}'

Automatically fix linting issues:

npx eslint '**/*.{js,ts}' --fix

Check formatting for JSON, Solidity, and Markdown files:

npx prettier '**/*.{json,sol,md}' --check

Automatically format files:

npx prettier '**/*.{json,sol,md}' --write

Lint Solidity contracts:

npx solhint 'contracts/**/*.sol'

Automatically fix issues in Solidity contracts:

npx solhint 'contracts/**/*.sol' --fix

This format separates the description from the command, making it clearer and more readable.

🔍 Etherscan Verification

To verify on Etherscan, deploy a contract to an Ethereum network supported by Etherscan, like Ropsten. Set up your .env file, deploy your contract, and then verify:

hardhat run --network goerli scripts/deploy.ts
npx hardhat verify --network goerli DEPLOYED_CONTRACT_ADDRESS "Hello, Hardhat!"

⚡ Performance Optimizations

Boost your tests and scripts' speed by setting the TS_NODE_TRANSPILE_ONLY environment variable to 1 in Hardhat's environment. More details are available in the documentation.


📋 Audit Reports

We have had our contracts audited by reputable firms to ensure their security. You can find the reports in the audits folder.

🤝 Contributing

Biconomy Smart Account is an open-source project. Contributions are welcome. If you're interested in contributing, please check our contribution guidelines and feel free to submit pull requests or raise issues.

📜 License

This project is licensed under the MIT License. See the LICENSE.md file for details.