ethereum 0.4.94 → 0.4.95

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: fae329f487cf4db54176b1d8c390415c127abd9d
4
- data.tar.gz: 82f4ee334d76ee7fc12f573165420b8d4a7b0a0b
3
+ metadata.gz: 1502fb968b2679927ba7eeed4d530eed5f5c472c
4
+ data.tar.gz: a0c3b9176206b3cf970ddb667ee920caa5ff9b74
5
5
  SHA512:
6
- metadata.gz: 6a8c58596771049da1fde35d1e7095a99f2961cfc257965087845f2cc0fc8175c5955735e61a1c6dab05ac206e1ddb43ccbd7d92d3470e0171e6977550aae6d8
7
- data.tar.gz: c01f0ef5e259433d947f3be485aa5c3dfcdabbd6e083c1ff58081f8b8afce9692ab2deaa1bcf43f1e57ced6e530d78b58cc74f2be8addad94e38068d0def353d
6
+ metadata.gz: 6d492e9fe9be3308df96a7c9d3b7650887d4ec34794fa4057db70d0384d34c73d80221139d94d257065914a6b3b317f9061d1b0994115eee94815ec77e40bf3b
7
+ data.tar.gz: 97258e126dfe831b2cdcf394ae21afd585dbd1f4121d5a965eef18c4510d146b95a8589c40a7c27c94c67bf21476c9c478766e7fea9cfbb06e35f5c372aa6838
@@ -4,11 +4,16 @@ module Ethereum
4
4
 
5
5
  attr_accessor :contract_names, :combined_output, :contracts, :libraries
6
6
 
7
- def initialize(location)
7
+ def initialize(location, optimize = false)
8
8
  ENV['ETHEREUM_SOLIDITY_BINARY'] ||= "/usr/local/bin/solc"
9
9
  solidity = ENV['ETHEREUM_SOLIDITY_BINARY']
10
10
  contract_dir = location
11
- compile_command = "#{solidity} --optimize --combined-json abi,bin #{contract_dir}"
11
+ if optimize
12
+ opt_flag = "--optimize"
13
+ else
14
+ opt_flag = ""
15
+ end
16
+ compile_command = "#{solidity} #{opt_flag} --combined-json abi,bin #{contract_dir}"
12
17
  raw_data = `#{compile_command}`
13
18
  data = JSON.parse(raw_data)
14
19
  @contract_names = data["contracts"].keys
@@ -1,3 +1,3 @@
1
1
  module Ethereum
2
- VERSION = "0.4.94"
2
+ VERSION = "0.4.95"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ethereum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.94
4
+ version: 0.4.95
5
5
  platform: ruby
6
6
  authors:
7
7
  - DigixGlobal Pte Ltd (https://dgx.io)