ethlite 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 +4 -4
- data/lib/ethlite/version.rb +1 -1
- data/lib/ethlite.rb +20 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a168744cd8aa2f76a80e7536064f8d831f3cbcef3e9148687c7f003403415d97
|
4
|
+
data.tar.gz: 711fa922a92492be4ef33317a552de466a3f4b9e32428d80e6a79d55fc1b3f6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9465a3704789b0c377e7dd7db33f7675bb2230b011f7792c9758bf4b72723b55516e18e594b897d015e4b5326f80359e0c7a5eecaaff1f957c5d9f354a2b827d
|
7
|
+
data.tar.gz: 0fb31c94e3810430d01573dbb951787e34a8824a2d0ba2bc4305ea306c5258260bd189ab8a84b817c1260a6b1d5b978bc99b48a543390eec586c59a56726c583
|
data/lib/ethlite/version.rb
CHANGED
data/lib/ethlite.rb
CHANGED
@@ -1,5 +1,24 @@
|
|
1
1
|
require 'cocos'
|
2
2
|
|
3
|
+
|
4
|
+
### todo/fix:
|
5
|
+
## move .env loader to
|
6
|
+
## cocos - why? why not?
|
7
|
+
def load_env( path='./.env' )
|
8
|
+
if File.exist?( path )
|
9
|
+
puts "==> loading .env settings..."
|
10
|
+
env = read_yaml( path )
|
11
|
+
puts " applying .env settings... (merging into ENV)"
|
12
|
+
pp env
|
13
|
+
env.each do |k,v|
|
14
|
+
ENV[k] ||= v
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
load_env
|
20
|
+
|
21
|
+
|
3
22
|
require 'uri'
|
4
23
|
require 'net/http'
|
5
24
|
require 'net/https'
|
@@ -32,10 +51,9 @@ require_relative 'ethlite/contract'
|
|
32
51
|
|
33
52
|
|
34
53
|
|
35
|
-
|
36
54
|
module Ethlite
|
37
55
|
class Configuration
|
38
|
-
def rpc() @rpc
|
56
|
+
def rpc() @rpc ||= JsonRpc.new( ENV['INFURA_URI'] ); end
|
39
57
|
def rpc=(value)
|
40
58
|
@rpc = if value.is_a?( String )
|
41
59
|
JsonRpc.new( value ) ## auto-wrap in (built-in/simple) jsonrpc client/serverproxy
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ethlite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerald Bauer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-12-
|
11
|
+
date: 2022-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocos
|