@@ -9,7 +9,7 @@ import {AccessControlDefaultAdminRules} from
9
9
/// @notice A contract deployed to Host chain that allows tokens to enter the rollup,
10
10
/// and enables Builders to fulfill requests to exchange tokens on the Rollup for tokens on the Host.
11
11
contract 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() .
13
13
uint256 immutable defaultRollupChainId;
14
14
15
15
/// @notice Thrown when attempting to fulfill an exit order with a deadline that has passed.
@@ -30,6 +30,11 @@ contract Passage is AccessControlDefaultAdminRules {
30
30
/// @notice Emitted when the admin withdraws tokens from the contract.
31
31
event Withdraw (Withdrawal withdrawal );
32
32
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.
33
38
struct Withdrawal {
34
39
address recipient;
35
40
uint256 ethAmount;
@@ -56,6 +61,8 @@ contract Passage is AccessControlDefaultAdminRules {
56
61
/// @dev See `AccessControlDefaultAdminRules` for information on contract administration.
57
62
/// - Admin role can grant and revoke Sequencer roles.
58
63
/// - 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.
59
66
/// @param admin - the address that will be the initial admin.
60
67
constructor (uint256 _defaultRollupChainId , address admin ) AccessControlDefaultAdminRules (1 days, admin) {
61
68
defaultRollupChainId = _defaultRollupChainId;
@@ -131,6 +138,7 @@ contract Passage is AccessControlDefaultAdminRules {
131
138
132
139
/// @notice Allows the admin to withdraw tokens from the contract.
133
140
/// @dev Only the admin can call this function.
141
+ /// @param withdrawals - The withdrawals to process. See Withdrawal struct docs for details.
134
142
function withdraw (Withdrawal[] calldata withdrawals ) external onlyRole (DEFAULT_ADMIN_ROLE) {
135
143
for (uint256 i = 0 ; i < withdrawals.length ; i++ ) {
136
144
// transfer ether
0 commit comments