Skip to content

Commit ead7451

Browse files
committed
docs
1 parent a096ed5 commit ead7451

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

README.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,44 +16,41 @@ It isn't that any of these features are bad, that isn't the point. It is that we
1616

1717
If this feature ban breaks your mind, just realize that this smart contract library is different than what you have encountered before -- it has different importances, different design principles and it has different ways of doing things. Open your mind and be willing to look at smart contracts a different way. Let the design section rewrite your brain.
1818

19-
### 1. Inheritance is **banned**.
19+
1. ### Inheritance is **banned**.
2020

2121
No contract may inherit any other contract or interface. For example `MyContract is OtherContract` or `MyContract is IMyInterface` etc. is not allowed.
2222

23-
### 2. No constructor functions
23+
2. ### No constructor functions
2424

2525
No contracts other than a diamond contract (proxy contract), may have a constructor function. For example: `constructor() {owner = msg.sender; }` etc.
2626

27-
### 3. No modifiers
27+
3. ### No modifiers
2828

2929
No contract may use modifiers. For example: `modifier onlyOwner() { require(msg.sender == owner, "Caller is not the owner"); _; }` etc.
3030

31-
### 4. No public or private or internal variables
31+
4. ### No public or private or internal variables
3232

3333
No contract or library may have variables declared private or public or internal. For example: `uint256 public counter;`. These visibility labels are not needed because the library uses ERC-8042 Diamond Storage through out.
3434

35-
### 5. No private functions
35+
5. ### No private functions
3636

3737
No contract or library may have a function declared private. For example: `function approve(address _spender, uint256 _value) private { ...`. This means all functions in contracts must be delcared `internal` or `external`.
3838

39-
### 6. No external functions in Solidity libraries
39+
6. ### No external functions in Solidity libraries
4040

4141
No Solidity library may have any external functions. For example: `function name() external view returns (string memory)`. All functions in Solidity libraries must be delcared `internal`.
4242

43-
### 7. No `using for` in Solidity libraries
43+
7. ### No `using for` in Solidity libraries
4444

4545
No Solidity library may use the `using` directive. For example: `using LibSomething for uint`.
4646

47-
### 8. No `selfdestruct`.
47+
8. ### No `selfdestruct`.
4848

4949
No contract or libary may use `selfdestruct`.
5050

5151
Other Solidity features will likely be added to this ban list.
5252

53-
Note that the feature ban applies to the smart contracts and libraries within Compose. It does not apply to the users that use the library. Users can do what they want to do and it is our job to help them.
54-
55-
56-
53+
Note that the feature ban applies to the smart contracts and libraries within Compose. It does not apply to the users that use Compose. Users can do what they want to do and it is our job to help them.
5754

5855

5956

0 commit comments

Comments
 (0)