From 83100be268d9066037e6b895eb938078d222b7a2 Mon Sep 17 00:00:00 2001 From: tokodev Date: Thu, 22 Feb 2024 14:15:41 +0100 Subject: [PATCH 01/11] Add real grants from batch 0 and batch 1 --- packages/local_db/seed.sample.json | 168 ++++++++++++++++++++++------- 1 file changed, 128 insertions(+), 40 deletions(-) diff --git a/packages/local_db/seed.sample.json b/packages/local_db/seed.sample.json index 10c1afc..dc4f27c 100644 --- a/packages/local_db/seed.sample.json +++ b/packages/local_db/seed.sample.json @@ -127,47 +127,135 @@ } }, "grants": { - "fWmHtS89edfHhVwOOYOz": { - "askAmount": 0.5, - "builder": "0x55b9CB0bCf56057010b9c471e7D42d60e1111EEa", - "description": "This is long description for 1st grant", - "status": "completed", - "timestamp": 1660983774000, - "title": "1s Test grant" - }, - "eOp1CMm83N1LzlVhcLZu": { - "askAmount": 0.5, - "builder": "0x60583563D5879C2E59973E5718c7DE2147971807", - "title": "2nd Test grant", - "description": "This is long description", - "status": "completed", - "timestamp": 1660993774000 - }, - "5nwkdmFIAecWO2XUyyWP": { - "askAmount": 0.1, - "builder": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", - "title": "3rd Test grant", - "description": "This is long description for 3rd grant", - "status": "completed", - "timestamp": 1660983774000 - }, - "9ZoLxv5ay18mnGn6BwqG": { - "askAmount": 0.25, - "builder": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", - "title": "4th Test grant", - "description": "This is long description for 3rd grant", - "status": "proposed", - "timestamp": 1660983774000 + "g9EmnJROMeqydxP1BGSx": { + "askAmount": 0.125, + "builder": "0x55fF7E28e7cd43C104dC89Aa69285E0E6EBa064e", + "title": "Buidl Guild English Auction", + "description": "Buidl Guild is a testnet english auction platform where users can create an auction on NFTs.", + "status": "completed", + "timestamp": 1706627065000 + }, + "fhiWGoHrfdGM2iuFZTGT": { + "askAmount": 0.125, + "builder": "0x2F142f9F52af0845B7b8b1353E349Ca1Cb8EFE92", + "title": "15 Puzzle", + "description": "The famous sliding puzzle with 15 squares. Base starter writes your moves to the blockchain.", + "status": "completed", + "timestamp": 1706656049000 + }, + "EkbuyFm9gYwn27nja7m3": { + "askAmount": 0.125, + "builder": "0x2b30efBA367D669c9cd7723587346a79b67A42DB", + "title": "0xPoker", + "description": "A Commit and Reveal Poker Game! Live on the Optimism chain =) Took inspiration from the RockPaperScissors", + "status": "completed", + "timestamp": 1706690199000 + }, + "MINVRoKfXZOgO6nsxUp0": { + "askAmount": 0.125, + "builder": "0x5D70E3b540f58beCd10B74f6c0958b31e3190DA7", + "title": "Duel - Bet dApp", + "description": "This dApp allows users to make bets on the future price of Ethereum (ETH). Users can: - Create bets: Choose a future date and ETH price, and stake an amount of ETH. - Resolve bets: When the chosen date arrives, bets can be finalized according to the ETH price at the target date. - Win or lose: If the ETH price is above the chosen price when the bet is chosen as \"Higher\", the user wins the bet and receives the staked ETH plus winnings. I will be glad to hear your feedbacks. Have fun!\n", + "status": "completed", + "timestamp": 1706815801000 + }, + "nLsqcBkuoNb8nWVAuJg0": { + "askAmount": 0.125, + "builder": "0x1CeF0e6072810013487f7632350f9336AD6CADAD", + "title": "Public Good supportUs", + "description": "Decentralized public goods funding application. Campaign owners can set funds needed", + "status": "completed", + "timestamp": 1706860595000 + }, + "BeyVyZuAvbFnUWjVbJ7U": { + "askAmount": 0.125, + "builder": "0xC6e64eBeFaFaB3d646adadca5D93A7c44f62544f", + "title": "ZeroTrust Accounts", + "description": "ZeroTrust Accounts will provide a decentralized, secure, and self-sovereign approach to Ethereum smart contract accounts", + "status": "completed", + "timestamp": 1706892428000 + }, + "6JZBiYsLbfZ06SrQGyGz": { + "askAmount": 0.125, + "builder": "0x3b529ac4F8dc0C40Fec0f1192029755275A0c3Cd", + "title": "Event Management Dapp", + "description": "An app to create, manage, and sell tickets for events and buy them along with many functionalities", + "status": "completed", + "timestamp": 1706940527000 + }, + "ItKedxWVEaX9OcCrphMu": { + "askAmount": 0.125, + "builder": "0xbE7fD3889C01F032184544DC0005F0d47daCcf09", + "title": "Switch Dapp", + "description": "Switch is a web app for sending defferred transactions. The user has a simple UI for setting a transaction which will be triggered and excecuted later based on speficied: 1) Time delay or 2) On-chain variable output. Implements Chainlink Functions and Automation.", + "status": "completed", + "timestamp": 1707065464000 + }, + "ZW4MfCMCU209bKP8Va8M": { + "askAmount": 0.125, + "builder": "0x8757F328371E571308C1271BD82B91882253FDd1", + "title": "D-Auction Platform (Decentralized Auction)", + "description": "Decentralized Auction Platform named D-Auction is a smart contract-based solution for conducting decentralized auctions of non-fungible tokens (NFTs). This platform allows users to create auctions for their NFTs, participate in bidding, and claim ownership of the NFTs upon winning the auctions", + "status": "completed", + "timestamp": 1707065465000 + }, + "i2ChwolQO0qR1Qbp0qCQ": { + "askAmount": 0.125, + "builder": "0xdDE7B987A01717EEfCcA1Dc5280c164E2cCD133e", + "title": "DEGEN-STATION", + "description": "Degen Station is a raffle contract that allows for any individual to stake a certain amount of Eth with hopes of winning the grand prize which is 96% of the total stakes in the contract. Winners of each batch are also rewarded with an nft which. The is also a in built point system which is expected to tract users usage so that can be rewarded with the protocol tokens when it goes life.", + "status": "completed", + "timestamp": 1705910401000 + }, + "UeQnRI5ISO93XHYcVTRj": { + "askAmount": 0.125, + "builder": "0x38D9cFf58D233AF0B9c1434EEDE012009D23c971", + "title": "External Contract UI", + "description": "A tool to improve the developer experience on scaffold-eth 2 by providing a tool to interact with external contract addresses", + "status": "completed", + "timestamp": 1705910402000 + }, + "nEjaQfkyzMgt3vcbAqLd": { + "askAmount": 0.125, + "builder": "0x63191383EDbd8531C442868d87555f1EA2f6ad4E", + "title": "Querying Smart Contract Parameters From TheGraph", + "description": "Basic understanding of the \ud83d\udea9 Challenge #3: The Graph with basic explanations that are going to be helpful for the newcomers.", + "status": "completed", + "timestamp": 1705910403000 + }, + "AuyB2d2IydtOEvePeyNN": { + "askAmount": 0.125, + "builder": "0xFC7BC662fA06137F769366A46B19924371E880bd", + "title": "\ud83e\udd57 Food Mart", + "description": "An online restaurant food application that enables wallet integration, with images stored on IPFS. Additionally, the web app provides the option to view the calorie count per serving for each dish.", + "status": "completed", + "timestamp": 1705910404000 + }, + "H7AtTDtQOQ0h6wRT1A0G": { + "askAmount": 0.125, + "builder": "0xfbCE2693FBEd73E3D464d662235DC5ADC5454C01", + "title": "Revolution Roulette", + "description": "On chain russian roulette with unique items as powerups. Settle minor bets with some fun on optimism \ud83d\ude0e", + "status": "completed", + "timestamp": 1705910405000 + }, + "xQ7KIxSjvUqOVjPUl3R2": { + "askAmount": 0.125, + "builder": "0xC863DFEE737C803c93aF4b6b27029294f6a56eB5", + "title": "Scaffold-XOC", + "description": "The open-source frontend for the first decentralized stablecoin pegged to the Mexican Peso ($MXN). This dapp is La Dao's playground to grow DeFi in Mexico", + "status": "completed", + "timestamp": 1705910406000 + }, + "LQane0FtluzI8l3kwQGL": { + "askAmount": 0.125, + "builder": "0x5638Bf706056d01b2DaB817915244B3E21a56FE8", + "title": "Voting App", + "description": "A polling app that allows users to create polls, vote, and view the results on topics that matter to them. Built with solidity and nextjs, it features transparent voting mechanisms and real-time results visualization.", + "status": "completed", + "timestamp": 1705910407000 + } }, - "7kTh6xnk2338O0gJyzt6": { - "askAmount": 1, - "builder": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", - "title": "5th Test grant", - "description": "This is long description for 5th grant", - "status": "approved", - "timestamp": 1660983774000 - } - }, "events": [ { "type": "build.submit", From 8749ac6ed768a9adea7c92882e4884adbc1c79ed Mon Sep 17 00:00:00 2001 From: tokodev Date: Thu, 22 Feb 2024 14:16:34 +0100 Subject: [PATCH 02/11] Hide dark mode toggle --- packages/nextjs/components/Footer.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/nextjs/components/Footer.tsx b/packages/nextjs/components/Footer.tsx index bd6a68a..44fee68 100644 --- a/packages/nextjs/components/Footer.tsx +++ b/packages/nextjs/components/Footer.tsx @@ -3,7 +3,8 @@ import Link from "next/link"; import { hardhat } from "viem/chains"; import { MagnifyingGlassIcon } from "@heroicons/react/24/outline"; import { HeartIcon } from "@heroicons/react/24/outline"; -import { SwitchTheme } from "~~/components/SwitchTheme"; +// SwitchTheme is commented out until it is fully implemented +// import { SwitchTheme } from "~~/components/SwitchTheme"; import { BuidlGuidlLogo } from "~~/components/assets/BuidlGuidlLogo"; import { Faucet } from "~~/components/scaffold-eth"; import { useTargetNetwork } from "~~/hooks/scaffold-eth/useTargetNetwork"; @@ -30,7 +31,7 @@ export const Footer = () => { )} - + {/* */}
From a896f850e4aa370e3d52a16bf58a682cb64bed61 Mon Sep 17 00:00:00 2001 From: tokodev Date: Fri, 23 Feb 2024 01:28:01 +0100 Subject: [PATCH 03/11] Set defaultTheme to light and disable system theme check --- packages/nextjs/app/layout.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nextjs/app/layout.tsx b/packages/nextjs/app/layout.tsx index 9ee5c34..bb9cd69 100644 --- a/packages/nextjs/app/layout.tsx +++ b/packages/nextjs/app/layout.tsx @@ -77,7 +77,7 @@ const ScaffoldEthApp = ({ children }: { children: React.ReactNode }) => { className={`${ppEditorial.variable} ${spaceMono.variable} ${spaceGrotesk.variable} scroll-smooth`} > - + {children} From 49d62d577fb74e92cd246cfbbd5232e835dd11a9 Mon Sep 17 00:00:00 2001 From: Pablo Alayeto <55535804+Pabl0cks@users.noreply.github.com> Date: Sat, 24 Feb 2024 01:23:00 +0100 Subject: [PATCH 04/11] Update status from batch 1 grants --- packages/local_db/seed.sample.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/local_db/seed.sample.json b/packages/local_db/seed.sample.json index dc4f27c..2fad708 100644 --- a/packages/local_db/seed.sample.json +++ b/packages/local_db/seed.sample.json @@ -132,7 +132,7 @@ "builder": "0x55fF7E28e7cd43C104dC89Aa69285E0E6EBa064e", "title": "Buidl Guild English Auction", "description": "Buidl Guild is a testnet english auction platform where users can create an auction on NFTs.", - "status": "completed", + "status": "approved", "timestamp": 1706627065000 }, "fhiWGoHrfdGM2iuFZTGT": { @@ -140,7 +140,7 @@ "builder": "0x2F142f9F52af0845B7b8b1353E349Ca1Cb8EFE92", "title": "15 Puzzle", "description": "The famous sliding puzzle with 15 squares. Base starter writes your moves to the blockchain.", - "status": "completed", + "status": "approved", "timestamp": 1706656049000 }, "EkbuyFm9gYwn27nja7m3": { @@ -148,7 +148,7 @@ "builder": "0x2b30efBA367D669c9cd7723587346a79b67A42DB", "title": "0xPoker", "description": "A Commit and Reveal Poker Game! Live on the Optimism chain =) Took inspiration from the RockPaperScissors", - "status": "completed", + "status": "approved", "timestamp": 1706690199000 }, "MINVRoKfXZOgO6nsxUp0": { @@ -156,7 +156,7 @@ "builder": "0x5D70E3b540f58beCd10B74f6c0958b31e3190DA7", "title": "Duel - Bet dApp", "description": "This dApp allows users to make bets on the future price of Ethereum (ETH). Users can: - Create bets: Choose a future date and ETH price, and stake an amount of ETH. - Resolve bets: When the chosen date arrives, bets can be finalized according to the ETH price at the target date. - Win or lose: If the ETH price is above the chosen price when the bet is chosen as \"Higher\", the user wins the bet and receives the staked ETH plus winnings. I will be glad to hear your feedbacks. Have fun!\n", - "status": "completed", + "status": "approved", "timestamp": 1706815801000 }, "nLsqcBkuoNb8nWVAuJg0": { @@ -164,7 +164,7 @@ "builder": "0x1CeF0e6072810013487f7632350f9336AD6CADAD", "title": "Public Good supportUs", "description": "Decentralized public goods funding application. Campaign owners can set funds needed", - "status": "completed", + "status": "approved", "timestamp": 1706860595000 }, "BeyVyZuAvbFnUWjVbJ7U": { @@ -172,7 +172,7 @@ "builder": "0xC6e64eBeFaFaB3d646adadca5D93A7c44f62544f", "title": "ZeroTrust Accounts", "description": "ZeroTrust Accounts will provide a decentralized, secure, and self-sovereign approach to Ethereum smart contract accounts", - "status": "completed", + "status": "approved", "timestamp": 1706892428000 }, "6JZBiYsLbfZ06SrQGyGz": { @@ -180,7 +180,7 @@ "builder": "0x3b529ac4F8dc0C40Fec0f1192029755275A0c3Cd", "title": "Event Management Dapp", "description": "An app to create, manage, and sell tickets for events and buy them along with many functionalities", - "status": "completed", + "status": "approved", "timestamp": 1706940527000 }, "ItKedxWVEaX9OcCrphMu": { @@ -188,7 +188,7 @@ "builder": "0xbE7fD3889C01F032184544DC0005F0d47daCcf09", "title": "Switch Dapp", "description": "Switch is a web app for sending defferred transactions. The user has a simple UI for setting a transaction which will be triggered and excecuted later based on speficied: 1) Time delay or 2) On-chain variable output. Implements Chainlink Functions and Automation.", - "status": "completed", + "status": "approved", "timestamp": 1707065464000 }, "ZW4MfCMCU209bKP8Va8M": { @@ -196,7 +196,7 @@ "builder": "0x8757F328371E571308C1271BD82B91882253FDd1", "title": "D-Auction Platform (Decentralized Auction)", "description": "Decentralized Auction Platform named D-Auction is a smart contract-based solution for conducting decentralized auctions of non-fungible tokens (NFTs). This platform allows users to create auctions for their NFTs, participate in bidding, and claim ownership of the NFTs upon winning the auctions", - "status": "completed", + "status": "approved", "timestamp": 1707065465000 }, "i2ChwolQO0qR1Qbp0qCQ": { From b8162f30c74433b274292f50763277f79bfc26f6 Mon Sep 17 00:00:00 2001 From: tokodev Date: Sun, 25 Feb 2024 23:35:28 +0100 Subject: [PATCH 05/11] Modify build description --- packages/local_db/seed.sample.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/local_db/seed.sample.json b/packages/local_db/seed.sample.json index 2fad708..3f772b3 100644 --- a/packages/local_db/seed.sample.json +++ b/packages/local_db/seed.sample.json @@ -131,7 +131,7 @@ "askAmount": 0.125, "builder": "0x55fF7E28e7cd43C104dC89Aa69285E0E6EBa064e", "title": "Buidl Guild English Auction", - "description": "Buidl Guild is a testnet english auction platform where users can create an auction on NFTs.", + "description": "English auction platform where users can create an auction on NFTs.", "status": "approved", "timestamp": 1706627065000 }, From 1047ed146bcd9116e52679f7decd07f4aa0cb1aa Mon Sep 17 00:00:00 2001 From: tokodev Date: Sun, 25 Feb 2024 23:36:32 +0100 Subject: [PATCH 06/11] Force light theme until dark mode is implemented To prevent any edge case loading dark mode and not being able to switch to light --- packages/nextjs/app/layout.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nextjs/app/layout.tsx b/packages/nextjs/app/layout.tsx index bb9cd69..f5a6379 100644 --- a/packages/nextjs/app/layout.tsx +++ b/packages/nextjs/app/layout.tsx @@ -77,7 +77,7 @@ const ScaffoldEthApp = ({ children }: { children: React.ReactNode }) => { className={`${ppEditorial.variable} ${spaceMono.variable} ${spaceGrotesk.variable} scroll-smooth`} > - + {children} From 16ab8fab88c518aa026c416ac645d44cfc197ee5 Mon Sep 17 00:00:00 2001 From: tokodev Date: Sun, 25 Feb 2024 23:38:01 +0100 Subject: [PATCH 07/11] Remove commented code --- packages/nextjs/components/Footer.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/nextjs/components/Footer.tsx b/packages/nextjs/components/Footer.tsx index 44fee68..1ae5811 100644 --- a/packages/nextjs/components/Footer.tsx +++ b/packages/nextjs/components/Footer.tsx @@ -3,8 +3,6 @@ import Link from "next/link"; import { hardhat } from "viem/chains"; import { MagnifyingGlassIcon } from "@heroicons/react/24/outline"; import { HeartIcon } from "@heroicons/react/24/outline"; -// SwitchTheme is commented out until it is fully implemented -// import { SwitchTheme } from "~~/components/SwitchTheme"; import { BuidlGuidlLogo } from "~~/components/assets/BuidlGuidlLogo"; import { Faucet } from "~~/components/scaffold-eth"; import { useTargetNetwork } from "~~/hooks/scaffold-eth/useTargetNetwork"; @@ -31,7 +29,6 @@ export const Footer = () => { )}
- {/* */}
From 5590dc35e72ecffc977e28f783e1c0da3582b591 Mon Sep 17 00:00:00 2001 From: tokodev Date: Mon, 26 Feb 2024 00:00:24 +0100 Subject: [PATCH 08/11] Add link to grants and set initial data --- packages/local_db/seed.sample.json | 16 ++++++++++++++++ packages/nextjs/app/api/grants/new/route.ts | 4 +++- packages/nextjs/services/database/schema.ts | 1 + 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/packages/local_db/seed.sample.json b/packages/local_db/seed.sample.json index 3f772b3..2986d24 100644 --- a/packages/local_db/seed.sample.json +++ b/packages/local_db/seed.sample.json @@ -132,6 +132,7 @@ "builder": "0x55fF7E28e7cd43C104dC89Aa69285E0E6EBa064e", "title": "Buidl Guild English Auction", "description": "English auction platform where users can create an auction on NFTs.", + "link": "https://app.buidlguidl.com/build/g9EmnJROMeqydxP1BGSx", "status": "approved", "timestamp": 1706627065000 }, @@ -140,6 +141,7 @@ "builder": "0x2F142f9F52af0845B7b8b1353E349Ca1Cb8EFE92", "title": "15 Puzzle", "description": "The famous sliding puzzle with 15 squares. Base starter writes your moves to the blockchain.", + "link": "https://app.buidlguidl.com/build/fhiWGoHrfdGM2iuFZTGT", "status": "approved", "timestamp": 1706656049000 }, @@ -148,6 +150,7 @@ "builder": "0x2b30efBA367D669c9cd7723587346a79b67A42DB", "title": "0xPoker", "description": "A Commit and Reveal Poker Game! Live on the Optimism chain =) Took inspiration from the RockPaperScissors", + "link": "https://app.buidlguidl.com/build/EkbuyFm9gYwn27nja7m3", "status": "approved", "timestamp": 1706690199000 }, @@ -156,6 +159,7 @@ "builder": "0x5D70E3b540f58beCd10B74f6c0958b31e3190DA7", "title": "Duel - Bet dApp", "description": "This dApp allows users to make bets on the future price of Ethereum (ETH). Users can: - Create bets: Choose a future date and ETH price, and stake an amount of ETH. - Resolve bets: When the chosen date arrives, bets can be finalized according to the ETH price at the target date. - Win or lose: If the ETH price is above the chosen price when the bet is chosen as \"Higher\", the user wins the bet and receives the staked ETH plus winnings. I will be glad to hear your feedbacks. Have fun!\n", + "link": "https://app.buidlguidl.com/build/MINVRoKfXZOgO6nsxUp0", "status": "approved", "timestamp": 1706815801000 }, @@ -164,6 +168,7 @@ "builder": "0x1CeF0e6072810013487f7632350f9336AD6CADAD", "title": "Public Good supportUs", "description": "Decentralized public goods funding application. Campaign owners can set funds needed", + "link": "https://app.buidlguidl.com/build/nLsqcBkuoNb8nWVAuJg0", "status": "approved", "timestamp": 1706860595000 }, @@ -172,6 +177,7 @@ "builder": "0xC6e64eBeFaFaB3d646adadca5D93A7c44f62544f", "title": "ZeroTrust Accounts", "description": "ZeroTrust Accounts will provide a decentralized, secure, and self-sovereign approach to Ethereum smart contract accounts", + "link": "https://app.buidlguidl.com/build/BeyVyZuAvbFnUWjVbJ7U", "status": "approved", "timestamp": 1706892428000 }, @@ -180,6 +186,7 @@ "builder": "0x3b529ac4F8dc0C40Fec0f1192029755275A0c3Cd", "title": "Event Management Dapp", "description": "An app to create, manage, and sell tickets for events and buy them along with many functionalities", + "link": "https://app.buidlguidl.com/build/6JZBiYsLbfZ06SrQGyGz", "status": "approved", "timestamp": 1706940527000 }, @@ -188,6 +195,7 @@ "builder": "0xbE7fD3889C01F032184544DC0005F0d47daCcf09", "title": "Switch Dapp", "description": "Switch is a web app for sending defferred transactions. The user has a simple UI for setting a transaction which will be triggered and excecuted later based on speficied: 1) Time delay or 2) On-chain variable output. Implements Chainlink Functions and Automation.", + "link": "https://app.buidlguidl.com/build/ItKedxWVEaX9OcCrphMu", "status": "approved", "timestamp": 1707065464000 }, @@ -196,6 +204,7 @@ "builder": "0x8757F328371E571308C1271BD82B91882253FDd1", "title": "D-Auction Platform (Decentralized Auction)", "description": "Decentralized Auction Platform named D-Auction is a smart contract-based solution for conducting decentralized auctions of non-fungible tokens (NFTs). This platform allows users to create auctions for their NFTs, participate in bidding, and claim ownership of the NFTs upon winning the auctions", + "link": "https://app.buidlguidl.com/build/ZW4MfCMCU209bKP8Va8M", "status": "approved", "timestamp": 1707065465000 }, @@ -204,6 +213,7 @@ "builder": "0xdDE7B987A01717EEfCcA1Dc5280c164E2cCD133e", "title": "DEGEN-STATION", "description": "Degen Station is a raffle contract that allows for any individual to stake a certain amount of Eth with hopes of winning the grand prize which is 96% of the total stakes in the contract. Winners of each batch are also rewarded with an nft which. The is also a in built point system which is expected to tract users usage so that can be rewarded with the protocol tokens when it goes life.", + "link": "https://app.buidlguidl.com/build/i2ChwolQO0qR1Qbp0qCQ", "status": "completed", "timestamp": 1705910401000 }, @@ -212,6 +222,7 @@ "builder": "0x38D9cFf58D233AF0B9c1434EEDE012009D23c971", "title": "External Contract UI", "description": "A tool to improve the developer experience on scaffold-eth 2 by providing a tool to interact with external contract addresses", + "link": "https://app.buidlguidl.com/build/UeQnRI5ISO93XHYcVTRj", "status": "completed", "timestamp": 1705910402000 }, @@ -220,6 +231,7 @@ "builder": "0x63191383EDbd8531C442868d87555f1EA2f6ad4E", "title": "Querying Smart Contract Parameters From TheGraph", "description": "Basic understanding of the \ud83d\udea9 Challenge #3: The Graph with basic explanations that are going to be helpful for the newcomers.", + "link": "https://app.buidlguidl.com/build/nEjaQfkyzMgt3vcbAqLd", "status": "completed", "timestamp": 1705910403000 }, @@ -228,6 +240,7 @@ "builder": "0xFC7BC662fA06137F769366A46B19924371E880bd", "title": "\ud83e\udd57 Food Mart", "description": "An online restaurant food application that enables wallet integration, with images stored on IPFS. Additionally, the web app provides the option to view the calorie count per serving for each dish.", + "link": "https://app.buidlguidl.com/build/AuyB2d2IydtOEvePeyNN", "status": "completed", "timestamp": 1705910404000 }, @@ -236,6 +249,7 @@ "builder": "0xfbCE2693FBEd73E3D464d662235DC5ADC5454C01", "title": "Revolution Roulette", "description": "On chain russian roulette with unique items as powerups. Settle minor bets with some fun on optimism \ud83d\ude0e", + "link": "https://app.buidlguidl.com/build/H7AtTDtQOQ0h6wRT1A0G", "status": "completed", "timestamp": 1705910405000 }, @@ -244,6 +258,7 @@ "builder": "0xC863DFEE737C803c93aF4b6b27029294f6a56eB5", "title": "Scaffold-XOC", "description": "The open-source frontend for the first decentralized stablecoin pegged to the Mexican Peso ($MXN). This dapp is La Dao's playground to grow DeFi in Mexico", + "link": "https://app.buidlguidl.com/build/xQ7KIxSjvUqOVjPUl3R2", "status": "completed", "timestamp": 1705910406000 }, @@ -252,6 +267,7 @@ "builder": "0x5638Bf706056d01b2DaB817915244B3E21a56FE8", "title": "Voting App", "description": "A polling app that allows users to create polls, vote, and view the results on topics that matter to them. Built with solidity and nextjs, it features transparent voting mechanisms and real-time results visualization.", + "link": "https://app.buidlguidl.com/build/LQane0FtluzI8l3kwQGL", "status": "completed", "timestamp": 1705910407000 } diff --git a/packages/nextjs/app/api/grants/new/route.ts b/packages/nextjs/app/api/grants/new/route.ts index 1a80c8b..b520ac9 100644 --- a/packages/nextjs/app/api/grants/new/route.ts +++ b/packages/nextjs/app/api/grants/new/route.ts @@ -8,6 +8,7 @@ type ReqBody = { title?: string; description?: string; askAmount?: string; + link?: string; signature?: `0x${string}`; signer?: string; }; @@ -15,7 +16,7 @@ type ReqBody = { // TODO: We could also add extra validtion of nonce export async function POST(req: Request) { try { - const { title, description, askAmount, signature, signer } = (await req.json()) as ReqBody; + const { title, description, askAmount, link = "", signature, signer } = (await req.json()) as ReqBody; if (!title || !description || !askAmount || isNaN(Number(askAmount)) || !signature || !signer) { return NextResponse.json({ error: "Invalid form details submited" }, { status: 400 }); @@ -44,6 +45,7 @@ export async function POST(req: Request) { description: description, askAmount: Number(askAmount), builder: signer, + link: link, }); return NextResponse.json({ grant }, { status: 201 }); diff --git a/packages/nextjs/services/database/schema.ts b/packages/nextjs/services/database/schema.ts index 85e01ba..efb2fda 100644 --- a/packages/nextjs/services/database/schema.ts +++ b/packages/nextjs/services/database/schema.ts @@ -44,6 +44,7 @@ export type GrantData = { description: string; askAmount: number; builder: string; + link: string; timestamp: number; // TODO Check if firebase has it bydefault // updated timestamp; From df5db689ae8dd0465cd241046858778c4596f882 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20S=C3=A1nchez?= Date: Mon, 26 Feb 2024 11:22:26 +0100 Subject: [PATCH 09/11] Change amount to 0.25. Mark them as completed --- packages/local_db/seed.sample.json | 54 +++++++++++++++--------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/packages/local_db/seed.sample.json b/packages/local_db/seed.sample.json index 2986d24..9fb89f5 100644 --- a/packages/local_db/seed.sample.json +++ b/packages/local_db/seed.sample.json @@ -128,88 +128,88 @@ }, "grants": { "g9EmnJROMeqydxP1BGSx": { - "askAmount": 0.125, + "askAmount": 0.25, "builder": "0x55fF7E28e7cd43C104dC89Aa69285E0E6EBa064e", "title": "Buidl Guild English Auction", "description": "English auction platform where users can create an auction on NFTs.", "link": "https://app.buidlguidl.com/build/g9EmnJROMeqydxP1BGSx", - "status": "approved", + "status": "completed", "timestamp": 1706627065000 }, "fhiWGoHrfdGM2iuFZTGT": { - "askAmount": 0.125, + "askAmount": 0.25, "builder": "0x2F142f9F52af0845B7b8b1353E349Ca1Cb8EFE92", "title": "15 Puzzle", "description": "The famous sliding puzzle with 15 squares. Base starter writes your moves to the blockchain.", "link": "https://app.buidlguidl.com/build/fhiWGoHrfdGM2iuFZTGT", - "status": "approved", + "status": "completed", "timestamp": 1706656049000 }, "EkbuyFm9gYwn27nja7m3": { - "askAmount": 0.125, + "askAmount": 0.25, "builder": "0x2b30efBA367D669c9cd7723587346a79b67A42DB", "title": "0xPoker", "description": "A Commit and Reveal Poker Game! Live on the Optimism chain =) Took inspiration from the RockPaperScissors", "link": "https://app.buidlguidl.com/build/EkbuyFm9gYwn27nja7m3", - "status": "approved", + "status": "completed", "timestamp": 1706690199000 }, "MINVRoKfXZOgO6nsxUp0": { - "askAmount": 0.125, + "askAmount": 0.25, "builder": "0x5D70E3b540f58beCd10B74f6c0958b31e3190DA7", "title": "Duel - Bet dApp", "description": "This dApp allows users to make bets on the future price of Ethereum (ETH). Users can: - Create bets: Choose a future date and ETH price, and stake an amount of ETH. - Resolve bets: When the chosen date arrives, bets can be finalized according to the ETH price at the target date. - Win or lose: If the ETH price is above the chosen price when the bet is chosen as \"Higher\", the user wins the bet and receives the staked ETH plus winnings. I will be glad to hear your feedbacks. Have fun!\n", "link": "https://app.buidlguidl.com/build/MINVRoKfXZOgO6nsxUp0", - "status": "approved", + "status": "completed", "timestamp": 1706815801000 }, "nLsqcBkuoNb8nWVAuJg0": { - "askAmount": 0.125, + "askAmount": 0.25, "builder": "0x1CeF0e6072810013487f7632350f9336AD6CADAD", "title": "Public Good supportUs", "description": "Decentralized public goods funding application. Campaign owners can set funds needed", "link": "https://app.buidlguidl.com/build/nLsqcBkuoNb8nWVAuJg0", - "status": "approved", + "status": "completed", "timestamp": 1706860595000 }, "BeyVyZuAvbFnUWjVbJ7U": { - "askAmount": 0.125, + "askAmount": 0.25, "builder": "0xC6e64eBeFaFaB3d646adadca5D93A7c44f62544f", "title": "ZeroTrust Accounts", "description": "ZeroTrust Accounts will provide a decentralized, secure, and self-sovereign approach to Ethereum smart contract accounts", "link": "https://app.buidlguidl.com/build/BeyVyZuAvbFnUWjVbJ7U", - "status": "approved", + "status": "completed", "timestamp": 1706892428000 }, "6JZBiYsLbfZ06SrQGyGz": { - "askAmount": 0.125, + "askAmount": 0.25, "builder": "0x3b529ac4F8dc0C40Fec0f1192029755275A0c3Cd", "title": "Event Management Dapp", "description": "An app to create, manage, and sell tickets for events and buy them along with many functionalities", "link": "https://app.buidlguidl.com/build/6JZBiYsLbfZ06SrQGyGz", - "status": "approved", + "status": "completed", "timestamp": 1706940527000 }, "ItKedxWVEaX9OcCrphMu": { - "askAmount": 0.125, + "askAmount": 0.25, "builder": "0xbE7fD3889C01F032184544DC0005F0d47daCcf09", "title": "Switch Dapp", - "description": "Switch is a web app for sending defferred transactions. The user has a simple UI for setting a transaction which will be triggered and excecuted later based on speficied: 1) Time delay or 2) On-chain variable output. Implements Chainlink Functions and Automation.", + "description": "Switch is a web app for sending deferred transactions. The user has a simple UI for setting a transaction which will be triggered and excecuted later based on speficied: 1) Time delay or 2) On-chain variable output. Implements Chainlink Functions and Automation.", "link": "https://app.buidlguidl.com/build/ItKedxWVEaX9OcCrphMu", - "status": "approved", + "status": "completed", "timestamp": 1707065464000 }, "ZW4MfCMCU209bKP8Va8M": { - "askAmount": 0.125, + "askAmount": 0.25, "builder": "0x8757F328371E571308C1271BD82B91882253FDd1", - "title": "D-Auction Platform (Decentralized Auction)", + "title": "D-Auction Platform", "description": "Decentralized Auction Platform named D-Auction is a smart contract-based solution for conducting decentralized auctions of non-fungible tokens (NFTs). This platform allows users to create auctions for their NFTs, participate in bidding, and claim ownership of the NFTs upon winning the auctions", "link": "https://app.buidlguidl.com/build/ZW4MfCMCU209bKP8Va8M", - "status": "approved", + "status": "completed", "timestamp": 1707065465000 }, "i2ChwolQO0qR1Qbp0qCQ": { - "askAmount": 0.125, + "askAmount": 0.25, "builder": "0xdDE7B987A01717EEfCcA1Dc5280c164E2cCD133e", "title": "DEGEN-STATION", "description": "Degen Station is a raffle contract that allows for any individual to stake a certain amount of Eth with hopes of winning the grand prize which is 96% of the total stakes in the contract. Winners of each batch are also rewarded with an nft which. The is also a in built point system which is expected to tract users usage so that can be rewarded with the protocol tokens when it goes life.", @@ -218,7 +218,7 @@ "timestamp": 1705910401000 }, "UeQnRI5ISO93XHYcVTRj": { - "askAmount": 0.125, + "askAmount": 0.25, "builder": "0x38D9cFf58D233AF0B9c1434EEDE012009D23c971", "title": "External Contract UI", "description": "A tool to improve the developer experience on scaffold-eth 2 by providing a tool to interact with external contract addresses", @@ -227,7 +227,7 @@ "timestamp": 1705910402000 }, "nEjaQfkyzMgt3vcbAqLd": { - "askAmount": 0.125, + "askAmount": 0.25, "builder": "0x63191383EDbd8531C442868d87555f1EA2f6ad4E", "title": "Querying Smart Contract Parameters From TheGraph", "description": "Basic understanding of the \ud83d\udea9 Challenge #3: The Graph with basic explanations that are going to be helpful for the newcomers.", @@ -236,7 +236,7 @@ "timestamp": 1705910403000 }, "AuyB2d2IydtOEvePeyNN": { - "askAmount": 0.125, + "askAmount": 0.25, "builder": "0xFC7BC662fA06137F769366A46B19924371E880bd", "title": "\ud83e\udd57 Food Mart", "description": "An online restaurant food application that enables wallet integration, with images stored on IPFS. Additionally, the web app provides the option to view the calorie count per serving for each dish.", @@ -245,7 +245,7 @@ "timestamp": 1705910404000 }, "H7AtTDtQOQ0h6wRT1A0G": { - "askAmount": 0.125, + "askAmount": 0.25, "builder": "0xfbCE2693FBEd73E3D464d662235DC5ADC5454C01", "title": "Revolution Roulette", "description": "On chain russian roulette with unique items as powerups. Settle minor bets with some fun on optimism \ud83d\ude0e", @@ -254,7 +254,7 @@ "timestamp": 1705910405000 }, "xQ7KIxSjvUqOVjPUl3R2": { - "askAmount": 0.125, + "askAmount": 0.25, "builder": "0xC863DFEE737C803c93aF4b6b27029294f6a56eB5", "title": "Scaffold-XOC", "description": "The open-source frontend for the first decentralized stablecoin pegged to the Mexican Peso ($MXN). This dapp is La Dao's playground to grow DeFi in Mexico", @@ -263,7 +263,7 @@ "timestamp": 1705910406000 }, "LQane0FtluzI8l3kwQGL": { - "askAmount": 0.125, + "askAmount": 0.25, "builder": "0x5638Bf706056d01b2DaB817915244B3E21a56FE8", "title": "Voting App", "description": "A polling app that allows users to create polls, vote, and view the results on topics that matter to them. Built with solidity and nextjs, it features transparent voting mechanisms and real-time results visualization.", From f003c09ff80579915ff63e7084a060df98a5ba04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20S=C3=A1nchez?= Date: Mon, 26 Feb 2024 11:27:04 +0100 Subject: [PATCH 10/11] Remove link from new grant. Make link optional in the schema --- packages/nextjs/app/api/grants/new/route.ts | 4 +--- packages/nextjs/services/database/schema.ts | 5 +---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/nextjs/app/api/grants/new/route.ts b/packages/nextjs/app/api/grants/new/route.ts index b520ac9..1a80c8b 100644 --- a/packages/nextjs/app/api/grants/new/route.ts +++ b/packages/nextjs/app/api/grants/new/route.ts @@ -8,7 +8,6 @@ type ReqBody = { title?: string; description?: string; askAmount?: string; - link?: string; signature?: `0x${string}`; signer?: string; }; @@ -16,7 +15,7 @@ type ReqBody = { // TODO: We could also add extra validtion of nonce export async function POST(req: Request) { try { - const { title, description, askAmount, link = "", signature, signer } = (await req.json()) as ReqBody; + const { title, description, askAmount, signature, signer } = (await req.json()) as ReqBody; if (!title || !description || !askAmount || isNaN(Number(askAmount)) || !signature || !signer) { return NextResponse.json({ error: "Invalid form details submited" }, { status: 400 }); @@ -45,7 +44,6 @@ export async function POST(req: Request) { description: description, askAmount: Number(askAmount), builder: signer, - link: link, }); return NextResponse.json({ grant }, { status: 201 }); diff --git a/packages/nextjs/services/database/schema.ts b/packages/nextjs/services/database/schema.ts index efb2fda..a04700e 100644 --- a/packages/nextjs/services/database/schema.ts +++ b/packages/nextjs/services/database/schema.ts @@ -44,11 +44,8 @@ export type GrantData = { description: string; askAmount: number; builder: string; - link: string; + link?: string; timestamp: number; - // TODO Check if firebase has it bydefault - // updated timestamp; - // proposed and submited timestamp are imp status: "proposed" | "approved" | "submitted" | "completed" | "rejected"; }; From 90538e85e8d3c5911c51e33063a616ada0f66e19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20S=C3=A1nchez?= Date: Mon, 26 Feb 2024 11:34:08 +0100 Subject: [PATCH 11/11] Ability to ignore ids when importing seed --- packages/local_db/utils.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/local_db/utils.ts b/packages/local_db/utils.ts index 53d6d86..6393df8 100644 --- a/packages/local_db/utils.ts +++ b/packages/local_db/utils.ts @@ -16,8 +16,13 @@ async function importCollectionData( database: Firestore, collectionName: string, data: Record, + ignoreId: boolean = false, ) { for (const [id, docData] of Object.entries(data)) { + if (ignoreId) { + await database.collection(collectionName).add(docData); + continue; + } await database.collection(collectionName).doc(id).set(docData); } } @@ -64,7 +69,7 @@ export const importSeed = async (database: Firestore) => { importCollectionData(database, "config", seedToImport.config), importCollectionData(database, "cohorts", seedToImport.cohorts), importCollectionData(database, "notifications", seedToImport.notifications), - importCollectionData(database, "grants", seedToImport.grants), + importCollectionData(database, "grants", seedToImport.grants, true), ]); console.log("Seed completed successfully! 🌱");