aboutsummaryrefslogtreecommitdiffstats
path: root/packages/pipeline/src/entities
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-09-21 08:25:48 +0800
committerFred Carlsen <fred@sjelfull.no>2018-12-06 19:04:24 +0800
commit0133bec07d84c5b73d17a5b9fd0ab1c2ded88f8c (patch)
tree63e06020c3cfa9e7b772b784e780324afc31d8e7 /packages/pipeline/src/entities
parentbd7bde9bb02a4d51f3a65e255262caf5f5072cd4 (diff)
downloaddexon-sol-tools-0133bec07d84c5b73d17a5b9fd0ab1c2ded88f8c.tar.gz
dexon-sol-tools-0133bec07d84c5b73d17a5b9fd0ab1c2ded88f8c.tar.zst
dexon-sol-tools-0133bec07d84c5b73d17a5b9fd0ab1c2ded88f8c.zip
Add support for decoding asset data
Diffstat (limited to 'packages/pipeline/src/entities')
-rw-r--r--packages/pipeline/src/entities/ExchangeFillEvent.ts17
1 files changed, 14 insertions, 3 deletions
diff --git a/packages/pipeline/src/entities/ExchangeFillEvent.ts b/packages/pipeline/src/entities/ExchangeFillEvent.ts
index 1e9e8d986..1716c60d1 100644
--- a/packages/pipeline/src/entities/ExchangeFillEvent.ts
+++ b/packages/pipeline/src/entities/ExchangeFillEvent.ts
@@ -1,5 +1,7 @@
import { Column, Entity, PrimaryColumn } from 'typeorm';
+export type ExchangeFillEventAssetType = 'erc20' | 'erc721';
+
@Entity()
export class ExchangeFillEvent {
@PrimaryColumn() public logIndex!: number;
@@ -17,8 +19,17 @@ export class ExchangeFillEvent {
@Column() public makerFeePaid!: string;
@Column() public takerFeePaid!: string;
@Column() public orderHash!: string;
- // TODO(albrow): Decode asset data.
- @Column() public makerAssetData!: string;
- @Column() public takerAssetData!: string;
+ @Column() public rawMakerAssetData!: string;
+ @Column() public makerAssetType!: ExchangeFillEventAssetType;
+ @Column() public makerAssetProxyId!: string;
+ @Column() public makerTokenAddress!: string;
+ @Column({ nullable: true, type: String })
+ public makerTokenId!: string | null;
+ @Column() public rawTakerAssetData!: string;
+ @Column() public takerAssetType!: ExchangeFillEventAssetType;
+ @Column() public takerAssetProxyId!: string;
+ @Column() public takerTokenAddress!: string;
+ @Column({ nullable: true, type: String })
+ public takerTokenId!: string | null;
// TODO(albrow): Include topics?
}