@forbitswapq/v3-core

1.0.2 • Public • Published

forbitswap V2

Lint Tests

This repository contains the core smart contracts for the forbitswap V2 Protocol. For higher level contracts, see the forbitswap-v2-periphery repository.

Local Development

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

import {
  abi as FACTORY_ABI,
  bytecode as FACTORY_BYTECODE,
} from '@forbitswap/v2-core/artifacts/contracts/forbitswapV2Factory.sol/forbitswapV2Factory.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 Uniswap code will correctly interoperate with your local deployment.

Using solidity interfaces

The forbitswap v2 interfaces are available for import into solidity smart contracts via the npm artifact @forbitswap/v2-core, e.g.:

import '@forbitswap/v2-core/contracts/interfaces/IforbitswapV2Pool.sol';

contract MyContract {
  IforbitswapV2Pool pool;

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

Readme

Keywords

none

Package Sidebar

Install

npm i @forbitswapq/v3-core

Weekly Downloads

0

Version

1.0.2

License

BUSL-1.1

Unpacked Size

384 kB

Total Files

46

Last publish

Collaborators

  • shayha