{"id":13767342,"url":"https://github.com/kopy-kat/MinimalAccount","last_synced_at":"2025-05-10T22:31:44.964Z","repository":{"id":193870519,"uuid":"688657836","full_name":"kopy-kat/MinimalAccount","owner":"kopy-kat","description":"The most gas optimized ERC-4337 account - written in Huff","archived":false,"fork":false,"pushed_at":"2023-09-21T19:48:49.000Z","size":78,"stargazers_count":42,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-17T02:34:35.968Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kopy-kat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-09-07T20:23:45.000Z","updated_at":"2024-08-24T12:38:51.000Z","dependencies_parsed_at":"2024-01-11T23:49:11.401Z","dependency_job_id":"1ca97160-2f53-482f-ae5b-219d67cb5a4c","html_url":"https://github.com/kopy-kat/MinimalAccount","commit_stats":null,"previous_names":["kopy-kat/minimalaccount"],"tags_count":0,"template":false,"template_full_name":"huff-language/huff-project-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kopy-kat%2FMinimalAccount","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kopy-kat%2FMinimalAccount/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kopy-kat%2FMinimalAccount/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kopy-kat%2FMinimalAccount/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kopy-kat","download_url":"https://codeload.github.com/kopy-kat/MinimalAccount/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253492529,"owners_count":21916959,"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":"2024-08-03T16:01:07.690Z","updated_at":"2025-05-10T22:31:42.982Z","avatar_url":"https://github.com/kopy-kat.png","language":"Solidity","funding_links":[],"categories":["Huff projects you can learn from and contribute to"],"sub_categories":[],"readme":"\u003cimg align=\"right\" width=\"150\" height=\"150\" top=\"100\" src=\"./assets/blueprint.png\"\u003e\n\n# MinimalAccount\n\nThe most gas optimized ERC-4337 account - written in Huff\n\n\u003e **Note**\n\u003e\n\u003e These contracts are **unaudited** and are not recommended for use in production.\n\u003e\n\u003e The main usage of these contracts is to benchmark other ERC-4337 accounts against the lowest possible gas cost for an account.\n\n## Gas calculations (as of Sep 21, 2023)\n\n|                  | Creation | Native transfer | ERC20 transfer | Total  |\n| ---------------- | -------- | --------------- | -------------- | ------ |\n| MinimalAccount   | 222902   | 93254           | 81883          | 398039 |\n| SimpleAccount    | 410061   | 97690           | 86754          | 594505 |\n| Biconomy         | 296892   | 100780          | 89577          | 487249 |\n| Etherspot        | 305769   | 100091          | 89172          | 495032 |\n| Kernel v2.0      | 366662   | 106800          | 95877          | 569339 |\n| Kernel v2.1      | 291413   | 103240          | 92289          | 486942 |\n| Kernel v2.1-lite | 256965   | 97331           | 86121          | 440417 |\n\nGas difference between MinimalAccount and cheapest account in each category:\n\n|               | Creation | Native transfer | ERC20 transfer | Total |\n| ------------- | -------- | --------------- | -------------- | ----- |\n| MA cheaper by | 34063    | 4077            | 4238           | 42378 |\n\nCalculations are based on ZeroDev's [AA Benchmark](https://github.com/zerodevapp/aa-benchmark)\n\n## Using this repo\n\n1. Clone this repo\n\n```\ngit clone https://github.com/kopy-kat/MinimalAccount.git\ncd MinimalAccount\n```\n\n2. Install dependencies\n\nOnce you've cloned and entered into your repository, you need to install the necessary dependencies. In order to do so, simply run:\n\n```shell\nforge install\n```\n\n3. Build \u0026 Test\n\nTo build and test your contracts, you can run:\n\n```shell\nforge build\nforge test\n```\n\nFor more information on how to use Foundry, check out the [Foundry Github Repository](https://github.com/foundry-rs/foundry/tree/master/forge) and the [foundry-huff library repository](https://github.com/huff-language/foundry-huff).\n\n## Todo\n\n- [x] Dynamically splice owner account into bytecode\n- [x] Remove unnecessary jumps\n- [x] Upgrade to Solidity 0.8.20 and replace push1 0x00 with push0\n- [ ] Implement executeBatch\n\n## License\n\n[The Unlicense](https://github.com/huff-language/huff-project-template/blob/master/LICENSE)\n\n## Acknowledgements\n\n- [ERC4337's SimpleAccount](https://github.com/eth-infinitism/account-abstraction/blob/develop/contracts/samples/SimpleAccount.sol)\n- [Huffmate](https://github.com/huff-language/huffmate)\n- [Huff](https://huff.sh)\n\n## Disclaimer\n\n_These smart contracts are being provided as is. No guarantee, representation or warranty is being made, express or implied, as to the safety or correctness of the user interface or the smart contracts. They have not been audited and as such there can be no assurance they will work as intended, and users may experience delays, failures, errors, omissions, loss of transmitted information or loss of funds. The creators are not liable for any of the foregoing. Users should proceed with caution and use at their own risk._\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkopy-kat%2FMinimalAccount","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkopy-kat%2FMinimalAccount","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkopy-kat%2FMinimalAccount/lists"}