Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/token/ERC721/ERC721Enumerable/ERC721EnumerableFacet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,9 @@ contract ERC721EnumerableFacet {
revert ERC721InvalidReceiver(_to);
}
} catch (bytes memory reason) {
if (reason.length == 0) revert ERC721InvalidReceiver(_to);
if (reason.length == 0) {
revert ERC721InvalidReceiver(_to);
}
assembly ("memory-safe") {
revert(add(reason, 0x20), mload(reason))
}
Expand All @@ -351,7 +353,9 @@ contract ERC721EnumerableFacet {
revert ERC721InvalidReceiver(_to);
}
} catch (bytes memory reason) {
if (reason.length == 0) revert ERC721InvalidReceiver(_to);
if (reason.length == 0) {
revert ERC721InvalidReceiver(_to);
}
assembly ("memory-safe") {
revert(add(reason, 0x20), mload(reason))
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/design/design-for-composition.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ We focus on building **small, independent, and easy-to-read facets**. Each facet
## Writing Facet Modules

1. Facet modules are self-contained code units. They do not import anything.
2. Each facet should have one corresponding facet modules.
2. Each facet should have one corresponding facet module.
3. Facet modules are used to initialize facets on deployment and during upgrades.
4. Facet modules are also used to integrate custom facets with Compose facets.
5. Facet modules have one or more functions which are used to initialize storage variables during deployment.
Expand Down
4 changes: 2 additions & 2 deletions website/docs/foundations/composable-facets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ On-chain facets are the **building blocks** of Compose. Like LEGO bricks, they'r
## Composability Benefits

1. **Start Simple, then Scale**: Begin with core functionality, add features
3. **Increase Confidence**: Use tested, audited facets from the Compose library to build your project
4. **Architectural Flexibility**: Same facets, infinite configurations based on your project needs
2. **Increase Confidence**: Use tested, audited facets from the Compose library to build your project
3. **Architectural Flexibility**: Same facets, infinite configurations based on your project needs

### Composition vs. Inheritance

Expand Down
2 changes: 1 addition & 1 deletion website/docs/foundations/diamond-contracts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ A diamond contract is a smart contract made from multiple small building blocks

A diamond has:
- One address
- It's own data storage
- Its own data storage
- Multiple facets providing functionality

Below is a diagram showing a diamond with multiple facets.
Expand Down
2 changes: 1 addition & 1 deletion website/docs/foundations/reusable-facet-logic.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Suppose you want to create a new ERC-20 token that supports gasless approvals (p

With Compose, you:

1. **Select existing facets**: `ERC20Facet`, `ERC20PermitFacet`, and `ERC20BridgableFacet` are already deployed on-chain
1. **Select existing facets**: `ERC20Facet`, `ERC20PermitFacet`, and `ERC20BridgeableFacet` are already deployed on-chain
2. **Provide initialization data**: your token's name, symbol, and total supply
3. **Deploy your diamond**: a small proxy contract that references the facet addresses and logic

Expand Down
2 changes: 1 addition & 1 deletion website/docs/foundations/solidity-modules.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
sidebar_position: 3
title: Solidity Modules
description: Descrition of what Solidity modules are and how they are used in Compose.
description: Description of what Solidity modules are and how they are used in Compose.
---


Expand Down