@latticexyz/cli 2.2.24-7fc3f6370bc1c1107de1471098f0ba3225fb62d8 → 2.2.24-a851c91de9ca31fe4d522ac33c07cfdd0e403853

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1528,7 +1528,7 @@ async function deploy({
1528
1528
  throw new Error(`Unsupported World version: ${worldDeploy.worldVersion}`);
1529
1529
  }
1530
1530
  const libraryMap = getLibraryMap(libraries);
1531
- await ensureContractsDeployed5({
1531
+ const deployedContracts = await ensureContractsDeployed5({
1532
1532
  ...commonDeployOptions,
1533
1533
  deployerAddress,
1534
1534
  contracts: [
@@ -1607,7 +1607,13 @@ async function deploy({
1607
1607
  debugLabel: "remaining transactions"
1608
1608
  });
1609
1609
  debug2("deploy complete");
1610
- return worldDeploy;
1610
+ return {
1611
+ ...worldDeploy,
1612
+ contracts: deployedContracts.map(({ contract, deployedAddress }) => ({
1613
+ label: contract.debugLabel ?? "unknown",
1614
+ address: deployedAddress
1615
+ }))
1616
+ };
1611
1617
  }
1612
1618
 
1613
1619
  // src/runDeploy.ts
@@ -2095,7 +2101,7 @@ Using ${package_default.name}@${package_default.version}`));
2095
2101
  console.log("Deploying from", client.account.address);
2096
2102
  const automine = await enableAutomine(client);
2097
2103
  const startTime = Date.now();
2098
- const worldDeploy = await deploy({
2104
+ const deployResult = await deploy({
2099
2105
  config,
2100
2106
  deployerAddress: opts.deployerAddress,
2101
2107
  salt,
@@ -2113,7 +2119,7 @@ Using ${package_default.name}@${package_default.version}`));
2113
2119
  if (opts.worldAddress == null || opts.alwaysRunPostDeploy) {
2114
2120
  await postDeploy(
2115
2121
  config.deploy.postDeployScript,
2116
- worldDeploy.address,
2122
+ deployResult.address,
2117
2123
  rpc,
2118
2124
  profile,
2119
2125
  opts.forgeScriptOptions,
@@ -2123,8 +2129,9 @@ Using ${package_default.name}@${package_default.version}`));
2123
2129
  await automine?.reset();
2124
2130
  console.log(chalk2.green("Deployment completed in", (Date.now() - startTime) / 1e3, "seconds"));
2125
2131
  const deploymentInfo = {
2126
- worldAddress: worldDeploy.address,
2127
- blockNumber: Number(worldDeploy.deployBlock)
2132
+ worldAddress: deployResult.address,
2133
+ blockNumber: Number(deployResult.deployBlock),
2134
+ contracts: deployResult.contracts
2128
2135
  };
2129
2136
  if (opts.saveDeployment) {
2130
2137
  const deploysDir = path9.join(config.deploy.deploysDirectory, chainId.toString());
@@ -2148,8 +2155,8 @@ Using ${package_default.name}@${package_default.version}`));
2148
2155
  )
2149
2156
  );
2150
2157
  }
2151
- console.log(deploymentInfo);
2152
- return worldDeploy;
2158
+ console.log({ worldAddress: deploymentInfo.worldAddress, blockNumber: deploymentInfo.blockNumber });
2159
+ return deployResult;
2153
2160
  }
2154
2161
  function getWorldDeployBlock({
2155
2162
  chainId,
@@ -2480,7 +2487,8 @@ var testOptions = {
2480
2487
  type: "string",
2481
2488
  description: "Address of an existing world contract. If provided, deployment is skipped and the RPC provided in the foundry.toml is used for fork testing."
2482
2489
  },
2483
- forgeOptions: { type: "string", description: "Options to pass to forge test" }
2490
+ forgeOptions: { type: "string", description: "Options to pass to forge test" },
2491
+ saveDeployment: { type: "boolean", desc: "Save the deployment info to a file", default: false }
2484
2492
  };
2485
2493
  var commandModule8 = {
2486
2494
  command: "test",
@@ -2500,7 +2508,7 @@ var commandModule8 = {
2500
2508
  const forkRpc = opts.worldAddress ? await getRpcUrl2(opts.profile) : `http://127.0.0.1:${opts.port}`;
2501
2509
  const worldAddress = opts.worldAddress ?? (await runDeploy({
2502
2510
  ...opts,
2503
- saveDeployment: false,
2511
+ saveDeployment: opts.saveDeployment,
2504
2512
  rpc: forkRpc
2505
2513
  })).address;
2506
2514
  console.log(chalk4.blue("World address", worldAddress));
@@ -3249,4 +3257,4 @@ var commands = [
3249
3257
  export {
3250
3258
  commands
3251
3259
  };
3252
- //# sourceMappingURL=commands-IDBOJLTZ.js.map
3260
+ //# sourceMappingURL=commands-NZSIXA6W.js.map