# What is a Smart Contract?

Smart contracts are an integral part of NFT infrastructure - without them NFTs cannot operate. They are made up of code that allow the storage and display of information, visible to anyone. This information is immutable due to the nature of [blockchain](/nft-fundamentals/what-is-blockchain.md) networks, meaning it can’t be changed. If a smart contract is published containing code errors, it will remain that way forever. Smart contracts are used to determine certain actions, such as verifying ownership, showing token *metadata*, and enabling and recording transfer. They can also be extended to handle other useful and relevant use cases, such as royalty payments for an artist in future sales of an NFT.

![](/files/5rhfoQML9PNEw4aivZv3)

{% hint style="danger" %}
The **metadata** of an NFT describes and gives information about the NFT.
{% endhint %}

### Smart contract standards

The code in a smart contract determines the characteristics of the NFT and the way in which its data is displayed. Smart contracts tend to follow *standards*. In Ethereum, the primary standards for NFT smart contracts are ERC-1155 and ERC-721. In its simplest form, ERC-1155 is generally used for contracts with many non-divisible tokens with the same underlying metadata (think of a concert ticket or a library pass - they are unique and you cannot own 'half' a ticket, they are non-divisible; [example](https://opensea.io/assets/0xd0b53410454370a482979c0adaf3667c6308a801/0)). ERC-721 is generally used for non-divisible tokens, all of which have different metadata ([example](https://opensea.io/collection/boredapeyachtclub)) whilst living in the same contract (think of individual players within a football team).

![](/files/LJBUxkTFwK8uBnqFKdFT)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fair.xyz/nft-fundamentals/what-is-a-smart-contract.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
