Skip to content

Releases: latticexyz/mud

@latticexyz/[email protected]

21 Mar 17:30
43b0fdf
Compare
Choose a tag to compare
Pre-release

Patch Changes

@latticexyz/[email protected]

21 Mar 17:30
43b0fdf
Compare
Choose a tag to compare
Pre-release

Major Changes

  • b38c096: Moved all existing exports to a /internal import path to indicate that these are now internal-only and deprecated. We'll be replacing these types and functions with new ones that are compatible with our new, strongly-typed config.

Minor Changes

  • d7b1c58: Upgraded all packages and templates to viem v2.7.12 and abitype v1.0.0.

    Some viem APIs have changed and we've updated getContract to reflect those changes and keep it aligned with viem. It's one small code change:

     const worldContract = getContract({
       address: worldAddress,
       abi: IWorldAbi,
    -  publicClient,
    -  walletClient,
    +  client: { public: publicClient, wallet: walletClient },
     });

Patch Changes

@latticexyz/[email protected]

21 Mar 17:30
43b0fdf
Compare
Choose a tag to compare
Pre-release

Minor Changes

  • 90d0d79: Now uses --isolate flag in forge test for more accurate gas measurement.

Patch Changes

  • a02da55: Fixed gas report parsing for foundry versions released after 2024-02-15.

@latticexyz/[email protected]

21 Mar 17:30
43b0fdf
Compare
Choose a tag to compare
Pre-release

Minor Changes

  • d7b1c58: Upgraded all packages and templates to viem v2.7.12 and abitype v1.0.0.

    Some viem APIs have changed and we've updated getContract to reflect those changes and keep it aligned with viem. It's one small code change:

     const worldContract = getContract({
       address: worldAddress,
       abi: IWorldAbi,
    -  publicClient,
    -  walletClient,
    +  client: { public: publicClient, wallet: walletClient },
     });

Patch Changes

@latticexyz/[email protected]

21 Mar 17:30
43b0fdf
Compare
Choose a tag to compare
Pre-release

Major Changes

  • 252a185: Migrated to new config format.

Minor Changes

  • d7b1c58: Upgraded all packages and templates to viem v2.7.12 and abitype v1.0.0.

    Some viem APIs have changed and we've updated getContract to reflect those changes and keep it aligned with viem. It's one small code change:

     const worldContract = getContract({
       address: worldAddress,
       abi: IWorldAbi,
    -  publicClient,
    -  walletClient,
    +  client: { public: publicClient, wallet: walletClient },
     });

Patch Changes

@latticexyz/[email protected]

21 Mar 17:30
43b0fdf
Compare
Choose a tag to compare
Pre-release

Minor Changes

  • d7b1c58: Upgraded all packages and templates to viem v2.7.12 and abitype v1.0.0.

    Some viem APIs have changed and we've updated getContract to reflect those changes and keep it aligned with viem. It's one small code change:

     const worldContract = getContract({
       address: worldAddress,
       abi: IWorldAbi,
    -  publicClient,
    -  walletClient,
    +  client: { public: publicClient, wallet: walletClient },
     });

Patch Changes

@latticexyz/[email protected]

21 Mar 17:30
43b0fdf
Compare
Choose a tag to compare
Pre-release

Major Changes

  • 4423604: Moved table ID and field layout constants in code-generated table libraries from the file level into the library, for clearer access and cleaner imports.

    -import { SomeTable, SomeTableTableId } from "./codegen/tables/SomeTable.sol";
    +import { SomeTable } from "./codegen/tables/SomeTable.sol";
    
    -console.log(SomeTableTableId);
    +console.log(SomeTable._tableId);
    
    -console.log(SomeTable.getFieldLayout());
    +console.log(SomeTable._fieldLayout);

