aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/test
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-05-22 07:09:07 +0800
committerAlex Browne <stephenalexbrowne@gmail.com>2018-05-22 07:52:49 +0800
commit4ca8903a21d5a78ace5bff3fc5bbc917e369cbfe (patch)
tree49e6cd10b48385d22d0eb2213f93521e351c5928 /packages/contracts/test
parentd460c0e8b9c6f4081803fff4e2d2347be8cd5ce3 (diff)
downloaddexon-sol-tools-4ca8903a21d5a78ace5bff3fc5bbc917e369cbfe.tar
dexon-sol-tools-4ca8903a21d5a78ace5bff3fc5bbc917e369cbfe.tar.gz
dexon-sol-tools-4ca8903a21d5a78ace5bff3fc5bbc917e369cbfe.tar.bz2
dexon-sol-tools-4ca8903a21d5a78ace5bff3fc5bbc917e369cbfe.tar.lz
dexon-sol-tools-4ca8903a21d5a78ace5bff3fc5bbc917e369cbfe.tar.xz
dexon-sol-tools-4ca8903a21d5a78ace5bff3fc5bbc917e369cbfe.tar.zst
dexon-sol-tools-4ca8903a21d5a78ace5bff3fc5bbc917e369cbfe.zip
Add missing blockchainLifecycle calls to contracts tests
Diffstat (limited to 'packages/contracts/test')
-rw-r--r--packages/contracts/test/asset_proxy/authorizable.ts6
-rw-r--r--packages/contracts/test/asset_proxy/proxies.ts6
-rw-r--r--packages/contracts/test/ether_token.ts7
-rw-r--r--packages/contracts/test/exchange/core.ts6
-rw-r--r--packages/contracts/test/exchange/dispatcher.ts6
-rw-r--r--packages/contracts/test/exchange/libs.ts6
-rw-r--r--packages/contracts/test/exchange/signature_validator.ts6
-rw-r--r--packages/contracts/test/exchange/transactions.ts6
-rw-r--r--packages/contracts/test/exchange/wrapper.ts6
-rw-r--r--packages/contracts/test/libraries/lib_bytes.ts6
-rw-r--r--packages/contracts/test/multi_sig_with_time_lock.ts12
-rw-r--r--packages/contracts/test/token_registry.ts6
-rw-r--r--packages/contracts/test/unlimited_allowance_token.ts6
-rw-r--r--packages/contracts/test/zrx_token.ts6
14 files changed, 91 insertions, 0 deletions
diff --git a/packages/contracts/test/asset_proxy/authorizable.ts b/packages/contracts/test/asset_proxy/authorizable.ts
index 636b9096b..bbdcfb742 100644
--- a/packages/contracts/test/asset_proxy/authorizable.ts
+++ b/packages/contracts/test/asset_proxy/authorizable.ts
@@ -20,6 +20,12 @@ describe('Authorizable', () => {
let address: string;
let authorizable: MixinAuthorizableContract;
before(async () => {
+ await blockchainLifecycle.startAsync();
+ });
+ after(async () => {
+ await blockchainLifecycle.revertAsync();
+ });
+ before(async () => {
const accounts = await web3Wrapper.getAvailableAddressesAsync();
owner = address = accounts[0];
notOwner = accounts[1];
diff --git a/packages/contracts/test/asset_proxy/proxies.ts b/packages/contracts/test/asset_proxy/proxies.ts
index e7ef9a0d3..e64482c8f 100644
--- a/packages/contracts/test/asset_proxy/proxies.ts
+++ b/packages/contracts/test/asset_proxy/proxies.ts
@@ -40,6 +40,12 @@ describe('Asset Transfer Proxies', () => {
let zeroEx: ZeroEx;
before(async () => {
+ await blockchainLifecycle.startAsync();
+ });
+ after(async () => {
+ await blockchainLifecycle.revertAsync();
+ });
+ before(async () => {
const accounts = await web3Wrapper.getAvailableAddressesAsync();
const usedAddresses = ([owner, notAuthorized, exchangeAddress, makerAddress, takerAddress] = accounts);
diff --git a/packages/contracts/test/ether_token.ts b/packages/contracts/test/ether_token.ts
index 418fbc45e..4c647bbc7 100644
--- a/packages/contracts/test/ether_token.ts
+++ b/packages/contracts/test/ether_token.ts
@@ -20,6 +20,13 @@ describe('EtherToken', () => {
const gasPrice = ZeroEx.toBaseUnitAmount(new BigNumber(20), 9);
let zeroEx: ZeroEx;
let etherTokenAddress: string;
+
+ before(async () => {
+ await blockchainLifecycle.startAsync();
+ });
+ after(async () => {
+ await blockchainLifecycle.revertAsync();
+ });
before(async () => {
const accounts = await web3Wrapper.getAvailableAddressesAsync();
account = accounts[0];
diff --git a/packages/contracts/test/exchange/core.ts b/packages/contracts/test/exchange/core.ts
index be3252800..f4d83d07d 100644
--- a/packages/contracts/test/exchange/core.ts
+++ b/packages/contracts/test/exchange/core.ts
@@ -62,6 +62,12 @@ describe('Exchange core', () => {
let zeroEx: ZeroEx;
before(async () => {
+ await blockchainLifecycle.startAsync();
+ });
+ after(async () => {
+ await blockchainLifecycle.revertAsync();
+ });
+ before(async () => {
const accounts = await web3Wrapper.getAvailableAddressesAsync();
const usedAddresses = ([owner, makerAddress, takerAddress, feeRecipientAddress] = accounts);
diff --git a/packages/contracts/test/exchange/dispatcher.ts b/packages/contracts/test/exchange/dispatcher.ts
index db2f18ddc..5713a0b4f 100644
--- a/packages/contracts/test/exchange/dispatcher.ts
+++ b/packages/contracts/test/exchange/dispatcher.ts
@@ -37,6 +37,12 @@ describe('AssetProxyDispatcher', () => {
let erc721Wrapper: ERC721Wrapper;
before(async () => {
+ await blockchainLifecycle.startAsync();
+ });
+ after(async () => {
+ await blockchainLifecycle.revertAsync();
+ });
+ before(async () => {
// Setup accounts & addresses
const accounts = await web3Wrapper.getAvailableAddressesAsync();
const usedAddresses = ([owner, notOwner, makerAddress, takerAddress] = accounts);
diff --git a/packages/contracts/test/exchange/libs.ts b/packages/contracts/test/exchange/libs.ts
index 1036cb815..883de7a12 100644
--- a/packages/contracts/test/exchange/libs.ts
+++ b/packages/contracts/test/exchange/libs.ts
@@ -26,6 +26,12 @@ describe('Exchange libs', () => {
let libs: TestLibsContract;
before(async () => {
+ await blockchainLifecycle.startAsync();
+ });
+ after(async () => {
+ await blockchainLifecycle.revertAsync();
+ });
+ before(async () => {
const accounts = await web3Wrapper.getAvailableAddressesAsync();
const makerAddress = accounts[0];
libs = await TestLibsContract.deployFrom0xArtifactAsync(artifacts.TestLibs, provider, txDefaults);
diff --git a/packages/contracts/test/exchange/signature_validator.ts b/packages/contracts/test/exchange/signature_validator.ts
index 489ed32c5..b918cef60 100644
--- a/packages/contracts/test/exchange/signature_validator.ts
+++ b/packages/contracts/test/exchange/signature_validator.ts
@@ -26,6 +26,12 @@ describe('MixinSignatureValidator', () => {
let signatureValidator: TestSignatureValidatorContract;
before(async () => {
+ await blockchainLifecycle.startAsync();
+ });
+ after(async () => {
+ await blockchainLifecycle.revertAsync();
+ });
+ before(async () => {
const accounts = await web3Wrapper.getAvailableAddressesAsync();
const makerAddress = accounts[0];
signatureValidator = await TestSignatureValidatorContract.deployFrom0xArtifactAsync(
diff --git a/packages/contracts/test/exchange/transactions.ts b/packages/contracts/test/exchange/transactions.ts
index 482475554..c98a3dee5 100644
--- a/packages/contracts/test/exchange/transactions.ts
+++ b/packages/contracts/test/exchange/transactions.ts
@@ -62,6 +62,12 @@ describe('Exchange transactions', () => {
let zeroEx: ZeroEx;
before(async () => {
+ await blockchainLifecycle.startAsync();
+ });
+ after(async () => {
+ await blockchainLifecycle.revertAsync();
+ });
+ before(async () => {
const accounts = await web3Wrapper.getAvailableAddressesAsync();
const usedAddresses = ([owner, senderAddress, makerAddress, takerAddress, feeRecipientAddress] = accounts);
diff --git a/packages/contracts/test/exchange/wrapper.ts b/packages/contracts/test/exchange/wrapper.ts
index 0b79308dd..099f6b656 100644
--- a/packages/contracts/test/exchange/wrapper.ts
+++ b/packages/contracts/test/exchange/wrapper.ts
@@ -57,6 +57,12 @@ describe('Exchange wrappers', () => {
let zeroEx: ZeroEx;
before(async () => {
+ await blockchainLifecycle.startAsync();
+ });
+ after(async () => {
+ await blockchainLifecycle.revertAsync();
+ });
+ before(async () => {
const accounts = await web3Wrapper.getAvailableAddressesAsync();
const usedAddresses = ([owner, makerAddress, takerAddress, feeRecipientAddress] = accounts);
diff --git a/packages/contracts/test/libraries/lib_bytes.ts b/packages/contracts/test/libraries/lib_bytes.ts
index 5ed5c356f..a468255e9 100644
--- a/packages/contracts/test/libraries/lib_bytes.ts
+++ b/packages/contracts/test/libraries/lib_bytes.ts
@@ -33,6 +33,12 @@ describe('LibBytes', () => {
const testUint256 = new BigNumber(testBytes32, 16);
before(async () => {
+ await blockchainLifecycle.startAsync();
+ });
+ after(async () => {
+ await blockchainLifecycle.revertAsync();
+ });
+ before(async () => {
// Setup accounts & addresses
const accounts = await web3Wrapper.getAvailableAddressesAsync();
owner = accounts[0];
diff --git a/packages/contracts/test/multi_sig_with_time_lock.ts b/packages/contracts/test/multi_sig_with_time_lock.ts
index 8e58006ac..784f41d24 100644
--- a/packages/contracts/test/multi_sig_with_time_lock.ts
+++ b/packages/contracts/test/multi_sig_with_time_lock.ts
@@ -45,6 +45,12 @@ describe('MultiSigWalletWithTimeLock', () => {
describe('changeTimeLock', () => {
describe('initially non-time-locked', async () => {
+ before(async () => {
+ await blockchainLifecycle.startAsync();
+ });
+ after(async () => {
+ await blockchainLifecycle.revertAsync();
+ });
before('deploy a wallet', async () => {
multiSig = await MultiSigWalletWithTimeLockContract.deployFrom0xArtifactAsync(
artifacts.MultiSigWalletWithTimeLock,
@@ -140,6 +146,12 @@ describe('MultiSigWalletWithTimeLock', () => {
});
});
describe('initially time-locked', async () => {
+ before(async () => {
+ await blockchainLifecycle.startAsync();
+ });
+ after(async () => {
+ await blockchainLifecycle.revertAsync();
+ });
before('deploy a wallet', async () => {
multiSig = await MultiSigWalletWithTimeLockContract.deployFrom0xArtifactAsync(
artifacts.MultiSigWalletWithTimeLock,
diff --git a/packages/contracts/test/token_registry.ts b/packages/contracts/test/token_registry.ts
index 9e4f7ca3b..c14f64184 100644
--- a/packages/contracts/test/token_registry.ts
+++ b/packages/contracts/test/token_registry.ts
@@ -25,6 +25,12 @@ describe('TokenRegistry', () => {
let tokenReg: TokenRegistryContract;
let tokenRegWrapper: TokenRegWrapper;
before(async () => {
+ await blockchainLifecycle.startAsync();
+ });
+ after(async () => {
+ await blockchainLifecycle.revertAsync();
+ });
+ before(async () => {
const accounts = await web3Wrapper.getAvailableAddressesAsync();
owner = accounts[0];
notOwner = accounts[1];
diff --git a/packages/contracts/test/unlimited_allowance_token.ts b/packages/contracts/test/unlimited_allowance_token.ts
index 8851a04ef..6b79301bb 100644
--- a/packages/contracts/test/unlimited_allowance_token.ts
+++ b/packages/contracts/test/unlimited_allowance_token.ts
@@ -28,6 +28,12 @@ describe('UnlimitedAllowanceToken', () => {
let token: DummyERC20TokenContract;
before(async () => {
+ await blockchainLifecycle.startAsync();
+ });
+ after(async () => {
+ await blockchainLifecycle.revertAsync();
+ });
+ before(async () => {
const accounts = await web3Wrapper.getAvailableAddressesAsync();
owner = accounts[0];
spender = accounts[1];
diff --git a/packages/contracts/test/zrx_token.ts b/packages/contracts/test/zrx_token.ts
index 7a72f85dc..52322983f 100644
--- a/packages/contracts/test/zrx_token.ts
+++ b/packages/contracts/test/zrx_token.ts
@@ -27,6 +27,12 @@ describe('ZRXToken', () => {
let zrxAddress: string;
before(async () => {
+ await blockchainLifecycle.startAsync();
+ });
+ after(async () => {
+ await blockchainLifecycle.revertAsync();
+ });
+ before(async () => {
const accounts = await web3Wrapper.getAvailableAddressesAsync();
owner = accounts[0];
spender = accounts[1];