ethereum.rb 2.1.6 → 2.1.7

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: 898d4aeb9ae6f458e760cb4919f446754769b016
4
- data.tar.gz: 6b65b54b420c60d7c29896364d5b8c7c24d2c9a7
3
+ metadata.gz: e53cfb3e0ec04452936380a3efe4959598ee1551
4
+ data.tar.gz: 86a0d4366ca9796e9d9efa1b1f5bb90c89728522
5
5
  SHA512:
6
- metadata.gz: fe942cf4b22b2ec158631e0905c27c022e29d2152893df0eb3ce1e7c1937e665117c8e69ff3c2b788899bc2708e49a9be00dd899a0146b0e05f9fdef7872c68c
7
- data.tar.gz: cfaf4f5b0623a181755c26578ba5d3b288661a0496f22816d181b90bd5cb01c5fce2c40abd5ec31c2f2c21f961ee2bce0525b1def1b5325cd4b3e11c057d5ee9
6
+ metadata.gz: e9d8cc30f9d56fec26463ba96040f687db1872e69c8c343c6e6d25aecc6d8e8289cb7ce5207e8d0eade0d70a07889955a92777f41cc0daf4580d1d67e7c0009d
7
+ data.tar.gz: 402a8b9741e1700b2561b76c1217c6a22e7b53c2340665bdf469895381303c94168e836801f9d74e0ab406aad53ed5d38770475f8345fe82066581260c74e796
@@ -3,7 +3,7 @@ language: ruby
3
3
  rvm:
4
4
  - 2.3.1
5
5
  env:
6
- - PARITY="1.6.5"
6
+ - PARITY="1.6.10"
7
7
  cache:
8
8
  bundler: true
9
9
  directories:
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ethereum Ruby library - Ethereum.rb
2
2
 
