Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidu28 committed Nov 8, 2024
1 parent 81984e3 commit c2b061f
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 16 deletions.
4 changes: 2 additions & 2 deletions contracts/script/utils/CoreDeploymentLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ library CoreDeploymentLib {
) internal returns (DeploymentConfigData memory) {
string memory pathToFile = string.concat(directoryPath, fileName);

require(vm.exists(pathToFile), "Deployment file does not exist");
require(vm.exists(pathToFile), "CoreDeployment: Deployment config file does not exist");

string memory json = vm.readFile(pathToFile);

Expand Down Expand Up @@ -367,7 +367,7 @@ library CoreDeploymentLib {
) internal returns (DeploymentData memory) {
string memory pathToFile = string.concat(path, fileName);

require(vm.exists(pathToFile), "Deployment file does not exist");
require(vm.exists(pathToFile), "CoreDeployment: Deployment file does not exist");

string memory json = vm.readFile(pathToFile);

Expand Down
4 changes: 2 additions & 2 deletions contracts/script/utils/HelloWorldDeploymentLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ library HelloWorldDeploymentLib {
) internal returns (DeploymentData memory) {
string memory fileName = string.concat(directoryPath, vm.toString(chainId), ".json");

require(vm.exists(fileName), "Deployment file does not exist");
require(vm.exists(fileName), "HelloWorldDeployment: Deployment file does not exist");

string memory json = vm.readFile(fileName);

Expand Down Expand Up @@ -128,7 +128,7 @@ library HelloWorldDeploymentLib {
) internal returns (DeploymentConfigData memory) {
string memory pathToFile = string.concat(directoryPath, fileName);

require(vm.exists(pathToFile), "Deployment file does not exist");
require(vm.exists(pathToFile), "HelloWorldDeployment: Deployment Config file does not exist");

string memory json = vm.readFile(pathToFile);

Expand Down
2 changes: 1 addition & 1 deletion contracts/test/SetupPaymentsLib.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ contract SetupPaymentsLibTest is Test, TestConstants, HelloWorldTaskManagerSetup
function setUp() public override virtual {
proxyAdmin = UpgradeableProxyLib.deployProxyAdmin();
coreConfigData =
CoreDeploymentLib.readDeploymentConfigValues("test/mockData/config/core/", 31337); // TODO: Fix this to correct path
CoreDeploymentLib.readDeploymentConfigValues("test/mockData/config/core/", 1337); // TODO: Fix this to correct path
coreDeployment = CoreDeploymentLib.deployContracts(proxyAdmin, coreConfigData);

mockToken = new ERC20Mock();
Expand Down
1 change: 1 addition & 0 deletions contracts/test/mockData/config/core/1337.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"MAX_FUTURE_LENGTH": 86400,
"GENESIS_REWARDS_TIMESTAMP": 1672531200,
"rewards_updater_address": "0x1234567890123456789012345678901234567890",
"rewards_updater_key": "0x4bbbf85ce3377467afe5d46f804f221813b2bb87f24d81f60f1fcdbf7cbf4356",
"activation_delay": 604800,
"calculation_interval_seconds": 86400,
"global_operator_commission_bips": 1000
Expand Down
3 changes: 2 additions & 1 deletion contracts/test/mockData/deployments/core/1337.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"strategyFactory": "0x7777777777777777777777777777777777777777",
"strategyManagerImpl": "0x8888888888888888888888888888888888888888",
"eigenPodManager": "0x9999999999999999999999999999999999999999",
"eigenPodManagerImpl": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
"eigenPodManagerImpl": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"rewardsCoordinator": "0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
}
}
2 changes: 1 addition & 1 deletion contracts/test/mockData/scratch/31337.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"lastUpdate":{"timestamp":"1","block_number":"1"},"addresses":{"proxyAdmin":"0x5615deb798bb3e4dfa0139dfa1b3d433cc23b72f","delegation":"0xf62849f9a0b5bf2913b396098f7c7019b51a820a","delegationManagerImpl":"0xdb25a7b768311de128bbda7b8426c3f9c74f3240","avsDirectory":"0xc7183455a4c133ae270771860664b6b7ec320bb1","avsDirectoryImpl":"0x3381cd18e2fb4db236bf0525938ab6e43db0440f","strategyManager":"0x1d1499e622d69689cdf9004d05ec547d650ff211","strategyManagerImpl":"0x756e0562323adcda4430d6cb456d9151f605290b","eigenPodManager":"0x03a6a84cd762d9707a21605b548aaab891562aab","eigenPodManagerImpl":"0xe8dc788818033232ef9772cb2e6622f1ec8bc840","strategyFactory":"0x13aa49bac059d709dd0a18d6bb63290076a702d7","strategyFactoryImpl":"0x1af7f588a501ea2b5bb3feefa744892aa2cf00e6","strategyBeacon":"0x886d6d1eb8d415b00052828cd6d5b321f072073d"}}
{"lastUpdate":{"timestamp":"1","block_number":"1"},"addresses":{"proxyAdmin":"0x5615deb798bb3e4dfa0139dfa1b3d433cc23b72f","delegation":"0xf62849f9a0b5bf2913b396098f7c7019b51a820a","delegationManagerImpl":"0xdb25a7b768311de128bbda7b8426c3f9c74f3240","avsDirectory":"0xc7183455a4c133ae270771860664b6b7ec320bb1","avsDirectoryImpl":"0x3381cd18e2fb4db236bf0525938ab6e43db0440f","strategyManager":"0x1d1499e622d69689cdf9004d05ec547d650ff211","strategyManagerImpl":"0x756e0562323adcda4430d6cb456d9151f605290b","eigenPodManager":"0x03a6a84cd762d9707a21605b548aaab891562aab","eigenPodManagerImpl":"0xe8dc788818033232ef9772cb2e6622f1ec8bc840","strategyFactory":"0x13aa49bac059d709dd0a18d6bb63290076a702d7","strategyFactoryImpl":"0x1af7f588a501ea2b5bb3feefa744892aa2cf00e6","strategyBeacon":"0x886d6d1eb8d415b00052828cd6d5b321f072073d","rewardsCoordinator":"0x15cf58144ef33af1e14b5208015d11f9143e27b9"}}
14 changes: 5 additions & 9 deletions contracts/test/mockData/scratch/payments.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
{
"leaves": [
"0xdc4955d01f4e8f8fc13e61d1da56189f6db850395aebbbcbc211202b934970fc",
"0xdc4955d01f4e8f8fc13e61d1da56189f6db850395aebbbcbc211202b934970fc",
"0xdc4955d01f4e8f8fc13e61d1da56189f6db850395aebbbcbc211202b934970fc",
"0xdc4955d01f4e8f8fc13e61d1da56189f6db850395aebbbcbc211202b934970fc",
"0xdc4955d01f4e8f8fc13e61d1da56189f6db850395aebbbcbc211202b934970fc",
"0xdc4955d01f4e8f8fc13e61d1da56189f6db850395aebbbcbc211202b934970fc",
"0xdc4955d01f4e8f8fc13e61d1da56189f6db850395aebbbcbc211202b934970fc",
"0xdc4955d01f4e8f8fc13e61d1da56189f6db850395aebbbcbc211202b934970fc"
"0x29036a1d92861ffd464a1e285030fad3978a36f953ae33c160e606d2ac746c42",
"0x29036a1d92861ffd464a1e285030fad3978a36f953ae33c160e606d2ac746c42",
"0x29036a1d92861ffd464a1e285030fad3978a36f953ae33c160e606d2ac746c42",
"0x29036a1d92861ffd464a1e285030fad3978a36f953ae33c160e606d2ac746c42"
],
"tokenLeaves": [
"0xe0c89917f508e4c4cb8aff33403a849560a853d87c90011da2a9bb86811fa248"
"0xf5d87050cb923194fe63c7ed2c45cbc913fa6ecf322f3631149c36d9460b3ad6"
]
}

0 comments on commit c2b061f

Please sign in to comment.