mirror of
https://github.com/cerc-io/watcher-ts
synced 2025-04-16 04:01:15 +00:00
* 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>
12 lines
232 B
TypeScript
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;
|
|
}
|