tezos_client 0.4.4 → 0.4.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c7de27ae0b52ebd19a4fd74e3407aaa54fcdbcdc7b542039254618cf58c94baa
4
- data.tar.gz: 6b4dae6eb590b8e3b54ef27086d873e2fbf83c7bf83406ed417e8f0fa9fcfb0f
3
+ metadata.gz: 9ea0bb8309ad037eaa79cd877cd344fa3a2dea0f12b3fe3efe1ded6e6089929e
4
+ data.tar.gz: 6fccb50a5c5c5938d61eebd5d4c5556faceccb402f02b0c6688afb3a3f8ee337
5
5
  SHA512:
6
- metadata.gz: e94b9ab12a4616933d9ed59ad83d55087ee70e566972eb4153bf70f4b43ae6825bf790b8a5a890c2ea2969d51be481d89f09e501fbabed18eaa737648d07b6ee
7
- data.tar.gz: bcf9bf6ee40167ea0be0064f5b5f0e526673309389505ef1b504070accb35d454d8eb03bb5c2e2a973f2cf1243c9f3d35679b22f73bd0799d321773984a0c092
6
+ metadata.gz: 2df80a4c2f4a966d2e4bf885e2e024be442a343a0f92fd08e56fb81f4d75f70c27e25f03f8fd4e308fa3df28367cf4066d22cc733697b7f43e87a5d2c57b0578
7
+ data.tar.gz: 0c3324c44fd398a91460b85cf1a1bebaed9764dc78445eb32c2c12a5e53fd319f6428291b047dc4fe427f383639e8cc378354f022294af224a39d8d2075a51db
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tezos_client (0.4.4)
5
- activesupport (~> 5.2.0)
4
+ tezos_client (0.4.6)
5
+ activesupport (~> 5.2.3)
6
6
  base58 (~> 0.2.3)
7
7
  bip_mnemonic (~> 0.0.2)
8
8
  httparty (~> 0.16.2)
@@ -13,31 +13,31 @@ PATH
13
13
  GEM
14
14
  remote: https://rubygems.org/
15
15
  specs:
16
- actionpack (5.2.2)
17
- actionview (= 5.2.2)
18
- activesupport (= 5.2.2)
16
+ actionpack (5.2.3)
17
+ actionview (= 5.2.3)
18
+ activesupport (= 5.2.3)
19
19
  rack (~> 2.0)
20
20
  rack-test (>= 0.6.3)
21
21
  rails-dom-testing (~> 2.0)
22
22
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
23
- actionview (5.2.2)
24
- activesupport (= 5.2.2)
23
+ actionview (5.2.3)
24
+ activesupport (= 5.2.3)
25
25
  builder (~> 3.1)
26
26
  erubi (~> 1.4)
27
27
  rails-dom-testing (~> 2.0)
28
28
  rails-html-sanitizer (~> 1.0, >= 1.0.3)
29
- activesupport (5.2.2)
29
+ activesupport (5.2.3)
30
30
  concurrent-ruby (~> 1.0, >= 1.0.2)
31
31
  i18n (>= 0.7, < 2)
32
32
  minitest (~> 5.1)
33
33
  tzinfo (~> 1.1)
34
- addressable (2.5.2)
35
- public_suffix (>= 2.0.2, < 4.0)
34
+ addressable (2.7.0)
35
+ public_suffix (>= 2.0.2, < 5.0)
36
36
  ast (2.4.0)
37
37
  base58 (0.2.3)
38
38
  bip_mnemonic (0.0.4)
39
39
  builder (3.2.3)
40
- concurrent-ruby (1.1.4)
40
+ concurrent-ruby (1.1.5)
41
41
  crack (0.4.3)
42
42
  safe_yaml (~> 1.0.0)
43
43
  crass (1.0.4)
@@ -46,46 +46,45 @@ GEM
46
46
  unf (>= 0.0.5, < 1.0.0)
47
47
  erubi (1.8.0)
48
48
  ffi (1.11.1)
49
- hashdiff (0.3.8)
49
+ hashdiff (1.0.0)
50
50
  http-cookie (1.0.3)
51
51
  domain_name (~> 0.5)
52
52
  httparty (0.16.4)
53
53
  mime-types (~> 3.0)
54
54
  multi_xml (>= 0.5.2)
55
- i18n (1.5.1)
55
+ i18n (1.6.0)
56
56
  concurrent-ruby (~> 1.0)
