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

Quick Fix: didn't push a commit for metadataurl #19

Merged
merged 6 commits into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion contracts/deployments/core/17000.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"lastUpdate":{"timestamp":"1733242248","block_number":"0"},"addresses":{"proxyAdmin":"0xB043055dd967A382577c2f5261fA6428f2905c15","delegation":"0xA44151489861Fe9e3055d95adC98FbD462B948e7","delegationManagerImpl":"0x83f8F8f0BB125F7870F6bfCf76853f874C330D76","avsDirectory":"0x055733000064333CaDDbC92763c58BF0192fFeBf","avsDirectoryImpl":"0xEF5BA995Bc7722fd1e163edF8Dc09375de3d3e3a","strategyManager":"0xdfB5f6CE42aAA7830E94ECFCcAd411beF4d4D5b6","strategyManagerImpl":"0x59f766A603C53f3AC8Be43bBe158c1519b193a18","eigenPodManager":"0x30770d7E3e71112d7A6b7259542D1f680a70e315","eigenPodManagerImpl":"0x91A6525a4a843F5a5B633905300c33F79413CCc5","strategyFactory":"0x9c01252B580efD11a05C00Aa42Dd3ac1Ec52DF6d","strategyFactoryImpl":"0x5E699de7bFc4DD2A5E72EB5a2Ca99651EfdD51CB","strategyBeacon":"0xd3c6C6BA4E40dB9288c6a2077e5635344F8aFA4F","allocationManager": "0x78469728304326CBc65f8f95FA756B0B73164462","rewardsCoordinator":"0xAcc1fb458a1317E886dB376Fc8141540537E68fE","rewardsCoordinatorImpl":"0xA3c31d2FBAD3d924baA64f8789E03E9FA7d70d69"}}
{"lastUpdate":{"timestamp":"1733242248","block_number":"0"},"addresses":{"proxyAdmin":"0xB043055dd967A382577c2f5261fA6428f2905c15","delegation":"0xA44151489861Fe9e3055d95adC98FbD462B948e7","delegationManagerImpl":"0x83f8F8f0BB125F7870F6bfCf76853f874C330D76","avsDirectory":"0x055733000064333CaDDbC92763c58BF0192fFeBf","avsDirectoryImpl":"0xEF5BA995Bc7722fd1e163edF8Dc09375de3d3e3a","strategyManager":"0xdfB5f6CE42aAA7830E94ECFCcAd411beF4d4D5b6","strategyManagerImpl":"0x59f766A603C53f3AC8Be43bBe158c1519b193a18","eigenPodManager":"0x30770d7E3e71112d7A6b7259542D1f680a70e315","eigenPodManagerImpl":"0x91A6525a4a843F5a5B633905300c33F79413CCc5","strategyFactory":"0x9c01252B580efD11a05C00Aa42Dd3ac1Ec52DF6d","strategyFactoryImpl":"0x5E699de7bFc4DD2A5E72EB5a2Ca99651EfdD51CB","strategyBeacon":"0xd3c6C6BA4E40dB9288c6a2077e5635344F8aFA4F","allocationManager": "0x78469728304326CBc65f8f95FA756B0B73164462","rewardsCoordinator":"0xAcc1fb458a1317E886dB376Fc8141540537E68fE","rewardsCoordinatorImpl":"0xA3c31d2FBAD3d924baA64f8789E03E9FA7d70d69"}, "metaDataURI": "https://raw.githubusercontent.com/ethgas-developer/ethgas-developer.github.io/main/vision-avs-2.json"}
2 changes: 1 addition & 1 deletion contracts/deployments/layer-middleware/17000.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{"lastUpdate":{"timestamp":"1733248624","block_number":"2864451"},"addresses":{"proxyAdmin":"0x6c3f7ed79b9d75486d0250946f7a20bda74844ba","helloWorldServiceManager":"0x43c5df0c482c88cef8005389f64c362ee720a5bc","helloWorldServiceManagerImpl":"0xcac60200c1cb424f2c1e438c7ee1b98d487f0254","stakeRegistry":"0xf01f4567586c3a707ebec87651320b2dd9f4a287","stakeRegistryImpl":"0x2b07f89c9f574a890f5b8b7fddafbbae40f6fde2","strategy":"0xb2327bdc57aad3e246095ecf2d66a8773f1516d6","token":"0x5aadfb43ef8daf45dd80f4676345b7676f1d70e3"}}
{"lastUpdate":{"timestamp":"1733248624","block_number":"2864451"},"addresses":{"proxyAdmin":"0x6c3f7ed79b9d75486d0250946f7a20bda74844ba","helloWorldServiceManager":"0x43c5df0c482c88cef8005389f64c362ee720a5bc","helloWorldServiceManagerImpl":"0xcac60200c1cb424f2c1e438c7ee1b98d487f0254","stakeRegistry":"0xf01f4567586c3a707ebec87651320b2dd9f4a287","stakeRegistryImpl":"0x2b07f89c9f574a890f5b8b7fddafbbae40f6fde2","strategy":"0xb2327bdc57aad3e246095ecf2d66a8773f1516d6","token":"0x5aadfb43ef8daf45dd80f4676345b7676f1d70e3"}, "metaDataURI": "https://raw.githubusercontent.com/ethgas-developer/ethgas-developer.github.io/main/vision-avs-2.json"}

