aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-11-08 07:29:34 +0800
committerFred Carlsen <fred@sjelfull.no>2018-12-13 01:13:46 +0800
commit0a69752d20e8d6ba4c1016c57a79a31c07675231 (patch)
tree3770ba960e7902f2573fb50fa16a3f81e162bbe5
parentf6ebdd1a3f7a387d099aae3c81b81c38c16c7caa (diff)
downloaddexon-sol-tools-0a69752d20e8d6ba4c1016c57a79a31c07675231.tar
dexon-sol-tools-0a69752d20e8d6ba4c1016c57a79a31c07675231.tar.gz
dexon-sol-tools-0a69752d20e8d6ba4c1016c57a79a31c07675231.tar.bz2
dexon-sol-tools-0a69752d20e8d6ba4c1016c57a79a31c07675231.tar.lz
dexon-sol-tools-0a69752d20e8d6ba4c1016c57a79a31c07675231.tar.xz
dexon-sol-tools-0a69752d20e8d6ba4c1016c57a79a31c07675231.tar.zst
dexon-sol-tools-0a69752d20e8d6ba4c1016c57a79a31c07675231.zip
Update relayer code to use new relayer-registry format
-rw-r--r--packages/pipeline/src/entities/Relayer.ts3
-rw-r--r--packages/pipeline/src/entities/relayer.ts3
-rw-r--r--packages/pipeline/src/index.ts5
3 files changed, 8 insertions, 3 deletions
diff --git a/packages/pipeline/src/entities/Relayer.ts b/packages/pipeline/src/entities/Relayer.ts
index ebdcbf345..605355fa8 100644
--- a/packages/pipeline/src/entities/Relayer.ts
+++ b/packages/pipeline/src/entities/Relayer.ts
@@ -2,8 +2,9 @@ import { Column, Entity, PrimaryColumn } from 'typeorm';
@Entity()
export class Relayer {
- @PrimaryColumn() public name!: string;
+ @PrimaryColumn() public uuid!: string;
+ @Column() public name!: string;
@Column() public url!: string;
@Column({ nullable: true, type: String })
public sraHttpEndpoint!: string | null;
diff --git a/packages/pipeline/src/entities/relayer.ts b/packages/pipeline/src/entities/relayer.ts
index ebdcbf345..605355fa8 100644
--- a/packages/pipeline/src/entities/relayer.ts
+++ b/packages/pipeline/src/entities/relayer.ts
@@ -2,8 +2,9 @@ import { Column, Entity, PrimaryColumn } from 'typeorm';
@Entity()
export class Relayer {
- @PrimaryColumn() public name!: string;
+ @PrimaryColumn() public uuid!: string;
+ @Column() public name!: string;
@Column() public url!: string;
@Column({ nullable: true, type: String })
public sraHttpEndpoint!: string | null;
diff --git a/packages/pipeline/src/index.ts b/packages/pipeline/src/index.ts
index 9483eb257..b42256d87 100644
--- a/packages/pipeline/src/index.ts
+++ b/packages/pipeline/src/index.ts
@@ -16,7 +16,10 @@ import { parseRelayers } from './parsers/relayer_registry';
import { parseBlock, parseTransaction } from './parsers/web3';
const EXCHANGE_START_BLOCK = 6271590; // Block number when the Exchange contract was deployed to mainnet.
-const RELAYER_REGISTRY_URL = 'https://raw.githubusercontent.com/0xProject/0x-relayer-registry/master/relayers.json';
+// NOTE(albrow): We need to manually update this URL for now. Fix this when we
+// have the relayer-registry behind semantic versioning.
+const RELAYER_REGISTRY_URL =
+ 'https://raw.githubusercontent.com/0xProject/0x-relayer-registry/4701c85677d161ea729a466aebbc1826c6aa2c0b/relayers.json';
let connection: Connection;