Skip to content

Commit

Permalink
improve natspec
Browse files Browse the repository at this point in the history
  • Loading branch information
novaknole committed Sep 17, 2024
1 parent 53c5def commit 7a35db5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
16 changes: 11 additions & 5 deletions packages/contracts/src/core/permission/PermissionManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,18 @@ abstract contract PermissionManager is Initializable {
/// @notice A mapping storing permissions as hashes (i.e., `permissionHash(where, who, permissionId)`) and their status encoded by an address (unset, allowed, or redirecting to a `PermissionCondition`).
mapping(bytes32 => address) internal permissionsHashed;

/// @notice A struct containing the information for a permission.
/// @param delegations Owners can delegate the permission so delegatees can only grant it one time only.
/// @param owners The current owners of the permission with their own specific flags capabilities.
/// @param created Whether the permission has been created or not - used in consumer contracts(such as DAO.sol) to make decisions whether permission exists or not.
/// @param grantCounter How many owners(that have grant capabilities) are currently set for a permission.
/// @param revokeCounter How many owners(that have revoke capabilities) are currently set for a permission.
struct Permission {
mapping(address => uint256) delegations; // Owners can delegate the permission so delegatees can only grant it one time only.
mapping(address => uint256) owners; // The current owners of the permission with their own specific flags capabilities.
bool created; // Whether the permission has been created or not - used in consumer contracts(such as DAO.sol) to make decisions whether permission exists or not.
uint64 grantCounter; // How many owners(that have grant capabilities) are currently set for a permission.
uint64 revokeCounter; // How many owners(that have revoke capabilities) are currently set for a permission.
mapping(address => uint256) delegations;
mapping(address => uint256) owners;
bool created;
uint64 grantCounter;
uint64 revokeCounter;
}

/// @notice A mapping storing owners and delegations of each permission.
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/test/framework/dao/dao-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ async function getAnticipatedAddress(from: string) {
return anticipatedAddress;
}

describe('DAOFactory: ', function () {
describe.only('DAOFactory: ', function () {
let daoFactory: DAOFactory;
let managingDao: any;

Expand Down

0 comments on commit 7a35db5

Please sign in to comment.