0

I know that we can interact between smart contract and runtime (and vice versa) but I can not find a way that I can fetch data from API (in off-chain worker pallet) and pass those data to the smart contract (written by ink).

Do you guys have any ideas?

Thank you!

1 Answer 1

1

I'm afraid there might not be any way to fetch data from API (off-chain worker pallet) and pass those data to the ink smart contract but there is phala network where they have done Phat Contract Oracle Workshop which you can find here.

After this workshop, you will learn:

  1. What the Phat Contract offchain computing is and how it can help build oracles.
  2. Fetch and process arbitrary data with HTTP(s) requests
  3. Integrate to a Substrate blockchain
  4. Implement the oracle in ink!

There are two section section two will coming soon. Tho it's incomplete but still Phat contract or phala network is the way to to fetch off-chain data.

1
  • Thank you for your answer. I've already known about Phat Contract but it is not the thing that I am finding as my data may be exposed to the world I think. Feb 7, 2023 at 16:55

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.