Skip to content

Commit 19129a8

Browse files
authored
remove token from Enter (#47)
1 parent 5d70919 commit 19129a8

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

src/Passage.sol

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@ contract Passage {
1515
/// @notice Thrown when attempting to withdraw funds if not withdrawal admin.
1616
error OnlyWithdrawalAdmin();
1717

18-
/// @notice Emitted when tokens enter the rollup.
19-
/// @param token - The address of the token entering the rollup.
20-
/// @param rollupRecipient - The recipient of the token on the rollup.
21-
/// @param amount - The amount of the token entering the rollup.
22-
event Enter(uint256 indexed rollupChainId, address indexed token, address indexed rollupRecipient, uint256 amount);
18+
/// @notice Emitted when Ether enters the rollup.
19+
/// @param rollupRecipient - The recipient of Ether on the rollup.
20+
/// @param amount - The amount of Ether entering the rollup.
21+
event Enter(uint256 indexed rollupChainId, address indexed rollupRecipient, uint256 amount);
2322

2423
/// @notice Emitted when the admin withdraws tokens from the contract.
2524
event Withdrawal(address indexed token, address indexed recipient, uint256 amount);
@@ -41,19 +40,18 @@ contract Passage {
4140
enter(defaultRollupChainId, msg.sender);
4241
}
4342

44-
/// @notice Allows native Ether to enter the rollup.
45-
/// @param rollupRecipient - The recipient of the Ether on the rollup.
46-
/// @custom:emits Enter indicating the amount of Ether to mint on the rollup & its recipient.
47-
function enter(address rollupRecipient) public payable {
48-
enter(defaultRollupChainId, rollupRecipient);
49-
}
50-
5143
/// @notice Allows native Ether to enter the rollup.
5244
/// @param rollupChainId - The rollup chain to enter.
5345
/// @param rollupRecipient - The recipient of the Ether on the rollup.
5446
/// @custom:emits Enter indicating the amount of Ether to mint on the rollup & its recipient.
5547
function enter(uint256 rollupChainId, address rollupRecipient) public payable {
56-
emit Enter(rollupChainId, address(0), rollupRecipient, msg.value);
48+
emit Enter(rollupChainId, rollupRecipient, msg.value);
49+
}
50+
51+
/// @notice Allows native Ether to enter the default rollup.
52+
/// @dev see `enter` above for docs.
53+
function enter(address rollupRecipient) external payable {
54+
enter(defaultRollupChainId, rollupRecipient);
5755
}
5856

5957
/// @notice Allows the admin to withdraw ETH or ERC20 tokens from the contract.

0 commit comments

Comments
 (0)