Skip to content

Commit

Permalink
Merge pull request #520 from lidofinance/refactor/allocation-tests
Browse files Browse the repository at this point in the history
Refactor: allocation tests
  • Loading branch information
arwer13 authored Feb 1, 2023
2 parents 44ee896 + 6c770c0 commit 8273d02
Show file tree
Hide file tree
Showing 7 changed files with 500 additions and 854 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pragma solidity 0.8.9;

import {MinFirstAllocationStrategy} from "../../common/lib/MinFirstAllocationStrategy.sol";

contract MinFirstAllocationStrategyTest {
contract MinFirstAllocationStrategyConsumerMockModernVersion {
function allocate(
uint256[] memory allocations,
uint256[] memory capacities,
Expand Down
6 changes: 5 additions & 1 deletion contracts/0.8.9/test_helpers/StakingRouterMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ contract StakingRouterMock is StakingRouter {
}

function getStakingModuleIndexById(uint256 _stakingModuleId) external view returns (uint256) {
return _getStakingModuleIndexById(uint24(_stakingModuleId));
return _getStakingModuleIndexById(_stakingModuleId);
}

function getStakingModuleByIndex(uint256 _stakingModuleId) external view returns (StakingModule memory) {
return _getStakingModuleByIndex(_stakingModuleId);
}
}
4 changes: 2 additions & 2 deletions dao-devnet3-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ mv contracts/common/lib/MinFirstAllocationStrategy.sol contracts/common/lib/MinF
mv contracts/common/lib/MinFirstAllocationStrategy.sol.4 contracts/common/lib/MinFirstAllocationStrategy.sol
mv contracts/0.8.9/StakingRouter.sol contracts/0.8.9/StakingRouter.sol.bkp
mv contracts/0.8.9/test_helpers/StakingRouterMock.sol contracts/0.8.9/test_helpers/StakingRouterMock.sol.bkp
mv contracts/0.8.9/test_helpers/MinFirstAllocationStrategyTest.sol contracts/0.8.9/test_helpers/MinFirstAllocationStrategyTest.sol.bkp
mv contracts/0.8.9/test_helpers/MinFirstAllocationStrategyConsumerMockModernVersion.sol contracts/0.8.9/test_helpers/MinFirstAllocationStrategyConsumerMockModernVersion.sol.bkp

yarn hardhat --network $NETWORK run ./scripts/multisig/04-publish-app-frontends.js
msg "Frontend published to IPFS"
Expand All @@ -102,7 +102,7 @@ mv contracts/common/lib/MinFirstAllocationStrategy.sol contracts/common/lib/MinF
mv contracts/common/lib/MinFirstAllocationStrategy.sol.48 contracts/common/lib/MinFirstAllocationStrategy.sol
mv contracts/0.8.9/StakingRouter.sol.bkp contracts/0.8.9/StakingRouter.sol
mv contracts/0.8.9/test_helpers/StakingRouterMock.sol.bkp contracts/0.8.9/test_helpers/StakingRouterMock.sol
mv contracts/0.8.9/test_helpers/MinFirstAllocationStrategyTest.sol.bkp contracts/0.8.9/test_helpers/MinFirstAllocationStrategyTest.sol
mv contracts/0.8.9/test_helpers/MinFirstAllocationStrategyConsumerMockModernVersion.sol.bkp contracts/0.8.9/test_helpers/MinFirstAllocationStrategyConsumerMockModernVersion.sol

yarn hardhat --network $NETWORK run ./scripts/multisig/05-deploy-apm.js
yarn hardhat --network $NETWORK tx --from $DEPLOYER --file tx-03-deploy-apm.json
Expand Down
Loading

0 comments on commit 8273d02

Please sign in to comment.