From 6fb333f2003a67277a7605332f146adb2758cdd0 Mon Sep 17 00:00:00 2001 From: Alex Browne Date: Thu, 8 Nov 2018 12:35:59 -0800 Subject: Rename Transaction.ts to transaction.ts Rename Relayer.ts to relayer.ts Rename Block.ts to block.ts --- packages/pipeline/src/entities/Block.ts | 10 ---------- packages/pipeline/src/entities/Relayer.ts | 23 ----------------------- packages/pipeline/src/entities/Transaction.ts | 16 ---------------- packages/pipeline/src/entities/block.ts | 10 ++++++++++ packages/pipeline/src/entities/relayer.ts | 23 +++++++++++++++++++++++ packages/pipeline/src/entities/transaction.ts | 16 ++++++++++++++++ 6 files changed, 49 insertions(+), 49 deletions(-) delete mode 100644 packages/pipeline/src/entities/Block.ts delete mode 100644 packages/pipeline/src/entities/Relayer.ts delete mode 100644 packages/pipeline/src/entities/Transaction.ts create mode 100644 packages/pipeline/src/entities/block.ts create mode 100644 packages/pipeline/src/entities/relayer.ts create mode 100644 packages/pipeline/src/entities/transaction.ts (limited to 'packages') diff --git a/packages/pipeline/src/entities/Block.ts b/packages/pipeline/src/entities/Block.ts deleted file mode 100644 index 5bd51f3d2..000000000 --- a/packages/pipeline/src/entities/Block.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Column, Entity, PrimaryColumn } from 'typeorm'; - -@Entity({ name: 'blocks' }) -export class Block { - @PrimaryColumn() public hash!: string; - @PrimaryColumn() public number!: number; - - @Column({ name: 'unix_timestamp_seconds' }) - public unixTimestampSeconds!: number; -} diff --git a/packages/pipeline/src/entities/Relayer.ts b/packages/pipeline/src/entities/Relayer.ts deleted file mode 100644 index 94b5232a8..000000000 --- a/packages/pipeline/src/entities/Relayer.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Column, Entity, PrimaryColumn } from 'typeorm'; - -@Entity({ name: 'relayers' }) -export class Relayer { - @PrimaryColumn() public uuid!: string; - - @Column() public name!: string; - @Column() public url!: string; - @Column({ nullable: true, type: String, name: 'sra_http_endpoint' }) - public sraHttpEndpoint!: string | null; - @Column({ nullable: true, type: String, name: 'sra_ws_endpoint' }) - public sraWsEndpoint!: string | null; - @Column({ nullable: true, type: String, name: 'app_url' }) - public appUrl!: string | null; - - // TODO(albrow): Add exchange contract or protocol version? - // TODO(albrow): Add network ids for addresses? - - @Column({ type: 'varchar', array: true, name: 'fee_recipient_addresses' }) - public feeRecipientAddresses!: string[]; - @Column({ type: 'varchar', array: true, name: 'taker_addresses' }) - public takerAddresses!: string[]; -} diff --git a/packages/pipeline/src/entities/Transaction.ts b/packages/pipeline/src/entities/Transaction.ts deleted file mode 100644 index eb2883fda..000000000 --- a/packages/pipeline/src/entities/Transaction.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Column, Entity, PrimaryColumn } from 'typeorm'; - -@Entity({ name: 'transactions' }) -export class Transaction { - @PrimaryColumn({ name: 'transaction_hash' }) - public transactionHash!: string; - @PrimaryColumn({ name: 'block_hash' }) - public blockHash!: string; - @PrimaryColumn({ name: 'block_number' }) - public blockNumber!: number; - - @Column({ type: 'bigint', name: 'gas_used' }) - public gasUsed!: number; - @Column({ type: 'bigint', name: 'gas_price' }) - public gasPrice!: number; -} diff --git a/packages/pipeline/src/entities/block.ts b/packages/pipeline/src/entities/block.ts new file mode 100644 index 000000000..5bd51f3d2 --- /dev/null +++ b/packages/pipeline/src/entities/block.ts @@ -0,0 +1,10 @@ +import { Column, Entity, PrimaryColumn } from 'typeorm'; + +@Entity({ name: 'blocks' }) +export class Block { + @PrimaryColumn() public hash!: string; + @PrimaryColumn() public number!: number; + + @Column({ name: 'unix_timestamp_seconds' }) + public unixTimestampSeconds!: number; +} diff --git a/packages/pipeline/src/entities/relayer.ts b/packages/pipeline/src/entities/relayer.ts new file mode 100644 index 000000000..94b5232a8 --- /dev/null +++ b/packages/pipeline/src/entities/relayer.ts @@ -0,0 +1,23 @@ +import { Column, Entity, PrimaryColumn } from 'typeorm'; + +@Entity({ name: 'relayers' }) +export class Relayer { + @PrimaryColumn() public uuid!: string; + + @Column() public name!: string; + @Column() public url!: string; + @Column({ nullable: true, type: String, name: 'sra_http_endpoint' }) + public sraHttpEndpoint!: string | null; + @Column({ nullable: true, type: String, name: 'sra_ws_endpoint' }) + public sraWsEndpoint!: string | null; + @Column({ nullable: true, type: String, name: 'app_url' }) + public appUrl!: string | null; + + // TODO(albrow): Add exchange contract or protocol version? + // TODO(albrow): Add network ids for addresses? + + @Column({ type: 'varchar', array: true, name: 'fee_recipient_addresses' }) + public feeRecipientAddresses!: string[]; + @Column({ type: 'varchar', array: true, name: 'taker_addresses' }) + public takerAddresses!: string[]; +} diff --git a/packages/pipeline/src/entities/transaction.ts b/packages/pipeline/src/entities/transaction.ts new file mode 100644 index 000000000..eb2883fda --- /dev/null +++ b/packages/pipeline/src/entities/transaction.ts @@ -0,0 +1,16 @@ +import { Column, Entity, PrimaryColumn } from 'typeorm'; + +@Entity({ name: 'transactions' }) +export class Transaction { + @PrimaryColumn({ name: 'transaction_hash' }) + public transactionHash!: string; + @PrimaryColumn({ name: 'block_hash' }) + public blockHash!: string; + @PrimaryColumn({ name: 'block_number' }) + public blockNumber!: number; + + @Column({ type: 'bigint', name: 'gas_used' }) + public gasUsed!: number; + @Column({ type: 'bigint', name: 'gas_price' }) + public gasPrice!: number; +} -- cgit v1.2.3