Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@layerzerolabs/evm-sdks-build
Advanced tools
The EVM SDKs Build Tools package provides a set of utilities and tools for building and managing EVM-based SDKs. It includes functions for copying files, populating directories, and managing concurrency with semaphores.
To install the EVM SDKs Build Tools package, you can use npm or yarn:
npm install @layerzerolabs/evm-sdks-build
or
yarn add @layerzerolabs/evm-sdks-build
Asynchronously copies files from source packages to a target root directory based on the provided directory structure.
import { copyPackageFiles, PackageFiles } from "@layerzerolabs/evm-sdks-build";
const packageFiles: PackageFiles = {
"@layerzerolabs/package1": ["file1.js", "file2.js"],
"@layerzerolabs/package2": {
dir1: ["file3.js"],
dir2: ["file4.js", "file5.js"],
},
};
const callerRootFile = __filename;
copyPackageFiles(packageFiles, callerRootFile).then(() => {
console.log("Files copied successfully.");
});
Populates the target directory with files from the specified source packages.
import { populate, CopyTargets } from "@layerzerolabs/evm-sdks-build";
const copyTargets: CopyTargets = {
"@layerzerolabs/package1": {
artifacts: ["**/*.json"],
deployments: ["**/*.json"],
},
"@layerzerolabs/package2": {
"artifacts-tron": ["**/*.json"],
"artifacts-zk": ["**/*.json"],
},
};
const callerRootFile = __filename;
populate(copyTargets, callerRootFile).then(() => {
console.log("Directories populated successfully.");
});
Semaphore for controlling access to a resource by multiple processes.
import { Semaphore } from '@layerzerolabs/evm-sdks-build'
const semaphore = new Semaphore(3)
async function task(id: number) {
await semaphore.acquire()
console.log(`Task ${id} acquired semaphore.`)
// Simulate async work
await new Promise((resolve) => setTimeout(resolve, 1000))
console.log(`Task ${id} releasing semaphore.`)
semaphore.release()
}
for (let i = 1 i <= 5 i++) {
task(i)
}
FAQs
Unknown package
The npm package @layerzerolabs/evm-sdks-build receives a total of 777 weekly downloads. As such, @layerzerolabs/evm-sdks-build popularity was classified as not popular.
We found that @layerzerolabs/evm-sdks-build demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.