Skip to content

Commit a5665b5

Browse files
committed
Merge remote-tracking branch 'origin/main' into entrykit
2 parents 0be6a43 + 7409095 commit a5665b5

49 files changed

Lines changed: 1080 additions & 503 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/dirty-buttons-tickle.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@latticexyz/entrykit": patch
3+
---
4+
5+
Initial, experimental release of EntryKit.

.changeset/seven-ducks-complain.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"@latticexyz/cli": patch
3+
---
4+
5+
In addition to a hex `--salt`, deploy commands now accept a string salt for world deployment, which will get converted to a hex.
6+
7+
```
8+
pnpm mud deploy --salt hello
9+
```
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env node
2+
// workaround for https://github.com/pnpm/pnpm/issues/1801
3+
import "../dist/tsup/bin/deploy-local-prereqs.js";

packages/entrykit/mprocs.deploy.yaml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,32 @@ scrollback: 10000
22
procs:
33
anvil:
44
shell: anvil --dump-state playground/anvil-state.json
5-
deploy-factory:
5+
6+
deploy-csw-factory:
67
cwd: ../../../coinbase-smart-wallet
78
shell: make deploy-local
8-
deploy-bundler:
9-
cwd: ../../../alto
10-
shell: pnpm ts-node scripts/localDeployer/index.ts
11-
deploy-paymaster:
12-
cwd: ../../../quarry-paymaster/packages/contracts
13-
# TODO: pick or mine a nice salt for paymaster
14-
shell: pnpm mud deploy --salt 0x && pnpm fund:paymaster:local && pnpm fund:issuer:local
9+
10+
deploy-prereqs:
11+
shell: ./bin/deploy-local-prereqs.js
12+
env:
13+
DEBUG: "mud:*"
14+
# Anvil default account (0x70997970C51812dc3A010C7d01b50e0d17dc79C8)
15+
PRIVATE_KEY: "0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d"
16+
17+
# deploy-quarry-paymaster:
18+
# cwd: ../../../quarry-paymaster/packages/contracts
19+
# shell: pnpm mud deploy --salt 0x && pnpm fund:paymaster:local && pnpm fund:issuer:local
20+
# env:
21+
# DEBUG: "mud:*"
22+
1523
deploy-game:
1624
cwd: ../../test/mock-game-contracts
1725
shell: pnpm deploy:local --salt 0x
1826
env:
27+
DEBUG: "mud:*"
1928
# Anvil default account (0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc)
2029
PRIVATE_KEY: "0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba"
30+
31+
# deploy-bundler:
32+
# cwd: ../../../alto
33+
# shell: pnpm ts-node scripts/localDeployer/index.ts

packages/entrykit/mprocs.yaml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,15 @@ procs:
44
shell: pnpm vite dev playground
55
anvil:
66
shell: anvil --block-time 2 --load-state playground/anvil-state.json
7+
78
# mud:
89
# cwd: ../..
910
# shell: pnpm run dev --filter=!@latticexyz/entrykit
10-
bundler:
11-
cwd: ../../../alto
12-
shell: pnpm ts-node src --config ../mud/packages/entrykit/playground/alto.config.json
13-
issuer:
14-
cwd: ../../../quarry-paymaster/packages/issuer
15-
shell: pnpm start
16-
# explorer:
17-
# shell: pnpm explorer
18-
id:
19-
cwd: ../id
20-
shell: pnpm vite --port 5155
21-
tunnel:
22-
shell: cloudflared tunnel run
11+
12+
# quarry-issuer:
13+
# cwd: ../../../quarry-paymaster/packages/issuer
14+
# shell: pnpm start
15+
16+
# bundler:
17+
# cwd: ../../../alto
18+
# shell: pnpm ts-node src --config ../mud/packages/entrykit/playground/alto.config.json

