import { Callout, Steps, Tabs, Tab } from 'nextra/components'
In this section, you will deploy the Safe{Core} contracts on your chain. All Safe contract deployments on any network follow the same procedure to ensure a deterministic address for all singleton contracts (proxy-factory, mastercopy, etc.) and verify the deployment.
Open a pull request to add your chain to chainlist.org.
You do not need to perform these tasks if your network is based on a rollup framework with Safe contracts already deployed (for example, OP Stack).- Create a new issue in the safe-singleton-factory repository.
- A bot will reply to the issue with the deployer address (
0x914...3d7
) and the amount of native token you need to send to this address. - Once funded, mark the checkbox on the GitHub issue.
- The review of the issues happens every two weeks. Our team will perform the deterministic deployment of the
safe-singleton-factory
contract and publish a new npm release of @safe-global/safe-singleton-factory.
-
Clone the safe-smart-account repository by running the following command:
git clone --branch v1.3.0-libs.0 https://github.com/safe-global/safe-smart-account.git cd safe-smart-account
-
Get the latest version of @safe-global/safe-singleton-factory, by running the following command:
npm i --save-dev @safe-global/safe-singleton-factory
Ensure the latest version includes your safe-singleton-factory deployment from before.
-
Deploy Contracts.
{/* */} <Tabs items={["Infura supports your chain", "Infura does not support your chain"]}> <Tabs.Tab> Create a
.env
file in the root of the repository with the following content:bash MNEMONIC=funded_account_on_this_network INFURA_KEY=your_Infura_project_API_key
{/* */}If you deploy to a ZKsync chain, add the following line to the `.env` file: ```bash HARDHAT_ENABLE_ZKSYNC=1 ``` Deploy the contracts by running this command: ```bash npm run deploy-all your_chain_id ``` </Tabs.Tab> <Tabs.Tab> Create a `.env` file in the root of the repository with the following content: ```bash MNEMONIC=funded_account_on_this_network NODE_URL=RPC_endpoint_for_your_network ``` If you deploy to a ZKsync chain, add the following line to the `.env` file: ```bash HARDHAT_ENABLE_ZKSYNC=1 ``` Deploy the contracts by running this command: ```bash npm run deploy-all custom ``` </Tabs.Tab>
-
The script should deploy all the singleton contracts (nine contracts in total). Write down each address (example addresses for v1.3.0 could look like):
compatibility_fallback_handler: `0x017062a1dE2FE6b99BE3d9d37841FeD19F573804` create_call: `0xB19D6FFc2182150F8Eb585b79D4ABcd7C5640A9d` gnosis_safe: `0x69f4D1788e39c87893C980c06EdF4b7f686e2938` gnosis_safe_l2: `0xfb1bffC9d739B8D520DaF37dF666da4C687191EA` multi_send: `0x998739BFdAAdde7C933B942a68053933098f9EDa` multi_send_call_only: `0xA1dabEF33b3B82c7814B6D82A79e50F4AC44102B` proxy_factory: `0xC22834581EbC8527d974F8a1c97E1bEA4EF910BC` sign_message_lib: `0x98FFBBF51bb33A056B08ddf711f289936AafF717` simulate_tx_accessor: `0x727a77a074D1E6c4530e814F89E618a3298FC044`
You must share your singleton contract deployment addresses in the official public registry.
-
Fork the safe-deployments GitHub repository.
-
Add your chain ID to each of the nine JSON files in
src/assets/<version>
. If you deployed with the singleton deployment from above, you have to mark your chain's deployment as "canonical". For example, add this line tognosis_safe.json
to indicate the gnosis safe has the canonical address on your chain:"<your_chain_id>": "canonical"
-
Open a pull request. Your pull request should follow this example pull request.
Now, you have deployed the Safe{Core} contracts on your chain.
In the next step, you have to install the Safe{Core} Infrastructure.