Safe Deployments
This contract contains a collection of deployments of the contract of the Safe contracts repository.
The addresses on the different networks and the abi files are available for each deployment. To get an overview of the available versions, check the available json assets.
Adding additional deployments:
- Follow the deployment steps in the Safe contract repository.
- Verify that the addresses match the expected address for each contract. You can find them under the "addresses" mapping in the respective JSON file in the assets folder.
- Create a PR adding the new deployment. Example PR can be found here.
Install
- npm -
npm i @safe-global/safe-deployments
- yarn -
yarn add @safe-global/safe-deployments
Usage
It is possible to directly use the JSON files in the assets folder that contain the addresses and abi definitions.
An alternative is using JavaScript library methods to query the correct deployment. The library supports different methods to get the deployment of a specific contract.
Each of the methods takes an optional DeploymentFilter
as a parameter.
interface DeploymentFilter {
version?: string;
released?: boolean;
network?: string;
}
The method will return a SingletonDeployment
object or undefined
if no deployment was found for the specified filter.
interface SingletonDeployment {
defaultAddress: string;
released: boolean;
contractName: string;
version: string;
codeHash: string;
addresses: Record<string, string>;
networkAddresses: Record<string, string>;
abi: any[];
}
const safeSingleton = getSafeSingletonDeployment();
const safeSingletonNightly = getSafeSingletonDeployment({ released: undefined });
const safeSingletonGörli = getSafeSingletonDeployment({ network: '5' });
const safeSingleton100 = getSafeSingletonDeployment({ version: '1.0.0' });
const safeL2Singleton = getSafeL2SingletonDeployment();
const proxyFactory = getProxyFactoryDeployment();
const multiSendLib = getMultiSendDeployment();
const multiSendCallOnlyLib = getMultiSendCallOnlyDeployment();
const createCallLib = getCreateCallDeployment();
const fallbackHandler = getFallbackHandlerDeployment();
const callbackHandler = getDefaultCallbackHandlerDeployment();
const compatHandler = getCompatibilityFallbackHandlerDeployment();
Release cycle
safe-deployments
release cycle is once per month, except for urgent issues that require immediate attention.
Notes
A list of network information can be found at chainid.network
License
This library is released under MIT.