Skip to content

Instantly share code, notes, and snippets.

@zh
Last active September 15, 2021 13:01
Show Gist options
  • Save zh/b12a9efc89e057a6a6e7a430972fba93 to your computer and use it in GitHub Desktop.
Save zh/b12a9efc89e057a6a6e7a430972fba93 to your computer and use it in GitHub Desktop.
Balance Scanner contracts

Include library

const { getEtherBalances, getTokenBalances } = require("@mycrypto/eth-scan");

Testnet - 0x3c72F876E5C6d02315Ba6e3a39F2f10862FE98FC

getEtherBalances('http://35.220.203.194:8545',
  [
    'address1',
    ...
  ], { contractAddress: "0x3c72F876E5C6d02315Ba6e3a39F2f10862FE98FC" }).then(console.log);
  
getTokenBalances('http://35.220.203.194:8545',
  [
    'address...',
    ...
  ],
  '--you-token-address--', // <- put your token address here
  { contractAddress: "0x3c72F876E5C6d02315Ba6e3a39F2f10862FE98FC" }).then(console.log);

Mainnet - 0xd2A9a1b0b2d4160610E1ec1BC51bdc8a55aDD349

getEtherBalances('https://smartbch.greyh.at',
  [
    'address1',
    ...
  ], { contractAddress: "0xd2A9a1b0b2d4160610E1ec1BC51bdc8a55aDD349" }).then(console.log);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment