-
Notifications
You must be signed in to change notification settings - Fork 40
Expose additional interface id in wrapper #267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
a4e986f
Expose additional interface id in wrapper
arr00 3a9ed72
Merge remote-tracking branch 'origin/master' into feat/wrapper-165-id
james-toussaint 590910f
Support `IERC7984ERC20Wrapper` interface
james-toussaint 2cf214c
Inherit ERC7984ERC20Wrapper doc from interface
james-toussaint 2960f5b
Update doc
james-toussaint d6a6544
Add changeset
james-toussaint df9c340
minimalize wrapper
arr00 328272c
fix interface check
arr00 54520c8
remove finalize unwrap from interface
arr00 22f945c
Add `IERC1363Receiver` back to `ERC7984ERC20Wrapper`
arr00 d59b224
add 165 test for 1363 receiver interface
arr00 b28e18d
review feedback
arr00 201a957
Test ERC-165 interface against stable (hardcoded) list of functions
Amxx fef60d0
Add euint variant of `unwrap` in the wrapper interface
Amxx fe4bd93
remove `euint64` version
arr00 b23bdb2
Merge branch 'master' into feat/wrapper-165-id
arr00 349565d
remove extra override
arr00 0c72a64
Merge branch 'master' into feat/wrapper-165-id
arr00 3e05c3d
add return to interface
arr00 62b9744
update lock file
arr00 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| 'openzeppelin-confidential-contracts': minor | ||
| --- | ||
|
|
||
| `ERC7984ERC20Wrapper`: Support ERC-165 interface detection on `ERC7984ERC20Wrapper`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| // SPDX-License-Identifier: MIT | ||
|
|
||
| pragma solidity ^0.8.24; | ||
|
|
||
| import {externalEuint64, euint64} from "@fhevm/solidity/lib/FHE.sol"; | ||
| import {IERC7984} from "./IERC7984.sol"; | ||
|
|
||
| /// @dev Interface for ERC7984ERC20Wrapper contract. | ||
| interface IERC7984ERC20Wrapper is IERC7984 { | ||
| /// @dev Wraps `amount` of the underlying token into a confidential token and sends it to `to`. | ||
| function wrap(address to, uint256 amount) external; | ||
|
|
||
| /** | ||
| * @dev Unwraps tokens from `from` and sends the underlying tokens to `to`. The caller must be `from` | ||
| * or be an approved operator for `from`. | ||
| * | ||
| * Returns amount unwrapped. | ||
| * | ||
| * NOTE: The caller *must* already be approved by ACL for the given `amount`. | ||
| */ | ||
| function unwrap( | ||
| address from, | ||
| address to, | ||
| externalEuint64 encryptedAmount, | ||
| bytes calldata inputProof | ||
| ) external returns (euint64); | ||
|
|
||
| /// @dev Returns the address of the underlying ERC-20 token that is being wrapped. | ||
| function underlying() external view returns (address); | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.