Other

These commands call some useful miscellaneous tools:

  • chifra quotes, a rudimentary pricing tool,
  • chifra explore a quick way to open a blockchain explorer,
  • ethslurp an older tool that lets you call data from EtherScan. (This has issues of centralization and data quality, see explanation in its section).

Follow these instructions to add a key to your config

Each data structure is created by one or more tools which are detailed below

Function

ABI files are derived from the Solidity source code of a smart contract by extracting the canonical function and event signatures in a JSON structure. The function signatures are hashed (using keccak) into four-byte encodings for functions and 32-byte encodings for events. Because the blockchain only deals with byte data, TrueBlocks needs a way to decode the bytes back into the human-readable function and event signatures. We call this process --articulate. Most TrueBlocks commands provide an --articulate option. See the commands themselves for more information.

The following commands produce and manage functions:

Tools
chifra exportexport full detail of transactions for one or more addresses
chifra abisfetches the ABI for a smart contract

Function data is made of the following data fields:

FieldDescriptionType
namethe name of the interfacestring
typethe type of the interface, either ’event’ or ‘function’string
signaturethe canonical signature of the interfacestring
encodingthe signature encoded with keccakstring
inputsthe input parameters to the function, if anyCParameterArray
outputsthe output parameters to the function, if anyCParameterArray

Parameter

Parameters are a constituent part of a Function or Event. The parameters of a function are each individual value passed into the function. Along with the function’s name, the parameters types (once canonicalized) are used to create a function’s four byte signature (or an event’s 32-byte signature). Parameters are important to TrueBlocks because we use them as part of the ABI decoding and the --articulate process to conver the blockchain’s bytes into human-readable text.

The following commands produce and manage parameters:

Tools
chifra exportexport full detail of transactions for one or more addresses
chifra abisfetches the ABI for a smart contract

Parameter data is made of the following data fields:

FieldDescriptionType
typethe type of this parameterstring
namethe name of this parameterstring
strDefaultthe default value of this parameter, if anystring
indexedtrue if this parameter is indexedbool
internalTypefor composite types, the internal type of the parameterstring
componentsfor composite types, the parameters making up the compositeCParameterArray

Quote

Prior to sources of on-chain prices such as UniSwap, TrueBlocks would pull US dollar to Ether prices from the Poloniex price API. This data structure reports on those queries. Note that this tool has been deprecated.

The following commands produce and manage quotes:

Tools
chifra quotesUpdate or display Ethereum price data.
This tool has been deprecated

Quote data is made of the following data fields:

FieldDescriptionType
timestampthe timestamp of this quotetimestamp
closeprice of the asset in US dollarsdouble
datethe date of the associated timestampdate
namethe name of the block for some named ‘special’ blocksstring

Base types

This documentation mentions the following basic data types.

TypeDescriptionNotes
boola value either true, false, 1, or 0
datea JSON formatted dateas a string
doublea floating point number of double precision
stringa normal character string
timestampa 64-bit unsigned integerUnix timestamp
Published on: Nov 26, 2021 Last edited: Nov 26, 2021

Edit this page on GitHub