Skip to content

Commit eb30f2f

Browse files
linnalldslovinskydphilipsonAlchemy Botblakecduncan
authored
feat: enables installValidation to take a Modular Account with no signer (#1663)
* fix: run api spec generate as part of aa-sdk deploy (#1654) * fix: run api spec generate as part of aa-sdk deploy * ci: create aa-sdk copy of setup-pnpm composite action * ci: remove unnecessary install node in pnpm composite action * ci: try installing pnpm with exact action version * ci: test with pnpm moved out of its own composite * ci: fuck you install pnpm * ci: ?????? * revert: install pnpm in its own setup composite * ci: specify package.json for pnpm --------- Co-authored-by: dslovinsky <[email protected]> * feat(rn-signer): support passkeys in React Native (#1653) * chore(release): publish v4.37.0 [skip-ci] * feat: add erc20 sponsorship card (#1631) * fix: remove trailing slash from alchemy rpc url (#1657) * chore(release): publish v4.38.0 [skip-ci] * fix: update copy (#1658) * feat: add alchemy_requestPaymasterTokenQuote to aa-sdk (#1659) * feat: add alchemy_requestPaymasterTokenQuote to aa-sdk * fix: typo * chore(release): publish v4.39.0 [skip-ci] * feat: enables installValidation to take a Modular Account with no signer * fix: test thank you howy * test: update the rundler version we use in prool (#1646) * chore: experimenting with types (#1665) * chore: modifies types --------- Co-authored-by: Daniel Slovinsky <[email protected]> Co-authored-by: dslovinsky <[email protected]> Co-authored-by: David Philipson <[email protected]> Co-authored-by: Alchemy Bot <[email protected]> Co-authored-by: Blake Duncan <[email protected]> Co-authored-by: jakehobbs <[email protected]> Co-authored-by: Andy <[email protected]> Co-authored-by: Michael Moldoveanu <[email protected]> Co-authored-by: howy <[email protected]>
1 parent e072d8c commit eb30f2f

File tree

108 files changed

+4256
-826
lines changed

Some content is hidden

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

108 files changed

+4256
-826
lines changed

.github/actions/publish-fern/action.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,14 @@ outputs:
2727
runs:
2828
using: "composite"
2929
steps:
30-
- name: Install Fern
30+
- name: Setup pnpm
31+
uses: ./.github/actions/setup-docs-pnpm
32+
33+
- name: Run Generate
3134
shell: bash
32-
run: npm install -g fern-api
35+
run: |
36+
cd docs-site
37+
pnpm run generate
3338
3439
- name: Start deployment
3540
uses: actions/github-script@v7
@@ -64,9 +69,9 @@ runs:
6469
run: |
6570
cd docs-site
6671
if [[ "${{ inputs.preview }}" == "true" ]]; then
67-
OUTPUT=$(fern generate --docs --preview 2>&1) || true
72+
OUTPUT=$(pnpm fern generate --docs --preview 2>&1) || true
6873
else
69-
OUTPUT=$(fern generate --docs --log-level debug 2>&1) || true
74+
OUTPUT=$(pnpm fern generate --docs --log-level debug 2>&1) || true
7075
fi
7176
echo "$OUTPUT"
7277
URL=$(echo "$OUTPUT" | grep -oP 'Published docs to \K.*(?= \()')
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: "Setup pnpm for docs-site"
2+
description: "Sets up pnpm with caching"
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: Install pnpm
8+
uses: pnpm/action-setup@v4
9+
id: pnpm-install
10+
with:
11+
version: 10.9.0
12+
run_install: false
13+
package_json_file: docs-site/package.json
14+
15+
- name: Get pnpm store directory
16+
id: pnpm-cache
17+
shell: bash
18+
run: |
19+
echo "STORE_PATH=$(cd docs-site && pnpm store path)" >> $GITHUB_OUTPUT
20+
21+
- name: Cache Node Modules
22+
uses: actions/cache@v4
23+
with:
24+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
25+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('docs-site/pnpm-lock.yaml') }}
26+
restore-keys: |
27+
${{ runner.os }}-pnpm-store-
28+
29+
- name: Install dependencies
30+
shell: bash
31+
run: cd docs-site && pnpm install

.github/actions/setup/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ runs:
4444
uses: foundry-rs/foundry-toolchain@v1
4545
with:
4646
cache: false
47+
version: v1.2.2
4748

