diff options
Diffstat (limited to 'src/0x.ts')
-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. |