Skip to content

Commit

Permalink
feat: apply PR reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
sm-stack committed Jul 22, 2024
1 parent 23631c9 commit 533bd67
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/contracts/contracts/L1/AssetManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,11 @@ contract AssetManager is ISemver, IERC721Receiver, IAssetManager {
uint128 validatorReward
) external onlyValidatorManager {
// Distribute the reward from a designated vault to the AssetManager contract.
ASSET_TOKEN.transferFrom(VALIDATOR_REWARD_VAULT, address(this), baseReward + boostedReward + validatorReward);
ASSET_TOKEN.safeTransferFrom(
VALIDATOR_REWARD_VAULT,
address(this),
baseReward + boostedReward + validatorReward
);

// If reward is distributed to SECURITY_COUNCIL, transfer it directly.
if (validator == SECURITY_COUNCIL) {
Expand All @@ -758,6 +762,7 @@ contract AssetManager is ISemver, IERC721Receiver, IAssetManager {
asset.totalKro += baseReward;
asset.validatorKro += validatorReward;
asset.rewardPerKghStored += boostedReward / asset.totalKgh;
asset.validatorKroBonded -= BOND_AMOUNT;
}

emit ValidatorKroUnbonded(
Expand Down

0 comments on commit 533bd67

Please sign in to comment.