hardhat VS openzeppelin-contracts

Compare hardhat vs openzeppelin-contracts and see what are their differences.

hardhat

Hardhat is a development environment to compile, deploy, test, and debug your Ethereum software. (by NomicFoundation)

openzeppelin-contracts

OpenZeppelin Contracts is a library for secure smart contract development. (by OpenZeppelin)
Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
hardhat openzeppelin-contracts
125 233
6,665 23,900
2.4% 1.3%
9.9 9.5
7 days ago about 16 hours ago
TypeScript JavaScript
GNU General Public License v3.0 or later MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

hardhat

Posts with mentions or reviews of hardhat. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-09-07.

openzeppelin-contracts

Posts with mentions or reviews of openzeppelin-contracts. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-10-27.
  • Blockchain transactions decoding: making wallet activity understandable
    5 projects | dev.to | 27 Oct 2023
    Lets look the events of Open Zeppelin’s ERC20 token contract:
  • I get an "ambiguous primary types or unused types" error when trying to mint an NFT requiring 2 signatures via EIP712
    3 projects | /r/solidity | 24 May 2023
    I modified my code to use EIP712 to require an authorized wallet to also sign in order for an NFT to be minted. I based this off of this: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/7e814a3074baa921db584c180ff6e300cdec8735/contracts/token/ERC20/extensions/ERC20Permit.sol. This is an example of someone calling a smart contract containing this ERC20Permit.sol code https://github.com/Uniswap/v3-periphery/blob/main/test/shared/permit.ts. This particular ERC20Permit.sol code is designed to allow an account to approve ERC20 spend limits without spending gas fees but the same underlying mechanisms could be applied to my use case.
  • Solidity digest / mar 2023
    4 projects | /r/solidity | 8 Apr 2023
    v4.8.2 of OpenZeppelin contracts and contracts-upgradeable bug fix for ERC721Consecutive that could cause a balance overflow when _mintConsecutive was used for batches of size 1 breaking changes to ERC721: the internal function _beforeTokenTransfer will no longer update balances when batchSize is greater than 1
  • The 4 Best dApp Frameworks for First-Time Ethereum Developers
    4 projects | dev.to | 25 Mar 2023
    Widely used open source framework with an active GitHub community and documentation
  • What is the current best practice for badges / soulbound / nontransferrable tokens?
    3 projects | /r/ethdev | 5 Feb 2023
    In the next step of my journey, I went to Github to see what other people were building. I didn't fine much. My heros [OpenZeppelin](https://github.com/OpenZeppelin/openzeppelin-contracts/tree/master/contracts/interfaces) don't seem to have any examples in their repository. Github's search yielded no results. Some Google searches finally did land me on two repositories. One is [an implementation of ERC-5114](https://github.com/TeamSHARKZ/soulbound) - horray!. The other one one of those traditional [awesome lists](https://github.com/attestate/awesome-soulbound-tokens). Great resource and introduced me to a standard I previously missed, [ERC-4973](https://eips.ethereum.org/EIPS/eip-4973). Of course, having completely missed a token reinforced how easy it is to miss something obvious along the way and encourages me to reach out and ask the community for more information.
  • Fork mainnet using hardhat to test and build on DeFi protocols and more
    3 projects | dev.to | 23 Jan 2023
    Now create a folder named IERC20.sol inside your contracts folder and paste the following code into it. This is the ERC20 interface we will need to interact with the USDC contract. You can also find this code here
  • Generating Decentralized identifier using ERC725 and ERC735
    2 projects | /r/solidity | 20 Jan 2023
    You're trying to import a markdown (text) file that describes the ERC721 spec, not an actual ERC721 compliant smart contract. I believe what you're trying to import is https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/ERC721.sol
  • Question about implementing a UUPS proxy
    2 projects | /r/solidity | 10 Jan 2023
    Look at TransparentUpgradeableProxy.sol, but the actual delegation happens in one of the contracts it inherits: Proxy.sol.
  • A look into formal verification of smart contracts using Certora
    5 projects | dev.to | 2 Dec 2022
    Let's grab some examples from OpenZeppelin's TimelockController spec. In a Timelock, operations can have different states. We can write a rule that checks, for instance, that calling execute is the only way for moving an operation from ready to done state.
  • Create & deploy an ERC-20 token in 15 minutes (Truffle, OpenZeppelin, Goerli)
    5 projects | dev.to | 2 Nov 2022
    The import line is importing the contents of this file which is available within our node_modules from installing OpenZeppelin earlier.

What are some alternatives?

When comparing hardhat and openzeppelin-contracts you can also consider the following projects:

truffle - :warning: The Truffle Suite is being sunset. For information on ongoing support, migration options and FAQs, visit the Consensys blog. Thank you for all the support over the years.

foundry - Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.

ganache - :warning: The Truffle Suite is being sunset. For information on ongoing support, migration options and FAQs, visit the Consensys blog. Thank you for all the support over the years.

solmate - Modern, opinionated, and gas optimized building blocks for smart contract development.

remix-ide - Documentation for Remix IDE

ethers.js - Complete Ethereum library and wallet implementation in JavaScript.

complete-guide-to-full-stack-solana-development - Code examples for the blog post titled The Complete Guide to Full Stack Solana Development with React, Anchor, Rust, and Phantom

scaffold-eth - 🏗 forkable Ethereum dev stack focused on fast product iterations

useDApp - Framework for rapid Dapp development. Simple. Robust. Extendable. Testable

ERC721A - https://ERC721A.org

brownie - A Python-based development and testing framework for smart contracts targeting the Ethereum Virtual Machine.

graph-node - Graph Node indexes data from blockchains such as Ethereum and serves it over GraphQL