aboutsummaryrefslogtreecommitdiffstats
path: root/packages/pipeline/src/entities
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-11-09 03:38:37 +0800
committerFred Carlsen <fred@sjelfull.no>2018-12-13 01:15:10 +0800
commitf5f01c0c3e37c56136e7f8fb699304baa7eb5bf6 (patch)
treec90e37572716d98207cfeef744ac94324ba0752e /packages/pipeline/src/entities
parent99d90bb66558bf24c9eaed9a4da19b99ebd7e3b1 (diff)
downloaddexon-sol-tools-f5f01c0c3e37c56136e7f8fb699304baa7eb5bf6.tar
dexon-sol-tools-f5f01c0c3e37c56136e7f8fb699304baa7eb5bf6.tar.gz
dexon-sol-tools-f5f01c0c3e37c56136e7f8fb699304baa7eb5bf6.tar.bz2
dexon-sol-tools-f5f01c0c3e37c56136e7f8fb699304baa7eb5bf6.tar.lz
dexon-sol-tools-f5f01c0c3e37c56136e7f8fb699304baa7eb5bf6.tar.xz
dexon-sol-tools-f5f01c0c3e37c56136e7f8fb699304baa7eb5bf6.tar.zst
dexon-sol-tools-f5f01c0c3e37c56136e7f8fb699304baa7eb5bf6.zip
Add better error handling for immediately invoked async functions
Diffstat (limited to 'packages/pipeline/src/entities')
-rw-r--r--packages/pipeline/src/entities/block.ts5
-rw-r--r--packages/pipeline/src/entities/relayer.ts12
-rw-r--r--packages/pipeline/src/entities/transaction.ts15
3 files changed, 18 insertions, 14 deletions
diff --git a/packages/pipeline/src/entities/block.ts b/packages/pipeline/src/entities/block.ts
index 49e0ef840..5bd51f3d2 100644
--- a/packages/pipeline/src/entities/block.ts
+++ b/packages/pipeline/src/entities/block.ts
@@ -1,9 +1,10 @@
import { Column, Entity, PrimaryColumn } from 'typeorm';
-@Entity()
+@Entity({ name: 'blocks' })
export class Block {
@PrimaryColumn() public hash!: string;
@PrimaryColumn() public number!: number;
- @Column() public unixTimestampSeconds!: 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
index 605355fa8..94b5232a8 100644
--- a/packages/pipeline/src/entities/relayer.ts
+++ b/packages/pipeline/src/entities/relayer.ts
@@ -1,23 +1,23 @@
import { Column, Entity, PrimaryColumn } from 'typeorm';
-@Entity()
+@Entity({ name: 'relayers' })
export class Relayer {
@PrimaryColumn() public uuid!: string;
@Column() public name!: string;
@Column() public url!: string;
- @Column({ nullable: true, type: String })
+ @Column({ nullable: true, type: String, name: 'sra_http_endpoint' })
public sraHttpEndpoint!: string | null;
- @Column({ nullable: true, type: String })
+ @Column({ nullable: true, type: String, name: 'sra_ws_endpoint' })
public sraWsEndpoint!: string | null;
- @Column({ nullable: true, type: String })
+ @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 })
+ @Column({ type: 'varchar', array: true, name: 'fee_recipient_addresses' })
public feeRecipientAddresses!: string[];
- @Column({ type: 'varchar', array: true })
+ @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
index 8a68da813..eb2883fda 100644
--- a/packages/pipeline/src/entities/transaction.ts
+++ b/packages/pipeline/src/entities/transaction.ts
@@ -1,13 +1,16 @@
import { Column, Entity, PrimaryColumn } from 'typeorm';
-@Entity()
+@Entity({ name: 'transactions' })
export class Transaction {
- @PrimaryColumn() public transactionHash!: string;
- @PrimaryColumn() public blockHash!: string;
- @PrimaryColumn() public blockNumber!: number;
+ @PrimaryColumn({ name: 'transaction_hash' })
+ public transactionHash!: string;
+ @PrimaryColumn({ name: 'block_hash' })
+ public blockHash!: string;
+ @PrimaryColumn({ name: 'block_number' })
+ public blockNumber!: number;
- @Column({ type: 'bigint' })
+ @Column({ type: 'bigint', name: 'gas_used' })
public gasUsed!: number;
- @Column({ type: 'bigint' })
+ @Column({ type: 'bigint', name: 'gas_price' })
public gasPrice!: number;
}