{"id":27259579,"url":"https://github.com/coolcode/aa-contracts","last_synced_at":"2025-04-11T04:06:18.180Z","repository":{"id":213813170,"uuid":"733815356","full_name":"coolcode/aa-contracts","owner":"coolcode","description":"A simple ERC-4337 compatible smart contract account with a designated owner account.","archived":false,"fork":false,"pushed_at":"2023-12-23T09:29:13.000Z","size":503,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-11T04:06:15.285Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coolcode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-12-20T07:31:33.000Z","updated_at":"2024-09-02T10:35:56.000Z","dependencies_parsed_at":"2023-12-23T10:54:35.642Z","dependency_job_id":null,"html_url":"https://github.com/coolcode/aa-contracts","commit_stats":null,"previous_names":["coolcode/aa-contracts"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolcode%2Faa-contracts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolcode%2Faa-contracts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolcode%2Faa-contracts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolcode%2Faa-contracts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coolcode","download_url":"https://codeload.github.com/coolcode/aa-contracts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248339279,"owners_count":21087215,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-11T04:06:17.496Z","updated_at":"2025-04-11T04:06:18.163Z","avatar_url":"https://github.com/coolcode.png","language":"Solidity","readme":"# Light Account\n\nA simple ERC-4337 compatible smart contract account with a designated owner account. [Account Kit](https://accountkit.alchemy.com/overview/introduction.html) is the easiest way to integrate Light Account.\n\n## Features\n\nLike [eth-infinitism](https://github.com/eth-infinitism/account-abstraction)'s [`SimpleAccount`](https://github.com/eth-infinitism/account-abstraction/blob/develop/contracts/samples/SimpleAccount.sol), but with the following changes:\n\n1. Instead of the default storage slots, uses namespaced storage to avoid clashes when switching implementations.\n\n2. Ownership can be transferred via `transferOwnership`, similar to the behavior of an `Ownable` contract. This is a simple single-step operation, so care must be taken to ensure that the ownership is being transferred to the correct address.\n\n3. Supports [ERC-1271](https://eips.ethereum.org/EIPS/eip-1271) signature validation for both validating the signature on user operations and in exposing its own `isValidSignature` method. This only works when the owner of `LightAccount` also support ERC-1271.\n\n   _ERC-4337's bundler validation rules limit the types of contracts that can be used as owners to validate user operation signatures. For example, the contract's `isValidSignature` function may not use any forbidden opcodes such as `TIMESTAMP` or `NUMBER`, and the contract may not be an ERC-1967 proxy as it accesses a constant implementation slot not associated with the account, violating storage access rules. This also means that the owner of a `LightAccount` may not be another `LightAccount` if you want to send user operations through a bundler._\n\n4. Event `SimpleAccountInitialized` renamed to `LightAccountInitialized`.\n\n5. Uses custom errors.\n\n## Deployments\n\nSee the current deployments in [Deployments.md](./Deployments.md).\n\n## Build\n\n```bash\nforge build\n```\n\n## Test\n\n```bash\nforge test -vvv\n```\n\n## Deploy\n\nThe deploy script supports any [wallet options](https://book.getfoundry.sh/reference/forge/forge-script#wallet-options---raw) provided by Foundry, including local private keys, mneumonics, hardware wallets, and remote signers. Append the chosen signing method's option to the field marked `[WALLET_OPTION]` in the following script command, and set the sender address in the field `[SENDER_ADDRESS]`.\n\n```bash\nforge script script/Deploy_LightAccountFactory.s.sol:Deploy_LightAccountFactory [WALLET_OPTION] --sender [SENDER_ADDRESS]--rpc-url [RPC_URL] -vvvv --broadcast --verify\n```\n\nMake sure the provided `RPC_URL` is set to an RPC for the chain you wish to deploy on.\n\n## Generate Inspections\n\n```bash\nbash utils/inspect.sh\n```\n\n## Static Analysis\n\n```bash\nslither .\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoolcode%2Faa-contracts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoolcode%2Faa-contracts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoolcode%2Faa-contracts/lists"}