-
Notifications
You must be signed in to change notification settings - Fork 0
TMP: MemberID module #2
Copy link
Copy link
Open
Description
TMP-2: MemberID
tmp: 2
title: Member control module
author: Evert Kors (@Evert0x)
discussions-to: #2
status: Draft
type: Module
created: 2021/01/09
requires (*optional):
replaces (*optional):
Simple Summary
Enable Member id's based on uint256 instead of member addresses. Members are able to upgrade their address.
Abstract
The following standard allows members to upgrade their working address while keeping the same member identifier.
Motivation
Upgrade ability of addresses is a valid use case.
Specification
Interface
interface IMemberID {
event MemberAddressChanged(
uint256 indexed memberID,
address indexed previousAddress,
address indexed newAddress
);
function upgradeAddress(address _oldAddress, address _newAddress) external;
function getAddressByMember(uint256 _member)
external
view
returns (address);
function getMemberByAddress(address _address)
external
view
returns (uint256);
}Storage
bytes32 constant MEMBER_ACCESS_STORAGE_POSITION = keccak256(
"diamond.standard.member.access.storage"
);
struct MemberStorage {
uint256 memberCounter;
mapping(address => uint256) addressToMember;
mapping(uint256 => address) memberToAddress;
}
Rationale
Backwards Compatibility
Reference Implementation
https://github.com/Evert0x/MemberAccess
Security Considerations
Copyright
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels