core.cleos_get

class eosfactory.core.cleos_get.GetAccounts(key, is_verbose=True)[source]

Bases: eosfactory.core.cleos.Cleos

Retrieve accounts associated with a public key.

Parameters:
  • key (str or interface.Key) – The public key to retrieve accounts for.
  • is_verbose (bool) – If False do not print. Default is True.
Variables:

names (list) – The retrieved list of accounts.

class eosfactory.core.cleos_get.GetBlock(block_number, block_id=None, is_verbose=True)[source]

Bases: eosfactory.core.cleos.Cleos

Retrieve a full block from the blockchain.

Parameters:
  • block_number (int) – The number of the block to retrieve.
  • block_id (str) – The ID of the block to retrieve, if set, defaults to “”.
  • is_verbose (bool) – If False, print a message. Default is True.
Returns:

A eosfactory.core.cleos.Cleos object.

class eosfactory.core.cleos_get.GetCode(account, code='', abi='', wasm=False, is_verbose=True)[source]

Bases: eosfactory.core.cleos.Cleos

Retrieve the code and ABI for an account.

Parameters:
  • account (str or interface.Account) – The account to retrieve.
  • code (str) – If set, the name of the file to save the contract .wast/wasm to.
  • abi (str) – If set, the name of the file to save the contract .abi to.
  • wasm (bool) – Save contract as wasm.
  • is_verbose (bool) – If False do not print. Default is True.
Variables:

code_hash (str) – The hash of the code.

class eosfactory.core.cleos_get.GetInfo(is_verbose=True)[source]

Bases: eosfactory.core.cleos.Cleos

Get current blockchain information.

Parameters:

is_verbose (bool) – If False, print a message. Default is True.

Returns:

A eosfactory.core.cleos.Cleos object, extended with the following items:

Variables:
  • head_block_time (str) – The time of the most recent block.
  • head_block (int) – The most recent block number.
  • last_irreversible_block_num (int) – The number of the most recent irreversible block.
class eosfactory.core.cleos_get.GetTable(account, table, scope, binary=False, limit=10, key='', lower='', upper='', is_verbose=True)[source]

Bases: eosfactory.core.cleos.Cleos

Retrieve the contents of a database table

Parameters:
  • account (str or interface.Account) – The account that owns the table.
  • scope (str or interface.Account) – The scope within the account in which the table is found.
  • table (str) – The name of the table as specified by the contract abi.
  • binary (bool) – Return the value as BINARY rather than using abi to interpret as JSON. Default is False.
  • limit (int) – The maximum number of rows to return. Default is 10.
  • lower (str) – JSON representation of lower bound value of key, defaults to first.
  • upper (str) – JSON representation of upper bound value value of key, defaults to last.
  • is_verbose (bool) – If False do not print. Default is True.