davidadachi / kwenta-scw-contracts

a collection of modified Biconomy contracts used by Kwenta.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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_GOERLI_RPC_URL can be replaced with OPTIMISM_RPC_URL if a mainnet fork is desired

forge test --fork-url $(grep OPTIMISM_GOERLI_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 Goerli deployments found in deployments/OptimismGoerli.json
  3. Base deployments found in deployments/Base.json
  4. Base Goerli deployments found in deployments/BaseGoerli.json

Audits

See audits/ folder

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

About

a collection of modified Biconomy contracts used by Kwenta.

License:GNU General Public License v3.0


Languages

Language:Solidity 99.9%Language:Makefile 0.1%Language:Nix 0.0%