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

@layerzerolabs/export-deployments

Package Overview
Dependencies
Maintainers
0
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@layerzerolabs/export-deployments

Export hardhat deploy deployments file into typescript

  • 0.0.14
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
237
decreased by-70.26%
Maintainers
0
Weekly downloads
 
Created
Source

LayerZero

@layerzerolabs/export-deployments

NPM Version Downloads NPM License

Installation

yarn add @layerzerolabs/export-deployments

pnpm add @layerzerolabs/export-deployments

npm install @layerzerolabs/export-deployments

Usage

CLI

This package comes with a CLI interface and registers an executable called @layerzerolabs/export-deployments:

# When installed locally
@layerzerolabs/export-deployments --help

# Or using npx, preferred
npx @layerzerolabs/export-deployments

Programmatic usage

// generateSafe is an error-safe function that returns an Either<Error, OutputFile[]> object
import { generateSafe } from "@layerzerolabs/export-deployments";

// if throwing an error is desired, generate is a better option
import { generate } from "@layerzerolabs/export-deployments";

generateSafe({
  deploymentsDir: "./my/deployments",
  outDir: "./generated",
});

If filtering of networks is necessary, createIncludeDirent utility can be used to construct a quick filtering function:

import {
  createIncludeDirent,
  generateSafe,
} from "@layerzerolabs/export-deployments";

const includedNetworks = ["arbitrum-mainnet"];
const excludedNetworks = ["telos-testnet"];

generateSafe({
  deploymentsDir: "./my/deployments",
  outDir: "./generated",
  includeNetworkDir: createIncludeDirent(includedNetworks, excludedNetworks),
});

Similar goes for deployment files:

import {
  createIncludeDirent,
  generateSafe,
} from "@layerzerolabs/export-deployments";

// createIncludeDirent will handle the json extension internally
const includedContracts = ["MyContract", "OtherContract.json"];
const excludedContracts = ["TopSecret"];

generateSafe({
  deploymentsDir: "./my/deployments",
  outDir: "./generated",
  includeDeploymentFile: createIncludeDirent(
    includedContracts,
    excludedContracts,
  ),
});

FAQs

Package last updated on 27 Oct 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