Class: CronosChain::Accounts
- Inherits:
-
Object
- Object
- CronosChain::Accounts
- Defined in:
- lib/cronos_chain/accounts.rb
Constant Summary collapse
- DEFAULT_HASH =
{ module: 'account' }.freeze
Class Method Summary collapse
- .eth_get_balance(address) ⇒ Object
- .tokenbalance(contractaddress, address) ⇒ Object
- .txlist(address, starttimestamp = nil, sort = 'desc') ⇒ Object
Class Method Details
.eth_get_balance(address) ⇒ Object
8 9 10 11 12 |
# File 'lib/cronos_chain/accounts.rb', line 8 def eth_get_balance(address) hash = DEFAULT_HASH.merge(action: 'eth_get_balance', address: address) Request.get hash end |
.tokenbalance(contractaddress, address) ⇒ Object
20 21 22 23 24 |
# File 'lib/cronos_chain/accounts.rb', line 20 def tokenbalance(contractaddress, address) hash = DEFAULT_HASH.merge(action: 'tokenbalance', contractaddress: contractaddress, address: address) Request.get hash end |
.txlist(address, starttimestamp = nil, sort = 'desc') ⇒ Object
14 15 16 17 18 |
# File 'lib/cronos_chain/accounts.rb', line 14 def txlist(address, = nil, sort = 'desc') hash = DEFAULT_HASH.merge(action: 'txlist', address: address, starttimestamp: , sort: sort) Request.get hash end |