# @gnosis.pm/safe-deployments

> Collection of Safe singleton deployments

Latest version **1.19.0** (published 2023-01-18) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @gnosis.pm/safe-deployments
pnpm add @gnosis.pm/safe-deployments
yarn add @gnosis.pm/safe-deployments
bun add @gnosis.pm/safe-deployments
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.19.0 |
| Published | 2023-01-18 |
| First published | 2021-05-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 429.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 182 |
| Author | richard@gnosis.io |
| Maintainers | rmeissner |
| Keywords | Ethereum, Wallet, Safe |

## Links

- npm: https://www.npmjs.com/package/@gnosis.pm/safe-deployments
- Repository: https://github.com/gnosis/safe-deployments
- Homepage: https://github.com/gnosis/safe-deployments/
- Issues: https://github.com/gnosis/safe-deployments/issues
- npm.io page: https://npm.io/package/@gnosis.pm/safe-deployments

## Dependencies (1)

- [semver](https://npm.io/package/semver.md) ^7.3.7

## Recent versions

- 1.19.0 (latest) — 2023-01-18
- 1.18.0 — 2023-01-06
- 1.17.0 — 2022-11-15
- 1.16.0 — 2022-08-08
- 1.15.0 — 2022-06-07
- 1.14.0 — 2022-05-16
- 1.12.0 — 2022-03-25
- 1.11.0 — 2022-03-11
- 1.10.0 — 2022-02-24
- 1.9.1 — 2022-02-22
- 1.9.0 — 2022-02-18
- 1.8.0 — 2022-01-24
- 1.7.0 — 2021-12-27
- 1.6.0 — 2021-12-27
- 1.5.0 — 2021-12-06
- … 7 more at https://npm.io/package/@gnosis.pm/safe-deployments/versions

## README

# Gnosis Safe Deployments

[![npm version](https://badge.fury.io/js/%40gnosis.pm%2Fsafe-deployments.svg)](https://badge.fury.io/js/%40gnosis.pm%2Fsafe-deployments)

This contract contains a collection of deployments of the contract of the [Safe contracts repository](https://github.com/gnosis/safe-contracts). 

For each deployment the address on the different networks and the abi files are available. To get an overview of the available versions check the available [json assets](./src/assets/).

To add additional deployments please follow the [deployment steps in the Safe contract repository](https://github.com/gnosis/safe-contracts#deployments).

## Install
- npm - `npm i @gnosis.pm/safe-deployments`
- yarn - `yarn add @gnosis.pm/safe-deployments`

## Usage

It is possible to directly use the json files in the [assets folder](./src/assets/) that contain the addresses and abi definitions.

An alternative is to use the JavaScript library methods to query the correct deployment. The library supports different methods to get the deployment of a specific contract.

Each of the method takes an optional `DeploymentFilter` as a parameter.

```ts
interface DeploymentFilter {
    version?: string,
    released?: boolean, // Defaults to true if no filter is specified
    network?: string // Chain id of the network
}
```

The method will return a `SingletonDeployment` object or `undefined` if no deployment was found for the specified filter.

```ts
interface SingletonDeployment {
    defaultAddress: string, // Address the contract was deployed to by the Gnosis team
    version: string,
    abi: any[],
    networkAddresses: Record<string, string>, // Address of the contract by network
    contractName: string,
    released: boolean // A released version was audited and has a running bug bounty
}
```

- Gnosis Safe
```ts
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()
```

- Factories
```ts
const proxyFactory = getProxyFactoryDeployment()
```

- Libraries
```ts
const multiSendLib = getMultiSendDeployment()

const multiSendCallOnlyLib = getMultiSendCallOnlyDeployment()

const createCallLib = getCreateCallDeployment()
```

- Handler
```ts
// Returns recommended handler
const fallbackHandler = getFallbackHandlerDeployment()

const callbackHandler = getDefaultCallbackHandlerDeployment()

const compatHandler = getCompatibilityFallbackHandlerDeployment()
```

## Notes

A list of network information can be found at [chainid.network](https://chainid.network/)

## License

This library is released under MIT.

---
_Source: https://npm.io/package/@gnosis.pm/safe-deployments · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