3
- [![Build Status](https://travis-ci.org/marekkirejczyk/ethereum.rb.svg?branch=master)](https://travis-ci.org/marekkirejczyk/ethereum.rb) [![security](https://hakiri.io/github/NullVoxPopuli/MetaHash/master.svg)](https://hakiri.io/github/NullVoxPopuli/MetaHash/master) [![Dependency Status](https://gemnasium.com/marekkirejczyk/ethereum.rb.svg)](https://gemnasium.com/marekkirejczyk/ethereum.rb) [![Code Climate](https://codeclimate.com/github/marekkirejczyk/ethereum.rb/badges/gpa.svg)](https://codeclimate.com/github/marekkirejczyk/ethereum.rb)
3
+ [![Build Status](https://travis-ci.org/EthWorks/ethereum.rb.svg?branch=master)](https://travis-ci.org/EthWorks/ethereum.rb) [![security](https://hakiri.io/github/NullVoxPopuli/MetaHash/master.svg)](https://hakiri.io/github/NullVoxPopuli/MetaHash/master) [![Dependency Status](https://gemnasium.com/marekkirejczyk/ethereum.rb.svg)](https://gemnasium.com/marekkirejczyk/ethereum.rb) [![Code Climate](https://codeclimate.com/github/marekkirejczyk/ethereum.rb/badges/gpa.svg)](https://codeclimate.com/github/marekkirejczyk/ethereum.rb)
4
4
 
5
5
  The goal of ethereum.rb is to make interacting with ethereum blockchain from ruby as fast and easy as possible (but not easier!).
6
6
 
@@ -242,7 +242,7 @@ contract.gas_price = 24_000_000_000
242
242
 
243
243
  ## Utils
244
244
 
245
- ### Url helpers for rails applciations
245
+ ### Url helpers for rails applications
246
246
 
247
247
  Often in the application you want to link to blockchain explorer. This can be problematic if you want links to work with different networks (ropsten, mainnet, kovan) depending on environment you're working on.
248
248
  Following helpers will generate link according to network connected:
@@ -253,7 +253,7 @@ link_to_address("See the wallet", "0xE08cdFD4a1b2Ef5c0FC193877EC6A2Bb8f8Eb373")
253
253
  ```
254
254
  They use [etherscan.io](http://etherscan.io/) as a blockexplorer.
255
255
 
256
- Note: Helpers work in rails environment only.
256
+ Note: Helpers work in rails environment only, works with rails 5.0+.
257
257
 
258
258
  ### Utils rake tasks
259
259
 
@@ -14,4 +14,4 @@ echo "Setuping parity..."
14
14
  mkdir -p ~/.local/share/io.parity.ethereum/keys/DevelopmentChain
15
15
  chown -R travis:travis ~/.local/share/io.parity.ethereum
16
16
  echo $devwallet > ~/.local/share/io.parity.ethereum/keys/DevelopmentChain/UTC--2017-03-31T14-19-47Z--c05e3b8b-18aa-ab4f-c5ec-09f555bf5357
17
- echo $devpassword > ~/.devpass
17
+ echo $devpassword > ~/.devpass
@@ -69,7 +69,7 @@ module Ethereum
69
69
  end
70
70
 
71
71
  def get_chain
72
- @net_version ||= net_version["result"].to_i(16)
72
+ @net_version ||= net_version["result"].to_i
73
73
  end
74
74
 
75
75
  def get_nonce(address)
@@ -1,3 +1,5 @@
1
+ require 'forwardable'
2
+
1
3
  module Ethereum
2
4
  class Contract
3
5
 
@@ -2,8 +2,8 @@ module Ethereum
2
2
  module ExplorerUrlHelper
3
3
 
4
4
  CHAIN_PREFIX = {
5
- 23 => "no-explorer-for-devmode.",
6
- 66 => "kovan.",
5
+ 17 => "no-explorer-for-devmode.",
6
+ 42 => "kovan.",
7
7
  3 => "ropsten."
8
8
  }
9
9
 
@@ -20,4 +20,4 @@ module Ethereum
20
20
  "https://#{prefix}etherscan.io/#{suffix}"
21
21
  end
22
22
  end
23
- end
23
+ end
@@ -10,7 +10,9 @@ module Ethereum
10
10
  "#{ENV['HOME']}/Library/Application\ Support/io.parity.ethereum/jsonrpc.ipc",
11
11
  "#{ENV['HOME']}/.local/share/parity/jsonrpc.ipc",
12
12
  "#{ENV['HOME']}/.local/share/io.parity.ethereum/jsonrpc.ipc",
13
- "#{ENV['HOME']}/AppData/Roaming/Parity/Ethereum/jsonrpc.ipc"
13
+ "#{ENV['HOME']}/AppData/Roaming/Parity/Ethereum/jsonrpc.ipc",
14
+ "#{ENV['HOME']}/.ethereum/geth.ipc",
15
+ "#{ENV['HOME']}/.ethereum/testnet/geth.ipc"
14
16
  ]
15
17
 
16
18
  def initialize(ipcpath = nil, log = true)
@@ -20,7 +22,8 @@ module Ethereum
20
22
  end
21
23
 
22
24
  def self.default_path(paths = IPC_PATHS)
23
- paths.select { |path| File.exist?(path) }.first || ""
25
+ path = paths.select { |path| File.exist?(path) }.first
26
+ path || raise("Ipc file not found. Please pass in the file path explicitly to IpcClient initializer")
24
27
  end
25
28
 
26
29
  def send_single(payload)
@@ -46,4 +49,4 @@ module Ethereum
46
49
  return result.sort_by! { |c| c['id'] }
47
50
  end
48
51
  end
49
- end
52
+ end
@@ -2,7 +2,7 @@ require 'tmpdir'
2
2
  require 'open3'
3
3
 
4
4
  module Ethereum
5
- class CompilationError < StandardError;
5
+ class CompilationError < StandardError;
6
6
  def initialize(msg)
7
7
  super
8
8
  end
@@ -10,7 +10,7 @@ module Ethereum
10
10
 
11
11
  class Solidity
12
12
 
13
- OUTPUT_REGEXP = /======= (\S*):(\S*) =======\s*Binary:\s*(\S*)\sContract JSON ABI\s(\S*)/
13
+ OUTPUT_REGEXP = /======= (\S*):(\S*) =======\s*Binary:\s*(\S*)\s*Contract JSON ABI\s*(\S*)/
14
14
 
15
15
  def initialize(bin_path = "solc")
16
16
  @bin_path = bin_path
@@ -28,13 +28,13 @@ module Ethereum
28
28
  result
29
29
  end
30
30
 
31
- private
31
+ private
32
32
  def execute_solc(filename)
33
33
  cmd = "#{@bin_path} #{@args} '#{filename}'"
34
34
  out, stderr, status = Open3.capture3(cmd)
35
35
  raise SystemCallError, "Unanable to run solc compliers" if status.exitstatus == 127
36
36
  raise CompilationError, stderr unless status.exitstatus == 0
37
37
  out
38
- end
39
- end
40
- end
38
+ end
39
+ end
40
+ end
@@ -1,3 +1,3 @@
1
1
  module Ethereum
2
- VERSION = "2.1.6"
2
+ VERSION = "2.1.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ethereum.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.6
4
+ version: 2.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marek Kirejczyk
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-04 00:00:00.000000000 Z
11
+ date: 2017-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler