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

feat: add disputer contract, scripts and tests #87

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft

Conversation

nlecoufl
Copy link

No description provided.

@Picodes
Copy link
Contributor

Picodes commented Oct 25, 2024

in the hardhat config we should use getPkey everywhere

// Ensure sufficient allowance
uint256 currentAllowance = IERC20(disputeToken).allowance(address(this), address(distributor));
if (currentAllowance < disputeAmount) {
IERC20(disputeToken).approve(address(distributor), disputeAmount);
Copy link
Contributor

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

Choose a reason for hiding this comment

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

perfect

_;
}

// ================================ CONSTRUCTOR ================================
Copy link
Contributor

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

Choose a reason for hiding this comment

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

this kind of opti

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

Successfully merging this pull request may close these issues.

2 participants