Skip to content

Commit

Permalink
Use scope.exists variable during proposal validation (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
corydickson authored Nov 25, 2024
1 parent 7afd9ea commit 5e49671
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ProposalTypesConfigurator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,11 @@ contract ProposalTypesConfigurator is IProposalTypesConfigurator {
function validateProposedTx(bytes calldata proposedTx, uint8 proposalTypeId, bytes24 key) public view {
Scope[] memory scopes = _assignedScopes[proposalTypeId][key];

if (_scopeExists[key]) {
for (uint8 i = 0; i < scopes.length; i++) {
Scope memory validScope = scopes[i];
if (validScope.selector != bytes4(proposedTx[:4])) revert Invalid4ByteSelector();
for (uint8 i = 0; i < scopes.length; i++) {
Scope memory validScope = scopes[i];
if (validScope.selector != bytes4(proposedTx[:4])) revert Invalid4ByteSelector();

if (validScope.exists) {
uint256 startIdx = 4;
uint256 endIdx = startIdx;
for (uint8 j = 0; j < validScope.parameters.length; j++) {
Expand Down

0 comments on commit 5e49671

Please sign in to comment.