Add Foundry installation instructions with required warnings (#4389)

This commit is contained in:
Francisco
2023-06-26 11:36:46 -03:00
committed by GitHub
parent 8cab922347
commit f29307cfe0
2 changed files with 29 additions and 14 deletions

View File

@ -23,13 +23,23 @@
### Installation
#### Hardhat, Truffle (npm)
```
$ npm install @openzeppelin/contracts
```
OpenZeppelin Contracts features a [stable API](https://docs.openzeppelin.com/contracts/releases-stability#api-stability), which means that your contracts won't break unexpectedly when upgrading to a newer minor version.
An alternative to npm is to use the GitHub repository (`openzeppelin/openzeppelin-contracts`) to retrieve the contracts. When doing this, make sure to specify the tag for a release such as `v4.5.0`, instead of using the `master` branch.
#### Foundry (git)
> **Warning** When installing via git, it is a common error to use the `master` branch. This is a development branch that should be avoided in favor of tagged releases. The release process involves security measures that the `master` branch does not guarantee.
> **Warning** Foundry installs the latest version initially, but subsequent `forge update` commands will use the `master` branch.
```
$ forge install OpenZeppelin/openzeppelin-contracts
```
### Usage