eth 0.5.16 → 0.5.17

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ad70051a0aa71d2f7ed5a4acea236b677c9d1f4eb3467f8194de19a8de9f8714
4
- data.tar.gz: 5558228d301116bd2be49ac184c01f3c2d1cb0e725deb9ab3f070021927b63cf
3
+ metadata.gz: 98f8ce464d7df37a4eba624469d53362687773991ccabf623e9d91d78e450479
4
+ data.tar.gz: ce0601d35ca795205565e541c97115f396c5e7553a9aa6a76421167bf6bc4e69
5
5
  SHA512:
6
- metadata.gz: acf9b6267efa46befed740d7d00c5938ed8d384b3297c57953f71c2ae5ebac31bd279a44694dd3675f77648f66e381dccacb70f533896600b3fd1bdc15a04a3b
7
- data.tar.gz: dbb137aa5449234ba86f64951740d0f985693f37d1da329a70b7efdfb44b17a8bb2511a74560ac07a8d116aba100894e584c55fc3cc367c5c91e48fed456593a
6
+ metadata.gz: fb9c363ec65417ce041a3a847f3d573a2128724fabb1b80483453c3097c1f726b123d78fb546b15a691ab83e64e2409ef7ef8d40461348c3948014ad52159991
7
+ data.tar.gz: 869b4229c3861eb7be055d0b5559e039269e267ad79203d9f4dd2923d8a08e863af9afce2cb6e973e74130db2fd6a4a04c084a0bc7460b167ab50b3813fa1592
@@ -24,7 +24,7 @@ jobs:
24
24
  - ruby
25
25
  steps:
26
26
  - name: "Checkout repository"
27
- uses: actions/checkout@v5
27
+ uses: actions/checkout@v6
28
28
  - name: "Initialize CodeQL"
29
29
  uses: github/codeql-action/init@v4
30
30
  with:
@@ -10,7 +10,7 @@ jobs:
10
10
  docs:
11
11
  runs-on: ubuntu-latest
12
12
  steps:
13
- - uses: actions/checkout@v5
13
+ - uses: actions/checkout@v6
14
14
  - uses: ruby/setup-ruby@v1
15
15
  with:
16
16
  ruby-version: '3.4'
@@ -20,7 +20,7 @@ jobs:
20
20
  gem install yard
21
21
  yard doc
22
22
  - name: Deploy GH Pages
23
- uses: JamesIves/github-pages-deploy-action@v4.7.3
23
+ uses: JamesIves/github-pages-deploy-action@v4.7.6
24
24
  with:
25
25
  branch: gh-pages
26
26
  folder: doc/
@@ -19,9 +19,9 @@ jobs:
19
19
  fail-fast: false
20
20
  matrix:
21
21
  os: [ubuntu-latest, macos-latest]
22
- ruby: ['3.3', '3.4']
22
+ ruby: ['3.4', '4.0']
23
23
  steps:
24
- - uses: actions/checkout@v5
24
+ - uses: actions/checkout@v6
25
25
  - name: MacOs Dependencies
26
26
  if: matrix.os == 'macos-latest'
27
27
  run: |
data/Gemfile CHANGED
@@ -3,7 +3,7 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  group :test, :development do
6
- gem "bundler", "~> 2.5"
6
+ gem "bundler", ">= 2.4"
7
7
  gem "pry", "~> 0.15"
8
8
  gem "rake", "~> 13.2"
9
9
  gem "rdoc", "~> 6.13"
data/README.md CHANGED
@@ -14,7 +14,7 @@
14
14
  [![Top Language](https://img.shields.io/github/languages/top/q9f/eth.rb?color=red)](https://github.com/q9f/eth.rb/pulse)
15
15
  [![Yard Doc API](https://img.shields.io/badge/documentation-API-blue)](https://q9f.github.io/eth.rb)
16
16
  [![Usage Wiki](https://img.shields.io/badge/usage-WIKI-blue)](https://github.com/q9f/eth.rb/wiki)
17
- [![Open-Source License](https://img.shields.io/github/license/q9f/eth.rb)](LICENSE)
17
+ [![Open-Source License](https://img.shields.io/github/license/q9f/eth.rb)](LICENSE.txt)
18
18
  [![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/q9f/eth.rb/issues)
19
19
 
20
20
  A straightforward library to build, sign, and broadcast Ethereum transactions. It allows the separation of key and node management. Sign transactions and handle keys anywhere you can run Ruby and broadcast transactions through any local or remote node. Sign messages and recover signatures for authentication.
data/eth.gemspec CHANGED
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
32
32
  spec.test_files = spec.files.grep %r{^(test|spec|features)/}
33
33
 
34
34
  spec.platform = Gem::Platform::RUBY
35
- spec.required_ruby_version = ">= 3.0", "< 4.0"
35
+ spec.required_ruby_version = ">= 3.0", "< 5.0"
36
36
 
37
37
  # bigdecimal for big decimals ;)
38
38
  spec.add_dependency "bigdecimal", "~> 3.1"
data/lib/eth/client.rb CHANGED
@@ -40,25 +40,28 @@ module Eth
40
40
  # A custom error type if a contract interaction fails.
41
41
  class ContractExecutionError < StandardError; end
42
42
 
43
- # Raised when an RPC call returns an error. Carries the optional
43
+ # Raised when an RPC call returns an error. Carries the error code and the optional
44
44
  # hex-encoded error data to support custom error decoding.
45
45
  class RpcError < IOError
46
46
  attr_reader :data
47
+ attr_reader :code
47
48
 
48
49
  # Constructor for the {RpcError} class.
49
50
  #
50
51
  # @param message [String] the error message returned by the RPC.
51
52
  # @param data [String] optional hex encoded error data.
52
- def initialize(message, data = nil)
53
+ # @param code [String] optional error code returned by the RPC.
54
+ def initialize(message, data = nil, code = nil)
53
55
  super(message)
54
56
  @data = data
57
+ @code = code
55
58
  end
56
59
  end
57
60
 
58
61
  # Creates a new RPC-Client, either by providing an HTTP/S host, WS/S host,
59
62
  # or an IPC path. Supports basic authentication with username and password.
60
63
  #
61
- # **Note**, this sets the folling gas defaults: {Tx::DEFAULT_PRIORITY_FEE}
64
+ # **Note**, this sets the following gas defaults: {Tx::DEFAULT_PRIORITY_FEE}
62
65
  # and {Tx::DEFAULT_GAS_PRICE. Use {#max_priority_fee_per_gas} and
63
66
  # {#max_fee_per_gas} to set custom values prior to submitting transactions.
64
67
  #
@@ -483,7 +486,7 @@ module Eth
483
486
  }
484
487
  output = JSON.parse(send_request(payload.to_json))
485
488
  if (err = output["error"])
486
- raise RpcError.new(err["message"], err["data"])
489
+ raise RpcError.new(err["message"], err["data"], err["code"])
487
490
  end
488
491
  output
489
492
  end
data/lib/eth/version.rb CHANGED
@@ -22,7 +22,7 @@ module Eth
22
22
  MINOR = 5.freeze
23
23
 
24
24
  # Defines the patch version of the {Eth} module.
25
- PATCH = 16.freeze
25
+ PATCH = 17.freeze
26
26
 
27
27
  # Defines the version string of the {Eth} module.
28
28
  VERSION = [MAJOR, MINOR, PATCH].join(".").freeze
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.16
4
+ version: 0.5.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Ellis
@@ -250,7 +250,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
250
250
  version: '3.0'
251
251
  - - "<"
252
252
  - !ruby/object:Gem::Version
253
- version: '4.0'
253
+ version: '5.0'
254
254
  required_rubygems_version: !ruby/object:Gem::Requirement
255
255
  requirements:
256
256
  - - ">="