diff --git a/README.md b/README.md index 8ed62ae6..a2cf315b 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ ##### I'm brainstorming a few ideas at [IDEAS](./IDEAS.MD) and [PROGRAM IDEAS](./PROGRAM_IDEAS.MD) if you want to collaborate. - NOTE: This repo will prob only work on unix-based environments. The NFT Candy Factory project is designed to let users fork, customize, and deploy their own candy machine mint app to a custom domain, ultra fast. @@ -11,13 +10,13 @@ A candy machine is an on-chain Solana program for managing fair mint. Fair mints * Start and finish at the same time for everyone. * Won't accept your funds if they're out of NFTs to sell. -It builds on top of the the work started at https://github.com/exiled-apes/candy-machine-mint, abstracting away a few things (like having one-command shortcuts in the package.json that instantly setups dev env), improving DX and adding new tools for managing the source files. - -Techwise, it builds on top of NextJS and TailwindCSS for the frontend (as well as Solana Labs toolchain and Serum Anchor libs for interacting with the Solana network); and Metaplex and Solana clis for deployment on the Solana network. It also adds Strapi as the `nft-manager` which is in reality used just as a UI for managing the JSON and PNG files. More details below. +It builds on top of the the work started at https://github.com/exiled-apes/candy-machine-mint, abstracting away a few things (like having one-command shortcuts in the package.json that instantly setups dev env), improving DX and adding new tools for managing the source files. It also features some other features: +- Listing of NFTs of the collection +- A tool for getting the mint hashes +- A tool for getting the list of holders +- Multiple mint in the same prompt -## Step-by-step tutorial - -Check out this awesome guide by @nheingit which uses this repo and teaches how to ship your own Candy Machine: https://www.quicknode.com/guides/web3-sdks/how-to-mint-an-nft-on-solana-using-candy-machine +Techwise, it builds on top of NextJS and TailwindCSS for the frontend (as well as Solana Labs toolchain and Serum Anchor libs for interacting with the Solana network); and Metaplex and Solana clis for deployment on the Solana network. ## Getting Set Up @@ -30,51 +29,21 @@ Check out this awesome guide by @nheingit which uses this repo and teaches how t * Follow the instructions [here](https://hackmd.io/@levicook/HJcDneEWF) to install the Metaplex Command Line Utility. * Installing the Command Line Package is currently an advanced task that will be simplified eventually. -## NFT Manager - -*! NOTE*: Be sure to an instance of postgresql running on port 6432. For ease of use, one is provided using docker + docker-compose by running `yarn start-nft-manager-db` - -This repo features an NFT manager so you do not need to create all nfts by editing a JSON file that is powered by Strapi. Just run `yarn nft-manager` and add: -- A collection -- An NFT that links to that collection - -*! NOTE*: Be sure to create an user, after you login with the admin account, that has the role "authenticated", username "admin" and pass "Admin123", as well as add all collections and upload related permissions to the "authenticated" role. To do that, after the user is created, open http://localhost:1337/admin/settings/users-permissions/roles/ -select all NFTS permissions as well as Upload permissions for the `Authenticated` role;; otherwise, the `yarn update-creator-all-rows` and `yarn generate-nfts-sources` commands will not work. - -Then you are good to go: run `yarn generate-nfts-sources` for generating the JSON and PNG files in the `nfts-sources` folder in the root of the project. Following that, you can go for deployment on production (section below) OR test it in dev using `yarn setup-dev`. - -### NFT Manager form default values - -You are able to change the NFT manager form default values by editing the file `./nft-manager/api/nf-ts/models/nf-ts.settings.json`. - -## Available Scripts +## Devnnet In the project root directory, you can run: -* `yarn nft-manager` -- Setup development server of the NFT-Manager, which is a UI for managing all NFTs. - -*! -* The following commands of the nft-manager needs the nft-manager running, so be sure to run `yarn nft-manager` before running them: - -* `yarn update-creator-all-rows` -- Set a new creator address to all NFT rows -* `yarn generate-nfts-sources` -- Generate nft source files based on the nft-manager data; allow to generate randomized or DB index order - ---- - * `yarn setup-dev` -- Setup development environment: needs solana and metaplex cli installed (it will create a new Solana wallet, drop some sols there, and upload the resources to the devnet Metaplex program, making it ready to test using yarn dev...). This command automatically generates the `.env.local` file for you with the start date, candy machine addresses, and treasury addresses. -Note: you still need to run yarn generate-nfts-sources for it to work. +Note: You will still need to generate NFT sources and place in the 'nft-sources' folder. There are a few examples in this repository. They should always start with 0.json and 0.png. -*ALERT*: Running this command will replace your Solana devwallet generated before at `~/.config/solana/candyfactory-devnet.json` as well as all previous environment stuff you had, like your `.env.local`. It is a nuke solution for resetting development environment. If you already have the setup done use the scripts declared in this command or tweak them (they are available in the `devtools` folder in the root of the project) -* `yarn dev` -- Run NextJS devserver; it features a modal for connecting with Phantom, Solflare and Sollet (more can be added using the Solana Labs wallet library); minting of the NFT; success/error messages; and UI countdown based on the candy machine start date. +*ALERT*: Running this command will replace your Solana devwallet generated before at `~/.config/solana/candyfactory-devnet.json` as well as all previous environment stuff you had, like your `.env.local`. It is a nuke solution for resetting development environment. The source scripts are available in the `devtools` folder in the root of the project. So, if something goes wrong, go into this folder and try running each command a time. ---- +After your Devnnet candy machine has been created feel free to run: +* `yarn dev` -- Run NextJS devserver; it features a modal for connecting with wallets; minting of the NFT; success/error messages; and UI countdown based on the candy machine start date. -* `yarn deploy-mainnet` -- Setup production environment: needs Solana and Metaplex cli installed. Refer to the #Deployment section below. -* `yarn build` -- Bundle for production environment -* `yarn start` -- Start production build project - -## Deployment +## Mainnet - Don't forget to use the wallet you want to earn the mint value for both metaplex uploading (`yarn deploy-mainnet`) and in the NFT's creators.address[0] (NFT-Manager properties editor of a specific NFT) for earning the royaties. - You still need to run `yarn generate-nfts-sources` if you have not created the source files yet @@ -86,9 +55,16 @@ After the deployment is over, it will generate all envs that your frontend dApp ## Donate -The best way to support me is by minting one city at the project that started it all: https://worldcities.aiphotos.art/ +The best way to support me is by following me on [https://twitter.com/kevinfaveri_](https://twitter.com/kevinfaveri_) and [https://twitter.com/aiphotos_](https://twitter.com/aiphotos_) (which is the art project that inspired this repository) :) + +## Others Tools +If you want multisig wallets, you may study https://github.com/GokiProtocol/goki or the https://github.com/project-serum/multisig. -Also, if possible, follow me on [https://twitter.com/kevinfaveri_](https://twitter.com/kevinfaveri_) and [https://twitter.com/aiphotos_](https://twitter.com/aiphotos_) (which is the art project that inspired this repository) :) +Also, a ton of other useful tools/repos: +https://github.com/HashLips/hashlips_art_engine +https://github.com/exiled-apes/candy-machine-mint +https://github.com/InnerMindDAO/MintUI (GUI for the Candy Machine) +https://github.com/theskeletoncrew/treat-toolbox (WebApp for creating collections + Candy Machine without the candy machine cli overhead) ## Hire diff --git a/devtools/dev/setup-metaplex-dev.sh b/devtools/dev/setup-metaplex-dev.sh index 5d20d1b6..9eee18f4 100644 --- a/devtools/dev/setup-metaplex-dev.sh +++ b/devtools/dev/setup-metaplex-dev.sh @@ -1,5 +1,5 @@ # echo "[INFO] Cleaning older cache folder for metaplex" -# rm -rf ./.cache/devnet-temp +rm -rf ./.cache/devnet-temp echo "[INFO] Uploading all resources" ts-node ~/metaplex-foundation/metaplex/js/packages/cli/src/candy-machine-cli.ts upload ./nfts-sources --env devnet --keypair ~/.config/solana/candyfactory-devnet.json echo "[INFO] Creating candy machine"