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

Consider returning raw transaction result in the predicate result payload #431

Open
MicaiahReid opened this issue Oct 4, 2023 · 0 comments

Comments

@MicaiahReid
Copy link
Contributor

MicaiahReid commented Oct 4, 2023

In addition, if we got the hex value of the response given by the function call like in blockchain api then it will be easier for us to deserializeCV.

@SushilBro, the blockchain API returns a transaction result like this:

"tx_result": {
   "hex": >"0x070c0000000302647801000000000000000000000022ecb25c0002647901000000000000000000000129b96a4b9>406737570706c790100000000000000000000011733124a14",
   "repr": "(ok (tuple (dx u150000000000) (dy u1278716038036) (supply u1199152712212)))"
 }

Chainhook attempts to deserialize the hex result and just returns:

"result": "(ok (tuple (dx u150000000000) (dy u1278716038036) (supply u1199152712212)))"

and if it fails to deserialize, it just returns the raw result.

Since we're already deserializing the transaction result, would you still need the hex so that you can deserialize it?

Originally posted by @MicaiahReid in #422 (comment)

@github-project-automation github-project-automation bot moved this to 🆕 New in DevTools Oct 4, 2023
@MicaiahReid MicaiahReid changed the title Consider returning raw transaction result Consider returning raw transaction result in the predicate result payload Oct 4, 2023
@andresgalante andresgalante moved this from 🆕 New to 📋 Backlog in DevTools Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant