{"id":22391967,"url":"https://github.com/cecile-hirschauer/wishlist_dapp","last_synced_at":"2026-05-03T01:38:15.574Z","repository":{"id":240260764,"uuid":"802092379","full_name":"Cecile-Hirschauer/Wishlist_DApp","owner":"Cecile-Hirschauer","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-19T15:30:31.000Z","size":382,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-08T00:59:52.743Z","etag":null,"topics":["dapp","etherjs","hardhat","nextjs","rainbowkit","shadcnui","smart-contracts","solidity","tailwindcss","viem","wagmi"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cecile-Hirschauer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-05-17T14:04:27.000Z","updated_at":"2024-05-27T19:57:45.000Z","dependencies_parsed_at":"2024-05-17T16:56:30.262Z","dependency_job_id":null,"html_url":"https://github.com/Cecile-Hirschauer/Wishlist_DApp","commit_stats":null,"previous_names":["cecile-hirschauer/wishlist_dapp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Cecile-Hirschauer/Wishlist_DApp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cecile-Hirschauer%2FWishlist_DApp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cecile-Hirschauer%2FWishlist_DApp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cecile-Hirschauer%2FWishlist_DApp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cecile-Hirschauer%2FWishlist_DApp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cecile-Hirschauer","download_url":"https://codeload.github.com/Cecile-Hirschauer/Wishlist_DApp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cecile-Hirschauer%2FWishlist_DApp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32555839,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T00:31:16.350Z","status":"ssl_error","status_checked_at":"2026-05-03T00:31:15.546Z","response_time":132,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dapp","etherjs","hardhat","nextjs","rainbowkit","shadcnui","smart-contracts","solidity","tailwindcss","viem","wagmi"],"created_at":"2024-12-05T04:14:59.602Z","updated_at":"2026-05-03T01:38:15.542Z","avatar_url":"https://github.com/Cecile-Hirschauer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wishlist Smart Contract\n\nThis repository contains the code for the Wishlist smart contract. This contract allows users to manage a wishlist of items they want to buy and allows others to buy items from these wishlists.\n\n## Overview\n\nThe Wishlist contract allows users to:\n- Add items to their wishlist.\n- View the items on their wishlist.\n- Buy items from other users' wishlists.\n\n## Contract Details\n\n### Contract: `Wishlist`\n\n#### Structs\n\n- **Item**\n    - `uint256 id`: The unique identifier of the item.\n    - `string name`: The name of the item.\n    - `uint256 price`: The price of the item in wei.\n    - `bool bought`: Whether the item has been bought.\n    - `address boughtBy`: The address of the user who bought the item, if any.\n\n#### State Variables\n\n- `uint256 public nextId`: The next id to be assigned to a new item.\n- `mapping(address =\u003e Item[]) private wishlist`: The wishlist of items for each user.\n\n#### Functions\n\n- `getWishlist(address _of) external view returns (Item[] memory)`: Returns the wishlist of a specific user.\n- `addToWishlist(string calldata _name, uint256 _price) external`: Adds a new item to the wishlist of the sender.\n- `buyItem(address _for, uint256 _id) external payable`: Allows a user to buy an item from someone else's wishlist.\n\n### Errors\n\n- `NotEnoughFounds()`: Thrown when the provided funds are not enough to buy an item.\n- `AlreadyBought()`: Thrown when an attempt is made to buy an item that has already been bought.\n\n### Test Coverage\n\n#### Version\n\n\u003e solidity-coverage: v0.8.12\n\n#### Instrumenting for coverage...\n\n\u003e Wishlist.sol\n\n#### Compilation:\n\nCompiled 1 Solidity file successfully (evm target: paris).\n\n#### Network Info\n\n\u003e HardhatEVM: v2.22.4\n\u003e network:    hardhat\n\n\n#### Deployment\n\n1. [x] should deploy the smart contract\n2. [x] addToWishList\n3. [x] should add an element in the wishList\n\n#### buyItem\n\n1. [x] should NOT buy item if not enough funds are provided\n2. [x] should buy the item if enough funds are provided\n3. [x] should NOT buy the item if the item has already been bought\n\n\n5 passing (151ms)\n\n---------------|----------|----------|----------|----------|----------------|\nFile           |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |\n---------------|----------|----------|----------|----------|----------------|\ncontracts/    |      100 |       75 |      100 |      100 |                |\nWishlist.sol |      100 |       75 |      100 |      100 |                |\n---------------|----------|----------|----------|----------|----------------|\nAll files      |      100 |       75 |      100 |      100 |                |\n---------------|----------|----------|----------|----------|----------------|\n\n\n### Deployment\n\nTo deploy the Wishlist smart contract with local node, use the following command:\n\n```sh\nnpx hardhat ignition deploy ./ignition/modules/Wishlist.js --network localhost\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcecile-hirschauer%2Fwishlist_dapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcecile-hirschauer%2Fwishlist_dapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcecile-hirschauer%2Fwishlist_dapp/lists"}