-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
README lacks good examples #115
Comments
On Feb 11, 2021, at 4:26 PM, MattDodsonEnglish ***@***.***> wrote:
I think the README would benefit from having one or two examples of
how to use the utilities in more complex ways. Outside of checking the version, the only current
example is getBlock 100. This is a start, but it's pretty simple.
Totally agree. One note before proceeding. All examples should be `chifra <tool>` and not <tool>. getBlock is tool, chifra blocks is how the examples should be
There are an infinite number of possibilities, some quite complex.
For example,
chifra names -c Vitalik
Returns one of Vitalik Buterins well-known early accounts
chifra names -c Vitalik --no_header
Remove the header
chifra names -c Vitalik --no_header | cut -f2
Extracts the address only.
On bash,
chifra state `chifra names -c Vitalik --no_header | cut -f2`
returns the current balance of that account in wei.
chifra state --ether `chifra names -c Vitalik --no_header | cut -f2`
Returns the same balance in ether.
chifra state --dollars `chifra names -c Vitalik --no_header | cut -f2`
Returns the balance in US dollars
chifra names Dai Stablecoin ERC20
Returns the address of the DAI stable coin
chifra tokens 0x6b175474e89094c44da98b954eedeac495271d0f 0x5ed8cee6b63b1c6afce3ad7c92f4fd7e1b8fad9f
Returns the balance of DAI stable coins in Vitalik’s address
And there’s a million more examples.
rA good example would describe a use case that's more complex (while still being
fairly plausible/common.) For example, if you look at the man page for rsync.
there are lots of examples that have multiple options and multiple arguments. That
really helps us hit the ground running.
I think it’s an excellent idea to use great examples of man pages as the basis for our help. I don’t know if you’ve ever seen a program called IPFS (if not, you should check it out and download it). It has the best ‘onboarding’ of any project I’ve ever seen. It’s a command line tool with a top-level command (ipfs) with subcommands, etc. Really well done.
Besides that, I'm a little confused about what all the utilities are and how
to find them. I see that I can use <command> --help but I was getting tired
of doing that, and then I kept forgetting what I'd read :-).
A user familiar with the Ethereum data will better understand. Each command is named after a common part of the data — blocks, transactions, receipts, logs, traces, names, tokens, state, abis. These are all pretty familiar terms to users of Ethereum data.
One other thing on this point. Most users probably won’t be quite so low level as the command line ‘chifra’ commands. Most will use the API and/or front end provided by the docker image and explorer respectively.
Is there any location where all the utilities are listed in one place?
There used to be — at the top level README file that you’re editing, but I removed all that so I could get to the introductory material.
The folder structure along with a short explanation of each folder is below. The location for all utilities listed in one place (and the ultimate documentation) might parallel this structure
..
… If
so, I think that should go on the README too.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
|
From Mike Ghen: Here are some additional export command examples I think would be helpful in the docs: All mints from a token, would appear as inbound transfers from address(0) (TrueBlocks/trueblocks-core#3301 (comment)) I hired someone to write the website, so I don't know everything about it. As you looked at our website, where did you find any existing example (if you found any at all on the website). If you didn't find any existing examples on the website, where did you find them. The reason I'm asking is because I'm looking for the most likely place to put new examples to make it easier for people. |
@tjayrush Here's where I was looking for examples: https://trueblocks.io/chifra/using/, the tutorial. I also think it would be helpful under the |
I think the README would benefit from having one or two examples of
how to use the utilities in more complex ways. Outside of checking the version, the only current
example is
getBlock 100
. This is a start, but it's pretty simple.A good example would describe a use case that's more complex (while still being
fairly plausible/common.) For example, if you look at the man page for
rsync
.there are lots of examples that have multiple options and multiple arguments. That
really helps us hit the ground running.
Besides that, I'm a little confused about what all the utilities are and how
to find them. I see that I can use
<command> --help
but I was getting tiredof doing that, and then I kept forgetting what I'd read :-).
Is there any location where all the utilities are listed in one place? If
so, I think that should go on the README too.
The text was updated successfully, but these errors were encountered: