aboutsummaryrefslogtreecommitdiffstats
path: root/test/0x.js_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test/0x.js_test.ts')
-rw-r--r--test/0x.js_test.ts26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/0x.js_test.ts b/test/0x.js_test.ts
index cc6b91e99..df6efc4bf 100644
--- a/test/0x.js_test.ts
+++ b/test/0x.js_test.ts
@@ -256,4 +256,30 @@ describe('ZeroEx library', () => {
.to.be.rejectedWith(ZeroExError.ContractDoesNotExist);
});
});
+ describe('#getLogs', () => {
+ const exchangeAuthorizationLog = {
+ logIndex: '0x00',
+ transactionIndex: '0x00',
+ transactionHash: '0x36db2d7f92cd000834f4f96fa75dafdbeea31e2b389f3f56fc9020cc5e699ab6',
+ blockHash: '0x1fc0ee4950e9a25072cf643a26a5fb94b214021bcf6fe635f9174f78d891d85a',
+ blockNumber: '0x14',
+ address: '0x871dd7c2b4b25e1aa18728e9d5f2af4c4e431f5c',
+ data: '0x0',
+ topics: [
+ '0x94bb87f4c15c4587ff559a7584006fa01ddf9299359be6b512b94527aa961aca',
+ '0x000000000000000000000000b69e673309512a9d726f87304c6984054f87a93b',
+ '0x0000000000000000000000005409ed021d9299bf6814279a6a1411a7e866a631',
+ ],
+ type: 'mined',
+ };
+ it('gets historical logs', async () => {
+ const filter = {
+ fromBlock: 0,
+ toBlock: 'latest',
+ };
+ const logs = await zeroEx.getLogsAsync(filter);
+ expect(logs).to.have.length(1);
+ expect(logs[0]).to.be.deep.equal(exchangeAuthorizationLog);
+ });
+ });
});