Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hash of signed transaction #90

Open
brandonm78 opened this issue May 30, 2024 · 6 comments · May be fixed by #91
Open

hash of signed transaction #90

brandonm78 opened this issue May 30, 2024 · 6 comments · May be fixed by #91

Comments

@brandonm78
Copy link

In my script I have:

let hash = new_transaction.hash()

after I sign the transaction but am not getting the same hash on etherscan. How do I generate the correct transaction hash? It seems like the transaction hash I am getting is perhaps from pre-signing and its not updating.

@synlestidae
Copy link
Owner

Thanks for raising this. Could you reply with a complete Rust snippet that I can run, to re-create the problem?

I'm not familar with etherscan but if you could also show the result there that would be handy. Or anything to compare the result from this library.

If there is a bug with the library I will want to fix it immediately

@brandonm78
Copy link
Author

brandonm78 commented May 31, 2024 via email

@synlestidae
Copy link
Owner

Thank you, that is helpful. I am surprised the hash is coming out wrong. Aiming to fix soon

@synlestidae synlestidae linked a pull request Jun 4, 2024 that will close this issue
@synlestidae
Copy link
Owner

I have tried out sha3's hasher, as you showed in your example. I noticed that the tests still pass, indicating we are getting the same result 🤔

@synlestidae
Copy link
Owner

The hash() is 100% the pre-signed hash though - maybe the library needs an update as it being confused with the signed transaction hash. e.g. separate unsigned_hash() and signed_hash() to make it less confusing

@brandonm78
Copy link
Author

brandonm78 commented Jun 21, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants