{"_id":"@aieco1234/safe-deployments","name":"@aieco1234/safe-deployments","dist-tags":{"latest":"1.36.0"},"versions":{"1.36.0":{"name":"@aieco1234/safe-deployments","version":"1.36.0","description":"Collection of Safe singleton deployments","homepage":"https://github.com/safe-global/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/safe-global/safe-deployments.git"},"keywords":["Ethereum","Wallet","Safe"],"author":{"name":"richard@safe.global"},"bugs":{"url":"https://github.com/safe-global/safe-deployments/issues"},"devDependencies":{"@types/jest":"^29.5.12","@types/node":"^20.11.30","@types/semver":"^7.5.8","@typescript-eslint/eslint-plugin":"^7.4.0","@typescript-eslint/parser":"^7.4.0","eslint":"^8.57.0","eslint-config-prettier":"^9.1.0","eslint-plugin-import":"^2.29.1","eslint-plugin-no-only-tests":"^3.1.0","eslint-plugin-prettier":"^5.1.3","husky":"^9.0.11","jest":"^29.7.0","prettier":"^3.2.5","ts-jest":"^29.1.2","ts-node":"^10.9.2","typescript":"^5.4.3"},"dependencies":{"semver":"^7.6.0"},"_id":"@aieco1234/safe-deployments@1.36.0","gitHead":"caff3a1c7466beeec7d0b4e4956dc98ea2382a70","_nodeVersion":"20.11.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-nuGHiyT7yfYrriIU2snIkfeThWhaAYkUcNkkIGgqhPnN9qx3ydY5Ha6uWQ2II4jmfo9rE6H7u9REExxM3mGDUA==","shasum":"091b39faaa0e4fee3dfb4f7f51b38c31a208f55b","tarball":"https://registry.npmjs.org/@aieco1234/safe-deployments/-/safe-deployments-1.36.0.tgz","fileCount":85,"unpackedSize":779021,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFGMkepgRyoKbp/hQRZaggbiI5I/No18PV/hI20+14ejAiEAt6le+ZosBUCXxt5SlKEZLOfBlB+ZzqH34G0wKih2raw="}]},"_npmUser":{"name":"aieco1234","email":"busy20771@gmail.com"},"directories":{},"maintainers":[{"name":"aieco1234","email":"busy20771@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/safe-deployments_1.36.0_1718887640514_0.36967121705742323"},"_hasShrinkwrap":false}},"time":{"created":"2024-06-20T12:47:20.440Z","1.36.0":"2024-06-20T12:47:20.715Z","modified":"2024-06-20T12:47:20.996Z"},"maintainers":[{"name":"aieco1234","email":"busy20771@gmail.com"}],"description":"Collection of Safe singleton deployments","homepage":"https://github.com/safe-global/safe-deployments/","keywords":["Ethereum","Wallet","Safe"],"repository":{"type":"git","url":"git+https://github.com/safe-global/safe-deployments.git"},"author":{"name":"richard@safe.global"},"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"}