Socket
Socket
Sign inDemoInstall

@layerzerolabs/devtools-evm

Package Overview
Dependencies
Maintainers
2
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@layerzerolabs/devtools-evm

Utilities for LayerZero EVM projects


Version published
Maintainers
2
Created
Source

LayerZero

@layerzerolabs/devtools-evm

NPM Version Downloads NPM License

Utilities for working with LayerZero EVM contracts.

Installation

yarn add @layerzerolabs/devtools-evm

pnpm add @layerzerolabs/devtools-evm

npm install @layerzerolabs/devtools-evm

Address utilities

ignoreZero(address: Address | null | undefined)

Turns EVM zero addresses to undefined

import { ignoreZero } from "@layerzerolabs/devtools-evm";

ignoreZero("0xEe6cF2E1Bc7645F8439d241ce37820305F2BB3F8"); // Returns '0xEe6cF2E1Bc7645F8439d241ce37820305F2BB3F8'
ignoreZero("0x0000000000000000000000000000000000000000"); // Returns undefined
ignoreZero(undefined); // Returns undefined
ignoreZero(null); // Returns undefined
makeZeroAddress(address)

Turns null and undefined into EVM zero address

import { makeZeroAddress } from "@layerzerolabs/devtools-evm";

makeZeroAddress("0xEe6cF2E1Bc7645F8439d241ce37820305F2BB3F8"); // Returns '0xEe6cF2E1Bc7645F8439d241ce37820305F2BB3F8'
makeZeroAddress("0x0000000000000000000000000000000000000000"); // Returns '0x0000000000000000000000000000000000000000'
makeZeroAddress(undefined); // Returns '0x0000000000000000000000000000000000000000'
makeZeroAddress(null); // Returns '0x0000000000000000000000000000000000000000'

FAQs

Package last updated on 29 Aug 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