The OpenZeppelin team is thrilled to release Contracts 5.2, a version that includes a set of changes driven by our initiative to provide Cross-chain capabilities and an Account Abstraction framework. This release features utilities for ERC-4337 contracts, ERC-7579 account modules, and CAIP identifiers for runtime-agnostic identification.
This release runs parallel to more experimental development hosted in the community-owned OpenZeppelin Community Contracts library. Thils more experimental version aims for quicker iteration on the initiatives described above.
These new versions set the stage for a development playground where developers can build accounts and send cross-chain messages powered by Axelar Network and secured by the gold-standard library for smart contract development.
What’s New
Solidity Contracts
https://github.com/OpenZeppelin/openzeppelin-contracts/releases/tag/v5.2.0
Community Contracts
https://github.com/OpenZeppelin/openzeppelin-community-contracts
Community Contracts
Multiple efforts have emerged to coordinate better compatibility through Ethereum Request for Comments (ERC) proposals. In parallel, we have identified the need for a more experimental version of our contracts library with relaxed backward compatibility restrictions to foster quicker iteration on these emergent ERCs.
Aiming to build a project that is co-owned with the community, the team has been involved in efforts around the following 2 objectives:
Derived from this release’s initiatives, OpenZeppelin has provided and taken feedback from builders and researchers building on standards like:
Implementations of these standards are available in OpenZeppelin Community Contracts.
Cross-chain Interoperability powered by Axelar Network
Recently, OpenZeppelin and Axelar announced joint efforts to develop open-source implementations and standards to solve cross-chain interoperability challenges. Accordingly, we published ERC-7786 in collaboration with Axelar and Interop Labs, aiming to provide the best developer experience to approach general message passing for smart contract applications.
The ERC-7786 defines a proposal that allows users to leverage bridge-specific features with custom attributes while providing universal access to the feature of “just getting a message through.”
This standard is implemented on top of the Axelar Network in a co-owned effort with Interop Labs to design and implement protocol adapters that developers can use to send and receive messages on their smart contract applications.
Developers may call the sendMessage function from AxelarGatewaySource included in AxelarGatewayDuplex.
To enable the reception of a message, a smart contract can inherit from ERC7786Receiver, also included within the library:
An expressive framework to build ERC-4337 Accounts
ERC-4337 has emerged as the preferred approach for achieving Account Abstraction. This proposal provides an alternative mempool that processes user operations through an entrypoint contract and it has captured considerable interest from popular account implementations and infrastructure providers.
In the past, most teams behind these implementations had either coordinated to produce standards to support self-contained account functionality through modules or implemented their Solidity versions to accommodate their own infrastructure needs, resulting in a wide variety of alternative designs to build smart accounts.
Considering this scenario, OpenZeppelin Community Contracts has released a framework to build ERC-4337 compatible accounts with a thoroughly documented API that developers can leverage to speed up the development of new account designs.
This framework currently includes basic account logic to process user operations, minimal batch execution logic, replayability protection accounts with the same owner, and more.
Developers can customize their validation logic with signature algorithms provided by the same library through our ECDSA, P256, and RSA signers, which allow creating accounts for commonly-used schemes:
Override Delegate Votes
On-chain governance delegation has existed for years and gained significant popularity, but users are often dissatisfied with being bound to a delegate after a vote starts. There are times when delegates go inactive for a critical vote or delegatees disagree with their delegate on a contentious vote. To address these issues, we are releasing a pair of governance extensions: GovernorCountingOverridable and VotesExtended, which together enable delegatees to override the votes of their delegates.
GovernorCountingOverridable is a new counting extension for the OpenZeppelin Governor, that exposes new functions for delegatees to call and override their delegate votes–the delegate's voting weight is reduced as necessary, and the tally is updated. However, this functionality will not work for existing Governance systems, as their IVotes contract must inherit VotesExtended.
To use the override delegate votes features, simply inherit GovernorCountingOverridable in your Governance contract and inherit VotesExtended in your Votes contract.
New ERC-4337, ERC-7579, ERC-7786 and CAIP utilities
To meet the requirements for building further ERC-4337 smart contracts in the community-owned repository, the main OpenZeppelin Contracts library includes libraries with utilities for developers building accounts and ERC-7579 modules.
These utilities are designed for developers to easily handle types and operate with types related to these standards.
What’s Next
The OpenZeppelin Contracts team will keep building with the community to develop the most secure Solidity open-source implementations.
The team will work on more enhancements to the OpenZeppelin Community Repository in the following months while the implemented ERCs continue receiving feedback.
Our future roadmap includes: