Skip to content

Instantly share code, notes, and snippets.

@jonatascm
Last active May 5, 2023 15:18
Show Gist options
  • Save jonatascm/9b6e4eb7530dd9b324ca2af8477ec63d to your computer and use it in GitHub Desktop.
Save jonatascm/9b6e4eb7530dd9b324ca2af8477ec63d to your computer and use it in GitHub Desktop.
Inconsistent hasRole check

Title: Inconsistent hasRole check in TransmitManager contract

Context: TransmitManager.sol#L169, TransmitManager.sol#L205

Severity: Low

Description: hasRole function is used with different values in the TransmitManager contract, in the function setSealGasLimit is used as keccak256("GAS_LIMIT_UPDATER_ROLE") and in setProposeGasLimit is used as string "GAS_LIMIT_UPDATER_ROLE"

It's expected to use the same role for both functions but currently, you need to set keccak256("GAS_LIMIT_UPDATER_ROLE") and "GAS_LIMIT_UPDATER_ROLE" roles

Recommendation: It's recommended to use the keccak256("GAS_LIMIT_UPDATER_ROLE") in both functions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment