{"id":15769373,"url":"https://github.com/dodger213/safe-smart-contract","last_synced_at":"2025-03-30T21:32:04.041Z","repository":{"id":253622711,"uuid":"844038582","full_name":"dodger213/safe-smart-contract","owner":"dodger213","description":"The Safe Smart Contract is a key component of the Safe ecosystem, providing a platform for users to manage their digital assets and interact with decentralized applications (dApps) in a secure and user-friendly manner.","archived":false,"fork":false,"pushed_at":"2024-08-18T08:50:04.000Z","size":8402,"stargazers_count":13,"open_issues_count":11,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-11T14:07:47.725Z","etag":null,"topics":["ethersjs","hardhat","solidity","typescript"],"latest_commit_sha":null,"homepage":"","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/dodger213.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-18T07:26:25.000Z","updated_at":"2024-09-11T14:28:24.000Z","dependencies_parsed_at":"2024-08-18T09:30:01.148Z","dependency_job_id":"cf4edd12-2df0-4d3b-88fe-0bf30d64521f","html_url":"https://github.com/dodger213/safe-smart-contract","commit_stats":null,"previous_names":["dodger213/safe-smart-contract"],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dodger213%2Fsafe-smart-contract","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dodger213%2Fsafe-smart-contract/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dodger213%2Fsafe-smart-contract/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dodger213%2Fsafe-smart-contract/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dodger213","download_url":"https://codeload.github.com/dodger213/safe-smart-contract/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246156419,"owners_count":20732397,"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":["ethersjs","hardhat","solidity","typescript"],"created_at":"2024-10-04T14:02:11.958Z","updated_at":"2025-03-30T21:31:59.030Z","avatar_url":"https://github.com/dodger213.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"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-build.0](https://github.com/safe-global/safe-smart-account/tree/v1.4.1-build.0) on the commit [192c7dc](https://github.com/safe-global/safe-smart-account/commit/192c7dc67290940fcbc75165522bb86a37187069)\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\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)\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 Etherescan\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%2Fdodger213%2Fsafe-smart-contract","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdodger213%2Fsafe-smart-contract","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdodger213%2Fsafe-smart-contract/lists"}