-
Notifications
You must be signed in to change notification settings - Fork 0
TMP: Pool roles module #3
Copy link
Copy link
Open
Description
TMP-3: Pool roles
tmp: 3
title: Pool roles module
author: Evert Kors (@Evert0x)
discussions-to: #3
status: Draft
type: Module
created: 2021/01/09
requires (*optional):
replaces (*optional):
Simple Summary
Create an interface to support the following roles:
- Member
- Admin
- Owner
Abstract
The following standard allows developers to easily integrate these standard roles.
Motivation
These roles are used in a lot of pool designs. This TMP will get everybody on the same page regarding usage.
Specification
Interface
interface IPoolRoles {
function initializeRoles(address _owner) external;
function isMember(address _account) external view returns (bool);
function addMember(address _account) external;
function removeMember(address _account) external;
function isManager(address _account) external view returns (bool);
function addManager(address _account) external;
function removeManager(address _account) external;
function isManagerRoleAdmin(address _account) external view returns (bool);
function isMemberRoleAdmin(address _account) external view returns (bool);
function getOwner() external view returns (address);
}interface IPoolRolesView {
modifier onlyOwner();
modifier onlyManager();
modifier onlyMember();
function _isMember(address _account) internal view returns (bool);
function _isManager(address _account) internal view returns (bool);
function _getOwner() internal view returns (address);
}
Storage
-
Rationale
Backwards Compatibility
Reference Implementation
https://github.com/Evert0x/MemberAccess
https://github.com/Evert0x/PoolRolesMock
Security Considerations
Copyright
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels