- 🎫 Create a simple NFT to learn basics of 🏗️ Scaffold-Stark 2.
- You'll use 👷♀️
-
- Starknet Foundry
- {" "}
- to compile and deploy smart contracts. Then, you'll use a
- template React app full of important Ethereum components and
- hooks. Finally, you'll deploy an NFT to a public network to
- share with friends! 🚀
-
-
- 🌟 The final deliverable is an app that lets users purchase and
- transfer NFTs. Deploy your contracts to a testnet then build and
- upload your app to a public web server. Submit the url on{" "}
-
- Scaffoldstark.com
- {" "}
- !
-
-
+
+
+ Connected Address:
+
+
+
+
+
+
+ {/*
{
+ writeAsync();
+ }}
+ >
+ TEST TX
+
*/}
+
+
+
+
+
+
+
+
+
+
+ Protect Your Intellectual Property
+
+
+ Register, license, and market your intellectual property with ease. Secure your ideas and innovations today.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Our Services
+
+
+
+
+ Registration
+
+
+
Register your intellectual property quickly and securely.
+
+
+
+
+
+
+ Listing
+
+
+
List your intellectual property for potential buyers or licensees.
+
+
+
+
+
+
+ Licensing
+
+
+
License your intellectual property to interested parties.
+
+
+
+
+
+
+ Downloads
+
+
+
Access and download important documents and resources.
+
+
+
+
+
+
+ Support
+
+
+
Get help and support for all your IP-related queries.
+
+
+
+
+
+
+
+
+
+
+
+
+
>
);
};
diff --git a/packages/nextjs/app/register/[id]/page.tsx b/packages/nextjs/app/register/[id]/page.tsx
new file mode 100644
index 0000000..22c0d01
--- /dev/null
+++ b/packages/nextjs/app/register/[id]/page.tsx
@@ -0,0 +1,98 @@
+'use client'
+
+import { useParams } from 'next/navigation'
+import type { NextPage } from "next";
+import { useAccount } from "@starknet-react/core";
+import { CustomConnectButton } from "~~/components/scaffold-stark/CustomConnectButton";
+import { MyHoldings } from "~~/components/SimpleNFT/MyHoldings";
+import { useScaffoldReadContract } from "~~/hooks/scaffold-stark/useScaffoldReadContract";
+import { useScaffoldWriteContract } from "~~/hooks/scaffold-stark/useScaffoldWriteContract";
+import { notification } from "~~/utils/scaffold-stark";
+import { addToIPFS } from "~~/utils/simpleNFT/ipfs-fetch";
+import nftsMetadata from "~~/utils/simpleNFT/nftsMetadata";
+import { useState } from "react";
+
+const SubmissionPage: NextPage = () => {
+ const params = useParams()
+ const { id } = params
+
+ // Fetch submission data here if needed
+ // For example, from an API endpoint
+
+ const { address: connectedAddress, isConnected, isConnecting } = useAccount();
+ const [status, setStatus] = useState("Mint NFT");
+
+ const { writeAsync: mintItem } = useScaffoldWriteContract({
+ contractName: "YourCollectible",
+ functionName: "mint_item",
+ args: [connectedAddress, ""],
+ });
+
+ const { data: tokenIdCounter, refetch } = useScaffoldReadContract({
+ contractName: "YourCollectible",
+ functionName: "current",
+ watch: false,
+ });
+
+ const handleMintItem = async () => {
+ setStatus("Minting NFT");
+ // circle back to the zero item if we've reached the end of the array
+ if (tokenIdCounter === undefined) {
+ setStatus("Mint NFT");
+ return;
+ }
+
+ const tokenIdCounterNumber = Number(tokenIdCounter);
+ const currentTokenMetaData =
+ nftsMetadata[tokenIdCounterNumber % nftsMetadata.length];
+ const notificationId = notification.loading("Uploading to IPFS");
+ try {
+ const uploadedItem = await addToIPFS(currentTokenMetaData);
+
+ // First remove previous loading notification and then show success notification
+ notification.remove(notificationId);
+ notification.success("Metadata uploaded to IPFS");
+
+ await mintItem({
+ args: [connectedAddress, uploadedItem.path],
+ });
+ setStatus("Updating NFT List");
+ refetch();
+ } catch (error) {
+ notification.remove(notificationId);
+ console.error(error);
+ setStatus("Mint NFT");
+ }
+ };
+
+ return (
+ <>
+