fix: align deployment manifest schema

This commit is contained in:
golem
2026-08-21 02:55:41 -06:00
parent be8f01ea4e
commit c6bf8a683f
8 changed files with 389 additions and 139 deletions
+12 -17
View File
@@ -37,35 +37,30 @@ contract DeployV1 is DemoScript {
Manifest memory manifest;
manifest.schemaVersion = 1;
manifest.network = block.chainid == ANVIL_CHAIN_ID ? "anvil" : "base-sepolia";
manifest.network = block.chainid == ANVIL_CHAIN_ID ? "anvil" : "baseSepolia";
manifest.chainId = block.chainid;
manifest.deploymentBlock = 0;
manifest.rpcUrl = block.chainid == ANVIL_CHAIN_ID ? "http://127.0.0.1:8545" : "https://sepolia.base.org";
manifest.explorerUrl = block.chainid == ANVIL_CHAIN_ID ? "" : "https://sepolia.basescan.org";
manifest.rpcUrl = block.chainid == ANVIL_CHAIN_ID ? "http://127.0.0.1:8545" : "";
manifest.token = tokenAddress;
manifest.proxy = proxy;
manifest.implementation = implementation;
manifest.owner = sender;
(manifest.actorLabels, manifest.actors) = _actors(sender);
manifest.actors = _actors(sender);
_writeManifest(_manifestPath(PENDING_MANIFEST_PATH), manifest);
}
function _actors(address sender) private view returns (string[] memory labels, address[] memory actors) {
function _actors(address sender) private view returns (Actor[] memory actors) {
if (block.chainid == ANVIL_CHAIN_ID) {
labels = new string[](3);
actors = new address[](3);
labels[0] = "owner";
labels[1] = "Alice";
labels[2] = "Bob";
actors[0] = sender;
(, actors[1]) = _deriveLocalActor(block.chainid, 1);
(, actors[2]) = _deriveLocalActor(block.chainid, 2);
actors = new Actor[](3);
actors[0] = Actor({label: "owner", address_: sender});
(, actors[1].address_) = _deriveLocalActor(block.chainid, 1);
(, actors[2].address_) = _deriveLocalActor(block.chainid, 2);
actors[1].label = "Alice";
actors[2].label = "Bob";
} else {
labels = new string[](1);
actors = new address[](1);
labels[0] = "owner";
actors[0] = sender;
actors = new Actor[](1);
actors[0] = Actor({label: "owner", address_: sender});
}
}
}