etheruby 1.0.3 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/etheruby/contract_method_dsl.rb +3 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 384256862997b691646324f17aae5b7114b30919
|
4
|
+
data.tar.gz: c5de6e19fff5ba0ec1564b3ae91e6e6d561a9b4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 073e28a69ee77267c32ee7db2c5edc44d87ed460913a09d3e47550a06ccd83197815328d722b0fb085dcc0c0bf70f299120182946c9145677e38c9b838d5e6c5
|
7
|
+
data.tar.gz: 81605c560b0bc722580fac91aece06c72cbcab6726b82dcb783a9a2866803b53081fe78146976a768c733689fe7e056fe74954a570ebce9cdb38070867b2719a
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
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
|
-
|
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.
|
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:
|
70
|
+
name: sha3
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
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:
|
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
|