You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new networkAddresses Record within the SingletonDeploymentV2 type contains either a string or string[].
This makes handling it sub-optimal as both cases either need to be handled in separate branches or a helper function that converts string | string[] into string[] is required.
The text was updated successfully, but these errors were encountered:
schmanu
changed the title
[Improvement]Return an array of addresses within SingletonDeploymentV2
[Improvement] Return an array of addresses within SingletonDeploymentV2Sep 25, 2024
What is this request about?
The new
networkAddresses
Record within theSingletonDeploymentV2
type contains either astring
orstring[]
.This makes handling it sub-optimal as both cases either need to be handled in separate branches or a helper function that converts
string | string[]
intostring[]
is required.The proposition is to change the type to:
Example usage
There are already some usage examples out there which currently all wrote such functions / have not nicely readable code to check deployments.
Helper functions:
https://github.com/safe-global/safe-wallet-web/blob/epic/multichain-safes/src/services/contracts/deployments.ts#L18
https://github.com/safe-global/safe-client-gateway/blob/multiple-official-deployments/src/domain/common/utils/deployments.ts#L89
Case handling:
https://github.com/safe-global/safe-core-sdk/blob/feat/predict-safe-address-custom-contracts/packages/protocol-kit/src/contracts/config.ts#L171
The text was updated successfully, but these errors were encountered: