style: run Prettier over Markdown files
This commit is contained in:
parent
34b65a2622
commit
124aa29492
25
LICENSE.md
25
LICENSE.md
|
@ -2,20 +2,15 @@ MIT License
|
||||||
|
|
||||||
Copyright (c) 2022 Paul Razvan Berg
|
Copyright (c) 2022 Paul Razvan Berg
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
||||||
in the Software without restriction, including without limitation the rights
|
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
|
||||||
copies or substantial portions of the Software.
|
Software.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
42
README.md
42
README.md
|
@ -13,7 +13,8 @@ A Foundry-based template for developing Solidity smart contracts, with sensible
|
||||||
|
|
||||||
## What's Inside
|
## What's Inside
|
||||||
|
|
||||||
- [Forge](https://github.com/foundry-rs/foundry/blob/master/forge): compile, test, fuzz, debug and deploy smart contracts
|
- [Forge](https://github.com/foundry-rs/foundry/blob/master/forge): compile, test, fuzz, debug and deploy smart
|
||||||
|
contracts
|
||||||
- [PRBTest](https://github.com/paulrberg/prb-test): modern collection of testing assertions and logging utilities
|
- [PRBTest](https://github.com/paulrberg/prb-test): modern collection of testing assertions and logging utilities
|
||||||
- [Forge Std](https://github.com/foundry-rs/forge-std): collection of helpful contracts and cheatcodes for testing
|
- [Forge Std](https://github.com/foundry-rs/forge-std): collection of helpful contracts and cheatcodes for testing
|
||||||
- [Solhint](https://github.com/protofire/solhint): code linter
|
- [Solhint](https://github.com/protofire/solhint): code linter
|
||||||
|
@ -21,7 +22,8 @@ A Foundry-based template for developing Solidity smart contracts, with sensible
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
Click the [`Use this template`](https://github.com/paulrberg/foundry-template/generate) button at the top of the page to create a new repository with this repo as the initial state.
|
Click the [`Use this template`](https://github.com/paulrberg/foundry-template/generate) button at the top of the page to
|
||||||
|
create a new repository with this repo as the initial state.
|
||||||
|
|
||||||
Or, if you prefer to install the template manually:
|
Or, if you prefer to install the template manually:
|
||||||
|
|
||||||
|
@ -31,13 +33,16 @@ cd my-project
|
||||||
yarn install # install solhint and prettier and other goodies
|
yarn install # install solhint and prettier and other goodies
|
||||||
```
|
```
|
||||||
|
|
||||||
If this is your first time with Foundry, check out the [installation](https://github.com/foundry-rs/foundry#installation) instructions.
|
If this is your first time with Foundry, check out the
|
||||||
|
[installation](https://github.com/foundry-rs/foundry#installation) instructions.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
This template builds upon the frameworks and libraries mentioned above, so for details about their specific features, please consult their respective documentations.
|
This template builds upon the frameworks and libraries mentioned above, so for details about their specific features,
|
||||||
|
please consult their respective documentations.
|
||||||
|
|
||||||
For example, for Foundry, you can refer to the [Foundry Book](https://book.getfoundry.sh/). You might be in particular interested in reading the [Writing Tests](https://book.getfoundry.sh/forge/writing-tests.html) guide.
|
For example, for Foundry, you can refer to the [Foundry Book](https://book.getfoundry.sh/). You might be in particular
|
||||||
|
interested in reading the [Writing Tests](https://book.getfoundry.sh/forge/writing-tests.html) guide.
|
||||||
|
|
||||||
### Sensible Defaults
|
### Sensible Defaults
|
||||||
|
|
||||||
|
@ -65,18 +70,23 @@ You can edit the CI script in [.github/workflows/ci.yml](./.github/workflows/ci.
|
||||||
|
|
||||||
### Conventional Commits
|
### Conventional Commits
|
||||||
|
|
||||||
This template enforces the [Conventional Commits](https://www.conventionalcommits.org/) standard for git commit messages.
|
This template enforces the [Conventional Commits](https://www.conventionalcommits.org/) standard for git commit
|
||||||
This is a lightweight convention that creates an explicit commit history, which makes it easier to write automated
|
messages. This is a lightweight convention that creates an explicit commit history, which makes it easier to write
|
||||||
tools on top of.
|
automated tools on top of.
|
||||||
|
|
||||||
### Git Hooks
|
### Git Hooks
|
||||||
|
|
||||||
This template uses [Husky](https://github.com/typicode/husky) to run automated checks on commit messages, and [Lint Staged](https://github.com/okonet/lint-staged) to automatically format the code with Prettier when making a git commit.
|
This template uses [Husky](https://github.com/typicode/husky) to run automated checks on commit messages, and
|
||||||
|
[Lint Staged](https://github.com/okonet/lint-staged) to automatically format the code with Prettier when making a git
|
||||||
|
commit.
|
||||||
|
|
||||||
## Writing Tests
|
## Writing Tests
|
||||||
|
|
||||||
To write a new test contract, you start by importing [PRBTest](https://github.com/paulrberg/prb-test) and inherit from it in your test contract. PRBTest comes with a
|
To write a new test contract, you start by importing [PRBTest](https://github.com/paulrberg/prb-test) and inherit from
|
||||||
pre-instantiated [cheatcodes](https://book.getfoundry.sh/cheatcodes/) environment accessible via the `vm` property. You can also use [console.log](https://book.getfoundry.sh/faq?highlight=console.log#how-do-i-use-consolelog), whose logs you can see in the terminal output by adding the `-vvvv` flag.
|
it in your test contract. PRBTest comes with a pre-instantiated [cheatcodes](https://book.getfoundry.sh/cheatcodes/)
|
||||||
|
environment accessible via the `vm` property. You can also use
|
||||||
|
[console.log](https://book.getfoundry.sh/faq?highlight=console.log#how-do-i-use-consolelog), whose logs you can see in
|
||||||
|
the terminal output by adding the `-vvvv` flag.
|
||||||
|
|
||||||
This template comes with an example test contract [Foo.t.sol](./test/Foo.t.sol).
|
This template comes with an example test contract [Foo.t.sol](./test/Foo.t.sol).
|
||||||
|
|
||||||
|
@ -117,7 +127,8 @@ $ forge script script/Foo.s.sol:FooScript --fork-url http://localhost:8545 \
|
||||||
--broadcast --private-key $PRIVATE_KEY
|
--broadcast --private-key $PRIVATE_KEY
|
||||||
```
|
```
|
||||||
|
|
||||||
For instructions on how to deploy to a testnet or mainnet, check out the [Solidity Scripting tutorial](https://book.getfoundry.sh/tutorials/solidity-scripting.html).
|
For instructions on how to deploy to a testnet or mainnet, check out the
|
||||||
|
[Solidity Scripting tutorial](https://book.getfoundry.sh/tutorials/solidity-scripting.html).
|
||||||
|
|
||||||
### Format
|
### Format
|
||||||
|
|
||||||
|
@ -153,8 +164,11 @@ $ forge test
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
|
|
||||||
1. Foundry piggybacks off [git submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules) to manage dependencies. There's a [guide](https://book.getfoundry.sh/projects/dependencies.html) about how to work with dependencies in the book.
|
1. Foundry piggybacks off [git submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules) to manage dependencies.
|
||||||
2. You don't have to create a `.env` file, but filling in the environment variables may be useful when debugging and testing against a mainnet fork.
|
There's a [guide](https://book.getfoundry.sh/projects/dependencies.html) about how to work with dependencies in the
|
||||||
|
book.
|
||||||
|
2. You don't have to create a `.env` file, but filling in the environment variables may be useful when debugging and
|
||||||
|
testing against a mainnet fork.
|
||||||
|
|
||||||
## Related Efforts
|
## Related Efforts
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue