aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-10-03 16:39:46 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-10-04 16:14:19 +0800
commitb859f4b8abfe839980213be3c495be0b974d197f (patch)
treedce1b188ea5649e91c57924c229b0bdedb136adb /test
parent835c17c9612b184208c72c15a3ca0c815057ccf3 (diff)
downloaddexon-sol-tools-b859f4b8abfe839980213be3c495be0b974d197f.tar
dexon-sol-tools-b859f4b8abfe839980213be3c495be0b974d197f.tar.gz
dexon-sol-tools-b859f4b8abfe839980213be3c495be0b974d197f.tar.bz2
dexon-sol-tools-b859f4b8abfe839980213be3c495be0b974d197f.tar.lz
dexon-sol-tools-b859f4b8abfe839980213be3c495be0b974d197f.tar.xz
dexon-sol-tools-b859f4b8abfe839980213be3c495be0b974d197f.tar.zst
dexon-sol-tools-b859f4b8abfe839980213be3c495be0b974d197f.zip
Add tests for zeroEx.getLogsAsync
Diffstat (limited to 'test')
-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);
+ });
+ });
});