Class: Cns::Etherscan
- Inherits:
-
Object
- Object
- Cns::Etherscan
- Extended by:
- Memoist
- Defined in:
- lib/cns/etherscan.rb
Overview
classe para processar transacoes do etherscan
Constant Summary collapse
- TT =
{ normal: { new: :novxt, format: :foti, header: "\ntx normal from to data valor", sork: :srx, adjk: :hash }.freeze, internal: { new: :novxi, format: :foti, header: "\ntx intern from to data valor", sork: :srx, adjk: :hash }.freeze, block: { new: :novxp, format: :fop, header: "\ntx block address data valor", sork: :itx, adjk: :blockNumber }.freeze, token: { new: :novxk, format: :fok, header: "\ntx token from to data valor moeda", sork: :srx, adjk: :hash }.freeze, withdrawal: { new: :novxw, format: :fow, header: "\nwithdrawal validator data valor", sork: :itx, adjk: :withdrawalIndex }.freeze }.freeze
Instance Attribute Summary collapse
- #bqd ⇒ Array<Hash>, Thor::CoreExt::HashWithIndifferentAccess readonly
- #ops ⇒ Array<Hash>, Thor::CoreExt::HashWithIndifferentAccess readonly
Instance Method Summary collapse
-
#initialize(dad, pop) ⇒ Etherscan
constructor
A new instance of Etherscan.
-
#mresumo ⇒ Object
mostra resumo carteiras & transacoes & ajuste dias (com contadores).
-
#mresumo_simples ⇒ Object
mostra resumo carteiras & transacoes & ajuste dias.
Constructor Details
#initialize(dad, pop) ⇒ Etherscan
Returns a new instance of Etherscan.
57 58 59 60 |
# File 'lib/cns/etherscan.rb', line 57 def initialize(dad, pop) @bqd = dad @ops = pop.transform_keys(&:to_sym) end |
Instance Attribute Details
#bqd ⇒ Array<Hash>, Thor::CoreExt::HashWithIndifferentAccess (readonly)
13 14 15 |
# File 'lib/cns/etherscan.rb', line 13 def bqd @bqd end |
#ops ⇒ Array<Hash>, Thor::CoreExt::HashWithIndifferentAccess (readonly)
13 14 15 |
# File 'lib/cns/etherscan.rb', line 13 def ops @ops end |
Instance Method Details
#mresumo ⇒ Object
mostra resumo carteiras & transacoes & ajuste dias (com contadores)
73 74 75 76 77 78 79 80 |
# File 'lib/cns/etherscan.rb', line 73 def mresumo return unless bqexd.any? puts("\nid address etherscan tn ti tb tk tw bigquery tn ti tb tk tw") bqexd.each { |o| puts(foct(o)) } mtransacoes_novas mconfiguracao_ajuste_dias end |
#mresumo_simples ⇒ Object
mostra resumo carteiras & transacoes & ajuste dias
63 64 65 66 67 68 69 70 |
# File 'lib/cns/etherscan.rb', line 63 def mresumo_simples return unless bqexd.any? puts("\nid address etherscan bigquery") bqexd.each { |o| puts(focs(o)) } mtransacoes_novas mconfiguracao_ajuste_dias end |