Browse Source

Add ERC-7751 interface (#5816)

Hadrien Croubois 1 month ago
parent
commit
efdc7cd2d4

+ 5 - 0
.changeset/funny-donuts-follow.md

@@ -0,0 +1,5 @@
+---
+'openzeppelin-solidity': minor
+---
+
+`IERC7751`: Add the interface for custom error wrapping of bubbled up reverts.

+ 11 - 0
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);
+}

+ 3 - 0
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}}