From aaae22642eb280e1fbbc9d90dc13ae3fb82b9fd5 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 8 Sep 2017 12:02:37 +0200 Subject: Define CallOpts type --- src/contract_wrappers/token_wrapper.ts | 1 + src/types.ts | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/contract_wrappers/token_wrapper.ts b/src/contract_wrappers/token_wrapper.ts index f1f967286..6b2a824de 100644 --- a/src/contract_wrappers/token_wrapper.ts +++ b/src/contract_wrappers/token_wrapper.ts @@ -17,6 +17,7 @@ import { CreateContractEvent, ContractEventEmitter, ContractEventObj, + CallOpts, } from '../types'; const ALLOWANCE_TO_ZERO_GAS_AMOUNT = 47155; diff --git a/src/types.ts b/src/types.ts index c1ba0a5cc..a15b9f4e1 100644 --- a/src/types.ts +++ b/src/types.ts @@ -419,3 +419,7 @@ export interface Artifact { address: string; }}; } + +export interface CallOpts { + defaultBlock?: Web3.BlockParam; +} -- cgit From 1dcfd4102bf6582aafd590d70a8a98bbd7bce1dc Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 8 Sep 2017 12:03:04 +0200 Subject: Allow user to specify defaultBlock when calling const token methods --- src/contract_wrappers/token_wrapper.ts | 19 +++++++++++++------ src/types.ts | 5 +++-- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/contract_wrappers/token_wrapper.ts b/src/contract_wrappers/token_wrapper.ts index 6b2a824de..96dc10b88 100644 --- a/src/contract_wrappers/token_wrapper.ts +++ b/src/contract_wrappers/token_wrapper.ts @@ -40,14 +40,17 @@ export class TokenWrapper extends ContractWrapper { * Retrieves an owner's ERC20 token balance. * @param tokenAddress The hex encoded contract Ethereum address where the ERC20 token is deployed. * @param ownerAddress The hex encoded user Ethereum address whose balance you would like to check. + * @param callOpts ${FABIOS_COMMENT} * @return The owner's ERC20 token balance in base units. */ - public async getBalanceAsync(tokenAddress: string, ownerAddress: string): Promise { + public async getBalanceAsync(tokenAddress: string, ownerAddress: string, + callOpts?: CallOpts): Promise { assert.isETHAddressHex('ownerAddress', ownerAddress); assert.isETHAddressHex('tokenAddress', tokenAddress); const tokenContract = await this._getTokenContractAsync(tokenAddress); - let balance = await tokenContract.balanceOf.callAsync(ownerAddress); + const defaultBlock = _.isUndefined(callOpts) ? undefined : callOpts.defaultBlock; + let balance = await tokenContract.balanceOf.callAsync(ownerAddress, defaultBlock); // Wrap BigNumbers returned from web3 with our own (later) version of BigNumber balance = new BigNumber(balance); return balance; @@ -105,14 +108,16 @@ export class TokenWrapper extends ContractWrapper { * @param ownerAddress The hex encoded user Ethereum address whose allowance to spenderAddress * you would like to retrieve. * @param spenderAddress The hex encoded user Ethereum address who can spend the allowance you are fetching. + * @param callOpts ${FABIOS_COMMENT} */ public async getAllowanceAsync(tokenAddress: string, ownerAddress: string, - spenderAddress: string): Promise { + spenderAddress: string, callOpts?: CallOpts): Promise { assert.isETHAddressHex('ownerAddress', ownerAddress); assert.isETHAddressHex('tokenAddress', tokenAddress); const tokenContract = await this._getTokenContractAsync(tokenAddress); - let allowanceInBaseUnits = await tokenContract.allowance.callAsync(ownerAddress, spenderAddress); + const defaultBlock = _.isUndefined(callOpts) ? undefined : callOpts.defaultBlock; + let allowanceInBaseUnits = await tokenContract.allowance.callAsync(ownerAddress, spenderAddress, defaultBlock); // Wrap BigNumbers returned from web3 with our own (later) version of BigNumber allowanceInBaseUnits = new BigNumber(allowanceInBaseUnits); return allowanceInBaseUnits; @@ -121,13 +126,15 @@ export class TokenWrapper extends ContractWrapper { * Retrieves the owner's allowance in baseUnits set to the 0x proxy contract. * @param tokenAddress The hex encoded contract Ethereum address where the ERC20 token is deployed. * @param ownerAddress The hex encoded user Ethereum address whose proxy contract allowance we are retrieving. + * @param callOpts ${FABIOS_COMMENT} */ - public async getProxyAllowanceAsync(tokenAddress: string, ownerAddress: string): Promise { + public async getProxyAllowanceAsync(tokenAddress: string, ownerAddress: string, + callOpts?: CallOpts): Promise { assert.isETHAddressHex('ownerAddress', ownerAddress); assert.isETHAddressHex('tokenAddress', tokenAddress); const proxyAddress = await this._getProxyAddressAsync(); - const allowanceInBaseUnits = await this.getAllowanceAsync(tokenAddress, ownerAddress, proxyAddress); + const allowanceInBaseUnits = await this.getAllowanceAsync(tokenAddress, ownerAddress, proxyAddress, callOpts); return allowanceInBaseUnits; } /** diff --git a/src/types.ts b/src/types.ts index a15b9f4e1..4adaa4ccb 100644 --- a/src/types.ts +++ b/src/types.ts @@ -133,10 +133,11 @@ export interface TokenContract extends Web3.ContractInstance { Transfer: CreateContractEvent; Approval: CreateContractEvent; balanceOf: { - callAsync: (address: string) => Promise; + callAsync: (address: string, defaultBlock?: Web3.BlockParam) => Promise; }; allowance: { - callAsync: (ownerAddress: string, allowedAddress: string) => Promise; + callAsync: (ownerAddress: string, allowedAddress: string, + defaultBlock?: Web3.BlockParam) => Promise; }; transfer: { sendTransactionAsync: (toAddress: string, amountInBaseUnits: BigNumber.BigNumber, -- cgit From 762d02b2e0875a8fc70adacdf01f0ed67c4dccb6 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 8 Sep 2017 12:25:05 +0200 Subject: Allow user to specify defaultBlock when calling const exchange methods --- src/contract_wrappers/exchange_wrapper.ts | 21 +++++++++++++++------ src/types.ts | 6 +++--- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts index 47a066a8f..9d73a4ede 100644 --- a/src/contract_wrappers/exchange_wrapper.ts +++ b/src/contract_wrappers/exchange_wrapper.ts @@ -27,6 +27,7 @@ import { LogFillContractEventArgs, LogCancelContractEventArgs, LogWithDecodedArgs, + CallOpts, } from '../types'; import {assert} from '../utils/assert'; import {utils} from '../utils/utils'; @@ -85,13 +86,17 @@ export class ExchangeWrapper extends ContractWrapper { * subtracting the unavailable amount from the total order takerAmount. * @param orderHash The hex encoded orderHash for which you would like to retrieve the * unavailable takerAmount. + * @param callOpts ${FABIOS_COMMENT} * @return The amount of the order (in taker tokens) that has either been filled or canceled. */ - public async getUnavailableTakerAmountAsync(orderHash: string): Promise { + public async getUnavailableTakerAmountAsync(orderHash: string, callOpts?: CallOpts): Promise { assert.doesConformToSchema('orderHash', orderHash, schemas.orderHashSchema); const exchangeContract = await this._getExchangeContractAsync(); - let unavailableTakerTokenAmount = await exchangeContract.getUnavailableTakerTokenAmount.callAsync(orderHash); + const defaultBlock = _.isUndefined(callOpts) ? undefined : callOpts.defaultBlock; + let unavailableTakerTokenAmount = await exchangeContract.getUnavailableTakerTokenAmount.callAsync( + orderHash, defaultBlock, + ); // Wrap BigNumbers returned from web3 with our own (later) version of BigNumber unavailableTakerTokenAmount = new BigNumber(unavailableTakerTokenAmount); return unavailableTakerTokenAmount; @@ -99,13 +104,15 @@ export class ExchangeWrapper extends ContractWrapper { /** * Retrieve the takerAmount of an order that has already been filled. * @param orderHash The hex encoded orderHash for which you would like to retrieve the filled takerAmount. + * @param callOpts ${FABIOS_COMMENT} * @return The amount of the order (in taker tokens) that has already been filled. */ - public async getFilledTakerAmountAsync(orderHash: string): Promise { + public async getFilledTakerAmountAsync(orderHash: string, callOpts?: CallOpts): Promise { assert.doesConformToSchema('orderHash', orderHash, schemas.orderHashSchema); const exchangeContract = await this._getExchangeContractAsync(); - let fillAmountInBaseUnits = await exchangeContract.filled.callAsync(orderHash); + const defaultBlock = _.isUndefined(callOpts) ? undefined : callOpts.defaultBlock; + let fillAmountInBaseUnits = await exchangeContract.filled.callAsync(orderHash, defaultBlock); // Wrap BigNumbers returned from web3 with our own (later) version of BigNumber fillAmountInBaseUnits = new BigNumber(fillAmountInBaseUnits); return fillAmountInBaseUnits; @@ -114,13 +121,15 @@ export class ExchangeWrapper extends ContractWrapper { * Retrieve the takerAmount of an order that has been cancelled. * @param orderHash The hex encoded orderHash for which you would like to retrieve the * cancelled takerAmount. + * @param callOpts ${FABIOS_COMMENT} * @return The amount of the order (in taker tokens) that has been cancelled. */ - public async getCanceledTakerAmountAsync(orderHash: string): Promise { + public async getCanceledTakerAmountAsync(orderHash: string, callOpts?: CallOpts): Promise { assert.doesConformToSchema('orderHash', orderHash, schemas.orderHashSchema); const exchangeContract = await this._getExchangeContractAsync(); - let cancelledAmountInBaseUnits = await exchangeContract.cancelled.callAsync(orderHash); + const defaultBlock = _.isUndefined(callOpts) ? undefined : callOpts.defaultBlock; + let cancelledAmountInBaseUnits = await exchangeContract.cancelled.callAsync(orderHash, defaultBlock); // Wrap BigNumbers returned from web3 with our own (later) version of BigNumber cancelledAmountInBaseUnits = new BigNumber(cancelledAmountInBaseUnits); return cancelledAmountInBaseUnits; diff --git a/src/types.ts b/src/types.ts index 4adaa4ccb..a8d4f078e 100644 --- a/src/types.ts +++ b/src/types.ts @@ -52,7 +52,7 @@ export interface ExchangeContract extends Web3.ContractInstance { callAsync: () => Promise; }; getUnavailableTakerTokenAmount: { - callAsync: (orderHash: string) => Promise; + callAsync: (orderHash: string, defaultBlock?: Web3.BlockParam) => Promise; }; isRoundingError: { callAsync: (fillTakerAmount: BigNumber.BigNumber, takerTokenAmount: BigNumber.BigNumber, @@ -119,10 +119,10 @@ export interface ExchangeContract extends Web3.ContractInstance { v: number[], r: string[], s: string[], txOpts?: TxOpts) => Promise; }; filled: { - callAsync: (orderHash: string) => Promise; + callAsync: (orderHash: string, defaultBlock?: Web3.BlockParam) => Promise; }; cancelled: { - callAsync: (orderHash: string) => Promise; + callAsync: (orderHash: string, defaultBlock?: Web3.BlockParam) => Promise; }; getOrderHash: { callAsync: (orderAddresses: OrderAddresses, orderValues: OrderValues) => Promise; -- cgit From e60153a4fbb732a6f11cb216743764060c579cdd Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 8 Sep 2017 12:28:18 +0200 Subject: Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 74bfc6aeb..9b6001b51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +v0.15.0 - _September 8, 2017_ +------------------------ + * Added a possibility to specify a block when calling const token or exchange methods (fetch historical data) (#161) + v0.14.2 - _September 7, 2017_ ------------------------ * Fixed an issue with bignumber.js types not found (#160) -- cgit From 1d64b542d8eecb4d6c63a5faa04150d3110d2fd5 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 8 Sep 2017 13:56:10 +0200 Subject: Rename CallOpts to MethodOpts --- src/contract_wrappers/exchange_wrapper.ts | 21 +++++++++++---------- src/contract_wrappers/token_wrapper.ts | 20 ++++++++++---------- src/index.ts | 1 + src/types.ts | 2 +- 4 files changed, 23 insertions(+), 21 deletions(-) diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts index 9d73a4ede..c6632175c 100644 --- a/src/contract_wrappers/exchange_wrapper.ts +++ b/src/contract_wrappers/exchange_wrapper.ts @@ -27,7 +27,7 @@ import { LogFillContractEventArgs, LogCancelContractEventArgs, LogWithDecodedArgs, - CallOpts, + MethodOpts, } from '../types'; import {assert} from '../utils/assert'; import {utils} from '../utils/utils'; @@ -86,14 +86,15 @@ export class ExchangeWrapper extends ContractWrapper { * subtracting the unavailable amount from the total order takerAmount. * @param orderHash The hex encoded orderHash for which you would like to retrieve the * unavailable takerAmount. - * @param callOpts ${FABIOS_COMMENT} + * @param methodOpts ${FABIOS_COMMENT} * @return The amount of the order (in taker tokens) that has either been filled or canceled. */ - public async getUnavailableTakerAmountAsync(orderHash: string, callOpts?: CallOpts): Promise { + public async getUnavailableTakerAmountAsync(orderHash: string, + methodOpts?: MethodOpts): Promise { assert.doesConformToSchema('orderHash', orderHash, schemas.orderHashSchema); const exchangeContract = await this._getExchangeContractAsync(); - const defaultBlock = _.isUndefined(callOpts) ? undefined : callOpts.defaultBlock; + const defaultBlock = _.isUndefined(methodOpts) ? undefined : methodOpts.defaultBlock; let unavailableTakerTokenAmount = await exchangeContract.getUnavailableTakerTokenAmount.callAsync( orderHash, defaultBlock, ); @@ -104,14 +105,14 @@ export class ExchangeWrapper extends ContractWrapper { /** * Retrieve the takerAmount of an order that has already been filled. * @param orderHash The hex encoded orderHash for which you would like to retrieve the filled takerAmount. - * @param callOpts ${FABIOS_COMMENT} + * @param methodOpts ${FABIOS_COMMENT} * @return The amount of the order (in taker tokens) that has already been filled. */ - public async getFilledTakerAmountAsync(orderHash: string, callOpts?: CallOpts): Promise { + public async getFilledTakerAmountAsync(orderHash: string, methodOpts?: MethodOpts): Promise { assert.doesConformToSchema('orderHash', orderHash, schemas.orderHashSchema); const exchangeContract = await this._getExchangeContractAsync(); - const defaultBlock = _.isUndefined(callOpts) ? undefined : callOpts.defaultBlock; + const defaultBlock = _.isUndefined(methodOpts) ? undefined : methodOpts.defaultBlock; let fillAmountInBaseUnits = await exchangeContract.filled.callAsync(orderHash, defaultBlock); // Wrap BigNumbers returned from web3 with our own (later) version of BigNumber fillAmountInBaseUnits = new BigNumber(fillAmountInBaseUnits); @@ -121,14 +122,14 @@ export class ExchangeWrapper extends ContractWrapper { * Retrieve the takerAmount of an order that has been cancelled. * @param orderHash The hex encoded orderHash for which you would like to retrieve the * cancelled takerAmount. - * @param callOpts ${FABIOS_COMMENT} + * @param methodOpts ${FABIOS_COMMENT} * @return The amount of the order (in taker tokens) that has been cancelled. */ - public async getCanceledTakerAmountAsync(orderHash: string, callOpts?: CallOpts): Promise { + public async getCanceledTakerAmountAsync(orderHash: string, methodOpts?: MethodOpts): Promise { assert.doesConformToSchema('orderHash', orderHash, schemas.orderHashSchema); const exchangeContract = await this._getExchangeContractAsync(); - const defaultBlock = _.isUndefined(callOpts) ? undefined : callOpts.defaultBlock; + const defaultBlock = _.isUndefined(methodOpts) ? undefined : methodOpts.defaultBlock; let cancelledAmountInBaseUnits = await exchangeContract.cancelled.callAsync(orderHash, defaultBlock); // Wrap BigNumbers returned from web3 with our own (later) version of BigNumber cancelledAmountInBaseUnits = new BigNumber(cancelledAmountInBaseUnits); diff --git a/src/contract_wrappers/token_wrapper.ts b/src/contract_wrappers/token_wrapper.ts index 96dc10b88..218427517 100644 --- a/src/contract_wrappers/token_wrapper.ts +++ b/src/contract_wrappers/token_wrapper.ts @@ -17,7 +17,7 @@ import { CreateContractEvent, ContractEventEmitter, ContractEventObj, - CallOpts, + MethodOpts, } from '../types'; const ALLOWANCE_TO_ZERO_GAS_AMOUNT = 47155; @@ -40,16 +40,16 @@ export class TokenWrapper extends ContractWrapper { * Retrieves an owner's ERC20 token balance. * @param tokenAddress The hex encoded contract Ethereum address where the ERC20 token is deployed. * @param ownerAddress The hex encoded user Ethereum address whose balance you would like to check. - * @param callOpts ${FABIOS_COMMENT} + * @param methodOpts ${FABIOS_COMMENT} * @return The owner's ERC20 token balance in base units. */ public async getBalanceAsync(tokenAddress: string, ownerAddress: string, - callOpts?: CallOpts): Promise { + methodOpts?: MethodOpts): Promise { assert.isETHAddressHex('ownerAddress', ownerAddress); assert.isETHAddressHex('tokenAddress', tokenAddress); const tokenContract = await this._getTokenContractAsync(tokenAddress); - const defaultBlock = _.isUndefined(callOpts) ? undefined : callOpts.defaultBlock; + const defaultBlock = _.isUndefined(methodOpts) ? undefined : methodOpts.defaultBlock; let balance = await tokenContract.balanceOf.callAsync(ownerAddress, defaultBlock); // Wrap BigNumbers returned from web3 with our own (later) version of BigNumber balance = new BigNumber(balance); @@ -108,15 +108,15 @@ export class TokenWrapper extends ContractWrapper { * @param ownerAddress The hex encoded user Ethereum address whose allowance to spenderAddress * you would like to retrieve. * @param spenderAddress The hex encoded user Ethereum address who can spend the allowance you are fetching. - * @param callOpts ${FABIOS_COMMENT} + * @param methodOpts ${FABIOS_COMMENT} */ public async getAllowanceAsync(tokenAddress: string, ownerAddress: string, - spenderAddress: string, callOpts?: CallOpts): Promise { + spenderAddress: string, methodOpts?: MethodOpts): Promise { assert.isETHAddressHex('ownerAddress', ownerAddress); assert.isETHAddressHex('tokenAddress', tokenAddress); const tokenContract = await this._getTokenContractAsync(tokenAddress); - const defaultBlock = _.isUndefined(callOpts) ? undefined : callOpts.defaultBlock; + const defaultBlock = _.isUndefined(methodOpts) ? undefined : methodOpts.defaultBlock; let allowanceInBaseUnits = await tokenContract.allowance.callAsync(ownerAddress, spenderAddress, defaultBlock); // Wrap BigNumbers returned from web3 with our own (later) version of BigNumber allowanceInBaseUnits = new BigNumber(allowanceInBaseUnits); @@ -126,15 +126,15 @@ export class TokenWrapper extends ContractWrapper { * Retrieves the owner's allowance in baseUnits set to the 0x proxy contract. * @param tokenAddress The hex encoded contract Ethereum address where the ERC20 token is deployed. * @param ownerAddress The hex encoded user Ethereum address whose proxy contract allowance we are retrieving. - * @param callOpts ${FABIOS_COMMENT} + * @param methodOpts ${FABIOS_COMMENT} */ public async getProxyAllowanceAsync(tokenAddress: string, ownerAddress: string, - callOpts?: CallOpts): Promise { + methodOpts?: MethodOpts): Promise { assert.isETHAddressHex('ownerAddress', ownerAddress); assert.isETHAddressHex('tokenAddress', tokenAddress); const proxyAddress = await this._getProxyAddressAsync(); - const allowanceInBaseUnits = await this.getAllowanceAsync(tokenAddress, ownerAddress, proxyAddress, callOpts); + const allowanceInBaseUnits = await this.getAllowanceAsync(tokenAddress, ownerAddress, proxyAddress, methodOpts); return allowanceInBaseUnits; } /** diff --git a/src/index.ts b/src/index.ts index 00d4730da..a59904210 100644 --- a/src/index.ts +++ b/src/index.ts @@ -33,4 +33,5 @@ export { TransactionReceiptWithDecodedLogs, LogWithDecodedArgs, DecodedLogArgs, + MethodOpts, } from './types'; diff --git a/src/types.ts b/src/types.ts index a8d4f078e..d62edd231 100644 --- a/src/types.ts +++ b/src/types.ts @@ -421,6 +421,6 @@ export interface Artifact { }}; } -export interface CallOpts { +export interface MethodOpts { defaultBlock?: Web3.BlockParam; } -- cgit From fdf54668aeaa1c66e2e00c116516158ac15d334e Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 8 Sep 2017 14:00:39 +0200 Subject: Fix CHANGELOG comment --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b6001b51..4bd1f5f34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ v0.15.0 - _September 8, 2017_ ------------------------ - * Added a possibility to specify a block when calling const token or exchange methods (fetch historical data) (#161) + * Added the ability to specify a historical `blockNumber` at which to query the blockchain's state when calling a token or exchange method (#161) v0.14.2 - _September 7, 2017_ ------------------------ -- cgit From be0b9a1d7c9428fc35b3fdf3cd2a730e9bd5a606 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 8 Sep 2017 14:02:03 +0200 Subject: Add a comment for MethodOpts --- src/types.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/types.ts b/src/types.ts index d62edd231..eb83d7c2b 100644 --- a/src/types.ts +++ b/src/types.ts @@ -421,6 +421,12 @@ export interface Artifact { }}; } +/* + * defaultBlock: The block up to which to query the blockchain state. Setting this to a historical block number + * let's the user query the blockchain's state at an arbitrary point in time. In order for this to work, the + * backing Ethereum node must keep the entire historical state of the chain (e.g setting `--pruning=archive` + * flag when running Parity). + */ export interface MethodOpts { defaultBlock?: Web3.BlockParam; } -- cgit From 217c16027e7f8acdb0909989c4d15314c0eb1a97 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 8 Sep 2017 16:24:07 +0200 Subject: Replace placeholders with actual coments --- src/contract_wrappers/exchange_wrapper.ts | 6 +++--- src/contract_wrappers/token_wrapper.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts index c6632175c..73c4d935b 100644 --- a/src/contract_wrappers/exchange_wrapper.ts +++ b/src/contract_wrappers/exchange_wrapper.ts @@ -86,7 +86,7 @@ export class ExchangeWrapper extends ContractWrapper { * subtracting the unavailable amount from the total order takerAmount. * @param orderHash The hex encoded orderHash for which you would like to retrieve the * unavailable takerAmount. - * @param methodOpts ${FABIOS_COMMENT} + * @param methodOpts Optional arguments this method accepts. * @return The amount of the order (in taker tokens) that has either been filled or canceled. */ public async getUnavailableTakerAmountAsync(orderHash: string, @@ -105,7 +105,7 @@ export class ExchangeWrapper extends ContractWrapper { /** * Retrieve the takerAmount of an order that has already been filled. * @param orderHash The hex encoded orderHash for which you would like to retrieve the filled takerAmount. - * @param methodOpts ${FABIOS_COMMENT} + * @param methodOpts Optional arguments this method accepts. * @return The amount of the order (in taker tokens) that has already been filled. */ public async getFilledTakerAmountAsync(orderHash: string, methodOpts?: MethodOpts): Promise { @@ -122,7 +122,7 @@ export class ExchangeWrapper extends ContractWrapper { * Retrieve the takerAmount of an order that has been cancelled. * @param orderHash The hex encoded orderHash for which you would like to retrieve the * cancelled takerAmount. - * @param methodOpts ${FABIOS_COMMENT} + * @param methodOpts Optional arguments this method accepts. * @return The amount of the order (in taker tokens) that has been cancelled. */ public async getCanceledTakerAmountAsync(orderHash: string, methodOpts?: MethodOpts): Promise { diff --git a/src/contract_wrappers/token_wrapper.ts b/src/contract_wrappers/token_wrapper.ts index 218427517..bdfdf0c74 100644 --- a/src/contract_wrappers/token_wrapper.ts +++ b/src/contract_wrappers/token_wrapper.ts @@ -40,7 +40,7 @@ export class TokenWrapper extends ContractWrapper { * Retrieves an owner's ERC20 token balance. * @param tokenAddress The hex encoded contract Ethereum address where the ERC20 token is deployed. * @param ownerAddress The hex encoded user Ethereum address whose balance you would like to check. - * @param methodOpts ${FABIOS_COMMENT} + * @param methodOpts Optional arguments this method accepts. * @return The owner's ERC20 token balance in base units. */ public async getBalanceAsync(tokenAddress: string, ownerAddress: string, @@ -108,7 +108,7 @@ export class TokenWrapper extends ContractWrapper { * @param ownerAddress The hex encoded user Ethereum address whose allowance to spenderAddress * you would like to retrieve. * @param spenderAddress The hex encoded user Ethereum address who can spend the allowance you are fetching. - * @param methodOpts ${FABIOS_COMMENT} + * @param methodOpts Optional arguments this method accepts. */ public async getAllowanceAsync(tokenAddress: string, ownerAddress: string, spenderAddress: string, methodOpts?: MethodOpts): Promise { @@ -126,7 +126,7 @@ export class TokenWrapper extends ContractWrapper { * Retrieves the owner's allowance in baseUnits set to the 0x proxy contract. * @param tokenAddress The hex encoded contract Ethereum address where the ERC20 token is deployed. * @param ownerAddress The hex encoded user Ethereum address whose proxy contract allowance we are retrieving. - * @param methodOpts ${FABIOS_COMMENT} + * @param methodOpts Optional arguments this method accepts. */ public async getProxyAllowanceAsync(tokenAddress: string, ownerAddress: string, methodOpts?: MethodOpts): Promise { -- cgit