cronos_chain_scanner 0.1.5 → 0.1.8

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: cb7778216c87b747047f78dfde57fda37a3b6519f842f2f0177cc30d86ed82a1
4
- data.tar.gz: cc16ebf2c3ab529362f937da2de2e17ec68a83ddc2a776c36ea5467df19fbfa0
3
+ metadata.gz: 7f0ae3ed362d434f2bc5525fc2770989ed79bb862e7113a4942abc201fdab0ea
4
+ data.tar.gz: 1fe133d8fa7eca530d5f23f42b153d991ed6eac64622f7a10a1654bfa5cd9abd
5
5
  SHA512:
6
- metadata.gz: 3a70e16a9cd5c7a31d6bdcc4a727aeb54da8f741da469ccb7d74a4606307644f2287c7a4deae5d8d71c0190af9389686e20da02b906e5a07de034da1aacecffd
7
- data.tar.gz: b03bcc5bb01e61b285611ac83f469892fbed488e6284e4cc364f6037696784665d326c9269d1d33edae8d659b748280590850c691765978ebc464d38f2c7ae0f
6
+ metadata.gz: cd2ae41330b9c610878ea4f6594dd2329b53be1a5391b1205ce8946b2807b45f433a2f26fd180492874b270088b29cacd01b29a25298e8c3c31cab19a7c40e71
7
+ data.tar.gz: c1eb8fa3d4b8e25e5d98e84c666f31e148d636a73cb2b1418d06b929885b1df5badc496c878329bf0d8bd501d65a83e664779fa81c43c24aabd54403f5b89f9d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cronos_chain_scanner (0.1.5)
4
+ cronos_chain_scanner (0.1.8)
5
5
  faraday (~> 2.0)
6
6
  oj (~> 3.0)
7
7
 
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  Cronos Chain Scanner
4
4
 
5
+ API: https://cronos.org/explorer/testnet3/api-docs
6
+
5
7
  ## Installation
6
8
 
7
9
  Add this line to your application's Gemfile:
@@ -21,6 +23,8 @@ Or install it yourself as:
21
23
  ## Usage
22
24
 
23
25
  ```ruby
26
+ # set your net first
27
+
24
28
  CronosChainScanner.net = 'testnet3' or CronosChainScanner.net = 'main' (default)
25
29
  ```
26
30
 
@@ -30,6 +34,7 @@ CronosChainScanner::Blocks.eth_block_number
30
34
  CronosChainScanner::Contracts.listcontracts
31
35
 
32
36
  CronosChainScanner::Accounts.eth_get_balance(@address)
37
+ CronosChainScanner::Accounts.balance(@address)
33
38
  CronosChainScanner::Accounts.txlist(@address, starttimestamp)
34
39
  CronosChainScanner::Accounts.tokenbalance(@contractaddress, @address)
35
40
 
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ["menghuanwd"]
9
9
  spec.email = ["651019063@qq.com"]
10
10
 
11
- spec.summary = "Write a short summary, because RubyGems requires one."
12
- spec.description = "Write a longer description or delete this line."
11
+ spec.summary = "A Ruby Gem For Cronos Chain"
12
+ spec.description = "An unofficial simple gem For Cronos Chain API"
13
13
  spec.homepage = 'https://github.com/menghuanwd/cronos_chain_scanner'
14
14
  spec.required_ruby_version = ">= 2.4.0"
15
15
 
@@ -11,6 +11,12 @@ module CronosChainScanner
11
11
  Request.get hash
12
12
  end
13
13
 
14
+ def balance(address)
15
+ hash = DEFAULT_HASH.merge(action: 'balance', address: address)
16
+
17
+ Request.get hash
18
+ end
19
+
14
20
  def txlist(address, starttimestamp = nil, sort = 'desc')
15
21
  hash = DEFAULT_HASH.merge(action: 'txlist', address: address, starttimestamp: starttimestamp, sort: sort)
16
22
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CronosChainScanner
4
- VERSION = "0.1.5"
4
+ VERSION = "0.1.8"
5
5
  end
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cronos_chain_scanner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - menghuanwd
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-03 00:00:00.000000000 Z
11
+ date: 2022-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -80,7 +80,7 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '5.0'
83
- description: Write a longer description or delete this line.
83
+ description: An unofficial simple gem For Cronos Chain API
84
84
  email:
85
85
  - 651019063@qq.com
86
86
  executables: []
@@ -125,5 +125,5 @@ requirements: []
125
125
  rubygems_version: 3.0.6
126
126
  signing_key:
127
127
  specification_version: 4
128
- summary: Write a short summary, because RubyGems requires one.
128
+ summary: A Ruby Gem For Cronos Chain
129
129
  test_files: []