safe-core-sdk icon indicating copy to clipboard operation
safe-core-sdk copied to clipboard

SafeFactory for custom chainId throws the error: SafeProxy was not deployed correctly.

Open ashwinYardi opened this issue 6 months ago • 0 comments

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: image

Here is the error: image

Expected result

Expected result is Safe creation should work normally as it works on other public networks.

ashwinYardi avatar Jan 03 '24 06:01 ashwinYardi