Minor Changes

  • 5926765: Added viem custom client actions that work the same as MUD's now-deprecated getContract, writeContract, and sendTransaction wrappers. Templates have been updated to reflect the new patterns.

    You can migrate your own code like this:

    -import { createWalletClient } from "viem";
    -import { getContract, writeContract, sendTransaction } from "@latticexyz/common";
    +import { createWalletClient, getContract } from "viem";
    +import { transactionQueue, writeObserver } from "@latticexyz/common/actions";
    
    -const walletClient = createWalletClient(...);
    +const walletClient = createWalletClient(...)
    +  .extend(transactionQueue())
    +  .extend(writeObserver({ onWrite });
    
     const worldContract = getContract({
       client: { publicClient, walletClient },
    -  onWrite,
     });
  • d7b1c58: Upgraded all packages and templates to viem v2.7.12 and abitype v1.0.0.

    Some viem APIs have changed and we've updated getContract to reflect those changes and keep it aligned with viem. It's one small code change:

     const worldContract = getContract({
       address: worldAddress,
       abi: IWorldAbi,
    -  publicClient,
    -  walletClient,
    +  client: { public: publicClient, wallet: walletClient },
     });

Patch Changes

  • 8269307: waitForIdle now falls back to setTimeout for environments without requestIdleCallback.

  • d5c0682: Updated all human-readable resource IDs to use {namespace}__{name} for consistency with world function signatures.

  • 01e46d9: Removed some unused files, namely curry in @latticexyz/common and useDeprecatedComputedValue from @latticexyz/react.

  • 307abab: resourceToLabel now correctly returns just the resource name if its in the root namespace.

  • e34d117: Moved the transaction simulation step to just before sending the transaction in our transaction queue actions (sendTransaction and writeContract).

    This helps avoid cascading transaction failures for deep queues or when a transaction succeeding depends on the value of the previous.

  • db314a7: Upgraded prettier version to 3.2.5 and prettier-plugin-solidity version to 1.3.1.

  • Updated dependencies [b38c096]

  • Updated dependencies [d7b1c58]

@latticexyz/[email protected]

21 Mar 17:30
43b0fdf
Compare
Choose a tag to compare
Pre-release

Major Changes

  • 4423604: Moved table ID and field layout constants in code-generated table libraries from the file level into the library, for clearer access and cleaner imports.

    -import { SomeTable, SomeTableTableId } from "./codegen/tables/SomeTable.sol";
    +import { SomeTable } from "./codegen/tables/SomeTable.sol";
    
    -console.log(SomeTableTableId);
    +console.log(SomeTable._tableId);
    
    -console.log(SomeTable.getFieldLayout());
    +console.log(SomeTable._fieldLayout);
  • 252a185: Migrated to new config format.

Minor Changes

  • 645736d: Added an --rpcBatch option to mud deploy command to batch RPC calls for rate limited RPCs.

  • 5554b19: mud deploy now supports public/linked libraries.

    This helps with cases where system contracts would exceed the EVM bytecode size limit and logic would need to be split into many smaller systems.

    Instead of the overhead and complexity of system-to-system calls, this logic can now be moved into public libraries that will be deployed alongside your systems and automatically delegatecalled.

  • d7b1c58: Upgraded all packages and templates to viem v2.7.12 and abitype v1.0.0.

    Some viem APIs have changed and we've updated getContract to reflect those changes and keep it aligned with viem. It's one small code change:

     const worldContract = getContract({
       address: worldAddress,
       abi: IWorldAbi,
    -  publicClient,
    -  walletClient,
    +  client: { public: publicClient, wallet: walletClient },
     });

Patch Changes

@latticexyz/[email protected]

21 Mar 17:30
43b0fdf
Compare
Choose a tag to compare
Pre-release

Minor Changes

  • d7b1c58: Upgraded all packages and templates to viem v2.7.12 and abitype v1.0.0.

    Some viem APIs have changed and we've updated getContract to reflect those changes and keep it aligned with viem. It's one small code change:

     const worldContract = getContract({
       address: worldAddress,
       abi: IWorldAbi,
    -  publicClient,
    -  walletClient,
    +  client: { public: publicClient, wallet: walletClient },
     });

Patch Changes

@latticexyz/[email protected]

21 Mar 17:30
43b0fdf
Compare
Choose a tag to compare
Pre-release
@latticexyz/[email protected]