Migrate batchFillOrKillOrders

This commit is contained in:
Leonid Logvinov
2017-07-07 15:54:25 -07:00
parent 53b38105dd
commit 1aaa0020d0
3 changed files with 11 additions and 10 deletions

View File

@@ -313,7 +313,7 @@
"type": "uint256[6][]"
},
{
"name": "fillValuesT",
"name": "fillTakerTokenAmounts",
"type": "uint256[]"
},
{
@@ -329,7 +329,7 @@
"type": "bytes32[]"
}
],
"name": "batchFillOrKill",
"name": "batchFillOrKillOrders",
"outputs": [
{
"name": "success",

View File

@@ -453,13 +453,13 @@ export class ExchangeWrapper extends ContractWrapper {
});
// We use _.unzip<any> because _.unzip doesn't type check if values have different types :'(
const [orderAddresses, orderValues, fillTakerAmounts, vParams, rParams, sParams] =
const [orderAddresses, orderValues, fillTakerTokenAmounts, vParams, rParams, sParams] =
_.unzip<any>(orderAddressesValuesAndTakerTokenFillAmounts);
const gas = await exchangeInstance.batchFillOrKill.estimateGas(
const gas = await exchangeInstance.batchFillOrKillOrders.estimateGas(
orderAddresses,
orderValues,
fillTakerAmounts,
fillTakerTokenAmounts,
vParams,
rParams,
sParams,
@@ -467,10 +467,10 @@ export class ExchangeWrapper extends ContractWrapper {
from: takerAddress,
},
);
const response: ContractResponse = await exchangeInstance.batchFillOrKill(
const response: ContractResponse = await exchangeInstance.batchFillOrKillOrders(
orderAddresses,
orderValues,
fillTakerAmounts,
fillTakerTokenAmounts,
vParams,
rParams,
sParams,

View File

@@ -118,10 +118,11 @@ export interface ExchangeContract extends ContractInstance {
estimateGas: (orderAddresses: OrderAddresses, orderValues: OrderValues, fillAmount: BigNumber.BigNumber,
v: number, r: string, s: string, txOpts?: TxOpts) => number;
};
batchFillOrKill: {
(orderAddresses: OrderAddresses[], orderValues: OrderValues[], fillValuesT: BigNumber.BigNumber[],
batchFillOrKillOrders: {
(orderAddresses: OrderAddresses[], orderValues: OrderValues[], fillTakerTokenAmounts: BigNumber.BigNumber[],
v: number[], r: string[], s: string[], txOpts: TxOpts): ContractResponse;
estimateGas: (orderAddresses: OrderAddresses[], orderValues: OrderValues[], fillValuesT: BigNumber.BigNumber[],
estimateGas: (orderAddresses: OrderAddresses[], orderValues: OrderValues[],
fillTakerTokenAmounts: BigNumber.BigNumber[],
v: number[], r: string[], s: string[], txOpts?: TxOpts) => number;
};
filled: {