Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: upgrade to v4x.x.x #729

Merged
merged 169 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
169 commits
Select commit Hold shift + click to select a range
9cb9d92
refactor: split aa-alchemy into account-kit packages (#704)
moldy530 Jun 14, 2024
78090a4
refactor: split apart the signer and sca clients from the infra packa…
moldy530 Jun 14, 2024
b643981
refactor: change the prefix for aa-sdk packages (#722)
moldy530 Jun 17, 2024
9f77a54
fix: demo app not building (#733)
moldy530 Jun 18, 2024
45582b1
feat: surface descriptive session key errors (#718)
dphilipson Jun 18, 2024
6677ce8
fix: use updated package path in prettier config (#741)
bswags Jun 18, 2024
5126a9b
feat: icon animations (#717)
tinaszheng Jun 19, 2024
b7af7eb
refactor: move plugingen from aa-sdk to account-kit since it depends …
moldy530 Jun 19, 2024
109bb08
chore(release): publish v4.0.0-alpha.0 [skip-ci]
moldy530 Jun 19, 2024
099fa72
fix: yarn.lock had wrong versions of alpha packages
moldy530 Jun 20, 2024
92bdaa1
chore: add eslint rule to check just the re-exported functions have j…
moldy530 Jun 12, 2024
f81ef2f
chore: add fixer for re-exports rule
moldy530 Jun 17, 2024
9d6f912
chore: fix a batch of 10 jsdocs in account-kit core (#734)
moldy530 Jun 19, 2024
2097c2e
chore: fix the account-kit infra js docs (#735)
moldy530 Jun 19, 2024
2aea9e5
chore: fix the account kit react jsdocs (#736)
moldy530 Jun 19, 2024
71f5e67
chore: start fixing smart contracts package (#737)
moldy530 Jun 19, 2024
c3bd113
chore: add more fixes smart contracts package jsdocs (#738)
moldy530 Jun 19, 2024
365da45
chore: finish fixing jsdocs for smart contracts package (#739)
moldy530 Jun 20, 2024
afca753
chore: start fixing jsdocs for aa-sdk core (#740)
moldy530 Jun 20, 2024
2fbc7b0
chore: fix the last few jsdocs in aasdk core (#742)
moldy530 Jun 20, 2024
33be88a
chore: update yarn lock
moldy530 Jun 20, 2024
005a5a4
docs: add base skeleton for docs refactor
moldy530 Jun 20, 2024
9c81ffe
revert: add base skeleton for docs refactor
moldy530 Jun 20, 2024
f32b499
feat: new and improved auth modal (#761)
bswags Jun 21, 2024
7a759df
feat: add skeleton for ui demo
tinaszheng Jun 11, 2024
2d13086
feat: integrate shadcn and start on auth methods in demo app
bswags Jun 11, 2024
2a35171
feat: add tabs and passkey section to demo app
bswags Jun 12, 2024
64c51de
feat: add stylize tab
tinaszheng Jun 14, 2024
28a257a
feat: add photo upload
tinaszheng Jun 14, 2024
6028e24
feat: add custom theme switch component (#726)
tinaszheng Jun 17, 2024
b587612
feat: add toggle for code preview mode (#731)
tinaszheng Jun 18, 2024
6f5ccef
feat: add illustration styles option (#730)
tinaszheng Jun 18, 2024
0d0cc24
feat: add color picker (#732)
bswags Jun 18, 2024
72ac2e0
feat: hook up color and theme variables (#758)
tinaszheng Jun 20, 2024
5fec28e
feat: respect OS or root class for dark mode (#759)
bswags Jun 20, 2024
6e4d1d7
feat: support different illustration styles (#767)
bswags Jun 21, 2024
d00ca7d
feat: add links (#765)
tinaszheng Jun 21, 2024
00b2d2b
feat: add new logo (#762)
tinaszheng Jun 21, 2024
1d75910
feat: logged in state (#763)
tinaszheng Jun 21, 2024
ba92d84
feat: add code preview snippets (#760)
tinaszheng Jun 24, 2024
46391e8
fix: ui-demo app not building
moldy530 Jun 25, 2024
d611c37
feat: color picker for dark mode (#777)
tinaszheng Jun 25, 2024
e26e858
feat: use brand accent color as icon colors (#780)
tinaszheng Jun 25, 2024
e379588
feat: add border radius to account kit theme config (#781)
moldy530 Jun 25, 2024
3b3b932
fix: lowercase strings in the UI components (#784)
bswags Jun 26, 2024
a2f186b
refactor: add better defaults for LA utils (#782)
moldy530 Jun 26, 2024
fbff140
chore(release): publish v4.0.0-alpha.1 [skip-ci]
moldy530 Jun 26, 2024
84e44e6
feat: add ability to customize border radius in ui demo (#785)
tinaszheng Jun 27, 2024
cb59787
refactor!: move chain definitions out of aa-sdk core (#772)
moldy530 Jun 28, 2024
b5a1508
fix: add missing react-remove-scroll dep (#804)
bswags Jul 8, 2024
7ad44f6
feat: updates to demo app UI from design feedback (#805)
bswags Jul 8, 2024
3d5b9c5
chore(release): publish v4.0.0-alpha.2 [skip-ci]
moldy530 Jul 8, 2024
0d09472
fix(core): the reconnect method was causing an infinite loop (#808)
moldy530 Jul 9, 2024
cad8421
chore(release): publish v4.0.0-alpha.3 [skip-ci]
moldy530 Jul 9, 2024
2bfeff8
feat: read auth card props from context, simplify UI config (#789)
bswags Jul 10, 2024
1578d40
feat: responsive styling for demo app (#810)
bswags Jul 10, 2024
6806650
chore(release): publish v4.0.0-alpha.4 [skip-ci]
moldy530 Jul 10, 2024
b00444e
fix(ui-demo-app): fix the package json to include latest ak pkgs (#825)
moldy530 Jul 10, 2024
f4c889b
feat: smaller footer in UI components (#811)
bswags Jul 10, 2024
ea06e81
fix: add use client to a bunch of hooks that was misisng it (#829)
moldy530 Jul 11, 2024
a1c2d3b
chore(release): publish v4.0.0-alpha.5 [skip-ci]
moldy530 Jul 11, 2024
def2112
feat: add UI config defaults, better back navigation to auth UI (#827)
bswags Jul 12, 2024
7a6b411
docs: add skeleton for new docs
moldy530 Jun 20, 2024
d7b6410
docs: add cli for generating documentation from jsdocs (#721)
moldy530 Jun 26, 2024
5141d00
docs: generate function docs for account-kit core (#774)
moldy530 Jun 26, 2024
58cc7ab
docs: generate the account kit infra docs (#776)
moldy530 Jun 26, 2024
74d218d
docs: generate the account kit react docs (#783)
moldy530 Jun 26, 2024
af78000
docs: generate the ak signer reference docs (#786)
moldy530 Jun 26, 2024
ae14000
docs: generate docs for ak smart-contracts references (#787)
moldy530 Jun 26, 2024
eab71fb
docs: generate the aa-sdk core reference docs (#788)
moldy530 Jun 26, 2024
5007e85
docs: generate the ethers docs (#790)
moldy530 Jun 26, 2024
ef62710
fix(docs): broken build script for docs
moldy530 Jun 26, 2024
5c059bc
docs: fix the missing index files for reference section
moldy530 Jun 26, 2024
fab65af
docs: fix the docs gen for react to include components (#792)
moldy530 Jun 28, 2024
6fdcd08
refactor: eslint rule so that it shows errors in the correct file
moldy530 Jun 27, 2024
4968d83
feat: enable linting class methods from exported classes
moldy530 Jun 28, 2024
93cda90
chore: fix the jsdocs for class methods
moldy530 Jun 28, 2024
9a95628
docs: fix remaining class method jsdocs (#802)
moldy530 Jul 9, 2024
3cdea84
feat: add doc generator for class methods (#806)
moldy530 Jul 12, 2024
f9a6b2d
fix: merge base into this
moldy530 Jul 12, 2024
7a72dda
feat: some UI component polish from sync with product (#831)
bswags Jul 12, 2024
80a5435
feat(aa): new chain (#835)
0xfourzerofour Jul 15, 2024
140bec7
refactor: clean up some of the light account types (#828)
moldy530 Jul 16, 2024
576c0fd
refactor: combine core and client stores (#775)
dphilipson Jul 17, 2024
f2c9723
fix: passing gas manager to createConfig should use it (#836)
moldy530 Jul 17, 2024
4a1b35b
feat: update some demo app copy and UI for alpha testing (#830)
bswags Jul 17, 2024
23bcd22
feat(aa-sdk/core): add erc7677 middleware (#823)
moldy530 Jul 17, 2024
f22924f
chore: run prettier on ui-demo
moldy530 Jul 17, 2024
aac2a4d
feat(aa-sdk/core): add default arguments for erc7677 middleware (#839)
andysim3d Jul 18, 2024
0a5a4ae
feat: clean up UI state on log out (#832)
bswags Jul 18, 2024
5859449
fix(ui-demo): signer state was being cleared when ui config changed (…
moldy530 Jul 18, 2024
da015b5
chore(release): publish v4.0.0-alpha.6 [skip-ci]
moldy530 Jul 18, 2024
373ad81
fix(core): initial state parsing and disconnect logic (#842)
moldy530 Jul 19, 2024
1f48f24
fix(ui-demo): add passkey toggle wasn't working (#843)
moldy530 Jul 19, 2024
4e645e9
feat(erc7677): create a new middle ware for erc7677 to replace gasMan…
andysim3d Jul 19, 2024
b5f9fa5
fix: exporting queryClient and typing uiConfig in example (#844)
avarobinson Jul 19, 2024
e078533
chore(release): publish v4.0.0-alpha.7 [skip-ci]
moldy530 Jul 19, 2024
f95e3e8
fix: fix demo header links and update guide (#845)
avarobinson Jul 19, 2024
83a9c08
fix: fixing nav links (#848)
avarobinson Jul 19, 2024
2d13b05
fix(react): fix sign in header hiding itself (#851)
moldy530 Jul 22, 2024
8103811
chore(release): publish v4.0.0-alpha.8 [skip-ci]
moldy530 Jul 22, 2024
e400299
fix: update CSS override url attempt 2 (#861)
willhennessy Jul 24, 2024
301c524
test: refactor the vitest config for easier sharing
moldy530 Jul 22, 2024
ac42cb0
chore: update test script to use vitest (#857)
moldy530 Jul 25, 2024
a38a5ff
test(smart-contracts): migrate one test suite to use prool instance (…
moldy530 Jul 25, 2024
1f4b316
test: add paymaster mock config (#859)
moldy530 Jul 26, 2024
c138865
test: migrate LA e2e test to use prool (#862)
moldy530 Jul 26, 2024
10b01d1
test: add support for testing with 070 paymaster (#864)
moldy530 Jul 30, 2024
7a749d5
test: migrate the multiowner LA tests to prool (#866)
moldy530 Jul 30, 2024
e912178
docs: delete a bunch of old docs files in prep for new ones
moldy530 Jul 29, 2024
7bfacf7
docs: add the new landing page
moldy530 Jul 29, 2024
d782f73
docs: add react overview page
moldy530 Jul 30, 2024
ef856be
docs: add concept doc for sca (#879)
moldy530 Jul 30, 2024
b39deaa
docs: add concept docs for the 2 client types (#880)
moldy530 Jul 30, 2024
dbca4dd
docs: add the signer concept doc (#881)
moldy530 Jul 30, 2024
a8e7f11
docs: add middleware concept doc (#882)
moldy530 Jul 30, 2024
1836333
feat: add injected wallets to the UX (#841)
moldy530 Jul 31, 2024
c279b41
chore(release): publish v4.0.0-alpha.9 [skip-ci]
moldy530 Jul 31, 2024
5fd5863
docs: add back the resources section of the site
moldy530 Jul 31, 2024
0deb3b4
docs: add more context on github discussion in faq
moldy530 Jul 31, 2024
58547fc
docs: add the react quick start
moldy530 Jul 31, 2024
40da0e9
docs: add guide on authenticating users
moldy530 Jul 31, 2024
4283d8a
docs: add send user operation guide
moldy530 Jul 31, 2024
7a5ce01
docs: add back the ssr guide
moldy530 Jul 31, 2024
40af297
docs: add doc on sponsoring gas
moldy530 Jul 31, 2024
8a20173
docs(react): add passkey and multi-chain app docs
moldy530 Jul 31, 2024
826a46b
docs: fix some of the blocking issues on react pages
moldy530 Aug 1, 2024
540bc3e
docs: add some more missing deps to docs
moldy530 Aug 1, 2024
b0d38f9
docs: update the package deps on the site
moldy530 Aug 1, 2024
3b4882d
docs: fix ssr twoslash errors
moldy530 Aug 1, 2024
66b5cd4
refactor: make multichain config easier (#890)
moldy530 Aug 1, 2024
d44f274
docs: supress config errors for now on docs
moldy530 Aug 1, 2024
a609a57
docs: ignore missing error that's not an error
moldy530 Aug 1, 2024
c0e4ac7
docs: add guides entry point to overview sidebar
moldy530 Aug 1, 2024
d6db4aa
chore(release): publish v4.0.0-alpha.10 [skip-ci]
moldy530 Aug 1, 2024
56beda0
docs: add missing migration info to docs
moldy530 Aug 2, 2024
f460e8a
docs: fix react qs link (#905)
avarobinson Aug 7, 2024
cdf4825
fix: await instance reset (#919)
adamegyed Aug 14, 2024
53a9443
docs: add infra quick start docs
moldy530 Aug 13, 2024
73aca04
docs: add drop and replace and gas sponsorship docs to infra
moldy530 Aug 13, 2024
ba42ea5
docs: add the alchemy signer docs
moldy530 Aug 14, 2024
70c9947
docs: add 3rd party infra docs
moldy530 Aug 14, 2024
db85817
docs: port over the old MA docs
moldy530 Aug 15, 2024
279cdfb
docs: migrate the old LA docs
moldy530 Aug 15, 2024
765a687
docs: add using smart accounts docs
moldy530 Aug 15, 2024
c3b2037
docs: add extending sca docs
moldy530 Aug 15, 2024
b2e13d8
chore: update the deps for the docs
moldy530 Aug 15, 2024
c3ebab1
test: add multi-owner ma tests (#931)
moldy530 Aug 16, 2024
0d4ee5e
refactor: dont use paymaster middleware during drop and replace (#921)
moldy530 Aug 16, 2024
bac3007
refactor: change up the sidebar in the demo app (#895)
moldy530 Aug 16, 2024
b196439
feat: allow for passkey + email signup (#920)
moldy530 Aug 16, 2024
54ecbfe
refactor!: remove nested account params for non-alchemy clients (#930)
moldy530 Aug 16, 2024
6d1bfc5
feat(react): enable multi-owner la usage in core and react (#893)
moldy530 Aug 16, 2024
5444295
docs: refactor shared sidebar items
moldy530 Aug 16, 2024
7dde8da
chore(release): publish v4.0.0-alpha.11 [skip-ci]
moldy530 Aug 16, 2024
f24f8f9
docs: refactor the sidebar with nesting (#932)
moldy530 Aug 20, 2024
b5714b6
feat: make it easier to start with account-kit/core (#933)
moldy530 Aug 20, 2024
1644252
chore(release): publish v4.0.0-alpha.12 [skip-ci]
moldy530 Aug 20, 2024
1b1b2f4
chore: fix the yarn lock for the site
moldy530 Aug 21, 2024
f752d58
docs: add more account-kit core docs
moldy530 Aug 21, 2024
8113cad
docs: add ssr docs to core js
moldy530 Aug 21, 2024
b337acd
docs: address some nits on the sidebar
moldy530 Aug 21, 2024
24b9fed
feat(chains): add arbnova and shape (#937)
0xfourzerofour Aug 21, 2024
b4eca27
refactor(ui): injected wallets in one button now with selector screen…
moldy530 Aug 27, 2024
4614fda
feat: add wallet connect to injected wallet setup
moldy530 Aug 21, 2024
518a865
docs: add docs on how to customize react components
moldy530 Aug 21, 2024
9d409c4
docs: fix some of the signer docs
moldy530 Aug 27, 2024
40af504
chore: upgrade to latest version of viem and wagmi (#941)
moldy530 Aug 28, 2024
587894a
fix(ui-modal): don't render ui modal if no ui config is passed in (#943)
moldy530 Aug 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
44 changes: 31 additions & 13 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"es2021": true,
"node": true
},
"plugins": ["import"],
"plugins": ["import", "eslint-rules"],
"parserOptions": {
"sourceType": "module"
},
Expand All @@ -29,30 +29,48 @@
"enableFixer": true
}
],
"jsdoc/require-jsdoc": [
"warn",
"jsdoc/require-param-type": "error",
"jsdoc/require-returns-type": "error",
"jsdoc/no-types": "off",
"jsdoc/require-jsdoc": "off",
"jsdoc/match-description": [
"error",
{
"publicOnly": {
"ancestorsOnly": true
},
"enableFixer": false,
"require": {
"FunctionDeclaration": true,
"MethodDefinition": true,
"ClassDeclaration": true,
"ArrowFunctionExpression": true
"matchDescription": "[A-Z].*",
"tags": {
"example": {
"message": "Example tags must provide a code block with a language identifier.",
"match": "```(js|javascript|ts|tsx)([\\s\\S]*)```"
}
}
}
],
"eslint-rules/require-jsdoc-on-reexported-functions": [
"error",
{
"fixBatchSize": 0
}
]
},
"overrides": [
{
"files": ["site/snippets/**/*.ts", "site/snippets/**/*.tsx"],
"files": [
"site/snippets/**/*.ts",
"site/snippets/**/*.tsx",
"**/site/**/*.mdx"
],
"rules": {
"@typescript-eslint/no-unused-vars": "off",
"import/extensions": ["off", "ignorePackages"],
"jsdoc/require-jsdoc": "off"
}
},
{
"files": ["**/*.mdx"],
"extends": ["plugin:mdx/recommended"],
"settings": {
"import/extensions": ["off", "ignorePackages"]
}
}
]
}
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.site/**/*/reference/**/*.md linguist-generated
site/**/*/reference/**/*.mdx linguist-generated
site/sidebar/**/*.ts linguist-generated
31 changes: 31 additions & 0 deletions .github/actions/setup-node/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 'Setup Node with Cache'
description: 'Setup Node.js with caching for node_modules and install dependencies'
inputs:
node-version:
description: 'Node.js version'
required: false
default: '22'

runs:
using: 'composite'
steps:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node-version }}
cache: yarn

- name: Install dependencies
run: yarn install --frozen-lockfile
shell: bash

- name: Cache Nx and Node modules
id: cache-nx
uses: actions/cache@v3
with:
path: |
.nx
node_modules/.cache/nx
key: ${{ runner.os }}-nx-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-nx-
55 changes: 32 additions & 23 deletions .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,8 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"

- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Setup Node
uses: ./.github/actions/setup-node

- name: Use commitlint to check PR title
env:
Expand All @@ -31,20 +25,19 @@ jobs:
pull-requests: write
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.ALCHEMY_BOT_PAT }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.ALCHEMY_BOT_PAT }}
fetch-depth: "0"

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
- name: Setup Node
uses: ./.github/actions/setup-node

- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build eslint plugin
run: |
cd templates/eslint && yarn build

- uses: reviewdog/action-setup@v1
with:
Expand All @@ -53,6 +46,9 @@ jobs:
- name: Run eslint with reviewdog
run: |
npx --no-install -c "eslint -f=rdjson ." | reviewdog -f=rdjson -reporter=github-pr-review -filter-mode=added -tee

- name: Run eslint for errors
run: yarn lint:check

build_and_lint_and_test:
name: Build and Test
Expand All @@ -65,14 +61,26 @@ jobs:
fetch-depth: "0"
submodules: "recursive"

- name: Setup Node.js
uses: actions/setup-node@v3
# using your own fork url avoids getting rate limited by the public api
# later we'll look at deploying everything we need directly to anvil so
# so we don't need a fork url
- name: Conditionally set fork url
if: ${{ env.API_KEY != '' }}
run: echo "VITEST_SEPOLIA_FORK_URL=https://eth-sepolia.g.alchemy.com/v2/${{ env.API_KEY }}" >> $GITHUB_ENV

- name: Set up foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Set up Rundler
uses: jaxxstorm/[email protected]
with:
node-version: 18
cache: "yarn"
repo: alchemyplatform/rundler
platform: linux
tag: v0.2.2
cache: enable

- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Setup Node
uses: ./.github/actions/setup-node

- name: Build
uses: nick-fields/retry@v3
Expand All @@ -81,7 +89,8 @@ jobs:
with:
timeout_minutes: 5
max_attempts: 2
command: yarn build
# it's ok to run the dev build here because the site gets built in vercel for each branch
command: yarn build:dev

- name: Unit Test
run: yarn test
run: yarn test:ci
9 changes: 6 additions & 3 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,13 @@ jobs:
fetch-depth: "0"
submodules: "recursive"

- name: Set Node.js 18.x
- name: Set up foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Set Node.js 22.x
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 22
cache: "yarn"

- name: Set Github User Details
Expand All @@ -63,7 +66,7 @@ jobs:
run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc

- name: Install dependencies
run: yarn
run: yarn install --frozen-lockfile

- name: Build
env:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ site/**/*.js
**/userop.json

vocs.config.tsx.timestamp-*.mjs

bin
30 changes: 30 additions & 0 deletions .vitest/globalSetup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import dotenv from "dotenv";
dotenv.config();

import isCi from "is-ci";
import { rundlerBinaryPath } from "./src/constants";
import * as instances from "./src/instances";
import {
cleanupRundler,
downloadLatestRundlerRelease,
isRundlerInstalled,
} from "./src/rundler";

export default async function () {
if (!isCi && !(await isRundlerInstalled(rundlerBinaryPath))) {
await downloadLatestRundlerRelease(rundlerBinaryPath);
}

const shutdown = await Promise.all(
Object.values(instances).map(async (instance) => {
const shutdown = instance.start();

return shutdown;
})
);

return async () => {
await Promise.all(shutdown.map((stop) => stop()));
await cleanupRundler(rundlerBinaryPath);
};
}
17 changes: 17 additions & 0 deletions .vitest/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "local-vitest",
"version": "0.0.0",
"private": true,
"type": "module",
"devDependencies": {
"@types/is-ci": "^3.0.4",
"is-ci": "^3.0.1",
"prool": "^0.0.15",
"tar": "^7.4.1",
"typescript-template": "*",
"viem": "2.20.0"
},
"dependencies": {
"@aa-sdk/core": "^4.0.0-alpha.8"
}
}
37 changes: 35 additions & 2 deletions .vitest/setupTests.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,39 @@
import dotenv from "dotenv";
import fetch from "node-fetch";
dotenv.config();

// @ts-expect-error wut
import fetch from "node-fetch";
import { setAutomine } from "viem/actions";
import { beforeAll } from "vitest";
import { poolId } from "./src/constants.js";
import { local060Instance, local070Instance } from "./src/instances.js";
import { paymaster060 } from "./src/paymaster/paymaster060.js";
import { paymaster070 } from "./src/paymaster/paymaster070.js";

// @ts-expect-error this does exist but ts is not liking it
global.fetch = fetch;

beforeAll(async () => {
const client060 = local060Instance.getClient();
const client070 = local070Instance.getClient();
await setAutomine(client060, true);
await setAutomine(client070, true);

await paymaster060.deployPaymasterContract(client060);
await paymaster070.deployPaymasterContract(client070);
}, 60_000);

afterEach(() => {
onTestFailed(async () => {
console.log(`Logs for failed test [${poolId()}]:`);
console.log(await local060Instance.getLogs("anvil"));
console.log(await local060Instance.getLogs("bundler"));

console.log(await local070Instance.getLogs("anvil"));
console.log(await local070Instance.getLogs("bundler"));
});
});

afterAll(async () => {
await local060Instance.restart();
await local070Instance.restart();
});
70 changes: 70 additions & 0 deletions .vitest/src/Proxy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
export const ERC1967ProxyAbi = {
abi: [
{
type: "constructor",
inputs: [
{ name: "_logic", type: "address", internalType: "address" },
{ name: "_data", type: "bytes", internalType: "bytes" },
],
stateMutability: "payable",
},
{ type: "fallback", stateMutability: "payable" },
{ type: "receive", stateMutability: "payable" },
{
type: "event",
name: "AdminChanged",
inputs: [
{
name: "previousAdmin",
type: "address",
indexed: false,
internalType: "address",
},
{
name: "newAdmin",
type: "address",
indexed: false,
internalType: "address",
},
],
anonymous: false,
},
{
type: "event",
name: "BeaconUpgraded",
inputs: [
{
name: "beacon",
type: "address",
indexed: true,
internalType: "address",
},
],
anonymous: false,
},
{
type: "event",
name: "Upgraded",
inputs: [
{
name: "implementation",
type: "address",
indexed: true,
internalType: "address",
},
],
anonymous: false,
},
],
bytecode: {
object:
"0x60406080815261042c908138038061001681610218565b93843982019181818403126102135780516001600160a01b038116808203610213576020838101516001600160401b0394919391858211610213570186601f820112156102135780519061007161006c83610253565b610218565b918083528583019886828401011161021357888661008f930161026e565b813b156101b9577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b031916841790556000927fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8480a28051158015906101b2575b61010b575b855160e790816103458239f35b855194606086019081118682101761019e578697849283926101889952602788527f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c87890152660819985a5b195960ca1b8a8901525190845af4913d15610194573d9061017a61006c83610253565b91825281943d92013e610291565b508038808080806100fe565b5060609250610291565b634e487b7160e01b84526041600452602484fd5b50826100f9565b855162461bcd60e51b815260048101859052602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608490fd5b600080fd5b6040519190601f01601f191682016001600160401b0381118382101761023d57604052565b634e487b7160e01b600052604160045260246000fd5b6001600160401b03811161023d57601f01601f191660200190565b60005b8381106102815750506000910152565b8181015183820152602001610271565b919290156102f357508151156102a5575090565b3b156102ae5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156103065750805190602001fd5b6044604051809262461bcd60e51b825260206004830152610336815180928160248601526020868601910161026e565b601f01601f19168101030190fdfe60806040523615605f5773ffffffffffffffffffffffffffffffffffffffff7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54166000808092368280378136915af43d82803e15605b573d90f35b3d90fd5b73ffffffffffffffffffffffffffffffffffffffff7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54166000808092368280378136915af43d82803e15605b573d90f3fea26469706673582212202e7baf1368345efcec935186bf9faf2338cba6a5337e8e5fdf2e25a91695dad464736f6c63430008110033",
linkReferences: {},
},
deployedBytecode: {
object:
"0x60806040523615605f5773ffffffffffffffffffffffffffffffffffffffff7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54166000808092368280378136915af43d82803e15605b573d90f35b3d90fd5b73ffffffffffffffffffffffffffffffffffffffff7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54166000808092368280378136915af43d82803e15605b573d90f3fea26469706673582212202e7baf1368345efcec935186bf9faf2338cba6a5337e8e5fdf2e25a91695dad464736f6c63430008110033",
linkReferences: {},
},
methodIdentifiers: {},
} as const;
Loading
Loading