Skip to content

Commit

Permalink
Merge pull request #25 from Ramarti/erc7201-explainer
Browse files Browse the repository at this point in the history
Added ERC7201 explainer to README
  • Loading branch information
Ramarti authored Mar 27, 2024
2 parents e6ad5af + 6d3fb96 commit 5ae90f6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,17 @@ forge compile
npx @openzeppelin/upgrades-core@^1.32.3 validate out/build-info
```

## Helper script to write an upgradeable contract with ERC7201

1. Edit `script/foundry/utils/upgrades/ERC7201Helper.s.sol`
2. Change `string constant CONTRACT_NAME = "<the contract name>";`
3. Run the script to generate boilerplate code for storage handling and the namespace hash:

```sh
forge script script/foundry/utils/upgrades/ERC7201Helper.s.sol
```
4. The log output is the boilerplate code, copy and paste in your contract

## Testing

```
Expand Down

0 comments on commit 5ae90f6

Please sign in to comment.