Skip to content

WiseMrMusa/Foundry-Hardhat-Diamonds

 
 

Repository files navigation

Mentioned in Awesome Foundry

Foundry + Hardhat Diamonds

This is a mimimal template for Diamonds which allows facet selectors to be generated on the go in solidity tests!

Installation

  • Clone this repo
  • Install dependencies
$ yarn && forge update

Compile

$ npx hardhat compile

Deployment

Hardhat

$ npx hardhat run scripts/deploy.js

Foundry

$ forge t

Note: A lot of improvements are still needed so contributions are welcome!!

Bonus: The DiamondLoupefacet uses an updated LibDiamond 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, Or join the EIP-2535 Diamonds Discord server

Verify

This addition to the template allows you to verify your contracts on deployment. An example .env: .env.example and hardhat config example.hardhat.config.js has been provided To verify, you need to include your etherscan API included.

Enjoy

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 80.0%
  • JavaScript 20.0%