mud

MUD is a framework for building ambitious onchain applications

MIT License

Downloads
318.4K
Stars
643
Committers
80

Bot releases are visible (Hide)

mud - @latticexyz/[email protected] Latest Release

Published by github-actions[bot] 3 months ago

Minor Changes

  • e85dc53: Tables and systems in config output now include a label property. Labels are now used throughout the codebase as a user-friendly way to reference the given resource: config keys, contract names, generated libraries, etc.

    Inside namespaces config output, keys for tables and systems and their filenames will always correspond to their labels. This should make MUD tooling more intuitive and predictable. For backwards compatibility, tables config output still uses namespace-prefixed keys.

    Labels replace the previous resource name usage, which is truncated to bytes16 to be used as part of the resource ID and, in the future, may not always be human-readable.

    These labels will soon be registered onchain so that developers can initialize a new MUD project from an existing world, generating config and interfaces with user-friendly names.

  • a10b453: MUD projects can now use multiple namespaces via a new top-level namespaces config option.

    import { defineWorld } from "@latticexyz/world";
    
    export default defineWorld({
      namespaces: {
        game: {
          tables: {
            Player: { ... },
            Position: { ... },
          },
        },
        guilds: {
          tables: {
            Guild: { ... },
          },
          systems: {
            MembershipSystem: { ... },
            TreasurySystem: { ... },
          },
        },
      },
    });
    

    Once you use the top-level namespaces config option, your project will be in "multiple namespaces mode", which expects a source directory structure similar to the config structure: a top-level namespaces directory with nested namespace directories that correspond to each namespace label in the config.

    ~/guilds
    ├── mud.config.ts
    └── src
        └── namespaces
            ├── game
            │   └── codegen
            │       └── tables
            │           ├── Player.sol
            │           └── Position.sol
            └── guilds
                ├── MembershipSystem.sol
                ├── TreasurySystem.sol
                └── codegen
                    └── tables
                        └── Guild.sol
    

Patch Changes

  • 570086e: Refactored worldgen in preparation for multiple namespaces.
  • 7129a16: Bumped @arktype/util and moved evaluate/satisfy usages to its show/satisfy helpers.
  • 3cbbc62: Refactored how worldgen resolves systems from the config and filesystem.
  • e49059f: Bumped glob dependency.
  • fb1cfef: Refactored how the config handles shorthand table definitions, greatly simplifying the codebase. This will make it easier to add support for multiple namespaces.
  • Updated dependencies [24e285d]
  • Updated dependencies [7129a16]
  • Updated dependencies [7129a16]
  • Updated dependencies [e85dc53]
  • Updated dependencies [a10b453]
  • Updated dependencies [69eb63b]
  • Updated dependencies [8d0453e]
  • Updated dependencies [fb1cfef]
mud - @latticexyz/[email protected]

Published by github-actions[bot] 3 months ago

Patch Changes

  • 9e05278: Refactored package to use the new Store/World configs under the hood, removing compatibility layers and improving performance.

  • f640fef: Adjusted SyncToRecsOptions type intersection to improve TypeScript performance.

  • 3440a86: Refactored syncToRecs and syncToZustand to use tables from config namespaces output. This is a precursor for supporting multiple namespaces.

    Note for library authors: If you were using createStorageAdapter from @latticexyz/store-sync/recs, this helper no longer appends MUD's built-in tables from Store and World packages. This behavior was moved into syncToRecs for consistency with syncToZustand and makes createStorageAdapter less opinionated.

    You can achieve the previous behavior with:

     import { createStorageAdapter } from "@latticexyz/store-sync/recs";
    +import { mudTables } from "@latticexyz/store-sync";
    
     createStorageAdapter({
    -  tables,
    +  tables: { ...tables, ...mudTables },
       ...
     });
    
  • Updated dependencies [24e285d]

  • Updated dependencies [570086e]

  • Updated dependencies [7129a16]

  • Updated dependencies [3cbbc62]

  • Updated dependencies [7129a16]

  • Updated dependencies [e85dc53]

  • Updated dependencies [a10b453]

  • Updated dependencies [69eb63b]

  • Updated dependencies [e49059f]

  • Updated dependencies [8d0453e]

  • Updated dependencies [fb1cfef]

mud - @latticexyz/[email protected]

Published by github-actions[bot] 3 months ago

Patch Changes

  • 3cbbc62: Moved build scripts to mud build now that CLI doesn't depend on this package.

    Removed generated world interfaces as this package isn't meant to be used as a "world", but as a set of individual modules.

  • e49059f: Bumped glob dependency.

  • Updated dependencies [24e285d]

  • Updated dependencies [570086e]

  • Updated dependencies [7129a16]

  • Updated dependencies [3cbbc62]

  • Updated dependencies [7129a16]

  • Updated dependencies [e85dc53]

  • Updated dependencies [a10b453]

  • Updated dependencies [69eb63b]

  • Updated dependencies [e49059f]

  • Updated dependencies [8d0453e]

  • Updated dependencies [fb1cfef]

