tezos_client 1.4.5 → 2.1.0

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: 5ef43c07cdb05752ac0547f94ca3977cb78fc02d1b8395090577156009a2c003
4
- data.tar.gz: 40d3bc0b42568d339ba5eec78654448c5b0257dfe40d44e2540723f9cd14d170
3
+ metadata.gz: d191f6b28c2a8681bc8a72dbe4dd568ae4aa1450038ad7955eaec89764b9abc9
4
+ data.tar.gz: a116964161e26140dd3dc4ed47c412730450ca64394854bc57b9576d8f5045b9
5
5
  SHA512:
6
- metadata.gz: f1c552679ecad0ff4b7945903c019dbe1055fb7d05ee51d5af4d362f14f7bf2d0cc40a5add0e86c4672a7bbd920e39dd9a06e464c3a228a01360551e70d0e8bd
7
- data.tar.gz: 7f52897c55d933a6034fe0b17255ec6f570dc57a5464e5b2d2341dd8743781362fb101daca8aabac9969aa55e8f4aed4dbf15877cba65081eed10316d575f40e
6
+ metadata.gz: 92227209a94115e2c54d8d0e70b2c21c93f8ea9d8575ae1ddd281cb2ec5e2fa0e2db533312ace225fb89ba69941bbd977c9bc1030aff47bd60e36913127ca59c
7
+ data.tar.gz: 11a3cb9cc888ad1aab359f72bc7a6b5c9b62c11854836e676c4ba005c974eae1d2ae05f28fcbf5cdcbb8440f105d92706496eedb10bc2c01543639a94062ee6b
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.6.5
1
+ 3.1.4
data/Gemfile.lock CHANGED
@@ -1,179 +1,151 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tezos_client (1.4.5)
4
+ tezos_client (2.1.0)
5
5
  active_interaction (>= 3.8)
6
- activesupport (~> 6.0.0)
6
+ activesupport (< 7.1.0)
7
7
  base58 (~> 0.2.3)
8
8
  bip_mnemonic (~> 0.0.2)
9
- httparty (~> 0.17.0)
10
- money-tree (~> 0.10.0)
11
- rbnacl (~> 5.0.0)
12
- rest-client (~> 2.0.0)
9
+ httparty (~> 0.21.0)
10
+ money-tree (~> 0.11.2)
11
+ rbnacl (~> 7.1)
12
+ rest-client (~> 2.1)
13
13
 
14
14
  GEM
15
15
  remote: https://rubygems.org/
16
16
  specs:
17
- actionpack (6.0.6)
18
- actionview (= 6.0.6)
19
- activesupport (= 6.0.6)
20
- rack (~> 2.0, >= 2.0.8)
21
- rack-test (>= 0.6.3)
22
- rails-dom-testing (~> 2.0)
23
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
24
- actionview (6.0.6)
25
- activesupport (= 6.0.6)
26
- builder (~> 3.1)
27
- erubi (~> 1.4)
28
- rails-dom-testing (~> 2.0)
29
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
30
- active_interaction (4.1.0)
31
- activemodel (>= 5, < 8)
32
- activesupport (>= 5, < 8)
33
- activemodel (6.0.6)
34
- activesupport (= 6.0.6)
35
- activesupport (6.0.6)
17
+ active_interaction (5.3.0)
18
+ activemodel (>= 5.2, < 8)
19
+ activesupport (>= 5.2, < 8)
20
+ activemodel (7.0.8)
21
+ activesupport (= 7.0.8)
22
+ activesupport (7.0.8)
36
23
  concurrent-ruby (~> 1.0, >= 1.0.2)
37
- i18n (>= 0.7, < 2)
38
- minitest (~> 5.1)
39
- tzinfo (~> 1.1)
40
- zeitwerk (~> 2.2, >= 2.2.2)
41
- addressable (2.8.0)
42
- public_suffix (>= 2.0.2, < 5.0)
24
+ i18n (>= 1.6, < 2)
25
+ minitest (>= 5.1)
26
+ tzinfo (~> 2.0)
27
+ addressable (2.8.6)
28
+ public_suffix (>= 2.0.2, < 6.0)
43
29
  ast (2.4.2)
