Skip to content

Commit

Permalink
set up local world deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
holic committed Apr 22, 2024
1 parent 686611d commit 49e54f3
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
16 changes: 16 additions & 0 deletions packages/account-kit/dev/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { useEffect } from "react";
import { AccountButton, useAccountModal } from "../src/exports";

export function App() {
const { openAccountModal } = useAccountModal();

useEffect(() => {
openAccountModal();
}, [openAccountModal]);

return (
<>
<AccountButton />
</>
);
}
1 change: 1 addition & 0 deletions packages/account-kit/dev/anvil-state.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions packages/account-kit/dev/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { WagmiProvider, createConfig, http } from "wagmi";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { RainbowKitProvider, lightTheme, midnightTheme } from "@rainbow-me/rainbowkit";
import { mudFoundry } from "@latticexyz/common/chains";
import { AccountButton } from "../src/exports";
import { AccountModal } from "../src/AccountModal";
import { AccountKitConfigProvider } from "../src/AccountKitConfigProvider";
import { App } from "./App";

const queryClient = new QueryClient();

Expand All @@ -21,7 +21,7 @@ const wagmiConfig = createConfig({

const accountKitConfig = {
chain: mudFoundry,
worldAddress: "0x6906906906906906906906906906906906906906",
worldAddress: "0xd6c8022f1af8e9d7c3825557a1374ee518c65a4e",
erc4337: false,
} as const;

Expand All @@ -38,7 +38,7 @@ root.render(
>
{/* Mount context and modal ourselves to avoid hot reloading issues */}
<AccountKitConfigProvider config={accountKitConfig}>
<AccountButton />
<App />
<AccountModal />
</AccountKitConfigProvider>
</RainbowKitProvider>
Expand Down
4 changes: 3 additions & 1 deletion packages/account-kit/mprocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ procs:
client:
shell: pnpm vite dev dev
anvil:
shell: anvil --base-fee 0 --block-time 2
# To hydrate `anvil-state.json`, run the anvil command below and then deploy a MUD world to it.
# anvil --dump-state dev/anvil-state.json
shell: anvil --block-time 2 --load-state dev/anvil-state.json

0 comments on commit 49e54f3

Please sign in to comment.