diff options
author | Leonid <logvinov.leon@gmail.com> | 2017-11-28 05:53:21 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-28 05:53:21 +0800 |
commit | cf0a8b2d0503f9d08ac789024d44b196613ecdc3 (patch) | |
tree | 75653154b85dd6df06da46af9411baf57c23367b /packages/0x.js/src/contract_wrappers | |
parent | 37f0051d8380279a1a882cdc724e54fc09117901 (diff) | |
parent | 4a17f5e82074b01e74ae6982e82419a037eebdb4 (diff) | |
download | dexon-sol-tools-cf0a8b2d0503f9d08ac789024d44b196613ecdc3.tar dexon-sol-tools-cf0a8b2d0503f9d08ac789024d44b196613ecdc3.tar.gz dexon-sol-tools-cf0a8b2d0503f9d08ac789024d44b196613ecdc3.tar.bz2 dexon-sol-tools-cf0a8b2d0503f9d08ac789024d44b196613ecdc3.tar.lz dexon-sol-tools-cf0a8b2d0503f9d08ac789024d44b196613ecdc3.tar.xz dexon-sol-tools-cf0a8b2d0503f9d08ac789024d44b196613ecdc3.tar.zst dexon-sol-tools-cf0a8b2d0503f9d08ac789024d44b196613ecdc3.zip |
Merge branch 'development' into feature/passNetworkId
Diffstat (limited to 'packages/0x.js/src/contract_wrappers')
-rw-r--r-- | packages/0x.js/src/contract_wrappers/exchange_wrapper.ts | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts b/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts index 1ff9ace3b..cd38c78fc 100644 --- a/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts +++ b/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts @@ -26,10 +26,10 @@ import { OrderTransactionOpts, OrderValues, RawLog, - SignedOrder, - SubscriptionOpts, - ValidateOrderFillableOpts, - ZeroExError, + EventCallback, + ExchangeContractEventArgs, + DecodedLogArgs, + BlockParamLiteral, } from '../types'; import {AbiDecoder} from '../utils/abi_decoder'; import {assert} from '../utils/assert'; @@ -181,7 +181,7 @@ export class ExchangeWrapper extends ContractWrapper { orderTransactionOpts.shouldValidate; if (shouldValidate) { const zrxTokenAddress = this.getZRXTokenAddress(); - const exchangeTradeEmulator = new ExchangeTransferSimulator(this._tokenWrapper); + const exchangeTradeEmulator = new ExchangeTransferSimulator(this._tokenWrapper, BlockParamLiteral.Latest); await this._orderValidationUtils.validateFillOrderThrowIfInvalidAsync( exchangeTradeEmulator, signedOrder, fillTakerTokenAmount, takerAddress, zrxTokenAddress); } @@ -253,7 +253,7 @@ export class ExchangeWrapper extends ContractWrapper { orderTransactionOpts.shouldValidate; if (shouldValidate) { const zrxTokenAddress = this.getZRXTokenAddress(); - const exchangeTradeEmulator = new ExchangeTransferSimulator(this._tokenWrapper); + const exchangeTradeEmulator = new ExchangeTransferSimulator(this._tokenWrapper, BlockParamLiteral.Latest); for (const signedOrder of signedOrders) { await this._orderValidationUtils.validateFillOrderThrowIfInvalidAsync( exchangeTradeEmulator, signedOrder, fillTakerTokenAmount, takerAddress, zrxTokenAddress); @@ -343,7 +343,7 @@ export class ExchangeWrapper extends ContractWrapper { orderTransactionOpts.shouldValidate; if (shouldValidate) { const zrxTokenAddress = this.getZRXTokenAddress(); - const exchangeTradeEmulator = new ExchangeTransferSimulator(this._tokenWrapper); + const exchangeTradeEmulator = new ExchangeTransferSimulator(this._tokenWrapper, BlockParamLiteral.Latest); for (const orderFillRequest of orderFillRequests) { await this._orderValidationUtils.validateFillOrderThrowIfInvalidAsync( exchangeTradeEmulator, orderFillRequest.signedOrder, orderFillRequest.takerTokenFillAmount, @@ -423,7 +423,7 @@ export class ExchangeWrapper extends ContractWrapper { orderTransactionOpts.shouldValidate; if (shouldValidate) { const zrxTokenAddress = this.getZRXTokenAddress(); - const exchangeTradeEmulator = new ExchangeTransferSimulator(this._tokenWrapper); + const exchangeTradeEmulator = new ExchangeTransferSimulator(this._tokenWrapper, BlockParamLiteral.Latest); await this._orderValidationUtils.validateFillOrKillOrderThrowIfInvalidAsync( exchangeTradeEmulator, signedOrder, fillTakerTokenAmount, takerAddress, zrxTokenAddress); } @@ -487,7 +487,7 @@ export class ExchangeWrapper extends ContractWrapper { orderTransactionOpts.shouldValidate; if (shouldValidate) { const zrxTokenAddress = this.getZRXTokenAddress(); - const exchangeTradeEmulator = new ExchangeTransferSimulator(this._tokenWrapper); + const exchangeTradeEmulator = new ExchangeTransferSimulator(this._tokenWrapper, BlockParamLiteral.Latest); for (const orderFillRequest of orderFillRequests) { await this._orderValidationUtils.validateFillOrKillOrderThrowIfInvalidAsync( exchangeTradeEmulator, orderFillRequest.signedOrder, orderFillRequest.takerTokenFillAmount, @@ -723,7 +723,7 @@ export class ExchangeWrapper extends ContractWrapper { assert.doesConformToSchema('signedOrder', signedOrder, schemas.signedOrderSchema); const zrxTokenAddress = this.getZRXTokenAddress(); const expectedFillTakerTokenAmount = !_.isUndefined(opts) ? opts.expectedFillTakerTokenAmount : undefined; - const exchangeTradeEmulator = new ExchangeTransferSimulator(this._tokenWrapper); + const exchangeTradeEmulator = new ExchangeTransferSimulator(this._tokenWrapper, BlockParamLiteral.Latest); await this._orderValidationUtils.validateOrderFillableOrThrowAsync( exchangeTradeEmulator, signedOrder, zrxTokenAddress, expectedFillTakerTokenAmount, ); @@ -743,7 +743,7 @@ export class ExchangeWrapper extends ContractWrapper { assert.isValidBaseUnitAmount('fillTakerTokenAmount', fillTakerTokenAmount); await assert.isSenderAddressAsync('takerAddress', takerAddress, this._web3Wrapper); const zrxTokenAddress = this.getZRXTokenAddress(); - const exchangeTradeEmulator = new ExchangeTransferSimulator(this._tokenWrapper); + const exchangeTradeEmulator = new ExchangeTransferSimulator(this._tokenWrapper, BlockParamLiteral.Latest); await this._orderValidationUtils.validateFillOrderThrowIfInvalidAsync( exchangeTradeEmulator, signedOrder, fillTakerTokenAmount, takerAddress, zrxTokenAddress); } @@ -777,7 +777,7 @@ export class ExchangeWrapper extends ContractWrapper { assert.isValidBaseUnitAmount('fillTakerTokenAmount', fillTakerTokenAmount); await assert.isSenderAddressAsync('takerAddress', takerAddress, this._web3Wrapper); const zrxTokenAddress = this.getZRXTokenAddress(); - const exchangeTradeEmulator = new ExchangeTransferSimulator(this._tokenWrapper); + const exchangeTradeEmulator = new ExchangeTransferSimulator(this._tokenWrapper, BlockParamLiteral.Latest); await this._orderValidationUtils.validateFillOrKillOrderThrowIfInvalidAsync( exchangeTradeEmulator, signedOrder, fillTakerTokenAmount, takerAddress, zrxTokenAddress); } |