Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files |
There was a problem hiding this comment.
Pull request overview
This PR corrects miswired RSK contract addresses in utility scripts by replacing accidental uses of the pegin address with the intended pegout and discovery contract addresses.
Changes:
- Use
env.Rsk.PegoutContractAddresswhen constructing the Pegout contract wrapper. - Use
env.Rsk.DiscoveryAddresswhen constructing the Discovery contract wrapper.
| return rootstock.NewPegoutContractImpl( | ||
| rskClient, | ||
| env.Rsk.PeginContractAddress, | ||
| env.Rsk.PegoutContractAddress, | ||
| rootstock.NewPegoutContractAdapter(pegoutContract), |
There was a problem hiding this comment.
Current tests for CreatePegoutContract pass an env with PegoutContractAddress unset, so they won’t fail if the wrong env field is used (as happened previously). Consider updating the test to set a distinct PegoutContractAddress and assert contract.GetAddress() matches it, to prevent regressions.
| return rootstock.NewDiscoveryContractImpl( | ||
| rskClient, | ||
| env.Rsk.PeginContractAddress, | ||
| env.Rsk.DiscoveryAddress, | ||
| discoveryContract, |
There was a problem hiding this comment.
Current tests for CreateDiscoveryContract don’t set DiscoveryAddress, so they won’t catch regressions where the wrong env field is wired. Consider setting a non-empty DiscoveryAddress in the test and asserting contract.GetAddress() equals it.
What
Fix typos identifies by copilot in a separate PR
Why
N/A
Type of Change
Affected part of the project
Related Issues
N/A