Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/buidly/sui-nft-marketplace
https://github.com/buidly/sui-nft-marketplace
Last synced: 17 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/buidly/sui-nft-marketplace
- Owner: buidly
- Created: 2024-07-04T08:10:13.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-07-17T14:28:20.000Z (5 months ago)
- Last Synced: 2024-07-18T14:59:13.391Z (5 months ago)
- Language: TypeScript
- Size: 95.7 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sui dApp Starter Template
This dApp was created using `@mysten/create-dapp` that sets up a basic React
Client dApp using the following tools:- [React](https://react.dev/) as the UI framework
- [TypeScript](https://www.typescriptlang.org/) for type checking
- [Vite](https://vitejs.dev/) for build tooling
- [Radix UI](https://www.radix-ui.com/) for pre-built UI components
- [ESLint](https://eslint.org/) for linting
- [`@mysten/dapp-kit`](https://sdk.mystenlabs.com/dapp-kit) for connecting to
wallets and loading data
- [pnpm](https://pnpm.io/) for package management## Deploying your Move code
### Install Sui cli
Before deploying your move code, ensure that you have installed the Sui CLI. You
can follow the [Sui installation instruction](https://docs.sui.io/build/install)
to get everything set up.This template uses `devnet` by default, so we'll need to set up a devnet
environment in the CLI:```bash
sui client new-env --alias devnet --rpc https://fullnode.devnet.sui.io:443
sui client switch --env devnet
```If you haven't set up an address in the sui client yet, you can use the
following command to get a new address:```bash
sui client new-address secp256k1
```This well generate a new address and recover phrase for you. You can mark a
newly created address as you active address by running the following command
with your new address:```bash
sui client switch --address 0xYOUR_ADDRESS...
```We can ensure we have some Sui in our new wallet by requesting Sui from the
faucet (make sure to replace the address with your address):```bash
curl --location --request POST 'https://faucet.devnet.sui.io/gas' \
--header 'Content-Type: application/json' \
--data-raw '{
"FixedAmountRequest": {
"recipient": ""
}
}'
```### Publishing the move package
The move code for this template is located in the `move` directory. To publish
it, you can enter the `move` directory, and publish it with the Sui CLI:```bash
cd move
sui client publish --gas-budget 100000000 counter
```In the output there will be an object with a `"packageId"` property. You'll want
to save that package ID to the `src/constants.ts` file as `PACKAGE_ID`:```ts
export const DEVNET_COUNTER_PACKAGE_ID = "";
```Now that we have published the move code, and update the package ID, we can
start the app.## Starting your dApp
To install dependencies you can run
```bash
pnpm install
```To start your dApp in development mode run
```bash
pnpm dev
```## Building
To build your app for deployment you can run
```bash
pnpm build
```