
Research
/Security News
Malicious Chrome Extension Performs Hidden Affiliate Hijacking
A Chrome extension claiming to hide Amazon ads was found secretly hijacking affiliate links, replacing creators’ tags with its own without user consent.
@layerzerolabs/metadata-tools
Advanced tools
yarn add @layerzerolabs/metadata-tools
pnpm add @layerzerolabs/metadata-tools
npm install @layerzerolabs/metadata-tools
import { generateConnectionsConfig } from "@layerzerolabs/metadata-tools";
const EVM_ENFORCED_OPTIONS: OAppEnforcedOption[] = [
{
msgType: 1,
optionType: ExecutorOptionType.LZ_RECEIVE,
gas: 80000,
value: 0,
},
]
// [srcContract, dstContract, [requiredDVNs, [optionalDVNs, threshold]], [srcToDstConfirmations, dstToSrcConfirmations]], [enforcedOptionsSrcToDst, enforcedOptionsDstToSrc]
const pathways = [
[avalancheContract, polygonContract, [['LayerZero Labs'], []], [1, 1], [EVM_ENFORCED_OPTIONS, EVM_ENFORCED_OPTIONS]],
]
const connections = await generateConnectionsConfig(pathways)
To add a custom DVN with the name 'SuperCustomDVN' for Amoy Testnet (Polygon Testnet) and Fuji (Avalanche Testnet), do the following:
import { generateConnectionsConfig, defaultFetchMetadata, IMetadata, IMetadataDvns } from "@layerzerolabs/metadata-tools";
// create a custom fetchMetadata implementation
const customFetchMetadata = async (): Promise<IMetadata> => {
// get the default metadata
const defaultMetadata = await defaultFetchMetadata()
// extend the Amoy DVNs with custom DVN(s)
const amoyTestnetDVNsWithCustom: IMetadataDvns = {
...metadata['amoy-testnet']!.dvns,
'0x9f0e79aeb198750f963b6f30b99d87c6ee5a0467': {
version: 2,
canonicalName: 'SuperCustomDVN',
id: 'super-custom-dvn',
},
}
// extend the Fuji DVNs with custom DVN(s)
const fujiDVNsWithCustom: IMetadataDvns = {
...metadata.fuji!.dvns,
'0x9f0e79aeb198750f963b6f30b99d87c6ee5a0467': {
version: 2,
canonicalName: 'SuperCustomDVN',
id: 'super-custom-dvn',
},
}
return {
...metadata,
'amoy-testnet': {
...metadata['amoy-testnet']!,
dvns: amoyTestnetDVNsWithCustom,
},
fuji: {
...metadata.fuji!,
dvns: fujiDVNsWithCustom,
},
}
}
// declare enforced options like in the example without custom fetchMetadata
// We can now pass 'SuperCustomDVN' as a DVN value in our pathway(s)
const pathways = [
[avalancheContract, polygonContract, [['SuperCustomDVN'], []], [1, 1], [EVM_ENFORCED_OPTIONS, EVM_ENFORCED_OPTIONS]],
]
const connections = await generateConnectionsConfig(pathways, { fetchMetadata: customFetchMetadata })
In the above example, we extended the result of the default fetchMetadata with our own DVN entries - under the respective chains. We added a DVN with the canonicalName of SuperCustomDVN and id super-custom-dvn. The canonicalName and id can be arbitrary, but they must be consistent for all pathways that require that DVN. In our case, since we have a pathway between Fuji and Amoy, we extended the DVNs entry in both Fuji and Amoy.
FAQs
LayerZero metadata API tools
The npm package @layerzerolabs/metadata-tools receives a total of 866 weekly downloads. As such, @layerzerolabs/metadata-tools popularity was classified as not popular.
We found that @layerzerolabs/metadata-tools demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
A Chrome extension claiming to hide Amazon ads was found secretly hijacking affiliate links, replacing creators’ tags with its own without user consent.

Security News
A surge of AI-generated vulnerability reports has pushed open source maintainers to rethink bug bounties and tighten security disclosure processes.

Product
Scan results now load faster and remain consistent over time, with stable URLs and on-demand rescans for fresh security data.