🥞 Core smart contracts of CryptoSwap V3
npm install @cryptoswap2/v3-core@cryptoswap2/v3-core
@cryptoswap2/v3-core/artifacts/contracts/CryptoV3Factory.sol/CryptoV3Factory.json.
typescript
import {
abi as FACTORY_ABI,
bytecode as FACTORY_BYTECODE,
} from '@cryptoswap2/v3-core/artifacts/contracts/CryptoV3Factory.sol/CryptoV3Factory.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 CryptoSwap code will correctly interoperate with
your local deployment.
Using solidity interfaces
The CryptoSwap v3 interfaces are available for import into solidity smart contracts
via the npm artifact @cryptoswap2/v3-core, e.g.:
`solidity
import '@cryptoswap2/v3-core/contracts/interfaces/ICryptoV3Pool.sol';
contract MyContract {
ICryptoV3Pool pool;
function doSomethingWithPool() {
// pool.swap(...);
}
}
``