ethereum 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ethereum/contract.rb +4 -4
- data/lib/ethereum/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a05ae654690a826058ea550ff9c8a1455f69b6d
|
4
|
+
data.tar.gz: b330ea17618b1f59f8588f924d7f506ce4a267ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61ffb0a9c3cc798725d910a9dd1566f790ee7edc0e8abf43680ad44cd35f713bcfb4eae3f1d74cc8dc5b287588080097fe431432d0a30cbbebf4c2a20cc8961d
|
7
|
+
data.tar.gz: cdf551d2340dbdbfbe6ad3424a1e28feb8d0b52ccedf5cab8b55c9d749418760b2fc170922af8690a11addb93fe5b4512b5b8784f76af968d3ad582d7acc99d3
|
data/lib/ethereum/contract.rb
CHANGED
@@ -43,7 +43,7 @@ module Ethereum
|
|
43
43
|
end
|
44
44
|
end
|
45
45
|
deploy_payload = deploy_code + deploy_arguments
|
46
|
-
deploytx = connection.send_transaction({from: self.sender, gas: self.gas, gasPrice: self.gas_price, data: deploy_payload})["result"]
|
46
|
+
deploytx = connection.send_transaction({from: self.sender, gas: self.gas, gasPrice: self.gas_price, data: "0x" + deploy_payload})["result"]
|
47
47
|
instance_variable_set("@deployment", Ethereum::Deployment.new(deploytx, connection))
|
48
48
|
end
|
49
49
|
|
@@ -169,10 +169,10 @@ module Ethereum
|
|
169
169
|
arg_types.zip(args).each do |arg|
|
170
170
|
payload << formatter.to_payload(arg)
|
171
171
|
end
|
172
|
-
raw_result = connection.call({to: self.address, from: self.sender, data: payload.join()})["result"]
|
172
|
+
raw_result = connection.call({to: self.address, from: self.sender, data: "0x" + payload.join()})["result"]
|
173
173
|
formatted_result = fun.outputs.collect {|x| x.type }.zip(raw_result.gsub(/^0x/,'').scan(/.{64}/))
|
174
174
|
output = formatted_result.collect {|x| formatter.from_payload(x) }
|
175
|
-
return {data: payload.join(), raw: raw_result, formatted: output}
|
175
|
+
return {data: "0x" + payload.join(), raw: raw_result, formatted: output}
|
176
176
|
end
|
177
177
|
|
178
178
|
define_method call_function_name do |*args|
|
@@ -195,7 +195,7 @@ module Ethereum
|
|
195
195
|
arg_types.zip(args).each do |arg|
|
196
196
|
payload << formatter.to_payload(arg)
|
197
197
|
end
|
198
|
-
txid = connection.send_transaction({to: self.address, from: self.sender, data: payload.join(), gas: self.gas, gasPrice: self.gas_price})["result"]
|
198
|
+
txid = connection.send_transaction({to: self.address, from: self.sender, data: "0x" + payload.join(), gas: self.gas, gasPrice: self.gas_price})["result"]
|
199
199
|
return Ethereum::Transaction.new(txid, self.connection, payload.join(), args)
|
200
200
|
end
|
201
201
|
|
data/lib/ethereum/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ethereum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DigixGlobal Pte Ltd (https://dgx.io)
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|