Skip to content

Commit

Permalink
Create README.md in default template (#5465)
Browse files Browse the repository at this point in the history
* Create README.md in default template

* Add suggested changes to README.md

`Foundry` intro section is expanded the same as ReadMe in the Foundry repo. 
`forge create` is changed to `forge script`

* chore: write readme to template

---------

Co-authored-by: Enrique Ortiz <hi@enriqueortiz.dev>
  • Loading branch information
allwin199 and Evalir committed Jul 25, 2023
1 parent 4917d33 commit 41a6593
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
66 changes: 66 additions & 0 deletions cli/assets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
## Foundry

**Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.**

Foundry consists of:

- **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.

## Documentation

https://book.getfoundry.sh/

## Usage

### Build

```shell
$ forge build
```

### Test

```shell
$ forge test
```

### Format

```shell
$ forge fmt
```

### Gas Snapshots

```shell
$ forge snapshot
```

### Anvil

```shell
$ anvil
```

### Deploy

```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
```
3 changes: 3 additions & 0 deletions cli/src/cmd/forge/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ impl Cmd for InitArgs {
// write the script
let contract_path = script.join("Counter.s.sol");
fs::write(contract_path, include_str!("../../../assets/CounterTemplate.s.sol"))?;
// Write the default README file
let readme_path = root.join("README.md");
fs::write(readme_path, include_str!("../../../assets/README.md"))?;

// write foundry.toml, if it doesn't exist already
let dest = root.join(Config::FILE_NAME);
Expand Down

0 comments on commit 41a6593

Please sign in to comment.