Skip to content

Add tests for proposal description restriction feature#21

Open
Emmyt24 wants to merge 1 commit intocompound-finance:mainfrom
Emmyt24:main
Open

Add tests for proposal description restriction feature#21
Emmyt24 wants to merge 1 commit intocompound-finance:mainfrom
Emmyt24:main

Conversation

@Emmyt24
Copy link

@Emmyt24 Emmyt24 commented Dec 30, 2025

  • Add testFuzz_RevertIf_DescriptionRestrictsProposer to test that proposals with restricted descriptions revert for unauthorized proposers
  • Add testFuzz_ProposeSucceedsIfDescriptionRestrictsCorrectProposer to test that proposals succeed when the description restricts to the correct proposer
  • Add _toHexString helper function for address formatting in tests

This covers the previously uncovered _isValidDescriptionForProposer check in the propose function, ensuring frontrunning protection is tested.

- Add testFuzz_RevertIf_DescriptionRestrictsProposer to test that proposals with restricted descriptions revert for unauthorized proposers
- Add testFuzz_ProposeSucceedsIfDescriptionRestrictsCorrectProposer to test that proposals succeed when the description restricts to the correct proposer
- Add _toHexString helper function for address formatting in tests

This covers the previously uncovered _isValidDescriptionForProposer check in the propose function, ensuring frontrunning protection is tested.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants