etherlite 0.4.1 → 0.4.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.
- checksums.yaml +4 -4
- data/lib/etherlite/account/base.rb +1 -2
- data/lib/etherlite/api/node.rb +5 -8
- data/lib/etherlite/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: 7d5972b71c09d1bb9d1a3f732b8c1b5fe0057ad46c0159c1c93e5fbe690ef695
|
|
4
|
+
data.tar.gz: 3b4fc972adac1ecbf23b7188040e8ba729d136ef89f51a4045d9c2339725ff34
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6b594fc27d066ecd3ee27025f990996d9badc2bc37efc9b770bfad55cf8a96b2779fb61a59d1dbb214de5905bff3863fa7b9975b145f94a9e88521e9055838d0
|
|
7
|
+
data.tar.gz: 416610c6eb6f4466c5aee182147ee8bc456b8aaaf851cf5a1644bde4583df980a3dcaa822c92617e25393bdf145386200366f284c0310fcb13b283032f7a4a94
|
|
@@ -39,7 +39,7 @@ module Etherlite::Account
|
|
|
39
39
|
end
|
|
40
40
|
|
|
41
41
|
def send_transaction(_options = {})
|
|
42
|
-
raise NotSupportedError, 'transactions are not supported by this kind of account'
|
|
42
|
+
raise Etherlite::NotSupportedError, 'transactions are not supported by this kind of account'
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
def ==(_other)
|
|
@@ -50,7 +50,6 @@ module Etherlite::Account
|
|
|
50
50
|
|
|
51
51
|
def call_constant(_target, _function, _params, _options)
|
|
52
52
|
params = {
|
|
53
|
-
from: json_encoded_address,
|
|
54
53
|
to: Etherlite::Utils.encode_address_param(_target),
|
|
55
54
|
data: _function.encode(_params)
|
|
56
55
|
}
|
data/lib/etherlite/api/node.rb
CHANGED
|
@@ -53,7 +53,11 @@ module Etherlite
|
|
|
53
53
|
end
|
|
54
54
|
|
|
55
55
|
def default_account
|
|
56
|
-
@default_account ||=
|
|
56
|
+
@default_account ||= (accounts.first || anonymous_account)
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def anonymous_account
|
|
60
|
+
@anonymous_account ||= Etherlite::Account::Anonymous.new(connection)
|
|
57
61
|
end
|
|
58
62
|
|
|
59
63
|
def account_from_pk(_pk)
|
|
@@ -66,13 +70,6 @@ use 'load_account' instead"
|
|
|
66
70
|
end
|
|
67
71
|
|
|
68
72
|
def_delegators :default_account, :unlock, :lock, :normalized_address, :transfer_to, :call
|
|
69
|
-
|
|
70
|
-
private
|
|
71
|
-
|
|
72
|
-
def load_default_account
|
|
73
|
-
# TODO: consider configuring a global PK and allow the default account to use it
|
|
74
|
-
accounts.first || Etherlite::Account::Anonymous.new(connection)
|
|
75
|
-
end
|
|
76
73
|
end
|
|
77
74
|
end
|
|
78
75
|
end
|
data/lib/etherlite/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: etherlite
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ignacio Baixas
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-06-
|
|
11
|
+
date: 2021-06-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: digest-sha3
|