### Build and Test Kernel Smart Contract Source: https://github.com/zerodevapp/kernel/blob/dev/README.md This snippet outlines the essential commands for setting up, compiling, and testing the Kernel smart contract project. Ensure Foundry is installed before executing these commands. ```Shell forge install forge build forge test ``` -------------------------------- ### Foundry Build and Test Commands Source: https://github.com/zerodevapp/kernel/blob/dev/CLAUDE.md Provides a list of common `forge` commands for compiling, testing, and debugging smart contracts within the Foundry development environment. Includes options for running specific tests, files, verbose output, and optimized profiles. ```Shell forge build forge test forge test --match-test testFunctionName forge test --match-path test/Kernel.t.sol forge test -vv FOUNDRY_PROFILE=optimized forge test ``` -------------------------------- ### Solidity Contract Structure and Standards Source: https://github.com/zerodevapp/kernel/blob/dev/CLAUDE.md Provides guidelines for Solidity contract structure, emphasizing gas optimization through immutable variables and adherence to ERC-4337 and ERC-7579 standards. Also recommends using explicit storage slots with assembly for upgradeability. ```APIDOC Use immutable variables when possible for gas optimization Follow ERC-4337 and ERC-7579 standards Use explicit storage slots with assembly for upgradeability ``` -------------------------------- ### Solidity Code Formatting Guidelines Source: https://github.com/zerodevapp/kernel/blob/dev/CLAUDE.md Defines standard formatting rules for Solidity code, including indentation (4 spaces), brace placement (same line as declaration), and import statements. Emphasizes the use of named imports for clarity and line separators for sectioning. ```Solidity import {Contract} from "./path.sol"; ``` -------------------------------- ### Solidity Naming Conventions Source: https://github.com/zerodevapp/kernel/blob/dev/CLAUDE.md Outlines standard naming conventions for Solidity contracts, interfaces, functions, private/internal variables, and constants to ensure consistency and readability across the codebase. ```APIDOC Contracts: PascalCase (e.g. Kernel) Interfaces: Prefixed with "I" (e.g. IValidator) Functions: camelCase (e.g. validateUserOp) Private/internal: underscore prefix (e.g. _executeUserOp) Constants: ALL_CAPS_WITH_UNDERSCORES ``` -------------------------------- ### Solidity Custom Error Handling Source: https://github.com/zerodevapp/kernel/blob/dev/CLAUDE.md Specifies the use of custom errors instead of `require` statements for more gas-efficient and informative error handling in Solidity. Recommends the `if-revert` pattern for conditional error triggering. ```Solidity error InvalidValidator(); if (condition) { revert ErrorName(); } ``` -------------------------------- ### ZeroDev Kernel Contract Addresses - v2.1 Source: https://github.com/zerodevapp/kernel/blob/dev/README.md Lists the contract names and their corresponding addresses for version 2.1 of the ZeroDev Kernel components. ```APIDOC Kernel: 0xf048AD83CB2dfd6037A43902a2A5Be04e53cd2Eb KernelFactory: 0x5de4839a76cf55d0c90e2061ef4386d962E15ae3 SessionKeyValidator: 0x5C06CE2b673fD5E6e56076e40DD46aB67f5a72A5 ECDSA Validator: 0xd9AB5096a832b9ce79914329DAEE236f8Eea0390 ``` -------------------------------- ### ZeroDev Kernel Contract Addresses - v2.0 Source: https://github.com/zerodevapp/kernel/blob/dev/README.md Lists the contract names and their corresponding addresses for version 2.0 of the ZeroDev Kernel components. ```APIDOC Kernel: 0xeB8206E02f6AB1884cfEa58CC7BabdA7d55aC957 TempKernel: 0x727A10897e70cd3Ab1a6e43d59A12ab0895A4995 KernelFactory: 0x12358cA00141D09cB90253F05a1DD16bE93A8EE6 ECDSA Validator: 0x180D6465F921C7E0DEA0040107D342c87455fFF5 ECDSA Factory: 0xAf299A1f51560F51A1F3ADC0a5991Ac74b61b0BE ``` -------------------------------- ### ZeroDev Kernel Contract Addresses v3.2 Source: https://github.com/zerodevapp/kernel/blob/dev/README.md Lists the deployed smart contract addresses for ZeroDev Kernel components specific to version 3.2, including Meta Factory, Factory, and Kernel contracts. ```APIDOC | Name | Address | | -------------------- | ------------------------------------------ | | Meta Factory | [0xd703aaE79538628d27099B8c4f621bE4CCd142d5](https://contractscan.xyz/contract/0xd703aae79538628d27099b8c4f621be4ccd142d5) | | Factory | [0x7a1dBAB750f12a90EB1B60D2Ae3aD17D4D81EfFe](https://contractscan.xyz/contract/0x7a1dBAB750f12a90EB1B60D2Ae3aD17D4D81EfFe) | | Kernel | [0xD830D15D3dc0C269F3dBAa0F3e8626d33CFdaBe1](https://contractscan.xyz/contract/0xD830D15D3dc0C269F3dBAa0F3e8626d33CFdaBe1) | ``` -------------------------------- ### ZeroDev Kernel Contract Addresses v3.3 Source: https://github.com/zerodevapp/kernel/blob/dev/README.md Lists the deployed smart contract addresses for ZeroDev Kernel components specific to version 3.3, including Meta Factory, Factory, and Kernel contracts. ```APIDOC | Name | Address | | -------------------- | ------------------------------------------ | | Meta Factory | [0xd703aaE79538628d27099B8c4f621bE4CCd142d5](https://contractscan.xyz/contract/0xd703aae79538628d27099b8c4f621be4ccd142d5) | | Factory | [0x2577507b78c2008Ff367261CB6285d44ba5eF2E9](https://contractscan.xyz/contract/0x2577507b78c2008Ff367261CB6285d44ba5eF2E9) | | Kernel | [0xd6CEDDe84be40893d153Be9d467CD6aD37875b28](https://contractscan.xyz/contract/0xd6CEDDe84be40893d153Be9d467CD6aD37875b28) | ``` -------------------------------- ### ZeroDev Kernel Contract Addresses - Latest Source: https://github.com/zerodevapp/kernel/blob/dev/README.md Lists the contract names and their corresponding addresses for the latest implicitly defined version of the ZeroDev Kernel components. ```APIDOC KernelFactory: 0x5de4839a76cf55d0c90e2061ef4386d962E15ae3 KernelLite: 0xbEdb61Be086F3f15eE911Cc9AB3EEa945DEbFa96 SessionKeyValidator: 0x5C06CE2b673fD5E6e56076e40DD46aB67f5a72A5 ECDSA Validator: 0xd9AB5096a832b9ce79914329DAEE236f8Eea0390 ``` -------------------------------- ### ZeroDev Kernel Contract Addresses v2.2 Source: https://github.com/zerodevapp/kernel/blob/dev/README.md Lists the deployed smart contract addresses for ZeroDev Kernel components specific to version 2.2, including the Kernel contract. ```APIDOC | Name | Address | | -------------------- | ------------------------------------------ | | Kernel | [0x0DA6a956B9488eD4dd761E59f52FDc6c8068E6B5](https://contractscan.xyz/contract/0x0da6a956b9488ed4dd761e59f52fdc6c8068e6b5) | ``` -------------------------------- ### ZeroDev Kernel Contract Addresses v3.0 Source: https://github.com/zerodevapp/kernel/blob/dev/README.md Lists the deployed smart contract addresses for ZeroDev Kernel components specific to version 3.0, including Meta Factory, Factory, Kernel, and ECDSA Validator contracts. ```APIDOC | Name | Address | | -------------------- | ------------------------------------------ | | Meta Factory | [0xd703aaE79538628d27099B8c4f621bE4CCd142d5](https://contractscan.xyz/contract/0xd703aae79538628d27099b8c4f621be4ccd142d5) | | Factory | [0x6723b44Abeec4E71eBE3232BD5B455805baDD22f](https://contractscan.xyz/contract/0x6723b44abeec4e71ebe3232bd5b455805badd22f) | | Kernel | [0x94F097E1ebEB4ecA3AAE54cabb08905B239A7D27](https://contractscan.xyz/contract/0x94f097e1ebeb4eca3aae54cabb08905b239a7d27) | | ECDSA Validator | [0x8104e3Ad430EA6d354d013A6789fDFc71E671c43](https://contractscan.xyz/contract/0x8104e3ad430ea6d354d013a6789fdfc71e671c43) | ``` -------------------------------- ### ZeroDev Kernel Contract Addresses v3.1 Source: https://github.com/zerodevapp/kernel/blob/dev/README.md Lists the deployed smart contract addresses for ZeroDev Kernel components specific to version 3.1, including Meta Factory, Factory, Kernel, and ECDSA Validator contracts. ```APIDOC | Name | Address | | -------------------- | ------------------------------------------ | | Meta Factory | [0xd703aaE79538628d27099B8c4f621bE4CCd142d5](https://contractscan.xyz/contract/0xd703aae79538628d27099b8c4f621be4ccd142d5) | | Factory | [0xaac5D4240AF87249B3f71BC8E4A2cae074A3E419](https://contractscan.xyz/contract/0xaac5d4240af87249b3f71bc8e4a2cae074a3e419) | | Kernel | [0xBAC849bB641841b44E965fB01A4Bf5F074f84b4D](https://contractscan.xyz/contract/0xbac849bb641841b44e965fb01a4bf5f074f84b4d) | | ECDSA Validator | [0x845ADb2C711129d4f3966735eD98a9F09fC4cE57](https://contractscan.xyz/contract/0x845adb2c711129d4f3966735ed98a9f09fc4ce57) | ``` -------------------------------- ### ZeroDev Kernel Contract Addresses v2.3 Source: https://github.com/zerodevapp/kernel/blob/dev/README.md Lists the deployed smart contract addresses for ZeroDev Kernel components specific to version 2.3, including Kernel, KernelFactory, KernelLite, SessionKeyValidator, and ECDSA Validator contracts. ```APIDOC | Name | Address | | -------------------- | ------------------------------------------ | | Kernel | [0xD3F582F6B4814E989Ee8E96bc3175320B5A540ab](https://contractscan.xyz/contract/0xd3f582f6b4814e989ee8e96bc3175320b5a540ab) | | KernelFactory | [0x5de4839a76cf55d0c90e2061ef4386d962E15ae3](https://contractscan.xyz/contract/0x5de4839a76cf55d0c90e2061ef4386d962e15ae3) | | KernelLite | [0x482EC42E88a781485E1B6A4f07a0C5479d183291](https://contractscan.xyz/contract/0x482ec42e88a781485e1b6a4f07a0c5479d183291) | | SessionKeyValidator | [0x5C06CE2b673fD5E6e56076e40DD46aB67f5a72A5](https://contractscan.xyz/contract/0x5c06ce2b673fd5e6e56076e40dd46ab67f5a72a5) | | ECDSA Validator | [0xd9AB5096a832b9ce79914329DAEE236f8Eea0390](https://contractscan.xyz/contract/0xd9ab5096a832b9ce79914329daee236f8eea0390) | ``` -------------------------------- ### ZeroDev Kernel Contract Addresses v2.4 Source: https://github.com/zerodevapp/kernel/blob/dev/README.md Lists the deployed smart contract addresses for ZeroDev Kernel components specific to version 2.4, including Kernel, KernelFactory, SessionKeyValidator, and ECDSA Validator contracts. ```APIDOC | Name | Address | | -------------------- | ------------------------------------------ | | Kernel | [0xd3082872F8B06073A021b4602e022d5A070d7cfC](https://contractscan.xyz/contract/0xd3082872f8b06073a021b4602e022d5a070d7cfc) | | KernelFactory | [0x5de4839a76cf55d0c90e2061ef4386d962E15ae3](https://contractscan.xyz/contract/0x5de4839a76cf55d0c90e2061ef4386d962e15ae3) | | SessionKeyValidator | [0x5C06CE2b673fD5E6e56076e40DD46aB67f5a72A5](https://contractscan.xyz/contract/0x5c06ce2b673fd5e6e56076e40dd46ab67f5a72a5) | | ECDSA Validator | [0xd9AB5096a832b9ce79914329DAEE236f8Eea0390](https://contractscan.xyz/contract/0xd9ab5096a832b9ce79914329daee236f8eea0390) | ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.