In other words, say In Python I have something like that:

signed_txn = w3.eth.account.signTransaction(dict(
    gasPrice = w3.eth.gasPrice, 
    gas = 100000,


the "data" element above simply holds a sha3 conversion of the transfer function + its 2 arguments (send address and amount), as described by this chap here:


I simply need a way to send the function call to contract via 'simple' way in bytes that I can get from Remix, instead of manually writing the call programically? Thanks!

  • I found this on chinese website, apparantly i am on the right track which leads to a new question - do i need to put '0x' in the beginning of data? jianshu.com/p/496c9d833df9
    – Robert Ggg
    Nov 4, 2019 at 19:10
  • Yes, because that is hex-encoded data. Apr 10, 2020 at 11:17

1 Answer 1


The to need to be the contract address. And yes, data has to start with 0x.

Your Answer

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

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