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

Commit

Permalink
Merge branch 'main' into ciara/ui-components
Browse files Browse the repository at this point in the history
  • Loading branch information
ciaranightingale authored Sep 12, 2023
2 parents 6338f74 + 9ce07fb commit bcb4b1d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 21 deletions.
21 changes: 0 additions & 21 deletions docs/onboarding/2 Explore/1 1 Overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,24 +72,3 @@ Pre-built contracts are written by the thirdweb team, and cover the most common
| [Vote](/pre-built-contracts/vote) | Create and vote on proposals. |
| [Token](/pre-built-contracts/token) | Create cryptocurrency compliant with ERC-20 standard. |
| [Split](/pre-built-contracts/split) | Distribute funds among multiple recipients. |

## How Pre-Built Contracts Work

Each contract extends the extensions that are available in our [Solidity SDK](/solidity/extensions),
and all come with a standard set of features that enable fine-grained control over the contract's behavior, such as:

- [Contract metadata](/dashboard/NFTs)
- [Permission controls](/dashboard/permissions)
- [Royalties and platform fees](/dashboard/settings)

When you deploy a prebuilt contract, you are actually deploying a [**proxy contract**](/glossary/proxy-contracts);
which reduces the gas cost for you by **~90%**!

This works by having our smart contracts run the underlying logic, meaning you only deploy the code that is unique to _your_ contract.

The proxy contract stores the state, for example; its name, and what NFTs have been minted so far.
For any logic (such as how to mint an NFT), it delegates to the implementation smart contract to handle, since this logic is the same for every NFT collection.

**You still maintain 100% ownership of the contract.**

![Proxy Contract Flow](./2EVM/assets/delegating-calls.png)
25 changes: 25 additions & 0 deletions docs/onboarding/2 Explore/1 2 How it Works.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: Overview
slug: /pre-built-contracts/how-it-works
---

# How Pre-Built Contracts Work

Each contract extends the extensions that are available in our [Solidity SDK](/solidity/extensions),
and all come with a standard set of features that enable fine-grained control over the contract's behavior, such as:

- [Contract metadata](/dashboard/NFTs)
- [Permission controls](/dashboard/permissions)
- [Royalties and platform fees](/dashboard/settings)

When you deploy a prebuilt contract, you are actually deploying a [**proxy contract**](/glossary/proxy-contracts);
which reduces the gas cost for you by **~90%**!

This works by having our smart contracts run the underlying logic, meaning you only deploy the code that is unique to _your_ contract.

The proxy contract stores the state, for example; its name, and what NFTs have been minted so far.
For any logic (such as how to mint an NFT), it delegates to the implementation smart contract to handle, since this logic is the same for every NFT collection.

**You still maintain 100% ownership of the contract.**

![Proxy Contract Flow](./2EVM/assets/delegating-calls.png)

0 comments on commit bcb4b1d

Please sign in to comment.