I was looking at the Gnosis Safe proxy factory code (https://github.com/safe-global/safe-deployments/blob/main/src/assets/v1.3.0/proxy_factory.json) and I noticed that different chains have different network addresses. This is preventing me from creating a safe with the same address on a different chain (target chain ID 25). I'm curious about why this is the case and if there's any possible way to hack around it. Can you provide any insight on this issue?
2 Answers
you need to take the exact parameters from the transaction of the first deplo. open the same address (if there is one) of the safe factory in another network and in the method deploy with nonce send those parameters, using the same address that was used in the first network to sign the transaction.
( - this works on the current factory - on some previous factories also works (but why should they be used? I don't know) - on the next version, very likely, based on discussions and plans, there will be a change which will forcibly make this procedure impossible (because it is planned to add chain id to the string which will create the vault address).
So after the new release for this kind of deplo, I guess we will have to use the previous version of the factory, and then immediately update the safe to the current version - this does not work on all networks, but a lot of networks - there are networks (like fantom) which can not be opened in their main interface at app.safe.global, but there is a factory with the latest version, and it is on the same address as on the other networks.
For fantom you can use in this case their local self-made interface. it is on the safe subdomain. on the fantom site. for those networks which have no public interface, but have a factory contract, you can, for example, use a tool like defender openzeppelin admin.
This does not make this experience perfect, but it is a good and useful solution to the problem of "organizing the administration of safe in a network which is not supported in main interfaces" in this situation. (still, of course, you can run the interface locally and add any network you like... but, we are well aware that this is unlikely to be something anyone would want to do without some very well-reasoned reason. but, like this, yes, it is also possible).
The thing is each instance of a Safe created through the factory contract is assigned a unique eth address. A Safe created on the Ethereum mainnet will have a different address than the one created on Goerli even if you had created them using the same params. This is the result of the separate and distinct nature of each blockchain network. So unfortunately, i don't think there's a way to do what you want to do here. I'll shed further light. The address of a Safe is derived from the combination of the smart contract bytecode and the tx that deploys it to the blockchain, since the bytecode is the same for all Safe instance the address is unique to the chain it was deployed.