šŸŽ‰ Welcome to PartyFinance documentation!
Protocol
Contracts
facets
JoinRequestsFacet

AlreadyRequested

error AlreadyRequested()

"User has already requested to join"

RequestAlreadyAccepted

error RequestAlreadyAccepted()

"User join request is already accepted"

RequestNotFound

error RequestNotFound()

"User join request is not found"

JoinRequestsFacet

Facet that lets read, create, update and delete join requests.

JoinRequest

event JoinRequest(address member)

Emitted when a user requests to join a private party

Parameters

NameTypeDescription
memberaddressAddress of the user requesting to join

HandleJoinRequest

event HandleJoinRequest(address member, bool accepted)

Emitted when a join requests gets accepted or rejected

Parameters

NameTypeDescription
memberaddressAddress of the user that requested to join
acceptedboolWhether the request was accepted or rejected

getJoinRequests

function getJoinRequests() external view returns (address[])

Gets the party pending join requests

Return Values

NameTypeDescription
[0]address[]Array of join requests that are pending

isAcceptedRequest

function isAcceptedRequest(address user) external view returns (bool)

Checks if the pending join request was accepted

Return Values

NameTypeDescription
[0]boolWhether if a given user has an accepted join request

createJoinRequest

function createJoinRequest() external

Requests to join a party

Only non Party Members are the only allowed to request to join

handleJoinRequest

function handleJoinRequest(bool accepted, address user) external

Handles a join request to party

Only Party Managers are the only allowed to handle requests

Parameters

NameTypeDescription
acceptedboolTrue if request should be accepted. Otherwise, it's discarted
useraddressAccound address of the request