44
30
  base58 (0.2.3)
31
+ bech32 (1.4.2)
32
+ thor (>= 1.1.0)
33
+ bigdecimal (3.1.6)
45
34
  bip_mnemonic (0.0.4)
46
- builder (3.2.4)
47
35
  coderay (1.1.3)
48
- concurrent-ruby (1.1.10)
49
- crack (0.4.5)
36
+ concurrent-ruby (1.2.3)
37
+ crack (0.4.6)
38
+ bigdecimal
50
39
  rexml
51
- crass (1.0.6)
52
40
  diff-lcs (1.5.0)
53
- domain_name (0.5.20190701)
54
- unf (>= 0.0.5, < 1.0.0)
55
- erubi (1.11.0)
56
- ffi (1.15.5)
57
- hashdiff (1.0.1)
41
+ domain_name (0.6.20240107)
42
+ ffi (1.16.3)
43
+ hashdiff (1.1.0)
44
+ http-accept (1.7.0)
58
45
  http-cookie (1.0.5)
59
46
  domain_name (~> 0.5)
60
- httparty (0.17.3)
61
- mime-types (~> 3.0)
47
+ httparty (0.21.0)
48
+ mini_mime (>= 1.0.0)
62
49
  multi_xml (>= 0.5.2)
63
- i18n (1.12.0)
50
+ i18n (1.14.1)
64
51
  concurrent-ruby (~> 1.0)
65
- json (2.6.2)
66
- loofah (2.19.0)
67
- crass (~> 1.0.2)
68
- nokogiri (>= 1.5.9)
52
+ json (2.7.1)
53
+ language_server-protocol (3.17.0.3)
69
54
  method_source (1.0.0)
70
- mime-types (3.4.1)
55
+ mime-types (3.5.2)
71
56
  mime-types-data (~> 3.2015)
72
- mime-types-data (3.2022.0105)
73
- minitest (5.16.3)
74
- money-tree (0.10.0)
75
- ffi
57
+ mime-types-data (3.2023.1205)
58
+ mini_mime (1.1.5)
59
+ minitest (5.21.2)
60
+ money-tree (0.11.2)
61
+ bech32 (~> 1.3)
62
+ openssl (~> 3.1)
76
63
  multi_xml (0.6.0)
77
64
  netrc (0.11.0)
78
- nokogiri (1.13.8-x86_64-darwin)
79
- racc (~> 1.4)
80
- nokogiri (1.13.8-x86_64-linux)
81
- racc (~> 1.4)
82
- parallel (1.22.1)
83
- parser (3.1.2.1)
65
+ openssl (3.2.0)
66
+ parallel (1.24.0)
67
+ parser (3.3.0.5)
84
68
  ast (~> 2.4.1)
85
- pry (0.14.1)
69
+ racc
70
+ pry (0.14.2)
86
71
  coderay (~> 1.1)
87
72
  method_source (~> 1.0)
88
- public_suffix (4.0.6)
89
- racc (1.6.0)
90
- rack (2.2.4)
91
- rack-test (2.0.2)
92
- rack (>= 1.3)
93
- rails-dom-testing (2.0.3)
94
- activesupport (>= 4.2.0)
95
- nokogiri (>= 1.6)
96
- rails-html-sanitizer (1.4.3)
97
- loofah (~> 2.3)
98
- railties (6.0.6)
99
- actionpack (= 6.0.6)
100
- activesupport (= 6.0.6)
101
- method_source
102
- rake (>= 0.8.7)
103
- thor (>= 0.20.3, < 2.0)
73
+ public_suffix (5.0.4)
74
+ racc (1.7.3)
75
+ rack (3.0.9)
104
76
  rainbow (3.1.1)
