Conversation
- Add Self::require_not_paused(&env) check to create_vesting before admin authorization - Add unit tests verifying create_vesting panics when contract is paused and succeeds upon unpause - Clean up test sequence numbers and assertions in token_tests.rs Closes ChainLearnOfficial#499
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
Enforces the emergency pause check in
create_vestingwithin theLearnTokencontract as specified in #499.Previously,
create_vestingdid not check the pause state, allowing new vesting schedules to be created during an emergency pause whileclaim_vestedalready enforcedSelf::require_not_paused(&env).Verification & Testing
test_create_vesting_fails_while_pausedintests/unit/token_tests.rsverifying that callingcreate_vestingwhile paused reverts with"contract is paused".test_create_vesting_allowed_after_unpauseverifying that vesting creation succeeds once unpaused.cargo test --test token_tests.tests/integration/emergency_pause_flow.rspass.Closes #499