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

cast tx --raw should format typed txs as enveloped encoded txs #6326

Closed
mattsse opened this issue Nov 16, 2023 · 4 comments
Closed

cast tx --raw should format typed txs as enveloped encoded txs #6326

mattsse opened this issue Nov 16, 2023 · 4 comments
Labels
good first issue Good for newcomers T-feature Type: feature

Comments

@mattsse
Copy link
Member

mattsse commented Nov 16, 2023

Component

Cast

Describe the feature you would like

currently

/// Print the raw RLP encoded transaction.
#[clap(long, conflicts_with = "field")]
raw: bool,

which adheres to the help message:

Ok(if raw {
format!("0x{}", hex::encode(tx.rlp()))

however this does not include the type identifier for typed txs.
usually "raw", like in eth_sendRawTransaction refers to the EIP-2718 typed transaction envelope format

ref https://eips.ethereum.org/EIPS/eip-2718

TODO

  • change help message
  • format typed txs in developed format (prefix with with type byte)

cc @DaniPopes

Additional context

No response

@mattsse mattsse added the T-feature Type: feature label Nov 16, 2023
@gakonst gakonst added this to Foundry Nov 16, 2023
@github-project-automation github-project-automation bot moved this to Todo in Foundry Nov 16, 2023
@mattsse mattsse added the good first issue Good for newcomers label Nov 16, 2023
@DaniPopes
Copy link
Member

DaniPopes commented Nov 16, 2023

The .rlp() is already prefixed with the TX type, should it also be prefixed with the RLP header?
cc @Rjected
ref #6327

@Rjected
Copy link
Contributor

Rjected commented Nov 16, 2023

There shouldn't be an RLP header before the type byte for eth_sendRawTransaction

@bernard-wagner
Copy link
Contributor

I wrote the cast tx --raw code and have been using it with eth_sendRawTransaction and comparing the results with https://etherscan.io/getRawTx?tx=0x.

Is this still an issue or can we close it? If some work is still needed, happy to look at it again.

@DaniPopes
Copy link
Member

I think there was a misunderstanding when this issue was opened

@DaniPopes DaniPopes closed this as not planned Won't fix, can't repro, duplicate, stale Nov 21, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in Foundry Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers T-feature Type: feature
Projects
Archived in project
Development

No branches or pull requests

4 participants