aboutsummaryrefslogtreecommitdiffstats
path: root/packages/pipeline/src/entities
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-09-27 07:42:48 +0800
committerAlex Browne <stephenalexbrowne@gmail.com>2018-12-05 06:24:06 +0800
commit9ab55ccec0478e65f9d605aa2da7ed1fa13e01ac (patch)
tree85afc226768cf0d2c0568b2db263b950831e7032 /packages/pipeline/src/entities
parent71a015f2aa32fedd3d3c5e9d5a3fa4eb272b2852 (diff)
downloaddexon-sol-tools-9ab55ccec0478e65f9d605aa2da7ed1fa13e01ac.tar
dexon-sol-tools-9ab55ccec0478e65f9d605aa2da7ed1fa13e01ac.tar.gz
dexon-sol-tools-9ab55ccec0478e65f9d605aa2da7ed1fa13e01ac.tar.bz2
dexon-sol-tools-9ab55ccec0478e65f9d605aa2da7ed1fa13e01ac.tar.lz
dexon-sol-tools-9ab55ccec0478e65f9d605aa2da7ed1fa13e01ac.tar.xz
dexon-sol-tools-9ab55ccec0478e65f9d605aa2da7ed1fa13e01ac.tar.zst
dexon-sol-tools-9ab55ccec0478e65f9d605aa2da7ed1fa13e01ac.zip
Add preliminary support for scraping orders from SRA endpoints (no pagination, only RR support for now)
Diffstat (limited to 'packages/pipeline/src/entities')
-rw-r--r--packages/pipeline/src/entities/ExchangeCancelEvent.ts2
-rw-r--r--packages/pipeline/src/entities/ExchangeFillEvent.ts2
-rw-r--r--packages/pipeline/src/entities/SraOrder.ts40
3 files changed, 44 insertions, 0 deletions
diff --git a/packages/pipeline/src/entities/ExchangeCancelEvent.ts b/packages/pipeline/src/entities/ExchangeCancelEvent.ts
index d0188c2f5..7010ab9f2 100644
--- a/packages/pipeline/src/entities/ExchangeCancelEvent.ts
+++ b/packages/pipeline/src/entities/ExchangeCancelEvent.ts
@@ -16,6 +16,7 @@ export class ExchangeCancelEvent extends BaseEntity {
@Column() public feeRecepientAddress!: string;
@Column() public senderAddress!: string;
@Column() public orderHash!: string;
+
@Column() public rawMakerAssetData!: string;
@Column() public makerAssetType!: AssetType;
@Column() public makerAssetProxyId!: string;
@@ -28,5 +29,6 @@ export class ExchangeCancelEvent extends BaseEntity {
@Column() public takerTokenAddress!: string;
@Column({ nullable: true, type: String })
public takerTokenId!: string | null;
+
// TODO(albrow): Include topics?
}
diff --git a/packages/pipeline/src/entities/ExchangeFillEvent.ts b/packages/pipeline/src/entities/ExchangeFillEvent.ts
index abd73191a..5eafa7449 100644
--- a/packages/pipeline/src/entities/ExchangeFillEvent.ts
+++ b/packages/pipeline/src/entities/ExchangeFillEvent.ts
@@ -19,6 +19,7 @@ export class ExchangeFillEvent extends BaseEntity {
@Column() public makerFeePaid!: string;
@Column() public takerFeePaid!: string;
@Column() public orderHash!: string;
+
@Column() public rawMakerAssetData!: string;
@Column() public makerAssetType!: AssetType;
@Column() public makerAssetProxyId!: string;
@@ -31,5 +32,6 @@ export class ExchangeFillEvent extends BaseEntity {
@Column() public takerTokenAddress!: string;
@Column({ nullable: true, type: String })
public takerTokenId!: string | null;
+
// TODO(albrow): Include topics?
}
diff --git a/packages/pipeline/src/entities/SraOrder.ts b/packages/pipeline/src/entities/SraOrder.ts
new file mode 100644
index 000000000..c9a1f926d
--- /dev/null
+++ b/packages/pipeline/src/entities/SraOrder.ts
@@ -0,0 +1,40 @@
+import { BaseEntity, Column, Entity, PrimaryColumn } from 'typeorm';
+
+import { AssetType } from '../types';
+
+@Entity()
+export class SraOrder extends BaseEntity {
+ @PrimaryColumn() public exchangeAddress!: string;
+ @PrimaryColumn() public orderHashHex!: string;
+
+ @Column() public lastUpdatedTimestamp!: number;
+ @Column() public firstSeenTimestamp!: number;
+
+ @Column() public makerAddress!: string;
+ @Column() public takerAddress!: string;
+ @Column() public feeRecipientAddress!: string;
+ @Column() public senderAddress!: string;
+ @Column() public makerAssetAmount!: string;
+ @Column() public takerAssetAmount!: string;
+ @Column() public makerFee!: string;
+ @Column() public takerFee!: string;
+ @Column() public expirationTimeSeconds!: string;
+ @Column() public salt!: string;
+ @Column() public signature!: string;
+
+ @Column() public rawMakerAssetData!: string;
+ @Column() public makerAssetType!: AssetType;
+ @Column() public makerAssetProxyId!: string;
+ @Column() public makerTokenAddress!: string;
+ @Column({ nullable: true, type: String })
+ public makerTokenId!: string | null;
+ @Column() public rawTakerAssetData!: string;
+ @Column() public takerAssetType!: AssetType;
+ @Column() public takerAssetProxyId!: string;
+ @Column() public takerTokenAddress!: string;
+ @Column({ nullable: true, type: String })
+ public takerTokenId!: string | null;
+
+ // TODO(albrow): Make this optional?
+ @Column() public metaDataJson!: string;
+}