Skip to content

Commit 02c26c4

Browse files
committed
docs
1 parent f52b01d commit 02c26c4

File tree

1 file changed

+28
-17
lines changed

1 file changed

+28
-17
lines changed

website/docs/intro.mdx

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,53 +10,64 @@ import Callout from '@site/src/components/ui/Callout';
1010
import FeatureGrid, { FeatureGridItem } from '@site/src/components/features/FeatureGrid';
1111
import DiamondFacetsSVG from '@site/static/img/svg/compose_diamond_facets.svg'
1212

13+
{/*
1314
<DocHero
1415
title="Build with the Compose"
1516
subtitle="Compose is a general purpose smart contract library. It helps you create smart contract systems."
1617
variant="gradient"
1718
height="medium"
1819
/>
20+
*/}
21+
22+
**Compose** is a general-purpose smart contract library that helps you build smart contract systems.
23+
24+
Traditional smart contract libraries give you source code that you must modify, extend, and deploy yourself to one or more blockchains.
1925

20-
Past smart contract libraries gave you source code and expected you to extend or modify it and then deploy it to one or more blockchains.
26+
**Compose takes a different approach.**
2127

22-
Compose is different. We **don't** expect you to do that. We take a different approach.
28+
Compose provides a set of **reusable on-chain contracts** that already exist on blockchains—you don't need to deploy or manage them yourself. The heavy lifting has been done.
2329

24-
Compose gives you a set of reusable smart contracts that already exist on blockchains. You don't have to deploy Compose source code. It's already been done. The smart contracts are already deployed for your use.
30+
For your next project, instead of deploying new contracts, simply **use the existing on-chain contracts** provided by Compose.
2531

26-
For your new project, instead of deploying new contracts, use existing onchain smart contracts provided by Compose.
2732

2833
:::tip[Key Insight]
2934
Compose is a general purpose **onchain** smart contract library.
3035
:::
3136

3237
:::info[In Development]
33-
We haven't actually deployed smart contracts yet because we are in early development. We are building. If this is exciting to you, come join us.
38+
Compose is still in early development, and its smart contracts haven't been deployed yet.
39+
We're actively building—and if this vision excites you, we'd love for you to join us.
3440
:::
3541

3642

3743
## Reusable Smart Contracts
3844

39-
You might wonder how to create a new project without deploying new smart contracts. How does Compose enable people to create new smart contract systems using existing onchain contracts?
45+
You might be wondering: **How can I create a new project without deploying new smart contracts?**
4046

41-
This is where Compose's smart contract architecture comes in. Compose uses [diamond contracts](https://eips.ethereum.org/EIPS/eip-2535)
42-
to organize smart contracts and make them reusable.
47+
How does Compose make it possible to build new systems from existing onchain contracts?
4348

44-
A diamond contract is a simple, small contract that uses the code of other onchain contracts.
49+
The answer lies in Compose’s smart contract architecture, which is based on [diamond contracts](https://eips.ethereum.org/EIPS/eip-2535).
4550

46-
A diamond contract creates and maintains its own storage data using code from other contracts. These "other contracts" are called facets. Here is a diagram of a diamond that shows it gets its code from facets.
51+
A diamond contract is a simple, tiny contract that **uses the code of other onchain contracts** called **facets**. Each diamond uses the code of other contracts (facets) to create and maintain its storage data and state.
52+
53+
Below is a diagram showing a diamond connected to multiple facets that provide its functionality.
4754

4855
<DiamondFacetsSVG style={{ width: '800', height: 'auto' }} />
4956

50-
Using Compose you do actually deploy new contracts. Specifically you deploy a small diamond contract that uses existing onchain facets.
57+
When you use Compose, you *do* deploy new contracts—but only the small diamond contract that ties together existing onchain facets.
58+
59+
Let's look at a simple example.
60+
61+
Suppose you want to create a new ERC-20 token that supports gasless approvals (permit) and cross-chain bridging.
5162

52-
Let's look at a simple example of how this works. Let's say that you want to create a new ERC20 token that uses the gasless "permit" function and can be bridged to other blockchains. **Use Compose to:**
63+
With Compose, you can:
5364

54-
1. Find and choose onchain facets you need. In this case `ERC20Facet`, `ERC20PermitFacet` and `ERC20BridgableFacet`.
55-
2. Setup initialization information such as the name of your ERC20 token, its total supply, etc.
56-
3. Deploy a diamond which initializes your ERC20 token and uses the onchain facets in step 1.
65+
1. **Select the facets you need** – for example, `ERC20Facet`, `ERC20PermitFacet`, and `ERC20BridgableFacet`.
66+
2. **Provide initialization data**such as the token name, symbol, and total supply.
67+
3. **Deploy your diamond**which initializes your ERC-20 token and connects it to the chosen facets.
5768

5869
:::tip[Key Insight]
59-
Many diamond contracts are deployed that reuse the same onchain facets.
70+
Many diamond contracts can be deployed that **reuse the same onchain facets**.
6071
:::
6172

6273
## Composable Contracts
@@ -125,7 +136,7 @@ Isolated, small, simply written onchain components that are composed with your u
125136
<FeatureGrid columns={3}>
126137
<FeatureGridItem
127138
icon={<Icon name="package" size={32} />}
128-
title="On-Chain Standard Library"
139+
title="Onchain Standard Library"
129140
description="Access verified, audited facets deployed once and reused across multiple diamonds on multiple blockchains."
130141
/>
131142
<FeatureGridItem

0 commit comments

Comments
 (0)