cronos_chain_scanner 0.1.4 → 0.1.5
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 +8 -0
- data/lib/cronos_chain_scanner/blocks.rb +6 -0
- data/lib/cronos_chain_scanner/contracts.rb +15 -0
- data/lib/cronos_chain_scanner/request.rb +0 -1
- data/lib/cronos_chain_scanner/tokens.rb +15 -0
- data/lib/cronos_chain_scanner/transactions.rb +6 -0
- data/lib/cronos_chain_scanner/version.rb +1 -1
- data/lib/cronos_chain_scanner.rb +2 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb7778216c87b747047f78dfde57fda37a3b6519f842f2f0177cc30d86ed82a1
|
4
|
+
data.tar.gz: cc16ebf2c3ab529362f937da2de2e17ec68a83ddc2a776c36ea5467df19fbfa0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a70e16a9cd5c7a31d6bdcc4a727aeb54da8f741da469ccb7d74a4606307644f2287c7a4deae5d8d71c0190af9389686e20da02b906e5a07de034da1aacecffd
|
7
|
+
data.tar.gz: b03bcc5bb01e61b285611ac83f469892fbed488e6284e4cc364f6037696784665d326c9269d1d33edae8d659b748280590850c691765978ebc464d38f2c7ae0f
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -27,11 +27,19 @@ CronosChainScanner.net = 'testnet3' or CronosChainScanner.net = 'main' (default)
|
|
27
27
|
```ruby
|
28
28
|
CronosChainScanner::Blocks.eth_block_number
|
29
29
|
|
30
|
+
CronosChainScanner::Contracts.listcontracts
|
31
|
+
|
30
32
|
CronosChainScanner::Accounts.eth_get_balance(@address)
|
31
33
|
CronosChainScanner::Accounts.txlist(@address, starttimestamp)
|
32
34
|
CronosChainScanner::Accounts.tokenbalance(@contractaddress, @address)
|
33
35
|
|
34
36
|
CronosChainScanner::Transactions.gettxinfo(@txhash)
|
37
|
+
CronosChainScanner::Transactions.gettxreceiptstatus(@txhash)
|
38
|
+
CronosChainScanner::Transactions.getstatus(@txhash)
|
39
|
+
|
40
|
+
CronosChainScanner::Tokens.getToken(@contractaddress)
|
41
|
+
|
42
|
+
CronosChainScanner::Contracts.listcontracts
|
35
43
|
```
|
36
44
|
|
37
45
|
## Development
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CronosChainScanner
|
4
|
+
class Contracts
|
5
|
+
class << self
|
6
|
+
DEFAULT_HASH = { module: 'contract' }.freeze
|
7
|
+
|
8
|
+
def listcontracts
|
9
|
+
hash = DEFAULT_HASH.merge(action: 'listcontracts')
|
10
|
+
|
11
|
+
Request.get hash
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CronosChainScanner
|
4
|
+
class Tokens
|
5
|
+
class << self
|
6
|
+
DEFAULT_HASH = { module: 'token' }.freeze
|
7
|
+
|
8
|
+
def getToken(contractaddress)
|
9
|
+
hash = DEFAULT_HASH.merge(action: 'getToken', contractaddress: contractaddress)
|
10
|
+
|
11
|
+
Request.get hash
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/lib/cronos_chain_scanner.rb
CHANGED
@@ -5,6 +5,8 @@ require_relative "cronos_chain_scanner/request"
|
|
5
5
|
require_relative "cronos_chain_scanner/accounts"
|
6
6
|
require_relative "cronos_chain_scanner/transactions"
|
7
7
|
require_relative "cronos_chain_scanner/blocks"
|
8
|
+
require_relative "cronos_chain_scanner/contracts"
|
9
|
+
require_relative "cronos_chain_scanner/tokens"
|
8
10
|
|
9
11
|
module CronosChainScanner
|
10
12
|
class Error < StandardError; end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- menghuanwd
|
@@ -97,7 +97,9 @@ files:
|
|
97
97
|
- lib/cronos_chain_scanner.rb
|
98
98
|
- lib/cronos_chain_scanner/accounts.rb
|
99
99
|
- lib/cronos_chain_scanner/blocks.rb
|
100
|
+
- lib/cronos_chain_scanner/contracts.rb
|
100
101
|
- lib/cronos_chain_scanner/request.rb
|
102
|
+
- lib/cronos_chain_scanner/tokens.rb
|
101
103
|
- lib/cronos_chain_scanner/transactions.rb
|
102
104
|
- lib/cronos_chain_scanner/version.rb
|
103
105
|
homepage: https://github.com/menghuanwd/cronos_chain_scanner
|