Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
Remove excess web3providernegine polling from contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
dekz committed Mar 21, 2019
1 parent 180c65c commit 5480898
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 15 deletions.
4 changes: 3 additions & 1 deletion contracts/asset-proxy/test/global_hooks.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { env, EnvVars } from '@0x/dev-utils';

import { coverage, profiler, provider } from '@0x/contracts-test-utils';
import { providerUtils } from '@0x/utils';

before('start web3 provider', () => {
provider.start();
providerUtils.startProviderEngine(provider);
});
after('generate coverage report', async () => {
if (env.parseBoolean(EnvVars.SolidityCoverage)) {
Expand Down
4 changes: 3 additions & 1 deletion contracts/coordinator/test/global_hooks.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { env, EnvVars } from '@0x/dev-utils';

import { coverage, profiler, provider } from '@0x/contracts-test-utils';
import { providerUtils } from '@0x/utils';

before('start web3 provider', () => {
provider.start();
providerUtils.startProviderEngine(provider);
});
after('generate coverage report', async () => {
if (env.parseBoolean(EnvVars.SolidityCoverage)) {
Expand Down
4 changes: 3 additions & 1 deletion contracts/erc1155/test/global_hooks.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { env, EnvVars } from '@0x/dev-utils';

import { coverage, profiler, provider } from '@0x/contracts-test-utils';
import { providerUtils } from '@0x/utils';

before('start web3 provider', () => {
provider.start();
providerUtils.startProviderEngine(provider);
});
after('generate coverage report', async () => {
if (env.parseBoolean(EnvVars.SolidityCoverage)) {
Expand Down
4 changes: 3 additions & 1 deletion contracts/erc20/test/global_hooks.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { env, EnvVars } from '@0x/dev-utils';

import { coverage, profiler, provider } from '@0x/contracts-test-utils';
import { providerUtils } from '@0x/utils';

before('start web3 provider', () => {
provider.start();
providerUtils.startProviderEngine(provider);
});
after('generate coverage report', async () => {
if (env.parseBoolean(EnvVars.SolidityCoverage)) {
Expand Down
4 changes: 3 additions & 1 deletion contracts/erc721/test/global_hooks.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { env, EnvVars } from '@0x/dev-utils';

import { coverage, profiler, provider } from '@0x/contracts-test-utils';
import { providerUtils } from '@0x/utils';

before('start web3 provider', () => {
provider.start();
providerUtils.startProviderEngine(provider);
});
after('generate coverage report', async () => {
if (env.parseBoolean(EnvVars.SolidityCoverage)) {
Expand Down
4 changes: 3 additions & 1 deletion contracts/exchange-forwarder/test/global_hooks.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { env, EnvVars } from '@0x/dev-utils';

import { coverage, profiler, provider } from '@0x/contracts-test-utils';
import { providerUtils } from '@0x/utils';

before('start web3 provider', () => {
provider.start();
providerUtils.startProviderEngine(provider);
});
after('generate coverage report', async () => {
if (env.parseBoolean(EnvVars.SolidityCoverage)) {
Expand Down
4 changes: 3 additions & 1 deletion contracts/exchange-libs/test/global_hooks.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { env, EnvVars } from '@0x/dev-utils';

import { coverage, profiler, provider } from '@0x/contracts-test-utils';
import { providerUtils } from '@0x/utils';

before('start web3 provider', () => {
provider.start();
providerUtils.startProviderEngine(provider);
});
after('generate coverage report', async () => {
if (env.parseBoolean(EnvVars.SolidityCoverage)) {
Expand Down
4 changes: 3 additions & 1 deletion contracts/exchange/test/global_hooks.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { env, EnvVars } from '@0x/dev-utils';

import { coverage, profiler, provider } from '@0x/contracts-test-utils';
import { providerUtils } from '@0x/utils';

before('start web3 provider', () => {
provider.start();
providerUtils.startProviderEngine(provider);
});
after('generate coverage report', async () => {
if (env.parseBoolean(EnvVars.SolidityCoverage)) {
Expand Down
4 changes: 3 additions & 1 deletion contracts/extensions/test/global_hooks.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { env, EnvVars } from '@0x/dev-utils';

import { coverage, profiler, provider } from '@0x/contracts-test-utils';
import { providerUtils } from '@0x/utils';

before('start web3 provider', () => {
provider.start();
providerUtils.startProviderEngine(provider);
});
after('generate coverage report', async () => {
if (env.parseBoolean(EnvVars.SolidityCoverage)) {
Expand Down
8 changes: 4 additions & 4 deletions contracts/multisig/test/global_hooks.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { env, EnvVars } from '@0x/dev-utils';

import { coverage, profiler, provider } from '@0x/contracts-test-utils';
import { env, EnvVars } from '@0x/dev-utils';
import { providerUtils } from '@0x/utils';

before('start web3 provider engine', () => {
provider.start();
before('start web3 provider', () => {
providerUtils.startProviderEngine(provider);
});

after('generate coverage report', async () => {
Expand Down
4 changes: 3 additions & 1 deletion contracts/utils/test/global_hooks.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { env, EnvVars } from '@0x/dev-utils';

import { coverage, profiler, provider } from '@0x/contracts-test-utils';
import { providerUtils } from '@0x/utils';

before('start web3 provider', () => {
provider.start();
providerUtils.startProviderEngine(provider);
});
after('generate coverage report', async () => {
if (env.parseBoolean(EnvVars.SolidityCoverage)) {
Expand Down
3 changes: 2 additions & 1 deletion packages/metacoin/test/global_hooks.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { env, EnvVars } from '@0x/dev-utils';

import { coverage, profiler, provider } from '@0x/contracts-test-utils';
import { providerUtils } from '@0x/utils';
before('start web3 provider', () => {
provider.start();
providerUtils.startProviderEngine(provider);
});
after('generate coverage report', async () => {
if (env.parseBoolean(EnvVars.SolidityCoverage)) {
Expand Down

0 comments on commit 5480898

Please sign in to comment.