Skip to content

Releases: latticexyz/mud

solhint-plugin-mud@2.0.12

31 May 12:46
b037b0f
Compare
Choose a tag to compare

Patch Changes

  • 96e7bf4: TS source has been removed from published packages in favor of DTS in an effort to improve TS performance. All packages now inherit from a base TS config in @latticexyz/common to allow us to continue iterating on TS performance without requiring changes in your project code.

    If you have a MUD project that you're upgrading, we suggest adding a tsconfig.json file to your project workspace that extends this base config.

    pnpm add -D @latticexyz/common
    echo "{\n  \"extends\": \"@latticexyz/common/tsconfig.base.json\"\n}" > tsconfig.json

    Then in each package of your project, inherit from your workspace root's config.

    For example, your TS config in packages/contracts/tsconfig.json might look like:

    {
      "extends": "../../tsconfig.json"
    }

    And your TS config in packages/client/tsconfig.json might look like:

    {
      "extends": "../../tsconfig.json",
      "compilerOptions": {
        "types": ["vite/client"],
        "target": "ESNext",
        "lib": ["ESNext", "DOM"],
        "jsx": "react-jsx",
        "jsxImportSource": "react"
      },
      "include": ["src"]
    }

    You may need to adjust the above configs to include any additional TS options you've set. This config pattern may also reveal new TS errors that need to be fixed or rules disabled.

    If you want to keep your existing TS configs, we recommend at least updating your moduleResolution setting.

    -"moduleResolution": "node"
    +"moduleResolution": "Bundler"

solhint-config-mud@2.0.12

31 May 12:46
b037b0f
Compare
Choose a tag to compare

Patch Changes

  • 96e7bf4: TS source has been removed from published packages in favor of DTS in an effort to improve TS performance. All packages now inherit from a base TS config in @latticexyz/common to allow us to continue iterating on TS performance without requiring changes in your project code.

    If you have a MUD project that you're upgrading, we suggest adding a tsconfig.json file to your project workspace that extends this base config.

    pnpm add -D @latticexyz/common
    echo "{\n  \"extends\": \"@latticexyz/common/tsconfig.base.json\"\n}" > tsconfig.json

    Then in each package of your project, inherit from your workspace root's config.

    For example, your TS config in packages/contracts/tsconfig.json might look like:

    {
      "extends": "../../tsconfig.json"
    }

    And your TS config in packages/client/tsconfig.json might look like:

    {
      "extends": "../../tsconfig.json",
      "compilerOptions": {
        "types": ["vite/client"],
        "target": "ESNext",
        "lib": ["ESNext", "DOM"],
        "jsx": "react-jsx",
        "jsxImportSource": "react"
      },
      "include": ["src"]
    }

    You may need to adjust the above configs to include any additional TS options you've set. This config pattern may also reveal new TS errors that need to be fixed or rules disabled.

    If you want to keep your existing TS configs, we recommend at least updating your moduleResolution setting.

    -"moduleResolution": "node"
    +"moduleResolution": "Bundler"

create-mud@2.0.12

31 May 12:45
b037b0f
Compare
Choose a tag to compare

Patch Changes

  • 96e7bf4: TS source has been removed from published packages in favor of DTS in an effort to improve TS performance. All packages now inherit from a base TS config in @latticexyz/common to allow us to continue iterating on TS performance without requiring changes in your project code.

    If you have a MUD project that you're upgrading, we suggest adding a tsconfig.json file to your project workspace that extends this base config.

    pnpm add -D @latticexyz/common
    echo "{\n  \"extends\": \"@latticexyz/common/tsconfig.base.json\"\n}" > tsconfig.json

    Then in each package of your project, inherit from your workspace root's config.

    For example, your TS config in packages/contracts/tsconfig.json might look like:

    {
      "extends": "../../tsconfig.json"
    }

    And your TS config in packages/client/tsconfig.json might look like:

    {
      "extends": "../../tsconfig.json",
      "compilerOptions": {
        "types": ["vite/client"],
        "target": "ESNext",
        "lib": ["ESNext", "DOM"],
        "jsx": "react-jsx",
        "jsxImportSource": "react"
      },
      "include": ["src"]
    }

    You may need to adjust the above configs to include any additional TS options you've set. This config pattern may also reveal new TS errors that need to be fixed or rules disabled.

    If you want to keep your existing TS configs, we recommend at least updating your moduleResolution setting.

    -"moduleResolution": "node"
    +"moduleResolution": "Bundler"
  • d752660: Removed unnecessary build step in scripts and added deploy scripts for Redstone and Garnet chains.

