Setting Up Your Contract
Last updated
contract PairFlash is IAlgebraFlashCallback, PeripheryPayments { ISwapRouter public immutable swapRouter; constructor(
ISwapRouter _swapRouter,
address _factory,
address _WMATIC9,
address _poolDeployer
) PeripheryImmutableState(_factory, _WMATIC9, _poolDeployer) {
swapRouter = _swapRouter;
}pragma solidity =0.8.20;
import '@cryptoalgebra/integral-core/contracts/interfaces/callback/IAlgebraFlashCallback.sol';
import '@cryptoalgebra/integral-periphery/contracts/base/PeripheryPayments.sol';
import '@cryptoalgebra/integral-periphery/contracts/base/PeripheryImmutableState.sol';
import '@cryptoalgebra/integral-periphery/contracts/libraries/PoolAddress.sol';
import '@cryptoalgebra/integral-periphery/contracts/libraries/CallbackValidation.sol';
import '@cryptoalgebra/integral-periphery/contracts/libraries/TransferHelper.sol';
import '@cryptoalgebra/integral-periphery/contracts/interfaces/ISwapRouter.sol';
contract PairFlash is IAlgebraFlashCallback, PeripheryPayments {
ISwapRouter public immutable swapRouter;
constructor(
ISwapRouter _swapRouter,
address _factory,
address _WMATIC9,
address _poolDeployer
) PeripheryImmutableState(_factory, _WMATIC9, _poolDeployer) {
swapRouter = _swapRouter;
}