From ef634dc68a13c41cda50a4012fface3598a14543 Mon Sep 17 00:00:00 2001 From: Gavin Ching Date: Tue, 8 Jun 2021 18:59:01 -0700 Subject: [PATCH 1/3] Add in create store guide --- docs/create-store.md | 68 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 docs/create-store.md diff --git a/docs/create-store.md b/docs/create-store.md new file mode 100644 index 0000000..750bb08 --- /dev/null +++ b/docs/create-store.md @@ -0,0 +1,68 @@ +# Create Store + +To create a storefront powered by Metaplex, you need to create a store on the Metaplex platform. This guide will outline +steps you need to take to create your store. After creating your store, this guide will show you how to manage your +store information, such as who to whitelist as creators. + +## Prerequisuites +* You should have an understanding of `React` concepts such as hooks. Please refer to the React documentation + [here](https://reactjs.org/docs/getting-started.html). +* To create your store, you will need to have a wallet that contains token to perform your transactions. +* Knowing what the different `packages` are and what are their purposes would help but isn't required + +## Getting Started + +### Setting Up the Store ID + +To create a store, you must first derive the store ID given your public address. The Metaplex devs have already created +an environment variable for you to utilize - `REACT_APP_STORE_OWNER_ADDRESS_ADDRESS` - which you should set to be your +wallet public address. To do this, you can create a `.env` file in the `packages/web folder`, and set +`REACT_APP_STORE_OWNER_ADDRESS_ADDRESS` to be your wallet public address in there. + +``` +REACT_APP_STORE_OWNER_ADDRESS_ADDRESS=YOUR_PUBLIC_WALLET_ADDRESS +``` + +### Create Your Store + +After creating your store ID, you may now create your store. The Metaplex platform has many helper methods to help you +to create your store. To create your store, you can use the `saveAdmin` method (`packages/web/src/actions/saveAdmin`) +The easiest way to do this would be to either create a script or render a button locally to click to call this method. +Please look at the function parameters of `saveAdmin` to see what parameters you would like to pass in: + +```js +saveAdmin(connection, wallet, false, []) +``` + +If you opted to create a button or something to click to call this method, here are some small snippets: + +```js +// These are hooks you should insert at the top of the component your rendering your button in +const { wallet } = useWallet(); +const connection = useConnection(); +``` + +```js +// The button to render somewhere for you to click + +``` + +You will be required to confirm your transactions if you decided to put a button or something to click. After clicking +the button, make sure you don't browse anywhere else or close the website. + +### Adding Your Information + +After creating your store, you must also insert your wallet public key and information in `userNames.json` at +`packages/web/src/config/userNames.json`. Make sure you follow the same format as the other objects in this file. + +### Accessing the Admin Panel + +After creating your store, you can now access `YOUR_URL/#/admin`. This is where you can edit your store and add +whitelisted creators. Add yourself if you need to or make it a public store, so anyone can create NFTs in your store. +Remember to click save after making your changes. From 28e8acda6f4a407d96f39bd6047697b2e572c21a Mon Sep 17 00:00:00 2001 From: Gavin Ching Date: Tue, 8 Jun 2021 19:01:15 -0700 Subject: [PATCH 2/3] Fix spelling for Prerequisites --- docs/create-store.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/create-store.md b/docs/create-store.md index 750bb08..ced1430 100644 --- a/docs/create-store.md +++ b/docs/create-store.md @@ -4,7 +4,7 @@ To create a storefront powered by Metaplex, you need to create a store on the Me steps you need to take to create your store. After creating your store, this guide will show you how to manage your store information, such as who to whitelist as creators. -## Prerequisuites +## Prerequisites * You should have an understanding of `React` concepts such as hooks. Please refer to the React documentation [here](https://reactjs.org/docs/getting-started.html). * To create your store, you will need to have a wallet that contains token to perform your transactions. From 4fe9226ec2b7b19d57887489f00c3e37565a8a67 Mon Sep 17 00:00:00 2001 From: Gavin Date: Wed, 9 Jun 2021 02:42:21 -0700 Subject: [PATCH 3/3] Change highlighting --- docs/create-store.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/create-store.md b/docs/create-store.md index ced1430..8b6c7ce 100644 --- a/docs/create-store.md +++ b/docs/create-store.md @@ -16,7 +16,7 @@ store information, such as who to whitelist as creators. To create a store, you must first derive the store ID given your public address. The Metaplex devs have already created an environment variable for you to utilize - `REACT_APP_STORE_OWNER_ADDRESS_ADDRESS` - which you should set to be your -wallet public address. To do this, you can create a `.env` file in the `packages/web folder`, and set +wallet public address. To do this, you can create a `.env` file in `packages/web`, and set `REACT_APP_STORE_OWNER_ADDRESS_ADDRESS` to be your wallet public address in there. ```