ethereum / eth-account

Account abstraction library for web3.py
http://eth-account.readthedocs.io/
MIT License
269 stars 156 forks source link

Unable to get raw transaction using `serializable_unsigned_transaction_from_dict` and `encode_transaction` #169

Closed pastet89 closed 2 years ago

pastet89 commented 2 years ago

I am trying to get the raw transaction hex from transaction values as discussed here: https://github.com/ethereum/eth-account/issues/106

I am using the sample code of recover_raw_transaction. However, I am getting different results.

For example. The transaction fields of 0x784fed92b7eae2853dd7a22460760613c5345ad97aff660d26c657e9f19c6a3d, when submitted to the same function recover_raw_transaction gives me this hex:

0xf90bb3698510f829fe5f8304516a947f268357a8c2552623316e2562d90e642bb538e58804d78ab392224000b90b44ab834bab0000000000000000000000007f268357a8c2552623316e2562d90e642bb538e5000000000000000000000000355a02e8b17c1cfe6d8cf3aff22cedb5de71d43c0000000000000000000000007b179130db6866b5c7641edfb3acf4b8505b9e6e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000baf2127b49fc93cbca6269fade0f7f31df4c88a7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007f268357a8c2552623316e2562d90e642bb538e50000000000000000000000007b179130db6866b5c7641edfb3acf4b8505b9e6e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000005b3256965e7c3cf26e11fcaf296dfc8807c01073000000000000000000000000baf2127b49fc93cbca6269fade0f7f31df4c88a70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002ee00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004d78ab392224000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000629a483400000000000000000000000000000000000000000000000000000000000000001431b814afd17a5f26b860da146a2d6a04aaa2cefd9ef37f463da136184fc39900000000000000000000000000000000000000000000000000000000000002ee00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004d78ab3922240000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006299ebcc0000000000000000000000000000000000000000000000000000000062c178b084f7ea6508ce9056dccc567b20eb9743469fa8f91a135ad264b024d277466bdc0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000006a000000000000000000000000000000000000000000000000000000000000007c000000000000000000000000000000000000000000000000000000000000008e00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000b200000000000000000000000000000000000000000000000000000000000000b20000000000000000000000000000000000000000000000000000000000000001b000000000000000000000000000000000000000000000000000000000000001bdebcb32f46d4b7fec1baf8246ae4d8cbe9b6bd65ec722147c6a57686763688cf1aa7e0157092d119adbdd26ad95710ac6a3ea535b1bb4cb97fa8d53a4a2b2b1ddebcb32f46d4b7fec1baf8246ae4d8cbe9b6bd65ec722147c6a57686763688cf1aa7e0157092d119adbdd26ad95710ac6a3ea535b1bb4cb97fa8d53a4a2b2b1d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e4fb16a5950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000355a02e8b17c1cfe6d8cf3aff22cedb5de71d43c0000000000000000000000003cf57cc9cf5263748c6f926ff498ac0c6f95b26e0000000000000000000000000000000000000000000000000000000000000d84000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e4fb16a5950000000000000000000000007b179130db6866b5c7641edfb3acf4b8505b9e6e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000003cf57cc9cf5263748c6f926ff498ac0c6f95b26e0000000000000000000000000000000000000000000000000000000000000d84000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e400000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e4000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080a0ef0e56ebcd61718201cf16182afc5d87b7550ebe564774f336d411315bf8ca1aa05ffbde780418c0d0d39a973d44dd7e30ec2519c2bd2a3b89dc8e44cb24ec0fb2

while I should get:

https://etherscan.io/getRawTx?tx=0x784fed92b7eae2853dd7a22460760613c5345ad97aff660d26c657e9f19c6a3d

The hex is quite close but on multiple places it is still different.

Do you have any idea why is that and how can I fix it? @Pet3ris