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

@nexusmutual/deployments

Package Overview
Dependencies
Maintainers
3
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nexusmutual/deployments

Nexus Mutual deployed contract addresses and abis

  • 2.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
316
increased by167.8%
Maintainers
3
Weekly downloads
 
Created
Source

Nexus Mutual Deployment

This package contains the abis and addresses of the deployed Nexus Mutual contracts.

Usage

CommonJS

  // import everything in one go
  const deployments = require('@nexusmutual/deployments');
  console.log(`NXM Token address: ${deployments.addresses.NXMToken}`);

  // import addresses only
  const addresses = require('@nexusmutual/deployments/addresses');

  // import abis only
  const abis = require('@nexusmutual/deployments/abis');

  // import a specific abi
  const coverAbi = require('@nexusmutual/deployments/abis/Cover');

  // Create a contract instance
  const ethers = require('ethers');

  const provider = new ethers.providers.JsonRpcProvider(PROVIDER_URL);
  const coverContract = new ethers.Contract(addresses.Cover, coverAbi, provider);

  const stakingPoolAddress = await coverContract.stakingPool(2);
  console.log(`Staking pool #2 is at: ${stakingPoolAddress}`);

ESM

  // import everything in one go
  import deployments from '@nexusmutual/deployments';
  console.log(`NXM Token address (import all): ${deployments.addresses.NXMToken}`);

  // import addresses only
  import addresses from '@nexusmutual/deployments/addresses';
  console.log(`NXM Token address (import addresses): ${addresses.NXMToken}`);

  // import abis only
  import abis from '@nexusmutual/deployments/abis';
  console.log(`Contract list: ${Object.keys(abis).join(', ')}`);

  // import a specific abi and create a contract instance
  import ethers from 'ethers';
  import coverAbi from '@nexusmutual/deployments/abis/Cover';

  const provider = new ethers.providers.JsonRpcProvider(PROVIDER_URL);
  const coverContract = new ethers.Contract(addresses.Cover, coverAbi, provider);

  const stakingPoolAddress = await coverContract.stakingPool(2);
  console.log(`Staking pool #2 is at: ${stakingPoolAddress}`);

Keywords

FAQs

Package last updated on 08 Sep 2023

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