3

I know that users can send data to Solana Programs and retrieve data from Solana Programs. I am curious if we are able to make network calls inside Solana Programs. Assume a user interacted with program and sent a required data to call an API. Let's say user sent string "California". Can we make a network call to a weather API and return weather data?

1
  • By the way I'm aware weather example is irrelevant and there is no point of doing that. It is just an example to solidify what I am trying to ask.
    – curiosity
    Commented Jul 17, 2022 at 14:52

1 Answer 1

8

No. It is impossible to do IO tasks like network requests deterministically. There are many ways that the behavior of the request could change from one validator to another

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.