@plexswap/extended-root
v1.0.3
Published
🥞 Core smart contracts of Plexswap Extended
Downloads
8
Readme
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(...);
}
}