{"id":13589981,"url":"https://github.com/safe-global/safe-smart-account","last_synced_at":"2025-05-14T00:06:53.163Z","repository":{"id":37392613,"uuid":"102186072","full_name":"safe-global/safe-smart-account","owner":"safe-global","description":"Safe allows secure management of blockchain assets. ","archived":false,"fork":false,"pushed_at":"2025-04-30T07:50:08.000Z","size":10103,"stargazers_count":1996,"open_issues_count":17,"forks_count":1027,"subscribers_count":50,"default_branch":"main","last_synced_at":"2025-05-07T11:11:24.289Z","etag":null,"topics":["ethereum","solidity","wallet"],"latest_commit_sha":null,"homepage":"https://safe.global","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/safe-global.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-09-02T09:23:38.000Z","updated_at":"2025-05-05T10:53:13.000Z","dependencies_parsed_at":"2023-10-25T11:52:43.886Z","dependency_job_id":"f0e5097c-5246-48a5-9d14-b5ea6dde984b","html_url":"https://github.com/safe-global/safe-smart-account","commit_stats":{"total_commits":783,"total_committers":45,"mean_commits":17.4,"dds":0.7879948914431674,"last_synced_commit":"1cec0e7a6e740c72bbe566ee4f497c9ddc71a6ae"},"previous_names":["gnosis/gnosis-safe","gnosis/safe-contracts","safe-global/safe-contracts"],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safe-global%2Fsafe-smart-account","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safe-global%2Fsafe-smart-account/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safe-global%2Fsafe-smart-account/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safe-global%2Fsafe-smart-account/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/safe-global","download_url":"https://codeload.github.com/safe-global/safe-smart-account/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254043602,"owners_count":22004978,"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":["ethereum","solidity","wallet"],"created_at":"2024-08-01T16:00:37.200Z","updated_at":"2025-05-14T00:06:53.146Z","avatar_url":"https://github.com/safe-global.png","language":"TypeScript","funding_links":[],"categories":["Accounts","TypeScript","Agent Identity and Wallets"],"sub_categories":["Benchmark Reality Check (real-world tool use)"],"readme":"Safe Smart Account\n==============\n\n[![npm version](https://badge.fury.io/js/%40safe-global%2Fsafe-smart-account.svg)](https://badge.fury.io/js/%40safe-global%2Fsafe-smart-account)\n[![Build Status](https://github.com/safe-global/safe-smart-account/workflows/safe-smart-account/badge.svg?branch=main)](https://github.com/safe-global/safe-smart-account/actions)\n[![Coverage Status](https://coveralls.io/repos/github/safe-global/safe-smart-account/badge.svg?branch=main)](https://coveralls.io/github/safe-global/safe-smart-account)\n\n\u003e :warning: **This branch contains changes that are under development** To use the latest audited version make sure to use the correct commit. The tagged versions that are used by the Safe team can be found in the [releases](https://github.com/safe-global/safe-smart-account/releases).\n\nUsage\n-----\n### Install requirements with npm:\n\n```bash\nnpm i\n```\n\n### Testing\n\nTo run the tests:\n\n```bash\nnpm run build\nnpm run test\n```\n\nOptionally, if you want to run the ERC-4337 compatibility test, it uses a live bundler and node, so it contains some pre-requisites:\n\n1. Define the environment variables:\n\n```\nERC4337_TEST_BUNDLER_URL=\nERC4337_TEST_NODE_URL=\nERC4337_TEST_SINGLETON_ADDRESS=\nERC4337_TEST_SAFE_FACTORY_ADDRESS=\nMNEMONIC=\n```\n\n2. Pre-fund the executor account derived from the mnemonic with some Native Token to cover the deployment of an ERC4337 module and the pre-fund of the Safe for the test operation.\n\n### Deployments\n\nA collection of the different Safe contract deployments and their addresses can be found in the [Safe deployments](https://github.com/safe-global/safe-deployments) repository.\n\nTo add support for a new network follow the steps of the ``Deploy`` section and create a PR in the [Safe deployments](https://github.com/safe-global/safe-deployments) repository. \n\n### Deploy\n\n\u003e :warning: **Make sure to use the correct commit when deploying the contracts.** Any change (even comments) within the contract files will result in different addresses. The tagged versions that are used by the Safe team can be found in the [releases](https://github.com/safe-global/safe-smart-account/releases).\n\n\u003e **Current version:** The latest release is [v1.4.1-3](https://github.com/safe-global/safe-smart-account/tree/v1.4.1-3) on the commit [21dc824](https://github.com/safe-global/safe-smart-account/commit/21dc82410445637820f600c7399a804ad55841d5)\n\nThis will deploy the contracts deterministically and verify the contracts on etherscan using [Solidity 0.7.6](https://github.com/ethereum/solidity/releases/tag/v0.7.6) by default.\n\nPreparation:\n- Set `MNEMONIC` in `.env`\n- Set `INFURA_KEY` in `.env`\n- For zkSync, set `ZKSYNC_DEPLOYER_PK` in `.env`\n\n```bash\nnpm run deploy-all \u003cnetwork\u003e\n```\n\nThis will perform the following steps\n\n```bash\nnpm run build\nnpx hardhat --network \u003cnetwork\u003e deploy\nnpx hardhat --network \u003cnetwork\u003e sourcify\nnpx hardhat --network \u003cnetwork\u003e etherscan-verify\nnpx hardhat --network \u003cnetwork\u003e local-verify\n```\n\n#### Custom Networks\n\nIt is possible to use the `NODE_URL` env var to connect to any EVM based network via an RPC endpoint. This connection then can be used with the `custom` network.\n\nE.g. to deploy the Safe contract suite on that network you would run `npm run deploy-all custom`. \n\nThe resulting addresses should be on all networks the same.\n\nNote: Address will vary if contract code is changed or a different Solidity version is used.\n\n#### Replay protection ([EIP-155](https://eips.ethereum.org/EIPS/eip-155))\n\nSome networks require replay protection, making it incompatible with the default deployment process as it relies on a presigned transaction without replay protection (see https://github.com/Arachnid/deterministic-deployment-proxy). \n\nSafe Smart Account contracts use a different deterministic deployment proxy (https://github.com/safe-global/safe-singleton-factory). To make sure that the latest version of this package is installed, run `npm i --save-dev @safe-global/safe-singleton-factory` before deployment. For more information, including deploying the factory to a new network, please refer to the factory repo.  \n\nNote: This will result in different addresses compared to hardhat's default deterministic deployment process.\n\n### Verify contract\n\nThis command will use the deployment artifacts to compile the contracts and compare them to the onchain code\n```bash\nnpx hardhat --network \u003cnetwork\u003e local-verify\n```\n\nThis command will upload the contract source to Etherscan\n```bash\nnpx hardhat --network \u003cnetwork\u003e etherscan-verify\n```\n\nDocumentation\n-------------\n- [Safe developer portal](http://docs.safe.global)\n- [Error codes](docs/error_codes.md)\n- [Coding guidelines](docs/guidelines.md)\n\nAudits/ Formal Verification\n---------\n- [for Version 1.4.0/1.4.1 by Ackee Blockchain](docs/audit_1_4_0.md)\n- [for Version 1.3.0 by G0 Group](docs/audit_1_3_0.md)\n- [for Version 1.2.0 by G0 Group](docs/audit_1_2_0.md)\n- [for Version 1.1.1 by G0 Group](docs/audit_1_1_1.md)\n- [for Version 1.0.0 by Runtime Verification](docs/rv_1_0_0.md)\n- [for Version 0.0.1 by Alexey Akhunov](docs/alexey_audit.md)\n\nSecurity and Liability\n----------------------\nAll contracts are WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\nLicense\n-------\nAll smart contracts are released under LGPL-3.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsafe-global%2Fsafe-smart-account","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsafe-global%2Fsafe-smart-account","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsafe-global%2Fsafe-smart-account/lists"}