ethlite 0.2.1 → 0.2.2
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/ethlite/version.rb +1 -1
- data/lib/ethlite.rb +19 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bdacaafee691ecb72746721479d637e03b211c4afbcde0c4c938edc50695ccf8
|
|
4
|
+
data.tar.gz: 607cb3eda84667009ac105e998afb56a4af0dfa23dcc0a47264623e8e3409c21
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 459910398810dfa9ff9dab030feb0a185a03afa5d440656cc37ef4479dd54f49e0cd16b9c7e018b72d3a9507c109deb01e234f408e5b13131f14d044701868be
|
|
7
|
+
data.tar.gz: 6783748547fa38964c62f695df60d4d5f8533fceb650c212e4ae0d6f20619cd9f42dea747f1a0c3bc28512b336998cde5c80fce78e4c3445a6e3723e05a5c54d
|
data/lib/ethlite/version.rb
CHANGED
data/lib/ethlite.rb
CHANGED
|
@@ -36,6 +36,25 @@ require_relative 'ethlite/contract'
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
|
|
39
|
+
|
|
40
|
+
module Ethlite
|
|
41
|
+
class Configuration
|
|
42
|
+
def rpc() @rpc || Rpc.new( ENV['INFURA_URI'] ); end
|
|
43
|
+
def rpc=(value) @rpc = value; end
|
|
44
|
+
end # class Configuration
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
## lets you use
|
|
48
|
+
## Ethlite.configure do |config|
|
|
49
|
+
## config.rpc = Ethlite::Rpc.new( ENV['INFURA_URI'] )
|
|
50
|
+
## end
|
|
51
|
+
def self.configure() yield( config ); end
|
|
52
|
+
def self.config() @config ||= Configuration.new; end
|
|
53
|
+
end # module Ethlite
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
39
58
|
## add convenience alternate spelling
|
|
40
59
|
EthLite = Ethlite
|
|
41
60
|
|