Module: Etherscan::Account

Defined in:
lib/etherscan/api.rb

Class Method Summary collapse

Class Method Details

.balance(address, tag) ⇒ Object



39
40
41
42
43
44
45
# File 'lib/etherscan/api.rb', line 39

def balance(address, tag)
  call = Etherscan::Call.new(Etherscan.chain, 'account', 'balance')
  call.api_key = Etherscan.api_key
  call.address = address
  call.tag = tag
  call.fetch
end

.balancemulti(address, tag) ⇒ Object



57
58
59
60
61
62
63
# File 'lib/etherscan/api.rb', line 57

def balancemulti(address, tag)
  call = Etherscan::Call.new(Etherscan.chain, 'account', 'balancemulti')
  call.api_key = Etherscan.api_key
  call.address = address
  call.tag = tag
  call.fetch
end

.getminedblocks(address, blocktype, page = nil, offset = nil) ⇒ Object



47
48
49
50
51
52
53
54
55
# File 'lib/etherscan/api.rb', line 47

def getminedblocks(address, blocktype, page = nil, offset = nil)
  call = Etherscan::Call.new(Etherscan.chain, 'account', 'getminedblocks')
  call.api_key = Etherscan.api_key
  call.page = page
  call.offset = offset
  call.address = address
  call.blocktype = blocktype
  call.fetch
end

.txlist(address, startblock, endblock, sort = 'desc', page = nil, offset = nil) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/etherscan/api.rb', line 8

def txlist(address, startblock, endblock, sort = 'desc', page = nil, offset = nil)
  call = Etherscan::Call.new(Etherscan.chain, 'account', 'txlist')
  call.api_key = Etherscan.api_key
  call.address = address
  call.startblock = startblock
  call.endblock = endblock
  call.page = page
  call.offset = offset
  call.sort = sort
  call.fetch
end

.txlistinternal(address, startblock, endblock, sort = 'desc', page = nil, offset = nil) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
# File 'lib/etherscan/api.rb', line 20

def txlistinternal(address, startblock, endblock, sort = 'desc', page = nil, offset = nil)
  call = Etherscan::Call.new(Etherscan.chain, 'account', 'txlistinternal')
  call.api_key = Etherscan.api_key
  call.address = address
  call.startblock = startblock
  call.endblock = endblock
  call.page = page
  call.offset = offset
  call.sort = sort
  call.fetch
end

.txlistinternal_txhash(txhash) ⇒ Object



32
33
34
35
36
37
# File 'lib/etherscan/api.rb', line 32

def txlistinternal_txhash(txhash)
  call = Etherscan::Call.new(Etherscan.chain, 'account', 'txlistinternal')
  call.api_key = Etherscan.api_key
  call.txhash = txhash
  call.fetch
end