Skip to content

Repository files navigation

Kwenta Margin Manager

Contracts to manage account abstractions and features on top of the Synthetix Futures Platform. This will support future implementations of cross margin, limit orders, stop orders (TBD), copy trading (TBD).

The repo is a mix of Hardhat & Foundry. Hardhat will be used for integration testing and deployment. Foundry will be used for unit testing and fuzz testing.

Folder Structure

├── ...
├── contracts               # Source contracts
├── scripts                 # Hardhat deployment scripts
├── test                    # Test files (alternatively `spec` or `tests`)
│   ├── contracts           # Unit tests, fuzz tests using Foundry
│   └── integration         # End-to-end, integration tests using Hardhat
└── ...

Testing

Running Foundry tests

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

  2. Build project

forge build
  1. Execute tests
npm run foundry-test

Running hardhat tests

  1. Install all NPM packages
npm install
  1. Build project
npx hardhat compile
  1. Execute integration tests
npm run hh-test:integration

About

An abstraction layer for Futures (V1) accounts to enable cross margin, advanced orders, and copy trading.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages