safe-core-sdk
safe-core-sdk copied to clipboard
Allow EIP-3770 chain-specific addresses
Overview
We are pushing to implement EIP-3770 address references, which include a prefixed chain id before an address. We need to allow users to input addresses with a chain prefix.
Goals
- Accept/validate EIP-3770 address input.
Requirements
- Modify inputs/validation to allow EIP-3770 address formats.
- Validate networks against this map. (A service will likely be created for this but it is acceptable to do this client-side in the web app.)
- Validate that prefixed addresses match those of the current network.
Links
How about adding a getChainIdFromEip3770Address(address: Eip3770Address): number
function?