aboutsummaryrefslogtreecommitdiffstats
path: root/packages/pipeline/src/entities
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-09-21 08:25:48 +0800
committerAlex Browne <stephenalexbrowne@gmail.com>2018-12-05 06:24:06 +0800
commit9e9104578c8526ff48ecdda8b87d61ccb3d66a2d (patch)
treea4c6b24b4fa778e82b5452e2ffc83f8f83629959 /packages/pipeline/src/entities
parent4e6919a6e58d76766098262664c78f92d888337d (diff)
downloaddexon-0x-contracts-9e9104578c8526ff48ecdda8b87d61ccb3d66a2d.tar.gz
dexon-0x-contracts-9e9104578c8526ff48ecdda8b87d61ccb3d66a2d.tar.zst
dexon-0x-contracts-9e9104578c8526ff48ecdda8b87d61ccb3d66a2d.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?
}