packages/entrykit/package.json

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@latticexyz/entrykit",
3-
"version": "0.0.0",
3+
"version": "2.2.14",
44
"description": "User onboarding flows for MUD apps",
55
"repository": {
66
"type": "git",
@@ -10,19 +10,22 @@
1010
"license": "MIT",
1111
"type": "module",
1212
"exports": {
13-
".": "./dist/tsup/index.js",
14-
"./internal": "./dist/tsup/internal.js"
13+
".": "./dist/tsup/exports/index.js",
14+
"./internal": "./dist/tsup/exports/internal.js"
1515
},
1616
"typesVersions": {
1717
"*": {
1818
"index": [
19-
"./dist/tsup/index.d.ts"
19+
"./dist/tsup/exports/index.d.ts"
2020
],
2121
"internal": [
22-
"./dist/tsup/internal.d.ts"
22+
"./dist/tsup/exports/internal.d.ts"
2323
]
2424
}
2525
},
26+
"bin": {
27+
"deploy-local-prereqs": "./bin/deploy-local-prereqs.js"
28+
},
2629
"files": [
2730
"dist"
2831
],
@@ -31,19 +34,18 @@
3134
"build:js": "tsup",
3235
"clean": "pnpm run clean:js",
3336
"clean:js": "shx rm -rf dist",
37+
"data:relay-chains": "tsx src/scripts/get-relay-chains.ts",
3438
"dev": "tsup --watch",
3539
"playground": "mprocs",
3640
"playground:deploy": "mprocs --config mprocs.deploy.yaml",
37-
"snapshot:push": "gh workflow run snapshot.yml --ref entrykit",
38-
"snapshot:status": "gh run list --workflow snapshot.yml --limit 5",
3941
"test": "tsc --noEmit && vitest",
4042
"test:ci": "tsc --noEmit && vitest --run"
4143
},
4244
"dependencies": {
45+
"@account-abstraction/contracts": "^0.7.0",
4346
"@ark/util": "0.2.2",
4447
"@latticexyz/common": "workspace:*",
4548
"@latticexyz/config": "workspace:*",
46-
"@latticexyz/explorer": "workspace:*",
4749
"@latticexyz/id": "workspace:*",
4850
"@latticexyz/paymaster": "workspace:*",
4951
"@latticexyz/protocol-parser": "workspace:*",
@@ -55,6 +57,7 @@
5557
"@radix-ui/react-dialog": "^1.0.5",
5658
"@rainbow-me/rainbowkit": "2.1.7",
5759
"debug": "^4.3.4",
60+
"dotenv": "^16.0.3",
5861
"permissionless": "^0.2.3",
5962
"react-error-boundary": "^4.0.13",
6063
"react-merge-refs": "^2.1.1",

packages/entrykit/playground/anvil-state.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

packages/entrykit/playground/common.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import { Hex } from "viem";
22
import { anvil } from "viem/chains";
33

44
const testWorlds = {
5-
[anvil.id]: "0x6Eb9682FE93c6fE4346e0a1e70bC049Aa18CC0CA",
5+
// TODO: get this from somewhere else, like playground deploy output
6+
[anvil.id]: "0x60e7e3caed67b9d2cca14519b6cd7700a7d4ee66",
67
} as Partial<Record<string, Hex>>;
78

89
const searchParams = new URLSearchParams(window.location.search);

packages/entrykit/playground/wagmiConfig.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,20 @@ const chains = [
88
...anvil,
99
rpcUrls: {
1010
...anvil.rpcUrls,
11-
bundler: {
12-
http: ["http://127.0.0.1:4337"],
13-
},
11+
// bundler: {
12+
// http: ["http://127.0.0.1:4337"],
13+
// },
1414
// TODO: automatically grant allowance in anvil instead of requiring the service
15-
quarryPassIssuer: {
16-
http: ["http://127.0.0.1:3003/rpc"],
17-
},
15+
// quarryPassIssuer: {
16+
// http: ["http://127.0.0.1:3003/rpc"],
17+
// },
1818
},
1919
contracts: {
20-
// TODO: make optional in entrykit?
21-
quarryPaymaster: {
22-
address: "0x8D8b6b8414E1e3DcfD4168561b9be6bD3bF6eC4B",
20+
// quarryPaymaster: {
21+
// address: "0x8D8b6b8414E1e3DcfD4168561b9be6bD3bF6eC4B",
22+
// },
23+
paymaster: {
24+
address: "0xf03E61E7421c43D9068Ca562882E98d1be0a6b6e",
2325
},
2426
},
2527
},

packages/entrykit/src/AccountModalErrorBoundary.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ export function AccountModalErrorBoundary({ children }: Props) {
2525
<button
2626
type="button"
2727
onClick={async (event) => {
28-
// fake pending state while we retry so that if the same error occurs,
28+
// if we retry and the same error occurs, it'll look like the button click did nothing
29+
// so we'll fake a pending state here to give users an indication something is happening
2930
event.currentTarget.ariaBusy = "true";
3031
await wait(1000);
3132
resetErrorBoundary();

0 commit comments

Comments
 (0)