This repository contains the core smart contracts for the PinkSwap V3 Protocol. For higher level contracts, see the v3-periphery repository.
In order to deploy this code to a local testnet, you should install the npm package
@pintswap3/v3-core
and import the factory bytecode located at
@pintswap3/v3-core/artifacts/contracts/PinkV3Factory.sol/PinkV3Factory.json
.
For example:
import {
abi as FACTORY_ABI,
bytecode as FACTORY_BYTECODE,
} from '@pintswap3/v3-core/artifacts/contracts/PinkV3Factory.sol/PinkV3Factory.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 PinkSwap code will correctly interoperate with your local deployment.
The PinkSwap v3 interfaces are available for import into solidity smart contracts
via the npm artifact @pintswap3/v3-core
, e.g.:
import '@pintswap3/v3-core/contracts/interfaces/IPinkV3Pool.sol';
contract MyContract {
IPinkV3Pool pool;
function doSomethingWithPool() {
// pool.swap(...);
}
}