Is it possible for a smart contract to access swarm-content to perform an operation? For example, lets say a user uploads a document to swarm. I would then like to take access the contents of the document from a smart contract to perform some computation on the contents of the document.
2 Answers
It is not possible. Smart contracts can only interact with data that is in EVM state.
-
Technically you can maintain a datastore on just the EVM since the contracts are in some sense forever living. When would you choose to use swarm over the EVM? Are there privacy and security benefits to using swarm?– RagHavenJan 21, 2018 at 0:19
You could store the hash of a related content with your data in the smart contract though, allowing for application logic which can access swarm to process this association.