Skip to content

Commit

Permalink
Merge pull request #64 from zzGHzz/main
Browse files Browse the repository at this point in the history
update getPastLogs test
  • Loading branch information
zzGHzz authored Oct 9, 2023
2 parents f9920b6 + 94b8005 commit 17156bc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/web3/getPastLogs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,14 @@ describe('Testing function getPastLogs', function () {
address: contractAddress,
});
// skip event $Master(address) emitted when creating the contract
test(ret[1], deployer, args, this.web3);
const topic = this.web3.eth.abi.encodeParameter('address', deployer);
if (ret[0].topics[1] === topic) {
test(ret[0], deployer, args, this.web3);
} else if (ret[1].topics[1] === topic) {
test(ret[1], deployer, args, this.web3);
} else {
assert.fail('Log not found');
}

// with only topics
ret = await this.web3.eth.getPastLogs({
Expand Down

0 comments on commit 17156bc

Please sign in to comment.