aboutsummaryrefslogtreecommitdiffstats
path: root/packages/pipeline/src/entities/ExchangeFillEvent.ts
blob: 6e549af934e8dbe775e5ef1bd0b9561299f19e67 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { Column, Entity, PrimaryColumn } from 'typeorm';

import { AssetType } from '../types';

@Entity()
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 feeRecipientAddress!: string;
    @Column() public senderAddress!: string;
    @Column() public makerAssetFilledAmount!: string;
    @Column() public takerAssetFilledAmount!: string;
    @Column() public makerFeePaid!: string;
    @Column() public takerFeePaid!: string;
    @Column() public orderHash!: 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): Include topics?
}