Skip to content

Conversation

@0x-r4bbit
Copy link
Member

No description provided.

[lint]
lint_on_build = false # Since we are using our own linting solution, we can disable built in one
exclude_lints = ["mixed-case-variable", "mixed-case-function"]
ignore = ["src/utils/ERC20VotesUpgradeable.sol"]
Copy link
Member Author

Choose a reason for hiding this comment

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

Reasoning for the above:

  • I've excluded mixed case rules for variables and functions because we have plenty of usages were we don't want to use mixed case intentionally (upgradeable __init() functions being one example).
  • I've ignored ERC20VotesUpgradeable because it violates many of the linting rules but is 99% library code we don't really maintain (we just changed one line in that contract)

"verify:emergency_mode": "certoraRun certora/confs/EmergencyMode.conf",
"verify:karma": "certoraRun certora/confs/Karma.conf",
"lint:sol": "forge fmt --check && pnpm solhint {script,src,test,certora}/**/*.sol",
"lint:sol": "forge fmt --check && forge lint",
Copy link
Member Author

Choose a reason for hiding this comment

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

CI and pnpm lint now uses forge lint

if (!hasRole(DEFAULT_ADMIN_ROLE, msg.sender) && !hasRole(OPERATOR_ROLE, msg.sender)) {
revert Karma__Unauthorized();
}
_onlyAdminOrOperator(msg.sender);
Copy link
Member Author

Choose a reason for hiding this comment

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

Modifier functionality has been moved into internal functions, because otherwise, the logic gets inlined into every function where the modifier is used.

uint256 claimedBitIndex = index % 256;
uint256 claimedWord = claimedBitMap[epoch][claimedWordIndex];
uint256 mask = (1 << claimedBitIndex);
uint256 mask = (BITMAP_MASK_BASE << claimedBitIndex);
Copy link
Member Author

Choose a reason for hiding this comment

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

This change is to avoid a warning that one might have swapped the two operands.

external
view
returns (bool);
}
Copy link
Member Author

Choose a reason for hiding this comment

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

This one I've removed because it's not used anywhere

return(0, 0x20)
}
}
}
Copy link
Member Author

Choose a reason for hiding this comment

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

The verifier is also not used anywhere.

@0x-r4bbit 0x-r4bbit merged commit 09ebd30 into develop Nov 11, 2025
22 checks passed
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