Skip to content

Commit

Permalink
wip: test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexghr committed Oct 2, 2023
1 parent fd2f7c0 commit bce2090
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions l1-contracts/test/portals/UniswapPortal.sol
Original file line number Diff line number Diff line change
Expand Up @@ -164,33 +164,33 @@ contract UniswapPortal {

// Withdraw the input asset from the portal
TokenPortal(_inputTokenPortal).withdraw(_inAmount, address(this), true);
{
// prevent stack too deep errors
vars.contentHash = Hash.sha256ToField(
abi.encodeWithSignature(
"swap_private(address,uint256,uint24,address,uint256,bytes32,bytes32,uint32,address,address)",
_inputTokenPortal,
_inAmount,
_uniswapFeeTier,
_outputTokenPortal,
_amountOutMinimum,
_secretHashForRedeemingMintedNotes,
_secretHashForL1ToL2Message,
_deadlineForL1ToL2Message,
_canceller,
_withCaller ? msg.sender : address(0)
)
);
}
// {
// // prevent stack too deep errors
// vars.contentHash = Hash.sha256ToField(
// abi.encodeWithSignature(
// "swap_private(address,uint256,uint24,address,uint256,bytes32,bytes32,uint32,address,address)",
// _inputTokenPortal,
// _inAmount,
// _uniswapFeeTier,
// _outputTokenPortal,
// _amountOutMinimum,
// _secretHashForRedeemingMintedNotes,
// _secretHashForL1ToL2Message,
// _deadlineForL1ToL2Message,
// _canceller,
// _withCaller ? msg.sender : address(0)
// )
// );
// }

// Consume the message from the outbox
registry.getOutbox().consume(
DataStructures.L2ToL1Msg({
sender: DataStructures.L2Actor(l2UniswapAddress, 1),
recipient: DataStructures.L1Actor(address(this), block.chainid),
content: vars.contentHash
})
);
// registry.getOutbox().consume(
// DataStructures.L2ToL1Msg({
// sender: DataStructures.L2Actor(l2UniswapAddress, 1),
// recipient: DataStructures.L1Actor(address(this), block.chainid),
// content: vars.contentHash
// })
// );

// Perform the swap
ISwapRouter.ExactInputSingleParams memory swapParams;
Expand Down

0 comments on commit bce2090

Please sign in to comment.