# @bonsaiswapv3/periphery

> 🎚 Peripheral smart contracts for interacting with Bonsaiswap V3

Latest version **2.0.3** (published 2023-02-21) · GPL-2.0-or-later license · 0 weekly downloads

## Install

```sh
npm install @bonsaiswapv3/periphery
pnpm add @bonsaiswapv3/periphery
yarn add @bonsaiswapv3/periphery
bun add @bonsaiswapv3/periphery
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.3 |
| Published | 2023-02-21 |
| First published | 2022-12-12 |
| Weekly downloads | 0 |
| License | GPL-2.0-or-later |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10 |
| Dependencies | 5 |
| Unpacked size | 683.7 KB |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | alcanal |
| Keywords | bonsaiswap, periphery, v3 |

## Links

- npm: https://www.npmjs.com/package/@bonsaiswapv3/periphery
- npm.io page: https://npm.io/package/@bonsaiswapv3/periphery

## Dependencies (5)

- [base64-sol](https://npm.io/package/base64-sol.md) 1.0.1
- [@uniswap/lib](https://npm.io/package/@uniswap/lib.md) ^4.0.1-alpha
- [@bonsaiswapv2/core](https://npm.io/package/@bonsaiswapv2/core.md) 2.0.2
- [@bonsaiswapv3/core](https://npm.io/package/@bonsaiswapv3/core.md) 2.0.1
- [@openzeppelin/contracts](https://npm.io/package/@openzeppelin/contracts.md) 3.4.2-solc-0.7

## Recent versions

- 2.0.3 (latest) — 2023-02-21
- 2.0.2 — 2023-02-21
- 2.0.1 — 2023-02-09
- 2.0.0 — 2022-12-12

## README

# Bonsaiswap V3 Periphery

This repository contains the periphery smart contracts for the Bonsaiswap V3 Protocol.

## Bug bounty

This repository is subject to the Bonsaiswap 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
`@bonsaiswapv3/periphery`
and import bytecode imported from artifacts located at
`@bonsaiswapv3/periphery/artifacts/contracts/*/*.json`.
For example:

```typescript
import {
  abi as SWAP_ROUTER_ABI,
  bytecode as SWAP_ROUTER_BYTECODE,
} from '@bonsaiswapv3/periphery/artifacts/contracts/SwapRouter.sol/SwapRouter.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 Bonsaiswap code will correctly interoperate with
your local deployment.

## Using solidity interfaces

The Bonsaiswap v3 periphery interfaces are available for import into solidity smart contracts
via the npm artifact `@bonsaiswapv3/periphery`, e.g.:

```solidity
import '@bonsaiswapv3/periphery/contracts/interfaces/ISwapRouter.sol';

contract MyContract {
  ISwapRouter router;

  function doSomethingWithSwapRouter() {
    // router.exactInput(...);
  }
}

```

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