Skip to content
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

Merged
merged 5 commits into from
Nov 25, 2021

Conversation

smbsp
Copy link
Contributor

@smbsp smbsp commented Aug 18, 2021

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

@smbsp smbsp requested a review from tjcloa August 18, 2021 09:03
@smbsp smbsp self-assigned this Aug 18, 2021
@smbsp smbsp changed the base branch from development to refactor-loantoken-logic August 18, 2021 17:00
assembly {
paused := sload(slot)
}
require(paused != isPaused, "invalid");
Copy link
Contributor

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.

Copy link
Contributor Author

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);
Copy link
Contributor

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)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@smbsp smbsp changed the base branch from refactor-loantoken-logic to rubicon-deployment November 24, 2021 06:32
@smbsp smbsp merged commit c33f742 into rubicon-deployment Nov 25, 2021
@smbsp smbsp deleted the event-toggleFunctionPause-new branch November 25, 2021 07:26
Copy link

@Alitasovryn Alitasovryn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Emit an event on toggle function pause
4 participants