# v3-core

> Core smart contracts of Sumswap V3

Latest version **1.0.1** (published 2021-09-24) · GPL-3.0-or-later license · 0 weekly downloads

## Install

```sh
npm install v3-core
pnpm add v3-core
yarn add v3-core
bun add v3-core
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2021-09-24 |
| First published | 2021-09-24 |
| Weekly downloads | 0 |
| License | GPL-3.0-or-later |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 1 |
| Unpacked size | 733.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Maintainers | dev.sumswap |
| Keywords | sumswap, core, v3 |

## Links

- npm: https://www.npmjs.com/package/v3-core
- Repository: https://github.com/sumswap/sumswap-v3-core
- Homepage: https://sumswap.org
- Issues: https://github.com/sumswap/sumswap-v3-core/issues
- npm.io page: https://npm.io/package/v3-core

## Dependencies (1)

- [tsdx](https://npm.io/package/tsdx.md) ^0.14.1

## Alternatives

- [pagerjs](https://npm.io/package/pagerjs.md) — 60 weekly downloads
- [whistle.savefor-mock](https://npm.io/package/whistle.savefor-mock.md) — 4 weekly downloads
- [@crvouga/mockingbird-service-junction](https://npm.io/package/@crvouga/mockingbird-service-junction.md) — 0 weekly downloads
- [@crvouga/mockingbird-service-medplum](https://npm.io/package/@crvouga/mockingbird-service-medplum.md) — 0 weekly downloads
- [@crvouga/mockingbird-service-genebygene](https://npm.io/package/@crvouga/mockingbird-service-genebygene.md) — 0 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2021-09-24
- 1.0.0 — 2021-09-24

## README

# SumSwap V3


This repository contains the core smart contracts for the SumSwap V3 Protocol.
For higher level contracts, see the [sumswap-v3-periphery](https://github.com/sumswap/sumswap-v3-periphery)
repository.

## Bug bounty

This repository is subject to the SumSwap V3 bug bounty program, per the terms defined [here](./bug-bounty.md).

## Local deployment

In order to deploy this code to a local testnet, you should install the npm package
`v3-core`
and import the factory bytecode located at
`v3-core/artifacts/contracts/mainContracts/SummaSwapV3Factory.sol/SummaSwapV3Factory.json`.
For example:

```typescript
import {
  abi as FACTORY_ABI,
  bytecode as FACTORY_BYTECODE,
} from 'v3-core/artifacts/contracts/mainContracts/SummaSwapV3Factory.sol/SummaSwapV3Factory.json'

// deploy the bytecode
```

This will ensure that you are testing against the same bytecode that is deployed to
mainnet and public testnets, and all SumSwap code will correctly interoperate with
your local deployment.

## Using solidity interfaces

The SumSwap v3 interfaces are available for import into solidity smart contracts
via the npm artifact `v3-core`, e.g.:

```solidity
import 'v3-core/contracts/interfaces/ISummaSwapV3Pool.sol';

contract MyContract {
  ISummaSwapV3Pool pool;

  function doSomethingWithPool() {
    // pool.swap(...);
  }
}

```

## Licensing

The primary license for SumSwap V3 Core is the Business Source License 3.0 (`GPL-3.0-or-later`), see [`LICENSE`](./LICENSE).

### Exceptions

- All files in `contracts/interfaces/` are licensed under `GPL-3.0-or-later` (as indicated in their SPDX headers), see [`contracts/interfaces/LICENSE`](./contracts/interfaces/LICENSE)
- Several files in `contracts/libraries/` are licensed under `GPL-3.0-or-later` (as indicated in their SPDX headers), see [`contracts/libraries/LICENSE_GPL`](contracts/libraries/LICENSE_GPL)
- `contracts/libraries/FullMath.sol` is licensed under `MIT` (as indicated in its SPDX header), see [`contracts/libraries/LICENSE_MIT`](contracts/libraries/LICENSE_MIT)
- All files in `contracts/test` remain unlicensed.

---
_Source: https://npm.io/package/v3-core · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
