Skip to content

Commit

Permalink
add changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Yijing authored and Yijing committed Jun 26, 2023
1 parent 5004d5b commit 5f8d937
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class CreateUniswapV3PoolCreatedEventTable1687800088000 implements Migrat
token0 VARCHAR NOT NULL,
token1 VARCHAR NOT NULL,
fee INTEGER NOT NULL,
tickSpacing INTEGER NOT NULL,
tick_spacing INTEGER NOT NULL,
pool VARCHAR NOT NULL,
PRIMARY KEY (transaction_hash, log_index)
);
Expand Down
6 changes: 1 addition & 5 deletions src/entities/uniswap_v3_pool_created_event.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import { BigNumber } from '@0x/utils';
import { Column, Entity } from 'typeorm';

import { Event } from './event';
import { bigNumberTransformer } from '../transformers';

// These events come directly from the Exchange contract and are fired whenever
// someone fills an order.
@Entity({ name: 'uniswap_v3_pool_created_events' })
export class UniswapV3PoolCreatedEvent extends Event {
// The address of token0
Expand All @@ -17,7 +13,7 @@ export class UniswapV3PoolCreatedEvent extends Event {
// The fee collected upon every swap in the pool, denominated in hundredths of a bip
@Column({ name: 'fee', type: 'integer' })
public fee!: number;
@Column({ name: 'tickSpacing', type: 'integer' })
@Column({ name: 'tick_spacing', type: 'integer' })
public tickSpacing!: number;
// The address of the pool
@Column({ name: 'pool', type: 'varchar' })
Expand Down
2 changes: 1 addition & 1 deletion src/parsers/events/uniswap_v3_events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function parseUniswapV3SwapEvent(eventLog: RawLogEntry): UniswapV3SwapEve
return uniswapV3SwapEvent;
}

export function parseUniswapV3PoolCreatedEvent(eventLog: RawLogEntry, protocol: string): UniswapV3PoolCreatedEvent {
export function parseUniswapV3PoolCreatedEvent(eventLog: RawLogEntry): UniswapV3PoolCreatedEvent {
const UniswapV3poolCreated = new UniswapV3PoolCreatedEvent();
parseEvent(eventLog, UniswapV3poolCreated);
const decodedLog = abiCoder.decodeLog(UNISWAP_V3_POOL_CREATED_ABI.inputs, eventLog.data, [
Expand Down

0 comments on commit 5f8d937

Please sign in to comment.