Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version Packages (next) #1412

Merged
merged 1 commit into from
Sep 7, 2023
Merged

Version Packages (next) #1412

merged 1 commit into from
Sep 7, 2023

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Sep 7, 2023

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

main is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, run changeset pre exit on main.

⚠️⚠️⚠️⚠️⚠️⚠️

Releases

@latticexyz/[email protected]

Major Changes

  • #1410 9af542d3 Thanks @holic! - Renames mud-gas-report binary to gas-report, since it's no longer MUD specific.

@latticexyz/[email protected]

Minor Changes

  • #1413 8025c350 Thanks @holic! - Added a new @latticexyz/abi-ts package to generate TS type declaration files (.d.ts) for each ABI JSON file.

    This allows you to import your JSON ABI and use it directly with libraries like viem and abitype.

    pnpm add @latticexyz/abi-ts
    pnpm abi-ts
    

    By default, abi-ts looks for files with the glob **/*.abi.json, but you can customize this glob with the --input argument, e.g.

    pnpm abi-ts --input 'abi/IWorld.sol/IWorld.abi.json'

@latticexyz/[email protected]

Minor Changes

  • #1413 8025c350 Thanks @holic! - Added a new @latticexyz/abi-ts package to generate TS type declaration files (.d.ts) for each ABI JSON file.

    This allows you to import your JSON ABI and use it directly with libraries like viem and abitype.

    pnpm add @latticexyz/abi-ts
    pnpm abi-ts
    

    By default, abi-ts looks for files with the glob **/*.abi.json, but you can customize this glob with the --input argument, e.g.

    pnpm abi-ts --input 'abi/IWorld.sol/IWorld.abi.json'

Patch Changes

[email protected]

Minor Changes

  • #1403 55377ffe Thanks @holic! - We now use @latticexyz/abi-ts to generate TS type declaration files (.d.ts) for each ABI JSON file. This replaces our usage TypeChain everywhere.

    If you have a MUD project created from an older template, you can replace TypeChain with abi-ts by first updating your contracts' package.json:

    -"build": "pnpm run build:mud && pnpm run build:abi && pnpm run build:typechain",
    +"build": "pnpm run build:mud && pnpm run build:abi && pnpm run build:abi-ts",
    -"build:abi": "forge clean && forge build",
    +"build:abi": "rimraf abi && forge build --extra-output-files abi --out abi --skip test script MudTest.sol",
    +"build:abi-ts": "mud abi-ts --input 'abi/IWorld.sol/IWorld.abi.json' && prettier --write '**/*.abi.json.d.ts'",
     "build:mud": "mud tablegen && mud worldgen",
    -"build:typechain": "rimraf types && typechain --target=ethers-v5 out/IWorld.sol/IWorld.json",

    And update your client's setupNetwork.ts with:

    -import { IWorld__factory } from "contracts/types/ethers-contracts/factories/IWorld__factory";
    +import IWorldAbi from "contracts/abi/IWorld.sol/IWorld.abi.json";
    
     const worldContract = createContract({
       address: networkConfig.worldAddress as Hex,
    -  abi: IWorld__factory.abi,
    +  abi: IWorldAbi,

@latticexyz/[email protected]

Minor Changes

  • #1413 8025c350 Thanks @holic! - We now use @latticexyz/abi-ts to generate TS type declaration files (.d.ts) for each ABI JSON file. This replaces our usage TypeChain everywhere.

    If you previously relied on TypeChain types from @latticexyz/store or @latticexyz/world, you will either need to migrate to viem or abitype using ABI JSON imports or generate TypeChain types from our exported ABI JSON files.

    import { getContract } from "viem";
    import IStoreAbi from "@latticexyz/store/abi/IStore.sol/IStore.abi.json";
    
    const storeContract = getContract({
      abi: IStoreAbi,
      ...
    });
    
    await storeContract.write.setRecord(...);

Patch Changes

@latticexyz/[email protected]

Minor Changes

  • #1413 8025c350 Thanks @holic! - We now use @latticexyz/abi-ts to generate TS type declaration files (.d.ts) for each ABI JSON file. This replaces our usage TypeChain everywhere.

    If you previously relied on TypeChain types from @latticexyz/store or @latticexyz/world, you will either need to migrate to viem or abitype using ABI JSON imports or generate TypeChain types from our exported ABI JSON files.

    import { getContract } from "viem";
    import IStoreAbi from "@latticexyz/store/abi/IStore.sol/IStore.abi.json";
    
    const storeContract = getContract({
      abi: IStoreAbi,
      ...
    });
    
    await storeContract.write.setRecord(...);

Patch Changes

@latticexyz/[email protected]

Patch Changes

@latticexyz/[email protected]

Patch Changes

@latticexyz/[email protected]

Patch Changes

@latticexyz/[email protected]

Patch Changes

@latticexyz/[email protected]

Patch Changes

@latticexyz/[email protected]

Patch Changes

@latticexyz/[email protected]

Patch Changes

@latticexyz/[email protected]

Patch Changes

@latticexyz/[email protected]

Patch Changes

@latticexyz/[email protected]

Patch Changes

@latticexyz/[email protected]

@latticexyz/[email protected]

@latticexyz/[email protected]

[email protected]

[email protected]

@latticexyz/[email protected]

@latticexyz/[email protected]

@latticexyz/[email protected]

@latticexyz/[email protected]

@latticexyz/[email protected]

@latticexyz/[email protected]

@latticexyz/[email protected]

@github-actions github-actions bot force-pushed the changeset-release/main branch from a05747c to 9fab172 Compare September 7, 2023 10:47
@holic holic merged commit f70869e into main Sep 7, 2023
@holic holic deleted the changeset-release/main branch September 7, 2023 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant