diff options
author | Alex Browne <stephenalexbrowne@gmail.com> | 2018-10-25 09:34:20 +0800 |
---|---|---|
committer | Fred Carlsen <fred@sjelfull.no> | 2018-12-13 01:13:26 +0800 |
commit | f6ebdd1a3f7a387d099aae3c81b81c38c16c7caa (patch) | |
tree | 8a3b138dfbe418d1fedba083009e5b285507d974 /packages/pipeline/src/entities | |
parent | e2f222b08f0162fb067260bbbf1f58056b1badd7 (diff) | |
download | dexon-sol-tools-f6ebdd1a3f7a387d099aae3c81b81c38c16c7caa.tar dexon-sol-tools-f6ebdd1a3f7a387d099aae3c81b81c38c16c7caa.tar.gz dexon-sol-tools-f6ebdd1a3f7a387d099aae3c81b81c38c16c7caa.tar.bz2 dexon-sol-tools-f6ebdd1a3f7a387d099aae3c81b81c38c16c7caa.tar.lz dexon-sol-tools-f6ebdd1a3f7a387d099aae3c81b81c38c16c7caa.tar.xz dexon-sol-tools-f6ebdd1a3f7a387d099aae3c81b81c38c16c7caa.tar.zst dexon-sol-tools-f6ebdd1a3f7a387d099aae3c81b81c38c16c7caa.zip |
Implement fetching and parsing relayer info
Diffstat (limited to 'packages/pipeline/src/entities')
-rw-r--r-- | packages/pipeline/src/entities/Relayer.ts | 22 | ||||
-rw-r--r-- | packages/pipeline/src/entities/relayer.ts | 21 |
2 files changed, 33 insertions, 10 deletions
diff --git a/packages/pipeline/src/entities/Relayer.ts b/packages/pipeline/src/entities/Relayer.ts new file mode 100644 index 000000000..ebdcbf345 --- /dev/null +++ b/packages/pipeline/src/entities/Relayer.ts @@ -0,0 +1,22 @@ +import { Column, Entity, PrimaryColumn } from 'typeorm'; + +@Entity() +export class Relayer { + @PrimaryColumn() public name!: string; + + @Column() public url!: string; + @Column({ nullable: true, type: String }) + public sraHttpEndpoint!: string | null; + @Column({ nullable: true, type: String }) + public sraWsEndpoint!: string | null; + @Column({ nullable: true, type: String }) + public appUrl!: string | null; + + // TODO(albrow): Add exchange contract or protocol version? + // TODO(albrow): Add network ids for addresses? + + @Column({ type: 'varchar', array: true }) + public feeRecipientAddresses!: string[]; + @Column({ type: 'varchar', array: true }) + public takerAddresses!: string[]; +} diff --git a/packages/pipeline/src/entities/relayer.ts b/packages/pipeline/src/entities/relayer.ts index 5af8578b4..ebdcbf345 100644 --- a/packages/pipeline/src/entities/relayer.ts +++ b/packages/pipeline/src/entities/relayer.ts @@ -1,21 +1,22 @@ import { Column, Entity, PrimaryColumn } from 'typeorm'; -@Entity({ name: 'relayers', schema: 'raw' }) +@Entity() export class Relayer { - @PrimaryColumn() public uuid!: string; + @PrimaryColumn() public name!: string; - @Column() public name!: string; - @Column({ name: 'homepage_url', type: 'varchar' }) - public homepageUrl!: string; - @Column({ name: 'sra_http_endpoint', type: 'varchar', nullable: true }) + @Column() public url!: string; + @Column({ nullable: true, type: String }) public sraHttpEndpoint!: string | null; - @Column({ name: 'sra_ws_endpoint', type: 'varchar', nullable: true }) + @Column({ nullable: true, type: String }) public sraWsEndpoint!: string | null; - @Column({ name: 'app_url', type: 'varchar', nullable: true }) + @Column({ nullable: true, type: String }) public appUrl!: string | null; - @Column({ name: 'fee_recipient_addresses', type: 'varchar', array: true }) + // TODO(albrow): Add exchange contract or protocol version? + // TODO(albrow): Add network ids for addresses? + + @Column({ type: 'varchar', array: true }) public feeRecipientAddresses!: string[]; - @Column({ name: 'taker_addresses', type: 'varchar', array: true }) + @Column({ type: 'varchar', array: true }) public takerAddresses!: string[]; } |