-
Notifications
You must be signed in to change notification settings - Fork 11
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
feat: add disputer contract, scripts and tests #87
base: main
Are you sure you want to change the base?
Conversation
in the hardhat config we should use getPkey everywhere |
contracts/Disputer.sol
Outdated
// Ensure sufficient allowance | ||
uint256 currentAllowance = IERC20(disputeToken).allowance(address(this), address(distributor)); | ||
if (currentAllowance < disputeAmount) { | ||
IERC20(disputeToken).approve(address(distributor), disputeAmount); |
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.
can be infinite I assume, risk remains minimal
distributor = _distributor; | ||
uint256 length = _initialWhitelist.length; | ||
for (uint256 i; i < length; ) { | ||
whitelist[_initialWhitelist[i]] = true; |
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.
perfect
contracts/Disputer.sol
Outdated
_; | ||
} | ||
|
||
// ================================ CONSTRUCTOR ================================ |
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.
selling my own church but to be uniform with the rest you could setup https://github.com/Picodes/headers :P
for (uint256 i; i < length; ) { | ||
whitelist[_initialWhitelist[i]] = true; | ||
unchecked { | ||
++i; |
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.
this kind of opti
No description provided.