@latticexyz/world@2.0.12

31 May 12:46
b037b0f
Compare
Choose a tag to compare

Patch Changes

  • c10c9fb: Added sourceDirectory as a top-level config option for specifying contracts source (i.e. Solidity) directory relative to the MUD config. This is used to resolve other paths in the config, like codegen and user types. Like foundry.toml, this defaults to src and should be kept in sync with foundry.toml.

    Also added a codegen.namespaceDirectories option to organize codegen output (table libraries, etc.) into directories by namespace. For example, a Counter table in the app namespace will have codegen at codegen/app/tables/Counter.sol. If not set, defaults to true when using top-level namespaces key, false otherwise.

  • 9be2bb8: Fixed resolveTableId usage within config's module args to allow referencing both namespaced tables (e.g. resolveTableId("app_Tasks")) as well as tables by just their name (e.g. resolveTableId("Tasks")). Note that using just the table name requires it to be unique among all tables within the config.

    This helper is now exported from @latticexyz/world package as intended. The previous, deprecated export has been removed.

    -import { resolveTableId } from "@latticexyz/config/library";
    +import { resolveTableId } from "@latticexyz/world/internal";
  • 96e7bf4: TS source has been removed from published packages in favor of DTS in an effort to improve TS performance. All packages now inherit from a base TS config in @latticexyz/common to allow us to continue iterating on TS performance without requiring changes in your project code.

    If you have a MUD project that you're upgrading, we suggest adding a tsconfig.json file to your project workspace that extends this base config.

    pnpm add -D @latticexyz/common
    echo "{\n  \"extends\": \"@latticexyz/common/tsconfig.base.json\"\n}" > tsconfig.json

    Then in each package of your project, inherit from your workspace root's config.

    For example, your TS config in packages/contracts/tsconfig.json might look like:

    {
      "extends": "../../tsconfig.json"
    }

    And your TS config in packages/client/tsconfig.json might look like:

    {
      "extends": "../../tsconfig.json",
      "compilerOptions": {
        "types": ["vite/client"],
        "target": "ESNext",
        "lib": ["ESNext", "DOM"],
        "jsx": "react-jsx",
        "jsxImportSource": "react"
      },
      "include": ["src"]
    }

    You may need to adjust the above configs to include any additional TS options you've set. This config pattern may also reveal new TS errors that need to be fixed or rules disabled.

    If you want to keep your existing TS configs, we recommend at least updating your moduleResolution setting.

    -"moduleResolution": "node"
    +"moduleResolution": "Bundler"
  • Updated dependencies [c10c9fb]

  • Updated dependencies [c10c9fb]

  • Updated dependencies [96e7bf4]

    • @latticexyz/store@2.0.12
    • @latticexyz/common@2.0.12
    • @latticexyz/config@2.0.12
    • @latticexyz/protocol-parser@2.0.12
    • @latticexyz/schema-type@2.0.12

@latticexyz/world-modules@2.0.12

31 May 12:46
b037b0f
Compare
Choose a tag to compare

Patch Changes

  • 36c8b5b: Fixed ERC20Module to register the TotalSupply table when creating a new token.

    If you've deployed a world with the ERC20Module, we recommend patching your world to register this table so that indexers can properly decode its record. You can do so with a simple Forge script:

    // SPDX-License-Identifier: MIT
    pragma solidity >=0.8.24;
    
    import { Script } from "forge-std/Script.sol";
    import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol";
    import { TotalSupply } from "@latticexyz/world-modules/src/modules/erc20-puppet/tables/TotalSupply.sol";
    import { _totalSupplyTableId } from "@latticexyz/world-modules/src/modules/erc20-puppet/utils.sol";
    
    contract RegisterTotalSupply is Script {
      function run(address worldAddress, string memory namespaceString) external {
        bytes14 namespace = bytes14(bytes(namespaceString));
    
        StoreSwitch.setStoreAddress(worldAddress);
    
        uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
        vm.startBroadcast(deployerPrivateKey);
    
        TotalSupply.register(_totalSupplyTableId(namespace));
    
        vm.stopBroadcast();
      }
    }

    Then execute the transactions by running the following forge script command:

    forge script ./script/RegisterTotalSupply.s.sol --sig "run(address,string)" $WORLD_ADDRESS $NAMESPACE_STRING
  • 96e7bf4: TS source has been removed from published packages in favor of DTS in an effort to improve TS performance. All packages now inherit from a base TS config in @latticexyz/common to allow us to continue iterating on TS performance without requiring changes in your project code.

    If you have a MUD project that you're upgrading, we suggest adding a tsconfig.json file to your project workspace that extends this base config.

    pnpm add -D @latticexyz/common
    echo "{\n  \"extends\": \"@latticexyz/common/tsconfig.base.json\"\n}" > tsconfig.json

    Then in each package of your project, inherit from your workspace root's config.

    For example, your TS config in packages/contracts/tsconfig.json might look like:

    {
      "extends": "../../tsconfig.json"
    }

    And your TS config in packages/client/tsconfig.json might look like:

    {
      "extends": "../../tsconfig.json",
      "compilerOptions": {
        "types": ["vite/client"],
        "target": "ESNext",
        "lib": ["ESNext", "DOM"],
        "jsx": "react-jsx",
        "jsxImportSource": "react"
      },
      "include": ["src"]
    }

    You may need to adjust the above configs to include any additional TS options you've set. This config pattern may also reveal new TS errors that need to be fixed or rules disabled.

    If you want to keep your existing TS configs, we recommend at least updating your moduleResolution setting.

    -"moduleResolution": "node"
    +"moduleResolution": "Bundler"
  • Updated dependencies [c10c9fb]

  • Updated dependencies [c10c9fb]

  • Updated dependencies [9be2bb8]

  • Updated dependencies [96e7bf4]

    • @latticexyz/store@2.0.12
    • @latticexyz/world@2.0.12
    • @latticexyz/common@2.0.12
    • @latticexyz/config@2.0.12
    • @latticexyz/schema-type@2.0.12

@latticexyz/utils@2.0.12

31 May 12:46
b037b0f
Compare
Choose a tag to compare

Patch Changes

  • 96e7bf4: TS source has been removed from published packages in favor of DTS in an effort to improve TS performance. All packages now inherit from a base TS config in @latticexyz/common to allow us to continue iterating on TS performance without requiring changes in your project code.

    If you have a MUD project that you're upgrading, we suggest adding a tsconfig.json file to your project workspace that extends this base config.

    pnpm add -D @latticexyz/common
    echo "{\n  \"extends\": \"@latticexyz/common/tsconfig.base.json\"\n}" > tsconfig.json

    Then in each package of your project, inherit from your workspace root's config.

    For example, your TS config in packages/contracts/tsconfig.json might look like:

    {
      "extends": "../../tsconfig.json"
    }

    And your TS config in packages/client/tsconfig.json might look like:

    {
      "extends": "../../tsconfig.json",
      "compilerOptions": {
        "types": ["vite/client"],
        "target": "ESNext",
        "lib": ["ESNext", "DOM"],
        "jsx": "react-jsx",
        "jsxImportSource": "react"
      },
      "include": ["src"]
    }

    You may need to adjust the above configs to include any additional TS options you've set. This config pattern may also reveal new TS errors that need to be fixed or rules disabled.

    If you want to keep your existing TS configs, we recommend at least updating your moduleResolution setting.

    -"moduleResolution": "node"
    +"moduleResolution": "Bundler"

@latticexyz/store@2.0.12

31 May 12:46
b037b0f
Compare
Choose a tag to compare

Patch Changes

  • c10c9fb: Internal tablegen function (exported from @latticexyz/store/codegen) now expects an object of options with a configPath to use as a base path to resolve other relative paths from.

  • c10c9fb: Added sourceDirectory as a top-level config option for specifying contracts source (i.e. Solidity) directory relative to the MUD config. This is used to resolve other paths in the config, like codegen and user types. Like foundry.toml, this defaults to src and should be kept in sync with foundry.toml.

    Also added a codegen.namespaceDirectories option to organize codegen output (table libraries, etc.) into directories by namespace. For example, a Counter table in the app namespace will have codegen at codegen/app/tables/Counter.sol. If not set, defaults to true when using top-level namespaces key, false otherwise.

  • 96e7bf4: TS source has been removed from published packages in favor of DTS in an effort to improve TS performance. All packages now inherit from a base TS config in @latticexyz/common to allow us to continue iterating on TS performance without requiring changes in your project code.

    If you have a MUD project that you're upgrading, we suggest adding a tsconfig.json file to your project workspace that extends this base config.

    pnpm add -D @latticexyz/common
    echo "{\n  \"extends\": \"@latticexyz/common/tsconfig.base.json\"\n}" > tsconfig.json

    Then in each package of your project, inherit from your workspace root's config.

    For example, your TS config in packages/contracts/tsconfig.json might look like:

    {
      "extends": "../../tsconfig.json"
    }

    And your TS config in packages/client/tsconfig.json might look like:

    {
      "extends": "../../tsconfig.json",
      "compilerOptions": {
        "types": ["vite/client"],
        "target": "ESNext",
        "lib": ["ESNext", "DOM"],
        "jsx": "react-jsx",
        "jsxImportSource": "react"
      },
      "include": ["src"]
    }

    You may need to adjust the above configs to include any additional TS options you've set. This config pattern may also reveal new TS errors that need to be fixed or rules disabled.

    If you want to keep your existing TS configs, we recommend at least updating your moduleResolution setting.

    -"moduleResolution": "node"
    +"moduleResolution": "Bundler"
  • Updated dependencies [96e7bf4]

    • @latticexyz/common@2.0.12
    • @latticexyz/config@2.0.12
    • @latticexyz/protocol-parser@2.0.12
    • @latticexyz/schema-type@2.0.12

@latticexyz/store-sync@2.0.12

31 May 12:46
b037b0f
Compare
Choose a tag to compare

Patch Changes

  • 96e7bf4: TS source has been removed from published packages in favor of DTS in an effort to improve TS performance. All packages now inherit from a base TS config in @latticexyz/common to allow us to continue iterating on TS performance without requiring changes in your project code.

    If you have a MUD project that you're upgrading, we suggest adding a tsconfig.json file to your project workspace that extends this base config.

    pnpm add -D @latticexyz/common
    echo "{\n  \"extends\": \"@latticexyz/common/tsconfig.base.json\"\n}" > tsconfig.json

    Then in each package of your project, inherit from your workspace root's config.

    For example, your TS config in packages/contracts/tsconfig.json might look like:

    {
      "extends": "../../tsconfig.json"
    }

    And your TS config in packages/client/tsconfig.json might look like:

    {
      "extends": "../../tsconfig.json",
      "compilerOptions": {
        "types": ["vite/client"],
        "target": "ESNext",
        "lib": ["ESNext", "DOM"],
        "jsx": "react-jsx",
        "jsxImportSource": "react"
      },
      "include": ["src"]
    }

    You may need to adjust the above configs to include any additional TS options you've set. This config pattern may also reveal new TS errors that need to be fixed or rules disabled.

    If you want to keep your existing TS configs, we recommend at least updating your moduleResolution setting.

    -"moduleResolution": "node"
    +"moduleResolution": "Bundler"
  • Updated dependencies [c10c9fb]

  • Updated dependencies [c10c9fb]

  • Updated dependencies [9be2bb8]

  • Updated dependencies [96e7bf4]

    • @latticexyz/store@2.0.12
    • @latticexyz/world@2.0.12
    • @latticexyz/block-logs-stream@2.0.12
    • @latticexyz/common@2.0.12
    • @latticexyz/config@2.0.12
    • @latticexyz/protocol-parser@2.0.12
    • @latticexyz/query@2.0.12
    • @latticexyz/recs@2.0.12
    • @latticexyz/schema-type@2.0.12

