@@ -33,7 +33,7 @@ contract L1GraphTokenGateway is Initializable, GraphTokenGateway, L1ArbitrumMess
33
33
/// Address of the BridgeEscrow contract that holds the GRT in the bridge
34
34
address public escrow;
35
35
/// Addresses for which this mapping is true are allowed to send callhooks in outbound transfers
36
- mapping (address => bool ) public callhookWhitelist ;
36
+ mapping (address => bool ) public callhookAllowlist ;
37
37
38
38
/// Emitted when an outbound transfer is initiated, i.e. tokens are deposited from L1 to L2
39
39
event DepositInitiated (
@@ -61,10 +61,10 @@ contract L1GraphTokenGateway is Initializable, GraphTokenGateway, L1ArbitrumMess
61
61
event L2CounterpartAddressSet (address l2Counterpart );
62
62
/// Emitted when the escrow address has been updated
63
63
event EscrowAddressSet (address escrow );
64
- /// Emitted when an address is added to the callhook whitelist
65
- event AddedToCallhookWhitelist (address newWhitelisted );
66
- /// Emitted when an address is removed from the callhook whitelist
67
- event RemovedFromCallhookWhitelist (address notWhitelisted );
64
+ /// Emitted when an address is added to the callhook allowlist
65
+ event AddedToCallhookAllowlist (address newAllowlisted );
66
+ /// Emitted when an address is removed from the callhook allowlist
67
+ event RemovedFromCallhookAllowlist (address notAllowlisted );
68
68
69
69
/**
70
70
* @dev Allows a function to be called only by the gateway's L2 counterpart.
@@ -94,7 +94,7 @@ contract L1GraphTokenGateway is Initializable, GraphTokenGateway, L1ArbitrumMess
94
94
* - l2GRT using setL2TokenAddress
95
95
* - l2Counterpart using setL2CounterpartAddress
96
96
* - escrow using setEscrowAddress
97
- * - whitelisted callhook callers using addToCallhookWhitelist
97
+ * - allowlisted callhook callers using addToCallhookAllowlist
98
98
* - pauseGuardian using setPauseGuardian
99
99
* @param _controller Address of the Controller that manages this contract
100
100
*/
@@ -150,28 +150,28 @@ contract L1GraphTokenGateway is Initializable, GraphTokenGateway, L1ArbitrumMess
150
150
}
151
151
152
152
/**
153
- * @notice Adds an address to the callhook whitelist .
153
+ * @notice Adds an address to the callhook allowlist .
154
154
* This address will be allowed to include callhooks when transferring tokens.
155
- * @param _newWhitelisted Address to add to the whitelist
155
+ * @param _newAllowlisted Address to add to the allowlist
156
156
*/
157
- function addToCallhookWhitelist (address _newWhitelisted ) external onlyGovernor {
158
- require (_newWhitelisted != address (0 ), "INVALID_ADDRESS " );
159
- require (Address.isContract (_newWhitelisted ), "MUST_BE_CONTRACT " );
160
- require (! callhookWhitelist[_newWhitelisted ], "ALREADY_WHITELISTED " );
161
- callhookWhitelist[_newWhitelisted ] = true ;
162
- emit AddedToCallhookWhitelist (_newWhitelisted );
157
+ function addToCallhookAllowlist (address _newAllowlisted ) external onlyGovernor {
158
+ require (_newAllowlisted != address (0 ), "INVALID_ADDRESS " );
159
+ require (Address.isContract (_newAllowlisted ), "MUST_BE_CONTRACT " );
160
+ require (! callhookAllowlist[_newAllowlisted ], "ALREADY_ALLOWLISTED " );
161
+ callhookAllowlist[_newAllowlisted ] = true ;
162
+ emit AddedToCallhookAllowlist (_newAllowlisted );
163
163
}
164
164
165
165
/**
166
- * @notice Removes an address from the callhook whitelist .
166
+ * @notice Removes an address from the callhook allowlist .
167
167
* This address will no longer be allowed to include callhooks when transferring tokens.
168
- * @param _notWhitelisted Address to remove from the whitelist
168
+ * @param _notAllowlisted Address to remove from the allowlist
169
169
*/
170
- function removeFromCallhookWhitelist (address _notWhitelisted ) external onlyGovernor {
171
- require (_notWhitelisted != address (0 ), "INVALID_ADDRESS " );
172
- require (callhookWhitelist[_notWhitelisted ], "NOT_WHITELISTED " );
173
- callhookWhitelist[_notWhitelisted ] = false ;
174
- emit RemovedFromCallhookWhitelist (_notWhitelisted );
170
+ function removeFromCallhookAllowlist (address _notAllowlisted ) external onlyGovernor {
171
+ require (_notAllowlisted != address (0 ), "INVALID_ADDRESS " );
172
+ require (callhookAllowlist[_notAllowlisted ], "NOT_ALLOWLISTED " );
173
+ callhookAllowlist[_notAllowlisted ] = false ;
174
+ emit RemovedFromCallhookAllowlist (_notAllowlisted );
175
175
}
176
176
177
177
/**
@@ -180,10 +180,10 @@ contract L1GraphTokenGateway is Initializable, GraphTokenGateway, L1ArbitrumMess
180
180
* The ticket must be redeemed on L2 to receive tokens at the specified address.
181
181
* Note that the caller must previously allow the gateway to spend the specified amount of GRT.
182
182
* @dev maxGas and gasPriceBid must be set using Arbitrum's NodeInterface.estimateRetryableTicket method.
183
- * Also note that whitelisted senders (some protocol contracts) can include additional calldata
183
+ * Also note that allowlisted senders (some protocol contracts) can include additional calldata
184
184
* for a callhook to be executed on the L2 side when the tokens are received. In this case, the L2 transaction
185
185
* can revert if the callhook reverts, potentially locking the tokens on the bridge if the callhook
186
- * never succeeds. This requires extra care when adding contracts to the whitelist , but is necessary to ensure that
186
+ * never succeeds. This requires extra care when adding contracts to the allowlist , but is necessary to ensure that
187
187
* the tickets can be retried in the case of a temporary failure, and to ensure the atomicity of callhooks
188
188
* with token transfers.
189
189
* @param _l1Token L1 Address of the GRT contract (needed for compatibility with Arbitrum Gateway Router)
@@ -217,7 +217,7 @@ contract L1GraphTokenGateway is Initializable, GraphTokenGateway, L1ArbitrumMess
217
217
bytes memory extraData;
218
218
(from, maxSubmissionCost, extraData) = parseOutboundData (_data);
219
219
require (
220
- extraData.length == 0 || callhookWhitelist [msg .sender ] == true ,
220
+ extraData.length == 0 || callhookAllowlist [msg .sender ] == true ,
221
221
"CALL_HOOK_DATA_NOT_ALLOWED "
222
222
);
223
223
require (maxSubmissionCost != 0 , "NO_SUBMISSION_COST " );
@@ -318,7 +318,7 @@ contract L1GraphTokenGateway is Initializable, GraphTokenGateway, L1ArbitrumMess
318
318
* @param _from Address on L1 from which we're transferring tokens
319
319
* @param _to Address on L2 to which we're transferring tokens
320
320
* @param _amount Amount of GRT to transfer
321
- * @param _data Additional call data for the L2 transaction, which must be empty unless the caller is whitelisted
321
+ * @param _data Additional call data for the L2 transaction, which must be empty unless the caller is allowlisted
322
322
* @return Encoded calldata (including function selector) for the L2 transaction
323
323
*/
324
324
function getOutboundCalldata (
0 commit comments