etherlite 0.2.3 → 0.2.4
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 +4 -4
- data/lib/etherlite/commands/abi/load_contract.rb +2 -2
- data/lib/etherlite/contract/base.rb +6 -6
- data/lib/etherlite/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 18f870e66bfef56ad2be8131e3f82b094ba818af
|
|
4
|
+
data.tar.gz: 6699c8e16b0a0e97483c38d4cf6bd78f40c59350
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dfe39a5194f3fe5ea70c73078f598591605713ad531087bc94b38569e3d2ab7d0b637821a609b4badd3d55094e69c2297479319829c5ad01840f9bebb543db40
|
|
7
|
+
data.tar.gz: d2b198d536856d28cf7f94c407b1368ba0bf657baed0cbabfaed8c522871d214ca596df2c778c785f79dcbe72074539f9e4b1a9ae776c1864259f5e95fd92ac8
|
|
@@ -3,7 +3,7 @@ module Etherlite::Abi
|
|
|
3
3
|
def perform
|
|
4
4
|
klass = Class.new(Etherlite::Contract::Base)
|
|
5
5
|
|
|
6
|
-
define_class_getter klass, '
|
|
6
|
+
define_class_getter klass, 'unlinked_bytecode', unlinked_bytecode
|
|
7
7
|
|
|
8
8
|
abi_definitions.each do |definition|
|
|
9
9
|
case definition['type']
|
|
@@ -24,7 +24,7 @@ module Etherlite::Abi
|
|
|
24
24
|
|
|
25
25
|
private
|
|
26
26
|
|
|
27
|
-
def
|
|
27
|
+
def unlinked_bytecode
|
|
28
28
|
@artifact['unlinked_binary'] || @artifact['bytecode'] || ''
|
|
29
29
|
end
|
|
30
30
|
|
|
@@ -10,7 +10,7 @@ module Etherlite::Contract
|
|
|
10
10
|
@events ||= []
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
def self.
|
|
13
|
+
def self.unlinked_bytecode
|
|
14
14
|
'0x0'
|
|
15
15
|
end
|
|
16
16
|
|
|
@@ -18,13 +18,13 @@ module Etherlite::Contract
|
|
|
18
18
|
nil
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
-
def self.
|
|
22
|
-
@
|
|
23
|
-
if /__[^_]+_
|
|
21
|
+
def self.bytecode
|
|
22
|
+
@bytecode ||= begin
|
|
23
|
+
if /__[^_]+_+/.match? unlinked_bytecode
|
|
24
24
|
raise UnlinkedContractError, 'compiled contract contains unresolved library references'
|
|
25
25
|
end
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
unlinked_bytecode
|
|
28
28
|
end
|
|
29
29
|
end
|
|
30
30
|
|
|
@@ -32,7 +32,7 @@ module Etherlite::Contract
|
|
|
32
32
|
options = _args.last.is_a?(Hash) ? _args.pop : {}
|
|
33
33
|
as = options[:as] || options[:client].try(:default_account) || Etherlite.default_account
|
|
34
34
|
|
|
35
|
-
tx_data =
|
|
35
|
+
tx_data = options.fetch(:bytecode, bytecode)
|
|
36
36
|
tx_data += constructor.encode(_args) unless constructor.nil?
|
|
37
37
|
|
|
38
38
|
as.send_transaction({ data: tx_data }.merge(options))
|
data/lib/etherlite/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: etherlite
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ignacio Baixas
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-11-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: digest-sha3
|
|
@@ -249,7 +249,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
249
249
|
version: '0'
|
|
250
250
|
requirements: []
|
|
251
251
|
rubyforge_project:
|
|
252
|
-
rubygems_version: 2.6.
|
|
252
|
+
rubygems_version: 2.6.14.1
|
|
253
253
|
signing_key:
|
|
254
254
|
specification_version: 4
|
|
255
255
|
summary: Ethereum integration for ruby on rails
|