etheruby 1.0.3 → 1.0.5

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: 736b3c055a20422fe6416b91900cf795d1c3cb63
4
- data.tar.gz: 97846dc4caef9f98a1e93bfde88eaeceb26e63ee
3
+ metadata.gz: 384256862997b691646324f17aae5b7114b30919
4
+ data.tar.gz: c5de6e19fff5ba0ec1564b3ae91e6e6d561a9b4e
5
5
  SHA512:
6
- metadata.gz: 937bc1b89ab775c4440b9d64b70bb1e58e2ad22fa7a96be2c8a2e8dc506c3b8d23ea361e61dfbd2816acba09f17342b21b0d9116fde3bdaf16ef979c5ef9c60c
7
- data.tar.gz: d1b72dfe8e1292f7c7c811f51b2081422ef88ef1be27b8c6e52cd58a1045a2dabdd46ebb3d391c99c0f706d60fd1961843a68b3ee22a83bf8ad7fc252c9b8977
6
+ metadata.gz: 073e28a69ee77267c32ee7db2c5edc44d87ed460913a09d3e47550a06ccd83197815328d722b0fb085dcc0c0bf70f299120182946c9145677e38c9b838d5e6c5
7
+ data.tar.gz: 81605c560b0bc722580fac91aece06c72cbcab6726b82dcb783a9a2866803b53081fe78146976a768c733689fe7e056fe74954a570ebce9cdb38070867b2719a
@@ -1,4 +1,4 @@
1
- require 'digest/sha3'
1
+ require 'sha3'
2
2
 
3
3
  module Etheruby
4
4
 
@@ -49,7 +49,8 @@ module Etheruby
49
49
  def validate!
50
50
  data[:params] = [] unless data.has_key? :params
51
51
  signature = "#{@data[:name]}(#{data[:params].join(',')})"
52
- data[:signature] = "0x#{Digest::SHA3.hexdigest(signature,256)[0..7]}"
52
+ hashed_signature = ::SHA3::Digest.new(:sha256).hexdigest(signature)
53
+ data[:signature] = "0x#{hashed_signature[0..7]}"
53
54
  data
54
55
  end
55
56
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: etheruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jérémy SEBAN
@@ -67,19 +67,19 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.12'
69
69
  - !ruby/object:Gem::Dependency
70
- name: digest-sha3
70
+ name: sha3
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '1.1'
75
+ version: 0.2.6
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '1.1'
82
+ version: 0.2.6
83
83
  description: Etheruby is a library including a client for the JSON-RPC API and a Object-Contract
84
84
  Mapper to interact with smart-contracts.
85
85
  email: jseban@francechain.fr