Skip to content

Commit

Permalink
Updating auto-gen code
Browse files Browse the repository at this point in the history
  • Loading branch information
tjayrush committed May 28, 2024
1 parent 268a972 commit 6f0f206
Show file tree
Hide file tree
Showing 13 changed files with 524 additions and 442 deletions.
430 changes: 224 additions & 206 deletions content/api/openapi.yaml

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions content/chifra/accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Flags:
-U, --count display only the count of records for each monitor
-z, --no_zero for the --count option only, suppress the display of zero appearance accounts
-b, --bounds report first and last block this address appears
-u, --unripe list transactions labeled upripe (i.e. less than 28 blocks old)
-u, --unripe list transactions labeled unripe (i.e. less than 28 blocks old)
-s, --silent freshen the monitor only (no reporting)
-c, --first_record uint the first record to process
-e, --max_records uint the maximum number of records to process (default 250)
Expand All @@ -71,7 +71,6 @@ Notes:
Data models produced by this tool:

- [appearance](/data-model/accounts/#appearance)
- [appearancecount](/data-model/accounts/#appearancecount)
- [bounds](/data-model/accounts/#bounds)
- [monitor](/data-model/accounts/#monitor)

Expand Down Expand Up @@ -132,7 +131,7 @@ Flags:
-f, --flow string for the accounting options only, export statements with incoming, outgoing, or zero value
One of [ in | out | zero ]
-y, --factory for --traces only, report addresses created by (or self-destructed by) the given address(es)
-u, --unripe export transactions labeled upripe (i.e. less than 28 blocks old)
-u, --unripe export transactions labeled unripe (i.e. less than 28 blocks old)
-E, --reversed produce results in reverse chronological order
-z, --no_zero for the --count option only, suppress the display of zero appearance accounts
-F, --first_block uint first block to process (inclusive)
Expand Down Expand Up @@ -161,19 +160,19 @@ Notes:
Data models produced by this tool:

- [appearance](/data-model/accounts/#appearance)
- [appearancecount](/data-model/accounts/#appearancecount)
- [function](/data-model/other/#function)
- [log](/data-model/chaindata/#log)
- [message](/data-model/other/#message)
- [monitor](/data-model/accounts/#monitor)
- [parameter](/data-model/other/#parameter)
- [receipt](/data-model/chaindata/#receipt)
- [state](/data-model/chainstate/#state)
- [statement](/data-model/accounts/#statement)
- [token](/data-model/chainstate/#token)
- [trace](/data-model/chaindata/#trace)
- [traceaction](/data-model/chaindata/#traceaction)
- [traceresult](/data-model/chaindata/#traceresult)
- [transaction](/data-model/chaindata/#transaction)
- [withdrawal](/data-model/chaindata/#withdrawal)

Links:

Expand Down Expand Up @@ -260,6 +259,7 @@ Notes:

Data models produced by this tool:

- [message](/data-model/other/#message)
- [monitor](/data-model/accounts/#monitor)
- [monitorclean](/data-model/admin/#monitorclean)

Expand Down Expand Up @@ -317,6 +317,7 @@ Notes:

Data models produced by this tool:

- [message](/data-model/other/#message)
- [name](/data-model/accounts/#name)

Links:
Expand Down
9 changes: 5 additions & 4 deletions content/chifra/admin.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,9 @@ Each of the following additional configurable command line options are available
| Item | Type | Default | Description / Default |
| ------------ | ------ | ------- | ------------------------------------------------------------------------------------------------------------------------ |
| appsPerChunk | uint64 | 2000000 | the number of appearances to build into a chunk before consolidating it |
| snapToGrid | uint64 | 250000 | an override to apps_per_chunk to snap-to-grid at every modulo of this value, this allows easier corrections to the index |
| firstSnap | uint64 | 2000000 | the first block at which snap_to_grid is enabled |
| unripeDist | uint64 | 28 | the distance (in blocks) from the front of the chain under which (inclusive) a block is considered unripe |
| snapToGrid | blknum | 250000 | an override to apps_per_chunk to snap-to-grid at every modulo of this value, this allows easier corrections to the index |
| firstSnap | blknum | 2000000 | the first block at which snap_to_grid is enabled |
| unripeDist | blknum | 28 | the distance (in blocks) from the front of the chain under which (inclusive) a block is considered unripe |
| channelCount | uint64 | 20 | number of concurrent processing channels |
| allowMissing | bool | false | do not report errors for blockchains that contain blocks with zero addresses |

Expand Down Expand Up @@ -343,11 +343,12 @@ Data models produced by this tool:
- [chunkaddress](/data-model/admin/#chunkaddress)
- [chunkbloom](/data-model/admin/#chunkbloom)
- [chunkindex](/data-model/admin/#chunkindex)
- [chunkpinreport](/data-model/admin/#chunkpinreport)
- [chunkpin](/data-model/admin/#chunkpin)
- [chunkrecord](/data-model/admin/#chunkrecord)
- [chunkstats](/data-model/admin/#chunkstats)
- [ipfspin](/data-model/admin/#ipfspin)
- [manifest](/data-model/admin/#manifest)
- [message](/data-model/other/#message)
- [reportcheck](/data-model/admin/#reportcheck)

Links:
Expand Down
31 changes: 18 additions & 13 deletions content/chifra/chaindata.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ weight: 21000
toc: true
---

The Chain Data group of tools extract raw blockchain data directly from the node. You may extract
The Chain Data group of tools extract blockchain data directly from the node. You may extract
block data, transactional data, receipts, logs, traces, and other information. Each tool has it own
set of options, allowing you to get exactly the data you need.

Expand Down Expand Up @@ -57,10 +57,8 @@ Flags:
-B, --topic strings for the --logs option only, filter logs to show only those with this topic(s)
-i, --withdrawals export the withdrawals from the block as opposed to the block data
-a, --articulate for the --logs option only, articulate the retrieved data if ABIs can be found
-r, --big_range uint for the --logs option only, allow for block ranges larger than 500 (default 500)
-U, --count display only the count of appearances for --addrs or --uniq
-H, --ether specify value in ether
-w, --raw report JSON data from the source with minimal processing
-o, --cache force the results of the query into the cache
-D, --decache removes related items from the cache
-x, --fmt string export format, one of [none|json*|txt|csv]
Expand All @@ -74,7 +72,6 @@ Notes:
- With the --logs option, optionally specify one or more --emitter, one or more --topics, either or both.
- The --logs option is significantly faster if you provide an --emitter and/or a --topic.
- Multiple topics match on topic0, topic1, and so on, not on different topic0's.
- For the --logs option, large block ranges may crash the node, use --big_range to specify a larger range.
- The --decache option removes the block(s), all transactions in those block(s), and all traces in those transactions from the cache.
- The --withdrawals option is only available on certain chains. It is ignored otherwise.
```
Expand All @@ -84,8 +81,9 @@ Data models produced by this tool:
- [appearance](/data-model/accounts/#appearance)
- [block](/data-model/chaindata/#block)
- [blockcount](/data-model/chaindata/#blockcount)
- [lightblock](/data-model/chaindata/#lightblock)
- [log](/data-model/chaindata/#log)
- [logfilter](/data-model/chaindata/#logfilter)
- [message](/data-model/other/#message)
- [trace](/data-model/chaindata/#trace)
- [traceaction](/data-model/chaindata/#traceaction)
- [traceresult](/data-model/chaindata/#traceresult)
Expand All @@ -98,8 +96,7 @@ Links:

## chifra transactions

The `chifra transactions` tool retrieves transactions directly from the Ethereum node (using the `--raw`
option) or from the TrueBlocks cache (if present). You may specify multiple transaction identifiers
The `chifra transactions` tool retrieves transactions directly from the Ethereum node or from the TrueBlocks cache (if present). You may specify multiple transaction identifiers
per invocation. Unlike the Ethereum RPC, the reported transactions include the transaction's receipt
and generated logs.

Expand Down Expand Up @@ -130,7 +127,6 @@ Flags:
-m, --emitter strings for the --logs option only, filter logs to show only those logs emitted by the given address(es)
-B, --topic strings for the --logs option only, filter logs to show only those with this topic(s)
-H, --ether specify value in ether
-w, --raw report JSON data from the source with minimal processing
-o, --cache force the results of the query into the cache
-D, --decache removes related items from the cache
-x, --fmt string export format, one of [none|json*|txt|csv]
Expand All @@ -146,6 +142,11 @@ Notes:

Data models produced by this tool:

- [appearance](/data-model/accounts/#appearance)
- [function](/data-model/other/#function)
- [log](/data-model/chaindata/#log)
- [message](/data-model/other/#message)
- [parameter](/data-model/other/#parameter)
- [transaction](/data-model/chaindata/#transaction)

Links:
Expand Down Expand Up @@ -177,7 +178,6 @@ Arguments:
Flags:
-a, --articulate articulate the retrieved data if ABIs can be found
-w, --raw report JSON data from the source with minimal processing
-o, --cache force the results of the query into the cache
-D, --decache removes related items from the cache
-x, --fmt string export format, one of [none|json*|txt|csv]
Expand All @@ -192,6 +192,8 @@ Notes:

Data models produced by this tool:

- [function](/data-model/other/#function)
- [parameter](/data-model/other/#parameter)
- [receipt](/data-model/chaindata/#receipt)

Links:
Expand Down Expand Up @@ -221,7 +223,6 @@ Flags:
-m, --emitter strings filter logs to show only those logs emitted by the given address(es)
-B, --topic strings filter logs to show only those with this topic(s)
-a, --articulate articulate the retrieved data if ABIs can be found
-w, --raw report JSON data from the source with minimal processing
-o, --cache force the results of the query into the cache
-D, --decache removes related items from the cache
-x, --fmt string export format, one of [none|json*|txt|csv]
Expand All @@ -237,8 +238,10 @@ Notes:

Data models produced by this tool:

- [function](/data-model/other/#function)
- [log](/data-model/chaindata/#log)
- [logfilter](/data-model/chaindata/#logfilter)
- [message](/data-model/other/#message)
- [parameter](/data-model/other/#parameter)

Links:

Expand Down Expand Up @@ -271,7 +274,6 @@ Flags:
-f, --filter string call the node's trace_filter routine with bang-separated filter
-U, --count display only the number of traces for the transaction (fast)
-H, --ether specify value in ether
-w, --raw report JSON data from the source with minimal processing
-o, --cache force the results of the query into the cache
-D, --decache removes related items from the cache
-x, --fmt string export format, one of [none|json*|txt|csv]
Expand All @@ -287,6 +289,9 @@ Notes:

Data models produced by this tool:

- [function](/data-model/other/#function)
- [message](/data-model/other/#message)
- [parameter](/data-model/other/#parameter)
- [trace](/data-model/chaindata/#trace)
- [traceaction](/data-model/chaindata/#traceaction)
- [tracecount](/data-model/chaindata/#tracecount)
Expand Down Expand Up @@ -344,7 +349,7 @@ Notes:

Data models produced by this tool:

- [block](/data-model/chaindata/#block)
- [message](/data-model/other/#message)
- [namedblock](/data-model/chaindata/#namedblock)
- [timestamp](/data-model/chaindata/#timestamp)
- [timestampcount](/data-model/chaindata/#timestampcount)
Expand Down
3 changes: 3 additions & 0 deletions content/chifra/chainstate.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ Notes:

Data models produced by this tool:

- [function](/data-model/other/#function)
- [message](/data-model/other/#message)
- [parameter](/data-model/other/#parameter)
- [result](/data-model/chainstate/#result)
- [state](/data-model/chainstate/#state)

Expand Down
6 changes: 3 additions & 3 deletions content/chifra/configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ configuration per chain.
| | |
| [settings] | |
| apps_per_chunk | uint64 | 200000 | the number of appearances to build into a chunk before consolidating it |
| snap_to_grid | uint64 | 100000 | an override to apps_per_chunk to snap-to-grid at every modulo of this value, this allows easier corrections to the index |
| first_snap | uint64 | 0 | the first block at which snap_to_grid is enabled |
| unripe_dist | uint64 | 28 | the distance (in blocks) from the front of the chain under which (inclusive) a block is considered unripe |
| snap_to_grid | blknum | 100000 | an override to apps_per_chunk to snap-to-grid at every modulo of this value, this allows easier corrections to the index |
| first_snap | blknum | 0 | the first block at which snap_to_grid is enabled |
| unripe_dist | blknum | 28 | the distance (in blocks) from the front of the chain under which (inclusive) a block is considered unripe |
| channel_count | uint64 | 20 | number of concurrent processing channels |
| allow_missing | bool | false | do not report errors for blockchains that contain blocks with zero addresses |

Expand Down
26 changes: 12 additions & 14 deletions content/chifra/globals.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,20 +78,18 @@ Where:

### Group 4

The tools in this group have all of the above options, but have an additional option, `--raw`, which shows the underlying data queried directly from the node (or API provider in the case of `slurp`).

| Group | Cmd | Enabled | Disabled |
| ---------- | ------------ | -------------------------- | -------- |
| chain_data | blocks | Cache, Decache, Ether, Raw | |
| chain_data | transactions | Cache, Decache, Ether, Raw | |
| chain_data | receipts | Cache, Decache, Ether, Raw | |
| chain_data | logs | Cache, Decache, Ether, Raw | |
| chain_data | traces | Cache, Decache, Ether, Raw | |
| other | slurp | Cache, Decache, Ether, Raw | |

Where:

--raw passes the data queried from the node directly to the display
**As of version 2.6.0, the `--raw` option has been removed in its entirity.
Prior to that version, the following tools had this option which would pass
the data received directly from the node without modification.**

```[bash]
chifra blocks
chifra transactions
chifra receipts
chifra logs
chifra traces
chifra slurp
```

### Group 5

Expand Down
37 changes: 31 additions & 6 deletions content/chifra/other.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,19 @@ Links:

While it's useful, it has two shortcomings. First, it is fully centralized, pulling its data from
[http://etherscan.io](http://etherscan.io). Second, is that it does not report every transaction
for a given account. This is actually a shortcoming with Etherscan. It's too complicated to explain
for a given account. This is actually a shortcoming with API providers. It's too complicated to explain
here, but see our blog.

While `chifra slurp` has its shortcomings, it does provides some nice features. You may use it to pull
any transaction initiated by an EOA for example or to explore mining rewards. Visit the above
referenced website for more information.

Currently supported API providers:
- [TrueBlocks Key](https://key.trueblocks.io)
- Etherscan
- Covalent
- Alchemy

```[plaintext]
Purpose:
Fetch data from Etherscan and other APIs for any address.
Expand All @@ -86,11 +92,10 @@ Flags:
-p, --appearances show only the blocknumber.tx_id appearances of the exported transactions
-a, --articulate articulate the retrieved data if ABIs can be found
-S, --source string the source of the slurped data
One of [ etherscan | key ] (default "etherscan")
One of [ etherscan | key | covalent | alchemy ] (default "etherscan")
-U, --count for --appearances mode only, display only the count of records
-s, --sleep float seconds to sleep between requests (default 0.25)
-H, --ether specify value in ether
-w, --raw report JSON data from the source with minimal processing
-o, --cache force the results of the query into the cache
-D, --decache removes related items from the cache
-x, --fmt string export format, one of [none|json*|txt|csv]
Expand All @@ -99,19 +104,39 @@ Flags:
Notes:
- An address must be either an ENS name or start with '0x' and be forty-two characters long.
- Portions of this software are Powered by Etherscan.io APIs.
- Portions of this software are Powered by Etherscan.io, Covalent, Alchemy, TrueBlocks Key APIs.
- See slurp/README on how to configure keys for API providers
- The withdrawals option is only available on certain chains. It is ignored otherwise.
- If the value of --source is key, --types is ignored and only appearances or counts are returned.
- If the value of --source is key, --types is ignored.
```

Data models produced by this tool:

- [appearance](/data-model/accounts/#appearance)
- [function](/data-model/other/#function)
- [monitor](/data-model/accounts/#monitor)
- [parameter](/data-model/other/#parameter)
- [slurp](/data-model/other/#slurp)
- [slurpcount](/data-model/other/#slurpcount)

Links:

- [api docs](/api/#operation/other-slurp)
- [source code](https://github.com/TrueBlocks/trueblocks-core/tree/master/src/apps/chifra/internal/slurp)

### Adding provider API key
Call `chifra config edit` to edit the configuration file.

For TrueBlocks Key, add `keyEndpoint = "your-key-endpoint-url"` to `chains.mainnet` section.

For all other providers add an entry to `keys` section like this:
```toml
[keys]
[keys.etherscan]
apiKey = "etherscan-apikey"
[keys.covalent]
apiKey = "covalent-apikey"
[keys.alchemy]
apiKey = "alchemy-apikey"
```

*Copyright (c) 2024, TrueBlocks, LLC. All rights reserved. Generated with goMaker.*
Loading

0 comments on commit 6f0f206

Please sign in to comment.