web3 0.1.0 → 0.2.0

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: bd52176e1747819b1205cde47c8640f9d9a219d9
4
- data.tar.gz: af3977a43e4290a6d7a5c74a9bfcf6f7bdcc205a
3
+ metadata.gz: 63c7ce53e8c9e4f4d82e0eac0befdb315a0efe85
4
+ data.tar.gz: eaf548ce0b2a526e5f88bda39d1c32ab38193b3f
5
5
  SHA512:
6
- metadata.gz: 3b7047d3419cac745dc5ac96cb8e5ff3904359859186b1a960a187aeeaafb1dbc46032be158d137eaba354c3e63b03ba50d669605ea26a9137d39ffd38cf958e
7
- data.tar.gz: 122e561162ae24b227314af2ea795a3046d341fc1a6acbf646d82bab5a26d3c06968676a4b0ab66fe74294312bc7e61f017fe0206e1434c130c68a71da5c02e8
6
+ metadata.gz: 74c4dc5fcb2b1177344ca5b65cab9b8fe5f9a6a430db01313e56ad1f500eb805ff32ad7a574079574dd4ce5b4c26729a920e5c62c8816f0c36811b08a0470fa1
7
+ data.tar.gz: 5dd86bc88a83b06effbb724a450c10d930e2e66127268bb070d1eafe20c6b3954eb418ccf11bc9231d856afd43c0e6a5c9010351edc0629d3fe6a4a1c6029374
@@ -64,7 +64,7 @@ module GeneratedWeb3Methods
64
64
  to_decimal response["result"]
65
65
  end
66
66
 
67
- def eth_getBalance(address = @address, block = "latest")
67
+ def eth_getBalance(address, block = "latest")
68
68
  response = do_request("eth_getBalance",[address, block])
69
69
  to_decimal response["result"]
70
70
  end
@@ -74,7 +74,7 @@ module GeneratedWeb3Methods
74
74
  response["result"]
75
75
  end
76
76
 
77
- def eth_getTransactionCount(address = @address, block = "latest")
77
+ def eth_getTransactionCount(address, block = "latest")
78
78
  response = do_request("eth_getTransactionCount",[address, block])
79
79
  to_decimal response["result"]
80
80
  end
@@ -99,12 +99,12 @@ module GeneratedWeb3Methods
99
99
  to_decimal response["result"]
100
100
  end
101
101
 
102
- def eth_getCode(address = @address, block = "latest")
102
+ def eth_getCode(address, block = "latest")
103
103
  response = do_request("eth_getCode",[address, block])
104
104
  response["result"]
105
105
  end
106
106
 
107
- def eth_sign(data, address = @address)
107
+ def eth_sign(address, data)
108
108
  response = do_request("eth_sign",[address, data])
109
109
  response["result"]
110
110
  end
@@ -3,19 +3,14 @@
3
3
  require "httparty"
4
4
  require "json"
5
5
 
6
- #@method = "eth_getBalance"
7
- #@params = ["0x14226aD04625ED4930787D87C82c6c72a5B690a1", "latest"]
8
-
9
6
  class Web3
10
7
  attr_accessor :address, :endpoint, :id, :debug
11
8
 
12
9
  @@jsonrpc = "2.0"
13
10
  @@debug = ENV["ETH_DEBUG"] || false
14
11
 
15
- def initialize( address = nil,
16
- endpoint = ENV["ETH_ENDPOINT"] || "http://localhost:8545",
12
+ def initialize( endpoint = ENV["ETH_ENDPOINT"] || "http://localhost:8545",
17
13
  id = ENV["ETH_DEFAULT_CLIENT_ID"] || 999)
18
- @address = address
19
14
  @endpoint = endpoint
20
15
  @id = id
21
16
  end
@@ -91,7 +86,7 @@ class Web3
91
86
 
92
87
  end
93
88
 
94
- w3 = Web3. new "0x14226aD04625ED4930787D87C82c6c72a5B690a1"
89
+ w3 = Web3. new
95
90
  #w3.address =
96
91
  #puts w3. web3_clientVersion
97
92
  #puts w3. net_version
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: web3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Spike Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-18 00:00:00.000000000 Z
11
+ date: 2017-03-26 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: A client interfact to connect to an Ethereum Web3 JSON RPC service
13
+ description: A client library for connecting to an Ethereum Web3 JSON RPC service
14
14
  email: spikewilliams@gmail.com
15
15
  executables: []
16
16
  extensions: []
@@ -41,5 +41,5 @@ rubyforge_project:
41
41
  rubygems_version: 2.5.1
42
42
  signing_key:
43
43
  specification_version: 4
44
- summary: A client interfact to connect to an Ethereum Web3 JSON RPC service
44
+ summary: A client library for connecting to an Ethereum Web3 JSON RPC service
45
45
  test_files: []