105
- rake (13.0.6)
106
- rbnacl (5.0.0)
77
+ rake (13.1.0)
78
+ rbnacl (7.1.1)
107
79
  ffi
108
- regexp_parser (2.5.0)
109
- rest-client (2.0.2)
80
+ regexp_parser (2.9.0)
81
+ rest-client (2.1.0)
82
+ http-accept (>= 1.7.0, < 2.0)
110
83
  http-cookie (>= 1.0.2, < 2.0)
111
84
  mime-types (>= 1.16, < 4.0)
112
85
  netrc (~> 0.8)
113
- rexml (3.2.5)
114
- rspec (3.11.0)
115
- rspec-core (~> 3.11.0)
116
- rspec-expectations (~> 3.11.0)
117
- rspec-mocks (~> 3.11.0)
118
- rspec-core (3.11.0)
119
- rspec-support (~> 3.11.0)
120
- rspec-expectations (3.11.0)
86
+ rexml (3.2.6)
87
+ rspec (3.12.0)
88
+ rspec-core (~> 3.12.0)
89
+ rspec-expectations (~> 3.12.0)
90
+ rspec-mocks (~> 3.12.0)
91
+ rspec-core (3.12.2)
92
+ rspec-support (~> 3.12.0)
93
+ rspec-expectations (3.12.3)
121
94
  diff-lcs (>= 1.2.0, < 2.0)
122
- rspec-support (~> 3.11.0)
123
- rspec-mocks (3.11.0)
95
+ rspec-support (~> 3.12.0)
96
+ rspec-mocks (3.12.6)
124
97
  diff-lcs (>= 1.2.0, < 2.0)
125
- rspec-support (~> 3.11.0)
126
- rspec-support (3.11.0)
127
- rubocop (1.36.0)
98
+ rspec-support (~> 3.12.0)
99
+ rspec-support (3.12.1)
100
+ rubocop (1.60.2)
128
101
  json (~> 2.3)
102
+ language_server-protocol (>= 3.17.0)
129
103
  parallel (~> 1.10)
130
- parser (>= 3.1.2.1)
104
+ parser (>= 3.3.0.2)
131
105
  rainbow (>= 2.2.2, < 4.0)
132
106
  regexp_parser (>= 1.8, < 3.0)
133
107
  rexml (>= 3.2.5, < 4.0)
134
- rubocop-ast (>= 1.20.1, < 2.0)
108
+ rubocop-ast (>= 1.30.0, < 2.0)
135
109
  ruby-progressbar (~> 1.7)
136
- unicode-display_width (>= 1.4.0, < 3.0)
137
- rubocop-ast (1.21.0)
138
- parser (>= 3.1.1.0)
139
- rubocop-minitest (0.17.1)
140
- rubocop (>= 0.90, < 2.0)
141
- rubocop-packaging (0.5.1)
142
- rubocop (>= 0.89, < 2.0)
143
- rubocop-performance (1.13.2)
144
- rubocop (>= 1.7.0, < 2.0)
145
- rubocop-ast (>= 0.4.0)
146
- rubocop-rails (2.16.1)
110
+ unicode-display_width (>= 2.4.0, < 3.0)
111
+ rubocop-ast (1.30.0)
112
+ parser (>= 3.2.1.0)
113
+ rubocop-md (1.2.2)
114
+ rubocop (>= 1.0)
115
+ rubocop-minitest (0.34.5)
116
+ rubocop (>= 1.39, < 2.0)
117
+ rubocop-ast (>= 1.30.0, < 2.0)
118
+ rubocop-packaging (0.5.2)
119
+ rubocop (>= 1.33, < 2.0)
120
+ rubocop-performance (1.20.2)
121
+ rubocop (>= 1.48.1, < 2.0)
122
+ rubocop-ast (>= 1.30.0, < 2.0)
123
+ rubocop-rails (2.23.1)
147
124
  activesupport (>= 4.2.0)
148
125
  rack (>= 1.1)
149
126
  rubocop (>= 1.33.0, < 2.0)
150
- rubocop-rails_config (1.8.2)
151
- railties (>= 5.0)
152
- rubocop (>= 1.19)
153
- rubocop-ast (>= 1.0.1)
154
- rubocop-minitest (~> 0.15)
127
+ rubocop-ast (>= 1.30.0, < 2.0)
128
+ rubocop-rails_config (1.16.0)
129
+ rubocop (>= 1.57.0)
130
+ rubocop-ast (>= 1.26.0)
131
+ rubocop-md
132
+ rubocop-minitest (~> 0.22)
155
133
  rubocop-packaging (~> 0.5)
156
134
  rubocop-performance (~> 1.11)
157
135
  rubocop-rails (~> 2.0)
158
- ruby-progressbar (1.11.0)
159
- thor (1.2.1)
160
- thread_safe (0.3.6)
161
- tzinfo (1.2.10)
162
- thread_safe (~> 0.1)
163
- unf (0.1.4)
164
- unf_ext
165
- unf_ext (0.0.8.2)
166
- unicode-display_width (2.3.0)
136
+ ruby-progressbar (1.13.0)
137
+ thor (1.3.0)
138
+ tzinfo (2.0.6)
139
+ concurrent-ruby (~> 1.0)
140
+ unicode-display_width (2.5.0)
167
141
  vcr (4.0.0)
168
- webmock (3.14.0)
142
+ webmock (3.19.1)
169
143
  addressable (>= 2.8.0)
170
144
  crack (>= 0.3.2)
171
145
  hashdiff (>= 0.4.0, < 2.0.0)
172
- zeitwerk (2.6.0)
173
146
 
174
147
  PLATFORMS
175
- x86_64-darwin-19
176
- x86_64-linux
148
+ arm64-darwin-22
177
149
 
178
150
  DEPENDENCIES
179
151
  bundler (~> 2.1)
@@ -186,4 +158,4 @@ DEPENDENCIES
186
158
  webmock
187
159
 
188
160
  BUNDLED WITH
189
- 2.2.18
161
+ 2.4.20
data/README.md CHANGED
@@ -4,16 +4,16 @@
4
4
 
