aboutsummaryrefslogtreecommitdiffstats
path: root/packages/pipeline/src/entities
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-10-19 08:44:48 +0800
committerFred Carlsen <fred@sjelfull.no>2018-12-13 01:12:43 +0800
commit1544e5ed9fc7946bac12a41e366a137dfe72414f (patch)
tree15e3cd93507a3c8b6b9664680ed01c8247d574cb /packages/pipeline/src/entities
parent4912affbe81876a00a90c4266f38b22b4018c05f (diff)
downloaddexon-sol-tools-1544e5ed9fc7946bac12a41e366a137dfe72414f.tar
dexon-sol-tools-1544e5ed9fc7946bac12a41e366a137dfe72414f.tar.gz
dexon-sol-tools-1544e5ed9fc7946bac12a41e366a137dfe72414f.tar.bz2
dexon-sol-tools-1544e5ed9fc7946bac12a41e366a137dfe72414f.tar.lz
dexon-sol-tools-1544e5ed9fc7946bac12a41e366a137dfe72414f.tar.xz
dexon-sol-tools-1544e5ed9fc7946bac12a41e366a137dfe72414f.tar.zst
dexon-sol-tools-1544e5ed9fc7946bac12a41e366a137dfe72414f.zip
Update script to work with existing v1 pipeline data
Diffstat (limited to 'packages/pipeline/src/entities')
-rw-r--r--packages/pipeline/src/entities/ExchangeCancelEvent.ts5
-rw-r--r--packages/pipeline/src/entities/ExchangeCancelUpToEvent.ts5
-rw-r--r--packages/pipeline/src/entities/ExchangeFillEvent.ts7
-rw-r--r--packages/pipeline/src/entities/SraOrder.ts4
4 files changed, 12 insertions, 9 deletions
diff --git a/packages/pipeline/src/entities/ExchangeCancelEvent.ts b/packages/pipeline/src/entities/ExchangeCancelEvent.ts
index 7010ab9f2..698b9e2ec 100644
--- a/packages/pipeline/src/entities/ExchangeCancelEvent.ts
+++ b/packages/pipeline/src/entities/ExchangeCancelEvent.ts
@@ -1,15 +1,16 @@
-import { BaseEntity, Column, Entity, PrimaryColumn } from 'typeorm';
+import { Column, Entity, PrimaryColumn } from 'typeorm';
import { AssetType } from '../types';
@Entity()
-export class ExchangeCancelEvent extends BaseEntity {
+export class ExchangeCancelEvent {
@PrimaryColumn() public contractAddress!: string;
@PrimaryColumn() public logIndex!: number;
@PrimaryColumn() public blockNumber!: number;
@Column() public rawData!: string;
+ // TODO(albrow): Include transaction hash
@Column() public makerAddress!: string;
@Column({ nullable: true, type: String })
public takerAddress!: string;
diff --git a/packages/pipeline/src/entities/ExchangeCancelUpToEvent.ts b/packages/pipeline/src/entities/ExchangeCancelUpToEvent.ts
index 03a02b069..3ca75ccf7 100644
--- a/packages/pipeline/src/entities/ExchangeCancelUpToEvent.ts
+++ b/packages/pipeline/src/entities/ExchangeCancelUpToEvent.ts
@@ -1,11 +1,12 @@
-import { BaseEntity, Column, Entity, PrimaryColumn } from 'typeorm';
+import { Column, Entity, PrimaryColumn } from 'typeorm';
@Entity()
-export class ExchangeCancelUpToEvent extends BaseEntity {
+export class ExchangeCancelUpToEvent {
@PrimaryColumn() public contractAddress!: string;
@PrimaryColumn() public logIndex!: number;
@PrimaryColumn() public blockNumber!: number;
+ // TODO(albrow): Include transaction hash
@Column() public rawData!: string;
@Column() public makerAddress!: string;
diff --git a/packages/pipeline/src/entities/ExchangeFillEvent.ts b/packages/pipeline/src/entities/ExchangeFillEvent.ts
index 5eafa7449..6e549af93 100644
--- a/packages/pipeline/src/entities/ExchangeFillEvent.ts
+++ b/packages/pipeline/src/entities/ExchangeFillEvent.ts
@@ -1,18 +1,19 @@
-import { BaseEntity, Column, Entity, PrimaryColumn } from 'typeorm';
+import { Column, Entity, PrimaryColumn } from 'typeorm';
import { AssetType } from '../types';
@Entity()
-export class ExchangeFillEvent extends BaseEntity {
+export class ExchangeFillEvent {
@PrimaryColumn() public contractAddress!: string;
@PrimaryColumn() public logIndex!: number;
@PrimaryColumn() public blockNumber!: number;
@Column() public rawData!: string;
+ @Column() public transactionHash!: string;
@Column() public makerAddress!: string;
@Column() public takerAddress!: string;
- @Column() public feeRecepientAddress!: string;
+ @Column() public feeRecipientAddress!: string;
@Column() public senderAddress!: string;
@Column() public makerAssetFilledAmount!: string;
@Column() public takerAssetFilledAmount!: string;
diff --git a/packages/pipeline/src/entities/SraOrder.ts b/packages/pipeline/src/entities/SraOrder.ts
index e4987df57..a22f7c4e5 100644
--- a/packages/pipeline/src/entities/SraOrder.ts
+++ b/packages/pipeline/src/entities/SraOrder.ts
@@ -1,9 +1,9 @@
-import { BaseEntity, Column, Entity, PrimaryColumn } from 'typeorm';
+import { Column, Entity, PrimaryColumn } from 'typeorm';
import { AssetType } from '../types';
@Entity()
-export class SraOrder extends BaseEntity {
+export class SraOrder {
@PrimaryColumn() public exchangeAddress!: string;
@PrimaryColumn() public orderHashHex!: string;