Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Commit

Permalink
Developer hub redirections (#445)
Browse files Browse the repository at this point in the history
* Add announcement bar and first page warning

* Add more warnings
  • Loading branch information
lorisleiva authored Sep 8, 2023
1 parent 9996f99 commit c1eb8bb
Show file tree
Hide file tree
Showing 54 changed files with 486 additions and 145 deletions.
6 changes: 6 additions & 0 deletions docs/01-programs/00-understanding-programs.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Understanding Programs

:::info

**A newer version of this page is available in the Developer Hub. [Click here to read it](https://developers.metaplex.com/understanding-programs).**

:::

This page aims to provide a quick overview of how programs work in Solana and offer additional reading material for those who are interested in learning more about a particular subject.

## Introduction
Expand Down
6 changes: 6 additions & 0 deletions docs/01-programs/01-token-metadata/00-overview.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Overview

:::info

**A newer version of this page is available in the Developer Hub. [Click here to read it](https://developers.metaplex.com/token-metadata).**

:::

## Introduction

The Token Metadata program is one of the most important programs when dealing with NFTs on the Solana blockchain. Its main goal is to **attach additional data to [Fungible](https://en.wikipedia.org/wiki/Fungibility) or Non-Fungible [Tokens](https://spl.solana.com/token)** on Solana.
Expand Down
6 changes: 6 additions & 0 deletions docs/01-programs/01-token-metadata/01-getting-started.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Getting Started

:::info

**A newer version of this page is available in the Developer Hub. [Click here to read it](https://developers.metaplex.com/token-metadata/getting-started).**

:::

Like any Solana program, one can interact with the Token Metadata program by sending UDP packets to the network or by using the API provided by RPC nodes. However, this is not a great developer experience and, as such, this page aims to help you get started with the Token Metadata program in a much more developer-friendly way.

## JavaScript SDK
Expand Down
8 changes: 7 additions & 1 deletion docs/01-programs/01-token-metadata/04-token-standard.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ import tokenStandard from '/src/token-metadata/token-standard';

# Token Standard

:::info

**A newer version of this page is available in the Developer Hub. [Click here to read it](https://developers.metaplex.com/token-metadata/token-standard).**

:::

## Introduction

As token usage has evolved on Solana, it has become clear that there are more types of tokens than simply "fungible" and "non-fungible" tokens.
Expand Down Expand Up @@ -230,7 +236,7 @@ You can [read more about Programmable NFTs here](https://github.com/metaplex-fou
"type": "video/mp4"
}
],
"category": "video",
"category": "video"
}
}
```
Expand Down
12 changes: 8 additions & 4 deletions docs/01-programs/01-token-metadata/05-certified-collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ description: "All about the on-chain Metaplex Certified Collections spec."

# Certified Collections

:::info

**A newer version of this page is available in the Developer Hub. [Click here to read it](https://developers.metaplex.com/token-metadata/collections).**

:::

## Introduction

Certified Collections enables NFTs – and tokens in general — **to be grouped together** and for that information to be **verified on-chain**. Additionally, it makes it easier to manage these collections by allocating data for them on-chain.
Expand All @@ -28,7 +34,6 @@ In order to group NFTs — or any token — together, we must first create a Col

The difference between a Collection NFT and a Regular NFT is that the information provided by the former will be used to define the group of NFTs it contains whereas the latter will be used to define the NFT itself.


### Linking Regular NFTs to Collection NFTs.

Collection NFTs and Regular NFTs are **linked together using a "Belong To" relationship** on the Metadata account. The optional `Collection` field on the Metadata account has been created for that purpose.
Expand Down Expand Up @@ -56,7 +61,6 @@ Note that, because `CollectionDetails` is a new field, not all existing collecti

That being said, we encourage new collections to use it both to allow sizing their collections and provide an on-chain way to determine a Collection NFT from a Regular one. We also encourage existing collections to [migrate their Collection NFT](#migrating-to-sized-collections).


![](/assets/programs/token-metadata/Token-Metadata-Collections-Collection-NFT.png#radius)

### Nested Collections
Expand All @@ -83,8 +87,8 @@ This is the same pattern as the `Creators` field where `Verified` must be true t

In Order to check if a collection is valid on an NFT, it **MUST** have a collection struct set with:

* The `key` field matching the mint address of the appropriate collection parent
* The `verified` field set to `true`
- The `key` field matching the mint address of the appropriate collection parent
- The `verified` field set to `true`

If those two steps are not followed you could be exposing fraudulent NFTs on real collections.

Expand Down
10 changes: 10 additions & 0 deletions docs/01-programs/01-token-metadata/06-nft-escrow.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,32 @@ description: "Giving NFTs an escrow account."

# NFT Escrow

:::info

**A newer version of this page is available in the Developer Hub. [Click here to read it](https://developers.metaplex.com/token-metadata/escrow).**

:::

## Introduction

This extension of the Token Metadata contract was created as a new feature primitive that could optionally be added to all NFTs. At its core it is simply an escrow account attached to an NFT, enabling NFTs to become owners of other tokens.

Aside from the requisite security and ownership checks necessary, the functionality this feature affords has been left generic enough to allow users to implement whatever they desire on top of the composability of the token and its escrow account.

## Types of Escrow Accounts

It is currently possible to create two different types of escrow accounts on an NFT: A Token Owned Escrow (TOE) used for ownership and a Creator Owned Escrow (COE) used for associations. The existence of both types of escrow accounts is not mutually exclusive.

### Token Owned Escrow

A Token Owned Escrow account, or TOE, is an escrow account attached to the NFT that is managed by the holder of the NFT. Transferring a token out of this escrow account is only allowable by the NFT's holder and the permissions follow the NFT as it is transferred between wallets.

This means Alice can add a token to a TOE on her NFT, then sell her NFT to Bob. Bob would then be the only one allowed to transfer that token out of the TOE.

Due to the holder-based permissions, it is only possible to have one TOE on an NFT. A TOE follows traditional wallet action flow where anyone can transfer a token into the escrow account but the holder is the only one who can transfer the token out.

### Creator Owned Escrow

A Creator Owned Escrow, or COE, is an escrow account attached to the NFT that is managed by a specified creator. This escrow account allows creators to make associations between tokens that they themselves can manage, regardless of sales, transfers, and holders of the base NFT.

An example use case for this is Metaverse avatars. Rather than storing avatars on a Web2 server, the Metaverse team could mint the avatar as an NFT, then put it in a COE (that the Metaverse team manages) attached to the corresponding base NFT. Because usage of the COE is locked to the creator of the COE, a holder would be unable to transfer the avatar out of the escrow account and break the association.
Expand Down
6 changes: 6 additions & 0 deletions docs/01-programs/01-token-metadata/08-faq.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# FAQ

:::info

**A newer version of this page is available in the Developer Hub. [Click here to read it](https://developers.metaplex.com/token-metadata/faq).**

:::

### How can I filter Metadata accounts by fields located after the `creators` array using `getProgramAccounts`?

When using [the `getProgramAccounts` method from the RPC API](https://docs.solana.com/developing/clients/jsonrpc-api#getprogramaccounts), it is common to want to filter accounts by fields using `memcmp` filters.
Expand Down
4 changes: 3 additions & 1 deletion docs/01-programs/02-candy-machine/00-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ description: "Provides a high-level overview of Candy Machines."
# Overview

:::info
This documentation refers to the latest iteration of Candy Machine known as Candy Machine V3. If you’re looking for Candy Machine V2, [please refer to this documentation instead](/deprecated/candy-machine-v2/).

**A newer version of this page is available in the Developer Hub. [Click here to read it](https://developers.metaplex.com/candy-machine).**

:::

## Introduction
Expand Down
6 changes: 6 additions & 0 deletions docs/01-programs/02-candy-machine/01-getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ description: "Lists the various libraries you can use to manage Candy Machines."

# Getting Started

:::info

**A newer version of this page is available in the Developer Hub. [Click here to read it](https://developers.metaplex.com/candy-machine/getting-started).**

:::

This page aims to help you get started with Candy Machines by listing all relevant libraries that interact with them.

## JavaScript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import { Accordion, AccordionItem } from '/src/accordion.jsx';

# Candy Machine Settings

:::info

**A newer version of this page is available in the Developer Hub. [Click here to read it](https://developers.metaplex.com/candy-machine/settings).**

:::

## Introduction

On this page, we’re going to dig into all the settings available on a Candy Machine. We will focus on settings that affect the Candy Machine itself and the NFTs it generates rather than the settings that affect the minting process known as Guards. We will tackle the latter in dedicated pages.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import { Accordion, AccordionItem } from '/src/accordion.jsx';

# Managing Candy Machines

:::info

**A newer version of this page is available in the Developer Hub. [Click here to read it](https://developers.metaplex.com/candy-machine/manage).**

:::

## Introduction

On [the previous page](/programs/candy-machine/candy-machine-settings), we went through the various settings of a Candy Machine. So now, let’s see how we can use these settings to create and update Candy Machines. We’ll also talk about how to fetch an existing Candy Machine and how to delete it when it has served its purpose.
Expand Down
6 changes: 6 additions & 0 deletions docs/01-programs/02-candy-machine/04-inserting-items.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import { Accordion, AccordionItem } from '/src/accordion.jsx';

# Inserting Items

:::info

**A newer version of this page is available in the Developer Hub. [Click here to read it](https://developers.metaplex.com/candy-machine/insert-items).**

:::

## Introduction

So far we’ve learnt to create and configure Candy Machines but we’ve not seen how to insert items inside them that can then be minted into NFTs. Thus, let’s tackle that on this page.
Expand Down
6 changes: 6 additions & 0 deletions docs/01-programs/02-candy-machine/05-candy-guards.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import { Accordion, AccordionItem } from '/src/accordion.jsx';

# Candy Guards

:::info

**A newer version of this page is available in the Developer Hub. [Click here to read it](https://developers.metaplex.com/candy-machine/guards).**

:::

## Introduction

Now that we know how Candy Machines work and how to load them, it’s time we talk about the last piece of the puzzle: Guards.
Expand Down
6 changes: 6 additions & 0 deletions docs/01-programs/02-candy-machine/06-guard-groups.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import { Accordion, AccordionItem } from '/src/accordion.jsx';

# Guard Groups

:::info

**A newer version of this page is available in the Developer Hub. [Click here to read it](https://developers.metaplex.com/candy-machine/guard-groups).**

:::

## Introduction

On [the previous page](/programs/candy-machine/candy-guards), we introduced guards and used them to define the access control of our Candy Machines. We’ve seen that using guards, we can for instance add payments of 1 SOL per mint and ensure the mint start after a certain date. But what if we also wanted to charge 2 SOL after a second date? What if we wanted to allow certain token holders to mint for free or at a discounted price?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import { Accordion, AccordionItem } from '/src/accordion.jsx';

# Special Guard Instructions

:::info

**A newer version of this page is available in the Developer Hub. [Click here to read it](https://developers.metaplex.com/candy-machine/guard-route).**

:::

## Introduction

As we’ve seen on the previous pages, guards are a powerful way to customize the minting process of your Candy Machines. But did you know guards can even provide their own custom instructions?
Expand Down
8 changes: 7 additions & 1 deletion docs/01-programs/02-candy-machine/08-minting.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import { Accordion, AccordionItem } from '/src/accordion.jsx';

# Minting

:::info

**A newer version of this page is available in the Developer Hub. [Click here to read it](https://developers.metaplex.com/candy-machine/mint).**

:::

## Introduction

So far, we’ve learned how to create and maintain Candy Machines. We’ve seen how to configure them and how to set up complex minting workflows using guard and guard groups. It’s about time we talk about the last piece of the puzzle: Minting!
Expand Down Expand Up @@ -52,7 +58,7 @@ await transactionBuilder()
nftMint,
collectionMint: collectionNft.publicKey,
collectionUpdateAuthority: collectionNft.metadata.updateAuthority,
tokenStandard: candyMachine.tokenStandard
tokenStandard: candyMachine.tokenStandard,
})
)
.sendAndConfirm(umi);
Expand Down
6 changes: 6 additions & 0 deletions docs/01-programs/02-candy-machine/09-programmable-nfts.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import { Accordion, AccordionItem } from '/src/accordion.jsx';

# Programmable NFTs

:::info

**A newer version of this page is available in the Developer Hub. [Click here to read it](https://developers.metaplex.com/candy-machine/pnfts).**

:::

## Introduction

Version `1.7` of Token Metadata introduced a [new type of asset class called Programmable NFTs](/programs/token-metadata/overview#programmable-nfts) allowing, amongst other things, creators to enforce royalties on secondary sales.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import { Accordion, AccordionItem } from '/src/accordion.jsx';

# Address Gate

:::info

**A newer version of this page is available in the Developer Hub. [Click here to read it](https://developers.metaplex.com/candy-machine/guards/address-gate).**

:::

## Overview

The **Address Gate** guard restricts the mint to a single address which must match the address of the minting wallet.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import { Accordion, AccordionItem } from '/src/accordion.jsx';

# Allow List

:::info

**A newer version of this page is available in the Developer Hub. [Click here to read it](https://developers.metaplex.com/candy-machine/guards/allow-list).**

:::

## Overview

The **Allow List** guard validates the minting wallet against a predefined list of wallets. If the minting wallet is not part of this list, minting will fail.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import { Accordion, AccordionItem } from '/src/accordion.jsx';

# Bot Tax

:::info

**A newer version of this page is available in the Developer Hub. [Click here to read it](https://developers.metaplex.com/candy-machine/guards/bot-tax).**

:::

## Overview

The **Bot Tax** guard charges a penalty for invalid transactions to discourage bots from attempting to mint NFTs. This amount is usually small to hurt bots without affecting genuine mistakes from real users. All bot taxes will be transferred to the Candy Machine account so that, once minting is over, you can access these funds by deleting the Candy Machine account.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import { Accordion, AccordionItem } from '/src/accordion.jsx';

# End Date

:::info

**A newer version of this page is available in the Developer Hub. [Click here to read it](https://developers.metaplex.com/candy-machine/guards/end-date).**

:::

## Overview

The **End Date** guard specifies a date to end the mint. After this date, minting is no longer allowed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import { Accordion, AccordionItem } from '/src/accordion.jsx';

# Freeze Sol Payment

:::info

**A newer version of this page is available in the Developer Hub. [Click here to read it](https://developers.metaplex.com/candy-machine/guards/freeze-sol-payment).**

:::

## Overview

The **Freeze Sol Payment** guard allows minting frozen NFTs by charging the payer an amount in SOL. Frozen NFTs cannot be transferred or listed on any marketplaces until thawed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import { Accordion, AccordionItem } from '/src/accordion.jsx';

# Freeze Token Payment

:::info

**A newer version of this page is available in the Developer Hub. [Click here to read it](https://developers.metaplex.com/candy-machine/guards/freeze-token-payment).**

:::

## Overview

The **Freeze Token Payment** guard allows minting frozen NFTs by charging the payer a specific amount of tokens from a certain mint account. Frozen NFTs cannot be transferred or listed on any marketplaces until thawed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import { Accordion, AccordionItem } from '/src/accordion.jsx';

# Gatekeeper

:::info

**A newer version of this page is available in the Developer Hub. [Click here to read it](https://developers.metaplex.com/candy-machine/guards/gatekeeper).**

:::

## Overview

The **Gatekeeper** guard checks whether the minting wallet has a valid **Gateway Token** — also known as a **Civic Pass** — from a specified **Gatekeeper Network**.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import { Accordion, AccordionItem } from '/src/accordion.jsx';

# Mint Limit

:::info

**A newer version of this page is available in the Developer Hub. [Click here to read it](https://developers.metaplex.com/candy-machine/guards/mint-limit).**

:::

## Overview

The **Mint Limit** guard allows specifying a limit on the number of NFTs each wallet can mint.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import { Accordion, AccordionItem } from '/src/accordion.jsx';

# NFT Burn

:::info

**A newer version of this page is available in the Developer Hub. [Click here to read it](https://developers.metaplex.com/candy-machine/guards/nft-burn).**

:::

## Overview

The **NFT Burn** guard restricts the mint to holders of a predefined NFT Collection and burns the holder's NFT. Thus, the mint address of the NFT to burn must be provided by the payer when minting.
Expand Down
Loading

1 comment on commit c1eb8bb

@vercel
Copy link

@vercel vercel bot commented on c1eb8bb Sep 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.