safe-core-sdk
safe-core-sdk copied to clipboard
Support v1.5.0
Context / issue
With the recent release of Safe v1.5.0, when will this package support for the v1.5.0 Safe contract?
// create
const protocolKit = await Safe.init({
provider,
signer,
safeAddress,
contractNetworks: {
[chainId]: {
safeSingletonAddress: SINGLETON_ADDRESS,
safeProxyFactoryAddress: PROXY_FACTORY_ADDRESS,
multiSendAddress: MULTISEND_ADDRESS,
fallbackHandlerAddress: zeroAddress,
...
},
},
});
// protocol-kit/src/managers/contractManager.ts
if (isSafeConfigWithPredictedSafe(config)) {
safeVersion = predictedSafe?.safeDeploymentConfig?.safeVersion ?? DEFAULT_SAFE_VERSION
} else {
try {
// return 1.5.0
safeVersion = await getSafeContractVersion(safeProvider, safeAddress as string)
} catch (e) {
safeVersion = DEFAULT_SAFE_VERSION
}
// getSafeContractInstance doesn't support 1.5.0 yet which causes "Invalid Safe version"
this.#safeContract = await getSafeContract({
safeProvider,
safeVersion,
isL1SafeSingleton,
customSafeAddress: safeAddress,
customContracts
})
}
Proposed solution
Support 1.5.0 for these contracts
Alternatives
no
Additional context
no