Skip to content

Commit

Permalink
fix: change enum to bool
Browse files Browse the repository at this point in the history
  • Loading branch information
web3rover committed Sep 16, 2024
1 parent a6dee6b commit 0cde6c2
Show file tree
Hide file tree
Showing 2 changed files with 1,087 additions and 1,100 deletions.
14 changes: 3 additions & 11 deletions contracts/Governance/ACMCommandsAggregator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,14 @@ pragma solidity 0.8.25;
import { IAccessControlManagerV8 } from "../Governance/IAccessControlManagerV8.sol";

contract ACMCommandsAggregator {
/*
* @notice Enum to differentiate between giving and revoking permissions
*/
enum PermissionType {
GIVE,
REVOKE
}

/*
* @notice Struct to store permission details
*/
struct Permission {
/*
* @notice Type of permission
* @notice Type of permission (Give(false)/Revoke(true))
*/
PermissionType permissionType;
bool permissionType;
/*
* @notice Address of the contract
*/
Expand Down Expand Up @@ -100,7 +92,7 @@ contract ACMCommandsAggregator {
function executePermissions(uint256 index) external {
uint256 length = permissions[index].length;
for (uint256 i = 0; i < length; i++) {
if (permissions[index][i].permissionType == PermissionType.GIVE) {
if (permissions[index][i].permissionType == false) {
ACM.giveCallPermission(
permissions[index][i].contractAddress,
permissions[index][i].functionSig,
Expand Down
Loading

0 comments on commit 0cde6c2

Please sign in to comment.