-
Notifications
You must be signed in to change notification settings - Fork 46
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
Event toggle function pause new #357
Conversation
…utedCollective/Sovryn-smart-contracts into event-toggleFunctionPause-new
assembly { | ||
paused := sload(slot) | ||
} | ||
require(paused != isPaused, "invalid"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the require is not strictly required here, but doesn't hurt either. however, the error message doesn't provide any valuable information. change it to "isPaused is already set to that value" or similar message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
assembly { | ||
sstore(slot, isPaused) | ||
} | ||
emit ToggleFunctionPaused(funcId, !isPaused, isPaused); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the event should rather be called
ToggledFunctionPause
(toggle is the verb here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
…llective/Sovryn-smart-contracts into event-toggleFunctionPause-new
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine.
closes: #297
Added an event ToggleFunctionPaused to the function toggleFunctionPause()
We earlier had Contract Size issues and hence this version is built using updated Loan Token logic using Beacon Chain. This PR is a replacement of: #317