aboutsummaryrefslogtreecommitdiffstats
path: root/packages/pipeline/src/scripts/update_relayer_info.ts
diff options
context:
space:
mode:
authorHsuan Lee <boczeratul@gmail.com>2019-03-06 17:46:50 +0800
committerHsuan Lee <boczeratul@gmail.com>2019-03-06 17:46:50 +0800
commit35703539d0f2b4ddb3b11d0de8c9634af59ab71f (patch)
treeae3731221dbbb3a6fa40060a8d916cfd3f738289 /packages/pipeline/src/scripts/update_relayer_info.ts
parent92a1fde5b1ecd81b07cdb5bf0c9c1cd3544799db (diff)
downloaddexon-0x-contracts-35703539d0f2b4ddb3b11d0de8c9634af59ab71f.tar
dexon-0x-contracts-35703539d0f2b4ddb3b11d0de8c9634af59ab71f.tar.gz
dexon-0x-contracts-35703539d0f2b4ddb3b11d0de8c9634af59ab71f.tar.bz2
dexon-0x-contracts-35703539d0f2b4ddb3b11d0de8c9634af59ab71f.tar.lz
dexon-0x-contracts-35703539d0f2b4ddb3b11d0de8c9634af59ab71f.tar.xz
dexon-0x-contracts-35703539d0f2b4ddb3b11d0de8c9634af59ab71f.tar.zst
dexon-0x-contracts-35703539d0f2b4ddb3b11d0de8c9634af59ab71f.zip
Deploy @dexon-foundation/0x.jsstable
Diffstat (limited to 'packages/pipeline/src/scripts/update_relayer_info.ts')
-rw-r--r--packages/pipeline/src/scripts/update_relayer_info.ts34
1 files changed, 0 insertions, 34 deletions
diff --git a/packages/pipeline/src/scripts/update_relayer_info.ts b/packages/pipeline/src/scripts/update_relayer_info.ts
deleted file mode 100644
index 910a0157c..000000000
--- a/packages/pipeline/src/scripts/update_relayer_info.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import 'reflect-metadata';
-import { Connection, ConnectionOptions, createConnection } from 'typeorm';
-
-import { logUtils } from '@0x/utils';
-
-import { RelayerRegistrySource } from '../data_sources/relayer-registry';
-import { Relayer } from '../entities';
-import * as ormConfig from '../ormconfig';
-import { parseRelayers } from '../parsers/relayer_registry';
-import { handleError } from '../utils';
-
-// 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;
-
-(async () => {
- connection = await createConnection(ormConfig as ConnectionOptions);
- await getRelayersAsync();
- process.exit(0);
-})().catch(handleError);
-
-async function getRelayersAsync(): Promise<void> {
- logUtils.log('Getting latest relayer info...');
- const relayerRepository = connection.getRepository(Relayer);
- const relayerSource = new RelayerRegistrySource(RELAYER_REGISTRY_URL);
- const relayersResp = await relayerSource.getRelayerInfoAsync();
- const relayers = parseRelayers(relayersResp);
- logUtils.log('Saving relayer info...');
- await relayerRepository.save(relayers);
- logUtils.log('Done saving relayer info.');
-}