-
Notifications
You must be signed in to change notification settings - Fork 85
Add Safe module to help automate claim bribes #2510
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2510 +/- ##
==========================================
- Coverage 40.89% 40.26% -0.64%
==========================================
Files 101 102 +1
Lines 4707 4801 +94
Branches 1242 1258 +16
==========================================
+ Hits 1925 1933 +8
- Misses 2780 2866 +86
Partials 2 2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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 good, but it is a bit weird to me to push code without real tests. However I agree this is not easy to setup test for this. So maybe test in prod it enough.
I'll have another pass a bit later, but otherwise looks good. 👍
uint256 _nftIndexEnd = nftIndexStart; | ||
nftIndexStart = nftIndexEnd; | ||
nftIndexEnd = _nftIndexEnd; |
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.
Maybe we can have something simple here:
(nftIndexStart, nftIndexEnd) = (nftIndexEnd, nftIndexStart)
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.
Ah, I didn't know this worked in Solidity, thanks
if (poolIndex >= _bribePools.length) { | ||
return false; | ||
} | ||
|
||
return _bribePools[poolIndex].poolAddress == bribePool; |
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.
nit: Do you think it could be possible to have the same code structure as there is for nftIdExists()
?
What I mean is that it could be nice to have all the value returned "calculated" on the return.
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.
Sure, will do
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.
LGTM 👍
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.
- All deployed contracts are listed in the deploy PR's description
- Deployed contract's verified code (and all dependencies) match the code in master
- Contract constructors have correct arguments
- The transactions that interacted with the newly deployed contract match the deploy script.
- No interactions.
- Governance proposal matches the deploy script
- No governance
- Smoke tests pass after fork test execution of the governance proposal
Diff contract
sol2uml diff 0x5bd73897E92Ecf3E6295FFe5C1104E99000d2c98 .,node_modules -k VE23DGDT5V32ZIQI1RE4GS6NXZPW447GYX -n base
(node:4677) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Compared the "ClaimBribesSafeModule" contract with address 0x5bd73897E92Ecf3E6295FFe5C1104E99000d2c98 on base
to local files under folders ".,node_modules"
match @openzeppelin/contracts/access/AccessControl.sol
match @openzeppelin/contracts/access/AccessControlEnumerable.sol
match @openzeppelin/contracts/access/IAccessControl.sol
match @openzeppelin/contracts/access/IAccessControlEnumerable.sol
match @openzeppelin/contracts/utils/Context.sol
match @openzeppelin/contracts/utils/introspection/ERC165.sol
match @openzeppelin/contracts/utils/introspection/IERC165.sol
match @openzeppelin/contracts/utils/Strings.sol
match @openzeppelin/contracts/utils/structs/EnumerableSet.sol
match contracts/automation/ClaimBribesSafeModule.sol
match contracts/interfaces/aerodrome/ICLGauge.sol
match contracts/interfaces/aerodrome/ICLPool.sol
Deployment
Code Change Checklist
To be completed before internal review begins:
Internal review:
Deploy checklist
Two reviewers complete the following checklist: