### Retrieving Safe Singleton Deployments (V1) - TypeScript Source: https://github.com/safe-global/safe-deployments/blob/main/README.md Demonstrates how to use V1 methods like `getSafeSingletonDeployment` and `getSafeL2SingletonDeployment` to retrieve a single Safe contract deployment. Examples show fetching the latest version, unreleased versions, or versions specific to a network or version number. These methods return a `SingletonDeployment` object or `undefined`. ```TypeScript const safeSingleton = getSafeSingletonDeployment(); // Returns latest contract version, even if not finally released yet const safeSingletonNightly = getSafeSingletonDeployment({ released: undefined }); // Returns released contract version for specific network const safeSingletonGörli = getSafeSingletonDeployment({ network: '5' }); // Returns released contract version for specific version const safeSingleton100 = getSafeSingletonDeployment({ version: '1.0.0' }); // Version with additional events used on L2 networks const safeL2Singleton = getSafeL2SingletonDeployment(); ``` -------------------------------- ### Retrieving Handler Deployments (V1) - TypeScript Source: https://github.com/safe-global/safe-deployments/blob/main/README.md Provides examples of retrieving handler contract deployments using the V1 methods `getDefaultCallbackHandlerDeployment` and `getCompatibilityFallbackHandlerDeployment`. These functions return a single `SingletonDeployment` object or `undefined`. ```TypeScript const callbackHandler = getDefaultCallbackHandlerDeployment(); const compatHandler = getCompatibilityFallbackHandlerDeployment(); ``` -------------------------------- ### Retrieving Handler Deployments (V2) - TypeScript Source: https://github.com/safe-global/safe-deployments/blob/main/README.md Provides examples of retrieving handler contract deployments using the V2 methods `getDefaultCallbackHandlerDeployments` and `getCompatibilityFallbackHandlerDeployments`. These functions return a `SingletonDeployment` object (potentially with multiple network addresses) or `undefined`. ```TypeScript const callbackHandler = getDefaultCallbackHandlerDeployments(); const compatHandler = getCompatibilityFallbackHandlerDeployments(); ``` -------------------------------- ### Retrieving Safe Singleton Deployments (V2) - TypeScript Source: https://github.com/safe-global/safe-deployments/blob/main/README.md Demonstrates how to use V2 methods like `getSafeSingletonDeployments` and `getSafeL2SingletonDeployments` to retrieve Safe contract deployments. These methods return a `SingletonDeployment` object (potentially with multiple network addresses) or `undefined`, supporting options for latest, unreleased, network-specific, or version-specific lookups. ```TypeScript const safeSingleton = getSafeSingletonDeployments(); // Returns latest contract version, even if not finally released yet const safeSingletonNightly = getSafeSingletonDeployments({ released: undefined }); // Returns released contract version for specific network const safeSingletonGörli = getSafeSingletonDeployments({ network: '5' }); // Returns released contract version for specific version const safeSingleton100 = getSafeSingletonDeployments({ version: '1.0.0' }); // Version with additional events used on L2 networks const safeL2Singleton = getSafeL2SingletonDeployments(); ``` -------------------------------- ### Retrieving Library Deployments (V2) - TypeScript Source: https://github.com/safe-global/safe-deployments/blob/main/README.md Illustrates how to fetch various library contract deployments using their respective V2 getter functions: `getMultiSendDeployments`, `getMultiSendCallOnlyDeployments`, `getCreateCallDeployments`, and `getSignMessageLibDeployments`. Each returns a `SingletonDeployment` object (potentially with multiple network addresses) or `undefined`. ```TypeScript const multiSendLib = getMultiSendDeployments(); const multiSendCallOnlyLib = getMultiSendCallOnlyDeployments(); const createCallLib = getCreateCallDeployments(); const signMessageLib = getSignMessageLibDeployments(); ``` -------------------------------- ### Retrieving Library Deployments (V1) - TypeScript Source: https://github.com/safe-global/safe-deployments/blob/main/README.md Illustrates how to fetch various library contract deployments using their respective V1 getter functions: `getMultiSendDeployment`, `getMultiSendCallOnlyDeployment`, `getCreateCallDeployment`, and `getSignMessageLibDeployment`. Each returns a single `SingletonDeployment` object or `undefined`. ```TypeScript const multiSendLib = getMultiSendDeployment(); const multiSendCallOnlyLib = getMultiSendCallOnlyDeployment(); const createCallLib = getCreateCallDeployment(); const signMessageLib = getSignMessageLibDeployment(); ``` -------------------------------- ### Retrieving Proxy Factory Deployment (V2) - TypeScript Source: https://github.com/safe-global/safe-deployments/blob/main/README.md Shows how to retrieve the Proxy Factory contract deployment using the V2 method `getProxyFactoryDeployments`. This method returns a `SingletonDeployment` object (potentially with multiple network addresses) or `undefined`. ```TypeScript const proxyFactory = getProxyFactoryDeployments(); ``` -------------------------------- ### Retrieving Proxy Factory Deployment (V1) - TypeScript Source: https://github.com/safe-global/safe-deployments/blob/main/README.md Shows how to retrieve the Proxy Factory contract deployment using the V1 method `getProxyFactoryDeployment`. This method returns a single `SingletonDeployment` object or `undefined`. ```TypeScript const proxyFactory = getProxyFactoryDeployment(); ``` -------------------------------- ### SingletonDeployment Interface Definition (V2) - TypeScript Source: https://github.com/safe-global/safe-deployments/blob/main/README.md Defines the structure of the SingletonDeployment object returned by V2 methods. Similar to V1, but the `networkAddresses` field is updated to `Record` to accommodate networks where a contract might have multiple valid deployment addresses. ```TypeScript export interface SingletonDeployment { // The default address of the deployment. defaultAddress: string; // Indicates if the deployment is released. released: boolean; // The name of the contract. contractName: string; // The version of the deployment. version: string; // The address & hash of the contract code, where the key is the deployment type. // There could be multiple deployment types: canonical, eip155, zksync // Possible addresses per version: // 1.0.0: canonical // 1.1.1: canonical // 1.2.0: canonical // 1.3.0: canonical, eip155, zksync // 1.4.1: canonical, zksync // Ex: deployments: { "canonical": { "codeHash": "0x1234", "address": "0x5678"}} deployments: Record; // A record of network addresses, where the key is the network identifier and the value is the address. networkAddresses: Record; // The ABI (Application Binary Interface) of the contract. abi: any[]; } ``` -------------------------------- ### SingletonDeployment Interface Definition (V1) - TypeScript Source: https://github.com/safe-global/safe-deployments/blob/main/README.md Defines the structure of the SingletonDeployment object returned by V1 methods. This object contains details about a specific contract deployment, including its default address, release status, name, version, code hashes per deployment type, network-specific addresses, and ABI. The networkAddresses field in V1 is a simple string-to-string map. ```TypeScript export interface SingletonDeployment { // The default address of the deployment. defaultAddress: string; // Indicates if the deployment is released. released: boolean; // The name of the contract. contractName: string; // The version of the deployment. version: string; // The address & hash of the contract code, where the key is the deployment type. // There could be multiple deployment types: canonical, eip155, zksync // Possible addresses per version: // 1.0.0: canonical // 1.1.1: canonical // 1.2.0: canonical // 1.3.0: canonical, eip155, zksync // 1.4.1: canonical, zksync // Ex: deployments: { "canonical": { "codeHash": "0x1234", "address": "0x5678"}} deployments: Record; // A record of network addresses, where the key is the network identifier and the value is the address. networkAddresses: Record; // The ABI (Application Binary Interface) of the contract. abi: any[]; } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.