-
Notifications
You must be signed in to change notification settings - Fork 143
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
[WIP] Horizon: fix unit tests and refactor #972
Conversation
[WIP] Horizon: fix unit tests and refactor
🚨 Report Summary
For more details view the full report in OpenZeppelin Code Inspector |
e3d164d
to
85a6f9d
Compare
2fab1d6
to
8947c07
Compare
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.
💪 great one, left a minor comment
@@ -16,6 +16,7 @@ import { IGraphProxyAdmin } from "@graphprotocol/contracts/contracts/upgrades/IG | |||
|
|||
import { ICuration } from "@graphprotocol/contracts/contracts/curation/ICuration.sol"; | |||
|
|||
import "forge-std/console.sol"; |
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.
👀
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.
😅
uint256 tokensReceiverRemaining = tokens - tokensProtocol - tokensDataService - tokensDelegationPool; | ||
uint256 totalCut = tokensProtocol + tokensDataService + tokensDelegationPool; | ||
if (totalCut > tokens) { | ||
revert GraphPaymentsCollectorInsufficientAmount(tokens, totalCut); |
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.
Not sure I would use the term Collector
here, how about just:
revert GraphPaymentsCollectorInsufficientAmount(tokens, totalCut); | |
revert GraphPaymentsInsufficientTokens(tokens, totalCut); |
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.
totally!
@@ -78,14 +78,19 @@ contract PaymentsEscrow is Multicall, GraphDirectory, IPaymentsEscrow { | |||
revert GraphEscrowThawingPeriodTooLong(withdrawEscrowThawingPeriod, MAX_THAWING_PERIOD); | |||
} | |||
|
|||
revokeCollectorThawingPeriod = revokeCollectorThawingPeriod; | |||
withdrawEscrowThawingPeriod = withdrawEscrowThawingPeriod; | |||
REVOKE_COLLECTOR_THAWING_PERIOD = revokeCollectorThawingPeriod; |
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.
LOL very nice catch
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.
haha I was so confused for a moment
No description provided.