-
Notifications
You must be signed in to change notification settings - Fork 191
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
feat: uniswap private flow #2559
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ef4c4b8
uniswap private flow
rahul-kothari 52ab5ed
potentially fix sandbox timeout
rahul-kothari c4ac8e5
change param ordering in portal, split uniswap portal fns
rahul-kothari 9295527
PR comments
rahul-kothari a153ee7
fix nit on mint amount on archiver test
rahul-kothari 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 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 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 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 |
---|---|---|
|
@@ -25,19 +25,19 @@ contract TokenPortal { | |
// docs:start:deposit_public | ||
/** | ||
* @notice Deposit funds into the portal and adds an L2 message which can only be consumed publicly on Aztec | ||
* @param _to - The aztec address of the recipient | ||
* @param _amount - The amount to deposit | ||
* @param _to - The aztec address of the recipient | ||
* @param _canceller - The address that can cancel the L1 to L2 message | ||
* @param _deadline - The timestamp after which the entry can be cancelled | ||
* @param _secretHash - The hash of the secret consumable message. The hash should be 254 bits (so it can fit in a Field element) | ||
* @param _canceller - The address that can cancel the L1 to L2 message | ||
* @return The key of the entry in the Inbox | ||
*/ | ||
function depositToAztecPublic( | ||
bytes32 _to, | ||
uint256 _amount, | ||
bytes32 _to, | ||
address _canceller, | ||
uint32 _deadline, | ||
bytes32 _secretHash, | ||
address _canceller | ||
bytes32 _secretHash | ||
) external payable returns (bytes32) { | ||
// Preamble | ||
IInbox inbox = registry.getInbox(); | ||
|
@@ -59,18 +59,18 @@ contract TokenPortal { | |
/** | ||
* @notice Deposit funds into the portal and adds an L2 message which can only be consumed privately on Aztec | ||
* @param _amount - The amount to deposit | ||
* @param _secretHashForRedeemingMintedNotes - The hash of the secret to redeem minted notes privately on Aztec. The hash should be 254 bits (so it can fit in a Field element) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It pains me a little that the ordering of arguments for the function is different than to the inner calls. The |
||
* @param _canceller - The address that can cancel the L1 to L2 message | ||
* @param _deadline - The timestamp after which the entry can be cancelled | ||
* @param _secretHashForL2MessageConsumption - The hash of the secret consumable L1 to L2 message. The hash should be 254 bits (so it can fit in a Field element) | ||
* @param _secretHashForL2MessageConsumption - The hash of the secret to redeem minted notes privately on Aztec. The hash should be 254 bits (so it can fit in a Field element) | ||
* @param _canceller - The address that can cancel the L1 to L2 message | ||
* @return The key of the entry in the Inbox | ||
*/ | ||
function depositToAztecPrivate( | ||
uint256 _amount, | ||
uint32 _deadline, | ||
bytes32 _secretHashForL2MessageConsumption, | ||
bytes32 _secretHashForRedeemingMintedNotes, | ||
address _canceller | ||
address _canceller, | ||
uint32 _deadline, | ||
bytes32 _secretHashForL2MessageConsumption | ||
) external payable returns (bytes32) { | ||
// Preamble | ||
IInbox inbox = registry.getInbox(); | ||
|
@@ -99,16 +99,16 @@ contract TokenPortal { | |
/** | ||
* @notice Cancel a public depositToAztec L1 to L2 message | ||
* @dev only callable by the `canceller` of the message | ||
* @param _to - The aztec address of the recipient in the original message | ||
* @param _amount - The amount to deposit per the original message | ||
* @param _to - The aztec address of the recipient in the original message | ||
* @param _deadline - The timestamp after which the entry can be cancelled | ||
* @param _secretHash - The hash of the secret consumable message in the original message | ||
* @param _fee - The fee paid to the sequencer | ||
* @return The key of the entry in the Inbox | ||
*/ | ||
function cancelL1ToAztecMessagePublic( | ||
bytes32 _to, | ||
uint256 _amount, | ||
bytes32 _to, | ||
uint32 _deadline, | ||
bytes32 _secretHash, | ||
uint64 _fee | ||
|
@@ -137,17 +137,17 @@ contract TokenPortal { | |
* @notice Cancel a private depositToAztec L1 to L2 message | ||
* @dev only callable by the `canceller` of the message | ||
* @param _amount - The amount to deposit per the original message | ||
* @param _secretHashForRedeemingMintedNotes - The hash of the secret to redeem minted notes privately on Aztec | ||
* @param _deadline - The timestamp after which the entry can be cancelled | ||
* @param _secretHashForL2MessageConsumption - The hash of the secret consumable L1 to L2 message | ||
* @param _secretHashForL2MessageConsumption - The hash of the secret to redeem minted notes privately on Aztec | ||
* @param _fee - The fee paid to the sequencer | ||
* @return The key of the entry in the Inbox | ||
*/ | ||
function cancelL1ToAztecMessagePrivate( | ||
uint256 _amount, | ||
bytes32 _secretHashForRedeemingMintedNotes, | ||
uint32 _deadline, | ||
bytes32 _secretHashForL2MessageConsumption, | ||
bytes32 _secretHashForRedeemingMintedNotes, | ||
uint64 _fee | ||
) external returns (bytes32) { | ||
IInbox inbox = registry.getInbox(); | ||
|
This file contains 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.