Skip to content

Commit

Permalink
Modify README
Browse files Browse the repository at this point in the history
  • Loading branch information
MiloTruck committed Sep 3, 2024
1 parent a45ec56 commit 9396c15
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 49 deletions.
75 changes: 26 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,66 +1,43 @@
## Foundry
# Solidity Snippets

**Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.**
A collection of commonly seen contracts, re-written to prioritize simplicity and readability.

Foundry consists of:
## Contracts

- **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools).
- **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data.
- **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network.
- **Chisel**: Fast, utilitarian, and verbose solidity REPL.
All contracts are located in the `src` directory.

## Documentation
```ml
interfaces
├─ IERC20 — "Interface of the ERC-20 standard"
https://book.getfoundry.sh/
snippets
├─ ConstantSumPair - "A minimal x + y = k AMM"
## Usage
tokens
├─ ERC20 — "Minimal ERC20 implementation"
### Build

```shell
$ forge build
utils
├─ FixedPointMathLib — "Library to manage fixed-point arithmetic"
├─ SafeTransferLib — "Library for safe ETH and ERC20 transfers"
├─ VoteHistoryLib — "Library to store and retrieve vote history based on block number"
```

### Test

```shell
$ forge test
```
## Installation

### Format
To install with [**Foundry**](https://github.com/gakonst/foundry):

```shell
$ forge fmt
```sh
forge install MiloTruck/solidity-snippets
```

### Gas Snapshots
## Safety

```shell
$ forge snapshot
```
This codebase was written for demonstration purposes. It has not been audited and should not be used in production.

### Anvil
## Acknowledgements

```shell
$ anvil
```

### Deploy
This repository is inspired by or directly modified from many sources, primarily:

```shell
$ forge script script/Counter.s.sol:CounterScript --rpc-url <your_rpc_url> --private-key <your_private_key>
```

### Cast

```shell
$ cast <subcommand>
```

### Help

```shell
$ forge --help
$ anvil --help
$ cast --help
```
- [OpenZeppelin](https://github.com/OpenZeppelin/openzeppelin-contracts)
- [Solmate](https://github.com/transmissions11/solmate)
- [Solady](https://github.com/Vectorized/solady)
File renamed without changes.
File renamed without changes.

0 comments on commit 9396c15

Please sign in to comment.