factored out interfaces in types.ts
This commit is contained in:
@@ -2,14 +2,7 @@ import { IERC20BridgeSamplerContract } from '@0x/contract-wrappers';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
|
||||
import { samplerOperations } from './sampler_operations';
|
||||
|
||||
/**
|
||||
* A composable operation the be run in `DexOrderSampler.executeAsync()`.
|
||||
*/
|
||||
export interface BatchedOperation<TResult> {
|
||||
encodeCall(contract: IERC20BridgeSamplerContract): string;
|
||||
handleCallResultsAsync(contract: IERC20BridgeSamplerContract, callResults: string): Promise<TResult>;
|
||||
}
|
||||
import { BatchedOperation } from './types';
|
||||
|
||||
/**
|
||||
* Generate sample amounts up to `maxFillAmount`.
|
||||
|
@@ -2,8 +2,7 @@ import { constants } from 'zlib';
|
||||
|
||||
import { BigNumber, ERC20BridgeSource, SignedOrder } from '../..';
|
||||
|
||||
import { BatchedOperation } from './sampler';
|
||||
import { DexSample } from './types';
|
||||
import { BatchedOperation, DexSample } from './types';
|
||||
|
||||
/**
|
||||
* Composable operations that can be batched in a single transaction,
|
||||
|
@@ -1,3 +1,4 @@
|
||||
import { IERC20BridgeSamplerContract } from '@0x/contract-wrappers';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
|
||||
import { SignedOrderWithFillableAmounts } from '../../types';
|
||||
@@ -176,3 +177,11 @@ export interface GetMarketOrdersOpts {
|
||||
*/
|
||||
fees: { [source: string]: BigNumber };
|
||||
}
|
||||
|
||||
/**
|
||||
* A composable operation the be run in `DexOrderSampler.executeAsync()`.
|
||||
*/
|
||||
export interface BatchedOperation<TResult> {
|
||||
encodeCall(contract: IERC20BridgeSamplerContract): string;
|
||||
handleCallResultsAsync(contract: IERC20BridgeSamplerContract, callResults: string): Promise<TResult>;
|
||||
}
|
||||
|
Reference in New Issue
Block a user