etherlite 0.4.0 → 0.4.1

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
  SHA256:
3
- metadata.gz: bbd613d95d4aaec97652278de22e3599754a18979185f8a0eeaea0ef6db3e3c4
4
- data.tar.gz: c21fe17680a4b4cc82eceedbd413df822da0c9475b9ee4c58f9ba124a481d82e
3
+ metadata.gz: e0b83a0a08768dcd1ba56ddc3506b02764f191a3a4c3c5fb2972075090bea6cc
4
+ data.tar.gz: d4de2edde2f449cdc3903d5efdee40f22bd76d692517bf48bc92a1138163ce92
5
5
  SHA512:
6
- metadata.gz: 202253e8cea38ae5b51977e130e442cdcc5fb4563f93dd5da802e6dbc8e86e154e08a4b13fc50f05b17c17ba4541d8a9adb6406aee7fb05f79e90fde8e8da594
7
- data.tar.gz: 1cbca94d66686e94db2ff819f4d21f6c64035a6004ab56d9d641ab02895ea8dbdb00495a120f4813c75cf00a9d1e0d4efe8e1655f2d23cb907615c0cf60102f6
6
+ metadata.gz: a48e9d0e929cc80ccf7446ffc6de6135230e3a1df8fc943d1d426abd8f03c4e66332ca9425163bf9425712547124be26e63962f2d4541eb7b5791e3a5932677d
7
+ data.tar.gz: 1f5b1cbc90168849faac07a2d25901795d8e569067f105eeaded88ed5ac970990f5ce6cb2e4bb563dbe313b7519b95a5c09754e16d5b82391e1949365fbfb64a
@@ -81,9 +81,21 @@ module Etherlite::Abi
81
81
  )
82
82
  end,
83
83
  (_definition['outputs'] || []).map { |input| LoadType.for signature: input['type'] },
84
- _definition.fetch('payable', false),
85
- _definition.fetch('constant', false)
84
+ function_payable?(_definition),
85
+ function_constant?(_definition)
86
86
  )
87
87
  end
88
+
89
+ def function_payable?(_definition)
90
+ return _definition['payable'] if _definition.key? 'payable'
91
+
92
+ _definition['stateMutability'] == 'payable'
93
+ end
94
+
95
+ def function_constant?(_definition)
96
+ return _definition['constant'] if _definition.key? 'constant'
97
+
98
+ _definition['stateMutability'] == 'pure' || _definition['stateMutability'] == 'view'
99
+ end
88
100
  end
89
101
  end
@@ -1,3 +1,3 @@
1
1
  module Etherlite
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
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.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ignacio Baixas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-05-05 00:00:00.000000000 Z
11
+ date: 2021-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: digest-sha3