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

dappql

Package Overview
Dependencies
Maintainers
0
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dappql - npm Package Compare versions

Comparing version 2.0.18 to 2.0.19

9

lib/utils/extractAbis.js
import path from 'path';
import { readFileSync } from 'fs';
async function getAbiFromEtherscan(contractName, contract, etherscanApiKey, etherscanApi = 'https://api.ehterscan.io') {

@@ -19,8 +20,10 @@ if (contract.address && etherscanApiKey) {

if (config.abiSourcePath) {
const pathName = path.join(config.abiSourcePath, `${contractName}.json`);
const pathName = path.join(process.cwd(), config.abiSourcePath, `${contractName}.json`);
try {
const abi = require(pathName);
const abi = JSON.parse(readFileSync(pathName, 'utf8'));
return { ...contract, contractName, abi };
}
catch { }
catch (error) {
console.error('Error loading ABI from file:', error);
}
}

@@ -27,0 +30,0 @@ return getAbiFromEtherscan(contractName, contract, config.etherscanApiKey, config.etherscanApi);

{
"name": "dappql",
"version": "2.0.18",
"version": "2.0.19",
"description": "wagmi extension to easily query smart-contracts",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

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