diff --git a/src/dex/uniswap-v3/forks/velodrome-slipstream/velodrome-slipstream-factory.ts b/src/dex/uniswap-v3/forks/velodrome-slipstream/velodrome-slipstream-factory.ts index 30a1bad6a..9621ef7f5 100644 --- a/src/dex/uniswap-v3/forks/velodrome-slipstream/velodrome-slipstream-factory.ts +++ b/src/dex/uniswap-v3/forks/velodrome-slipstream/velodrome-slipstream-factory.ts @@ -1,11 +1,28 @@ -import { UniswapV3Factory } from '../../uniswap-v3-factory'; +import { + OnPoolCreatedCallback, + UniswapV3Factory, +} from '../../uniswap-v3-factory'; import { LogDescription } from 'ethers/lib/utils'; import { Interface } from '@ethersproject/abi'; import FactoryABI from '../../../../abi/velodrome-slipstream/VelodromeSlipstreamFactory.abi.json'; +import { IDexHelper } from '../../../../dex-helper'; +import { Address, Logger } from '../../../../types'; export class VelodromeSlipstreamFactory extends UniswapV3Factory { public readonly factoryIface = new Interface(FactoryABI); + constructor( + readonly dexHelper: IDexHelper, + parentName: string, + protected readonly factoryAddress: Address, + logger: Logger, + protected readonly onPoolCreated: OnPoolCreatedCallback, + mapKey: string = '', + ) { + super(dexHelper, parentName, factoryAddress, logger, onPoolCreated, mapKey); + this.handlers['PoolCreated'] = this.handleNewPool.bind(this); + } + async handleNewPool(event: LogDescription) { this.logger.info(`handle new pool event ${JSON.stringify(event)}`); const token0 = event.args.token0.toLowerCase();