Created
December 12, 2021 18:59
-
-
Save marek22k/1e397a34fcd1487d71889cdac8fa2812 to your computer and use it in GitHub Desktop.
Same functionality as helpeth addressDetails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "icap" | |
require "eth" | |
addr = ARGV[0] | |
if ! (addr == addr.downcase) && (! Eth::Utils.valid_address? addr) | |
puts "The supplied address failed the checksum test. It might be invalid." | |
end | |
puts "Address: #{addr.downcase}" | |
puts "Address (checksum): #{Eth::Utils.format_address addr}" | |
puts "ICAP: #{ICAP::calculate_icap ICAP::calculate_bban addr}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment