Socket
Book a DemoInstallSign in
Socket

@layerzerolabs/devtools-extensible-cli

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@layerzerolabs/devtools-extensible-cli

This is a CLI for LayerZero Devtools - which is extensible by defining new operations.

latest
npmnpm
Version
0.0.7
Version published
Weekly downloads
9
12.5%
Maintainers
1
Weekly downloads
 
Created
Source

Devtools-Extensible-CLI README

This is a CLI for LayerZero Devtools - which is extensible by defining new operations.

Operations are of the class Type INewOperation and are defined in the types/index.d.ts file.

When you go to type your new operation, the args will have - instead of _. For example, oapp_config will be --oapp-config on the command line.

import { build as buildMove } from "../../tasks/move/build";
import { INewOperation } from "./NewOperation";

class MoveBuildOperation implements INewOperation {
  // the vm to use
  vm = "move";
  // the name of this operation
  operation = "build";
  // the required arguments for the operation
  reqArgs = ["oapp_config", "named_addresses", "move_deploy_script"];
  // arguments that you want to create in addition to the pre-defined ones
  addArgs = [];

  // the implementation of the operation
  async impl(args: any): Promise<void> {
    await buildMove(args);
  }
}

const NewOperation = new MoveBuildOperation();
export { NewOperation };

You can attach new operations to this via

  • Paths await sdk.extendOperationFromPath('./operations/move-build') - example: packages/devtools-movement/operations/init.ts
  • Providing an implementation of the INewOperation interface await sdk.extendOperation(NewOperation) - example: examples/oft-aptos-move/scripts/cli.ts

FAQs

Package last updated on 24 Apr 2025

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