57
- jaro_winkler (1.5.2)
57
+ jaro_winkler (1.5.3)
58
58
  loofah (2.2.3)
59
59
  crass (~> 1.0.2)
60
60
  nokogiri (>= 1.5.9)
61
61
  method_source (0.9.2)
62
- mime-types (3.2.2)
62
+ mime-types (3.3)
63
63
  mime-types-data (~> 3.2015)
64
- mime-types-data (3.2019.0331)
64
+ mime-types-data (3.2019.0904)
65
65
  mini_portile2 (2.4.0)
66
66
  minitest (5.11.3)
67
67
  money-tree (0.10.0)
68
68
  ffi
69
69
  multi_xml (0.6.0)
70
70
  netrc (0.11.0)
71
- nokogiri (1.10.0)
71
+ nokogiri (1.10.4)
72
72
  mini_portile2 (~> 2.4.0)
73
- parallel (1.12.1)
74
- parser (2.5.3.0)
73
+ parallel (1.17.0)
74
+ parser (2.6.4.0)
75
75
  ast (~> 2.4.0)
76
- powerpack (0.1.2)
77
- public_suffix (3.0.3)
78
- rack (2.0.6)
76
+ public_suffix (4.0.1)
77
+ rack (2.0.7)
79
78
  rack-test (1.1.0)
80
79
  rack (>= 1.0, < 3)
81
80
  rails-dom-testing (2.0.3)
82
81
  activesupport (>= 4.2.0)
83
82
  nokogiri (>= 1.6)
84
- rails-html-sanitizer (1.0.4)
83
+ rails-html-sanitizer (1.2.0)
85
84
  loofah (~> 2.2, >= 2.2.2)
86
- railties (5.2.2)
87
- actionpack (= 5.2.2)
88
- activesupport (= 5.2.2)
85
+ railties (5.2.3)
86
+ actionpack (= 5.2.3)
87
+ activesupport (= 5.2.3)
89
88
  method_source
90
89
  rake (>= 0.8.7)
91
90
  thor (>= 0.19.0, < 2.0)
@@ -101,28 +100,34 @@ GEM
101
100
  rspec-core (~> 3.8.0)
102
101
  rspec-expectations (~> 3.8.0)
103
102
  rspec-mocks (~> 3.8.0)
104
- rspec-core (3.8.0)
103
+ rspec-core (3.8.2)
105
104
  rspec-support (~> 3.8.0)
106
- rspec-expectations (3.8.2)
105
+ rspec-expectations (3.8.4)
107
106
  diff-lcs (>= 1.2.0, < 2.0)
108
107
  rspec-support (~> 3.8.0)
109
- rspec-mocks (3.8.0)
108
+ rspec-mocks (3.8.1)
110
109
  diff-lcs (>= 1.2.0, < 2.0)
111
110
  rspec-support (~> 3.8.0)
112
- rspec-support (3.8.0)
113
- rubocop (0.62.0)
111
+ rspec-support (3.8.2)
112
+ rubocop (0.74.0)
114
113
  jaro_winkler (~> 1.5.1)
115
114
  parallel (~> 1.10)
116
- parser (>= 2.5, != 2.5.1.1)
117
- powerpack (~> 0.1)
115
+ parser (>= 2.6)
118
116
  rainbow (>= 2.2.2, < 4.0)
119
117
  ruby-progressbar (~> 1.7)
120
- unicode-display_width (~> 1.4.0)
121
- rubocop-rails_config (0.4.0)
118
+ unicode-display_width (>= 1.4.0, < 1.7)
119
+ rubocop-performance (1.4.1)
120
+ rubocop (>= 0.71.0)
121
+ rubocop-rails (2.3.2)
122
+ rack (>= 1.1)
123
+ rubocop (>= 0.72.0)
124
+ rubocop-rails_config (0.7.2)
122
125
  railties (>= 3.0)
123
- rubocop (~> 0.58)
124
- ruby-progressbar (1.10.0)
125
- safe_yaml (1.0.4)
126
+ rubocop (~> 0.74)
127
+ rubocop-performance (~> 1.3)
128
+ rubocop-rails (~> 2.0)
129
+ ruby-progressbar (1.10.1)
130
+ safe_yaml (1.0.5)
126
131
  thor (0.20.3)
127
132
  thread_safe (0.3.6)
128
133
  tzinfo (1.2.5)
@@ -130,12 +135,12 @@ GEM
130
135
  unf (0.1.4)
131
136
  unf_ext
132
137
  unf_ext (0.0.7.6)
