diff --git a/packages/foundry/src/Notes.sol b/packages/foundry/src/Notes.sol index f588b4b..ca55323 100644 --- a/packages/foundry/src/Notes.sol +++ b/packages/foundry/src/Notes.sol @@ -67,9 +67,6 @@ contract Notes { /// @dev The amount of different ratoings for a specific note mapping(address contractAddress => mapping(uint16 index => mapping(CNDataTypes.Rating rating => uint32 amount))) public amountOfRating; - /// @dev store score info - mapping(address contractAddress => mapping(uint16 index => CNDataTypes.NoteScore scoreInfo)) public scoreInfoOf; - /// @dev The rating weight of a user mapping(address user => mapping(CNDataTypes.Rating => uint40 amount)) public ratingWeightOf; @@ -88,9 +85,9 @@ contract Notes { * * @param _useWorldId a boolan if we are using worldcoin id or not * @param _worldId address of worldå - * @param _appId - * @param _noteId - * @param _voteId + * @param _appId worldcoin app id as string + * @param _noteId worldcoin action id for note + * @param _voteId worldcoin action id for vote * */ constructor( @@ -164,7 +161,7 @@ contract Notes { }); // Notescore variable - CNDataTypes.NoteScore score = CNDataTypes.NoteScore({ + CNDataTypes.NoteScore memory score = CNDataTypes.NoteScore({ score: 0, consideredHelpful: false }); @@ -268,7 +265,7 @@ contract Notes { } // Set the score info to the note - scoreInfoOf[_contractAddress][_noteIndex] = newScore; + scoresOf[_contractAddress][_noteIndex] = newScore; // Toggle the voted on note stattus for user userVotedOnNote[msg.sender][_contractAddress][_noteIndex] = true; @@ -325,8 +322,14 @@ contract Notes { * @return _notes array of notes associated with contract * */ - function retrieveContractNotes(address _contractAddress) external view returns (CNDataTypes.Note[] memory _notes) { + function retrieveContractNotes(address _contractAddress) external view returns ( + CNDataTypes.Note[] memory _notes, + CNDataTypes.NoteScore[] memory _scores + ) { // retrieve notes _notes = notesOf[_contractAddress]; + + // Retrieve score + _scores = scoresOf[_contractAddress]; } } diff --git a/packages/foundry/src/interfaces/IWorldID.sol b/packages/foundry/src/interfaces/IWorldID.sol index 81a5178..af80d26 100644 --- a/packages/foundry/src/interfaces/IWorldID.sol +++ b/packages/foundry/src/interfaces/IWorldID.sol @@ -4,7 +4,7 @@ pragma solidity 0.8.26; interface IWorldID { /// @notice Reverts if the zero-knowledge proof is invalid. /// @param root The of the Merkle tree - /// @param groupId The id of the Semaphore group + // @param groupId The id of the Semaphore group /// @param signalHash A keccak256 hash of the Semaphore signal /// @param nullifierHash The nullifier hash /// @param externalNullifierHash A keccak256 hash of the external nullifier