Navigate:
OpenZeppelin Contracts
~$OPCO0.0%

OpenZeppelin Contracts: Secure smart contract library

A library of audited Solidity components for secure smart contract development on Ethereum and EVM-compatible chains.

LIVE RANKINGS • 12:18 PM • STEADY
OVERALL
#424
31
CRYPTO
#32
22
30 DAY RANKING TREND
ovr#424
·Crypt#32
STARS
27.0K
FORKS
12.4K
7D STARS
-3
7D FORKS
-17
Tags:
See Repo:
Share:

Learn more about OpenZeppelin Contracts

OpenZeppelin Contracts is a library of reusable Solidity smart contract components designed for secure blockchain development. The library provides implementations of standard token contracts (ERC20, ERC721, ERC1155), access control mechanisms, and utility functions that developers can inherit and extend. All contracts undergo rigorous security audits and follow semantic versioning to ensure backwards compatibility and safe upgrades. The library is commonly used as a foundation for building decentralized applications, token systems, and complex blockchain protocols.

OpenZeppelin Contracts

1

Audited Security

All stable releases undergo comprehensive security audits and are covered by a bug bounty program. The library follows rigorous security practices and maintains a detailed security policy.

2

Standard Implementations

Provides battle-tested implementations of Ethereum standards including ERC20, ERC721, ERC1155, and ERC6909 tokens. Includes flexible role-based access control and permission systems.

3

Upgrade Safety

Uses semantic versioning to communicate API and storage layout compatibility. Provides clear guidance on safe upgrade paths for upgradeable contract systems.


pragma solidity ^0.8.20;

import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";

contract MyCollectible is ERC721 {
    uint256 private _tokenIdCounter;
    
    constructor() ERC721("MyCollectible", "MCO") {
        _tokenIdCounter = 0;
    }
    
    function mint(address to) public {
        uint256 tokenId = _tokenIdCounter;
        _tokenIdCounter++;
        _mint(to, tokenId);
    }
    
    function totalSupply() public view returns (uint256) {
        return _tokenIdCounter;
    }
}


vv5.6.0-rc.1

Adds ERC-165 detection for IERC6909ContentURI, IERC6909TokenSupply and IERC6909Metadata interfaces.

  • Add ERC-165 detection for the IERC6909ContentURI, IERC6909TokenSupply and IERC6909Metadata interfaces in the ERC6909ContentURI, ERC6909TokenSupply and ERC6909Metadata contracts respectively
vv5.6.0-rc.0

Prevents setting operators for address(0) in ERC721 and ERC1155, updates ERC-4337 entrypoint to v0.9, and improves batch transfer handling.

  • ERC721 and ERC1155: Prevent setting an operator for address(0). In the case of ERC721 this type of operator allowance could lead to obfuscated mint permission
  • Account: Update default version of the ERC-4337 entrypoint to v0.9
  • AccountERC7579: Do not revert and perform the uninstall if the onUninstall hook of a module reverts
  • ERC1155: Introduce the _checkAuthorized internal virtual function to encapsulate isApprovedForAll and msg.sender == from checks
  • ERC1155: Call IERC1155Receiver.onERC1155BatchReceived when performing a batch transfers with exactly one id/value in the batch
vv5.5.0

Fixes ERC165Checker revert handling, renames SignerERC7702 to SignerEIP7702, and adds InteroperableAddress library for ERC-7930 support.

  • ERC165Checker: Ensure the supportsERC165 function returns false if the target reverts during the supportsInterface(0xffffffff) call
  • SignerERC7702 is renamed as SignerEIP7702. Imports and inheritance must be updated to that new name and path. Behavior is unmodified
  • ECDSA signature malleability protection is partly deprecated. See documentation for more details
  • ERC4626: compute maxWithdraw using maxRedeem and previewRedeem so that changes to the preview functions affect the max functions
  • InteroperableAddress: Add a library for formatting and parsing ERC-7930 interoperable addresses


[ EXPLORE MORE ]

Related Repositories

Discover similar tools and frameworks used by developers