/portfolio-cli

Track balance of ETH and ERC20 tokens easily from cli

Primary LanguageRustMIT LicenseMIT

portfolio-cli

Track balance of ETH and ERC20 tokens easily from cli

dependency status Test with Code Coverage codecov

Features

  • List ETH and ERC20 total balance in ETH / USD
  • Show portfolio total balance in pie chart

Requirements

You will need some libs installed in your OS (Tested on Ubuntu 22.04):

  • gcc
  • libc-dev
  • libssl-dev

Usage

infura = <infura-api-key>
etherscan = <etherscan-api-key>
etherscan = <ethplorer-api-key>
  • Then run in the command line:
$ cargo build
$ cargo run -- -a <wallet-address>
  • Can also run verbose mode with:
$ cargo run -- -a <wallet-address> -v
  • For more options run:
$ cargo run -h

Testing

  • For testing, you will need the api keys suitable for that, add it to Settings.toml:
...
test_infura = <infura-api-key>
test_etherscan = <etherscan-api-key>
test_ethplorer = <ethplorer-api-key>
  • Then run:
$ cargo test

Coverage

For coverage tests, install and run tarpaulin

$ cargo tarpaulin