0

I want read transations data "input" field from ethereum to file.How can i do it?thanks.

0

You can do that by creating a node script and using web3.js in it. Create an instance of the contract and using that instance use call the get methods. Then write that data to the database or make/open a file and write it there. Hope it helps. :)

0

Given a transaction hash, you can call eth_getTransactionByHash on any node. Here's an example of getting the input from a transaction via Etherscan's proxy API:

$ http get 'https://api.etherscan.io/api?module=proxy&action=eth_getTransactionByHash&txhash=0x71027a0605ac52827e3a13700898cc54cb6a69e320dca637a82ada30497c45be&apikey=YourApiKeyToken' | jq -r .result.input 0x0a3b0a4f000000000000000000000000d485137c45a968e7fee9249485ff07493c574d71

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.