hyperweb-io / hyperweb-io/create-cosmos-app

[tx-simulate] how to get the txBytes data

Open
#99 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
166
Forks
53
PR merge metrics
No merged PRs in 30d

Description

**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](https://user-images.githubusercontent.com/37969603/233707633-30ee16dd-9f0e-450a-87e7-7590ce0ec48b.png)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.