mud - @latticexyz/[email protected]

Published by github-actions[bot] 3 months ago

Minor Changes

  • e85dc53: Tables and systems in config output now include a label property. Labels are now used throughout the codebase as a user-friendly way to reference the given resource: config keys, contract names, generated libraries, etc.

    Inside namespaces config output, keys for tables and systems and their filenames will always correspond to their labels. This should make MUD tooling more intuitive and predictable. For backwards compatibility, tables config output still uses namespace-prefixed keys.

    Labels replace the previous resource name usage, which is truncated to bytes16 to be used as part of the resource ID and, in the future, may not always be human-readable.

    These labels will soon be registered onchain so that developers can initialize a new MUD project from an existing world, generating config and interfaces with user-friendly names.

  • a10b453: MUD projects can now use multiple namespaces via a new top-level namespaces config option.

    import { defineWorld } from "@latticexyz/world";
    
    export default defineWorld({
      namespaces: {
        game: {
          tables: {
            Player: { ... },
            Position: { ... },
          },
        },
        guilds: {
          tables: {
            Guild: { ... },
          },
          systems: {
            MembershipSystem: { ... },
            TreasurySystem: { ... },
          },
        },
      },
    });
    

    Once you use the top-level namespaces config option, your project will be in "multiple namespaces mode", which expects a source directory structure similar to the config structure: a top-level namespaces directory with nested namespace directories that correspond to each namespace label in the config.

    ~/guilds
    ├── mud.config.ts
    └── src
        └── namespaces
            ├── game
            │   └── codegen
            │       └── tables
            │           ├── Player.sol
            │           └── Position.sol
            └── guilds
                ├── MembershipSystem.sol
                ├── TreasurySystem.sol
                └── codegen
                    └── tables
                        └── Guild.sol
    

Patch Changes

  • 24e285d: Disabled deploy of Hooks table, as this was meant to be a generic, codegen-only table.

  • 7129a16: Bumped @arktype/util and moved evaluate/satisfy usages to its show/satisfy helpers.

  • 69eb63b: Refactored tablegen in preparation for multiple namespaces and addressed a few edge cases:

    • User types configured with a relative filePath are now resolved relative to the project root (where the mud.config.ts lives) rather than the current working directory.
    • User types inside libraries now need to be referenced with their fully-qualified code path (e.g. LibraryName.UserTypeName).
  • fb1cfef: Refactored how the config handles shorthand table definitions, greatly simplifying the codebase. This will make it easier to add support for multiple namespaces.

  • Updated dependencies [7129a16]

  • Updated dependencies [7129a16]

  • Updated dependencies [e85dc53]

  • Updated dependencies [8d0453e]

mud - @latticexyz/[email protected]

Published by github-actions[bot] 3 months ago

mud - @latticexyz/[email protected]

Published by github-actions[bot] 3 months ago

Patch Changes

  • b62cf9f: Updated return values to match updated types in @latticexyz/store-sync.
  • Updated dependencies [24e285d]
  • Updated dependencies [9e05278]
  • Updated dependencies [f640fef]
  • Updated dependencies [7129a16]
  • Updated dependencies [3440a86]
  • Updated dependencies [7129a16]
  • Updated dependencies [e85dc53]
  • Updated dependencies [a10b453]
  • Updated dependencies [69eb63b]
  • Updated dependencies [8d0453e]
  • Updated dependencies [fb1cfef]
mud - [email protected]

Published by github-actions[bot] 3 months ago

mud - @latticexyz/[email protected]

Published by github-actions[bot] 3 months ago

Patch Changes

mud - [email protected]

Published by github-actions[bot] 3 months ago

mud - @latticexyz/[email protected]

Published by github-actions[bot] 3 months ago

mud - @latticexyz/[email protected]

Published by github-actions[bot] 3 months ago

Patch Changes

  • Updated dependencies [24e285d]
  • Updated dependencies [7129a16]
  • Updated dependencies [e85dc53]
  • Updated dependencies [a10b453]
  • Updated dependencies [69eb63b]
  • Updated dependencies [fb1cfef]
mud - @latticexyz/[email protected]

Published by github-actions[bot] 3 months ago

Patch Changes

mud - @latticexyz/[email protected]

Published by github-actions[bot] 3 months ago

Patch Changes

  • 7129a16: Bumped @arktype/util and moved evaluate/satisfy usages to its show/satisfy helpers.
  • Updated dependencies [24e285d]
  • Updated dependencies [7129a16]
  • Updated dependencies [7129a16]
  • Updated dependencies [e85dc53]
  • Updated dependencies [a10b453]
  • Updated dependencies [69eb63b]
  • Updated dependencies [8d0453e]
  • Updated dependencies [fb1cfef]
