Skip to content

Commit

Permalink
add: explanation on data location and units in Solidity
Browse files Browse the repository at this point in the history
  • Loading branch information
Nfire2103 committed May 19, 2024
1 parent db3f017 commit 9d2759c
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions p2p/5.Create_an_ERC-20/Solidity.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
## Contracts

- **Contracts**: The building blocks of Ethereum smart contracts.
- [Solidity by Example - Hello World](https://solidity-by-example.org/hello-world/)
- [Solidity by Example - Hello World](https://solidity-by-example.org/hello-world/)

## Data Types and State Variables

Expand All @@ -24,6 +24,13 @@
- **private**: Accessible only within the contract.
- [Solidity by Example - Visibility](https://solidity-by-example.org/visibility/)

## Data Location

- **Storage**: Persistent data stored on the blockchain.
- **Memory**: Temporary data stored during function execution.
- **Stack**: Local variables stored in function execution context.
- [Solidity by Example - Data Location](https://solidity-by-example.org/data-location/)

## Mappings and Arrays

- **Mappings**: Key-value data structures.
Expand All @@ -34,7 +41,7 @@
## Functions

- **Functions**: Code blocks within contracts that execute specific tasks.
- [Solidity by Example - Functions](https://solidity-by-example.org/function/)
- [Solidity by Example - Functions](https://solidity-by-example.org/function/)

## Constructor

Expand All @@ -61,6 +68,11 @@
- **Events**: Enable logging of important contract actions for external consumption.
- [Solidity by Example - Events](https://solidity-by-example.org/events/)

## Units

- **Units**: Ether and Wei are the primary units of Ethereum. 1 ether = 10^18 wei.
- [Solidity by Example - Units](https://solidity-by-example.org/ether-units/)

## Solidity by Example

- To find more examples of practical Solidity implementations, explore [Solidity by Example](https://solidity-by-example.org/).
Expand Down

0 comments on commit 9d2759c

Please sign in to comment.