Get

Get

Description The subcommands can be used to retrieve various items and information from the blockchain.

Subcommands

  • Abi — Retrieve the ABI for an account.

  • Account — Retrieve an account from the blockchain.

  • Accounts — Retrieve accounts associated with a public key.

  • Actions — Retrieve all actions with specific account name referenced in authorization or receiver.

  • Block — Retrieve a full block from the blockchain.

  • Code — Retrieve the code and ABI for an account.

  • Currency Balance — Retrieve the balance of an account for a given currency.

  • Currency Stats — Retrieve the stats of for a given currency.

  • Info — Get current blockchain information.

  • Schedule — Retrieve the producer schedule.

  • Scope — Retrieve a list of scopes and tables owned by a contract.

  • Servants — Retrieve accounts which are servants of a given account.

  • Table — Retrieve the contents of a database table.

  • Transaction — Retrieve a transaction from the blockchain.

  • Transaction ID — Get transaction id given transaction object.

Abi

Description

The subcommand retrieves the ABI for an account.

Positional Parameters

  • (string) name — The name of the account whose abi should be retrieved (required).

Options

  • -f, --file TEXT — The name of the file to save the contract .abi to instead of writing to console.

Command

Examples

Retrieve and save abi for cyber.stake contract.

Account

Description

The subcommand retrieves an account from the blockchain.

Positional Parameters

  • (string) name — The name of the account to retrieve (required).

  • (string) core-symbol — The expected core symbol of the chain you are querying.

Options

  • --json, -j — Output in JSON format.

Command

Examples

Get formatted data for user cyberio.

Get JSON data for user cyberio.

Accounts

Description

The subcommand retrieves accounts associated with a public key.

Positional Parameters

  • (string) public_key — The public key to retrieve accounts for (required).

Options

  • --json, -j — Output in JSON format.

Command

Examples

Actions

Description

The subcommand retrieves all actions with specific account name referenced in authorization or receiver.

Positional Parameters

  • (string) account_name — Name of account to query on (required).

  • (int_32) pos — Sequence number of action for this account, -1 for last.

  • (int_32) offset — Get actions [pos, pos + offset] for positive offset or [pos - offset, pos] for negative offset.

Options

  • -j, --json — Print full json.

  • --full — Do not truncate action output.

  • --pretty — Pretty print full action json.

  • --console — Print console output generated by action.

Command

Examples

Retrieve and save abi for cyber.token contract.

Block

Description

The subcommand retrieves a full block from the blockchain.

Positional Parameters

  • (string) block — The number or ID of the block to retrieve (required).

Options

  • --header-state — Get block header state from fork database instead.

Command

Examples

or

Result output is a block object similar to the following

Code

Description

The subcommand retrieves the code and ABI for an account

Positional Parameters

  • (string) name — The name of the account whose code should be retrieved (required).

Options

  • -c, --code TEXT — The name of the file to save the contract .wast to.

  • -a, --abi TEXT — The name of the file to save the contract .abi to.

  • --wasm — Save contract as wasm.

Command

Examples

Simply output the hash of cyber.token contract

Retrieve and save abi for cyber.token contract.

Retrieve and save wast code for cyber.token contract.

Currency Balance

Description

The subcommand retrieves the balance of an account for a given currency.

Positional Parameters

  • (string) contract — The contract that operates the currency (required).

  • (string) account — The account to query balances for (required).

  • (string) symbol — The symbol for the currency if the contract operates multiple currencies.

Options

No options required for this subcomand.

Command

Examples

Get balance of eosio from cyber.token contract for SYS symbol.

Currency Stats

Description

The subcommand retrieves the stats of for a given currency.

Positional Parameters

  • (string) contract — The contract that operates the currency (required).

  • (string) symbol — The symbol for the currency if the contract operates multiple currencies (required).

Options

No options required for this subcomand.

Command

Examples

Get stats of the SYS token from the cyber.token contract.

Info

Description

The subcommand gets current blockchain information.

Positional Parameters

No parameters required for this subcommand.

Options

No options required for this subcommand.

Command

Examples

This subcommand returns the current blockchain state information.

Schedule

Description

The subcommand retrieves the producer schedule.

Positional Parameters

No parameters required for this subcommand.

Options

  • -j, --json — Output in JSON format.

Command

Examples

This subcommand returns the current producer schedule.

Scope

Description

The subcommand retrieves a list of scopes and tables owned by a contract

Positional Parameters

  • (string) contract — The contract who owns the table (required).

Options

  • -t, --table TEXT — The name of the table as filter.

  • -l, --limit UINT — The maximum number of rows to return.

  • -L, --lower TEXT — Lower bound of scope.

  • -U, --upper TEXT — Upper bound of scope.

  • -r, --reverse — Iterate in reverse order.

Command

Servants

Description

The subcommand retrieves accounts which are servants of a given account.

Positional Parameters

  • (string) account — The name of the controlling account (required).

Options

No options required for this subcommand.

Command

Examples

Output

Table

Description

The subcommand retrieves the contents of a database table.

Positional Parameters

  • (string) account — The account who owns the table (required).

  • (string) scope — The scope within the contract in which the table is found (required).

  • (string) table — The name of the table as specified by the contract abi (required).

Options

  • --index — Index name. The same as in abi decription. If not set the index name will be primary.

  • -b, --binary — Return the value as BINARY rather than using abi to interpret as JSON.

  • -l, --limit — The maximum number of rows to return.

  • -k, --key — Deprecated.

  • -L, --lower — JSON representation of lower bound value of key, defaults to first.

  • -U, --upper — JSON representation of upper bound value of key, defaults to last.

  • --key-type — Deprecated.

  • --encode-type — The encoding type of key_type (i64 , i128 , float64, float128) only support decimal encoding (e.g. 'dec'). i256 - supports both 'dec' and 'hex', ripemd160 and sha256 is 'hex' only.

  • -r, --reverse — Iterate in reverse order.

  • --show-payer — show RAM payer.

Command

Examples

Get the data from the accounts table for the cyber.token contract, for user cyberio.

Transaction

Description

The subcommand retrieves a transaction from the blockchain.

Positional Parameters

  • (string) id — ID of the transaction to retrieve (required).

Options

  • -b, --block-hint UINT — The block number this transaction may be in.

Command

Examples

Transaction ID

Description

The subcommand gets transaction id given transaction object.

Positional Parameters

  • (string) transaction — The JSON string or filename defining the transaction which transaction ID will be retrieved (required).

Options

No options required for this subcommand.

Command

Last updated