@latticexyz/store-indexer@2.0.12

31 May 12:46
b037b0f
Compare
Choose a tag to compare

Patch Changes

  • 96e7bf4: TS source has been removed from published packages in favor of DTS in an effort to improve TS performance. All packages now inherit from a base TS config in @latticexyz/common to allow us to continue iterating on TS performance without requiring changes in your project code.

    If you have a MUD project that you're upgrading, we suggest adding a tsconfig.json file to your project workspace that extends this base config.

    pnpm add -D @latticexyz/common
    echo "{\n  \"extends\": \"@latticexyz/common/tsconfig.base.json\"\n}" > tsconfig.json

    Then in each package of your project, inherit from your workspace root's config.

    For example, your TS config in packages/contracts/tsconfig.json might look like:

    {
      "extends": "../../tsconfig.json"
    }

    And your TS config in packages/client/tsconfig.json might look like:

    {
      "extends": "../../tsconfig.json",
      "compilerOptions": {
        "types": ["vite/client"],
        "target": "ESNext",
        "lib": ["ESNext", "DOM"],
        "jsx": "react-jsx",
        "jsxImportSource": "react"
      },
      "include": ["src"]
    }

    You may need to adjust the above configs to include any additional TS options you've set. This config pattern may also reveal new TS errors that need to be fixed or rules disabled.

    If you want to keep your existing TS configs, we recommend at least updating your moduleResolution setting.

    -"moduleResolution": "node"
    +"moduleResolution": "Bundler"
  • Updated dependencies [c10c9fb]

  • Updated dependencies [c10c9fb]

  • Updated dependencies [96e7bf4]

    • @latticexyz/store@2.0.12
    • @latticexyz/block-logs-stream@2.0.12
    • @latticexyz/common@2.0.12
    • @latticexyz/protocol-parser@2.0.12
    • @latticexyz/store-sync@2.0.12

@latticexyz/schema-type@2.0.12

31 May 12:46
b037b0f
Compare
Choose a tag to compare

Patch Changes

  • 96e7bf4: TS source has been removed from published packages in favor of DTS in an effort to improve TS performance. All packages now inherit from a base TS config in @latticexyz/common to allow us to continue iterating on TS performance without requiring changes in your project code.

    If you have a MUD project that you're upgrading, we suggest adding a tsconfig.json file to your project workspace that extends this base config.

    pnpm add -D @latticexyz/common
    echo "{\n  \"extends\": \"@latticexyz/common/tsconfig.base.json\"\n}" > tsconfig.json

    Then in each package of your project, inherit from your workspace root's config.

    For example, your TS config in packages/contracts/tsconfig.json might look like:

    {
      "extends": "../../tsconfig.json"
    }

    And your TS config in packages/client/tsconfig.json might look like:

    {
      "extends": "../../tsconfig.json",
      "compilerOptions": {
        "types": ["vite/client"],
        "target": "ESNext",
        "lib": ["ESNext", "DOM"],
        "jsx": "react-jsx",
        "jsxImportSource": "react"
      },
      "include": ["src"]
    }

    You may need to adjust the above configs to include any additional TS options you've set. This config pattern may also reveal new TS errors that need to be fixed or rules disabled.

    If you want to keep your existing TS configs, we recommend at least updating your moduleResolution setting.

    -"moduleResolution": "node"
    +"moduleResolution": "Bundler"