etherlite 0.2.1 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b26ef9659e1ea23ddedd3959500bcf341cde07b4
4
- data.tar.gz: 05edd2b33d17ceb66a7461d8e6d9f9dc06935057
3
+ metadata.gz: ca6ccaaf22a1079aa68d7d157900b271bed5e1db
4
+ data.tar.gz: 1d208e7063d99de949f7b80a3eefdffb799ee840
5
5
  SHA512:
6
- metadata.gz: 962d4b0f389a0824a48de67397cb69f96d8f46da2be0d9a1551f320e2a13d8f1a1b4234594d54347d0b269adbd61ecbb8d2d570c07533987560117a644da2b4c
7
- data.tar.gz: 0196cf0b26cd6ad397bee4f1d24b2dab1c512fc7de247fbebc860d2bbb5dfd16df141f04f1b68a9b08a03eb7431eac1d625fd9d7189da1c3e12abe7eac34aa84
6
+ metadata.gz: 18451599c309267ee0fe65da4d04ff653ada9673ed9a21381bd27c7d5aa1333cdaed95a1d7d21d3e911d743490cf7f7728fb5fd7d4e6ccbc03ea02ff08578609
7
+ data.tar.gz: a6bf702b4f531e738651060de080ae097e67328783164c6509117fb49c3c76727e9b8c1784eec283f34c5586b3cde2d88cb24643d00ae32feb31bebfbce66313
@@ -15,7 +15,7 @@ module Etherlite
15
15
  data: _options.fetch(:data, ''),
16
16
  gas_limit: _options.fetch(:gas, 90_000),
17
17
  gas_price: _options.fetch(:gas_price, gas_price),
18
- to: Etherlite::Utils.encode_address_param(_options[:to]),
18
+ to: (Etherlite::Utils.encode_address_param(_options[:to]) if _options.key?(:to)),
19
19
  nonce: nonce
20
20
  )
21
21
 
@@ -18,7 +18,13 @@ module Etherlite
18
18
  end
19
19
 
20
20
  def succeeded?
21
- !removed? && @receipt['status'] == 1
21
+ status == 1
22
+ end
23
+
24
+ def status
25
+ return nil if removed?
26
+ status = @receipt['status']
27
+ status.is_a?(String) ? Utils.hex_to_uint(status) : status
22
28
  end
23
29
 
24
30
  def mined?
@@ -1,3 +1,3 @@
1
1
  module Etherlite
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
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.2.1
4
+ version: 0.2.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: 2018-02-01 00:00:00.000000000 Z
11
+ date: 2018-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: digest-sha3