@@ -96,6 +96,17 @@ contract RollupPassage {
96
96
hostPassage = _hostPassage;
97
97
}
98
98
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
+
99
110
/// @notice Allows native Ether to exit the rollup.
100
111
/// @dev Rollup node will burn the msg.value.
101
112
/// @param recipient - The desired recipient of the Ether on the host chain.
@@ -114,15 +125,4 @@ contract RollupPassage {
114
125
// TODO: IERC20(token).burn(msg.sender, amount);
115
126
emit Exit (token, recipient, amount);
116
127
}
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
- }
128
128
}
0 commit comments