diff options
author | Jacob Evans <jacob@dekz.net> | 2018-07-11 18:45:18 +0800 |
---|---|---|
committer | Jacob Evans <jacob@dekz.net> | 2018-07-11 18:45:18 +0800 |
commit | 0b6ea1d0468847ac07c40232cf1431e2bb92ac86 (patch) | |
tree | 19bf75ae415e59d713c0b8e2025c25ab4a871172 /packages/contract-wrappers | |
parent | 81b4f4928d1125ebe1900aef597cbe99f5c349bc (diff) | |
download | dexon-0x-contracts-0b6ea1d0468847ac07c40232cf1431e2bb92ac86.tar dexon-0x-contracts-0b6ea1d0468847ac07c40232cf1431e2bb92ac86.tar.gz dexon-0x-contracts-0b6ea1d0468847ac07c40232cf1431e2bb92ac86.tar.bz2 dexon-0x-contracts-0b6ea1d0468847ac07c40232cf1431e2bb92ac86.tar.lz dexon-0x-contracts-0b6ea1d0468847ac07c40232cf1431e2bb92ac86.tar.xz dexon-0x-contracts-0b6ea1d0468847ac07c40232cf1431e2bb92ac86.tar.zst dexon-0x-contracts-0b6ea1d0468847ac07c40232cf1431e2bb92ac86.zip |
Contract Wrappers - Ether token block range
Start after migrations to avoid any unexpected logs
Diffstat (limited to 'packages/contract-wrappers')
-rw-r--r-- | packages/contract-wrappers/test/ether_token_wrapper_test.ts | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/packages/contract-wrappers/test/ether_token_wrapper_test.ts b/packages/contract-wrappers/test/ether_token_wrapper_test.ts index 0a860884a..48bd6d3f6 100644 --- a/packages/contract-wrappers/test/ether_token_wrapper_test.ts +++ b/packages/contract-wrappers/test/ether_token_wrapper_test.ts @@ -336,15 +336,19 @@ describe('EtherTokenWrapper', () => { describe('#getLogsAsync', () => { let etherTokenAddress: string; let erc20ProxyAddress: string; - const blockRange: BlockRange = { - fromBlock: 0, - toBlock: BlockParamLiteral.Latest, - }; + let blockRange: BlockRange; let txHash: string; - before(() => { + before(async () => { addressWithETH = userAddresses[0]; etherTokenAddress = tokenUtils.getWethTokenAddress(); erc20ProxyAddress = contractWrappers.erc20Proxy.getContractAddress(); + // Start the block range after all migrations to avoid unexpected logs + const currentBlock = await web3Wrapper.getBlockNumberAsync(); + const fromBlock = currentBlock + 1; + blockRange = { + fromBlock, + toBlock: BlockParamLiteral.Latest, + }; }); it('should get logs with decoded args emitted by Approval', async () => { txHash = await contractWrappers.erc20Token.setUnlimitedProxyAllowanceAsync( |