Fix StaticCallProxy Exchange integration tests
This commit is contained in:
parent
4f6f126952
commit
d73f7beb2f
@ -21,7 +21,6 @@ import {
|
|||||||
chaiSetup,
|
chaiSetup,
|
||||||
constants,
|
constants,
|
||||||
ERC20BalancesByOwner,
|
ERC20BalancesByOwner,
|
||||||
expectTransactionFailedAsync,
|
|
||||||
getLatestBlockTimestampAsync,
|
getLatestBlockTimestampAsync,
|
||||||
increaseTimeAndMineBlockAsync,
|
increaseTimeAndMineBlockAsync,
|
||||||
OrderFactory,
|
OrderFactory,
|
||||||
@ -1724,10 +1723,14 @@ describe('Exchange core', () => {
|
|||||||
constants.KECCAK256_NULL,
|
constants.KECCAK256_NULL,
|
||||||
);
|
);
|
||||||
signedOrder = await orderFactory.newSignedOrderAsync({ makerAssetData: assetData });
|
signedOrder = await orderFactory.newSignedOrderAsync({ makerAssetData: assetData });
|
||||||
await expectTransactionFailedAsync(
|
const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder);
|
||||||
exchangeWrapper.fillOrderAsync(signedOrder, takerAddress),
|
const expectedError = new ExchangeRevertErrors.AssetProxyTransferError(
|
||||||
RevertReason.TargetNotEven,
|
orderHashHex,
|
||||||
|
assetData,
|
||||||
|
new StringRevertError(RevertReason.TargetNotEven).encode(),
|
||||||
);
|
);
|
||||||
|
const tx = exchangeWrapper.fillOrderAsync(signedOrder, takerAddress);
|
||||||
|
return expect(tx).to.revertWith(expectedError);
|
||||||
});
|
});
|
||||||
it('should fill the order if the staticcall is successful', async () => {
|
it('should fill the order if the staticcall is successful', async () => {
|
||||||
const staticCallData = staticCallTarget.assertEvenNumber.getABIEncodedTransactionData(
|
const staticCallData = staticCallTarget.assertEvenNumber.getABIEncodedTransactionData(
|
||||||
@ -1778,10 +1781,14 @@ describe('Exchange core', () => {
|
|||||||
[assetDataUtils.encodeERC20AssetData(defaultMakerAssetAddress), staticCallAssetData],
|
[assetDataUtils.encodeERC20AssetData(defaultMakerAssetAddress), staticCallAssetData],
|
||||||
);
|
);
|
||||||
signedOrder = await orderFactory.newSignedOrderAsync({ makerAssetData: assetData });
|
signedOrder = await orderFactory.newSignedOrderAsync({ makerAssetData: assetData });
|
||||||
await expectTransactionFailedAsync(
|
const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder);
|
||||||
exchangeWrapper.fillOrderAsync(signedOrder, takerAddress),
|
const expectedError = new ExchangeRevertErrors.AssetProxyTransferError(
|
||||||
RevertReason.TargetNotEven,
|
orderHashHex,
|
||||||
|
assetData,
|
||||||
|
new StringRevertError(RevertReason.TargetNotEven).encode(),
|
||||||
);
|
);
|
||||||
|
const tx = exchangeWrapper.fillOrderAsync(signedOrder, takerAddress);
|
||||||
|
return expect(tx).to.revertWith(expectedError);
|
||||||
});
|
});
|
||||||
it('should fill the order is the staticcall is successful using the MultiAssetProxy', async () => {
|
it('should fill the order is the staticcall is successful using the MultiAssetProxy', async () => {
|
||||||
const staticCallData = staticCallTarget.assertEvenNumber.getABIEncodedTransactionData(
|
const staticCallData = staticCallTarget.assertEvenNumber.getABIEncodedTransactionData(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user