etherlite 0.2.3 → 0.2.4

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: 3d9836bec35f181ec6d32abafcd7a3a5dde485e4
4
- data.tar.gz: 98977ede760cfcb7dcf32910d79acffef187b89e
3
+ metadata.gz: 18f870e66bfef56ad2be8131e3f82b094ba818af
4
+ data.tar.gz: 6699c8e16b0a0e97483c38d4cf6bd78f40c59350
5
5
  SHA512:
6
- metadata.gz: 12c60f7ad8b8a4556171db68c495a49ac4f72a8f10a0a3a64321db3170bbf05ea992a5bcbf40c89b1ee9054092eef7818aa3bf49fa6349c9e872720e9e9f3f2a
7
- data.tar.gz: b36ebbd7fb4d09d33bad6129eb1d42ffe6b1588a20fbe90cf7ffe193d0cf4d20c1fb49d388897741ad3ad93d08e55948fc51e95a1c5b8c046d99bf3f741c7017
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, 'unlinked_binary', unlinked_binary
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 unlinked_binary
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.unlinked_binary
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.binary
22
- @binary ||= begin
23
- if /__[^_]+_+/ === unlinked_binary
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
- unlinked_binary
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 = binary
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))
@@ -1,3 +1,3 @@
1
1
  module Etherlite
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
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.3
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-05-16 00:00:00.000000000 Z
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.4
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