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]

Published by github-actions[bot] about 1 year ago

mud - @latticexyz/[email protected]

Published by github-actions[bot] about 1 year ago

mud - @latticexyz/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

mud - @latticexyz/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

mud - @latticexyz/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • Updated dependencies [06605615]
  • Updated dependencies [f62c767e]
  • Updated dependencies [d2f8e940]
  • Updated dependencies [25086be5]
mud - @latticexyz/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

mud - @latticexyz/[email protected]

Published by github-actions[bot] about 1 year ago

mud - @latticexyz/[email protected]

Published by github-actions[bot] about 1 year ago

mud - @latticexyz/[email protected]

Published by github-actions[bot] about 1 year ago

Minor Changes

  • 1d0f7e22: Added /healthz and /readyz healthcheck endpoints for Kubernetes
mud - @latticexyz/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

mud - [email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 7ce82b6f: Store config now defaults storeArgument: false for all tables. This means that table libraries, by default, will no longer include the extra functions with the _store argument. This default was changed to clear up the confusion around using table libraries in tests, PostDeploy scripts, etc.

    If you are sure you need to manually specify a store when interacting with tables, you can still manually toggle it back on with storeArgument: true in the table settings of your MUD config.

    If you want to use table libraries in PostDeploy.s.sol, you can add the following lines:

      import { Script } from "forge-std/Script.sol";
      import { console } from "forge-std/console.sol";
      import { IWorld } from "../src/codegen/world/IWorld.sol";
    + import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol";
    
      contract PostDeploy is Script {
        function run(address worldAddress) external {
    +     StoreSwitch.setStoreAddress(worldAddress);
    +
    +     SomeTable.get(someKey);
    
  • d844cd44: Sped up builds by using more of forge's cache.

    Previously we'd build only what we needed because we would check in ABIs and other build artifacts into git, but that meant that we'd get a lot of forge cache misses. Now that we no longer need these files visible, we can take advantage of forge's caching and greatly speed up builds, especially incremental ones.

mud - @latticexyz/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • Updated dependencies [06605615]
  • Updated dependencies [f62c767e]
  • Updated dependencies [d2f8e940]
  • Updated dependencies [25086be5]
mud - @latticexyz/[email protected]

Published by github-actions[bot] about 1 year ago

Minor Changes

  • 06605615: - Added a sendTransaction helper to mirror viem's sendTransaction, but with our nonce manager

    • Added an internal mempool queue to sendTransaction and writeContract for better nonce handling
    • Defaults block tag to pending for transaction simulation and transaction count (when initializing the nonce manager)
  • d2f8e940: Renames resourceIdToHex to resourceToHex and hexToResourceId to hexToResource, to better distinguish between a resource ID (hex value) and a resource reference (type, namespace, name).

    - resourceIdToHex({ type: 'table', namespace: '', name: 'Position' });
    + resourceToHex({ type: 'table', namespace: '', name: 'Position' });
    
    - hexToResourceId('0x...');
    + hexToResource('0x...');
    

    Previous methods still exist but are now deprecated to ease migration and reduce breaking changes. These will be removed in a future version.

    Also removes the previously deprecated and unused table ID utils (replaced by these resource ID utils).

Patch Changes

  • f62c767e: Moved some codegen to use fs/promises for better parallelism.
  • 25086be5: Replaced temporary .mudtest file in favor of WORLD_ADDRESS environment variable when running tests with MudTest contract
mud - @latticexyz/[email protected]

Published by github-actions[bot] about 1 year ago

Major Changes

  • 29c3f508: deploy, test, dev-contracts were overhauled using a declarative deployment approach under the hood. Deploys are now idempotent and re-running them will introspect the world and figure out the minimal changes necessary to bring the world into alignment with its config: adding tables, adding/upgrading systems, changing access control, etc.

    The following CLI arguments are now removed from these commands:

    • --debug (you can now adjust CLI output with DEBUG environment variable, e.g. DEBUG=mud:*)
    • --priorityFeeMultiplier (now calculated automatically)
    • --disableTxWait (everything is now parallelized with smarter nonce management)
    • --pollInterval (we now lean on viem defaults and we don't wait/poll until the very end of the deploy)

    Most deployment-in-progress logs are now behind a debug flag, which you can enable with a DEBUG=mud:* environment variable.

Minor Changes

  • ccc21e91: Added a --alwaysRunPostDeploy flag to deploys (deploy, test, dev-contracts commands) to always run PostDeploy.s.sol script after each deploy. By default, PostDeploy.s.sol is only run once after a new world is deployed.

    This is helpful if you want to continue a deploy that may not have finished (due to an error or otherwise) or to run deploys with an idempotent PostDeploy.s.sol script.

  • e667ee80: CLI deploy, test, dev-contracts no longer run forge clean before each deploy. We previously cleaned to ensure no outdated artifacts were checked into git (ABIs, typechain types, etc.). Now that all artifacts are gitignored, we can let forge use its cache again.

  • e1dc88eb: Transactions sent via deploy will now be retried a few times before giving up. This hopefully helps with large deploys on some chains.

Patch Changes

  • 7ce82b6f: Store config now defaults storeArgument: false for all tables. This means that table libraries, by default, will no longer include the extra functions with the _store argument. This default was changed to clear up the confusion around using table libraries in tests, PostDeploy scripts, etc.

    If you are sure you need to manually specify a store when interacting with tables, you can still manually toggle it back on with storeArgument: true in the table settings of your MUD config.

    If you want to use table libraries in PostDeploy.s.sol, you can add the following lines:

      import { Script } from "forge-std/Script.sol";
      import { console } from "forge-std/console.sol";
      import { IWorld } from "../src/codegen/world/IWorld.sol";
    + import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol";
    
      contract PostDeploy is Script {
        function run(address worldAddress) external {
    +     StoreSwitch.setStoreAddress(worldAddress);
    +
    +     SomeTable.get(someKey);
    
  • 3bfee32c: dev-contracts will no longer bail when there was an issue with deploying (e.g. typo in contracts) and instead wait for file changes before retrying.

  • 4e2a170f: Deploys now continue if they detect a Module_AlreadyInstalled revert error.

  • 61c6ab70: Changed deploy order so that system/module contracts are fully deployed before registering/installing them on the world.

  • 69d55ce3: Deploy commands (deploy, dev-contracts, test) now correctly run worldgen to generate system interfaces before deploying.

  • 4fe07930: Fixed a few issues with deploys:

    • properly handle enums in MUD config
    • only deploy each unique module/system once
    • waits for transactions serially instead of in parallel, to avoid RPC errors
  • d844cd44: Sped up builds by using more of forge's cache.

    Previously we'd build only what we needed because we would check in ABIs and other build artifacts into git, but that meant that we'd get a lot of forge cache misses. Now that we no longer need these files visible, we can take advantage of forge's caching and greatly speed up builds, especially incremental ones.

  • 25086be5: Replaced temporary .mudtest file in favor of WORLD_ADDRESS environment variable when running tests with MudTest contract

  • d2f8e940: Moved to new resource ID utils.

  • Updated dependencies [7ce82b6f]

  • Updated dependencies [7fa2ca18]

  • Updated dependencies [6ca1874e]

  • Updated dependencies [06605615]

  • Updated dependencies [f62c767e]

  • Updated dependencies [ca329175]

  • Updated dependencies [f62c767e]

  • Updated dependencies [6ca1874e]

  • Updated dependencies [d2f8e940]

  • Updated dependencies [25086be5]

  • Updated dependencies [29c3f508]

mud - @latticexyz/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • Updated dependencies [06605615]
  • Updated dependencies [f62c767e]
  • Updated dependencies [d2f8e940]
  • Updated dependencies [25086be5]
mud - @latticexyz/[email protected]

Published by github-actions[bot] about 1 year ago

Minor Changes

  • ca329175: Moves log output behind a debug flag. You can enable logging with DEBUG=abi-ts environment variable.
mud - @latticexyz/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

mud - @latticexyz/[email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

mud - @latticexyz/[email protected]

Published by github-actions[bot] about 1 year ago

Major Changes

  • #1624 88b1a5a1 Thanks @alvrs! - We now expose a WorldContextConsumerLib library with the same functionality as the WorldContextConsumer contract, but the ability to be used inside of internal libraries.
    We also renamed the WorldContextProvider library to WorldContextProviderLib for consistency.

Minor Changes

  • #1675 7987c94d Thanks @alvrs! - Return address of the newly created World from WorldFactory.deployWorld.

Patch Changes

mud - @latticexyz/[email protected]

Published by github-actions[bot] about 1 year ago