@zerodev/sdk
Advanced tools
Comparing version 4.1.1 to 4.1.2
@@ -167,2 +167,13 @@ "use strict"; | ||
} | ||
let kernelImplAddr; | ||
try { | ||
const strgAddr = await this.getPublicClient().getStorageAt({ | ||
address: kernel, | ||
slot: "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc", | ||
}); | ||
kernelImplAddr = strgAddr | ||
? ("0x" + strgAddr.slice(26)) | ||
: strgAddr; | ||
} | ||
catch (error) { } | ||
const sender = kernel; | ||
@@ -173,3 +184,9 @@ const signer = await this.signer(); | ||
name: "Kernel", | ||
version: "0.2.1", | ||
version: kernelImplAddr?.toLowerCase() === constants_js_1.KERNEL_IMPL_ADDRESS.toLowerCase() || | ||
kernelImplAddr?.toLowerCase() === | ||
"0x8dD4DBB54d8A8Cf0DE6F9CCC4609470A30EfF18C".toLowerCase() || | ||
kernelImplAddr === undefined || | ||
kernelImplAddr === viem_1.zeroAddress | ||
? "0.2.2" | ||
: "0.2.1", | ||
chainId: this.chain.id, | ||
@@ -176,0 +193,0 @@ verifyingContract: sender, |
import {} from "@alchemy/aa-core"; | ||
import { concat, pad, toHex, concatHex, hexToBigInt, createPublicClient, http, } from "viem"; | ||
import { concat, pad, toHex, concatHex, hexToBigInt, createPublicClient, http, zeroAddress, } from "viem"; | ||
import { KernelAccountAbi } from "../abis/KernelAccountAbi.js"; | ||
import { BUNDLER_URL, CHAIN_ID_TO_NODE, ECDSA_VALIDATOR_ADDRESS, ENTRYPOINT_ADDRESS, } from "../constants.js"; | ||
import { BUNDLER_URL, CHAIN_ID_TO_NODE, ECDSA_VALIDATOR_ADDRESS, ENTRYPOINT_ADDRESS, KERNEL_IMPL_ADDRESS, } from "../constants.js"; | ||
import { polygonMumbai } from "viem/chains"; | ||
@@ -165,2 +165,13 @@ export var ValidatorMode; | ||
} | ||
let kernelImplAddr; | ||
try { | ||
const strgAddr = await this.getPublicClient().getStorageAt({ | ||
address: kernel, | ||
slot: "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc", | ||
}); | ||
kernelImplAddr = strgAddr | ||
? ("0x" + strgAddr.slice(26)) | ||
: strgAddr; | ||
} | ||
catch (error) { } | ||
const sender = kernel; | ||
@@ -171,3 +182,9 @@ const signer = await this.signer(); | ||
name: "Kernel", | ||
version: "0.2.1", | ||
version: kernelImplAddr?.toLowerCase() === KERNEL_IMPL_ADDRESS.toLowerCase() || | ||
kernelImplAddr?.toLowerCase() === | ||
"0x8dD4DBB54d8A8Cf0DE6F9CCC4609470A30EfF18C".toLowerCase() || | ||
kernelImplAddr === undefined || | ||
kernelImplAddr === zeroAddress | ||
? "0.2.2" | ||
: "0.2.1", | ||
chainId: this.chain.id, | ||
@@ -174,0 +191,0 @@ verifyingContract: sender, |
{ | ||
"name": "@zerodev/sdk", | ||
"version": "4.1.1", | ||
"version": "4.1.2", | ||
"description": "A collection of ERC-4337 compliant smart contract account interfaces", | ||
@@ -5,0 +5,0 @@ "author": "ZeroDev", |
@@ -19,2 +19,3 @@ import { | ||
http, | ||
zeroAddress, | ||
} from "viem"; | ||
@@ -27,2 +28,3 @@ import { KernelAccountAbi } from "../abis/KernelAccountAbi.js"; | ||
ENTRYPOINT_ADDRESS, | ||
KERNEL_IMPL_ADDRESS, | ||
} from "../constants.js"; | ||
@@ -199,2 +201,12 @@ import { polygonMumbai } from "viem/chains"; | ||
} | ||
let kernelImplAddr; | ||
try { | ||
const strgAddr = await this.getPublicClient().getStorageAt({ | ||
address: kernel, | ||
slot: "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc", | ||
}); | ||
kernelImplAddr = strgAddr | ||
? (("0x" + strgAddr.slice(26)) as Hex) | ||
: strgAddr; | ||
} catch (error) {} | ||
const sender = kernel; | ||
@@ -205,3 +217,10 @@ const signer = await this.signer(); | ||
name: "Kernel", | ||
version: "0.2.1", | ||
version: | ||
kernelImplAddr?.toLowerCase() === KERNEL_IMPL_ADDRESS.toLowerCase() || | ||
kernelImplAddr?.toLowerCase() === | ||
"0x8dD4DBB54d8A8Cf0DE6F9CCC4609470A30EfF18C".toLowerCase() || | ||
kernelImplAddr === undefined || | ||
kernelImplAddr === zeroAddress | ||
? "0.2.2" | ||
: "0.2.1", | ||
chainId: this.chain.id, | ||
@@ -208,0 +227,0 @@ verifyingContract: sender, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2071077
33763