Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@safe-global/safe-modules-deployments

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@safe-global/safe-modules-deployments

Collection of Safe Modules singleton deployments

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5K
decreased by-53.9%
Maintainers
2
Weekly downloads
 
Created
Source

Safe Modules Deployments

npm version

This contract contains a collection of deployments of audited contracts from the Safe modules repository.

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.

To add additional deployments please follow the deployment steps in the module folder in the Safe modules repository.

Install

  • npm - npm i @safe-global/safe-modules-deployments
  • yarn - yarn add @safe-global/safe-modules-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 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.

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 Deployment object or undefined if no deployment was found for the specified filter.

interface Deployment {
  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
}
  • Allowance Module
    const allowanceModule = getAllowanceModuleDeployment();
    
    // Returns latest contract version, even if not finally released yet
    const allowanceModuleNightly = getAllowanceModuleDeployment({ released: undefined });
    
    // Returns released contract version for specific network
    const allowanceModuleGörli = getAllowanceModuleDeployment({ network: '5' });
    
    // Returns released contract version for specific version
    const allowanceModule010 = getAllowanceModuleDeployment({ version: '0.1.0' });
    
  • ERC-4337 Module

Notes

A list of network information can be found at chainid.network

License

This library is released under MIT.

Keywords

FAQs

Package last updated on 26 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc