Skip to content

Commit a3130f9

Browse files
committed
rm deadline check
1 parent 719957b commit a3130f9

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/Passage.sol

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,11 @@ contract HostPassage {
3333
/// Corresponds to recipient_H in the RollupPassage contract.
3434
/// @param amount - The amount of the token to be transferred to the recipient.
3535
/// Corresponds to one or more amountOutMinimum_H in the RollupPassage contract.
36-
/// @param deadline - The deadline by which the exit order must be fulfilled.
37-
/// Corresponds to deadline in the RollupPassage contract.
38-
/// If the ExitOrder is a combination of multiple orders, the deadline SHOULD be the latest of all orders.
3936
struct ExitOrder {
4037
uint256 rollupChainId;
4138
address token;
4239
address recipient;
4340
uint256 amount;
44-
uint256 deadline;
4541
}
4642

4743
constructor(uint256 _defaultRollupChainId) {
@@ -82,6 +78,11 @@ contract HostPassage {
8278
/// @notice Fulfills exit orders by transferring tokenOut to the recipient
8379
/// @param orders The exit orders to fulfill
8480
/// @custom:emits ExitFilled for each exit order fulfilled.
81+
/// @dev Builder SHOULD call `filfillExits` atomically with `submitBlock`.
82+
/// Builder SHOULD set a block expiration time that is AT MOST the minimum of all exit order deadlines;
83+
/// this way, `fulfillExits` + `submitBlock` will revert atomically on mainnet if any exit orders have expired.
84+
/// Otherwise, `filfillExits` may mine on mainnet, while `submitExit` reverts on the rollup,
85+
/// and the Builder can't collect the corresponding value on the rollup.
8586
/// @dev Called by the Builder atomically with a transaction calling `submitBlock`.
8687
/// The user-submitted transactions initiating the ExitOrders on the rollup
8788
/// must be included by the Builder in the rollup block submitted via `submitBlock`.
@@ -96,8 +97,6 @@ contract HostPassage {
9697
function fulfillExits(ExitOrder[] calldata orders) external payable {
9798
uint256 etherTransferred = msg.value;
9899
for (uint256 i = 0; i < orders.length; i++) {
99-
// check that the deadline hasn't passed
100-
if (block.timestamp > orders[i].deadline) revert OrderExpired();
101100
// transfer value
102101
if (orders[i].token == address(0)) {
103102
// transfer native Ether to the recipient

0 commit comments

Comments
 (0)