1

In the documentation here under the eth_sendTransaction, it shows/states that in the transaction object sent, there is an input field.

But in the documentation here it says there is a data field.

My question is, which is correct? When crafting a transaction object, under what field should information about arguments and which methods on the smart contracts to be invoked included in? data field? or input field?

2 Answers 2

0

data, input and topics can be used to display methods and their argument datas used in each transaction.

In regards to

methods on the smart contract to be invoked

..it isn’t necessary to contain this information in the various fields within a transaction object. This can be plainly viewed in the contract ABI.

2
  • this does not answer the question though Jan 26 at 11:11
  • “ When crafting a transaction object, under what field should information about arguments and which methods on the smart contracts to be invoked included in? data field? or input field?” - in direct answer to your question: neither data or input field are used to display “methods on the smart contract to be invoked”
    – immaxkent
    Jan 26 at 12:28
0

If you are calling eth_sendTransaction it looks like geths rpc can accept either, I personally have only done it under data though

https://github.com/ethereum/go-ethereum/blob/c2db667c8f824ec0d025cbde95e6aaad67fc10ba/internal/ethapi/transaction_args.go#L37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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