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 +4 -4
- data/lib/ethereum/project_initializer.rb +7 -2
- data/lib/ethereum/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1502fb968b2679927ba7eeed4d530eed5f5c472c
|
4
|
+
data.tar.gz: a0c3b9176206b3cf970ddb667ee920caa5ff9b74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
data/lib/ethereum/version.rb
CHANGED