{"id":20974236,"url":"https://github.com/thirdweb-example/updatable-nft-metadata","last_synced_at":"2025-09-09T14:46:26.437Z","repository":{"id":64487028,"uuid":"563173556","full_name":"thirdweb-example/updatable-nft-metadata","owner":"thirdweb-example","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-12T00:28:35.000Z","size":6,"stargazers_count":7,"open_issues_count":0,"forks_count":13,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-27T04:52:31.810Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/thirdweb-example.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}},"created_at":"2022-11-08T03:48:09.000Z","updated_at":"2024-12-01T12:13:26.000Z","dependencies_parsed_at":"2024-11-19T04:42:14.602Z","dependency_job_id":null,"html_url":"https://github.com/thirdweb-example/updatable-nft-metadata","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thirdweb-example/updatable-nft-metadata","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thirdweb-example%2Fupdatable-nft-metadata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thirdweb-example%2Fupdatable-nft-metadata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thirdweb-example%2Fupdatable-nft-metadata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thirdweb-example%2Fupdatable-nft-metadata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thirdweb-example","download_url":"https://codeload.github.com/thirdweb-example/updatable-nft-metadata/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thirdweb-example%2Fupdatable-nft-metadata/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274314613,"owners_count":25262694,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-19T04:27:21.134Z","updated_at":"2025-09-09T14:46:26.389Z","avatar_url":"https://github.com/thirdweb-example.png","language":"JavaScript","readme":"\u003e [!Important]  \n\u003e This repository is referencing the `mumbai` chain.\n\u003e \n\u003e `Mumbai` [is deprecated since 08/04/2024](https://blog.thirdweb.com/deprecation-of-mumbai-testnet/), meaning the code in this repository will no longer work out of the box.\n\u003e\n\u003e You can still use this repository, however you will have to switch any references to `mumbai` to another chain.\n\n# Updatable NFT Metadata\n\nCreate a NFT drop with updatable metadata.\n\n## Setup\n\nTo run the project, first clone this repository, and then run one of the following commands to install the dependencies:\n\n```bash\nnpm install\n# or\nyarn install\n```\n\nNext, you need to create a .env.local file and add the PRIVATE_KEY variable to it with the private key of the wallet you have used to create the NFT drop:\n\n```\nPRIVATE_KEY=...\n```\n\nNow, update the `db.json` file with the NFT drop's data. Once done, push your code to a repository.\n\nFinally, go to [`scripts/upload-nfts.mjs`](scripts/upload-nfts.mjs) and update your drop address and metadata files. The metadata file urls should be in this format: `https://my-json-server.typicode.com/\u003cyour_username\u003e/\u003cyour_repo_name\u003e/nfts/\u003cid\u003e.`\n\n## How It Works\n\nUsing the `.fromPrivateKey` method from `ThirdwebSDK` we initialise the sdk:\n\n```mjs\nimport { ThirdwebSDK } from \"@thirdweb-dev/sdk\";\nimport { config } from \"dotenv\";\n\nconfig();\n\nconst sdk = ThirdwebSDK.fromPrivateKey(process.env.PRIVATE_KEY, \"mumbai\");\n```\n\nWe then use the `.getContract` method to get the NFT drop:\n\n```mjs\nconst drop = await sdk.getContract(\"DROP_ADDRESS\", \"nft-drop\");\n```\n\nFinally, we batch upload the NFTs using the centralized metadata files:\n\n```js\ntry {\n  await drop.createBatch([\n    \"https://my-json-server.typicode.com/thirdweb-dev/updatable-nft-metadata/nfts/0\",\n    \"https://my-json-server.typicode.com/thirdweb-dev/updatable-nft-metadata/nfts/1\",\n  ]);\n  console.log(\"uploaded all nfts\");\n} catch (error) {\n  console.log(error);\n}\n```\n\n## Join our Discord!\n\nFor any questions, suggestions, join our discord at [https://discord.gg/thirdweb](https://discord.gg/thirdweb).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthirdweb-example%2Fupdatable-nft-metadata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthirdweb-example%2Fupdatable-nft-metadata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthirdweb-example%2Fupdatable-nft-metadata/lists"}