diff options
-rw-r--r-- | src/artifacts/exchange/Exchange_v1.json | 4 | ||||
-rw-r--r-- | src/contract_wrappers/exchange_wrapper.ts | 18 | ||||
-rw-r--r-- | src/types.ts | 7 |
3 files changed, 15 insertions, 14 deletions
diff --git a/src/artifacts/exchange/Exchange_v1.json b/src/artifacts/exchange/Exchange_v1.json index 26b280cf1..646cc6551 100644 --- a/src/artifacts/exchange/Exchange_v1.json +++ b/src/artifacts/exchange/Exchange_v1.json @@ -417,7 +417,7 @@ "type": "uint256[6]" }, { - "name": "fillValueT", + "name": "fillTakerTokenAmount", "type": "uint256" }, { @@ -433,7 +433,7 @@ "type": "bytes32" } ], - "name": "fillOrKill", + "name": "fillOrKillOrder", "outputs": [ { "name": "success", diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts index 5bf4a3bf3..da7e22f61 100644 --- a/src/contract_wrappers/exchange_wrapper.ts +++ b/src/contract_wrappers/exchange_wrapper.ts @@ -371,29 +371,29 @@ export class ExchangeWrapper extends ContractWrapper { * the fill order is abandoned. * @param signedOrder An object that conforms to the SignedOrder interface. The * signedOrder you wish to fill. - * @param takerTokenFillAmount The total amount of the takerTokens you would like to fill. + * @param fillTakerTokenAmount The total amount of the takerTokens you would like to fill. * @param takerAddress The user Ethereum address who would like to fill this order. * Must be available via the supplied Web3.Provider passed to 0x.js. */ @decorators.contractCallErrorHandler - public async fillOrKillOrderAsync(signedOrder: SignedOrder, takerTokenFillAmount: BigNumber.BigNumber, + public async fillOrKillOrderAsync(signedOrder: SignedOrder, fillTakerTokenAmount: BigNumber.BigNumber, takerAddress: string): Promise<void> { assert.doesConformToSchema('signedOrder', signedOrder, signedOrderSchema); - assert.isBigNumber('takerTokenFillAmount', takerTokenFillAmount); + assert.isBigNumber('fillTakerTokenAmount', fillTakerTokenAmount); await assert.isSenderAddressAsync('takerAddress', takerAddress, this._web3Wrapper); const exchangeInstance = await this._getExchangeContractAsync(signedOrder.exchangeContractAddress); - await this._validateFillOrderAndThrowIfInvalidAsync(signedOrder, takerTokenFillAmount, takerAddress); + await this._validateFillOrderAndThrowIfInvalidAsync(signedOrder, fillTakerTokenAmount, takerAddress); await this._validateFillOrKillOrderAndThrowIfInvalidAsync(signedOrder, exchangeInstance.address, - takerTokenFillAmount); + fillTakerTokenAmount); const [orderAddresses, orderValues] = ExchangeWrapper._getOrderAddressesAndValues(signedOrder); - const gas = await exchangeInstance.fillOrKill.estimateGas( + const gas = await exchangeInstance.fillOrKillOrder.estimateGas( orderAddresses, orderValues, - takerTokenFillAmount, + fillTakerTokenAmount, signedOrder.ecSignature.v, signedOrder.ecSignature.r, signedOrder.ecSignature.s, @@ -401,10 +401,10 @@ export class ExchangeWrapper extends ContractWrapper { from: takerAddress, }, ); - const response: ContractResponse = await exchangeInstance.fillOrKill( + const response: ContractResponse = await exchangeInstance.fillOrKillOrder( orderAddresses, orderValues, - takerTokenFillAmount, + fillTakerTokenAmount, signedOrder.ecSignature.v, signedOrder.ecSignature.r, signedOrder.ecSignature.s, diff --git a/src/types.ts b/src/types.ts index e9b7f0c10..9e97d1c9d 100644 --- a/src/types.ts +++ b/src/types.ts @@ -112,10 +112,11 @@ export interface ExchangeContract extends ContractInstance { cancelTakerTokenAmounts: BigNumber.BigNumber[], txOpts?: TxOpts) => number; }; - fillOrKill: { - (orderAddresses: OrderAddresses, orderValues: OrderValues, fillAmount: BigNumber.BigNumber, + fillOrKillOrder: { + (orderAddresses: OrderAddresses, orderValues: OrderValues, fillTakerTokenAmount: BigNumber.BigNumber, v: number, r: string, s: string, txOpts?: TxOpts): ContractResponse; - estimateGas: (orderAddresses: OrderAddresses, orderValues: OrderValues, fillAmount: BigNumber.BigNumber, + estimateGas: (orderAddresses: OrderAddresses, orderValues: OrderValues, + fillTakerTokenAmount: BigNumber.BigNumber, v: number, r: string, s: string, txOpts?: TxOpts) => number; }; batchFillOrKillOrders: { |