New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@layerzerolabs/devtools-extensible-cli

Package Overview
Dependencies
Maintainers
0
Versions
3
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.

  • 0.0.3
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
159
Maintainers
0
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

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

FAQs

Package last updated on 20 Feb 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

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