aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contract-wrappers/test
diff options
context:
space:
mode:
authorJacob Evans <jacob@dekz.net>2018-07-11 18:45:18 +0800
committerJacob Evans <jacob@dekz.net>2018-07-11 18:45:18 +0800
commit0b6ea1d0468847ac07c40232cf1431e2bb92ac86 (patch)
tree19bf75ae415e59d713c0b8e2025c25ab4a871172 /packages/contract-wrappers/test
parent81b4f4928d1125ebe1900aef597cbe99f5c349bc (diff)
downloaddexon-sol-tools-0b6ea1d0468847ac07c40232cf1431e2bb92ac86.tar
dexon-sol-tools-0b6ea1d0468847ac07c40232cf1431e2bb92ac86.tar.gz
dexon-sol-tools-0b6ea1d0468847ac07c40232cf1431e2bb92ac86.tar.bz2
dexon-sol-tools-0b6ea1d0468847ac07c40232cf1431e2bb92ac86.tar.lz
dexon-sol-tools-0b6ea1d0468847ac07c40232cf1431e2bb92ac86.tar.xz
dexon-sol-tools-0b6ea1d0468847ac07c40232cf1431e2bb92ac86.tar.zst
dexon-sol-tools-0b6ea1d0468847ac07c40232cf1431e2bb92ac86.zip
Contract Wrappers - Ether token block range
Start after migrations to avoid any unexpected logs
Diffstat (limited to 'packages/contract-wrappers/test')
-rw-r--r--packages/contract-wrappers/test/ether_token_wrapper_test.ts14
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(