
Security News
Happy Birthday, Shai-Hulud
It has been one year since Shai-Hulud made its first appearance on npm.
dexpricefetcher
Advanced tools
npm i dexpricefetcher
import { getTokenBalance, getTotalSupply, getDecimals, getSymbol, getName, getChainId, getTokenData, getTokenPrice } from 'dexpricefetcher';
const providerUrl = 'https://mainnet.infura.io/v3/YOUR-INFURA-PROJECT-ID';
const tokenAddress = '0x6B175474E89094C44Da98b954EedeAC495271d0F'; // DAI token contract address
const walletAddress = '0x742d35Cc6634C0532925a3b844Bc454e4438f44e'; // Example wallet address
(async () => {
const balance = await getTokenBalance(providerUrl, tokenAddress, walletAddress);
console.log('Token Balance:', balance.toString());
const totalSupply = await getTotalSupply(providerUrl, tokenAddress);
console.log('Total Supply:', totalSupply.toString());
const decimals = await getDecimals(providerUrl, tokenAddress);
console.log('Decimals:', decimals.toString());
const symbol = await getSymbol(providerUrl, tokenAddress);
console.log('Symbol:', symbol);
const name = await getName(providerUrl, tokenAddress);
console.log('Name:', name);
const chainId = await getChainId(providerUrl);
console.log('Chain ID:', chainId);
const tokenData = await getTokenData(tokenAddress);
console.log('Token Data:', tokenPriceData);
const tokenPriceData = await getTokenPrice(tokenAddress);
console.log('Token Price Data:', tokenPriceData);
})();
FAQs
### Install
We found that dexpricefetcher demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.

Security News
It has been one year since Shai-Hulud made its first appearance on npm.

Research
/Security News
Operators behind PolinRider used a compromised GitHub account to plant malware in four development versions of a Packagist package with 700,000+ downloads.

Security News
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.