-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
72 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,35 @@ | ||
## Yul By Example | ||
# Yul By Example | ||
|
||
Basically, we made [Solidity by example](https://solidity-by-example.org/) but for Yul :)<br><br> | ||
**Required Solidity Version**: v0.8.17.<br> | ||
**Required SPDX-License-Identifier**: MIT | ||
--- | ||
|
||
```solidity | ||
// SPDX-License-Identifier: GPL-3.0 | ||
pragma solidity ^0.8.0; | ||
To see the book change live run: | ||
|
||
```sh | ||
mdbook serve | ||
contract Yul { | ||
function yulFunction() public { | ||
assembly { | ||
mstore(0x40, "Yul By Example.") | ||
} | ||
} | ||
} | ||
``` | ||
|
||
To run the book with docker, run: | ||
## Source Code | ||
book/src | ||
|
||
## Book URL | ||
🔗 https://yul-by-example.vercel.app/ | ||
|
||
## Run Book Locally | ||
To run a copy of this book locally on your device, clone the repo and install `mdbook` via cargo (that comes with Rust). If you don't have Rust installed in your PC, you can download and setup Rust [here](https://www.rust-lang.org/). | ||
|
||
### Contracts Implemented so far | ||
- [Array](/src/Array.sol) | ||
- [Bitwise](/src/Bitwise.sol) | ||
- [Call](/src/Call.sol) | ||
- [Calldata](/src/Calldata.sol) | ||
- [Conditionals](/src/Conditionals.sol) | ||
- [Counter](/src/Counter.sol) | ||
- [Enums](/src/Enums.sol) | ||
- [Errors](/src/Errors.sol) | ||
- [Ether Wallet](/src/EtherWallet.sol) | ||
- [Events](/src/Events.sol) | ||
- [FallBack](/src/Fallback.sol) | ||
- [For Loop](src/ForLoop.sol) | ||
- [Functions](src/Functions.sol) | ||
- [Hash](src/Hash.sol) | ||
- [Hello World](/src/HelloWorld.sol) | ||
- [IsContract](/src/IsContract.sol) | ||
- [Mapping](/src/Mapping.sol) | ||
- [Send Ether](/src/SendEther.sol) | ||
- [Signature Verification](/src/SignatureVerification.sol) | ||
- [Simple Storage](/src/SimpleStorage.sol) | ||
- [Structs](/src/Structs.sol) | ||
- [Types](/src/Types.sol) | ||
- [Unchecked](/src/Unchecked.sol) | ||
- [ERC20](/src/YulERC20.sol) | ||
To install `mdbook`, you can refer to [this](https://rust-lang.github.io/mdBook/guide/installation.html). | ||
|
||
### Docs | ||
- [Array](/book/src/Array.md) | ||
- [Bitwise](/book/src/Bitwise.md) | ||
- [Call](/book/src/Call.md) | ||
- [Calldata](/book/src/Calldata.md) | ||
- [Conditionals](/book/src/Conditionals.md) | ||
- [Counter](/book/src/Counter.md) | ||
- [Enums](/book/src/Enums.md) | ||
- [Errors](/book/src/Errors.md) | ||
- [Ether Wallet](/book/src/EtherWallet.md) | ||
- [Events](/book/src/Events.md) | ||
- [Fallback](/book/src/Fallback.md) | ||
- [For Loop](/book/src/ForLoop.md) | ||
- [Functions](/book/src/Functions.md) | ||
- [Hash](/book/src/Hash.md) | ||
- [Hello World](/book/src/HelloWorld.md) | ||
- [Is Contract](/book/src/IsContract.md) | ||
- [Mapping](/book/src/Mapping.md) | ||
- [Safe Operations](/book/src/SafeOperations.md) | ||
- [Send Ether](/book/src/SendEther.md) | ||
- [Signature Verification](/book/src/SignarureVerification.md) | ||
- [Simple Storage](/book/src/SimpleStorage.md) | ||
- [Structs](/book/src/Structs.md) | ||
- [Types](/book/src/Types.md) | ||
- [Unchecked](/book/src/Unchecked.md) | ||
- [Yul ERC20](/book/src/YulERC20.md) | ||
To display the book on your browser, run `mdbook serve book/ -o` from the base directory. | ||
|
||
## Contributors ✨ | ||
|
||
<a href="https://github.com/Perelyn-sama/yul_by_example/graphs/contributors"> | ||
<img src="https://contrib.rocks/image?repo=Perelyn-sama/yul_by_example" /> | ||
</a> | ||
|
||
### Acknowledgements | ||
|
||
These contracts were inspired by or directly modified from many sources, primarily: | ||
- [RareSkills](https://github.com/RareSkills/Udemy-Yul-Code) | ||
- [Solidity By Example](https://solidity-by-example.org/) | ||
</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.