16 changes: 16 additions & 0 deletions contracts/script/utils/CoreDeploymentLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ library CoreDeploymentLib {
address strategyFactory;
address strategyBeacon;
address permissionController;
string metadataURI;
}

function deployContracts(
Expand Down Expand Up @@ -471,6 +472,19 @@ library CoreDeploymentLib {
return data;
}

function readMetadataURI(string memory json, DeploymentData memory data) internal returns (DeploymentData memory) {
try vm.parseJson(json, ".metaDataURI") returns (bytes memory parsed) {
if (parsed.length > 0) {
data.metadataURI = abi.decode(parsed, (string));
} else {
revert("metadataURI not found in JSON. Might need to add to writeDeploymentJson");
}
} catch {
revert("metadataURI not found in JSON. Might need to add to writeDeploymentJson");
}
return data;
}

function readDeploymentJson(
string memory directoryPath,
uint256 chainId
Expand All @@ -493,6 +507,8 @@ library CoreDeploymentLib {
DeploymentData memory data;
data = readFirstAddressSet(json, data);
data = readSecondAddressSet(json, data);
data = readMetadataURI(json, data);

return data;
}

Expand Down
18 changes: 11 additions & 7 deletions contracts/script/utils/LayerMiddlewareDeplomentLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ library LayerMiddlewareDeploymentLib {
address strategy;
address token;
address avsRegistrar;
string metadataURI;
}

function deployContracts(
Expand Down Expand Up @@ -79,6 +80,7 @@ library LayerMiddlewareDeploymentLib {
address avsRegistrar = address(new LayerAVSRegistrar());
result.avsRegistrar = avsRegistrar;

result.metadataURI = core.metadataURI;
return result;
}

Expand Down Expand Up @@ -140,13 +142,15 @@ library LayerMiddlewareDeploymentLib {
address proxyAdmin
) private view returns (string memory) {
return string.concat(
'{"lastUpdate":{"timestamp":"',
vm.toString(block.timestamp),
'","block_number":"',
vm.toString(block.number),
'"},"addresses":',
_generateContractsJson(data, proxyAdmin),
"}"
'{',
'"lastUpdate":{',
'"timestamp":"', vm.toString(block.timestamp), '",',
'"block_number":"', vm.toString(block.number), '"',
'},',
'"addresses":',
_generateContractsJson(data, proxyAdmin),
',"metaDataURI":"', data.metadataURI, '"',
'}'
);
}

Expand Down