@@ -170,14 +170,14 @@ contract ServiceNodeRewards is Initializable, Ownable2StepUpgradeable, PausableU
170
170
event ClaimThresholdUpdated (uint256 newThreshold );
171
171
event ClaimCycleUpdated (uint256 newValue );
172
172
event LiquidationRatiosUpdated (uint256 liquidatorRatio , uint256 poolRatio , uint256 recipientRatio );
173
- event ServiceNodeLiquidated (uint64 indexed serviceNodeID , address operator , BN256G1.G1Point pubkey );
173
+ event ServiceNodeLiquidated (uint64 indexed serviceNodeID , address initiator , BN256G1.G1Point pubkey );
174
174
event ServiceNodeExit (
175
175
uint64 indexed serviceNodeID ,
176
- address operator ,
176
+ address initiator ,
177
177
uint256 returnedAmount ,
178
178
BN256G1.G1Point pubkey
179
179
);
180
- event ServiceNodeExitRequest (uint64 indexed serviceNodeID , address contributor , BN256G1.G1Point pubkey );
180
+ event ServiceNodeExitRequest (uint64 indexed serviceNodeID , address initiator , BN256G1.G1Point pubkey );
181
181
event StakingRequirementUpdated (uint256 newRequirement );
182
182
event SignatureExpiryUpdated (uint256 newExpiry );
183
183
@@ -192,7 +192,7 @@ contract ServiceNodeRewards is Initializable, Ownable2StepUpgradeable, PausableU
192
192
// @param serviceNodeID The node that has already paired with the Ed25519
193
193
// public key.
194
194
error Ed25519PubkeyAlreadyExists (uint64 serviceNodeID );
195
- error CallerNotContributor (uint64 serviceNodeID , address contributor );
195
+ error CallerNotContributor (uint64 serviceNodeID , address caller );
196
196
error ClaimThresholdExceeded ();
197
197
error ContractAlreadyStarted ();
198
198
error ContractNotStarted ();
@@ -423,7 +423,7 @@ contract ServiceNodeRewards is Initializable, Ownable2StepUpgradeable, PausableU
423
423
}
424
424
425
425
updateBLSNonSignerThreshold ();
426
- emit NewServiceNodeV2 (allocID, operator , blsPubkey, serviceNodeParams, contributors);
426
+ emit NewServiceNodeV2 (allocID, tx . origin , blsPubkey, serviceNodeParams, contributors);
427
427
SafeERC20.safeTransferFrom (designatedToken, msg .sender , address (this ), stakingRequirement);
428
428
}
429
429
@@ -511,7 +511,7 @@ contract ServiceNodeRewards is Initializable, Ownable2StepUpgradeable, PausableU
511
511
}
512
512
513
513
sn.latestLeaveRequestTimestamp = block .timestamp ;
514
- emit ServiceNodeExitRequest (serviceNodeID, caller , sn.blsPubkey);
514
+ emit ServiceNodeExitRequest (serviceNodeID, tx . origin , sn.blsPubkey);
515
515
}
516
516
517
517
/// @notice Exits a BLS public key using an aggregated BLS signature from
@@ -567,12 +567,11 @@ contract ServiceNodeRewards is Initializable, Ownable2StepUpgradeable, PausableU
567
567
///
568
568
/// @param serviceNodeID The ID of the service node to be exited.
569
569
function _exitBLSPublicKey (uint64 serviceNodeID , uint256 returnedAmount ) internal {
570
- address operator = _serviceNodes[serviceNodeID].operator;
571
570
BN256G1.G1Point memory pubkey = _serviceNodes[serviceNodeID].blsPubkey;
572
571
serviceNodeDelete (serviceNodeID);
573
572
574
573
updateBLSNonSignerThreshold ();
575
- emit ServiceNodeExit (serviceNodeID, operator , returnedAmount, pubkey);
574
+ emit ServiceNodeExit (serviceNodeID, tx . origin , returnedAmount, pubkey);
576
575
}
577
576
578
577
/// @notice Minimum time before a node may exit (normally or via liquidation). This prevents
@@ -649,7 +648,7 @@ contract ServiceNodeRewards is Initializable, Ownable2StepUpgradeable, PausableU
649
648
blsPubkey, timestamp, blsSignature, liquidateTag, ids);
650
649
651
650
// Calculating how much liquidator is paid out
652
- emit ServiceNodeLiquidated (serviceNodeID, node.operator , node.blsPubkey);
651
+ emit ServiceNodeLiquidated (serviceNodeID, tx . origin , node.blsPubkey);
653
652
uint256 ratioSum = poolShareOfLiquidationRatio + liquidatorRewardRatio + recipientRatio;
654
653
uint256 deposit = node.deposit;
655
654
uint256 liquidatorAmount = (deposit * liquidatorRewardRatio) / ratioSum;
0 commit comments