Code Monkey home page Code Monkey logo

scw-contracts's Introduction

scw-contracts

Github Actions Foundry License: GPL-3.0

Overview

scw-contracts is a collection of modified Biconomy contracts used by Kwenta. Specifically, Kwenta required a modified version of the Session Validation Module to support Account Abstraction. The Session Validation Module is used to validate the details of a User Operation that defines an interaction between an actor and Kwenta's Smart Margin v2 or Smart Margin v3 system.

Contracts

tree src/

src/
├── SMv2SessionValidationModule.sol
├── SMv3SessionValidationModule.sol
├── biconomy
│   ├── BaseAuthorizationModule.sol
│   └── interfaces
│       ├── IAuthorizationModule.sol
│       ├── ISessionValidationModule.sol
│       ├── ISignatureValidator.sol
│       └── UserOperation.sol
├── kwenta
│   ├── smv2
│   │   └── IAccount.sol
│   └── smv3
│       ├── IERC7412.sol
│       └── IEngine.sol
└── openzeppelin
    └── ECDSA.sol

Tests

  1. Follow the Foundry guide to working on an existing project

  2. Build project

npm run compile
  1. Execute tests (requires rpc url(s) to be set in .env)
npm run test
  1. Run specific test

    OPTIMISM_SEPOLIA_RPC_URL can be replaced with OPTIMISM_RPC_URL if a mainnet fork is desired

forge test --fork-url $(grep OPTIMISM_SEPOLIA_RPC_URL .env | cut -d '=' -f2) --match-test TEST_NAME -vvv

Deployment Addresses

See deployments/ folder

  1. Optimism deployments found in deployments/Optimism.json
  2. Optimism Sepolia deployments found in deployments/OptimismSepolia.json
  3. Base deployments found in deployments/Base.json
  4. Base Sepolia deployments found in deployments/BaseSepolia.json

Audits

See audits/ folder

  1. Internal audits found in audits/internal/
  2. External audits found in audits/external/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.