github.com/TrueBlocks/trueblocks-core/src/apps/chifra@v0.0.0-20241022031540-b362680128f7/internal/slurp/README.md (about) 1 ## chifra slurp 2 3 `chifra slurp` is the first tool we built in the Ethereum space. It even has its [own website](http://ethslurp.com). 4 5 While it's useful, it has two shortcomings. First, it is fully centralized, pulling its data from 6 [http://etherscan.io](http://etherscan.io). Second, is that it does not report every transaction 7 for a given account. This is actually a shortcoming with API providers. It's too complicated to explain 8 here, but see our blog. 9 10 While `chifra slurp` has its shortcomings, it does provides some nice features. You may use it to pull 11 any transaction initiated by an EOA for example or to explore mining rewards. Visit the above 12 referenced website for more information. 13 14 Currently supported API providers: 15 - [TrueBlocks Key](https://key.trueblocks.io) 16 - Etherscan 17 - Covalent 18 - Alchemy 19 20 ```[plaintext] 21 Purpose: 22 Fetch data from Etherscan and other APIs for any address. 23 24 Usage: 25 chifra slurp [flags] <address> [address...] [block...] 26 27 Arguments: 28 addrs - one or more addresses to slurp from Etherscan (required) 29 blocks - an optional range of blocks to slurp 30 31 Flags: 32 -r, --parts strings which types of transactions to request 33 One or more of [ ext | int | token | nfts | 1155 | miner | uncles | withdrawals | some | all ] 34 -p, --appearances show only the blocknumber.tx_id appearances of the exported transactions 35 -a, --articulate articulate the retrieved data if ABIs can be found 36 -S, --source string the source of the slurped data 37 One of [ etherscan | key | covalent | alchemy ] (default "etherscan") 38 -U, --count for --appearances mode only, display only the count of records 39 -g, --page uint the page to retrieve (page number) 40 --page_id string the page to retrieve (page ID) 41 -P, --per_page uint the number of records to request on each page (default 1000) 42 -s, --sleep float seconds to sleep between requests (default 0.25) 43 -H, --ether specify value in ether 44 -o, --cache force the results of the query into the cache 45 -D, --decache removes related items from the cache 46 -x, --fmt string export format, one of [none|json*|txt|csv] 47 -v, --verbose enable verbose output 48 -h, --help display this help screen 49 50 Notes: 51 - An address must be either an ENS name or start with '0x' and be forty-two characters long. 52 - Portions of this software are Powered by Etherscan.io, Covalent, Alchemy, TrueBlocks Key APIs. 53 - See slurp/README on how to configure keys for API providers. 54 - The withdrawals option is only available on certain chains. It is ignored otherwise. 55 - If the value of --source is key, --parts is ignored. 56 - The --types option is deprecated, use --parts instead. 57 ``` 58 59 Data models produced by this tool: 60 61 - [appearance](/data-model/accounts/#appearance) 62 - [function](/data-model/other/#function) 63 - [monitor](/data-model/accounts/#monitor) 64 - [parameter](/data-model/other/#parameter) 65 - [slurp](/data-model/other/#slurp) 66 67 ### Adding provider API key 68 Call `chifra config edit` to edit the configuration file. 69 70 For TrueBlocks Key, add `keyEndpoint = "your-key-endpoint-url"` to `chains.mainnet` section. 71 72 For all other providers add an entry to `keys` section like this: 73 ```toml 74 [keys] 75 [keys.etherscan] 76 apiKey = "etherscan-apikey" 77 [keys.covalent] 78 apiKey = "covalent-apikey" 79 [keys.alchemy] 80 apiKey = "alchemy-apikey" 81 ``` 82 83 ### Other Options 84 85 All tools accept the following additional flags, although in some cases, they have no meaning. 86 87 ```[plaintext] 88 -v, --version display the current version of the tool 89 --output string write the results to file 'fn' and return the filename 90 --append for --output command only append to instead of replace contents of file 91 --file string specify multiple sets of command line options in a file 92 ``` 93 94 **Note:** For the `--file string` option, you may place a series of valid command lines in a file using any 95 valid flags. In some cases, this may significantly improve performance. A semi-colon at the start 96 of any line makes it a comment. 97 98 **Note:** If you use `--output --append` option and at the same time the `--file` option, you may not switch 99 export formats in the command file. For example, a command file with two different commands, one with `--fmt csv` 100 and the other with `--fmt json` will produce both invalid CSV and invalid JSON. 101 102 *Copyright (c) 2024, TrueBlocks, LLC. All rights reserved. Generated with goMaker.*