{"_id":"@butcher_of_blavikennnn/safe-deployments","name":"@butcher_of_blavikennnn/safe-deployments","dist-tags":{"latest":"1.33.1"},"versions":{"1.33.1":{"name":"@butcher_of_blavikennnn/safe-deployments","version":"1.33.1","description":"Collection of Safe singleton deployments","homepage":"https://github.com/butcher-blaviken/safe-deployments","license":"MIT","main":"dist/index.js","typings":"dist/index.d.ts","scripts":{"build":"yarn rimraf dist && tsc","lint":"yarn lint:ts && yarn lint:json","lint:ts":"eslint --max-warnings 0 .","lint:json":"prettier -c src/assets/*/*.json","prepack":"yarn build","prepare":"husky install","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/butcher-blaviken/safe-deployments.git"},"keywords":["Ethereum","Wallet","Safe"],"author":{"name":"butcher_of_blavikennnn@outlook.com"},"bugs":{"url":"https://github.com/safe-global/safe-deployments/issues"},"devDependencies":{"@types/jest":"^27.5.1","@types/node":"^14.14.21","@types/semver":"^7.3.9","@typescript-eslint/eslint-plugin":"^4.7.0","@typescript-eslint/parser":"^4.7.0","eslint":"^7.13.0","eslint-config-prettier":"^6.15.0","eslint-plugin-import":"^2.22.1","eslint-plugin-no-only-tests":"^2.4.0","eslint-plugin-prettier":"^3.1.4","husky":"^5.1.3","jest":"^28.1.0","prettier":"^3.2.5","ts-jest":"^28.0.2","ts-node":"^9.1.1","typescript":"^4.9.4"},"dependencies":{"semver":"^7.3.7"},"_id":"@butcher_of_blavikennnn/safe-deployments@1.33.1","gitHead":"af2ea93716e686563604abde36dd84bce2498464","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-jcdhnJRQ23JXCgO0XAtuS/QVmPgzrIYbno61HKncI1PGmv7kMMVek3B5S7meiHf2FOX270dThpY4YhJp02OErg==","shasum":"3c302967f2bb16c35067548c897d38e9eb73484b","tarball":"https://registry.npmjs.org/@butcher_of_blavikennnn/safe-deployments/-/safe-deployments-1.33.1.tgz","fileCount":85,"unpackedSize":726325,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC77Qrkvl3PnOBJWsZF9Fi51hWI8Ui8aiUoY5swtoyC8AIhAPLq+1cZx51jLNqiMbKbG9Gv+Elb/pThLZp3cCzoSUxF"}]},"_npmUser":{"name":"butcher_of_blavikennnn","email":"butcher_of_blavikennnn@outlook.com"},"directories":{},"maintainers":[{"name":"butcher_of_blavikennnn","email":"butcher_of_blavikennnn@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/safe-deployments_1.33.1_1709797148607_0.34333222821750886"},"_hasShrinkwrap":false}},"time":{"created":"2024-03-07T07:39:08.479Z","1.33.1":"2024-03-07T07:39:08.788Z","modified":"2024-03-07T07:39:09.321Z"},"maintainers":[{"name":"butcher_of_blavikennnn","email":"butcher_of_blavikennnn@outlook.com"}],"description":"Collection of Safe singleton deployments","homepage":"https://github.com/butcher-blaviken/safe-deployments","keywords":["Ethereum","Wallet","Safe"],"repository":{"type":"git","url":"git+https://github.com/butcher-blaviken/safe-deployments.git"},"author":{"name":"butcher_of_blavikennnn@outlook.com"},"bugs":{"url":"https://github.com/safe-global/safe-deployments/issues"},"license":"MIT","readme":"# Safe Deployments\n\n[![npm version](https://badge.fury.io/js/%40safe-global%2Fsafe-deployments.svg)](https://badge.fury.io/js/%40safe-global%2Fsafe-deployments)\n[![CI](https://github.com/safe-global/safe-deployments/actions/workflows/test.yml/badge.svg)](https://github.com/safe-global/safe-deployments/actions/workflows/test.yml)\n\nThis contract contains a collection of deployments of the contract of the [Safe contracts repository](https://github.com/safe-global/safe-contracts). \n\nFor 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/).\n\nTo add additional deployments please follow the [deployment steps in the Safe contract repository](https://github.com/safe-global/safe-contracts#deployments).\n\n## Install\n- npm - `npm i @safe-global/safe-deployments`\n- yarn - `yarn add @safe-global/safe-deployments`\n\n## Usage\n\nIt is possible to directly use the json files in the [assets folder](./src/assets/) that contain the addresses and abi definitions.\n\nAn 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.\n\nEach of the method takes an optional `DeploymentFilter` as a parameter.\n\n```ts\ninterface DeploymentFilter {\n    version?: string,\n    released?: boolean, // Defaults to true if no filter is specified\n    network?: string // Chain id of the network\n}\n```\n\nThe method will return a `SingletonDeployment` object or `undefined` if no deployment was found for the specified filter.\n\n```ts\ninterface SingletonDeployment {\n    defaultAddress: string, // Address the contract was deployed to by the Safe team\n    version: string,\n    abi: any[],\n    networkAddresses: Record<string, string>, // Address of the contract by network\n    contractName: string,\n    released: boolean // A released version was audited and has a running bug bounty\n}\n```\n\n- Safe\n```ts\nconst safeSingleton = getSafeSingletonDeployment()\n\n// Returns latest contract version, even if not finally released yet\nconst safeSingletonNightly = getSafeSingletonDeployment({ released: undefined })\n\n// Returns released contract version for specific network\nconst safeSingletonGörli = getSafeSingletonDeployment({ network: \"5\" })\n\n// Returns released contract version for specific version\nconst safeSingleton100 = getSafeSingletonDeployment({ version: \"1.0.0\" })\n\n// Version with additional events used on L2 networks\nconst safeL2Singleton = getSafeL2SingletonDeployment()\n```\n\n- Factories\n```ts\nconst proxyFactory = getProxyFactoryDeployment()\n```\n\n- Libraries\n```ts\nconst multiSendLib = getMultiSendDeployment()\n\nconst multiSendCallOnlyLib = getMultiSendCallOnlyDeployment()\n\nconst createCallLib = getCreateCallDeployment()\n```\n\n- Handler\n```ts\n// Returns recommended handler\nconst fallbackHandler = getFallbackHandlerDeployment()\n\nconst callbackHandler = getDefaultCallbackHandlerDeployment()\n\nconst compatHandler = getCompatibilityFallbackHandlerDeployment()\n```\n## Release cycle\n`safe-deployments` release cycle is once per month, except urgent issues that require immediate attention. \n\n## Notes\n\nA list of network information can be found at [chainid.network](https://chainid.network/)\n\n## License\n\nThis library is released under MIT.\n","readmeFilename":"README.md"}