133
- unicode-display_width (1.4.1)
138
+ unicode-display_width (1.6.0)
134
139
  vcr (4.0.0)
135
- webmock (3.5.1)
140
+ webmock (3.7.2)
136
141
  addressable (>= 2.3.6)
137
142
  crack (>= 0.3.2)
138
- hashdiff
143
+ hashdiff (>= 0.4.0, < 2.0.0)
139
144
 
140
145
  PLATFORMS
141
146
  ruby
@@ -150,4 +155,4 @@ DEPENDENCIES
150
155
  webmock
151
156
 
152
157
  BUNDLED WITH
153
- 1.16.3
158
+ 1.17.3
@@ -39,11 +39,9 @@ class TezosClient
39
39
 
40
40
  run_result[:operations_result].zip(rpc_operation_args) do |operation_result, rpc_operation_args|
41
41
  if rpc_operation_args.key?(:gas_limit)
42
- rpc_operation_args[:gas_limit] = (operation_result[:consumed_gas].to_i + 0.001.to_satoshi).to_s
42
+ rpc_operation_args[:gas_limit] = (operation_result[:consumed_gas] + 0.001).to_satoshi.to_s
43
43
  end
44
44
  end
45
-
46
- run_result
47
45
  end
48
46
 
49
47
  def to_hex
@@ -78,6 +76,7 @@ class TezosClient
78
76
  def test_and_broadcast
79
77
  # simulate operations and adjust gas limits
80
78
  simulate_and_update_limits
79
+
81
80
  operations_result = preapply
82
81
 
83
82
  op_id = broadcast
@@ -93,22 +92,23 @@ class TezosClient
93
92
  signature: base_58_signature,
94
93
  branch: branch)
95
94
 
96
- consumed_storage = 0
97
- consumed_gas = 0
95
+ total_consumed_storage = 0
96
+ total_consumed_gas = 0
98
97
 
99
98
  ensure_applied!(rpc_responses)
100
99
 
101
100
  operations_result = rpc_responses.map do |rpc_response|
102
101
  metadata = rpc_response[:metadata]
103
- consumed_storage += compute_consumed_storage(metadata)
104
- consumed_gas += compute_consumed_gas(metadata)
105
- metadata[:operation_result]
102
+ total_consumed_storage += compute_consumed_storage(metadata)
103
+ consumed_gas = compute_consumed_gas(metadata)
104
+ total_consumed_gas += consumed_gas
105
+ { result: metadata[:operation_result], consumed_gas: consumed_gas }
106
106
  end
107
107
 
108
108
  {
109
109
  status: :applied,
110
- consumed_gas: consumed_gas,
111
- consumed_storage: consumed_storage,
110
+ consumed_gas: total_consumed_gas,
111
+ consumed_storage: total_consumed_storage,
112
112
  operations_result: operations_result
113
113
  }
114
114
  end
@@ -177,4 +177,4 @@ class TezosClient
177
177
  raise exception_klass(errors).new(metadata: metadata, errors: errors, status: status)
178
178
  end
179
179
  end
180
- end
180
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class TezosClient
4
- VERSION = "0.4.4"
4
+ VERSION = "0.4.6"
5
5
  end
data/tezos_client.gemspec CHANGED
@@ -44,7 +44,7 @@ Gem::Specification.new do |spec|
44
44
  spec.add_dependency "httparty", "~> 0.16.2"
45
45
  spec.add_dependency "rbnacl", "~> 5.0.0"
46
46
  spec.add_dependency "rest-client", "~>2.0.0"
47
- spec.add_dependency "activesupport", "~> 5.2.0"
47
+ spec.add_dependency "activesupport", "~> 5.2.3"
48
48
  spec.add_dependency "money-tree", "~> 0.10.0"
49
49
  spec.add_dependency "bip_mnemonic", "~> 0.0.2"
50
50
  end
@@ -12,6 +12,7 @@ git checkout next
12
12
 
13
13
  eval `opam config env`
14
14
 
15
+ opam install camlp4 ctypes-foreign ocaml-migrate-parsetree
15
16
  make build-deps
16
17
  make clone-tezos
17
18
  make
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tezos_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pierre Michard
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-27 00:00:00.000000000 Z
11
+ date: 2019-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -156,14 +156,14 @@ dependencies:
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: 5.2.0
159
+ version: 5.2.3
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: 5.2.0
166
+ version: 5.2.3
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: money-tree
169
169
  requirement: !ruby/object:Gem::Requirement