This Rust CLI tool is designed for Ethereum Virtual Machine (EVM) development environments. It offers a suite of commands for easy conversion and manipulation of values commonly used in blockchain development, such as converting values to and from wei, gwei, ether, and hexadecimal formats.
Value Conversion: Convert values between wei, gwei, and ether with ease. Hexadecimal Conversion: Easily convert values from hexadecimal to various data types and vice versa. Alias Commands: Quick aliases for commonly used commands.
To install this tool, you must clone this repo and run the install bash script. This will install the tool to your /usr/local/bin directory.
bash installTo uninstall this tool, you must remove the tool from your /usr/local/bin directory.
sudo rm /usr/local/bin/rrTo use this tool, run the following command in your terminal:
Copy code
rr <COMMAND>wad/wei/gwei: Convert a value to wei, gwei, and ether.from-hex/fhex: Convert a value from hex to string, uint256, int256, and float.to-hex/thex: Convert a value to hex. --help: Print help message or the help of the given subcommand(s).
-h, --help: Print help.
rr wad 1
+---------------------+-------------+----------------------+
| From ether | From gwei | From wei |
+---------------------+-------------+----------------------+
| 1 | 0.000000001 | 0.000000000000000001 |
+---------------------+-------------+----------------------+
| 1000000000 | 1 | 0.000000001 |
+---------------------+-------------+----------------------+
| 1000000000000000000 | 1000000000 | 1 |
+---------------------+-------------+----------------------+rr thex 1000
+------------+----------+---------+--------------------+
| String | Uint 256 | Int 256 | Float |
+------------+----------+---------+--------------------+
| 0x31303030 | 0x03e8 | 0x03e8 | 0x408f400000000000 |
+------------+----------+---------+--------------------+rr fhex 0x31303030
+--------+--------------+-------------+---------------+
| String | Unsigned int | int256 | Float |
+--------+--------------+-------------+---------------+
| 1000 | 825241648 | 825241648 | Invalid float |
+--------+--------------+-------------+---------------+
| | 825,241,648 | 825,241,648 | |
+--------+--------------+-------------+---------------+MIT License