Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Timidan/Foundry-Hardhat-Diamonds
https://github.com/Timidan/Foundry-Hardhat-Diamonds
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/Timidan/Foundry-Hardhat-Diamonds
- Owner: Timidan
- Created: 2022-06-08T21:40:20.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-10-09T19:26:25.000Z (over 1 year ago)
- Last Synced: 2024-08-04T01:02:27.762Z (6 months ago)
- Language: Solidity
- Size: 16.6 KB
- Stars: 67
- Watchers: 2
- Forks: 27
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-foundry - Foundry-Hardhat-Diamonds - Sleek EIP2535 Diamond deployments on the go with foundry (Templates & Libraries)
README
[![Mentioned in Awesome Foundry](https://awesome.re/mentioned-badge-flat.svg)](https://github.com/crisgarner/awesome-foundry)
# Foundry + Hardhat DiamondsThis is a mimimal template for [Diamonds](https://github.com/ethereum/EIPs/issues/2535) which allows facet selectors to be generated on the go in solidity tests!
## Installation
- Clone this repo
- Install dependencies```bash
$ yarn && forge update
```### Compile
```bash
$ npx hardhat compile
```## Deployment
### Hardhat
```bash
$ npx hardhat run scripts/deploy.js
```### Foundry
```bash
$ forge t
````Note`: A lot of improvements are still needed so contributions are welcome!!
Bonus: The [DiamondLoupefacet](contracts/facets/DiamondLoupeFacet.sol) uses an updated [LibDiamond](contracts/libraries//LibDiamond.sol) which utilises solidity custom errors to make debugging easier especially when upgrading diamonds. Take it for a spin!!
Need some more clarity? message me [on twitter](https://twitter.com/Timidan_x), Or join the [EIP-2535 Diamonds Discord server](https://discord.gg/kQewPw2)