diff options
author | Fabio Berger <me@fabioberger.com> | 2017-12-20 01:02:50 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-12-20 01:02:50 +0800 |
commit | 06bd5a9b038c40d102db2cc8095bc08d79a547a8 (patch) | |
tree | 52508b9885b13321c80d0b2dd5a6ade9f9a11d63 /packages/0x.js/src/contract_wrappers/token_wrapper.ts | |
parent | e38c7ff0760c766b92a7d19261a3a6f480adf567 (diff) | |
parent | 1316a2dd2a8971771f750d8a7f457212daad520b (diff) | |
download | dexon-sol-tools-06bd5a9b038c40d102db2cc8095bc08d79a547a8.tar.gz dexon-sol-tools-06bd5a9b038c40d102db2cc8095bc08d79a547a8.tar.zst dexon-sol-tools-06bd5a9b038c40d102db2cc8095bc08d79a547a8.zip |
Merge branch 'development' into refactor/website
* development:
Introduce an identityCommandBuilder
Define types for methodID
Define types for ethereumjs-abi
Install types for yargs
Fix comments
Fix linter issues
Fix linter error
Rename SubscriptionOpts to BlockRange
Diffstat (limited to 'packages/0x.js/src/contract_wrappers/token_wrapper.ts')
-rw-r--r-- | packages/0x.js/src/contract_wrappers/token_wrapper.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/0x.js/src/contract_wrappers/token_wrapper.ts b/packages/0x.js/src/contract_wrappers/token_wrapper.ts index eccb74871..a9eac10e0 100644 --- a/packages/0x.js/src/contract_wrappers/token_wrapper.ts +++ b/packages/0x.js/src/contract_wrappers/token_wrapper.ts @@ -5,11 +5,11 @@ import * as _ from 'lodash'; import {artifacts} from '../artifacts'; import { + BlockRange, EventCallback, IndexedFilterValues, LogWithDecodedArgs, MethodOpts, - SubscriptionOpts, TokenContractEventArgs, TokenEvents, TransactionOpts, @@ -291,20 +291,20 @@ export class TokenWrapper extends ContractWrapper { * Gets historical logs without creating a subscription * @param tokenAddress An address of the token that emmited the logs. * @param eventName The token contract event you would like to subscribe to. - * @param subscriptionOpts Subscriptions options that let you configure the subscription. + * @param blockRange Block range to get logs from. * @param indexFilterValues An object where the keys are indexed args returned by the event and * the value is the value you are interested in. E.g `{_from: aUserAddressHex}` * @return Array of logs that match the parameters */ public async getLogsAsync<ArgsType extends TokenContractEventArgs>( - tokenAddress: string, eventName: TokenEvents, subscriptionOpts: SubscriptionOpts, + tokenAddress: string, eventName: TokenEvents, blockRange: BlockRange, indexFilterValues: IndexedFilterValues): Promise<Array<LogWithDecodedArgs<ArgsType>>> { assert.isETHAddressHex('tokenAddress', tokenAddress); assert.doesBelongToStringEnum('eventName', eventName, TokenEvents); - assert.doesConformToSchema('subscriptionOpts', subscriptionOpts, schemas.subscriptionOptsSchema); + assert.doesConformToSchema('blockRange', blockRange, schemas.blockRangeSchema); assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema); const logs = await this._getLogsAsync<ArgsType>( - tokenAddress, eventName, subscriptionOpts, indexFilterValues, artifacts.TokenArtifact.abi, + tokenAddress, eventName, blockRange, indexFilterValues, artifacts.TokenArtifact.abi, ); return logs; } |