Skip to content

dragonswap-app/v2-core

Repository files navigation

Dragonswap V2

Lint Tests Fuzz Testing

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

Local deployment

In order to deploy this code to a local testnet, you should clone this repository and import the factory bytecode located at ./artifacts/contracts/DragonswapV2Factory.sol/DragonswapV2Factory.json. For example:

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

Using solidity interfaces

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

import '@dragonswap/v2-core/contracts/interfaces/IDragonswapV2Pool.sol';

contract MyContract {
  IDragonswapV2Pool pool;

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

About

Dragonswap V2 Core Smart-Contracts Repository

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors