ODHack: Fix and Complete Airdrop Tests
Description
The current airdrop_tests.cairo file contains quasi-broken tests, with many tests commented out. The goal is to make these tests functional. Reference the defispring repository, which contains a similar, tested contract developed based on the current airdrop contract.
Tasks
-
Uncomment and Fix Tests in
airdrop_tests.cairo -
Reference
defispringRepository:- Use the
defispringrepository as a reference to understand the testing approach. - Ensure the tests in
airdrop_tests.cairoexceed the robustness and coverage of those indefispring.
- Use the
-
Generate Test Data Using
carmine-api-airdrop:- Utilize the
carmine-api-airdropto create the Merkle tree and generate proofs. - Use this test data in the
airdrop_tests.cairo.
- Utilize the
Resources
- Airdrop Tests (quasi-broken): airdrop_tests.cairo
- Airdrop Component Code: airdrop.cairo
- Similar Tested Contract (defispring): defispring Repository
- Merkle Tree and Proof Generation: carmine-api-airdrop
- Test Cases Description: README
- Testing utils: https://github.com/CarmineOptions/konoha/blob/master/tests/setup.cairo
Acceptance Criteria
- All tests in
airdrop_tests.cairoare uncommented, functional, and pass. - Tests cover all specified cases in the README.
- Test data generated using
carmine-api-airdropis correctly integrated into the tests. scarb fmt
Please make sure to keep the testing structure consistent and ensure the tests are comprehensive and robust. Use functions from setup.cairo and do not duplicate them, extend if needed.
Assigned to Nico Sanch, can you confirm?
Yes, I'd like to take on this assignment. Thank you for the opportunity!
Hi, could I work on this issue?
I'm relatively new to Cairo, and I believe the best way to start learning a new codebase is from writing and fixing tests
@TropicalDog17 Yes, good luck!
@TropicalDog17 no update? Will unassign you unless no draft PR by Wednesday 7th August
Yeah sorry I don't have the time to finish the task, feel free to assign someone else to do it, thanks!
@tensojka i would love to work on this. If it’s still open
Hey @kateberryd! Thanks for showing interest. We've created an application for you to contribute to Konoha. Go check it out on OnlyDust!
Hello @tensojka if this issue is still open I would like to work on it.
Hey @BenFaruna! Thanks for showing interest. We've created an application for you to contribute to Konoha. Go check it out on OnlyDust!
Please fill out the application @BenFaruna .
@kateberryd I would prefer to have you available for other frontend tasks as you have experience with that.
Please fill out the application @BenFaruna .
I'm unable to apply from OnlyDust, the issue does not come up for projects except it's time for OD hack and the project is registered for that hack season.
I see your aplication @BenFaruna but it doesn't show any previous OnlyDust experience. Our capacity to onboard new contributors is full at the moment, sorry.
@tensojka can I work on this?
Hey @raizo07! Thanks for showing interest. We've created an application for you to contribute to Konoha. Go check it out on OnlyDust!
@tensojka I contributed to a project earlier, but the project wasn't registered on Only dust so it doesn't show on the dashboard.
https://github.com/carbonable-labs/baseline-contracts/pull/3
That's my PR that got merged