safe-global / safe-core-sdk

The Safe{Core} SDK allows builders to add account abstraction functionality into their apps.
https://docs.safe.global/sdk/overview
MIT License
243 stars 179 forks source link

api-kit lacks support for zksync and zkevm #729

Closed clemsos closed 3 months ago

clemsos commented 3 months ago

Description

When trying to send a tx to a safe on either Zksync or Polygon Zkevm, the lib states that the txServiceUrl is missing - even though one can find it on safe.global UI

zkevm

TypeError: There is no transaction service available for chainId 1101. Please set the txServiceUrl property to use a custom transaction service.
    at new SafeApiKit (/Users/clement/Dev/unlock/unlock/node_modules/@safe-global/api-kit/src/SafeApiKit.ts:57:15)

zksync

TypeError: There is no transaction service available for chainId 324. Please set the txServiceUrl property to use a custom transaction service.
    at new SafeApiKit (/Users/clement/Dev/unlock/unlock/node_modules/@safe-global/api-kit/src/SafeApiKit.ts:53:15)

Environment

Steps to reproduce

The script used is here https://github.com/unlock-protocol/unlock/blob/9ac6a3ed44527cb4638bf15a5da7548e7c255495/governance/scripts/multisig/addOwner.js

Note that the scripts works for ohter networks (such as arbitrum, avalanche, base, bsc, celo, gnosis, mainnet, optimism, polygon)

Expected result

tx should be submitted like for other supported networks

dasanra commented 3 months ago

@clemsos Thank you for the ticket. True, those two chains are not added in the default configuration. We will add them. Meanwhile you can use the txServiceUrl parameter to set the corresponding link to the service for those two cases.

clemsos commented 3 months ago

great, thank you !