Skip to content

Latest commit

Β 

History

1,494 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Biconomy License MIT Hardhat Foundry

Codecov Hardhat Coverage Codecov Foundry Coverage

Nexus - ERC-7579 Modular Smart Account Base πŸš€

Open in GitHub Codespaces

This repository serves as a comprehensive foundation for smart contract projects, streamlining the development process with a focus on best practices, security, and efficiency.

Documentation: (https://github.com/bcnmy/nexus/wiki)

πŸ“š Table of Contents

Getting Started

To kickstart, follow these steps:

Prerequisites

Installation

  1. Clone the repository:
git clone https://github.com/bcnmy/nexus.git
cd nexus
  1. Install dependencies:
yarn install

Unfortunately, one of the dependencies does not populate the package.json file. That prevents hardhat from building the project successfully, while Foundry builds just fine.

So you may want to add this package.json manually. After doing yarn install, you can do:

cd node_modules/prep
touch package.json

then add the following content to the package.json file:

{
  "name": "prep",
  "version": "0.0.0",
  "private": true,
  "dependencies": {}
}

πŸ› οΈ Essential Scripts

Execute key operations for Foundry and Hardhat with these scripts. Append :forge or :hardhat to run them in the respective environment.

πŸ—οΈ Build Contracts

yarn build

Compiles contracts for both Foundry and Hardhat.

πŸ§ͺ Run Tests

yarn test

Carries out tests to verify contract functionality.

β›½ Gas Report

yarn test:gas

Creates detailed reports for test coverage.

πŸ“Š Coverage Report

yarn coverage

Creates detailed reports for test coverage.

πŸ“„ Documentation

yarn docs

Generate documentation from NatSpec comments.

πŸš€ Deploy Contracts

Nexus contracts are pre-deployed on most EVM chains. Please see the addresses here.

If you need to deploy Nexus on your own chain or you want to deploy the contracts with different addresses, please see this script. Or the same script on different deploy branches.

🎨 Lint Code

yarn lint

Checks code for style and potential errors.

πŸ–ŒοΈ Auto-fix Linting Issues

yarn lint:fix

Automatically fixes linting problems found.

πŸš€ Generating Storage Layout

yarn check

To generate reports of the storage layout for potential upgrades safety using hardhat-storage-layout.

πŸ”„ Add :forge or :hardhat to any script above to target only Foundry or Hardhat environment, respectively.

πŸ”’ Security Audits

Auditor Date Final Report Link
CodeHawks-Cyfrin 17-09-2024 View Report
Spearbit 10/11-2024 View Report / View Add-on
Zenith 03-2025 View Report
Pashov 03-2025 View Report

Before you fork or self-deploy

main contains a fix for a disclosed issue affecting classic (non-7702) accounts that hold funds before they are deployed. Build from main at or after commit 272c408; earlier commits and tags do not contain it. Accounts already deployed on chain were never exposed, and EIP-7702 and Fusion flows are unaffected.

The full description, including which versions are affected and what to do if you already deployed from an earlier commit, is in SECURITY.md.

License

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

Connect with Biconomy 🍊

Website Telegram Twitter LinkedIn Discord YouTube GitHub

About

Nexus by Biconomy: ERC-7579 Modular Smart Account for Enhanced Account Abstraction

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

58 stars

Watchers

6 watching

Forks

Releases

Packages

Used by

Contributors

Languages