For Bitcoin, I can use this site to find the hex encodings of raw Bitcoin transactions. Where can I find something similar for Ethereum?
2 Answers
Infura has a developer API to return the raw data in JSON.
To get the list of available methods: https://api.infura.io/v1/jsonrpc/mainnet/methods
Example URL to get the JSON for one specific Tx: https://api.infura.io/v1/jsonrpc/mainnet/eth_getTransactionByHash?params=[%220xf97e9dcf0645e4686ec6ae8cecfe79bd945fe65bab12ec78c7d039916f8f3d81%22]
Etherscan also has a dev API, but you need to create an account and API key
- 670
- 1
- 5
- 12
You can use etherscan.io for this!
Look up an Ethereum transaction using the transaction ID. Like this for txid=0xd1844c003fc2531625538800e2f7824b4913be73f34765472ad6fb547d0ce2df.
Then find a button called "Tools & Utilities" in the top right corner of the box containing the transaction information. Use this button to choose "Get Raw TxHash". Then you will end up on a page like this which reveals the hex encoded raw transaction.
In this example, the raw transaction is:
0xf86b808512a05f200082520894cf1838b517247ebdfd0e6db3c00d386e45bb808d8711c37937e080008026a01c0883e251dd34a0b1864618ac73483f8ece1b619d97525fabd821a111c2a7e9a018342cda6471ac519e9a5034fc65b644afa2a78bcff84c88b48185429376c7e4
- 4,220
- 2
- 16
- 38
input(data) portion which has the method signature and parameters? You want the entiresendRawTransaction()encoded message? – Adam Kipnis Dec 29 '17 at 17:59