ethlite 0.3.2 → 0.4.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a543bc0ff77f147cf1d33e68db8b72345f705401061348c1c6ce7b96c410bd43
4
- data.tar.gz: ccc325256399a94b4c3ade2292b04592305e14d2ca70c2fe8a203ab2f185f029
3
+ metadata.gz: a168744cd8aa2f76a80e7536064f8d831f3cbcef3e9148687c7f003403415d97
4
+ data.tar.gz: 711fa922a92492be4ef33317a552de466a3f4b9e32428d80e6a79d55fc1b3f6d
5
5
  SHA512:
6
- metadata.gz: fac7091c8758f9df8a43fff5b61ce03d2a06e9d47a39d592e5da797ef2aa52ca24bc29f582e47624728d9129e2cd511a51be9b426443d7a6155f71975057a589
7
- data.tar.gz: d9ec99feb5c27b6d108ea6cfc0cc08e30b88d1a883a009f92b361732fbc75b409e47681b9198b3bb343626a04e8b35278ac6db89bd87569128956cd52462b3b1
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/pixelartexchange/artbase](https://github.com/pixelartexchange/artbase)
8
- * bugs :: [github.com/pixelartexchange/artbase/issues](https://github.com/pixelartexchange/artbase/issues)
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/pixelartexchange/artbase' }
12
+ self.urls = { home: 'https://github.com/rubycocos/blockchain' }
13
13
 
14
14
  self.author = 'Gerald Bauer'
15
15
  self.email = 'wwwmake@googlegroups.com'
@@ -2,8 +2,8 @@
2
2
 
3
3
  module Ethlite
4
4
  MAJOR = 0
5
- MINOR = 3
6
- PATCH = 2
5
+ MINOR = 4
6
+ PATCH = 1
7
7
  VERSION = [MAJOR,MINOR,PATCH].join('.')
8
8
 
9
9
  def self.version
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 || JsonRpc.new( ENV['INFURA_URI'] ); end
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.3.2
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-08 00:00:00.000000000 Z
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/pixelartexchange/artbase
111
+ homepage: https://github.com/rubycocos/blockchain
112
112
  licenses:
113
113
  - Public Domain
114
114
  metadata: {}