aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-07-08 06:23:37 +0800
committerFabio Berger <me@fabioberger.com>2017-07-11 15:30:14 +0800
commit540ac54dee317c494feb1bbcfcd15b7f443d6119 (patch)
tree3dfb724d8f1a3baf7bf8c35acc1527d670fe306d /src
parentcaaad46991fdbac95e27015df24598794e04b7e1 (diff)
downloaddexon-sol-tools-540ac54dee317c494feb1bbcfcd15b7f443d6119.tar
dexon-sol-tools-540ac54dee317c494feb1bbcfcd15b7f443d6119.tar.gz
dexon-sol-tools-540ac54dee317c494feb1bbcfcd15b7f443d6119.tar.bz2
dexon-sol-tools-540ac54dee317c494feb1bbcfcd15b7f443d6119.tar.lz
dexon-sol-tools-540ac54dee317c494feb1bbcfcd15b7f443d6119.tar.xz
dexon-sol-tools-540ac54dee317c494feb1bbcfcd15b7f443d6119.tar.zst
dexon-sol-tools-540ac54dee317c494feb1bbcfcd15b7f443d6119.zip
Migrate batchCancelOrders
Diffstat (limited to 'src')
-rw-r--r--src/artifacts/exchange/Exchange_v1.json4
-rw-r--r--src/contract_wrappers/exchange_wrapper.ts10
-rw-r--r--src/types.ts7
3 files changed, 11 insertions, 10 deletions
diff --git a/src/artifacts/exchange/Exchange_v1.json b/src/artifacts/exchange/Exchange_v1.json
index 35d322a70..6dccff2cb 100644
--- a/src/artifacts/exchange/Exchange_v1.json
+++ b/src/artifacts/exchange/Exchange_v1.json
@@ -127,11 +127,11 @@
"type": "uint256[6][]"
},
{
- "name": "cancelValuesT",
+ "name": "cancelTakerTokenAmounts",
"type": "uint256[]"
}
],
- "name": "batchCancel",
+ "name": "batchCancelOrders",
"outputs": [
{
"name": "success",
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts
index 2000ebc16..32dfc29cc 100644
--- a/src/contract_wrappers/exchange_wrapper.ts
+++ b/src/contract_wrappers/exchange_wrapper.ts
@@ -549,20 +549,20 @@ export class ExchangeWrapper extends ContractWrapper {
];
});
// We use _.unzip<any> because _.unzip doesn't type check if values have different types :'(
- const [orderAddresses, orderValues, takerTokenCancelAmounts] =
+ const [orderAddresses, orderValues, cancelTakerTokenAmounts] =
_.unzip<any>(orderAddressesValuesAndTakerTokenCancelAmounts);
- const gas = await exchangeInstance.batchCancel.estimateGas(
+ const gas = await exchangeInstance.batchCancelOrders.estimateGas(
orderAddresses,
orderValues,
- takerTokenCancelAmounts,
+ cancelTakerTokenAmounts,
{
from: maker,
},
);
- const response: ContractResponse = await exchangeInstance.batchCancel(
+ const response: ContractResponse = await exchangeInstance.batchCancelOrders(
orderAddresses,
orderValues,
- takerTokenCancelAmounts,
+ cancelTakerTokenAmounts,
{
from: maker,
gas,
diff --git a/src/types.ts b/src/types.ts
index fce42352f..4962dc016 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -96,10 +96,11 @@ export interface ExchangeContract extends ContractInstance {
canceltakerTokenAmount: BigNumber.BigNumber,
txOpts?: TxOpts) => number;
};
- batchCancel: {
- (orderAddresses: OrderAddresses[], orderValues: OrderValues[], cancelAmount: BigNumber.BigNumber[],
+ batchCancelOrders: {
+ (orderAddresses: OrderAddresses[], orderValues: OrderValues[], cancelTakerTokenAmounts: BigNumber.BigNumber[],
txOpts?: TxOpts): ContractResponse;
- estimateGas: (orderAddresses: OrderAddresses[], orderValues: OrderValues[], cancelAmount: BigNumber.BigNumber[],
+ estimateGas: (orderAddresses: OrderAddresses[], orderValues: OrderValues[],
+ cancelTakerTokenAmounts: BigNumber.BigNumber[],
txOpts?: TxOpts) => number;
};
fillOrKill: {