Skip to content
This repository has been archived by the owner on Nov 11, 2022. It is now read-only.

feat: split the badger emissions for the two setts #9

Merged
merged 4 commits into from
May 20, 2022
Merged

feat: split the badger emissions for the two setts #9

merged 4 commits into from
May 20, 2022

Conversation

gosuto-inzasheru
Copy link
Contributor

please check thoroughly, tests are passing but im still learning ;)

@gosuto-inzasheru
Copy link
Contributor Author

i dont have the permissions, but this is ready to review now @GalloDaSballo

@@ -83,6 +86,7 @@ contract VotiumBribesProcessor is CowSwapSeller {
function ragequit(IERC20 token, bool sendToGovernance) external nonReentrant {
bool timeHasExpired = block.timestamp > lastBribeAction + MAX_MANAGER_IDLE_TIME;
require(msg.sender == manager || timeHasExpired);
require(HARVEST_FORWARDER.badger_tree() == BADGER_TREE);

Choose a reason for hiding this comment

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

We should only check this if sendToGovernance is false. If it's true then we just send tokens directly to governance not to the tree

Copy link
Owner

Choose a reason for hiding this comment

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

Agree to run the check after the if, saves 2.2k gas when not-needed

@GalloDaSballo GalloDaSballo merged commit 952bd9b into GalloDaSballo:feat-emissions May 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants