ethereum 0.4.37 → 0.4.38

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
  SHA1:
3
- metadata.gz: cfd525de7fc31db259cdc41bcf64888e04246042
4
- data.tar.gz: 0509aa5518988eca4df6e6e734bf4f271a81d501
3
+ metadata.gz: c47d8e41d8cadd766be88fc11e5b7dea7e0b2f5a
4
+ data.tar.gz: c44e0d190a7654585d06e2f6ddb1b844fc8be4c4
5
5
  SHA512:
6
- metadata.gz: 99ea33ff270853cb36e2dc5064c7e136ff071c96dd95d7ea07256431b03b486d982b6d85ba8200ef261fd5d6d26ba2fe2bbdd62d64b10991941eda3ee5dc0675
7
- data.tar.gz: 7eb07c33c6bbe09b45b8fb97d5cd99cfc34e1dd085f9ce1fef06822a489c193f9771673f5ebd0e316b12460c6c31a31e122ced0812797c7dc862722ac60da037
6
+ metadata.gz: efb67fbde82e4808424770e28735e107b55298a113690a5595f0ccef09677040c38a61c2c78a5de0ff2c93d3f76982e0520694c21674d3ee5b0e969f06096096
7
+ data.tar.gz: 14143bb3e0c460ea7930cf57434dbc6136322b7279ec54156cd0180535df910d65c68018ba550e94561772c2f0280f81994ce7d51f19a106c7602191acf61d8d
@@ -29,6 +29,13 @@ module Ethereum
29
29
  tether: 1000000000000000000000000000000
30
30
  }
31
31
 
32
+ def valid_address?(address_string)
33
+ address = address_string.gsub(/^0x/,'')
34
+ return false if address == "0000000000000000000000000000000000000000"
35
+ return false if address.length != 40
36
+ return !(address.match(/[0-9a-fA-F]+/).nil?)
37
+ end
38
+
32
39
  def from_bool(boolval)
33
40
  boolval ? "1" : "0"
34
41
  end
@@ -1,3 +1,3 @@
1
1
  module Ethereum
2
- VERSION = "0.4.37"
2
+ VERSION = "0.4.38"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ethereum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.37
4
+ version: 0.4.38
5
5
  platform: ruby
6
6
  authors:
7
7
  - DigixGlobal Pte Ltd (https://dgx.io)