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

AnnouncementsFacet

Facet that lets read, create, update and delete announcements.

createAnnouncement

function createAnnouncement(string title, string content, string url, string img) external

Create a Party announcement

Managers are the only allowed to create announcements

Parameters

NameTypeDescription
titlestringTitle of the announcement
contentstringContent of the announcement
urlstringContent URL added to the announcemnt
imgstringImage uri of the announcement

getAnnouncements

function getAnnouncements() external view returns (struct Announcement[])

Gets the Party announcements

Return Values

NameTypeDescription
[0]struct Announcement[]Array of Announcement structs

getAnnouncement

function getAnnouncement(uint256 i) external view returns (struct Announcement)

Gets a single Party announcement

Parameters

NameTypeDescription
iuint256Index of the announcement

Return Values

NameTypeDescription
[0]struct AnnouncementAnnouncement struct

editAnnouncement

function editAnnouncement(string title, string content, string url, string img, uint256 i) external

Edit a Party announcement

Managers are the only allowed to edit an announcement

Parameters

NameTypeDescription
titlestringTitle of the announcement
contentstringContent of the announcement
urlstringContent URL added to the announcemnt
imgstringImage uri of the announcement
iuint256Index of the announcement

removeAnnouncement

function removeAnnouncement(uint256 i) external

Remove a Party announcement

Managers are the only allowed to remove an announcement

Parameters

NameTypeDescription
iuint256Index of the announcement