I am following Safe Core SDK docs and wants to create a safe proxy contract on the Mumbai testnet, getting the following error Error: Invalid Safe Proxy Factory contract address
when I switch to Mumbai/Ropsten testnet in the Metamask after instantiating SafeFactory class. This error does not occur when I switch to Rinkeby testnet(Ethereum) or some other ethereum testnet. Can some please tell me how to deploy a safe on Mumbai testnet using safe core SDK?
I am using Safe Core SDK v1.1.1 and web3 v1.6.1 for instantiating the ethAdapter.
Best Answer
The Safe Core SDK takes all the safe contracts and network configuration from safe-deployments. Specifically on this case, from here, meaning that if the Mumbai chainId (80001) is not present below the
networkAddresses
key, the Safe contracts are not deployed in that network.When that happens, you need to deploy the contracts manually. Once deployed, the Safe Core SDK offers the possibility to use Safe contract instances from networks that are not supported in
safe-deployments
. This can be done this way:Where
MULTI_SEND_ADDRESS
,MASTER_COPY_ADDRESS
andPROXY_FACTORY_ADDRESS
are the addreses of your recently deployed Safe contracts in Mumbai network.Now you can create a new Safe with your
safeFactory
instance:When instantiating the Safe Core SDK to be used with an unsopported network, you will always need to use this same
contractNetworks
parameter the same way:Find here the latest documentation regarding the SafeFactory and Safe Core SDK API references with all the optional params