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.
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
-
Build project
npm run compile
- Execute tests (requires rpc url(s) to be set in
.env
)
npm run test
- Run specific test
OPTIMISM_SEPOLIA_RPC_URL
can be replaced withOPTIMISM_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
See
deployments/
folder
- Optimism deployments found in
deployments/Optimism.json
- Optimism Sepolia deployments found in
deployments/OptimismSepolia.json
- Base deployments found in
deployments/Base.json
- Base Sepolia deployments found in
deployments/BaseSepolia.json
See
audits/
folder
- Internal audits found in
audits/internal/
- External audits found in
audits/external/