diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-04-03 21:19:38 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-04-04 16:56:32 +0800 |
commit | 249bf0163d8ee71b7329fd58b72e554c0324279c (patch) | |
tree | 5bfb30b082236bd089e35186220bdb02913ba128 /packages/contracts/test/tutorials/arbitrage.ts | |
parent | 674e56cea69fe96ddd0071d3c4c5b5ea8ae299bf (diff) | |
download | dexon-sol-tools-249bf0163d8ee71b7329fd58b72e554c0324279c.tar.gz dexon-sol-tools-249bf0163d8ee71b7329fd58b72e554c0324279c.tar.zst dexon-sol-tools-249bf0163d8ee71b7329fd58b72e554c0324279c.zip |
Move our contract templates to accept Provider instead of Web3Wrapper
Diffstat (limited to 'packages/contracts/test/tutorials/arbitrage.ts')
-rw-r--r-- | packages/contracts/test/tutorials/arbitrage.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/contracts/test/tutorials/arbitrage.ts b/packages/contracts/test/tutorials/arbitrage.ts index b2bbaf420..ad83bbca3 100644 --- a/packages/contracts/test/tutorials/arbitrage.ts +++ b/packages/contracts/test/tutorials/arbitrage.ts @@ -17,7 +17,7 @@ import { OrderFactory } from '../../util/order_factory'; import { BalancesByOwner, ContractName, ExchangeContractErrs } from '../../util/types'; import { chaiSetup } from '../utils/chai_setup'; import { deployer } from '../utils/deployer'; -import { web3, web3Wrapper } from '../utils/web3_wrapper'; +import { provider, web3Wrapper } from '../utils/web3_wrapper'; chaiSetup.configure(); const expect = chai.expect; @@ -69,18 +69,18 @@ describe('Arbitrage', () => { edTakerFee, edFeeRebate, ]); - etherDelta = new EtherDeltaContract(web3Wrapper, etherDeltaInstance.abi, etherDeltaInstance.address); + etherDelta = new EtherDeltaContract(etherDeltaInstance.abi, etherDeltaInstance.address, provider); const tokenTransferProxy = await deployer.deployAsync(ContractName.TokenTransferProxy); const exchangeInstance = await deployer.deployAsync(ContractName.Exchange, [ zrx.address, tokenTransferProxy.address, ]); await tokenTransferProxy.addAuthorizedAddress(exchangeInstance.address, { from: accounts[0] }); - zeroEx = new ZeroEx(web3.currentProvider, { + zeroEx = new ZeroEx(provider, { exchangeContractAddress: exchangeInstance.address, networkId: constants.TESTRPC_NETWORK_ID, }); - const exchange = new ExchangeContract(web3Wrapper, exchangeInstance.abi, exchangeInstance.address); + const exchange = new ExchangeContract(exchangeInstance.abi, exchangeInstance.address, provider); exWrapper = new ExchangeWrapper(exchange, zeroEx); makerTokenAmount = ZeroEx.toBaseUnitAmount(new BigNumber(1), 18); @@ -102,7 +102,7 @@ describe('Arbitrage', () => { etherDelta.address, tokenTransferProxy.address, ]); - arbitrage = new ArbitrageContract(web3Wrapper, arbitrageInstance.abi, arbitrageInstance.address); + arbitrage = new ArbitrageContract(arbitrageInstance.abi, arbitrageInstance.address, provider); // Enable arbitrage and withdrawals of tokens await arbitrage.setAllowances.sendTransactionAsync(weth.address, { from: coinbase }); await arbitrage.setAllowances.sendTransactionAsync(zrx.address, { from: coinbase }); |