Skip to content

Commit

Permalink
Small changes to UI and README
Browse files Browse the repository at this point in the history
  • Loading branch information
luloxi committed Sep 17, 2024
1 parent e7dc06e commit 9a17da9
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 46 deletions.
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,58 +106,56 @@ Visit your app on: `http://localhost:3000`. You can interact with your smart con
- ✅ **Add music to NFTs metadata** and **integrate with frontend** (Reference: [OpenSea metadata-standards](https://docs.opensea.io/docs/metadata-standards))
- ✅ **Create a contract for SimpleMint and SimpleMintNFT**
- ✅ **Page for minting** that takes inputs for the metadata of the NFT (Reference: [scaffold-class](https://github.com/luloxi/scaffold-class))
- ✅ **Display NFT being built as a preview** before minting (display the NFT and the metadata)
- **Add an option to start a collection paying gas** on the Simple Mint page, with a toggle to switch between gasless and paying gas
- **Implement a database to store the signatures** that allows first minters to start a collection (Reference: [grants.buidlguidl.com](https://github.com/BuidlGuidl/grants.buidlguidl.com))
- **Add a page for first minters** reading from the database with NFTs available to complete the Simple Mint process
### Marketplace
- ✅ **Page for interacting with the marketplace** buy and sell functions (Reference: [Simple Marketplace w/ Royalties)](https://app.buidlguidl.com/build/UxFNxy5XIMzz9mHKUxy5))
- ✅ **Payment in native gas token** and USDC token
- **Display auction info and interactions**
- **Add individual NFT pages** with more info about the NFT, if it's on sale, and the artist and bigger images
- **Add a page for the collector** with their NFTs and info about them
- **Add a page for the artist** with their NFTs and info about them
- **Add a page for starting a collection** with the same fields as the Simple Mint page, but with a mint button that pays the gas costs and deploys the contract
## Phase 2
- **Add a way for artists (and collectors) to register their info (ideally with a signature)**
### Simple Mint
- **Display NFT being built as a preview** before minting (display the NFT and the metadata)
- **Allow setting max tokenId and price**
- **Determine which Royalty standard to implement**, and start implementing it (References: [ERC-2981](https://eips.ethereum.org/EIPS/eip-2981) | [ERC-4910](https://eips.ethereum.org/EIPS/eip-4910) | [ERC-721C compared to ERC-2981 and ERC-4910](https://blog.xp.network/the-battle-for-nft-royalties-meet-the-erc-2981-erc-4920-and-erc-721c-b71d6ba28acf)
- **First minter gets a share of the royalties** of all the NFTs minted in that collection
- **Periodically airdrop dividends** in USDC for creators (and first minters if appliable) (may not even be necessary if royalties pay redirect funds to the creators directly)
- **System to validate artists and collectors (and maybe enable them to Simple Mint and be able to disable them to prevent spam)**
### Marketplace
- **Display Simple Minted NFTs in the marketplace**
- **Display auction info and interactions**
- **Mixed pay** that allows paying in USDC or native gas token for the same amount of USD, and/or maybe crosschain payments with USDC CCTP or Chainlink CCIP (integrate Chainlink Price Feeds with AggregatorV3Interface) (Reference: [Easy2Pay](https://github.com/luloxi/Easy2Pay))
- **Batch buying NFTs**, to reduce gas fees and the amount of transactions a user needs to make
### Social
- **Add individual NFT pages** with more info about the NFT, if it's on sale, and the artist and bigger images
- **Add a page for the collector** with their NFTs and info about them
- **Add a page for the artist** with their NFTs and info about them
- **Add a way for artists (and collectors) to register their info (ideally with a signature)**
- **System to validate artists and collectors (and maybe enable them to Simple Mint and be able to disable them to prevent spam)**
## Phase 3
### Social
- **Artist NFT (limited edition)**: Holders of artists NFTs get access to backstage, events, a free drink on live events, etc
- **Token gated content**: Holders of song NFTs get access to special content for holders
- Introduce **web2 social features** like creating profiles, following artists, liking NFTs, and commenting on NFTs
- **Feature for creating collections** of NFTs and displaying them in a gallery
### Music player
- **Music player as a PWA** that allows controlling the music from the notifications center on mobile devices (Reference: [React Player](https://www.npmjs.com/package/react-player))
- **Tip for artists**: Enable or require tipping with tokens, and if you don’t have $ to pay, you can watch an ad as payment (i.e: for every 6 songs, 1 ad that gets distributed among the 6 artists reproduced for free).
### Social
- Introduce **web2 social features** like creating profiles, following artists, liking NFTs, and commenting on NFTs
- **Feature for creating collections** of NFTs and displaying them in a gallery
## Phase 4
- **Guided Onboarding**: Make an interactive way to step-by-step user onboarding flow, and/or video material explaining the use of the platform, especially for artists or collectors who may be unfamiliar with blockchain or Web3 concepts.
- **Educational Content**: Tutorials or content to explain Web3 concepts, NFT minting, and royalties can improve user adoption.
### Marketplace
- Consider transitioning ownership of the marketplace to a DAO
Expand All @@ -170,12 +168,14 @@ Visit your app on: `http://localhost:3000`. You can interact with your smart con
- **Notification system** for increasing engagement (customizable and ideally with email or mobile notifications)
- **Direct Messaging system** for artists and collectors
- Ability to **make your own group/community**
- **Guided Onboarding**: Make an interactive way to step-by-step user onboarding flow, and/or video material explaining the use of the platform, especially for artists or collectors who may be unfamiliar with blockchain or Web3 concepts.
- **Educational Content**: Tutorials or content to explain Web3 concepts, NFT minting, and royalties can improve user adoption.
### Performance improvements
- **Functionality to move NFTs between blockchains** with Chainlink CCIP token transfer (Reference: [Chainlink CCIP Cross-chain Tokens](https://docs.chain.link/ccip/tutorials/cross-chain-tokens))
- **Profile creation with web2.5 login** (Twitter, Instagram, Google, etc). Linked wallet could be with account abstraction or creating a wallet from scratch, TBD
- **Integrate GraphQL to index NFTs** and save RPC calls
- **Integrate GraphQL to index NFTs** and save RPC calls (Reference: [Bootstrap a Full Stack Modern dapp using the Scaffold-ETH CLI and Subgraph Extension](https://siddhantk08.hashnode.dev/bootstrap-a-full-stack-modern-dapp-using-the-scaffold-eth-cli-and-subgraph-extension))
- **Upload the NFT Metadata to Filecoin** instead of IPFS, and use it with a EIP-712 signature for Simple Mint. (Reference: [Viem recoverTypedDataAddress](https://viem.sh/docs/utilities/recoverTypedDataAddress))
# Completed product description
Expand Down
56 changes: 56 additions & 0 deletions packages/local_db/firebase-debug.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
[debug] [2024-09-17T20:27:46.413Z] ----------------------------------------------------------------------
[debug] [2024-09-17T20:27:46.415Z] Command: /usr/local/bin/firebase /home/lulox/.cache/firebase/tools/lib/node_modules/firebase-tools/lib/bin/firebase emulators:start
[debug] [2024-09-17T20:27:46.415Z] CLI Version: 13.17.0
[debug] [2024-09-17T20:27:46.415Z] Platform: linux
[debug] [2024-09-17T20:27:46.415Z] Node Version: v18.5.0
[debug] [2024-09-17T20:27:46.416Z] Time: Tue Sep 17 2024 17:27:46 GMT-0300 (Argentina Standard Time)
[debug] [2024-09-17T20:27:46.416Z] ----------------------------------------------------------------------
[debug]
[debug] [2024-09-17T20:27:46.500Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2024-09-17T20:27:46.501Z] > authorizing via signed-in user (lulox.eth@gmail.com)
[debug] [2024-09-17T20:27:46.543Z] openjdk version "11.0.24" 2024-07-16

[debug] [2024-09-17T20:27:46.544Z] OpenJDK Runtime Environment (build 11.0.24+8-post-Ubuntu-1ubuntu322.04)
OpenJDK 64-Bit Server VM (build 11.0.24+8-post-Ubuntu-1ubuntu322.04, mixed mode, sharing)

[debug] [2024-09-17T20:27:46.548Z] Parsed Java major version: 11
[info] i emulators: Starting emulators: firestore {"metadata":{"emulator":{"name":"hub"},"message":"Starting emulators: firestore"}}
[debug] [2024-09-17T20:27:46.553Z] assigned listening specs for emulators {"user":{"logging":[{"address":"127.0.0.1","family":"IPv4","port":4500}],"firestore":[{"address":"127.0.0.1","family":"IPv4","port":8080}],"firestore.websocket":[{"address":"127.0.0.1","family":"IPv4","port":9150}]},"metadata":{"message":"assigned listening specs for emulators"}}
[debug] [2024-09-17T20:27:46.553Z] [firestore] Could not enable single_project_mode: missing projectId.
[debug] [2024-09-17T20:27:46.555Z] Ignoring unsupported arg: auto_download {"metadata":{"emulator":{"name":"firestore"},"message":"Ignoring unsupported arg: auto_download"}}
[debug] [2024-09-17T20:27:46.556Z] Starting Firestore Emulator with command {"binary":"java","args":["-Djava.net.preferIPv4Stack=true","-Dgoogle.cloud_firestore.debug_log_level=FINE","-Duser.language=en","-jar","/home/lulox/.cache/firebase/emulators/cloud-firestore-emulator-v1.19.8.jar","--host","127.0.0.1","--port",8080,"--websocket_port",9150,"--project_id","","--rules","/home/lulox/4-WORK/Technai-foundry/packages/local_db/firestore.rules"],"optionalArgs":["port","webchannel_port","host","rules","websocket_port","functions_emulator","seed_from_export","project_id","single_project_mode"],"joinArgs":false,"shell":false} {"metadata":{"emulator":{"name":"firestore"},"message":"Starting Firestore Emulator with command {\"binary\":\"java\",\"args\":[\"-Djava.net.preferIPv4Stack=true\",\"-Dgoogle.cloud_firestore.debug_log_level=FINE\",\"-Duser.language=en\",\"-jar\",\"/home/lulox/.cache/firebase/emulators/cloud-firestore-emulator-v1.19.8.jar\",\"--host\",\"127.0.0.1\",\"--port\",8080,\"--websocket_port\",9150,\"--project_id\",\"\",\"--rules\",\"/home/lulox/4-WORK/Technai-foundry/packages/local_db/firestore.rules\"],\"optionalArgs\":[\"port\",\"webchannel_port\",\"host\",\"rules\",\"websocket_port\",\"functions_emulator\",\"seed_from_export\",\"project_id\",\"single_project_mode\"],\"joinArgs\":false,\"shell\":false}"}}
[info] i firestore: Firestore Emulator logging to firestore-debug.log {"metadata":{"emulator":{"name":"firestore"},"message":"Firestore Emulator logging to \u001b[1mfirestore-debug.log\u001b[22m"}}
[debug] [2024-09-17T20:27:47.630Z] Sep 17, 2024 5:27:47 PM com.google.cloud.datastore.emulator.firestore.websocket.WebSocketServer start
INFO: Started WebSocket server on ws://127.0.0.1:9150
{"metadata":{"emulator":{"name":"firestore"},"message":"Sep 17, 2024 5:27:47 PM com.google.cloud.datastore.emulator.firestore.websocket.WebSocketServer start\nINFO: Started WebSocket server on ws://127.0.0.1:9150\n"}}
[debug] [2024-09-17T20:27:47.652Z] API endpoint: http://127.0.0.1:8080
{"metadata":{"emulator":{"name":"firestore"},"message":"API endpoint: http://127.0.0.1:8080\n"}}
[debug] [2024-09-17T20:27:47.652Z] If you are using a library that supports the FIRESTORE_EMULATOR_HOST environment variable, run:

export FIRESTORE_EMULATOR_HOST=127.0.0.1:8080

If you are running a Firestore in Datastore Mode project, run:

export DATASTORE_EMULATOR_HOST=127.0.0.1:8080

Note: Support for Datastore Mode is in preview. If you encounter any bugs please file at https://github.com/firebase/firebase-tools/issues.
Dev App Server is now running.

{"metadata":{"emulator":{"name":"firestore"},"message":"If you are using a library that supports the FIRESTORE_EMULATOR_HOST environment variable, run:\n\n export FIRESTORE_EMULATOR_HOST=127.0.0.1:8080\n\nIf you are running a Firestore in Datastore Mode project, run:\n\n export DATASTORE_EMULATOR_HOST=127.0.0.1:8080\n\nNote: Support for Datastore Mode is in preview. If you encounter any bugs please file at https://github.com/firebase/firebase-tools/issues.\nDev App Server is now running.\n\n"}}
[info] ✔ firestore: Firestore Emulator UI websocket is running on 9150. {"metadata":{"emulator":{"name":"firestore"},"message":"Firestore Emulator UI websocket is running on 9150."}}
[warn] ⚠ emulators: The Emulator UI is not starting, either because none of the running emulators have a UI component or the Emulator UI cannot determine the Project ID. Pass the --project flag to specify a project. {"metadata":{"emulator":{"name":"hub"},"message":"The Emulator UI is not starting, either because none of the running emulators have a UI component or the Emulator UI cannot determine the Project ID. Pass the --project flag to specify a project."}}
[info]
┌─────────────────────────────────────────────────────────────┐
│ ✔ All emulators ready! It is now safe to connect your app. │
└─────────────────────────────────────────────────────────────┘

┌───────────┬────────────────┐
│ Emulator │ Host:Port │
├───────────┼────────────────┤
│ Firestore │ 127.0.0.1:8080 │
└───────────┴────────────────┘
Emulator Hub not running.
Other reserved ports: 4500, 9150

Issues? Report them at https://github.com/firebase/firebase-tools/issues and attach the *-debug.log files.

5 changes: 1 addition & 4 deletions packages/local_db/firestore-debug.log
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Sep 17, 2024 3:43:38 PM com.google.cloud.datastore.emulator.firestore.websocket.WebSocketServer start
Sep 17, 2024 5:27:47 PM com.google.cloud.datastore.emulator.firestore.websocket.WebSocketServer start
INFO: Started WebSocket server on ws://127.0.0.1:9150
API endpoint: http://127.0.0.1:8080
If you are using a library that supports the FIRESTORE_EMULATOR_HOST environment variable, run:
Expand All @@ -12,6 +12,3 @@ If you are running a Firestore in Datastore Mode project, run:
Note: Support for Datastore Mode is in preview. If you encounter any bugs please file at https://github.com/firebase/firebase-tools/issues.
Dev App Server is now running.

*** shutting down gRPC server since JVM is shutting down
240917 15:43:41.420:I 1 [main] [com.google.cloud.datastore.emulator.firestore.websocket.WebSocketServer.stop:80] Stopping WebSocket server...
*** server shut down
30 changes: 15 additions & 15 deletions packages/nextjs/app/simpleMint/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,20 @@ const SimpleMint: NextPage = () => {

{attributes.map((attr, index) => (
<div key={index} className="flex items-center space-x-2 mb-2">
{/* Button to remove the attribute */}
<button onClick={() => removeAttribute(index)} className="ml-2 bg-red-500 text-white p-2 rounded">
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
strokeWidth="2"
stroke="currentColor"
className="w-5 h-5"
>
<path strokeLinecap="round" strokeLinejoin="round" d="M6 18L18 6M6 6l12 12" />
</svg>
</button>

<div>
<span className="font-bold p-3">Trait Type:</span>
<InputBase
Expand All @@ -224,20 +238,6 @@ const SimpleMint: NextPage = () => {
onChange={value => handleAttributeChange(index, "value", value)}
/>
</div>

{/* Button to remove the attribute */}
<button onClick={() => removeAttribute(index)} className="ml-2 bg-red-500 text-white p-2 rounded">
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
strokeWidth="2"
stroke="currentColor"
className="w-5 h-5"
>
<path strokeLinecap="round" strokeLinejoin="round" d="M6 18L18 6M6 6l12 12" />
</svg>
</button>
</div>
))}
</div>
Expand Down Expand Up @@ -341,7 +341,7 @@ const SimpleMint: NextPage = () => {
disabled={loading}
onClick={handleSignAndUpload}
>
Propose NFT
Propose NFT collection
</button>
</div>

Expand Down
18 changes: 9 additions & 9 deletions packages/nextjs/utils/eip712.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// export const EIP_712_DOMAIN = {
// name: "Simple Mint",
// version: "1.0.0",
// } as const;

export const EIP_712_DOMAIN = {
name: "SimpleMint",
name: "Simple Mint",
version: "1.0.0",
chainId: 31337, // Use the correct chain ID
verifyingContract: "0x5FbDB2315678afecb367f032d93F642f64180aa3",
};
} as const;

// export const EIP_712_DOMAIN = {
// name: "SimpleMint",
// version: "1.0.0",
// chainId: 31337, // Use the correct chain ID
// verifyingContract: "0x5FbDB2315678afecb367f032d93F642f64180aa3",
// };

export const EIP_712_TYPES__START_COLLECTION = {
StartCollection: [
Expand Down

0 comments on commit 9a17da9

Please sign in to comment.