eth-rb 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/lib/eth.rb +8 -1
  3. metadata +3 -8
  4. data/Gemfile +0 -6
  5. data/Gemfile.lock +0 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1940c7b2ccb9dd67f344ae0ff7d29bae166726ecbac8bfb10313d461f70304aa
4
- data.tar.gz: f271a44d507892b99ca64f69f218be1986972f57d9744427f8b5c130aea29a50
3
+ metadata.gz: 00fd96065aaaf94dbd745f5107028e12c4685064490e8954de7f1de0d4a52baa
4
+ data.tar.gz: 6216af149d237abdebe73f3056da4ec30e1d11ceb8711a32b0395647456f0362
5
5
  SHA512:
6
- metadata.gz: 759cc650c335a35988eb10bccb3aab381f50525d4652fea2758b04c587c4e5d4f5160103ef144f3406a986d84134b1abb82605794539c2938a8b8461f7168000
7
- data.tar.gz: f492da002def87a00cb13b5551fc2bdc71e073e25e5cd2fefc1e974a4a23d40bcc0af3a77e4d4bb86db0f0d9f7b6b4d483ee87da2dba53bc70481152ef224b02
6
+ metadata.gz: efa352a5b7b6cbc99ffb90d849cd11883a9591b8847c5866de70d70654303854e48d0d17501789672ab4a48db17ade3ea2758db61493fde941fb746d6f509698
7
+ data.tar.gz: 9b2aa9456446a6219710643ab1a1f66410f0c12636104d217cf915afca9f5c5249a0c6ec0e430c6711686058b15547e1bb5d5daae86b596843b4bfe0aede7803
data/lib/eth.rb CHANGED
@@ -6,11 +6,11 @@
6
6
  # ./eth.rb — show latest block number
7
7
  # ./eth.rb <address> — show ETH balance of <address>
8
8
  # ./eth.rb --price — show current ETH/USD price
9
+ # ./eth.rb --version or -v — show version
9
10
  # ./eth.rb send <key> <to> <amount> — send ETH (amount in ETH)
10
11
  # ./eth.rb send <key> <to> $<amount> — send ETH (amount in USD, converted at current price)
11
12
  # ./eth.rb --help — show this usage info
12
13
 
13
- require "bundler/setup"
14
14
  require "net/http"
15
15
  require "json"
16
16
  require "uri"
@@ -21,6 +21,7 @@ require "digest/keccak"
21
21
  ALCHEMY_URL = "https://eth-mainnet.g.alchemy.com/v2/alch_PhpVkmsabZhYV69otj1rF"
22
22
  COINGECKO_URL = "https://api.coingecko.com/api/v3/simple/price?ids=ethereum&vs_currencies=usd"
23
23
  CHAIN_ID = 1 # Ethereum mainnet
24
+ VERSION = "0.1.2"
24
25
 
25
26
  # ── JSON-RPC ────────────────────────────────────────────────────────────────
26
27
 
@@ -315,6 +316,10 @@ def show_price
315
316
  puts "ETH/USD: $#{format("%.2f", price)}"
316
317
  end
317
318
 
319
+ def show_version
320
+ puts "eth.rb v#{VERSION}"
321
+ end
322
+
318
323
  def print_usage
319
324
  puts File.read(__FILE__)[/^#\sUsage:.*?(?=\n\n)/m]
320
325
  end
@@ -326,6 +331,8 @@ def run_cli(args)
326
331
  show_block_number
327
332
  elsif args[0] == "--price"
328
333
  show_price
334
+ elsif args[0] == "--version" || args[0] == "-v"
335
+ show_version
329
336
  elsif args[0] == "--help" || args[0] == "-h"
330
337
  print_usage
331
338
  elsif args[0] == "send"
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eth-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Khalid Shaikh
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2026-07-29 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: ecdsa
@@ -47,15 +46,12 @@ executables:
47
46
  extensions: []
48
47
  extra_rdoc_files: []
49
48
  files:
50
- - Gemfile
51
- - Gemfile.lock
52
49
  - exe/eth.rb
53
50
  - lib/eth.rb
54
51
  homepage: https://github.com/kshaikh/eth.rb
55
52
  licenses:
56
53
  - MIT
57
54
  metadata: {}
58
- post_install_message:
59
55
  rdoc_options: []
60
56
  require_paths:
61
57
  - lib
@@ -70,8 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
70
66
  - !ruby/object:Gem::Version
71
67
  version: '0'
72
68
  requirements: []
73
- rubygems_version: 3.0.3.1
74
- signing_key:
69
+ rubygems_version: 4.0.17
75
70
  specification_version: 4
76
71
  summary: Ethereum blockchain queries via Alchemy JSON-RPC
77
72
  test_files: []
data/Gemfile DELETED
@@ -1,6 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem "ecdsa", "~> 1.2"
6
- gem "keccak", "~> 1.3"
data/Gemfile.lock DELETED
@@ -1,15 +0,0 @@
1
- GEM
2
- remote: https://rubygems.org/
3
- specs:
4
- ecdsa (1.2.0)
5
- keccak (1.3.1)
6
-
7
- PLATFORMS
8
- ruby
9
-
10
- DEPENDENCIES
11
- ecdsa (~> 1.2)
12
- keccak (~> 1.3)
13
-
14
- BUNDLED WITH
15
- 1.17.2