Skip to content

dragonswap-app/v2-periphery

Repository files navigation

Dragonswap v2 Periphery

Tests Lint

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

Links

Local deployment

In order to deploy this code to a local testnet, you should clone this repository and import bytecode imported from artifacts located at ./artifacts/contracts/**/*.json. For example:

import {
  abi as SWAP_ROUTER_ABI,
  bytecode as SWAP_ROUTER_BYTECODE,
} from './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 Dragonswap code will correctly interoperate with your local deployment.

Using solidity interfaces

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

import '@dragonswap/v2-periphery/contracts/interfaces/ISwapRouter.sol';

contract MyContract {
  ISwapRouter router;

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

About

Dragonswap V2 Periphery Smart-Contracts Repository

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published