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

getting smart contract results from logs #1163

Closed
wants to merge 3 commits into from

Conversation

gfusee
Copy link
Contributor

@gfusee gfusee commented Jul 13, 2023

Hey!

Sometimes, for a reason I ignore, the smartContractResults field is not present in the proxy's /transactions/:txHash?withResults=true endpoint, despite the transaction actually have results. In this case we can get them from logs.

In order to handle this I changed the way you parse the response.

Just a word the issue_non_fungible_new_token_identifier function. The previous signature was Result<String, TxResponseStatus>, but the function either finish with Ok(...) or never finish (panic via the macro or via forced unwrapping). I might miss something here.
I would have changed the signature to Option<String> (and so removing the Result<...>), but I saw in the multisig_interact_nfts.rs and interactor_sc_call.rs files that you are printing the error, so I think you plan to implement it later? So finally I left the Result as is and the output is Result<Option<String>, TxResponseStatus>

@andrei-marinica
Copy link
Contributor

The actual fix was a lot more complicated than that.

Was fixed in #1165

@gfusee
Copy link
Contributor Author

gfusee commented Jul 17, 2023

unfortunately this is not fixed yet, #1165 fixes the panic that occurs when smartContractResults is not present, this is only the half of the required fix

it doesn't fixes the fact that no smartContractResults != no contract result, in order to get results in this case we must check into logs like I did in this PR

@gfusee gfusee mentioned this pull request Jul 24, 2023
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

Successfully merging this pull request may close these issues.

2 participants