diff options
author | Fabio Berger <me@fabioberger.com> | 2018-04-05 20:06:58 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-04-05 20:06:58 +0800 |
commit | 89a72ebf0dbff606d511ae51bfee7ffc0a5df18f (patch) | |
tree | 65c935c4c372d2c497bec08164b314866050192b /packages/metacoin | |
parent | 20aaab0847d0ec8b2a44f392ddd467f0c475cfb5 (diff) | |
parent | 7f7ddee0f95f3ed3e903c230088dbee4648771bd (diff) | |
download | dexon-sol-tools-89a72ebf0dbff606d511ae51bfee7ffc0a5df18f.tar.gz dexon-sol-tools-89a72ebf0dbff606d511ae51bfee7ffc0a5df18f.tar.zst dexon-sol-tools-89a72ebf0dbff606d511ae51bfee7ffc0a5df18f.zip |
Merge branch 'development' into removeMigrateStep
* development:
Fix tests
Call static functions as static
Address feedback
Move our contract templates to accept Provider instead of Web3Wrapper
Diffstat (limited to 'packages/metacoin')
-rw-r--r-- | packages/metacoin/test/metacoin_test.ts | 4 | ||||
-rw-r--r-- | packages/metacoin/test/utils/deployer.ts | 2 | ||||
-rw-r--r-- | packages/metacoin/test/utils/web3_wrapper.ts | 10 |
3 files changed, 8 insertions, 8 deletions
diff --git a/packages/metacoin/test/metacoin_test.ts b/packages/metacoin/test/metacoin_test.ts index f2b396ac2..73537d342 100644 --- a/packages/metacoin/test/metacoin_test.ts +++ b/packages/metacoin/test/metacoin_test.ts @@ -8,7 +8,7 @@ import { MetacoinContract, TransferContractEventArgs } from '../src/contract_wra import { chaiSetup } from './utils/chai_setup'; import { deployer } from './utils/deployer'; -import { web3Wrapper } from './utils/web3_wrapper'; +import { provider, web3Wrapper } from './utils/web3_wrapper'; chaiSetup.configure(); const { expect } = chai; @@ -21,7 +21,7 @@ describe('Metacoin', () => { before(async () => { const metacoinInstance = await deployer.deployAsync('Metacoin'); web3Wrapper.abiDecoder.addABI(metacoinInstance.abi); - metacoin = new MetacoinContract(web3Wrapper, metacoinInstance.abi, metacoinInstance.address); + metacoin = new MetacoinContract(metacoinInstance.abi, metacoinInstance.address, provider); }); beforeEach(async () => { await blockchainLifecycle.startAsync(); diff --git a/packages/metacoin/test/utils/deployer.ts b/packages/metacoin/test/utils/deployer.ts index 7916c8541..5a631fa0a 100644 --- a/packages/metacoin/test/utils/deployer.ts +++ b/packages/metacoin/test/utils/deployer.ts @@ -6,7 +6,7 @@ import { config } from './config'; import { web3Wrapper } from './web3_wrapper'; const deployerOpts = { - web3Provider: web3Wrapper.getProvider(), + provider: web3Wrapper.getProvider(), artifactsDir: config.artifactsDir, networkId: config.networkId, defaults: { diff --git a/packages/metacoin/test/utils/web3_wrapper.ts b/packages/metacoin/test/utils/web3_wrapper.ts index 23bd62b93..b4bb61f09 100644 --- a/packages/metacoin/test/utils/web3_wrapper.ts +++ b/packages/metacoin/test/utils/web3_wrapper.ts @@ -8,12 +8,12 @@ import ProviderEngine = require('web3-provider-engine'); import { config } from './config'; import { coverage } from './coverage'; -export const web3Provider = new ProviderEngine(); +export const provider = new ProviderEngine(); const isCoverageEnabled = env.parseBoolean(EnvVars.SolidityCoverage); if (isCoverageEnabled) { - web3Provider.addProvider(coverage.getCoverageSubproviderSingleton()); + provider.addProvider(coverage.getCoverageSubproviderSingleton()); } -web3Provider.addProvider( +provider.addProvider( new GanacheSubprovider({ logger: { log: (arg: any) => { @@ -25,6 +25,6 @@ web3Provider.addProvider( mnemonic: config.mnemonic, }), ); -web3Provider.start(); +provider.start(); -export const web3Wrapper = new Web3Wrapper(web3Provider); +export const web3Wrapper = new Web3Wrapper(provider); |