Skip to content

Commit

Permalink
refactor(world,cli): rename useProxy to `upgradeableWorldImplementa…
Browse files Browse the repository at this point in the history
…tion` (#2732)
  • Loading branch information
yonadaa authored Apr 25, 2024
1 parent 182d706 commit 1ccd627
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .changeset/spicy-bags-cough.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
"@latticexyz/cli": patch
---

Added a `deploy.useProxy` option to the MUD config that deploys the World as an upgradable proxy contract. The proxy behaves like a regular World contract, but the underlying implementation can be upgraded by calling `setImplementation`.
Added a `deploy.upgradeableWorldImplementation` option to the MUD config that deploys the World as an upgradeable proxy contract. The proxy behaves like a regular World contract, but the underlying implementation can be upgraded by calling `setImplementation`.
2 changes: 1 addition & 1 deletion packages/cli/src/runDeploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ in your contracts directory to use the default anvil private key.`,
worldAddress: opts.worldAddress as Hex | undefined,
client,
config: resolvedConfig,
withWorldProxy: configV2.deploy.useProxy,
withWorldProxy: configV2.deploy.upgradeableWorldImplementation,
});
if (opts.worldAddress == null || opts.alwaysRunPostDeploy) {
await postDeploy(config.postDeployScript, worldDeploy.address, rpc, profile, opts.forgeScriptOptions);
Expand Down
2 changes: 1 addition & 1 deletion packages/world/ts/config/v2/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const DEPLOY_DEFAULTS = {
postDeployScript: "PostDeploy",
deploysDirectory: "./deploys",
worldsFile: "./worlds.json",
useProxy: false,
upgradeableWorldImplementation: false,
} as const;

export type DEPLOY_DEFAULTS = typeof DEPLOY_DEFAULTS;
Expand Down
4 changes: 2 additions & 2 deletions packages/world/ts/config/v2/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export type DeployInput = {
deploysDirectory?: string;
/** JSON file to write to with chain -> latest world deploy address (Default "./worlds.json") */
worldsFile?: string;
/** Deploy the World as an upgradable proxy */
useProxy?: boolean;
/** Deploy the World as an upgradeable proxy */
upgradeableWorldImplementation?: boolean;
};

export type CodegenInput = {
Expand Down
4 changes: 2 additions & 2 deletions packages/world/ts/config/v2/output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ export type Deploy = {
readonly deploysDirectory: string;
/** JSON file to write to with chain -> latest world deploy address (Default "./worlds.json") */
readonly worldsFile: string;
/** Deploy the World as an upgradable proxy */
readonly useProxy: boolean;
/** Deploy the World as an upgradeable proxy */
readonly upgradeableWorldImplementation: boolean;
};

export type Codegen = {
Expand Down

0 comments on commit 1ccd627

Please sign in to comment.