4849
# Android setup
4950
- name: Check turborepo cache for Android

.github/workflows/on-pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
with:
9191
repo: alchemyplatform/rundler
9292
platform: linux
93-
tag: v0.2.2
93+
tag: v0.8.2
9494
cache: enable
9595

9696
- name: Build Libraries

.vitest/globalSetup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
cleanupRundler,
99
downloadLatestRundlerRelease,
1010
isRundlerInstalled,
11-
} from "./src/rundler";
11+
} from "./src/rundler/binary";
1212

1313
export default async function () {
1414
if (!isCi && !(await isRundlerInstalled(rundlerBinaryPath))) {

.vitest/src/instances.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ dotenv.config();
33

44
import getPort from "get-port";
55
import { createServer } from "prool";
6-
import { anvil, rundler } from "prool/instances";
6+
import { anvil } from "prool/instances";
77
import { createClient, http, type Chain, type ClientConfig } from "viem";
88
import { localhost } from "viem/chains";
99
import { split } from "../../aa-sdk/core/src/transport/split";
1010
import { poolId, rundlerBinaryPath } from "./constants";
1111
import { paymasterTransport } from "./paymaster/transport";
12+
import { rundler } from "./rundler/instance";
1213

1314
export const local060Instance = defineInstance({
1415
chain: localhost,
@@ -145,13 +146,15 @@ function defineInstance(params: DefineInstanceParams) {
145146
rundler(
146147
{
147148
binary: rundlerBinaryPath,
148-
entryPointVersion,
149+
// ...(entryPointVersion === "0.6.0"
150+
// ? { disableEntryPointV0_7: true }
151+
// : { disableEntryPointV0_6: true }),
149152
nodeHttp: `http://127.0.0.1:${anvilPort}/${key}`,
150153
rpc: {
151154
api: "eth,rundler,debug",
152155
},
153156
},
154-
{ messageBuffer: 1000 },
157+
{ messageBuffer: 10 },
155158
),
156159
port: bundlerPort,
157160
});

.vitest/src/rundler.ts renamed to .vitest/src/rundler/binary.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export async function cleanupRundler(rundlerPath: string) {
2222

2323
export async function downloadLatestRundlerRelease(
2424
filePath: string,
25-
version = "v0.2.2",
25+
version = "v0.8.2",
2626
) {
2727
const repoUrl =
2828
"https://api.github.com/repos/alchemyplatform/rundler/releases";

.vitest/src/rundler/instance.test.ts

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
import getPort from "get-port";
2+
import { createServer } from "prool";
3+
import { anvil } from "prool/instances";
4+
import { rundlerBinaryPath } from "../constants";
5+
import { rundler, type RundlerParameters } from "./instance";
6+
7+
describe("instance: 'rundler'", async () => {
8+
const port = await getPort();
9+
10+
beforeAll(async () => {
11+
await anvil({ port }).start();
12+
});
13+
14+
test("request: /{id}", async () => {
15+
const server = createServer({
16+
instance: rundler(rundlerOptions({ port })),
17+
});
18+
const stop = await server.start();
19+
const { port: port_2 } = server.address()!;
20+
21+
const response = await fetch(`http://localhost:${port_2}/1`, {
22+
body: JSON.stringify({
23+
method: "eth_supportedEntryPoints",
24+
params: [],
25+
id: 0,
26+
jsonrpc: "2.0",
27+
}),
28+
headers: {
29+
"Content-Type": "application/json",
30+
},
31+
method: "POST",
32+
});
33+
expect(response.status).toBe(200);
34+
expect(await response.json()).toMatchInlineSnapshot(`
35+
{
36+
"id": 0,
37+
"jsonrpc": "2.0",
38+
"result": [
39+
"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
40+
"0x0000000071727De22E5E9d8BAf0edAc6f37da032",
41+
],
42+
}
43+
`);
44+
await stop();
45+
});
46+
});
47+
48+
export const rundlerOptions = ({
49+
port,
50+
}: {
51+
port: number;
52+
}): RundlerParameters => ({
53+
binary: rundlerBinaryPath,
54+
nodeHttp: `http://localhost:${port}`,
55+
rpc: {
56+
api: "eth,rundler,debug",
57+
},
58+
signer: {
59+
privateKeys: [
60+
"0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80",
61+
"0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d",
62+
],
63+
},
64+
});

0 commit comments

Comments
 (0)