-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests: createInjector
lack of test
#7
Comments
Please provide feedback regarding the 0% coverage around the factory cc: @Tritium-VLK |
@Tritium-VLK bumping this issue, not feedback yet |
@Hyferion Do you have a bit of time to write a test here? Feel free to ping me in telegram. If we can't get tests done quick and easy, part of me would rather just deploy this somewhere and test the factory (and how it looks in etherscan, works on the UI, etc like that). Guess we could do that on testnet. |
@Tritium-VLK we consider lack of coverage usually a poor practice while developing contracts that are going to hit production, regardless of how straightforward the logic may look like But, given the pragmatic approach you're taking, we have 2 approaches:
Let us know which one its your preference Note: if you end up deploying into testnet, feel free to share here the factory address and test-runs txs to also verify at our end |
factory coveraged for the key function has being pushed in #45 capturing core logic, events and getter test ✅ issue is safe to close |
Severity: can lead to unexpected behavior on lack of full coverage
Context: the test suite lacks a test covering at least two scenarios to ensure the correct/expected behaviour is executed:
injector
?All cases should be cover to have a rich coverage overall.
Recommendations: include a test covering the whole flow of injector (minimum: 1. & 2. cases described above)
In another note, it is generally advisable to add checks on the parameters passed in the function itself, i.e: currently in the flow
initialize
method does not have checks such as:owner
andinjectTokenAddress
!= thanaddress(0)
. or other not desired values?. e.g: settingowner
toaddress(0)
will likely not be reversible. we acknoledge that for parameters such askeeperAddresses
may be intentional to be empty to allow anyone calling the keeper methodsuint256
does not have neither a health-check? is expectedminWaitPeriodSeconds
to be 5 days, 10 months, 1 year? how can we ensure on-chain these parameters are within reasonable bounds when triggeringinitialize
. It's advisable to be considerable with a reasonable bounds of time or amounts that operational we are expecting partners or 3rd user deploying injectors for the factory to use to avoid unexpected behaviourOutcome overall improvement of coverage in the factory contract which currently is at zero.
Review stage
Balancer Maxis:
Onchainification Labs:
The text was updated successfully, but these errors were encountered: