cronos_chain_scanner 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cb7778216c87b747047f78dfde57fda37a3b6519f842f2f0177cc30d86ed82a1
4
- data.tar.gz: cc16ebf2c3ab529362f937da2de2e17ec68a83ddc2a776c36ea5467df19fbfa0
3
+ metadata.gz: 6dc21a7125349e23d94ebf1a5d5cfebb47a2869832d5926bddf0a146e5c3f56b
4
+ data.tar.gz: d9fafc96f68935ed67ce6b8a647144f5ea0558c3cd014e6a68db5faae010bc05
5
5
  SHA512:
6
- metadata.gz: 3a70e16a9cd5c7a31d6bdcc4a727aeb54da8f741da469ccb7d74a4606307644f2287c7a4deae5d8d71c0190af9389686e20da02b906e5a07de034da1aacecffd
7
- data.tar.gz: b03bcc5bb01e61b285611ac83f469892fbed488e6284e4cc364f6037696784665d326c9269d1d33edae8d659b748280590850c691765978ebc464d38f2c7ae0f
6
+ metadata.gz: 222f33621072923e1950324a5a53da3768a7fd58e7855ab839259291774917938ebbc73513f43b3daf4c25c86bf300c5aaa11fe3659cf857675537347c9bf962
7
+ data.tar.gz: f958bc86a618ad413fb0cdb04e54b2415cb6c9ecb90f04913a4bc49e6e38cc28ebdd2cd427c779fee7b78a025088ae175643c7e361f160c2082c8d41bcb0ad37
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.6)
5
5
  faraday (~> 2.0)
6
6
  oj (~> 3.0)
7
7
 
data/README.md CHANGED
@@ -30,6 +30,7 @@ CronosChainScanner::Blocks.eth_block_number
30
30
  CronosChainScanner::Contracts.listcontracts
31
31
 
32
32
  CronosChainScanner::Accounts.eth_get_balance(@address)
33
+ CronosChainScanner::Accounts.balance(@address)
33
34
  CronosChainScanner::Accounts.txlist(@address, starttimestamp)
34
35
  CronosChainScanner::Accounts.tokenbalance(@contractaddress, @address)
35
36
 
data/hackathon.rb ADDED
@@ -0,0 +1,13 @@
1
+ require 'cronos_chain_scanner'
2
+ require 'active_support'
3
+
4
+ CronosChainScanner.net = 'testnet3'
5
+
6
+
7
+
8
+ @address = '0x0eE92A5c08480A966B2B503821c49F936686E440'
9
+ @timestamp = (Time.now - 3.days).to_i
10
+
11
+ res_doc = CronosChainScanner::Accounts.txlist(@address, @timestamp)
12
+
13
+ puts res_doc
@@ -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.6"
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.6
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-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -94,6 +94,7 @@ files:
94
94
  - bin/console
95
95
  - bin/setup
96
96
  - cronos_chain_scanner.gemspec
97
+ - hackathon.rb
97
98
  - lib/cronos_chain_scanner.rb
98
99
  - lib/cronos_chain_scanner/accounts.rb
99
100
  - lib/cronos_chain_scanner/blocks.rb