Skip to content

Commit

Permalink
fix(create-mud): make worlds.json address type more specific (#2685)
Browse files Browse the repository at this point in the history
  • Loading branch information
holic authored Apr 18, 2024
1 parent 632a752 commit 534e772
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/shiny-donuts-matter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-mud": patch
---

Made `worlds.json`'s `address` type more like viem's `Hex` type so it's easy to pass through as an argument.
2 changes: 1 addition & 1 deletion e2e/packages/contracts/worlds.json.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
declare const worlds: Partial<Record<string, { address: string; blockNumber?: number }>>;
declare const worlds: Partial<Record<string, { address: `0x${string}`; blockNumber?: number }>>;
export default worlds;
2 changes: 1 addition & 1 deletion examples/minimal/packages/contracts/worlds.json.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
declare const worlds: Partial<Record<string, { address: string; blockNumber?: number }>>;
declare const worlds: Partial<Record<string, { address: `0x${string}`; blockNumber?: number }>>;
export default worlds;
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
declare const worlds: Partial<Record<string, { address: string; blockNumber?: number }>>;
declare const worlds: Partial<Record<string, { address: `0x${string}`; blockNumber?: number }>>;
export default worlds;
2 changes: 1 addition & 1 deletion templates/phaser/packages/contracts/worlds.json.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
declare const worlds: Partial<Record<string, { address: string; blockNumber?: number }>>;
declare const worlds: Partial<Record<string, { address: `0x${string}`; blockNumber?: number }>>;
export default worlds;
2 changes: 1 addition & 1 deletion templates/react-ecs/packages/contracts/worlds.json.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
declare const worlds: Partial<Record<string, { address: string; blockNumber?: number }>>;
declare const worlds: Partial<Record<string, { address: `0x${string}`; blockNumber?: number }>>;
export default worlds;
2 changes: 1 addition & 1 deletion templates/react/packages/contracts/worlds.json.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
declare const worlds: Partial<Record<string, { address: string; blockNumber?: number }>>;
declare const worlds: Partial<Record<string, { address: `0x${string}`; blockNumber?: number }>>;
export default worlds;
2 changes: 1 addition & 1 deletion templates/threejs/packages/contracts/worlds.json.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
declare const worlds: Partial<Record<string, { address: string; blockNumber?: number }>>;
declare const worlds: Partial<Record<string, { address: `0x${string}`; blockNumber?: number }>>;
export default worlds;
2 changes: 1 addition & 1 deletion templates/vanilla/packages/contracts/worlds.json.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
declare const worlds: Partial<Record<string, { address: string; blockNumber?: number }>>;
declare const worlds: Partial<Record<string, { address: `0x${string}`; blockNumber?: number }>>;
export default worlds;

0 comments on commit 534e772

Please sign in to comment.