5
5
  [![Build Status](https://travis-ci.org/moneytrackio/tezos_client.svg?branch=master)](https://travis-ci.org/moneytrackio/tezos_client)
6
6
 
7
- Tezos Client interacts with Tezos nodes using RPC commands.
7
+ Tezos Client interacts with Tezos nodes using RPC commands.
8
8
 
9
9
  ## Requirements
10
10
 
11
11
  Tezos client requires SmartPy to be installed in order to work properly.
12
- To install it on Linux, you can basically follow the steps coded in travis-script folder.
12
+ To install it on Linux, you can basically follow the steps coded in travis-script folder.
13
13
 
14
- ## Dependency
14
+ ## Dependency
15
15
 
16
- ### michelson-to-micheline
16
+ ### michelson-to-micheline
17
17
  ```bash
18
18
  sudo apt-get install nodejs
19
19
  npm i -g michelson-to-micheline
@@ -37,7 +37,7 @@ npm install -g typescript
37
37
  Add this line to your application's Gemfile:
38
38
 
39
39
  ```ruby
40
- gem 'tezos_client'
40
+ gem "tezos_client"
41
41
  ```
42
42
 
43
43
  And then execute:
@@ -54,13 +54,13 @@ Or install it yourself as:
54
54
 
55
55
  Generate a perfectly random key pair:
56
56
 
57
- ```ruby
58
- client = TezosClient.new
57
+ ```ruby
58
+ client = TezosClient.new
59
59
  key = subject.generate_key
60
60
  expect(key[:address]).to eq "tz1RfnzRopJXH32SSDap2wMYGULBAnmHxdP1"
61
61
  # => {
62
- # secret_key: "edsk4T2fHv5RLL3VSXHz82SQiyFx7vZ4wwtA2u67AvAaw5yqNEvuU2",
63
- # public_key: "edpkuncp7KSVhV57Qg7odwhMFcnAHnNrMppbitBPKBfvdg6fFVeNjr",
62
+ # secret_key: "edsk4T2fHv5RLL3VSXHz82SQiyFx7vZ4wwtA2u67AvAaw5yqNEvuU2",
63
+ # public_key: "edpkuncp7KSVhV57Qg7odwhMFcnAHnNrMppbitBPKBfvdg6fFVeNjr",
64
64
  # address: "tz1a97x7GAvMDyrwwKTLQo131CoidXyUef48"
65
65
  # }
66
66
  ```
@@ -68,11 +68,11 @@ key = subject.generate_key
68
68
  Generate a key pair from a seed and a BIP 44 Path:
69
69
 
70
70
  ```ruby
71
- key = subject.generate_key(wallet_seed:"000102030405060708090a0b0c0d0e0f", path: "m/44'/1729'/0'/0'/0'")
71
+ key = subject.generate_key(wallet_seed: "000102030405060708090a0b0c0d0e0f", path: "m/44'/1729'/0'/0'/0'")
72
72
  expect(key[:address]).to eq "tz1RfnzRopJXH32SSDap2wMYGULBAnmHxdP1"
73
73
  # => {
74
- # secret_key: "edsk4T2fHv5RLL3VSXHz82SQiyFx7vZ4wwtA2u67AvAaw5yqNEvuU2",
75
- # public_key: "edpkuncp7KSVhV57Qg7odwhMFcnAHnNrMppbitBPKBfvdg6fFVeNjr",
74
+ # secret_key: "edsk4T2fHv5RLL3VSXHz82SQiyFx7vZ4wwtA2u67AvAaw5yqNEvuU2",
75
+ # public_key: "edpkuncp7KSVhV57Qg7odwhMFcnAHnNrMppbitBPKBfvdg6fFVeNjr",
76
76
  # address: "tz1a97x7GAvMDyrwwKTLQo131CoidXyUef48"
77
77
  # }
78
78
  ```
@@ -80,12 +80,12 @@ Generate a key pair from a BIP-39 mnemonic sentence and a BIP 44 Path:
80
80
 
81
81
  ```ruby
82
82
  key = subject.generate_key(
83
- mnemonic: "below dove cushion divide future artefact orange congress maple fiscal flower enable",
83
+ mnemonic: "below dove cushion divide future artefact orange congress maple fiscal flower enable",
84
84
  path: "m/44'/1729'/0'/0'/0'")
85
85
  expect(key[:address]).to eq "tz1RfnzRopJXH32SSDap2wMYGULBAnmHxdP1"
86
86
  # => {
87
- # secret_key: "edsk4T2fHv5RLL3VSXHz82SQiyFx7vZ4wwtA2u67AvAaw5yqNEvuU2",
88
- # public_key: "edpkuncp7KSVhV57Qg7odwhMFcnAHnNrMppbitBPKBfvdg6fFVeNjr",
87
+ # secret_key: "edsk4T2fHv5RLL3VSXHz82SQiyFx7vZ4wwtA2u67AvAaw5yqNEvuU2",
88
+ # public_key: "edpkuncp7KSVhV57Qg7odwhMFcnAHnNrMppbitBPKBfvdg6fFVeNjr",
89
89
  # address: "tz1a97x7GAvMDyrwwKTLQo131CoidXyUef48"
90
90
  # }
91
91
  ```
@@ -93,28 +93,28 @@ key = subject.generate_key(
93
93
 
94
94
  ### Transfer funds
95
95
 
96
- ```ruby
97
- client = TezosClient.new
96
+ ```ruby
97
+ client = TezosClient.new
98
98
 
99
99
  client.transfer(
100
100
  amount: 1,
101
101
  from: "tz1ZWiiPXowuhN1UqNGVTrgNyf5tdxp4XUUq",
102
102
  to: "tz1ZWiiPXowuhN1UqNGVTrgNyf5tdxp4XUUq",
103
103
  secret_key: "edsk4EcqupPmaebat5mP57ZQ3zo8NDkwv8vQmafdYZyeXxrSc72pjN"
104
- )
104
+ )
105
105
  ```
106
106
 
107
107
  ### Call a contract
108
108
 
109
109
  ```ruby
110
- client = TezosClient.new
110
+ client = TezosClient.new
111
111
  client.transfer(
112
112
  amount: 5,
113
113
  from: "tz1ZWiiPXowuhN1UqNGVTrgNyf5tdxp4XUUq",
114
114
  to: "KT1MZTrMDPB42P9yvjf7Cy8Lkjxjj4jetbCt",
115
115
  secret_key: "edsk4EcqupPmaebat5mP57ZQ3zo8NDkwv8vQmafdYZyeXxrSc72pjN",
116
116
  parameters: '"pro"'
117
- )
117
+ )
118
118
  ```
119
119
 
120
120
  ### Originate a contract written in SmartPy
@@ -123,8 +123,8 @@ client.transfer(
123
123
  script = File.expand_path("./spec/fixtures/demo.py")
124
124
  source = "tz1ZWiiPXowuhN1UqNGVTrgNyf5tdxp4XUUq"
125
125
  secret_key = "edsk4EcqupPmaebat5mP57ZQ3zo8NDkwv8vQmafdYZyeXxrSc72pjN"
126
- amount = 0
127
- init_params= "MyContract()"
126
+ amount = 0
127
+ init_params = "MyContract()"
128
128
  client = TezosClient.new
129
129
 
130
130
  res = client.originate_contract(
@@ -133,7 +133,7 @@ res = client.originate_contract(
133
133
  script: script,
134
134
  secret_key: secret_key,
135
135
  init_params: init_params
136
- )
136
+ )
137
137
 
138
138
  puts "Origination operation: #{res[:operation_id]}"
139
139
  puts "Contract address: #{res[:originated_contract]}"
@@ -22,9 +22,11 @@ class TezosClient
22
22
 
23
23
  def operation_mgr
24
24
  @operation_mgr ||= OperationMgr.new(
25
- rpc_interface: rpc_interface,
26
- rpc_operation_args: rpc_operation_args,
27
- **operation_options)
25
+ **operation_options.merge(
26
+ rpc_interface: rpc_interface,
27
+ rpc_operation_args: rpc_operation_args,
28
+ )
29
+ )
28
30
  end
29
31
 
30
32
  def operation_options
@@ -5,8 +5,9 @@ class TezosClient
5
5
  def post_initialize(operations:, **args)
6
6
  @raw_operations = operations.map do |operation|
7
7
  operation_kind = operation.delete(:kind)
8
- operation_klass(operation_kind).new(
9
- operation.merge(
8
+ operation_object = operation_klass(operation_kind)
9
+ operation_object.new(
10
+ **operation.merge(
10
11
  from: @args.fetch(:from),
11
12
  rpc_interface: rpc_interface,
12
13
  counter: 0 # will be set by raw_operation_array
@@ -5,9 +5,7 @@ class TezosClient
5
5
  include EncodeUtils
6
6
 
7
7
  def rpc_operation_args
8
- @rpc_operation_args ||= rpc_interface.transaction_operation(
9
- operation_args
10
- )
8
+ @rpc_operation_args ||= rpc_interface.transaction_operation(**operation_args)
11
9
  end
12
10
 
13
11
  private
@@ -17,48 +17,47 @@ class TezosClient
17
17
  end
18
18
 
19
19
  private
20
-
21
- def normalized_type
22
- if type[:args].size > 2
23
- {
24
- prim: "pair",
25
- args: [
26
- type[:args][0],
27
- {
28
- prim: "pair",
29
- args: type[:args][1..]
30
- }
31
- ]
32
- }
33
- else
34
- type
20
+ def normalized_type
21
+ if type[:args].size > 2
22
+ {
23
+ prim: "pair",
24
+ args: [
25
+ type[:args][0],
26
+ {
27
+ prim: "pair",
28
+ args: type[:args][1..nil]
29
+ }
30
+ ]
31
+ }
32
+ else
33
+ type
34
+ end
35
35
  end
36
- end
37
36
 
38
- def expanded_data
39
- if data.is_a?(Array)
40
- {prim: "Pair", args: data}
41
- else
42
- data
37
+ def expanded_data
38
+ if data.is_a?(Array)
39
+ { prim: "Pair", args: data }
40
+ else
41
+ data
42
+ end
43
43
  end
44
- end
45
44
 
46
- def normalized_data
47
- if expanded_data[:args].size > 2
48
- {
49
- prim: "Pair",
50
- args: [
51
- expanded_data[:args][0],
52
- {
53
- prim: "Pair",
54
- args: expanded_data[:args][1..]
55
- }
56
- ]
57
- }
58
- else
59
- expanded_data
45
+ def normalized_data
46
+ if expanded_data[:args].size > 2
47
+ {
48
+ prim: "Pair",
49
+ args: [
50
+ expanded_data[:args][0],
51
+ {
52
+ prim: "Pair",
53
+ args: expanded_data[:args][1..nil]
54
+ }
55
+ ]
56
+ }
57
+ else
58
+ expanded_data
59
+ end
60
60
  end
61
- end
62
61
  end
63
62
  end
64
63
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class TezosClient
4
- VERSION = "1.4.5"
4
+ VERSION = "2.1.0"
5
5
  end
data/lib/tezos_client.rb CHANGED
@@ -97,7 +97,7 @@ class TezosClient
97
97
  **args
98
98
  )
99
99
 
100
- operation = OriginationOperation.new(origination_args)
100
+ operation = OriginationOperation.new(**origination_args)
101
101
  res = broadcast_operation(operation: operation, dry_run: dry_run)
102
102
 
103
103
  res.merge(
@@ -167,7 +167,7 @@ class TezosClient
167
167
  end
168
168
 
169
169
  def build_transaction(dry_run: false, entrypoint:, params:, params_type:, **args)
170
- transfer_args = transfer_args(dry_run: dry_run, entrypoint: entrypoint, params: params, params_type:params_type, **args)
170
+ transfer_args = transfer_args(dry_run: dry_run, entrypoint: entrypoint, params: params, params_type: params_type, **args)
171
171
 
172
172
  transaction = TransactionOperation.new(
173
173
  rpc_interface: rpc_interface,
@@ -181,10 +181,10 @@ class TezosClient
181
181
  transfer_args = transfer_args(dry_run: dry_run,
182
182
  entrypoint: entrypoint,
183
183
  params: params,
184
- params_type:params_type,
184
+ params_type: params_type,
185
185
  **args)
186
186
 
187
- transfer(transfer_args)
187
+ transfer(**transfer_args)
188
188
  end
189
189
 
190
190
  def select_entrypoint(contract_address:, entrypoint:)
@@ -320,7 +320,7 @@ class TezosClient
320
320
 
321
321
  def contract_interface(script)
322
322
  case script.to_s
323
- when /[A-Za-z_\/\-]*.py/
323
+ when /[A-Za-z_\/-]*.py/
324
324
  smartpy_interface
325
325
  when nil
326
326
  raise "script var unset"
data/tezos_client.gemspec CHANGED
@@ -43,10 +43,10 @@ Gem::Specification.new do |spec|
43
43
 
44
44
  spec.add_dependency "active_interaction", ">= 3.8"
45
45
  spec.add_dependency "base58", "~> 0.2.3"
46
- spec.add_dependency "httparty", "~> 0.17.0"
47
- spec.add_dependency "rbnacl", "~> 5.0.0"
48
- spec.add_dependency "rest-client", "~>2.0.0"
49
- spec.add_dependency "activesupport", "~> 6.0.0"
50
- spec.add_dependency "money-tree", "~> 0.10.0"
46
+ spec.add_dependency "httparty", "~> 0.21.0"
47
+ spec.add_dependency "rbnacl", "~> 7.1"
48
+ spec.add_dependency "rest-client", "~> 2.1"
49
+ spec.add_dependency "activesupport", "< 7.1.0"
50
+ spec.add_dependency "money-tree", "~> 0.11.2"
51
51
  spec.add_dependency "bip_mnemonic", "~> 0.0.2"
52
52
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tezos_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.5
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pierre Michard
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2022-09-20 00:00:00.000000000 Z
13
+ date: 2024-02-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -144,70 +144,70 @@ dependencies:
144
144
  requirements:
145
145
  - - "~>"
146
146
  - !ruby/object:Gem::Version
147
- version: 0.17.0
147
+ version: 0.21.0
148
148
  type: :runtime
149
149
  prerelease: false
150
150
  version_requirements: !ruby/object:Gem::Requirement
151
151
  requirements:
152
152
  - - "~>"
153
153
  - !ruby/object:Gem::Version
154
- version: 0.17.0
154
+ version: 0.21.0
155
155
  - !ruby/object:Gem::Dependency
156
156
  name: rbnacl
157
157
  requirement: !ruby/object:Gem::Requirement
158
158
  requirements:
159
159
  - - "~>"
160
160
  - !ruby/object:Gem::Version
161
- version: 5.0.0
161
+ version: '7.1'
162
162
  type: :runtime
163
163
  prerelease: false
164
164
  version_requirements: !ruby/object:Gem::Requirement
165
165
  requirements:
166
166
  - - "~>"
167
167
  - !ruby/object:Gem::Version
168
- version: 5.0.0
168
+ version: '7.1'
169
169
  - !ruby/object:Gem::Dependency
170
170
  name: rest-client
171
171
  requirement: !ruby/object:Gem::Requirement
172
172
  requirements:
173
173
  - - "~>"
174
174
  - !ruby/object:Gem::Version
175
- version: 2.0.0
175
+ version: '2.1'
176
176
  type: :runtime
177
177
  prerelease: false
178
178
  version_requirements: !ruby/object:Gem::Requirement
179
179
  requirements:
180
180
  - - "~>"
181
181
  - !ruby/object:Gem::Version
182
- version: 2.0.0
182
+ version: '2.1'
183
183
  - !ruby/object:Gem::Dependency
184
184
  name: activesupport
185
185
  requirement: !ruby/object:Gem::Requirement
186
186
  requirements:
187
- - - "~>"
187
+ - - "<"
188
188
  - !ruby/object:Gem::Version
189
- version: 6.0.0
189
+ version: 7.1.0
190
190
  type: :runtime
191
191
  prerelease: false
192
192
  version_requirements: !ruby/object:Gem::Requirement
193
193
  requirements:
194
- - - "~>"
194
+ - - "<"
195
195
  - !ruby/object:Gem::Version
196
- version: 6.0.0
196
+ version: 7.1.0
197
197
  - !ruby/object:Gem::Dependency
198
198
  name: money-tree
199
199
  requirement: !ruby/object:Gem::Requirement
200
200
  requirements:
201
201
  - - "~>"
202
202
  - !ruby/object:Gem::Version
203
- version: 0.10.0
203
+ version: 0.11.2
204
204
  type: :runtime
205
205
  prerelease: false
206
206
  version_requirements: !ruby/object:Gem::Requirement
207
207
  requirements:
208
208
  - - "~>"
209
209
  - !ruby/object:Gem::Version
210
- version: 0.10.0
210
+ version: 0.11.2
211
211
  - !ruby/object:Gem::Dependency
212
212
  name: bip_mnemonic
213
213
  requirement: !ruby/object:Gem::Requirement
@@ -335,7 +335,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
335
335
  - !ruby/object:Gem::Version
336
336
  version: '0'
337
337
  requirements: []
338
- rubygems_version: 3.0.3
338
+ rubygems_version: 3.5.5
339
339
  signing_key:
340
340
  specification_version: 4
341
341
  summary: Wrapper to the tezos client.