mud - [email protected]

Published by github-actions[bot] 3 months ago

Patch Changes

  • e49059f: Bumped glob dependency.
mud - @latticexyz/[email protected]

Published by github-actions[bot] 3 months ago

mud - @latticexyz/[email protected]

Published by github-actions[bot] 3 months ago

Patch Changes

  • Updated dependencies [7129a16]
  • Updated dependencies [8d0453e]
mud - @latticexyz/[email protected]

Published by github-actions[bot] 3 months ago

Patch Changes

  • 9e05278: Updated Zustand components after changes to syncToZustand.
  • Updated dependencies [24e285d]
  • Updated dependencies [9e05278]
  • Updated dependencies [570086e]
  • Updated dependencies [f640fef]
  • Updated dependencies [7129a16]
  • Updated dependencies [3440a86]
  • Updated dependencies [3cbbc62]
  • Updated dependencies [7129a16]
  • Updated dependencies [e85dc53]
  • Updated dependencies [a10b453]
  • Updated dependencies [69eb63b]
  • Updated dependencies [e49059f]
  • Updated dependencies [8d0453e]
  • Updated dependencies [fb1cfef]
mud - @latticexyz/[email protected]

Published by github-actions[bot] 3 months ago

Minor Changes

  • a10b453: MUD projects can now use multiple namespaces via a new top-level namespaces config option.

    import { defineWorld } from "@latticexyz/world";
    
    export default defineWorld({
      namespaces: {
        game: {
          tables: {
            Player: { ... },
            Position: { ... },
          },
        },
        guilds: {
          tables: {
            Guild: { ... },
          },
          systems: {
            MembershipSystem: { ... },
            TreasurySystem: { ... },
          },
        },
      },
    });
    

    Once you use the top-level namespaces config option, your project will be in "multiple namespaces mode", which expects a source directory structure similar to the config structure: a top-level namespaces directory with nested namespace directories that correspond to each namespace label in the config.

    ~/guilds
    ├── mud.config.ts
    └── src
        └── namespaces
            ├── game
            │   └── codegen
            │       └── tables
            │           ├── Player.sol
            │           └── Position.sol
            └── guilds
                ├── MembershipSystem.sol
                ├── TreasurySystem.sol
                └── codegen
                    └── tables
                        └── Guild.sol
    

Patch Changes

  • 3cbbc62: Refactored package to use the new Store/World configs under the hood, removing compatibility layers.

    Removed --srcDir option from all commands in favor of using sourceDirectory in the project's MUD config.

  • 24e285d: mud deploy will now correctly skip tables configured with deploy: { disabled: true }.

  • 2da9e48: Refactored CLI commands to use tables from config namespaces output. This is a precursor for supporting multiple namespaces.

  • 609de11: Refactored mud trace command to use Viem instead of Ethers and removed Ethers dependencies from the package.

  • e49059f: Bumped glob dependency.

  • Updated dependencies [24e285d]

  • Updated dependencies [570086e]

  • Updated dependencies [7129a16]

  • Updated dependencies [3cbbc62]

  • Updated dependencies [7129a16]

  • Updated dependencies [e85dc53]

  • Updated dependencies [a10b453]

  • Updated dependencies [69eb63b]

  • Updated dependencies [e49059f]

  • Updated dependencies [8d0453e]

  • Updated dependencies [fb1cfef]

mud - @latticexyz/[email protected]

Published by github-actions[bot] 3 months ago

Minor Changes

  • e85dc53: Tables and systems in config output now include a label property. Labels are now used throughout the codebase as a user-friendly way to reference the given resource: config keys, contract names, generated libraries, etc.

    Inside namespaces config output, keys for tables and systems and their filenames will always correspond to their labels. This should make MUD tooling more intuitive and predictable. For backwards compatibility, tables config output still uses namespace-prefixed keys.

    Labels replace the previous resource name usage, which is truncated to bytes16 to be used as part of the resource ID and, in the future, may not always be human-readable.

    These labels will soon be registered onchain so that developers can initialize a new MUD project from an existing world, generating config and interfaces with user-friendly names.

Patch Changes

  • 7129a16: Bumped @arktype/util and moved evaluate/satisfy usages to its show/satisfy helpers.
  • Updated dependencies [7129a16]
  • Updated dependencies [8d0453e]
mud - @latticexyz/[email protected]

Published by github-actions[bot] 3 months ago

Patch Changes

  • 7129a16: Removed evaluate and satisfy type utils in favor of show and satisfy from @arktype/util.
  • 8d0453e: resourceToHex will now throw if provided namespace is >14 characters. Since namespaces are used to determine access control, it's not safe to automatically truncate to fit into bytes14 as that may change the indended namespace for resource access.