Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
s-damian committed Aug 25, 2024
1 parent f28f65f commit 802b36b
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 94 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ See more images here:
[Images](./img/)

See further technical details here:
[README-tech.md](./README-tech.md)
[README-tech.md](./docs/README-tech.md)



Expand Down
90 changes: 90 additions & 0 deletions docs/Localnet-to-Devnet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
## Localnet to Devnet

### Switch to Devnet

Change your Solana CLI to use the Devnet:

```bash
solana config set --url https://api.devnet.solana.com
```

### Fund Your Wallet

Airdrop SOL to your Devnet wallet:

```bash
solana airdrop <amout>
```

### Update Anchor Configuration

Modify your `Anchor.toml` file:

#### Anchor.toml - In [programs.devnet] section:

Add :

```bash
[programs.devnet]
nft_ticketing = "<your-program-id>"
```

#### Anchor.toml - In [provider] section:

Replace:

```bash
[provider]
cluster = "localnet"
```

By:

```bash
[provider]
cluster = "devnet"
```

### Environment Variables

In `/app/front/.env` (Next.js App):
Replace:
```bash
NEXT_PUBLIC_REACT_APP_SOLANA_NETWORK="localnet"
```
By:
```bash
NEXT_PUBLIC_REACT_APP_SOLANA_NETWORK="devnet"
```

### Phantom Wallet

In your Phantom settings, switch **Solana Localnet** to **Solana Devnet**.

### Build and Deploy the Anchor Program

Build:

```bash
anchor build
```

Deploy on the Devnet:

```bash
anchor deploy --provider.cluster devnet
```

### Run Front-End (Next.js App)

Go to the Next.js App Directory:

```bash
cd /<your-path>/anchor-nft-ticketing/app/front
```

Start the development server:

```bash
npm run dev
```
93 changes: 0 additions & 93 deletions README-tech.md → docs/README-tech.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,96 +70,3 @@ Lint and format the code :
```bash
npm run lint:fix
```



## Localnet to Devnet

### Switch to Devnet

Change your Solana CLI to use the Devnet:

```bash
solana config set --url https://api.devnet.solana.com
```

### Fund Your Wallet

Airdrop SOL to your Devnet wallet:

```bash
solana airdrop <amout>
```

### Update Anchor Configuration

Modify your `Anchor.toml` file:

#### Anchor.toml - In [programs.devnet] section:

Add :

```bash
[programs.devnet]
nft_ticketing = "<your-program-id>"
```

#### Anchor.toml - In [provider] section:

Replace:

```bash
[provider]
cluster = "localnet"
```

By:

```bash
[provider]
cluster = "devnet"
```

### Environment Variables

In `/app/front/.env` (Next.js App):
Replace:
```bash
NEXT_PUBLIC_REACT_APP_SOLANA_NETWORK="localnet"
```
By:
```bash
NEXT_PUBLIC_REACT_APP_SOLANA_NETWORK="devnet"
```

### Phantom Wallet

In your Phantom settings, switch **Solana Localnet** to **Solana Devnet**.

### Build and Deploy the Anchor Program

Build:

```bash
anchor build
```

Deploy on the Devnet:

```bash
anchor deploy --provider.cluster devnet
```

### Run Front-End (Next.js App)

Go to the Next.js App Directory:

```bash
cd /<your-path>/anchor-nft-ticketing/app/front
```

Start the development server:

```bash
npm run dev
```

0 comments on commit 802b36b

Please sign in to comment.