ethereum-contract-abi 0.1.1 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +4 -6
- data/Gemfile.lock +2 -7
- data/ethereum_contract_abi.gemspec +2 -1
- data/lib/ethereum-contract-abi/contract/function.rb +2 -2
- data/lib/ethereum-contract-abi/util.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 993ab91cdd1f2c50018d396aff891c254f442321b9ee9b19f07ada7f38caf4ef
|
4
|
+
data.tar.gz: 6417260c240862283b200f4a846bc44920786260306229504b09685901c8ef1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 646713a51dcf2a8ddf903d6599ed5772542f7ec196d3cc5535dfc5a09c1960b2e73b7ef691ccc50bc5319314f0a82e857e59d07aceb1bde4718c5eceeb959a33
|
7
|
+
data.tar.gz: 1ebd194643ef1f5b8ab31c76499b4e9dfce732481dc57fb30dff126f64505a346c32532bd0dab88689acd008fe8cf3054e7e0b63435768d6cc61b6ac0b10286d
|
data/Gemfile
CHANGED
@@ -4,12 +4,10 @@ source "https://rubygems.org"
|
|
4
4
|
|
5
5
|
gem 'rake'
|
6
6
|
|
7
|
-
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
|
8
|
-
|
9
|
-
gem "rspec", "~> 3.10"
|
10
|
-
|
11
7
|
gem "json", "~> 2.5"
|
12
8
|
|
13
|
-
|
14
|
-
|
9
|
+
gem 'keccak256'
|
10
|
+
|
11
|
+
group :development, :test do
|
12
|
+
gem "rspec", "~> 3.10"
|
15
13
|
end
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,9 @@
|
|
1
|
-
GIT
|
2
|
-
remote: https://github.com/evtaylor/sha3-pure-ruby.git
|
3
|
-
revision: c3e764863f4926db33308d42e0fe7ec8ce3b72ce
|
4
|
-
specs:
|
5
|
-
sha3-pure-ruby (1.0.0)
|
6
|
-
|
7
1
|
GEM
|
8
2
|
remote: https://rubygems.org/
|
9
3
|
specs:
|
10
4
|
diff-lcs (1.4.4)
|
11
5
|
json (2.5.1)
|
6
|
+
keccak256 (2.0.1)
|
12
7
|
rake (13.0.3)
|
13
8
|
rspec (3.10.0)
|
14
9
|
rspec-core (~> 3.10.0)
|
@@ -29,9 +24,9 @@ PLATFORMS
|
|
29
24
|
|
30
25
|
DEPENDENCIES
|
31
26
|
json (~> 2.5)
|
27
|
+
keccak256
|
32
28
|
rake
|
33
29
|
rspec (~> 3.10)
|
34
|
-
sha3-pure-ruby!
|
35
30
|
|
36
31
|
BUNDLED WITH
|
37
32
|
2.2.3
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'ethereum-contract-abi'
|
3
|
-
s.version = '0.1.
|
3
|
+
s.version = '0.1.3'
|
4
4
|
s.summary = "Ethereum contract ABI encoder and decoder"
|
5
5
|
s.description = "A library for interacting with Ethereum smart contracts via the Contract Application Binary Interface (ABI)"
|
6
6
|
s.authors = ["Evan Taylor"]
|
@@ -12,4 +12,5 @@ Gem::Specification.new do |s|
|
|
12
12
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
|
13
13
|
end
|
14
14
|
s.require_paths = ["lib"]
|
15
|
+
s.add_runtime_dependency 'keccak256', '~> 2.0.1'
|
15
16
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'digest'
|
2
2
|
require 'openssl'
|
3
|
-
require '
|
3
|
+
require 'keccak256'
|
4
4
|
require 'ethereum-contract-abi/util'
|
5
5
|
require 'ethereum-contract-abi/decoders/function_decoder'
|
6
6
|
|
@@ -24,7 +24,7 @@ module EthereumContractABI
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def method_id
|
27
|
-
hash = [Digest::
|
27
|
+
hash = [Digest::Keccak256.new.hexdigest(signature)].pack("H*")
|
28
28
|
hash.slice(0..3)
|
29
29
|
end
|
30
30
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ethereum-contract-abi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evan Taylor
|
@@ -9,7 +9,21 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
date: 2021-06-05 00:00:00.000000000 Z
|
12
|
-
dependencies:
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: keccak256
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.0.1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.0.1
|
13
27
|
description: A library for interacting with Ethereum smart contracts via the Contract
|
14
28
|
Application Binary Interface (ABI)
|
15
29
|
email: evan@evantaylor.ca
|