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

decode oracle query and response #170

Open
marc0olo opened this issue Jul 6, 2021 · 6 comments
Open

decode oracle query and response #170

marc0olo opened this issue Jul 6, 2021 · 6 comments
Assignees
Labels
enhancement New feature or request oracles

Comments

@marc0olo
Copy link
Member

marc0olo commented Jul 6, 2021

I am currently not sure if we provide the possibility to decode oracle query and response

example response on a local network:

{
    "fee":1,
    "id":"oq_236trganQBWAFHVMFXeCYs9UXepP4PDRFPDFpcfBgCkscxCWvP",
    "oracle_id":"ok_HajZQyGa9xS8cnDir5fbUdqtiopKtfrsaAN6igm4WA2QscjLE",
    "query":"ov_fWhvdyBpcyB0aGUgd2hlYXRoZXIgb3ZlciB0aGVyZT/9qmTc",
    "response":"or_IXN1bm55ID0pxKdUsg==",
    "response_ttl": {"type":"delta","value":100},
    "sender_id":"ak_Gs2f7rXDWUPnqemp89oN1Tsi8eYGDkafAC1gbbB2xrdhmuZbs",
    "sender_nonce":1,
    "ttl":12108
}
@marc0olo marc0olo added enhancement New feature or request oracles labels Jul 6, 2021
@marc0olo
Copy link
Member Author

marc0olo commented Aug 1, 2021

@marc0olo
Copy link
Member Author

marc0olo commented Aug 1, 2021

ok, I remember now the showcase project for the maven-plugin. somehow the response isn't like expected.

image

the following check fails for some reason:

@marc0olo
Copy link
Member Author

marc0olo commented Aug 1, 2021

seems like we get different results when returning sunny =) as response in delegated oracle responses within contracts vs. providing them directly

delegated response (using smart contract function to provide answer)
or_IXN1bm55ID0pxKdUsg==

direct response
or_c3VubnkgPSkesJvd

@marc0olo
Copy link
Member Author

marc0olo commented Aug 1, 2021

Opened an issue for that: aeternity/aeternity#3696

@marc0olo
Copy link
Member Author

marc0olo commented Aug 2, 2021

@mitch-lbw do you want to tackle this? :D

we might consider removing the automated decoding as this can be different based on the ABI of the oracle and instead provide a decode method that let's the user provide an ABI version for decoding

@marc0olo marc0olo assigned mitch-lbw and unassigned marc0olo Aug 18, 2021
@marc0olo
Copy link
Member Author

@mitch-lbw I am handing this over to you. I think this is one of the things with lowest priority for the moment. we could add this in a minor release after 3.0.0 has been released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request oracles
Projects
None yet
Development

No branches or pull requests

2 participants