@kwenta/quanto-dimensions

1.1.3 • Public • Published

Quanto Dimensions

Github Actions Foundry License: GPL-3.0

This library is designed to provide units/dimension user defined types for quanto perpetual smart contracts.

Contracts

src
├── Int128
│   ├── BaseInt128
│   │   ├── Interactions.sol
│   │   └── ValueType.sol
│   ├── BaseQuantoPerUSDInt128
│   │   ├── Interactions.sol
│   │   └── ValueType.sol
│   ├── QuantoInt128
│   │   ├── Interactions.sol
│   │   └── ValueType.sol
│   ├── USDInt128
│   │   ├── Interactions.sol
│   │   └── ValueType.sol
│   ├── USDPerBaseInt128
│   │   ├── Interactions.sol
│   │   └── ValueType.sol
│   └── USDPerQuantoInt128
│       ├── Interactions.sol
│       └── ValueType.sol
├── Int256
│   ├── BaseInt256
│   │   ├── Interactions.sol
│   │   └── ValueType.sol
│   ├── BaseQuantoPerUSDInt256
│   │   ├── Interactions.sol
│   │   └── ValueType.sol
│   ├── QuantoInt256
│   │   ├── Interactions.sol
│   │   └── ValueType.sol
│   ├── USDInt256
│   │   ├── Interactions.sol
│   │   └── ValueType.sol
│   ├── USDPerBaseInt256
│   │   ├── Interactions.sol
│   │   └── ValueType.sol
│   └── USDPerQuantoInt256
│       ├── Interactions.sol
│       └── ValueType.sol
├── Uint128
│   ├── BaseQuantoPerUSDUint128
│   │   ├── Interactions.sol
│   │   └── ValueType.sol
│   ├── BaseUint128
│   │   ├── Interactions.sol
│   │   └── ValueType.sol
│   ├── QuantoUint128
│   │   ├── Interactions.sol
│   │   └── ValueType.sol
│   ├── USDPerBaseUint128
│   │   ├── Interactions.sol
│   │   └── ValueType.sol
│   ├── USDPerQuantoUint128
│   │   ├── Interactions.sol
│   │   └── ValueType.sol
│   └── USDUint128
│       ├── Interactions.sol
│       └── ValueType.sol
├── Uint256
│   ├── BaseQuantoPerUSDUint256
│   │   ├── Interactions.sol
│   │   └── ValueType.sol
│   ├── BaseUint256
│   │   ├── Interactions.sol
│   │   └── ValueType.sol
│   ├── QuantoUint256
│   │   ├── Interactions.sol
│   │   └── ValueType.sol
│   ├── USDPerBaseUint256
│   │   ├── Interactions.sol
│   │   └── ValueType.sol
│   ├── USDPerQuantoUint256
│   │   ├── Interactions.sol
│   │   └── ValueType.sol
│   └── USDUint256
│       ├── Interactions.sol
│       └── ValueType.sol
├── UnitTypes.sol
└── utils
    ├── DecimalMath.sol
    ├── SafeCast
    │   ├── SafeCastAddress.sol
    │   ├── SafeCastBytes32.sol
    │   ├── SafeCastI128.sol
    │   ├── SafeCastI24.sol
    │   ├── SafeCastI256.sol
    │   ├── SafeCastI32.sol
    │   ├── SafeCastI56.sol
    │   ├── SafeCastI64.sol
    │   ├── SafeCastU128.sol
    │   ├── SafeCastU160.sol
    │   ├── SafeCastU256.sol
    │   ├── SafeCastU32.sol
    │   ├── SafeCastU56.sol
    │   └── SafeCastU64.sol
    └── SafeCast.sol

Tests

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

  2. Build project

npm run compile
  1. Execute tests
npm run test
  1. Run specific test
forge test --match-test TEST_NAME -vv

/@kwenta/quanto-dimensions/

    Package Sidebar

    Install

    npm i @kwenta/quanto-dimensions

    Weekly Downloads

    65

    Version

    1.1.3

    License

    GPL-3.0-or-later

    Unpacked Size

    1.36 MB

    Total Files

    125

    Last publish

    Collaborators

    • tommyrharper
    • kwentadao
    • aclarke
    • insuline
    • jaredborders
    • jchiaramonte