safe-core-sdk
safe-core-sdk copied to clipboard
SafeFactory for custom chainId throws the error: SafeProxy was not deployed correctly.
Description
When you try to use SafeFactory with contractNetworks property for the custom chainId, safeFactory.deploySafe
fails with an error: SafeProxy was not deployed correctly. If you check on-chain, Safe does get deployed correctly via SafeFactory.
This error is because, after the safe is created, protocol-kit listens to an event ProxyCreation
. For osome reason, on custom networks, SDK cannot catch this event. But of you attach an independent event listener via ethers, then you can see the event being emmited correctly.
Environment
- Safe Core SDK version:
2.0.0
- Safe contract version:
default
- Environment: Non Browser
Steps to reproduce
Here is the code I am using:
Here is the error:
Expected result
Expected result is Safe creation should work normally as it works on other public networks.