1.0.3 • Published 1 year ago

@plexswap/extended-root v1.0.3

Weekly downloads
-
License
GPL-2.0-or-later
Repository
-
Last release
1 year ago

PlexSwap Extended

This repository contains the core smart contracts for the PlexSwap Extended Protocol. For higher level contracts, see the extended-periphery repository.

Local deployment

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

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

Using solidity interfaces

The PlexSwap extended interfaces are available for import into solidity smart contracts via the npm artifact @plexswap/extended-root, e.g.:

import '@plexswap/extended-root/contracts/interfaces/IPlexExtendedPool.sol';

contract MyContract {
  IPlexExtendedPool pool;

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

1 year ago