README.md 2.3 K raw
1
# Walletfetch
2
3
![cover](https://files.stevedylan.dev/walletfetch.png)
4
5
Like neofetch but for your wallet
6
7
## About
8
9
I used this small project as a way to get more experience with Rust, so if things look weird, that's why lol. Overall it was a lot of fun, and I enjoyed using AI as a learning resource only and writing the code myself (check out [agents.md](/agents.md)).
10
11
## Installation
12
13
Visit the [releases page](https://github.com/stevedylandev/walletfetch/releases) for various install methods, or you can use [Homebrew](https://brew.sh) or [Cargo](https://www.rust-lang.org/tools/install)
14
15
```bash
16
brew install stevedylandev/walletfetch/walletfetch
17
```
18
19
```bash
20
cargo install walletfetch
21
```
22
23
Make sure it worked by running
24
25
```bash
26
walletfetch --version
27
```
28
29
30
## Usage
31
32
To start, run the `walletfetch` command followed by an ENS or address
33
34
```bash
35
walletfetch vitalik.eth
36
```
37
38
This will create a default config file at `~/.config/walletfetch/config.toml`. Inside that config file you can configure RPC URLs for different chains as well as any tokens you want to include. The format for main balances is as follows: `networks.chain_id`, followed by the `name` and `rpc_url`.
39
40
```toml
41
[networks.1]
42
name = "Mainnet"
43
rpc_url = "https://eth.drpc.org"
44
```
45
46
For tokens, follow the same pattern as above but add `.tokens` to the header, then fill in the details such as the name, `address` and `decimals`
47
48
```toml
49
[networks.1.tokens]
50
USDC = { address = "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", decimals = 6 }
51
```
52
53
You can also designate a default `address` at the top so you can just run `walletfetch` without any arguments. Check out the example config below:
54
55
```toml
56
address = "stevedylandev.eth"
57
58
[networks.1]
59
name = "Mainnet"
60
rpc_url = "https://eth.drpc.org"
61
62
[networks.1.tokens]
63
USDC = { address = "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", decimals = 6 }
64
65
66
[networks.8453]
67
name = "Base"
68
rpc_url = "https://base.drpc.org"
69
70
[networks.8453.tokens]
71
USDC = { address = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", decimals = 6 }
72
lemon3 = { address = "0xe0907762b1d9cdfbe8061ae0cc4a0501fa077421", decimals = 18 }
73
74
[networks.42161]
75
name = "Arbitrum"
76
rpc_url = "https://arbitrum.drpc.org"
77
78
[networks.42161.tokens]
79
USDC = { address = "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", decimals = 6 }
80
```
81
82
## Questions
83
84
Feel free to [reach out](https://stevedylan.dev/links)!