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 +4 -4
- data/.github/workflows/codeql.yml +1 -1
- data/.github/workflows/docs.yml +2 -2
- data/.github/workflows/spec.yml +2 -2
- data/Gemfile +1 -1
- data/README.md +1 -1
- data/eth.gemspec +1 -1
- data/lib/eth/client.rb +7 -4
- data/lib/eth/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 98f8ce464d7df37a4eba624469d53362687773991ccabf623e9d91d78e450479
|
|
4
|
+
data.tar.gz: ce0601d35ca795205565e541c97115f396c5e7553a9aa6a76421167bf6bc4e69
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fb9c363ec65417ce041a3a847f3d573a2128724fabb1b80483453c3097c1f726b123d78fb546b15a691ab83e64e2409ef7ef8d40461348c3948014ad52159991
|
|
7
|
+
data.tar.gz: 869b4229c3861eb7be055d0b5559e039269e267ad79203d9f4dd2923d8a08e863af9afce2cb6e973e74130db2fd6a4a04c084a0bc7460b167ab50b3813fa1592
|
data/.github/workflows/docs.yml
CHANGED
|
@@ -10,7 +10,7 @@ jobs:
|
|
|
10
10
|
docs:
|
|
11
11
|
runs-on: ubuntu-latest
|
|
12
12
|
steps:
|
|
13
|
-
- uses: actions/checkout@
|
|
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.
|
|
23
|
+
uses: JamesIves/github-pages-deploy-action@v4.7.6
|
|
24
24
|
with:
|
|
25
25
|
branch: gh-pages
|
|
26
26
|
folder: doc/
|
data/.github/workflows/spec.yml
CHANGED
|
@@ -19,9 +19,9 @@ jobs:
|
|
|
19
19
|
fail-fast: false
|
|
20
20
|
matrix:
|
|
21
21
|
os: [ubuntu-latest, macos-latest]
|
|
22
|
-
ruby: ['3.
|
|
22
|
+
ruby: ['3.4', '4.0']
|
|
23
23
|
steps:
|
|
24
|
-
- uses: actions/checkout@
|
|
24
|
+
- uses: actions/checkout@v6
|
|
25
25
|
- name: MacOs Dependencies
|
|
26
26
|
if: matrix.os == 'macos-latest'
|
|
27
27
|
run: |
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
[](https://github.com/q9f/eth.rb/pulse)
|
|
15
15
|
[](https://q9f.github.io/eth.rb)
|
|
16
16
|
[](https://github.com/q9f/eth.rb/wiki)
|
|
17
|
-
[](LICENSE)
|
|
17
|
+
[](LICENSE.txt)
|
|
18
18
|
[](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", "<
|
|
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
|
-
|
|
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
|
|
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
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.
|
|
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: '
|
|
253
|
+
version: '5.0'
|
|
254
254
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
255
255
|
requirements:
|
|
256
256
|
- - ">="
|