Skip to content

Commit

Permalink
add fix for factory
Browse files Browse the repository at this point in the history
  • Loading branch information
aburkut committed May 20, 2024
1 parent f5723a4 commit b5670a4
Showing 1 changed file with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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();
Expand Down

0 comments on commit b5670a4

Please sign in to comment.