Skip to content

Commit 9c6438a

Browse files
committed
remove ERC20 enter/exits for now
1 parent 1135940 commit 9c6438a

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

src/Passage.sol

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,6 @@ contract Passage {
4949
emit Enter(rollupChainId, address(0), rollupRecipient, msg.value);
5050
}
5151

52-
/// @notice Allows ERC20s to enter the rollup.
53-
/// @param rollupChainId - The rollup chain to enter.
54-
/// @param rollupRecipient - The recipient of the Ether on the rollup.
55-
/// @param token - The address of the ERC20 token on the Host.
56-
/// @param amount - The amount of the ERC20 token to transfer to the rollup.
57-
/// @custom:emits Enter indicating the amount of tokens to mint on the rollup & its recipient.
58-
function enter(uint256 rollupChainId, address token, address rollupRecipient, uint256 amount) external payable {
59-
IERC20(token).transferFrom(msg.sender, address(this), amount);
60-
emit Enter(rollupChainId, token, rollupRecipient, amount);
61-
}
62-
6352
/// @notice Allows the admin to withdraw ETH or ERC20 tokens from the contract.
6453
/// @dev Only the admin can call this function.
6554
function withdraw(address token, address recipient, uint256 amount) external {
@@ -96,34 +85,11 @@ contract RollupPassage {
9685
hostPassage = _hostPassage;
9786
}
9887

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-
// TODO: important that no code is deployed to hostPassage address on the rollup :think:
106-
if (msg.sender != hostPassage) revert OnlyHostPassage();
107-
// TODO: IERC20(token).mint(recipient, amount);
108-
emit Enter(token, rollupRecipient, amount);
109-
}
110-
11188
/// @notice Allows native Ether to exit the rollup.
11289
/// @dev Rollup node will burn the msg.value.
11390
/// @param recipient - The desired recipient of the Ether on the host chain.
11491
/// @custom:emits Exit indicating the amount of Ether to burn on the rollup & the recipient on the host chain.
11592
function exit(address recipient) public payable {
11693
emit Exit(address(0), recipient, msg.value);
11794
}
118-
119-
/// @notice Allows ERC20s to exit the rollup.
120-
/// @param recipient - The desired recipient of the ERC20s on the host chain.
121-
/// @param token - The address of the ERC20 token on the Rollup.
122-
/// @param amount - The amount of the ERC20 token to burn on the Rollup.
123-
/// @custom:emits Exit indicating the the desired recipient on the host chain.
124-
function exit(address token, address recipient, uint256 amount) external payable {
125-
IERC20(token).transferFrom(msg.sender, address(this), amount);
126-
// TODO: IERC20(token).burn(msg.sender, amount);
127-
emit Exit(token, recipient, amount);
128-
}
12995
}

0 commit comments

Comments
 (0)