Skip to content

Commit

Permalink
chore: remove remaining typechain references (#1477)
Browse files Browse the repository at this point in the history
  • Loading branch information
holic authored Sep 14, 2023
1 parent d1a15ff commit 4e0200f
Show file tree
Hide file tree
Showing 18 changed files with 8 additions and 6,068 deletions.
2 changes: 0 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
dist
**/types/ethers-contracts
**/.next
templates/phaser/packages/art
**/contractComponents.ts
CODEOWNERS
1 change: 0 additions & 1 deletion docs/pages/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ Each system can contain any number of methods, though this system only has the s

The client package will vary depending on which template used (vanilla, react, phaser, or threejs), but much of it will remain the same between them. Vite is used for bundling and serving the client app. As mentioned earlier there is boilerplate code included in each to bootstrap MUD. There are a few files you should understand and be aware of as you build your project:

- `contractComponents.ts` has RECS component definitions created for you; this file will automatically regenerate as you add tables and re-run `pnpm dev`.
- You can adjust `createClientComponents.ts` to either override contract components or add client-only components.
- If you are using chains other than foundry/anvil and lattice testnet, you can add them in `getNetworkConfig.ts`
- `createSystemCalls` represents how the client talks to the system contracts via our `worldSend` helper
Expand Down
20 changes: 8 additions & 12 deletions docs/pages/tutorials/minimal/deploy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ import { createFaucetService } from "@latticexyz/services/faucet";
import { encodeEntity, syncToRecs } from "@latticexyz/store-sync/recs";
import { getNetworkConfig } from "./getNetworkConfig";
import { world } from "./world";
import { IWorld__factory } from "contracts/types/ethers-contracts/factories/IWorld__factory";
import IWorldAbi from "contracts/abi/IWorld.sol/IWorld.abi.json"
import { createBurnerAccount, createContract, transportObserver, ContractWrite } from "@latticexyz/common";
import { Subject, share } from "rxjs";
import mudConfig from "contracts/mud.config";
Expand All @@ -164,16 +164,16 @@ export async function setupNetwork() {
});

const walletClient = createWalletClient({
chain: <network>,
transport: custom(window.ethereum)
chain: <network>,
transport: custom(window.ethereum)
})
const accounts = await walletClient.requestAddresses()
walletClient.account = {address: accounts[0]}

const write$ = new Subject<ContractWrite>();
const worldContract = createContract({
address: networkConfig.worldAddress as Hex,
abi: IWorld__factory.abi,
abi: IWorldAbi,
publicClient,
walletClient,
onWrite: (write) => write$.next(write),
Expand Down Expand Up @@ -242,8 +242,8 @@ Import [the Viem definitions necessary to use a wallet managed address](https://

```ts
const walletClient = createWalletClient({
chain: <network>,
transport: custom(window.ethereum)
chain: <network>,
transport: custom(window.ethereum)
})
```

Expand All @@ -265,13 +265,9 @@ Therefore, we need to do it manually because MUD code expects the address to be

```ts
return {
.
.
.
...
playerEntity: encodeEntity({ address: "address" }, { address: walletClient.account.address }),
.
.
.
...
};
```

Expand Down
Loading

0 comments on commit 4e0200f

Please sign in to comment.