Skip to content

Commit

Permalink
refactor: remove stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-fruitful committed Mar 13, 2024
1 parent 5d44750 commit 4cbf068
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 197 deletions.
1 change: 0 additions & 1 deletion src/facets/NaymsOwnershipFacet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { LibDiamond } from "lib/diamond-2-hardhat/contracts/libraries/LibDiamond
import { IERC173 } from "lib/diamond-2-hardhat/contracts/interfaces/IERC173.sol";
import { LibACL } from "src/libs/LibACL.sol";
import { LibHelpers } from "src/libs/LibHelpers.sol";
import { LibAdmin } from "src/libs/LibAdmin.sol";
import { LibConstants as LC } from "src/libs/LibConstants.sol";
import { Modifiers } from "src/shared/Modifiers.sol";

Expand Down
2 changes: 1 addition & 1 deletion src/libs/LibInitDiamond.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

import { AppStorage, FunctionLockedStorage, LibAppStorage } from "../shared/AppStorage.sol";
import { AppStorage, LibAppStorage } from "../shared/AppStorage.sol";
import { LibConstants as LC } from "./LibConstants.sol";
import { LibHelpers } from "./LibHelpers.sol";
import { LibACL } from "./LibACL.sol";
Expand Down
181 changes: 0 additions & 181 deletions src/libs/LibObject.sol

This file was deleted.

14 changes: 0 additions & 14 deletions src/shared/AppStorage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ struct AppStorage {
mapping(bytes32 objectId => string tokenSymbol) objectTokenSymbol;
mapping(bytes32 objectId => string tokenName) objectTokenName;
mapping(bytes32 objectId => address tokenWrapperAddress) objectTokenWrapper;
mapping(bytes32 entityId => bool isEntity) existingEntities; // entityId => is an entity?
mapping(bytes32 policyId => bool isPolicy) existingSimplePolicies; // simplePolicyId => is a simple policy?
//// ACL Configuration////
mapping(bytes32 roleId => mapping(bytes32 groupId => bool isRoleInGroup)) groups; //role => (group => isRoleInGroup)
mapping(bytes32 roleId => bytes32 assignerGroupId) canAssign; //role => Group that can assign/unassign that role
Expand All @@ -47,25 +45,13 @@ struct AppStorage {
// to ensure symbol uniqueness
}

struct FunctionLockedStorage {
mapping(bytes4 => bool) locked; // function selector => is locked?
}

library LibAppStorage {
bytes32 internal constant NAYMS_DIAMOND_STORAGE_POSITION = keccak256("diamond.standard.nayms.storage");
bytes32 internal constant FUNCTION_LOCK_STORAGE_POSITION = keccak256("diamond.function.lock.storage");

function diamondStorage() internal pure returns (AppStorage storage ds) {
bytes32 position = NAYMS_DIAMOND_STORAGE_POSITION;
assembly {
ds.slot := position
}
}

function functionLockStorage() internal pure returns (FunctionLockedStorage storage ds) {
bytes32 position = FUNCTION_LOCK_STORAGE_POSITION;
assembly {
ds.slot := position
}
}
}

0 comments on commit 4cbf068

Please sign in to comment.