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

octo-defi-core-contracts

v0.0.1

Published

Core contracts for the octo-wallet!

Downloads

6

Readme

OctoWallet Project

Welcome to the OctoWallet project! This project implements a highly modular smart contract wallet utilizing the ERC-4337 and ERC-2535 standards. The key components of this project are the OctoWallet, OctoWalletFactory, and SmartContractWalletFacet contracts.

Table of Contents

Introduction

The OctoWallet project aims to create a customizable and extensible smart contract wallet. By leveraging the ERC-4337 and ERC-2535 standards, this project provides a flexible architecture that allows users to tailor their wallet's functionality according to their needs.

Standards

  • ERC-4337: This standard introduces account abstraction, enabling the creation of smart contract wallets with enhanced capabilities.
  • ERC-2535: Known as the Diamond Standard, it allows for modular smart contracts where functionalities can be added or removed by integrating or removing facets.

Contracts

OctoWallet

The OctoWallet contract is the core of the wallet system. It implements the Diamond Standard (ERC-2535) to allow modularity and uses ERC-4337 for account abstraction.

OctoWalletFactory

The OctoWalletFactory contract is responsible for creating instances of the OctoWallet. It uses the Create2 opcode for deterministic address generation, ensuring that the same wallet can be recreated with the same parameters.

SmartContractWalletFacet

The SmartContractWalletFacet contract provides the core functionalities of the wallet. It includes functions for executing transactions, batch operations, and more. This facet can be extended or replaced to add new features to the wallet.

Installation

To get started with the OctoWallet project, you'll need to have Node.js and Hardhat installed.

  1. Clone the repository:

    git clone https://github.com/your-repo/octowallet.git
    cd octowallet
  2. Install the dependencies:

    npm install

Usage

You can interact with the OctoWallet contracts using Hardhat. Below are some basic commands:

  • Compile the contracts:

    npx hardhat compile
  • Deploy the contracts:

    npx hardhat run scripts/deploy.js
  • Run tests:

    npx hardhat test

Deployment

To deploy the OctoWallet contracts, follow these steps:

  1. Update the deployment script scripts/deploy.js with the necessary parameters.

  2. Run the deployment script:

    npx hardhat run scripts/deploy.js --network <network-name>

Replace <network-name> with the name of the network you want to deploy to (e.g., localhost, rinkeby, mainnet).

Testing

The project includes a suite of tests to ensure the functionality of the contracts. To run the tests, execute:

npx hardhat test

The tests are located in the test directory and cover various scenarios for the OctoWallet, OctoWalletFactory, and SmartContractWalletFacet contracts.

Contributing

We welcome contributions to the OctoWallet project! If you have suggestions for improvements or find any issues, please feel free to open an issue or submit a pull request.

License

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


Thank you for using the OctoWallet project! If you have any questions or need further assistance, please don't hesitate to reach out.