Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@
"type": "string"
}
],
"stateMutability": "pure",
"stateMutability": "view",
"type": "function"
},
{
Expand Down
4 changes: 2 additions & 2 deletions packages/contracts-bedrock/snapshots/semver-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@
"sourceCodeHash": "0x18f43b227decd0f2a895b8b55e23fa6a47706697c272bbf2482b3f912be446e1"
},
"src/governance/ProposalValidator.sol:ProposalValidator": {
"initCodeHash": "0x6bcced3e1050048ecc63fd4d9a86ec72e756de4cb328d29c357cc31c87834341",
"sourceCodeHash": "0x9380a09eeb5f12304baf0d45ea14e7bbd1b046d805429bfe0de970a7dfccd176"
"initCodeHash": "0x8f58c80a20e9f5e631d9451d86b2b5478a60879e58420f6788e75629f5863430",
"sourceCodeHash": "0x1d4ce0d6f868bd36418e7e760c81ecb033c15720e6a35f088ea135620fcae91a"
},
"src/legacy/DeployerWhitelist.sol:DeployerWhitelist": {
"initCodeHash": "0x53099379ed48b87f027d55712dbdd1da7d7099925426eb0531da9c0012e02c29",
Expand Down
10 changes: 4 additions & 6 deletions packages/contracts-bedrock/src/governance/ProposalValidator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ contract ProposalValidator is OwnableUpgradeable, ReinitializableBase, ISemver {
CONSTANTS
//////////////////////////////////////////////////////////////*/

/// @notice Semantic version.
/// @custom:semver 1.0.0
string public constant version = "1.0.0";
Copy link

Choose a reason for hiding this comment

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

Bug: Version Function Change Breaks Interface Compliance

The version function was converted from a public pure virtual function to a public constant string. This change removes the ability for derived contracts to override the version and alters its state mutability from pure to view, breaking interface compliance (e.g., with ISemver) and potentially affecting external contracts expecting a pure function.

Locations (2)

Fix in CursorFix in Web


/// @notice The divisor used for percentage calculations in optimistic voting modules.
/// @dev Represents 100% in basis points (10,000 = 100%).
uint256 public constant OPTIMISTIC_MODULE_PERCENT_DIVISOR = 10_000;
Expand Down Expand Up @@ -238,12 +242,6 @@ contract ProposalValidator is OwnableUpgradeable, ReinitializableBase, ISemver {
/// @notice Mapping of proposal hash to their corresponding proposal data.
mapping(bytes32 => ProposalData) internal _proposals;

/// @notice Semantic version.
/// @custom:semver 1.0.0
function version() public pure virtual returns (string memory) {
return "1.0.0";
}

/// @notice Constructs the ProposalValidator contract.
/// @param _approvedProposerAttestationSchemaUid The schema UID for attestations in EAS for submitting proposals.
/// @param _topDelegatesAttestationSchemaUid The schema UID for attestations in EAS for checking if the caller
Expand Down