ethlite 0.3.2 → 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/README.md +3 -3
- data/Rakefile +1 -1
- data/lib/ethlite/version.rb +2 -2
- data/lib/ethlite.rb +20 -2
- metadata +3 -3
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/README.md
CHANGED
@@ -4,8 +4,8 @@
|
|
4
4
|
ethlite - light-weight machinery to query / call ethereum (blockchain contract) services via json-rpc (incl. tuple support)
|
5
5
|
|
6
6
|
|
7
|
-
* home :: [github.com/
|
8
|
-
* bugs :: [github.com/
|
7
|
+
* home :: [github.com/rubycocos/blockchain](https://github.com/rubycocos/blockchain)
|
8
|
+
* bugs :: [github.com/rubycocos/blockchain/issues](https://github.com/rubycocos/blockchain/issues)
|
9
9
|
* gem :: [rubygems.org/gems/ethlite](https://rubygems.org/gems/ethlite)
|
10
10
|
* rdoc :: [rubydoc.info/gems/ethlite](http://rubydoc.info/gems/ethlite)
|
11
11
|
|
@@ -16,7 +16,7 @@ ethlite - light-weight machinery to query / call ethereum (blockchain contract)
|
|
16
16
|
|
17
17
|
### Step 0: Setup JSON RPC Client
|
18
18
|
|
19
|
-
Let's use the simple (built-in) JSON RPC client.
|
19
|
+
Let's use the simple (built-in) JSON RPC client.
|
20
20
|
Get the eth node uri via the INFURA_URI enviroment variable / key e.g. `https://mainnet.infura.io/v3/<YOUR_KEY_HERE>`:
|
21
21
|
|
22
22
|
```ruby
|
data/Rakefile
CHANGED
@@ -9,7 +9,7 @@ Hoe.spec 'ethlite' do
|
|
9
9
|
self.summary = "ethlite - light-weight machinery to query / call ethereum (blockchain contract) services via json-rpc (incl. tuple support)"
|
10
10
|
self.description = summary
|
11
11
|
|
12
|
-
self.urls = { home: 'https://github.com/
|
12
|
+
self.urls = { home: 'https://github.com/rubycocos/blockchain' }
|
13
13
|
|
14
14
|
self.author = 'Gerald Bauer'
|
15
15
|
self.email = 'wwwmake@googlegroups.com'
|
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
|
+
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
|
@@ -108,7 +108,7 @@ files:
|
|
108
108
|
- lib/ethlite/utils.rb
|
109
109
|
- lib/ethlite/version.rb
|
110
110
|
- lib/jsonrpc/jsonrpc.rb
|
111
|
-
homepage: https://github.com/
|
111
|
+
homepage: https://github.com/rubycocos/blockchain
|
112
112
|
licenses:
|
113
113
|
- Public Domain
|
114
114
|
metadata: {}
|