diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-10-03 16:39:34 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-10-04 16:14:19 +0800 |
commit | 835c17c9612b184208c72c15a3ca0c815057ccf3 (patch) | |
tree | 6647ec583cbed2c0c7efc8389d6fd2ea0997e943 | |
parent | 7b545aa0e0dfcdb923d64494614f303bc3b3036a (diff) | |
download | dexon-sol-tools-835c17c9612b184208c72c15a3ca0c815057ccf3.tar dexon-sol-tools-835c17c9612b184208c72c15a3ca0c815057ccf3.tar.gz dexon-sol-tools-835c17c9612b184208c72c15a3ca0c815057ccf3.tar.bz2 dexon-sol-tools-835c17c9612b184208c72c15a3ca0c815057ccf3.tar.lz dexon-sol-tools-835c17c9612b184208c72c15a3ca0c815057ccf3.tar.xz dexon-sol-tools-835c17c9612b184208c72c15a3ca0c815057ccf3.tar.zst dexon-sol-tools-835c17c9612b184208c72c15a3ca0c815057ccf3.zip |
Add zeroEx.getLogsAsync
-rw-r--r-- | src/0x.ts | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -31,6 +31,8 @@ import { DecodedLogArgs, TransactionReceiptWithDecodedLogs, LogWithDecodedArgs, + FilterObject, + RawLog, } from './types'; import {zeroExConfigSchema} from './schemas/zero_ex_config_schema'; @@ -321,6 +323,15 @@ export class ZeroEx { }); return txReceiptPromise; } + /** + * Gets historical logs without creating a subscription + * @param filter Filter object + * @return Array of logs that match the filter + */ + public async getLogsAsync(filter: FilterObject): Promise<RawLog[]> { + const logs = await this._web3Wrapper.getLogsAsync(filter); + return logs; + } /* * HACK: `TokenWrapper` needs a token transfer proxy address. `TokenTransferProxy` address is fetched from * an `ExchangeWrapper`. `ExchangeWrapper` needs `TokenWrapper` to validate orders, creating a dependency cycle. |