aboutsummaryrefslogtreecommitdiffstats
path: root/src/0x.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/0x.ts')
-rw-r--r--src/0x.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/0x.ts b/src/0x.ts
index e6fdf68e1..ae29b8d70 100644
--- a/src/0x.ts
+++ b/src/0x.ts
@@ -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.