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

I can't get transaction raw data from hash in ethers v6 #4852

Open
jonnyassist79 opened this issue Oct 2, 2024 · 2 comments
Open

I can't get transaction raw data from hash in ethers v6 #4852

jonnyassist79 opened this issue Oct 2, 2024 · 2 comments
Assignees
Labels
investigate Under investigation and may be a bug. v6 Issues regarding v6

Comments

@jonnyassist79
Copy link

Ethers Version

6.7.1

Search Terms

raw transaction data from hash

Describe the Problem

I am trying to get transaction raw data from tx hash. But I can't find any documentation or code for v6.

Code Snippet

const ETHEREUM_RPC_URL = "https://ethereum-sepolia-rpc.publicnode.com"
// Standard json rpc provider directly from ethers.js (NOT Flashbots)
const provider = new JsonRpcProvider(ETHEREUM_RPC_URL,11155111)


const tx = await provider.getTransaction("0x1bffb6dd405e8d9ce35f99eb7ed1f9b64537a0de2d73f22ba99a6726d50cb1a3");

Contract ABI

No response

Errors

No response

Environment

No response

Environment (Other)

No response

@jonnyassist79 jonnyassist79 added investigate Under investigation and may be a bug. v6 Issues regarding v6 labels Oct 2, 2024
@jasonandjay
Copy link

It seems that your code is correct. Did you encounter any errors? Can you add more information? The relevant code and documents have not changed much.

@ricmoo
Copy link
Member

ricmoo commented Oct 16, 2024

You should be able to use the Transaction class if you are looking for the serialized data: Transaction.from(await providers.getTransaction(hash)).serialized if I understand your question correctly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigate Under investigation and may be a bug. v6 Issues regarding v6
Projects
None yet
Development

No branches or pull requests

4 participants
@ricmoo @jasonandjay @jonnyassist79 and others