Skip to content
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

seth feature parity #29

Closed
gakonst opened this issue Sep 21, 2021 · 25 comments
Closed

seth feature parity #29

gakonst opened this issue Sep 21, 2021 · 25 comments
Labels
C-cast Command: cast good first issue Good for newcomers

Comments

@gakonst
Copy link
Member

gakonst commented Sep 21, 2021

Problem & Context

Currently, cast and its cli are not at feature parity with seth.

All of Seth's commands can be found here, and the so far implemented cast commands can be found here.

Solution

Pick any of the commands that are not implemented, and go for it!

Some reference PRs on how this was done for other commands for newcomers can be seen below:

@odyslam
Copy link
Contributor

odyslam commented Dec 21, 2021

@gakonst let's make this a good first issue and rename it to cast.

@gakonst gakonst added the good first issue Good for newcomers label Dec 21, 2021
@raxhvl
Copy link
Contributor

raxhvl commented Dec 21, 2021

Can a Rust newbie take this up?

@gakonst
Copy link
Member Author

gakonst commented Dec 21, 2021

Yes! These are small self-contained commands, so shouldn't require much. Take a look at the PRs linked in the OP for guidance. Also happy to review.

@raxhvl
Copy link
Contributor

raxhvl commented Dec 23, 2021

Update: I'm working on this. I'm an absolute beginner, please allow me some time.

@odyslam
Copy link
Contributor

odyslam commented Dec 23, 2021

Update: I'm working on this. I'm an absolute beginner, please allow me some time.

I have started working on this as well. Perhaps we can coordinate and not implement the same functionality.

I have opened a draft PR while I work on it #284 and I note what I work on. Perhaps you can do as well or write a reply there?

@mds1
Copy link
Collaborator

mds1 commented Jan 18, 2022

I'll add comments to this issue for features that I've noticed are missing as I attempt to replace seth with cast during my normal usage:

@psushi
Copy link
Contributor

psushi commented Feb 4, 2022

I'm working on cast index, after implementing exaclty what seth does, we can discus how to improve the syntax.

mattsse pushed a commit that referenced this issue Feb 5, 2022
* feat(cast): Implemented cast index (seth feature parity #29)

* made the suggested changes after review #676
@tynes
Copy link
Contributor

tynes commented Mar 7, 2022

There are 2 reasons why I still use seth over cast

  1. --rpc-url defaults to http://localhost:8545 without needing to set an env var, so I can omit adding it when I port forward my remote geth node
  2. The table response is pretty printed (ie hex strings are turned into integers, easier for human consumption)

@onbjerg
Copy link
Member

onbjerg commented Apr 8, 2022

  • cast send --create is missing as well

@onbjerg
Copy link
Member

onbjerg commented Apr 22, 2022

Seems like the last two remaining items are cast send --create and I256 support?

@tynes
Copy link
Contributor

tynes commented Apr 22, 2022

Seems like the last two remaining items are cast send --create and I256 support?

cast ls and cast accounts are missing as well. It's convenient to know which wallets you currently have access to. I do think the commands can be improved upon

@mds1
Copy link
Collaborator

mds1 commented Apr 22, 2022

Other features missing, from comparing the outputs of seth and cast

  • --from-ascii
  • bundle-source, though I don't think we need this one
  • logs
  • mktx
  • sign
  • solc

I'm not sure how many of these are used so we may not care about getting exact parity.

@gakonst
Copy link
Member Author

gakonst commented Apr 22, 2022

sign exists under "cast wallet"

@onbjerg
Copy link
Member

onbjerg commented Apr 23, 2022

solc

What is this one?

--from-ascii

We do have this one 😄

@mds1
Copy link
Collaborator

mds1 commented Apr 23, 2022

Ah, --from-ascii doesn't show up when running cast -h, but yes just confirmed it is there under an alias for --from-utf8

solc lets you "compile a single file using a default --standard-json input"

@onbjerg
Copy link
Member

onbjerg commented Apr 23, 2022

Not sure we want that necessarily? 🤔

@mds1
Copy link
Collaborator

mds1 commented Apr 23, 2022

I've personally never used it and would be ok not adding it proactively, and perhaps we wait until its requested and discuss then?

@onbjerg
Copy link
Member

onbjerg commented Apr 23, 2022

Ok so to sum up:

  • cast accounts/cast ls (they could just be merged into cast wallet ls?)
  • cast send --create
  • cast logs
  • cast mktx

Optionally also cast bundle-source but there probably isn't a lot of usage for that command. Seems like seth bundle-source was primarily used to get source maps for seth run-tx and the DappTools debugger, but we should try to make this automatic or push Etherscan to include source maps in their API.

@tynes
Copy link
Contributor

tynes commented Apr 24, 2022

There is another command that could be useful - seth rpc which doesn't seem to completely work when passing args, but it does work when the RPC accepts no arguments. This would be useful to call RPCs that don't already have cast commands. I think something like this would be helpful to cut out the curl -H ... boilerplate.

cast rpc <rpc-method> <arg 1> <arg 2> ...

Delineating between types here would need to be handled, for example strings vs numbers. geth will only accept numbers at times, not strings of numbers. So strings would need to be explicit, like '"3"' would be a string and "3" or 3 would be a number. The response json could return the jsonrpc result field and it could be easily composed with jq

@henry-hz
Copy link

Hi :) Does cast run remote debugging with custom source ? In the example below, it's possible to start the debugger in FUSE network without the need of Etherscan.

seth run-tx --debug 0xc3b63ab002d4a16fe95566a9c0816fab6cf07ac9867bd5ad1319095cef13b9a2 --source out/dapp.sol.json

@onbjerg
Copy link
Member

onbjerg commented May 23, 2022

I'm not entirely sure I understand - you want to optionally use local sources for decoding with cast run? I don't think this is currently possible - feel free to open up a feature request so we can track it better :)

@henry-hz
Copy link

@onbjerg exactly, many side-chains does not have direct support to retrieve the source code from etherscan, so adding the source code of the deployed contract on the path is how seth is doing.

@gakonst
Copy link
Member Author

gakonst commented May 24, 2022

Makes sense - we don't have support for this yet, let's track in a separate feature issue (pls open one @henry-hz) and we can discuss there

@henry-hz
Copy link

henry-hz commented Jun 2, 2022

Ok!
Done

#1723

@onbjerg onbjerg added this to the v1.0.0 milestone Jul 1, 2022
@onbjerg onbjerg removed this from the v1.0.0 milestone Aug 23, 2022
@onbjerg
Copy link
Member

onbjerg commented Aug 23, 2022

Closing, everything in here is implemented except cast mktx which is unplanned, and cast events/cast accounts that have separate issues

@onbjerg onbjerg closed this as completed Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cast Command: cast good first issue Good for newcomers
Projects
No open projects
Archived in project
Development

No branches or pull requests

8 participants