0.0.14 • Published 8 months ago

@layerzerolabs/export-deployments v0.0.14

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

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,
  ),
});
0.0.12

8 months ago

0.0.13

8 months ago

0.0.14

8 months ago

0.0.10

1 year ago

0.0.11

11 months ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago