diff options
author | Fabio Berger <me@fabioberger.com> | 2018-05-23 02:18:50 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-05-23 02:18:50 +0800 |
commit | a682b5d90e4c651e4e5d5d7c700237a9b6fe22bf (patch) | |
tree | 35690db865d8ed5ba859d9e0d9d1cd1050425c4f /packages/contracts/test/multi_sig_with_time_lock.ts | |
parent | 4a0c8d72b05152ee2fd71245873d5a70f7281058 (diff) | |
download | dexon-sol-tools-a682b5d90e4c651e4e5d5d7c700237a9b6fe22bf.tar.gz dexon-sol-tools-a682b5d90e4c651e4e5d5d7c700237a9b6fe22bf.tar.zst dexon-sol-tools-a682b5d90e4c651e4e5d5d7c700237a9b6fe22bf.zip |
Remove 0x.js dep from contracts
Diffstat (limited to 'packages/contracts/test/multi_sig_with_time_lock.ts')
-rw-r--r-- | packages/contracts/test/multi_sig_with_time_lock.ts | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/packages/contracts/test/multi_sig_with_time_lock.ts b/packages/contracts/test/multi_sig_with_time_lock.ts index 8e58006ac..771bae8af 100644 --- a/packages/contracts/test/multi_sig_with_time_lock.ts +++ b/packages/contracts/test/multi_sig_with_time_lock.ts @@ -1,5 +1,5 @@ -import { LogWithDecodedArgs, ZeroEx } from '0x.js'; import { BlockchainLifecycle, web3Factory } from '@0xproject/dev-utils'; +import { LogWithDecodedArgs } from '@0xproject/types'; import { AbiDecoder, BigNumber } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; import * as chai from 'chai'; @@ -20,7 +20,6 @@ const MULTI_SIG_ABI = artifacts.MultiSigWalletWithTimeLock.compilerOutput.abi; chaiSetup.configure(); const expect = chai.expect; const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper); -const zeroEx = new ZeroEx(provider, { networkId: constants.TESTRPC_NETWORK_ID }); const abiDecoder = new AbiDecoder([MULTI_SIG_ABI]); describe('MultiSigWalletWithTimeLock', () => { @@ -74,7 +73,7 @@ describe('MultiSigWalletWithTimeLock', () => { args: [SECONDS_TIME_LOCKED.toNumber()], }; const txHash = await multiSigWrapper.submitTransactionAsync(destination, from, dataParams); - const subRes = await zeroEx.awaitTransactionMinedAsync(txHash); + const subRes = await web3Wrapper.awaitTransactionMinedAsync(txHash); const log = abiDecoder.tryToDecodeLogOrNoop(subRes.logs[0]) as LogWithDecodedArgs< SubmissionContractEventArgs >; @@ -94,14 +93,14 @@ describe('MultiSigWalletWithTimeLock', () => { args: [SECONDS_TIME_LOCKED.toNumber()], }; let txHash = await multiSigWrapper.submitTransactionAsync(destination, from, dataParams); - const subRes = await zeroEx.awaitTransactionMinedAsync(txHash); + const subRes = await web3Wrapper.awaitTransactionMinedAsync(txHash); const log = abiDecoder.tryToDecodeLogOrNoop(subRes.logs[0]) as LogWithDecodedArgs< SubmissionContractEventArgs >; txId = log.args.transactionId; txHash = await multiSig.confirmTransaction.sendTransactionAsync(txId, { from: owners[1] }); - const res = await zeroEx.awaitTransactionMinedAsync(txHash); + const res = await web3Wrapper.awaitTransactionMinedAsync(txHash); expect(res.logs).to.have.length(2); const blockNum = await web3Wrapper.getBlockNumberAsync(); @@ -121,7 +120,7 @@ describe('MultiSigWalletWithTimeLock', () => { args: [SECONDS_TIME_LOCKED.toNumber()], }; let txHash = await multiSigWrapper.submitTransactionAsync(destination, from, dataParams); - const subRes = await zeroEx.awaitTransactionMinedAsync(txHash); + const subRes = await web3Wrapper.awaitTransactionMinedAsync(txHash); const log = abiDecoder.tryToDecodeLogOrNoop(subRes.logs[0]) as LogWithDecodedArgs< SubmissionContractEventArgs >; @@ -132,7 +131,7 @@ describe('MultiSigWalletWithTimeLock', () => { expect(initialSecondsTimeLocked).to.be.equal(0); txHash = await multiSig.executeTransaction.sendTransactionAsync(txId, { from: owners[0] }); - const res = await zeroEx.awaitTransactionMinedAsync(txHash); + const res = await web3Wrapper.awaitTransactionMinedAsync(txHash); expect(res.logs).to.have.length(2); const secondsTimeLocked = new BigNumber(await multiSig.secondsTimeLocked.callAsync()); @@ -161,7 +160,7 @@ describe('MultiSigWalletWithTimeLock', () => { args: [newSecondsTimeLocked], }; let txHash = await multiSigWrapper.submitTransactionAsync(destination, from, dataParams); - const subRes = await zeroEx.awaitTransactionMinedAsync(txHash); + const subRes = await web3Wrapper.awaitTransactionMinedAsync(txHash); const log = abiDecoder.tryToDecodeLogOrNoop(subRes.logs[0]) as LogWithDecodedArgs< SubmissionContractEventArgs >; @@ -169,7 +168,7 @@ describe('MultiSigWalletWithTimeLock', () => { txHash = await multiSig.confirmTransaction.sendTransactionAsync(txId, { from: owners[1], }); - const confRes = await zeroEx.awaitTransactionMinedAsync(txHash); + const confRes = await web3Wrapper.awaitTransactionMinedAsync(txHash); expect(confRes.logs).to.have.length(2); }); const newSecondsTimeLocked = 0; |