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

Calculate txHash in evm module #140

Open
Wangmmx opened this issue Jul 29, 2021 · 3 comments
Open

Calculate txHash in evm module #140

Wangmmx opened this issue Jul 29, 2021 · 3 comments

Comments

@Wangmmx
Copy link

Wangmmx commented Jul 29, 2021

How can I calculate TxHash in evm module?
I have seen the method in https://github.com/okex/exchain-go-sdk/blob/87a4af69f9ab4deebecf24b3d14b7697068becd0/module/evm/utils.go#L12

Now I get the serialized transaction body of the evm type. The hash calculated according to the eth method is wrong. What is the difference between the hash calculation of okt and eth, I hope to make the smallest changes to support it in okt

@Wangmmx
Copy link
Author

Wangmmx commented Jul 29, 2021

@RevelationOfTuring

@Wangmmx
Copy link
Author

Wangmmx commented Jul 29, 2021

I have calculated txHash before by using encode api and sha256 the result like cosmos, okx/exchain#659
But now, the encode api always got error when I called it. Can I still use it in evm module?

@RevelationOfTuring
Copy link
Contributor

@Wangmmx hi, u can follow the article step by step:https://forum.okt.club/d/168-go-sdktxhash

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

No branches or pull requests

2 participants