Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix validator manager contract tests #364

Merged
merged 6 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/contracts/contracts/L1/AssetManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -554,10 +554,12 @@ contract AssetManager is ISemver, IERC721Receiver, IAssetManager {
);
} else {
Asset storage asset = _vaults[validator].asset;
if (asset.totalKgh != 0) {
asset.rewardPerKghStored += (boostedReward / asset.totalKgh);
}
unchecked {
asset.totalKro += baseReward;
asset.validatorKro += validatorReward;
asset.rewardPerKghStored += boostedReward / asset.totalKgh;
asset.validatorKroBonded -= BOND_AMOUNT;
}

Expand Down
2 changes: 2 additions & 0 deletions packages/contracts/contracts/test/CommonTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ contract L2OutputOracle_Initializer is UpgradeGovernor_Initializer {
address internal asserter = 0x000000000000000000000000000000000000aAaB;
address internal challenger = 0x000000000000000000000000000000000000AAaC;
address internal withdrawAcc = 0x000000000000000000000000000000000000AAaE;
address internal delegator = 0x000000000000000000000000000000000000AAAF;
uint256 initL1Time;

event OutputSubmitted(
Expand All @@ -272,6 +273,7 @@ contract L2OutputOracle_Initializer is UpgradeGovernor_Initializer {
assetToken.mint(trusted, minActivateAmount * 10);
assetToken.mint(asserter, minActivateAmount * 10);
assetToken.mint(challenger, minActivateAmount * 10);
assetToken.mint(delegator, minActivateAmount * 10);
// Set up validatorRewardVault
assetToken.mint(validatorRewardVault, baseReward * 1000);

Expand Down
Loading
Loading