Skip to content

Commit

Permalink
more changeset tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
holic committed Sep 19, 2024
1 parent 24f0773 commit 945807f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .changeset/lucky-cows-fail.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@
Added a `syncToStash` util to hydrate a `stash` client store from MUD contract state. This is currently exported from `@latticexyz/store-sync/internal` while Stash package is unstable/experimental.

```ts
import config from "mud.config";
import { createClient, http } from "viem";
import { anvil } from "viem/chains";
import { createStash } from "@latticexyz/stash/internal";
import { syncToStash } from "@latticexyz/store-sync/internal";
import config from "../mud.config";

const address = "0x...";
const client = createClient({
chain: anvil,
transport: http(),
});

const address = "0x...";

const stash = createStash(config);
const sync = await syncToStash({ stash, client, address });
```

0 comments on commit 945807f

Please sign in to comment.