@0x/contracts-exchange: Removed dependency on OrderValidationUtils. The tests using it didn't really warrant the full validation suite.

`@0x/contracts-test-utils`: Move all the `OrderScenario` related types into the `contracts-exchange` package because no one else is using them.
This commit is contained in:
Lawrence Forman
2019-05-19 00:21:44 -04:00
committed by Amir Bandeali
parent acd857a8c0
commit f7f55cad43
7 changed files with 176 additions and 207 deletions

View File

@@ -1,8 +1,11 @@
import { chaiSetup, txDefaults, web3Wrapper } from '@0x/contracts-test-utils';
import { BlockchainLifecycle } from '@0x/dev-utils';
import * as _ from 'lodash';
import {
AllowanceAmountScenario,
AssetDataScenario,
BalanceAmountScenario,
chaiSetup,
ExpirationTimeSecondsScenario,
FeeAssetDataScenario,
FeeRecipientAddressScenario,
@@ -10,13 +13,12 @@ import {
OrderAssetAmountScenario,
TakerAssetFillAmountScenario,
TakerScenario,
txDefaults,
web3Wrapper,
} from '@0x/contracts-test-utils';
import { BlockchainLifecycle } from '@0x/dev-utils';
import * as _ from 'lodash';
} from './utils/fill_order_scenarios';
import { FillOrderCombinatorialUtils, fillOrderCombinatorialUtilsFactoryAsync } from '../src';
import {
FillOrderCombinatorialUtils,
fillOrderCombinatorialUtilsFactoryAsync,
} from './utils/fill_order_combinatorial_utils';
chaiSetup.configure();
const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
@@ -35,7 +37,7 @@ const defaultFillScenario = {
makerFeeAssetDataScenario: FeeAssetDataScenario.ERC20EighteenDecimals,
takerFeeAssetDataScenario: FeeAssetDataScenario.ERC20EighteenDecimals,
},
takerAssetFillAmountScenario: TakerAssetFillAmountScenario.LessThanRemainingFillableTakerAssetAmount,
takerAssetFillAmountScenario: TakerAssetFillAmountScenario.LessThanTakerAssetAmount,
makerStateScenario: {
traderAssetBalance: BalanceAmountScenario.Higher,
traderAssetAllowance: AllowanceAmountScenario.Unlimited,
@@ -134,7 +136,7 @@ describe('FillOrder Tests', () => {
it('should fill remaining value if takerAssetFillAmount > remaining takerAssetAmount', async () => {
const fillScenario = {
...defaultFillScenario,
takerAssetFillAmountScenario: TakerAssetFillAmountScenario.GreaterThanRemainingFillableTakerAssetAmount,
takerAssetFillAmountScenario: TakerAssetFillAmountScenario.GreaterThanTakerAssetAmount,
};
await fillOrderCombinatorialUtils.testFillOrderScenarioSuccessAsync(fillScenario);
});
@@ -189,7 +191,7 @@ describe('FillOrder Tests', () => {
...defaultFillScenario.orderScenario,
makerAssetAmountScenario: OrderAssetAmountScenario.Zero,
},
takerAssetFillAmountScenario: TakerAssetFillAmountScenario.GreaterThanRemainingFillableTakerAssetAmount,
takerAssetFillAmountScenario: TakerAssetFillAmountScenario.GreaterThanTakerAssetAmount,
};
await fillOrderCombinatorialUtils.testFillOrderScenarioFailureAsync(fillScenario);
});
@@ -201,7 +203,7 @@ describe('FillOrder Tests', () => {
...defaultFillScenario.orderScenario,
takerAssetAmountScenario: OrderAssetAmountScenario.Zero,
},
takerAssetFillAmountScenario: TakerAssetFillAmountScenario.GreaterThanRemainingFillableTakerAssetAmount,
takerAssetFillAmountScenario: TakerAssetFillAmountScenario.GreaterThanTakerAssetAmount,
};
await fillOrderCombinatorialUtils.testFillOrderScenarioFailureAsync(fillScenario);
});
@@ -323,7 +325,7 @@ describe('FillOrder Tests', () => {
makerAssetDataScenario: AssetDataScenario.ERC721,
takerAssetDataScenario: AssetDataScenario.ERC721,
},
takerAssetFillAmountScenario: TakerAssetFillAmountScenario.ExactlyRemainingFillableTakerAssetAmount,
takerAssetFillAmountScenario: TakerAssetFillAmountScenario.ExactlyTakerAssetAmount,
};
await fillOrderCombinatorialUtils.testFillOrderScenarioSuccessAsync(fillScenario);
});
@@ -336,7 +338,7 @@ describe('FillOrder Tests', () => {
makerAssetDataScenario: AssetDataScenario.ERC721,
takerAssetDataScenario: AssetDataScenario.ERC20EighteenDecimals,
},
takerAssetFillAmountScenario: TakerAssetFillAmountScenario.ExactlyRemainingFillableTakerAssetAmount,
takerAssetFillAmountScenario: TakerAssetFillAmountScenario.ExactlyTakerAssetAmount,
};
await fillOrderCombinatorialUtils.testFillOrderScenarioSuccessAsync(fillScenario);
});
@@ -349,7 +351,7 @@ describe('FillOrder Tests', () => {
makerAssetDataScenario: AssetDataScenario.ERC20EighteenDecimals,
takerAssetDataScenario: AssetDataScenario.ERC721,
},
takerAssetFillAmountScenario: TakerAssetFillAmountScenario.ExactlyRemainingFillableTakerAssetAmount,
takerAssetFillAmountScenario: TakerAssetFillAmountScenario.ExactlyTakerAssetAmount,
};
await fillOrderCombinatorialUtils.testFillOrderScenarioSuccessAsync(fillScenario);
});
@@ -362,7 +364,7 @@ describe('FillOrder Tests', () => {
makerAssetDataScenario: AssetDataScenario.ERC721,
takerAssetDataScenario: AssetDataScenario.ERC20EighteenDecimals,
},
takerAssetFillAmountScenario: TakerAssetFillAmountScenario.ExactlyRemainingFillableTakerAssetAmount,
takerAssetFillAmountScenario: TakerAssetFillAmountScenario.ExactlyTakerAssetAmount,
makerStateScenario: {
...defaultFillScenario.makerStateScenario,
traderAssetAllowance: AllowanceAmountScenario.Unlimited,
@@ -379,7 +381,7 @@ describe('FillOrder Tests', () => {
makerAssetDataScenario: AssetDataScenario.ERC721,
takerAssetDataScenario: AssetDataScenario.ERC721,
},
takerAssetFillAmountScenario: TakerAssetFillAmountScenario.ExactlyRemainingFillableTakerAssetAmount,
takerAssetFillAmountScenario: TakerAssetFillAmountScenario.ExactlyTakerAssetAmount,
makerStateScenario: {
...defaultFillScenario.makerStateScenario,
traderAssetAllowance: AllowanceAmountScenario.Unlimited,

View File

@@ -1,30 +1,10 @@
import { ERC20Wrapper, ERC721Wrapper } from '@0x/contracts-asset-proxy';
import {
AllowanceAmountScenario,
AssetDataScenario,
BalanceAmountScenario,
chaiSetup,
constants,
ExpirationTimeSecondsScenario,
FeeAssetDataScenario,
FeeRecipientAddressScenario,
FillResults,
FillScenario,
OrderAssetAmountScenario,
OrderScenario,
orderUtils,
signingUtils,
TakerAssetFillAmountScenario,
TakerScenario,
TraderStateScenario,
} from '@0x/contracts-test-utils';
import { chaiSetup, constants, FillResults, orderUtils, signingUtils } from '@0x/contracts-test-utils';
import {
assetDataUtils,
BalanceAndProxyAllowanceLazyStore,
ExchangeRevertErrors,
orderHashUtils,
OrderStateUtils,
OrderValidationUtils,
} from '@0x/order-utils';
import { AssetProxyId, Order, SignatureType, SignedOrder } from '@0x/types';
import { BigNumber, errorUtils, providerUtils, RevertError, StringRevertError } from '@0x/utils';
@@ -38,6 +18,20 @@ import { artifacts, ExchangeContract, ExchangeFillEventArgs } from '../../src';
import { AssetWrapper } from './asset_wrapper';
import { ExchangeWrapper } from './exchange_wrapper';
import {
AllowanceAmountScenario,
AssetDataScenario,
BalanceAmountScenario,
ExpirationTimeSecondsScenario,
FeeAssetDataScenario,
FeeRecipientAddressScenario,
FillScenario,
OrderAssetAmountScenario,
OrderScenario,
TakerAssetFillAmountScenario,
TakerScenario,
TraderStateScenario,
} from './fill_order_scenarios';
import { FillOrderError, FillOrderSimulator } from './fill_order_simulator';
import { OrderFactoryFromScenario } from './order_factory_from_scenario';
import { SimpleAssetBalanceAndProxyAllowanceFetcher } from './simple_asset_balance_and_proxy_allowance_fetcher';
@@ -159,7 +153,6 @@ export class FillOrderCombinatorialUtils {
public assetWrapper: AssetWrapper;
public balanceAndProxyAllowanceFetcher: SimpleAssetBalanceAndProxyAllowanceFetcher;
public orderFilledCancelledFetcher: SimpleOrderFilledCancelledFetcher;
public orderValidationUtils: OrderValidationUtils;
public static generateFillOrderCombinations(): FillScenario[] {
const takerScenarios = [
@@ -220,10 +213,9 @@ export class FillOrderCombinatorialUtils {
FeeAssetDataScenario.TakerToken,
];
const takerAssetFillAmountScenario = [
TakerAssetFillAmountScenario.ExactlyRemainingFillableTakerAssetAmount,
// TakerAssetFillAmountScenario.GreaterThanRemainingFillableTakerAssetAmount,
// TakerAssetFillAmountScenario.LessThanRemainingFillableTakerAssetAmount,
TakerAssetFillAmountScenario.ExactlyTakerAssetAmount,
// TakerAssetFillAmountScenario.GreaterThanTakerAssetAmount,
// TakerAssetFillAmountScenario.LessThanTakerAssetAmount,
];
const makerAssetBalanceScenario = [
BalanceAmountScenario.Higher,
@@ -383,7 +375,6 @@ export class FillOrderCombinatorialUtils {
this.assetWrapper = assetWrapper;
this.balanceAndProxyAllowanceFetcher = new SimpleAssetBalanceAndProxyAllowanceFetcher(assetWrapper);
this.orderFilledCancelledFetcher = new SimpleOrderFilledCancelledFetcher(exchangeWrapper);
this.orderValidationUtils = new OrderValidationUtils(this.orderFilledCancelledFetcher, provider);
}
public async testFillOrderScenarioAsync(fillScenario: FillScenario): Promise<void> {
@@ -408,7 +399,7 @@ export class FillOrderCombinatorialUtils {
): Promise<void> {
const lazyStore = new BalanceAndProxyAllowanceLazyStore(this.balanceAndProxyAllowanceFetcher);
const signedOrder = await this._generateSignedOrder(fillScenario.orderScenario);
const takerAssetFillAmount = await this._getTakerAssetFillAmountAsync(
const takerAssetFillAmount = getTakerAssetFillAmountAsync(
signedOrder,
fillScenario.takerAssetFillAmountScenario,
);
@@ -647,60 +638,6 @@ export class FillOrderCombinatorialUtils {
);
}
private async _getTakerAssetFillAmountAsync(
signedOrder: SignedOrder,
takerAssetFillAmountScenario: TakerAssetFillAmountScenario,
): Promise<BigNumber> {
const orderStateUtils = new OrderStateUtils(
this.balanceAndProxyAllowanceFetcher,
this.orderFilledCancelledFetcher,
);
// TODO: Write our own version of orderStateUtils.getMaxFillableTakerAssetAmountAsync
// because it doesn't properly take into account paying for maker/taker fees with received
// assets.
const fillableTakerAssetAmount = await orderStateUtils.getMaxFillableTakerAssetAmountAsync(
signedOrder,
this.takerAddress,
);
let takerAssetFillAmount;
switch (takerAssetFillAmountScenario) {
case TakerAssetFillAmountScenario.Zero:
takerAssetFillAmount = new BigNumber(0);
break;
case TakerAssetFillAmountScenario.ExactlyTakerAssetAmount:
takerAssetFillAmount = signedOrder.takerAssetAmount;
break;
case TakerAssetFillAmountScenario.ExactlyRemainingFillableTakerAssetAmount:
takerAssetFillAmount = fillableTakerAssetAmount;
break;
case TakerAssetFillAmountScenario.GreaterThanRemainingFillableTakerAssetAmount:
takerAssetFillAmount = fillableTakerAssetAmount.plus(1);
break;
case TakerAssetFillAmountScenario.LessThanRemainingFillableTakerAssetAmount:
const takerAssetProxyId = assetDataUtils.decodeAssetProxyId(signedOrder.takerAssetData);
const makerAssetProxyId = assetDataUtils.decodeAssetProxyId(signedOrder.makerAssetData);
const isEitherAssetERC721 =
takerAssetProxyId === AssetProxyId.ERC721 || makerAssetProxyId === AssetProxyId.ERC721;
if (isEitherAssetERC721) {
throw new Error(
'Cannot test `TakerAssetFillAmountScenario.LessThanRemainingFillableTakerAssetAmount` together with ERC721 assets since orders involving ERC721 must always be filled exactly.',
);
}
takerAssetFillAmount = fillableTakerAssetAmount.div(2).integerValue(BigNumber.ROUND_FLOOR);
break;
default:
throw errorUtils.spawnSwitchErr('TakerAssetFillAmountScenario', takerAssetFillAmountScenario);
}
return takerAssetFillAmount;
}
private async _modifyTraderStateAsync(
makerStateScenario: TraderStateScenario,
takerStateScenario: TraderStateScenario,
@@ -983,6 +920,44 @@ export class FillOrderCombinatorialUtils {
}
}
function getTakerAssetFillAmountAsync(
signedOrder: SignedOrder,
takerAssetFillAmountScenario: TakerAssetFillAmountScenario,
): BigNumber {
let takerAssetFillAmount;
switch (takerAssetFillAmountScenario) {
case TakerAssetFillAmountScenario.Zero:
takerAssetFillAmount = new BigNumber(0);
break;
case TakerAssetFillAmountScenario.ExactlyTakerAssetAmount:
takerAssetFillAmount = signedOrder.takerAssetAmount;
break;
case TakerAssetFillAmountScenario.GreaterThanTakerAssetAmount:
takerAssetFillAmount = signedOrder.takerAssetAmount.plus(1);
break;
case TakerAssetFillAmountScenario.LessThanTakerAssetAmount:
const takerAssetProxyId = assetDataUtils.decodeAssetProxyId(signedOrder.takerAssetData);
const makerAssetProxyId = assetDataUtils.decodeAssetProxyId(signedOrder.makerAssetData);
const isEitherAssetERC721 =
takerAssetProxyId === AssetProxyId.ERC721 || makerAssetProxyId === AssetProxyId.ERC721;
if (isEitherAssetERC721) {
throw new Error(
'Cannot test `TakerAssetFillAmountScenario.LessThanTakerAssetAmount` together with ERC721 assets since orders involving ERC721 must always be filled exactly.',
);
}
takerAssetFillAmount = signedOrder.takerAssetAmount.div(2).integerValue(BigNumber.ROUND_FLOOR);
break;
default:
throw errorUtils.spawnSwitchErr('TakerAssetFillAmountScenario', takerAssetFillAmountScenario);
}
return takerAssetFillAmount;
}
function fillErrorToRevertError(order: Order, error: FillOrderError): RevertError {
const orderHash = orderHashUtils.getOrderHashHex(order);
switch (error) {

View File

@@ -0,0 +1,96 @@
import { BigNumber } from '@0x/utils';
export enum FeeRecipientAddressScenario {
BurnAddress = 'BURN_ADDRESS',
EthUserAddress = 'ETH_USER_ADDRESS',
}
export enum OrderAssetAmountScenario {
Zero = 'ZERO',
Large = 'LARGE',
Small = 'SMALL',
}
export enum TakerScenario {
CorrectlySpecified = 'CORRECTLY_SPECIFIED',
IncorrectlySpecified = 'INCORRECTLY_SPECIFIED',
Unspecified = 'UNSPECIFIED',
}
export enum ExpirationTimeSecondsScenario {
InPast = 'IN_PAST',
InFuture = 'IN_FUTURE',
}
export enum AssetDataScenario {
ERC20ZeroDecimals = 'ERC20_ZERO_DECIMALS',
ERC20FiveDecimals = 'ERC20_FIVE_DECIMALS',
ERC20EighteenDecimals = 'ERC20_EIGHTEEN_DECIMALS',
ERC721 = 'ERC721',
}
export enum FeeAssetDataScenario {
ERC20ZeroDecimals = 'ERC20_ZERO_DECIMALS',
ERC20FiveDecimals = 'ERC20_FIVE_DECIMALS',
ERC20EighteenDecimals = 'ERC20_EIGHTEEN_DECIMALS',
ERC721 = 'ERC721',
MakerToken = 'MAKER_TOKEN',
TakerToken = 'TAKER_TOKEN',
}
export enum TakerAssetFillAmountScenario {
ExactlyTakerAssetAmount = 'EXACTLY_TAKER_ASSET_AMOUNT',
GreaterThanTakerAssetAmount = 'GREATER_THAN_TAKER_ASSET_AMOUNT',
LessThanTakerAssetAmount = 'LESS_THAN_TAKER_ASSET_AMOUNT',
Zero = 'ZERO',
}
export enum BalanceAmountScenario {
Zero = 'ZERO',
Exact = 'EXACT',
TooLow = 'TOO_LOW',
Higher = 'HIGHER',
}
export enum AllowanceAmountScenario {
Zero = 'ZERO',
Exact = 'EXACT',
TooLow = 'TOO_LOW',
Higher = 'HIGHER',
Unlimited = 'UNLIMITED',
}
export interface TraderStateScenario {
traderAssetBalance: BalanceAmountScenario;
traderAssetAllowance: AllowanceAmountScenario;
feeBalance: BalanceAmountScenario;
feeAllowance: AllowanceAmountScenario;
}
export interface FillScenario {
orderScenario: OrderScenario;
takerAssetFillAmountScenario: TakerAssetFillAmountScenario;
makerStateScenario: TraderStateScenario;
takerStateScenario: TraderStateScenario;
}
export interface FillResults {
makerAssetFilledAmount: BigNumber;
takerAssetFilledAmount: BigNumber;
makerFeePaid: BigNumber;
takerFeePaid: BigNumber;
}
export interface OrderScenario {
takerScenario: TakerScenario;
feeRecipientScenario: FeeRecipientAddressScenario;
makerAssetAmountScenario: OrderAssetAmountScenario;
takerAssetAmountScenario: OrderAssetAmountScenario;
makerFeeScenario: OrderAssetAmountScenario;
takerFeeScenario: OrderAssetAmountScenario;
expirationTimeSecondsScenario: ExpirationTimeSecondsScenario;
makerAssetDataScenario: AssetDataScenario;
takerAssetDataScenario: AssetDataScenario;
makerFeeAssetDataScenario: FeeAssetDataScenario;
takerFeeAssetDataScenario: FeeAssetDataScenario;
}

View File

@@ -1,5 +1,4 @@
export * from './exchange_wrapper';
export * from './fill_order_combinatorial_utils';
export * from './match_order_tester';
export * from './exchange_data_encoder';
export * from './types';

View File

@@ -1,18 +1,18 @@
import { DummyERC721TokenContract } from '@0x/contracts-erc721';
import { constants, ERC721TokenIdsByOwner } from '@0x/contracts-test-utils';
import { assetDataUtils, generatePseudoRandomSalt } from '@0x/order-utils';
import { Order } from '@0x/types';
import { BigNumber, errorUtils } from '@0x/utils';
import {
AssetDataScenario,
constants,
ERC721TokenIdsByOwner,
ExpirationTimeSecondsScenario,
FeeAssetDataScenario,
FeeRecipientAddressScenario,
OrderAssetAmountScenario,
OrderScenario,
TakerScenario,
} from '@0x/contracts-test-utils';
import { assetDataUtils, generatePseudoRandomSalt } from '@0x/order-utils';
import { Order } from '@0x/types';
import { BigNumber, errorUtils } from '@0x/utils';
} from './fill_order_scenarios';
const TEN_UNITS_EIGHTEEN_DECIMALS = new BigNumber('10e18');
const FIVE_UNITS_EIGHTEEN_DECIMALS = new BigNumber('5e18');

View File

@@ -29,30 +29,18 @@ export { bytes32Values, testCombinatoriallyWithReferenceFuncAsync, uint256Values
export { TransactionFactory } from './transaction_factory';
export { testWithReferenceFuncAsync } from './test_with_reference';
export {
AllowanceAmountScenario,
AssetDataScenario,
BalanceAmountScenario,
ContractName,
ERC20BalancesByOwner,
ERC1155FungibleHoldingsByOwner,
ERC1155HoldingsByOwner,
ERC1155NonFungibleHoldingsByOwner,
ERC721TokenIdsByOwner,
ExpirationTimeSecondsScenario,
FeeAssetDataScenario,
FeeRecipientAddressScenario,
FillResults,
FillScenario,
MarketBuyOrders,
MarketSellOrders,
OrderAssetAmountScenario,
OrderInfo,
OrderScenario,
OrderStatus,
TakerAssetFillAmountScenario,
TakerScenario,
Token,
TokenBalancesByOwner,
TraderStateScenario,
TransactionDataParams,
} from './types';

View File

@@ -142,97 +142,6 @@ export interface MatchOrder {
rightSignature: string;
}
// Combinatorial testing types
export enum FeeRecipientAddressScenario {
BurnAddress = 'BURN_ADDRESS',
EthUserAddress = 'ETH_USER_ADDRESS',
}
export enum OrderAssetAmountScenario {
Zero = 'ZERO',
Large = 'LARGE',
Small = 'SMALL',
}
export enum TakerScenario {
CorrectlySpecified = 'CORRECTLY_SPECIFIED',
IncorrectlySpecified = 'INCORRECTLY_SPECIFIED',
Unspecified = 'UNSPECIFIED',
}
export enum ExpirationTimeSecondsScenario {
InPast = 'IN_PAST',
InFuture = 'IN_FUTURE',
}
export enum AssetDataScenario {
ERC20ZeroDecimals = 'ERC20_ZERO_DECIMALS',
ERC20FiveDecimals = 'ERC20_FIVE_DECIMALS',
ERC20EighteenDecimals = 'ERC20_EIGHTEEN_DECIMALS',
ERC721 = 'ERC721',
}
export enum FeeAssetDataScenario {
ERC20ZeroDecimals = 'ERC20_ZERO_DECIMALS',
ERC20FiveDecimals = 'ERC20_FIVE_DECIMALS',
ERC20EighteenDecimals = 'ERC20_EIGHTEEN_DECIMALS',
ERC721 = 'ERC721',
MakerToken = 'MAKER_TOKEN',
TakerToken = 'TAKER_TOKEN',
}
export enum TakerAssetFillAmountScenario {
Zero = 'ZERO',
GreaterThanRemainingFillableTakerAssetAmount = 'GREATER_THAN_REMAINING_FILLABLE_TAKER_ASSET_AMOUNT',
LessThanRemainingFillableTakerAssetAmount = 'LESS_THAN_REMAINING_FILLABLE_TAKER_ASSET_AMOUNT',
ExactlyRemainingFillableTakerAssetAmount = 'EXACTLY_REMAINING_FILLABLE_TAKER_ASSET_AMOUNT',
ExactlyTakerAssetAmount = 'EXACTLY_TAKER_ASSET_AMOUNT',
}
export interface OrderScenario {
takerScenario: TakerScenario;
feeRecipientScenario: FeeRecipientAddressScenario;
makerAssetAmountScenario: OrderAssetAmountScenario;
takerAssetAmountScenario: OrderAssetAmountScenario;
makerFeeScenario: OrderAssetAmountScenario;
takerFeeScenario: OrderAssetAmountScenario;
expirationTimeSecondsScenario: ExpirationTimeSecondsScenario;
makerAssetDataScenario: AssetDataScenario;
takerAssetDataScenario: AssetDataScenario;
makerFeeAssetDataScenario: FeeAssetDataScenario;
takerFeeAssetDataScenario: FeeAssetDataScenario;
}
export enum BalanceAmountScenario {
Zero = 'ZERO',
Exact = 'EXACT',
TooLow = 'TOO_LOW',
Higher = 'HIGHER',
}
export enum AllowanceAmountScenario {
Zero = 'ZERO',
Exact = 'EXACT',
TooLow = 'TOO_LOW',
Higher = 'HIGHER',
Unlimited = 'UNLIMITED',
}
export interface TraderStateScenario {
traderAssetBalance: BalanceAmountScenario;
traderAssetAllowance: AllowanceAmountScenario;
feeBalance: BalanceAmountScenario;
feeAllowance: AllowanceAmountScenario;
}
export interface FillScenario {
orderScenario: OrderScenario;
takerAssetFillAmountScenario: TakerAssetFillAmountScenario;
makerStateScenario: TraderStateScenario;
takerStateScenario: TraderStateScenario;
}
export interface FillResults {
makerAssetFilledAmount: BigNumber;
takerAssetFilledAmount: BigNumber;