cronos_chain_scanner 0.1.5 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +5 -0
- data/cronos_chain_scanner.gemspec +2 -2
- data/lib/cronos_chain_scanner/accounts.rb +6 -0
- data/lib/cronos_chain_scanner/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f0ae3ed362d434f2bc5525fc2770989ed79bb862e7113a4942abc201fdab0ea
|
4
|
+
data.tar.gz: 1fe133d8fa7eca530d5f23f42b153d991ed6eac64622f7a10a1654bfa5cd9abd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd2ae41330b9c610878ea4f6594dd2329b53be1a5391b1205ce8946b2807b45f433a2f26fd180492874b270088b29cacd01b29a25298e8c3c31cab19a7c40e71
|
7
|
+
data.tar.gz: c1eb8fa3d4b8e25e5d98e84c666f31e148d636a73cb2b1418d06b929885b1df5badc496c878329bf0d8bd501d65a83e664779fa81c43c24aabd54403f5b89f9d
|
data/Gemfile.lock
CHANGED
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 = "
|
12
|
-
spec.description = "
|
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
|
|
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.
|
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-
|
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:
|
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:
|
128
|
+
summary: A Ruby Gem For Cronos Chain
|
129
129
|
test_files: []
|