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

[tx-simulate] how to get the txBytes data #99

Open
marslavish opened this issue Apr 21, 2023 · 3 comments
Open

[tx-simulate] how to get the txBytes data #99

marslavish opened this issue Apr 21, 2023 · 3 comments

Comments

@marslavish
Copy link
Contributor

Context: I was fixing the max button issue from the stake-tokens example (to get the actual max amount which is the available balance minus the gas fee), and I noticed that Keplr uses this request /cosmos/tx/v1beta1/simulate to estimate the gas probably, but an uint8array type of data needs to be passed into the txBytes property

Question: how can I turn the transaction message (or any other data needed) into the uint8array data?

image

@webmaster128
Copy link

@pyramation
Copy link
Contributor

thank you @webmaster128 :)
cc @marslavish

@marslavish
Copy link
Contributor Author

Thanks! I'll check it out

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

3 participants