watcher-ts/packages/uni-info-watcher/src/entity/Pool.ts
Ashwin Phatak aec9281fb8
Factory PoolCreated event handler (#120)
* Setup handler for PoolCreated event.

* Create Pool entity.

* Subscribe to uni-watcher for watching events.

* Refactor code to create GraphQLClient in ipld-eth-client.

Co-authored-by: nikugogoi <95nikass@gmail.com>
Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2021-07-06 16:55:11 +05:30

12 lines
232 B
TypeScript

import { Entity, PrimaryColumn, Column, Index } from 'typeorm';
@Entity()
@Index(['blockNumber', 'id'])
export class Pool {
@PrimaryColumn('varchar', { length: 42 })
id!: string;
@Column('numeric')
blockNumber!: number;
}