Skip to content

Commit

Permalink
Merge pull request #10 from chain-notes-brussels/finalContract
Browse files Browse the repository at this point in the history
Final contract
  • Loading branch information
jacksmithinsulander authored Jul 13, 2024
2 parents f6a769b + 0244f1d commit c5b1cef
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions packages/foundry/src/Notes.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ contract Notes {
// Helper for worldId proving actions
using ByteHasher for bytes;

// _____ __ __
// / ___// /_____ _/ /____ _____
// \__ \/ __/ __ `/ __/ _ \/ ___/
// ___/ / /_/ /_/ / /_/ __(__ )
// /____/\__/\__,_/\__/\___/____/

/// @dev Keep track of if we are using worldId
bool public useWordlId;

Expand Down Expand Up @@ -67,6 +73,23 @@ contract Notes {
/// @dev A users rating on a specific note
mapping(address user => mapping(address contractAddress => mapping(uint16 index => CNDataTypes.Rating))) public userRatingOfNote;

// ______ __ __
// / ____/___ ____ _____/ /________ _______/ /_____ _____
// / / / __ \/ __ \/ ___/ __/ ___/ / / / ___/ __/ __ \/ ___/
// / /___/ /_/ / / / (__ ) /_/ / / /_/ / /__/ /_/ /_/ / /
// \____/\____/_/ /_/____/\__/_/ \__,_/\___/\__/\____/_/

/**
* @notice
* Constructor for Notes contract
*
* @param _useWorldId a boolan if we are using worldcoin id or not
* @param _worldId address of worldå
* @param _appId
* @param _noteId
* @param _voteId
*
*/
constructor(
bool _useWorldId,
address _worldId,
Expand All @@ -91,6 +114,12 @@ contract Notes {
.hashToField();
}

// ______ __ __ ______ __ _
// / ____/ __/ /____ _________ ____ _/ / / ____/_ ______ _____/ /_(_)___ ____ _____
// / __/ | |/_/ __/ _ \/ ___/ __ \/ __ `/ / / /_ / / / / __ \/ ___/ __/ / __ \/ __ \/ ___/
// / /____> </ /_/ __/ / / / / / /_/ / / / __/ / /_/ / / / / /__/ /_/ / /_/ / / / (__ )
// /_____/_/|_|\__/\___/_/ /_/ /_/\__,_/_/ /_/ \__,_/_/ /_/\___/\__/_/\____/_/ /_/____/

/**
* @notice
* Allows a user to publish a note for a specific contract
Expand Down Expand Up @@ -269,6 +298,12 @@ contract Notes {
);
}

// _ ___ ______ __ _
// | | / (_)__ _ __ / ____/_ ______ _____/ /_(_)___ ____ _____
// | | / / / _ \ | /| / / / /_ / / / / __ \/ ___/ __/ / __ \/ __ \/ ___/
// | |/ / / __/ |/ |/ / / __/ / /_/ / / / / /__/ /_/ / /_/ / / / (__ )
// |___/_/\___/|__/|__/ /_/ \__,_/_/ /_/\___/\__/_/\____/_/ /_/____/

/**
* @notice
* getter function to getting all notes of a contract
Expand Down

0 comments on commit c5b1cef

Please sign in to comment.