Booking contract
Status: Draft, Last Updated: 8 June 2024
Proof of Presence (Booking) Contract is a framework for using an on-chain lock mechanic to issue utility to a real world asset.
Functional Requirements
DAO Membership
An address must be a DAO member to be able to "instant book"
If address books without being DAO member, status will be set to "pending" (SPACE_HOST role would move them to "confirmed")
(backlog) Upon Check In the Space Host (or DAO approved hardware) changes the booking status to "checked in".
(backlog) Upon cancellation of booking (prior to the booking.start and as defined by DAO rule), contract should return locked tokens to the sender wallet.
Only an address which has the MEMBERSHIP_MANAGER_ROLE, is allowed to add a member to the DAO
Gherkins
Add member to DAO
Steps to book
Add member to DAO.
Add member to DAO
Adding a member to the DAO can be done by calling the
addMember()
function.Function:
addMember(address account)
Description
Adds a member to the membership registry.
Permissions:
Can only be called by an address with the
AccessControlLib.MEMBERSHIP_MANAGER_ROLE
Input Validation:
The
account
to be added should not already exist in the membership registryTechnical
Parameters:
NameTypeDescriptionaccount
address
The address of the member to be added
Modifers:
NameDescriptiononlyRole(AccessControlLib.MEMBERSHIP_MANAGER_ROLE)
Ensures the function is called only by an address with the MEMBERSHIP_MANAGER_ROLE
Events:
event MemberAdded(address account, address executer);
NameTypeDescriptionaccount
address
Address of added member
executer
address
Address of membership manager who is adding member
Code:
Booking System Requirements
Aim is to having a booking system as fast
anyone with a login can submit a booking request
If they are a member and there is space then they get autobooked
Member has to be able to cancel their booking
CANCELLATION If they cancel the tokens are transferred
Last updated