-
Notifications
You must be signed in to change notification settings - Fork 52
feat: add UpMint Shelby - upload files & mint NFT on Shelby #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
10ur5en
wants to merge
7
commits into
shelby:main
Choose a base branch
from
10ur5en:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f800917
feat: add UpMint Shelby - upload files & mint NFTs on ShelbyNet
AptosArtMuseum 482d929
fix: Biome lint and format issues in upmint-shelby
AptosArtMuseum 1ab1351
fix: narrow mint error matching to avoid hiding real failures
AptosArtMuseum b76885f
fix: show feedback when collection already exists
AptosArtMuseum a6ac572
fix: clear stale collectionCreateTx when collection already exists
AptosArtMuseum 0bad28d
fix: wait for mint tx confirmation before removing item and refetchin…
AptosArtMuseum de27df5
fix: add missing tsconfig.json for upmint-shelby build
AptosArtMuseum File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Logs | ||
| logs | ||
| *.log | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
| pnpm-debug.log* | ||
| lerna-debug.log* | ||
|
|
||
| node_modules | ||
| dist | ||
| dist-ssr | ||
| *.local | ||
|
|
||
| # Editor directories and files | ||
| .vscode/* | ||
| !.vscode/extensions.json | ||
| .idea | ||
| .DS_Store | ||
| *.suo | ||
| *.ntvs* | ||
| *.njsproj | ||
| *.sln | ||
| *.sw? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| # UpMint Shelby | ||
|
|
||
| Upload files to the Shelby network and mint them as NFTs on Aptos (ShelbyNet). Built with Shelby Protocol for decentralized storage and Petra wallet for authentication. | ||
|
|
||
|   | ||
|
|
||
| ## Features | ||
|
|
||
| - **Upload to Shelby** – Select files and upload them to the Shelby decentralized network | ||
| - **Create Collections** – Define a collection name before minting NFTs | ||
| - **Mint NFTs** – Turn your uploaded images into on-chain NFTs (Aptos Token standard) | ||
| - **My NFTs** – View your minted NFTs grouped by collection, with Explorer links | ||
| - **Petra Wallet** – Connect via Petra and use ShelbyNet for all transactions | ||
|
|
||
| ## Tech Stack | ||
|
|
||
| - **React + TypeScript + Vite** | ||
| - **Shelby Protocol** – Blob storage and coordination | ||
| - **Aptos** – NFT minting (ShelbyNet) | ||
| - **Petra Wallet** – Wallet adapter for Aptos | ||
|
|
||
| ## Getting Started | ||
|
|
||
| ### Prerequisites | ||
|
|
||
| - [Node.js](https://nodejs.org/) (v18+) | ||
| - [Petra Wallet](https://petra.app/) browser extension | ||
| - Petra configured for **ShelbyNet** | ||
|
|
||
| ### Installation | ||
|
|
||
| ```bash | ||
| git clone https://github.com/10ur5en/UpMint-Shelby.git | ||
| cd UpMint-Shelby | ||
| npm install | ||
| ``` | ||
|
|
||
| ### Development | ||
|
|
||
| ```bash | ||
| npm run dev | ||
| ``` | ||
|
|
||
| Open [http://localhost:5173](http://localhost:5173) in your browser. | ||
|
|
||
| ### Build | ||
|
|
||
| ```bash | ||
| npm run build | ||
| npm run preview | ||
| ``` | ||
|
|
||
| ## Usage | ||
|
|
||
| 1. **Connect** – Click "Connect with Petra" and approve the connection to ShelbyNet | ||
| 2. **Upload** – Select image files to upload to the Shelby network | ||
| 3. **Create Collection** – Enter a collection name and click "Create Collection" | ||
| 4. **Mint** – Click "Mint NFT" on each uploaded image | ||
| 5. **View** – See your NFTs in "My NFTs", grouped by collection | ||
|
|
||
| ## Notes | ||
|
|
||
| - Only image files can be minted as NFTs | ||
| - Collection must be created before minting | ||
| - If Petra shows empty collection details, view NFTs on [Aptos Explorer](https://explorer.aptoslabs.com/?network=shelbynet) | ||
| - Proxy is used in dev for CORS; production should use proper backend or Shelby/Aptos endpoints | ||
|
|
||
| ## Links | ||
|
|
||
| - [Shelby](https://shelby.xyz/) | ||
| - [Shelby Docs](https://docs.shelby.xyz/) | ||
| - [Aptos Explorer (ShelbyNet)](https://explorer.aptoslabs.com/?network=shelbynet) | ||
|
|
||
| ## License | ||
|
|
||
| MIT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| <!doctype html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | ||
| <link href="https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap" rel="stylesheet" /> | ||
| <title>Shelby - Upload & Mint NFTs</title> | ||
| </head> | ||
| <body> | ||
| <div id="app"></div> | ||
| <script type="module"> | ||
| import { Buffer } from 'buffer' | ||
| window.Buffer = window.Buffer || Buffer | ||
| </script> | ||
| <script type="module" src="/src/main.tsx"></script> | ||
| </body> | ||
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| { | ||
| "name": "@shelby-protocol/upmint-shelby", | ||
| "private": true, | ||
| "version": "0.0.0", | ||
| "type": "module", | ||
| "scripts": { | ||
| "dev": "vite", | ||
| "build": "tsc && vite build", | ||
| "preview": "vite preview", | ||
| "lint": "biome check .", | ||
| "fmt": "biome check . --write" | ||
| }, | ||
| "devDependencies": { | ||
| "@biomejs/biome": "2.2.4", | ||
| "typescript": "~5.9.3", | ||
| "vite": "^7.3.1" | ||
| }, | ||
| "dependencies": { | ||
| "@aptos-labs/ts-sdk": "^5.2.1", | ||
| "@aptos-labs/wallet-adapter-react": "^7.2.8", | ||
| "@shelby-protocol/react": "^1.0.0", | ||
| "@shelby-protocol/sdk": "^0.1.0", | ||
| "@shelby-protocol/solana-kit": "^0.2.1", | ||
| "@solana/client": "^1.7.0", | ||
| "@solana/react-hooks": "^1.4.1", | ||
| "@tanstack/react-query": "^5.90.21", | ||
| "@types/react": "^19.2.13", | ||
| "@types/react-dom": "^19.2.3", | ||
| "buffer": "^6.0.3", | ||
| "react": "^19.2.4", | ||
| "react-dom": "^19.2.4" | ||
| } | ||
| } | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| import { Network } from "@aptos-labs/ts-sdk"; | ||
| import { AptosWalletAdapterProvider } from "@aptos-labs/wallet-adapter-react"; | ||
| import { ShelbyClientProvider } from "@shelby-protocol/react"; | ||
| import { ShelbyClient } from "@shelby-protocol/sdk/browser"; | ||
| import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; | ||
| import { Buffer } from "buffer"; | ||
| import React from "react"; | ||
| import ReactDOM from "react-dom/client"; | ||
| import "./style.css"; | ||
| import { App } from "./shelby-app"; | ||
|
|
||
| declare global { | ||
| interface Window { | ||
| Buffer?: typeof Buffer; | ||
| } | ||
| } | ||
| window.Buffer = window.Buffer ?? Buffer; | ||
|
|
||
| const queryClient = new QueryClient(); | ||
| const isDev = typeof window !== "undefined" && import.meta.env.DEV; | ||
| const origin = typeof window !== "undefined" ? window.location.origin : ""; | ||
| const shelbyRpcBase = isDev ? `${origin}/shelby-rpc` : undefined; | ||
| const aptosFullnode = isDev ? `${origin}/shelby-aptos` : undefined; | ||
| const shelbyClient = new ShelbyClient({ | ||
| network: Network.SHELBYNET, | ||
| ...(shelbyRpcBase && { rpc: { baseUrl: shelbyRpcBase } }), | ||
| ...(aptosFullnode && { aptos: { fullnode: aptosFullnode } }), | ||
| }); | ||
|
|
||
| ReactDOM.createRoot(document.getElementById("app") as HTMLElement).render( | ||
| <React.StrictMode> | ||
| <AptosWalletAdapterProvider> | ||
| <QueryClientProvider client={queryClient}> | ||
| <ShelbyClientProvider client={shelbyClient}> | ||
| <App /> | ||
| </ShelbyClientProvider> | ||
| </QueryClientProvider> | ||
| </AptosWalletAdapterProvider> | ||
| </React.StrictMode>, | ||
| ); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.