diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-10-03 21:44:16 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-10-04 16:14:20 +0800 |
commit | 837618c7a016b9b66d70f3c0e9682c97a9d4cf8a (patch) | |
tree | 6efd6148ca2128626c6be20d88789530f24e5469 /src/contract_wrappers/token_wrapper.ts | |
parent | e6c138be5ab56856a454f7f04b6e1e54f1d41f18 (diff) | |
download | dexon-sol-tools-837618c7a016b9b66d70f3c0e9682c97a9d4cf8a.tar dexon-sol-tools-837618c7a016b9b66d70f3c0e9682c97a9d4cf8a.tar.gz dexon-sol-tools-837618c7a016b9b66d70f3c0e9682c97a9d4cf8a.tar.bz2 dexon-sol-tools-837618c7a016b9b66d70f3c0e9682c97a9d4cf8a.tar.lz dexon-sol-tools-837618c7a016b9b66d70f3c0e9682c97a9d4cf8a.tar.xz dexon-sol-tools-837618c7a016b9b66d70f3c0e9682c97a9d4cf8a.tar.zst dexon-sol-tools-837618c7a016b9b66d70f3c0e9682c97a9d4cf8a.zip |
Implement zeroEx.exchange.getLogsAsync
Diffstat (limited to 'src/contract_wrappers/token_wrapper.ts')
-rw-r--r-- | src/contract_wrappers/token_wrapper.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/contract_wrappers/token_wrapper.ts b/src/contract_wrappers/token_wrapper.ts index b932686d4..175671f74 100644 --- a/src/contract_wrappers/token_wrapper.ts +++ b/src/contract_wrappers/token_wrapper.ts @@ -280,6 +280,15 @@ export class TokenWrapper extends ContractWrapper { this._tokenLogEventEmitters.push(eventEmitter); return eventEmitter; } + /** + * Gets historical logs without creating a subscription + * @param tokenAddress An address of the token that emited 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 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(tokenAddress: string, eventName: TokenEvents, subscriptionOpts: SubscriptionOpts, indexFilterValues: IndexedFilterValues): Promise<Array<LogWithDecodedArgs|RawLog>> { const logs = await this._getLogsAsync( |