@@ -36,7 +36,7 @@ interface IGSECore {
3636
3737 function setGovernance (Governance _governance ) external ;
3838 function addRollup (address _rollup ) external ;
39- function deposit (address _attester , address _withdrawer , bool _onBonus ) external ;
39+ function deposit (address _attester , address _withdrawer , bool _moveWithLatestRollup ) external ;
4040 function withdraw (address _attester , uint256 _amount ) external returns (uint256 , bool , uint256 );
4141 function delegate (address _instance , address _attester , address _delegatee ) external ;
4242 function vote (uint256 _proposalId , uint256 _amount , bool _support ) external ;
@@ -255,38 +255,40 @@ contract GSECore is IGSECore, Ownable {
255255 *
256256 * @dev Transfers STAKING_ASSET from msg.sender to the GSE, and then into Governance.
257257 *
258- * @dev if _onBonus is true, then msg.sender must be the latest rollup.
258+ * @dev if _moveWithLatestRollup is true, then msg.sender must be the latest rollup.
259259 *
260260 * @dev The same attester may deposit on multiple *instances*, so long as the invariant described
261261 * above BONUS_INSTANCE_ADDRESS holds.
262262 *
263263 * E.g. Suppose the registered rollups are A, then B, then C, so C's effective attesters are
264264 * those associated with C and the bonus address.
265265 *
266- * Alice may come along now and deposit on A, and B, with _onBonus =false in both cases.
266+ * Alice may come along now and deposit on A, and B, with _moveWithLatestRollup =false in both cases.
267267 *
268- * For depositing into C, she can deposit *either* with _onBonus = true OR false.
269- * If she deposits with _onBonus = false, then she is associated with C's address.
270- * If she deposits with _onBonus = true, then she is associated with the bonus address.
268+ * For depositing into C, she can deposit *either* with _moveWithLatestRollup = true OR false.
269+ * If she deposits with _moveWithLatestRollup = false, then she is associated with C's address.
270+ * If she deposits with _moveWithLatestRollup = true, then she is associated with the bonus address.
271271 *
272- * Suppose she deposits with _onBonus = true, and a new rollup D is added to the rollups.
272+ * Suppose she deposits with _moveWithLatestRollup = true, and a new rollup D is added to the rollups.
273273 *
274274 * Now she cannot deposit through D AT ALL, since she is already in D's effective attesters.
275- * But she CAN go back and deposit directly into C, with _onBonus = false.
275+ * But she CAN go back and deposit directly into C, with _moveWithLatestRollup = false.
276276 *
277277 * @param _attester - The attester address of the attester
278278 * @param _withdrawer - The withdrawer address of the attester
279- * @param _onBonus - Whether to deposit into the specific instance, or the bonus instance
279+ * @param _moveWithLatestRollup - Whether to deposit into the specific instance, or the bonus instance
280280 */
281- function deposit (address _attester , address _withdrawer , bool _onBonus )
281+ function deposit (address _attester , address _withdrawer , bool _moveWithLatestRollup )
282282 external
283283 override (IGSECore)
284284 onlyRollup
285285 {
286286 bool isMsgSenderLatestRollup = getLatestRollup () == msg .sender ;
287287
288- // If _onBonus is true, then msg.sender must be the latest rollup.
289- require (! _onBonus || isMsgSenderLatestRollup, Errors.GSE__NotLatestRollup (msg .sender ));
288+ // If _moveWithLatestRollup is true, then msg.sender must be the latest rollup.
289+ require (
290+ ! _moveWithLatestRollup || isMsgSenderLatestRollup, Errors.GSE__NotLatestRollup (msg .sender )
291+ );
290292
291293 // Ensure that we are not already attesting on the rollup
292294 require (
@@ -300,12 +302,12 @@ contract GSECore is IGSECore, Ownable {
300302 );
301303
302304 // Set the recipient instance address, i.e. the one that will receive the attester.
303- // From above, we know that if we are here, and _onBonus is true,
305+ // From above, we know that if we are here, and _moveWithLatestRollup is true,
304306 // then msg.sender is the latest instance,
305307 // but the user is targeting the bonus address.
306308 // Otherwise, we use the msg.sender, which we know is a registered rollup
307309 // thanks to the modifier.
308- address recipientInstance = _onBonus ? BONUS_INSTANCE_ADDRESS : msg .sender ;
310+ address recipientInstance = _moveWithLatestRollup ? BONUS_INSTANCE_ADDRESS : msg .sender ;
309311
310312 // Add the attester to the instance's checkpointed set of attesters.
311313 require (
0 commit comments