1.0.0 • Published 2 years ago

@trebodex/trebodex-periphery v1.0.0

Weekly downloads
-
License
GPL-2.0-or-later
Repository
github
Last release
2 years ago

Peripheral smart contracts

This repository contains the periphery smart contracts. Based on Uniswap V3.

Local deployment

In order to deploy this code to a local testnet, you should install the npm package @trebodex/trebodex-periphery and import bytecode imported from artifacts located at @trebodex/trebodex-periphery/artifacts/contracts/*/*.json. For example:

import {
  abi as ROUTER_ABI,
  bytecode as ROUTER_BYTECODE,
} from '@trebodex/trebodex-periphery/artifacts/contracts/TrebodexRouter.sol/TrebodexRouter.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 code will correctly interoperate with your local deployment.

Using solidity interfaces

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

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

contract MyContract {
  ISwapRouter router;

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