aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/test
diff options
context:
space:
mode:
authorAmir Bandeali <abandeali1@gmail.com>2018-06-18 23:07:04 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-06-20 04:52:23 +0800
commit6b08e6b80996d9553f280c6d7ade293ae7333711 (patch)
tree257346004a81412b96f60dab5b83b0b101d342b7 /packages/contracts/test
parente92926e8814257d71f45ded8011cb17b08fc37de (diff)
downloaddexon-sol-tools-6b08e6b80996d9553f280c6d7ade293ae7333711.tar
dexon-sol-tools-6b08e6b80996d9553f280c6d7ade293ae7333711.tar.gz
dexon-sol-tools-6b08e6b80996d9553f280c6d7ade293ae7333711.tar.bz2
dexon-sol-tools-6b08e6b80996d9553f280c6d7ade293ae7333711.tar.lz
dexon-sol-tools-6b08e6b80996d9553f280c6d7ade293ae7333711.tar.xz
dexon-sol-tools-6b08e6b80996d9553f280c6d7ade293ae7333711.tar.zst
dexon-sol-tools-6b08e6b80996d9553f280c6d7ade293ae7333711.zip
Rename makerEpoch => orderEpoch
Diffstat (limited to 'packages/contracts/test')
-rw-r--r--packages/contracts/test/exchange/core.ts30
-rw-r--r--packages/contracts/test/exchange/transactions.ts10
2 files changed, 20 insertions, 20 deletions
diff --git a/packages/contracts/test/exchange/core.ts b/packages/contracts/test/exchange/core.ts
index 63c2fa6c0..ea37a1e99 100644
--- a/packages/contracts/test/exchange/core.ts
+++ b/packages/contracts/test/exchange/core.ts
@@ -620,30 +620,30 @@ describe('Exchange core', () => {
});
describe('cancelOrdersUpTo', () => {
- it('should fail to set makerEpoch less than current makerEpoch', async () => {
- const makerEpoch = new BigNumber(1);
- await exchangeWrapper.cancelOrdersUpToAsync(makerEpoch, makerAddress);
- const lesserMakerEpoch = new BigNumber(0);
+ it('should fail to set orderEpoch less than current orderEpoch', async () => {
+ const orderEpoch = new BigNumber(1);
+ await exchangeWrapper.cancelOrdersUpToAsync(orderEpoch, makerAddress);
+ const lesserOrderEpoch = new BigNumber(0);
return expectRevertOrAlwaysFailingTransactionAsync(
- exchangeWrapper.cancelOrdersUpToAsync(lesserMakerEpoch, makerAddress),
+ exchangeWrapper.cancelOrdersUpToAsync(lesserOrderEpoch, makerAddress),
);
});
- it('should fail to set makerEpoch equal to existing makerEpoch', async () => {
- const makerEpoch = new BigNumber(1);
- await exchangeWrapper.cancelOrdersUpToAsync(makerEpoch, makerAddress);
+ it('should fail to set orderEpoch equal to existing orderEpoch', async () => {
+ const orderEpoch = new BigNumber(1);
+ await exchangeWrapper.cancelOrdersUpToAsync(orderEpoch, makerAddress);
return expectRevertOrAlwaysFailingTransactionAsync(
- exchangeWrapper.cancelOrdersUpToAsync(makerEpoch, makerAddress),
+ exchangeWrapper.cancelOrdersUpToAsync(orderEpoch, makerAddress),
);
});
- it('should cancel only orders with a makerEpoch less than existing makerEpoch', async () => {
- // Cancel all transactions with a makerEpoch less than 1
- const makerEpoch = new BigNumber(1);
- await exchangeWrapper.cancelOrdersUpToAsync(makerEpoch, makerAddress);
+ it('should cancel only orders with a orderEpoch less than existing orderEpoch', async () => {
+ // Cancel all transactions with a orderEpoch less than 1
+ const orderEpoch = new BigNumber(1);
+ await exchangeWrapper.cancelOrdersUpToAsync(orderEpoch, makerAddress);
- // Create 3 orders with makerEpoch values: 0,1,2,3
- // Since we cancelled with makerEpoch=1, orders with makerEpoch<=1 will not be processed
+ // Create 3 orders with orderEpoch values: 0,1,2,3
+ // Since we cancelled with orderEpoch=1, orders with orderEpoch<=1 will not be processed
erc20Balances = await erc20Wrapper.getBalancesAsync();
const signedOrders = [
orderFactory.newSignedOrder({
diff --git a/packages/contracts/test/exchange/transactions.ts b/packages/contracts/test/exchange/transactions.ts
index 088b537cc..9a625880c 100644
--- a/packages/contracts/test/exchange/transactions.ts
+++ b/packages/contracts/test/exchange/transactions.ts
@@ -218,11 +218,11 @@ describe('Exchange transactions', () => {
senderAddress: exchangeWrapperContract.address,
salt: orderSalt,
});
- const cancelSalt = orderSalt.add(1);
- const cancelData = exchange.cancelOrdersUpTo.getABIEncodedTransactionData(cancelSalt);
+ const targetOrderEpoch = orderSalt.add(1);
+ const cancelData = exchange.cancelOrdersUpTo.getABIEncodedTransactionData(targetOrderEpoch);
const signedCancelTx = makerTransactionFactory.newSignedTransaction(cancelData);
await exchangeWrapperContract.cancelOrdersUpTo.sendTransactionAsync(
- cancelSalt,
+ targetOrderEpoch,
signedCancelTx.salt,
signedCancelTx.signature,
{
@@ -256,8 +256,8 @@ describe('Exchange transactions', () => {
senderAddress: exchangeWrapperContract.address,
salt: orderSalt,
});
- const cancelSalt = orderSalt.add(1);
- await exchangeWrapper.cancelOrdersUpToAsync(cancelSalt, makerAddress);
+ const targetOrderEpoch = orderSalt.add(1);
+ await exchangeWrapper.cancelOrdersUpToAsync(targetOrderEpoch, makerAddress);
erc20Balances = await erc20Wrapper.getBalancesAsync();
const takerAssetFillAmount = signedOrder.takerAssetAmount;