diff options
author | Alex Browne <stephenalexbrowne@gmail.com> | 2018-10-24 07:03:52 +0800 |
---|---|---|
committer | Fred Carlsen <fred@sjelfull.no> | 2018-12-13 01:13:11 +0800 |
commit | e2f222b08f0162fb067260bbbf1f58056b1badd7 (patch) | |
tree | a13a8cbc2379d0c83ed3e2b8af71554742e1323b /packages/pipeline/src/entities/block.ts | |
parent | 50924d62cba02cf74e58ce7f1efbabfa29fb5710 (diff) | |
download | dexon-sol-tools-e2f222b08f0162fb067260bbbf1f58056b1badd7.tar dexon-sol-tools-e2f222b08f0162fb067260bbbf1f58056b1badd7.tar.gz dexon-sol-tools-e2f222b08f0162fb067260bbbf1f58056b1badd7.tar.bz2 dexon-sol-tools-e2f222b08f0162fb067260bbbf1f58056b1badd7.tar.lz dexon-sol-tools-e2f222b08f0162fb067260bbbf1f58056b1badd7.tar.xz dexon-sol-tools-e2f222b08f0162fb067260bbbf1f58056b1badd7.tar.zst dexon-sol-tools-e2f222b08f0162fb067260bbbf1f58056b1badd7.zip |
Implement support for getting and parsing blocks and transactions
Diffstat (limited to 'packages/pipeline/src/entities/block.ts')
-rw-r--r-- | packages/pipeline/src/entities/block.ts | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/packages/pipeline/src/entities/block.ts b/packages/pipeline/src/entities/block.ts index 398946622..49e0ef840 100644 --- a/packages/pipeline/src/entities/block.ts +++ b/packages/pipeline/src/entities/block.ts @@ -1,13 +1,9 @@ import { Column, Entity, PrimaryColumn } from 'typeorm'; -import { numberToBigIntTransformer } from '../utils'; - -@Entity({ name: 'blocks', schema: 'raw' }) +@Entity() export class Block { @PrimaryColumn() public hash!: string; - @PrimaryColumn({ transformer: numberToBigIntTransformer }) - public number!: number; + @PrimaryColumn() public number!: number; - @Column({ name: 'timestamp', transformer: numberToBigIntTransformer }) - public timestamp!: number; + @Column() public unixTimestampSeconds!: number; } |