diff options
Diffstat (limited to 'packages/testnet-faucets')
-rw-r--r-- | packages/testnet-faucets/README.md | 6 | ||||
-rw-r--r-- | packages/testnet-faucets/gulpfile.js | 35 | ||||
-rw-r--r-- | packages/testnet-faucets/package.json | 20 | ||||
-rw-r--r-- | packages/testnet-faucets/src/ts/dispatch_queue.ts | 2 | ||||
-rw-r--r-- | packages/testnet-faucets/src/ts/dispense_asset_tasks.ts | 4 | ||||
-rw-r--r-- | packages/testnet-faucets/src/ts/error_reporter.ts | 2 | ||||
-rw-r--r-- | packages/testnet-faucets/src/ts/handler.ts | 17 | ||||
-rw-r--r-- | packages/testnet-faucets/src/ts/parameter_transformer.ts | 2 | ||||
-rw-r--r-- | packages/testnet-faucets/tslint.json | 2 |
9 files changed, 45 insertions, 45 deletions
diff --git a/packages/testnet-faucets/README.md b/packages/testnet-faucets/README.md index a92b93fc0..8b85e3517 100644 --- a/packages/testnet-faucets/README.md +++ b/packages/testnet-faucets/README.md @@ -1,4 +1,4 @@ -## @0xproject/testnet-faucets +## @0x/testnet-faucets This faucet dispenses 0.1 test ether to one recipient per second and 0.1 test ZRX every 5 seconds. It has a max queue size of 1000. @@ -31,13 +31,13 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/testnet-faucets yarn build +PKG=@0x/testnet-faucets yarn build ``` Or continuously rebuild on change: ```bash -PKG=@0xproject/testnet-faucets yarn watch +PKG=@0x/testnet-faucets yarn watch ``` ### Clean diff --git a/packages/testnet-faucets/gulpfile.js b/packages/testnet-faucets/gulpfile.js index 7c4e25e0f..839ef851b 100644 --- a/packages/testnet-faucets/gulpfile.js +++ b/packages/testnet-faucets/gulpfile.js @@ -14,10 +14,7 @@ const config = { }, devtool: 'source-map', resolve: { - modules: [ - path.join(__dirname, '/src/ts'), - 'node_modules', - ], + modules: [path.join(__dirname, '/src/ts'), 'node_modules'], extensions: ['.ts', '.tsx', '.js', '.jsx', '.json'], alias: { ts: path.join(__dirname, '/src/ts'), @@ -44,10 +41,10 @@ const config = { }), ], externals: nodeExternals({ - modulesDir: path.join(__dirname, '../../node_modules') + modulesDir: path.join(__dirname, '../../node_modules'), }), watchOptions: { - ignored: /server|node_modules|transpiled/ + ignored: /server|node_modules|transpiled/, }, }; @@ -77,16 +74,18 @@ gulp.task('run', ['watch'], function() { }); function onBuild(done) { - return function(err, stats) { - if(err) { - console.log('Error', err); - } - else { - console.log(stats.toString()); - } - - if(done) { - done(); - } - } + return function(err, stats) { + if (err) { + console.log('Error', err); + process.exit(1); + } else { + console.log(stats.toString()); + } + if (done) { + if (stats.compilation.errors && stats.compilation.errors.length > 0) { + process.exit(1); + } + done(); + } + }; } diff --git a/packages/testnet-faucets/package.json b/packages/testnet-faucets/package.json index a113889cc..ac720a748 100644 --- a/packages/testnet-faucets/package.json +++ b/packages/testnet-faucets/package.json @@ -1,7 +1,7 @@ { "private": true, - "name": "@0xproject/testnet-faucets", - "version": "1.0.51", + "name": "@0x/testnet-faucets", + "version": "1.0.56", "engines": { "node": ">=6.12" }, @@ -12,19 +12,19 @@ "build:ci": "yarn build", "dev": "node ../../node_modules/gulp/bin/gulp.js run", "start": "node ./server/server.js", - "lint": "tslint --project .", + "lint": "tslint --format stylish --project .", "clean": "shx rm -rf server" }, "author": "Fabio Berger", "license": "Apache-2.0", "dependencies": { - "0x.js": "^1.0.8", - "@0xproject/subproviders": "^2.0.7", - "@0xproject/typescript-typings": "^3.0.2", - "@0xproject/utils": "^2.0.2", - "@0xproject/web3-wrapper": "^3.0.3", + "0x.js": "^2.0.4", + "@0x/subproviders": "^2.1.4", + "@0x/typescript-typings": "^3.0.4", + "@0x/utils": "^2.0.5", + "@0x/web3-wrapper": "^3.1.4", "body-parser": "^1.17.1", - "ethereum-types": "^1.0.11", + "ethereum-types": "^1.1.2", "ethereumjs-tx": "^1.3.5", "ethereumjs-util": "^5.1.1", "express": "^4.15.2", @@ -32,7 +32,7 @@ "rollbar": "^0.6.5" }, "devDependencies": { - "@0xproject/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.10", "@types/body-parser": "^1.16.1", "@types/express": "^4.0.35", "@types/lodash": "4.14.104", diff --git a/packages/testnet-faucets/src/ts/dispatch_queue.ts b/packages/testnet-faucets/src/ts/dispatch_queue.ts index 0a13df7c9..3d0958fbf 100644 --- a/packages/testnet-faucets/src/ts/dispatch_queue.ts +++ b/packages/testnet-faucets/src/ts/dispatch_queue.ts @@ -1,4 +1,4 @@ -import { intervalUtils, logUtils } from '@0xproject/utils'; +import { intervalUtils, logUtils } from '@0x/utils'; import * as _ from 'lodash'; import { errorReporter } from './error_reporter'; diff --git a/packages/testnet-faucets/src/ts/dispense_asset_tasks.ts b/packages/testnet-faucets/src/ts/dispense_asset_tasks.ts index fa63ab63e..32f5cb623 100644 --- a/packages/testnet-faucets/src/ts/dispense_asset_tasks.ts +++ b/packages/testnet-faucets/src/ts/dispense_asset_tasks.ts @@ -1,6 +1,6 @@ import { ERC20TokenWrapper } from '0x.js'; -import { BigNumber, logUtils } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BigNumber, logUtils } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as _ from 'lodash'; import { configs } from './configs'; diff --git a/packages/testnet-faucets/src/ts/error_reporter.ts b/packages/testnet-faucets/src/ts/error_reporter.ts index 49c37b6eb..d5358aed0 100644 --- a/packages/testnet-faucets/src/ts/error_reporter.ts +++ b/packages/testnet-faucets/src/ts/error_reporter.ts @@ -1,4 +1,4 @@ -import { logUtils } from '@0xproject/utils'; +import { logUtils } from '@0x/utils'; import * as express from 'express'; import rollbar = require('rollbar'); diff --git a/packages/testnet-faucets/src/ts/handler.ts b/packages/testnet-faucets/src/ts/handler.ts index e73eb1744..2dfa3c3af 100644 --- a/packages/testnet-faucets/src/ts/handler.ts +++ b/packages/testnet-faucets/src/ts/handler.ts @@ -9,12 +9,11 @@ import { RPCSubprovider, signatureUtils, SignedOrder, - SignerType, Web3ProviderEngine, } from '0x.js'; -import { NonceTrackerSubprovider, PrivateKeyWalletSubprovider } from '@0xproject/subproviders'; -import { logUtils } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { NonceTrackerSubprovider, PrivateKeyWalletSubprovider } from '@0x/subproviders'; +import { logUtils } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as express from 'express'; import * as _ from 'lodash'; @@ -66,7 +65,10 @@ export class Handler { const web3Wrapper = new Web3Wrapper(providerObj); // tslint:disable-next-line:custom-no-magic-numbers const networkId = parseInt(networkIdString, 10); - const contractWrappers = new ContractWrappers(providerObj, { networkId }); + const contractWrappersConfig = { + networkId, + }; + const contractWrappers = new ContractWrappers(providerObj, contractWrappersConfig); const dispatchQueue = new DispatchQueue(); this._networkConfigByNetworkId[networkId] = { dispatchQueue, @@ -173,18 +175,17 @@ export class Handler { makerAssetData, takerAssetData, salt: generatePseudoRandomSalt(), - exchangeAddress: networkConfig.contractWrappers.exchange.getContractAddress(), + exchangeAddress: networkConfig.contractWrappers.exchange.address, feeRecipientAddress: NULL_ADDRESS, senderAddress: NULL_ADDRESS, // tslint:disable-next-line:custom-no-magic-numbers expirationTimeSeconds: new BigNumber(Date.now() + FIVE_DAYS_IN_MS).div(1000).floor(), }; const orderHash = orderHashUtils.getOrderHashHex(order); - const signature = await signatureUtils.ecSignOrderHashAsync( + const signature = await signatureUtils.ecSignHashAsync( networkConfig.web3Wrapper.getProvider(), orderHash, configs.DISPENSER_ADDRESS, - SignerType.Default, ); const signedOrder: SignedOrder = { ...order, diff --git a/packages/testnet-faucets/src/ts/parameter_transformer.ts b/packages/testnet-faucets/src/ts/parameter_transformer.ts index 7320b1d1c..bed8eb99e 100644 --- a/packages/testnet-faucets/src/ts/parameter_transformer.ts +++ b/packages/testnet-faucets/src/ts/parameter_transformer.ts @@ -1,4 +1,4 @@ -import { addressUtils } from '@0xproject/utils'; +import { addressUtils } from '@0x/utils'; import { NextFunction, Request, Response } from 'express'; import * as _ from 'lodash'; diff --git a/packages/testnet-faucets/tslint.json b/packages/testnet-faucets/tslint.json index ffaefe83a..dd9053357 100644 --- a/packages/testnet-faucets/tslint.json +++ b/packages/testnet-faucets/tslint.json @@ -1,3 +1,3 @@ { - "extends": ["@0xproject/tslint-config"] + "extends": ["@0x/tslint-config"] } |