-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Description
As a member of a CookieJar I should be able to attest other members claims.
This should be a signal of if members believe the ReachInJar function, with their reason specified, preformed by a user was a good or bad use of a given Jar.
Contract function
/**
* @notice Allows a member to assess the reason for a claim.
* @dev The member can give a thumbs up or thumbs down to a claim reason. The assessment is posted to the Poster
* contract. This function can only be called by a member.
* @param cookieUid The unique identifier of the claim reason to be assessed.
* @param message The message to be posted with the assessment.
* @param isGood A boolean indicating whether the assessment is positive (true) or negative (false).
*/
function assessReason(bytes32 cookieUid, string calldata message, bool isGood) public {
if (!_isAllowList(msg.sender)) {
revert NOT_ALLOWED("not a member");
}
emit AssessReason(cookieUid, message, isGood);
}
Primary components to look / work in.
app/jars/[jarId]/page.tsx
components/claims-list.tsx
I believe this assessReason function signature is outdated. I think it should take an object.
reason: {
// I haven't thought about what this should look like yet. maybe just a uuid, maybe it needs to reference the claim but I don't think so.
id: number
// Validate in the form with zod. That's what we've been using for form validation. Chat GPT is an excellent tool for zod schemas
link: string
reason: string
// probably leave this as an empty string for now. We can figure out what we want to do with tags later.
tag: string