Skip to content

Commit

Permalink
fix(cli): update state block in dev runner redeploy (#3243)
Browse files Browse the repository at this point in the history
  • Loading branch information
alvrs authored Sep 30, 2024
1 parent fe2d153 commit 111bb1b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/kind-kangaroos-leave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@latticexyz/cli": patch
---

Fixed a dev runner bug where the state block of a previous deploy was not updated during a redeploy, causing failed deploys due to fetching outdated world state.
5 changes: 4 additions & 1 deletion packages/cli/src/deploy/getWorldDeploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ export async function getWorldDeploy(client: Client, worldAddress: Address): Pro

let deploy = deploys.get(address);
if (deploy != null) {
return deploy;
return {
...deploy,
stateBlock: (await getBlock(client, { blockTag: "latest" })).number,
};
}

debug("looking up world deploy for", address);
Expand Down

0 comments on commit 111bb1b

Please sign in to comment.