Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/install-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ runs:

- name: Install dependencies
shell: bash
run: bun install --ignore-scripts
run: bun install --ignore-scripts --frozen-lockfile
Binary file modified bun.lockb
Binary file not shown.
12 changes: 12 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# @zerodev/sdk

## 5.5.10

### Patch Changes

- feat: change custom polling interval to 200 for select chains

## 5.5.9

### Patch Changes

- feat: custom polling interval for select chains

## 5.5.8

### Patch Changes
Expand Down
13 changes: 11 additions & 2 deletions packages/core/clients/kernelAccountClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import {
} from "viem/account-abstraction"
import type { KernelSmartAccountImplementation } from "../accounts/index.js"
import { getUserOperationGasPrice } from "../actions/index.js"
import { FAST_POLLING_CHAIN_IDS } from "../constants.js"
import {
type KernelAccountClientActions,
kernelAccountClientActions
Expand Down Expand Up @@ -142,15 +143,23 @@ export function createKernelAccountClient(
userOperation
} = parameters

const chain = parameters.chain ?? client_?.chain
const defaultPollingInterval = FAST_POLLING_CHAIN_IDS.includes(
chain?.id as number
)
? 200
: 1000

const client = Object.assign(
createClient({
...parameters,
chain: parameters.chain ?? client_?.chain,
chain,
transport: bundlerTransport,
key,
name,
type: "kernelAccountClient",
pollingInterval: parameters.pollingInterval ?? 1000
pollingInterval:
parameters.pollingInterval ?? defaultPollingInterval
}),
{ client: client_, paymaster, paymasterContext, userOperation }
)
Expand Down
2 changes: 2 additions & 0 deletions packages/core/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,5 @@ export const getEntryPoint = <TEntryPointVersion extends EntryPointVersion>(

export const KERNEL_7702_DELEGATION_ADDRESS =
"0xd6CEDDe84be40893d153Be9d467CD6aD37875b28"

export const FAST_POLLING_CHAIN_IDS = [1, 10, 56, 137, 8453, 42161, 84532]
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zerodev/sdk",
"version": "5.5.8",
"version": "5.5.10",
"author": "ZeroDev",
"main": "./_cjs/index.js",
"module": "./_esm/index.js",
Expand Down
Loading