Closed patitonar closed 5 years ago
Deploy preview for kind-kilby-95344f processing.
Building with commit 787c17a312439bedfec215f419924030bf05e9ef
https://app.netlify.com/sites/kind-kilby-95344f/deploys/5cc2f818071909000b411093
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
src/stores/ForeignStore.js | 0 | 1 | 0.0% | ||
src/stores/utils/contract.js | 23 | 37 | 62.16% | ||
src/stores/HomeStore.js | 0 | 18 | 0.0% | ||
<!-- | Total: | 23 | 56 | 41.07% | --> |
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
src/stores/HomeStore.js | 1 | 0.0% | ||
<!-- | Total: | 1 | --> |
Totals | |
---|---|
Change from base Build 446: | 1.9% |
Covered Lines: | 96 |
Relevant Lines: | 1393 |
I made some improvements on the solution:
BridgeValidators
and BridgeValidtorsV1
because they have the same topic but v1 parameter is not indexed so returned data of event was different. So the solution was to build the contract with an empty ABI, get all events and parse them manually. In this way, with one request we can process the events and build the list even if they were generated as part of V1 contracts, V2 or by RewardableValidators. This was made here https://github.com/poanetwork/bridge-ui/pull/184/commits/6616bd74773a3b5cad34500cf33acdd33eae53afIn both solutions deployedAtBlock
is used as fromBlock
parameter to get the events
I made some improvements on the solution:
@patitonar thanks. Sorry that I did not notice your initial responses earlier. Now I provided my comments. It could affect your recent changes. Let's discuss this in Slack if it necessary.
This PR fixes the issues mentioned on https://github.com/poanetwork/poa-bridge-contracts/issues/137#issuecomment-461578462
ValidatorAdded
andValidatorRemoved
in all its variations from contract version 1, version 2 and also when using Rewardable validators contract.