@@ -9,7 +9,7 @@ import {AccessControlDefaultAdminRules} from
99/// @notice A contract deployed to Host chain that allows tokens to enter the rollup,
1010/// and enables Builders to fulfill requests to exchange tokens on the Rollup for tokens on the Host.
1111contract Passage is AccessControlDefaultAdminRules {
12- /// @notice The chainId of the default rollup chain .
12+ /// @notice The chainId of rollup that Ether will be sent to by default when entering the rollup via fallback() or receive() .
1313 uint256 immutable defaultRollupChainId;
1414
1515 /// @notice Thrown when attempting to fulfill an exit order with a deadline that has passed.
@@ -30,6 +30,11 @@ contract Passage is AccessControlDefaultAdminRules {
3030 /// @notice Emitted when the admin withdraws tokens from the contract.
3131 event Withdraw (Withdrawal withdrawal );
3232
33+ /// @notice A bundled withdrawal of Ether and ERC20 tokens.
34+ /// @param recipient - The address to receive the Ether and ERC20 tokens.
35+ /// @param ethAmount - The amount of Ether to transfer to the recipient. Zero if no Ether to transfer.
36+ /// @param tokens - The addresses of the ERC20 tokens to transfer to the recipient.
37+ /// @param tokenAmounts - The amounts of the ERC20 tokens to transfer to the recipient.
3338 struct Withdrawal {
3439 address recipient;
3540 uint256 ethAmount;
@@ -56,6 +61,8 @@ contract Passage is AccessControlDefaultAdminRules {
5661 /// @dev See `AccessControlDefaultAdminRules` for information on contract administration.
5762 /// - Admin role can grant and revoke Sequencer roles.
5863 /// - Admin role can be transferred via two-step process with a 1 day timelock.
64+ /// @param _defaultRollupChainId - the chainId of the rollup that Ether will be sent to by default
65+ /// when entering the rollup via fallback() or receive() fns.
5966 /// @param admin - the address that will be the initial admin.
6067 constructor (uint256 _defaultRollupChainId , address admin ) AccessControlDefaultAdminRules (1 days, admin) {
6168 defaultRollupChainId = _defaultRollupChainId;
@@ -131,6 +138,7 @@ contract Passage is AccessControlDefaultAdminRules {
131138
132139 /// @notice Allows the admin to withdraw tokens from the contract.
133140 /// @dev Only the admin can call this function.
141+ /// @param withdrawals - The withdrawals to process. See Withdrawal struct docs for details.
134142 function withdraw (Withdrawal[] calldata withdrawals ) external onlyRole (DEFAULT_ADMIN_ROLE) {
135143 for (uint256 i = 0 ; i < withdrawals.length ; i++ ) {
136144 // transfer ether
0 commit comments