diff --git a/.changeset/funny-donuts-follow.md b/.changeset/funny-donuts-follow.md new file mode 100644 index 00000000000..01c19a901db --- /dev/null +++ b/.changeset/funny-donuts-follow.md @@ -0,0 +1,5 @@ +--- +'openzeppelin-solidity': minor +--- + +`IERC7751`: Add the interface for custom error wrapping of bubbled up reverts. diff --git a/contracts/interfaces/IERC7751.sol b/contracts/interfaces/IERC7751.sol new file mode 100644 index 00000000000..dc0462a8b1d --- /dev/null +++ b/contracts/interfaces/IERC7751.sol @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.8.4; + +/** + * @dev Wrapping of bubbled up reverts + * Interface of the https://eips.ethereum.org/EIPS/eip-7751[ERC-7751] wrapping of bubbled up reverts. + */ +interface IERC7751 { + error WrappedError(address target, bytes4 selector, bytes reason, bytes details); +} diff --git a/contracts/interfaces/README.adoc b/contracts/interfaces/README.adoc index 760c3c2d245..42b10f89aa9 100644 --- a/contracts/interfaces/README.adoc +++ b/contracts/interfaces/README.adoc @@ -45,6 +45,7 @@ are useful to interact with third party contracts that implement them. - {IERC6909Metadata} - {IERC6909TokenSupply} - {IERC7674} +- {IERC7751} - {IERC7786} - {IERC7802} @@ -100,6 +101,8 @@ are useful to interact with third party contracts that implement them. {{IERC7674}} +{{IERC7751}} + {{IERC7786}} {{IERC7802}}