-
Notifications
You must be signed in to change notification settings - Fork 346
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
add code property on the BroadcastTxSuccess interface. #878
Comments
Since the Please use For tests there is also |
I'll add this in 0.27.0 as there is nothing wrong with the suggestion. However, using |
Hmm, looking at it again, probably makes no sense to have different types here at all. |
That case means the transaction is accepted on chain but the execution failed. The naming of the type was confusing. It was renamed to DeliverTxResponse now. Please check the more recent versions of CosmJS. This should serve your use case better. |
Hi. I found weird things on @cosmjs/stargate/build/stargateclient.ts.
Looking at the results obtained through the following code, "code" property is included in both success and failure.
But, BroadcastTxSucess did not have a code property, so it was difficult to check whether it was successful. I can find it in the log, but it was not on the interface, so I added one line of code as follows, and I was able to get the desired result.
// on success
// on fail
{
code: 5,
height: 219901,
rawLog: 'failed to execute message; message index: 0: 1855527000ufct is smaller than 20000000000000000000000ufct: insufficient funds',
transactionHash: 'FDC4FB701AABD465935F7D04AE490D1EF5F2BD4B227601C4E98B57EB077D9B7D',
gasUsed: 54396,
gasWanted: 200000
}
I added one line code on the BroadcastTxSuccess.
So, I can figure out the transaction is success or not by compare code property below code.
What do you think about this?
The text was updated successfully, but these errors were encountered: