Skip to content

Commit 26aa081

Browse files
committed
reorder
1 parent 3695fba commit 26aa081

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/Passage.sol

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,17 @@ contract RollupPassage {
9696
hostPassage = _hostPassage;
9797
}
9898

99+
/// @notice Allows ERC20s to enter the rollup from L1.
100+
/// @param token - The address of the L1 ERC20 token to mint a representation for.
101+
/// @param rollupRecipient - The recipient of the ERC20 tokens on the rollup, specified by the sender on L1.
102+
/// @param amount - The amount of the ERC20 token to mint on the Rollup, corresponding to the amount locked on L1.
103+
/// @custom:emits Exit indicating the the desired recipient on the host chain.
104+
function enter(address token, address rollupRecipient, uint256 amount) external {
105+
if (msg.sender != hostPassage) revert OnlyHostPassage();
106+
// TODO: IERC20(token).mint(recipient, amount);
107+
emit Enter(token, rollupRecipient, amount);
108+
}
109+
99110
/// @notice Allows native Ether to exit the rollup.
100111
/// @dev Rollup node will burn the msg.value.
101112
/// @param recipient - The desired recipient of the Ether on the host chain.
@@ -114,15 +125,4 @@ contract RollupPassage {
114125
// TODO: IERC20(token).burn(msg.sender, amount);
115126
emit Exit(token, recipient, amount);
116127
}
117-
118-
/// @notice Allows ERC20s to enter the rollup from L1.
119-
/// @param token - The address of the L1 ERC20 token to mint a representation for.
120-
/// @param rollupRecipient - The recipient of the ERC20 tokens on the rollup, specified by the sender on L1.
121-
/// @param amount - The amount of the ERC20 token to mint on the Rollup, corresponding to the amount locked on L1.
122-
/// @custom:emits Exit indicating the the desired recipient on the host chain.
123-
function enter(address token, address rollupRecipient, uint256 amount) external {
124-
if (msg.sender != hostPassage) revert OnlyHostPassage();
125-
// TODO: IERC20(token).mint(recipient, amount);
126-
emit Enter(token, rollupRecipient, amount);
127-
}
128128
}

0 commit comments

Comments
 (0)