-
Notifications
You must be signed in to change notification settings - Fork 146
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
MsgVoteWeighted issue #187
Comments
are there decimal types in this message? Sometimes you have to deal with decimals in a special way |
In the CLI command the vote weights are decimals with 18 places. keplr expects the transaction message as i posted above or else it errors that it cant parse the weight into a big int. Im constructing the message as such
and then im returning the values here
|
Thanks @pyramation , maybe you didn't see this message i sent earlier on TG but the dig issue wasn't the same as the issue i am having with the weighted vote and unjailing tx. None of the transactions from my application work on dig but i think that's separate. |
oh! sorry @faddat for tagging you! @chalabi2 — I think you may want to checkout the https://github.com/osmosis-labs/telescope#typings-and-formating docs, you'll see the I think that may solve the issue? |
I have to regenerate the codegen directory with telescope and include that parameter to true in a telescope config file before i regenerate? |
The main error i cant get around is
when signing and broadcasting a weighted vote or unjail transaction. I have the incorrect values in Other people experiencing similar issues with cosmjs |
yea so you'll want to regenerate by adding the new config, and that should help with the decimal issue. example telescope config: https://github.com/osmosis-labs/osmojs/blob/main/packages/osmojs/scripts/codegen.js |
I have a function that creates the transaction data for a MsgWeightedVote and uses stargate to sign and broadcast via any wallet provider ala cosmology tools.
Im receiving
Eror: Broadcasting transaction failed with code 4 (codespace: sdk). Log: signature verification failed; please verify account number (87516), sequence (479) and chain-id (osmosis-1): unauthorized
at SigningStargateClient.broadcastTx
Typically this error is my own fault but ive gone over the parameters and they are all correct.
I read the issue from last year for MsgWeightedVote about inputting the correct number type for the weights.
The unsigned transaction is as follows
{
"account_number": "87516",
"chain_id": "osmosis-1",
"fee": {
"gas": "500000",
"amount": [
{
"denom": "ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2",
"amount": "888"
}
]
},
"memo": "",
"msgs": [
{
"type": "cosmos-sdk/MsgVoteWeighted",
"value": {
"options": [
{
"option": 1,
"weight": "500000000000000000"
},
{
"option": 2,
"weight": "500000000000000000"
}
],
"proposal_id": "493",
"voter": "osmo1dv3v662kd3pp6pxfagck4zyysas82adswgl2jf"
}
}
],
"sequence": "479"
}
I am using cosmos-kit from cosmology but I do not believe that is whats causing the issue as my normal vote transactions are working fine.
Please let me know if this is not the appropriate forum for this type of question
side-note: I get the same error with my unjail tx, figure whatever im doing wrong here I am also doing wrong there.
The text was updated successfully, but these errors were encountered: