get-eth-balances
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -0,3 +1,40 @@ | ||
#!/usr/bin/env node | ||
const args = require('args'); | ||
args | ||
.option('input', 'The file with ETH addresses, that will be processed'); | ||
const flags = args.parse(process.argv); | ||
console.log('test'); | ||
const API = addr => `https://api.etherscan.io/api?module=account&action=balancemulti&address=${addr}&tag=latest&apikey=YourApiKeyToken`; | ||
const fs = require('fs'); | ||
const request = require('request'); | ||
let addresses = (fs.readFileSync(flags.i)+'').match(/0x[0-9a-f]{40}/ig); | ||
// console log balances | ||
(function loop() { | ||
let chunk = addresses.splice(0, 20); | ||
request(API(chunk.join(',')), function (error, response, body) { | ||
if (error) { | ||
console.error(error); | ||
} | ||
JSON.parse(body).result.map(acc => { | ||
console.log(`${acc.account} ${acc.balance}`); | ||
}); | ||
if (addresses.length) { | ||
loop(); | ||
} | ||
}); | ||
}()); | ||
{ | ||
"name": "get-eth-balances", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "", | ||
@@ -22,3 +22,7 @@ "main": "index.js", | ||
}, | ||
"homepage": "https://github.com/gkucmierz/get-eth-balances#readme" | ||
"homepage": "https://github.com/gkucmierz/get-eth-balances#readme", | ||
"dependencies": { | ||
"args": "^5.0.0", | ||
"request": "^2.88.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
1490
24
0
2
1
+ Addedargs@^5.0.0
+ Addedrequest@^2.88.0
+ Addedajv@6.12.6(transitive)
+ Addedansi-styles@3.2.1(transitive)
+ Addedargs@5.0.3(transitive)
+ Addedasn1@0.2.6(transitive)
+ Addedassert-plus@1.0.0(transitive)
+ Addedasynckit@0.4.0(transitive)
+ Addedaws-sign2@0.7.0(transitive)
+ Addedaws4@1.13.2(transitive)
+ Addedbcrypt-pbkdf@1.0.2(transitive)
+ Addedcamelcase@5.0.0(transitive)
+ Addedcaseless@0.12.0(transitive)
+ Addedchalk@2.4.2(transitive)
+ Addedcolor-convert@1.9.3(transitive)
+ Addedcolor-name@1.1.3(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addedcore-util-is@1.0.2(transitive)
+ Addeddashdash@1.14.1(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addedecc-jsbn@0.1.2(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedextend@3.0.2(transitive)
+ Addedextsprintf@1.3.0(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedfast-json-stable-stringify@2.1.0(transitive)
+ Addedforever-agent@0.6.1(transitive)
+ Addedform-data@2.3.3(transitive)
+ Addedgetpass@0.1.7(transitive)
+ Addedhar-schema@2.0.0(transitive)
+ Addedhar-validator@5.1.5(transitive)
+ Addedhas-flag@3.0.0(transitive)
+ Addedhttp-signature@1.2.0(transitive)
+ Addedis-typedarray@1.0.0(transitive)
+ Addedisstream@0.1.2(transitive)
+ Addedjsbn@0.1.1(transitive)
+ Addedjson-schema@0.4.0(transitive)
+ Addedjson-schema-traverse@0.4.1(transitive)
+ Addedjson-stringify-safe@5.0.1(transitive)
+ Addedjsprim@1.4.2(transitive)
+ Addedleven@2.1.0(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedmri@1.1.4(transitive)
+ Addedoauth-sign@0.9.0(transitive)
+ Addedperformance-now@2.1.0(transitive)
+ Addedpsl@1.13.0(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addedqs@6.5.3(transitive)
+ Addedrequest@2.88.2(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsshpk@1.18.0(transitive)
+ Addedsupports-color@5.5.0(transitive)
+ Addedtough-cookie@2.5.0(transitive)
+ Addedtunnel-agent@0.6.0(transitive)
+ Addedtweetnacl@0.14.5(transitive)
+ Addeduri-js@4.4.1(transitive)
+ Addeduuid@3.4.0(transitive)
+ Addedverror@1.10.0(transitive)