2

I have function in a smart contract that needs to know a specific value from the metadata which I will publish on IPFS. Is there a way to parse it through or to get the value from the metadata?

thanks!

thebig Dev
  • 21
  • 2

2 Answers2

1

This is not possible, because it would violate the deterministic principle of a blockchain.

More information in this answer.

Mikko Ohtamaa
  • 22,269
  • 6
  • 62
  • 127
1

You would have to use oracles to access such data. Here an example for such an oracle: https://blog.chain.link/fetch-ipfs-api-data-token-distribution/

Richard
  • 4,934
  • 2
  • 7
  • 25