Skip to content
This repository was archived by the owner on Dec 3, 2025. It is now read-only.

Conversation

@geoff-vball
Copy link
Contributor

Why this should be merged

How this works

How this was tested

How is this documented

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

Slither found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

* @param publicKey The new public key of the validator
*/
function updateValidator(uint256 validatorId, uint256 weight, bytes memory publicKey) public {
require(validatorId < validators.length, "Invalid validator ID");

Check notice

Code scanning / Semgrep PRO

Semgrep Finding: solidity.performance.use-custom-error-not-require.use-custom-error-not-require Note

Consider using custom errors as they are more gas efficient while allowing developers to describe the error in detail using NatSpec.
function getValidator(
uint256 validatorId
) public view returns (Validator memory) {
require(validatorId < validators.length, "Invalid validator ID");

Check notice

Code scanning / Semgrep PRO

Semgrep Finding: solidity.performance.use-custom-error-not-require.use-custom-error-not-require Note

Consider using custom errors as they are more gas efficient while allowing developers to describe the error in detail using NatSpec.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants