1

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 2

1

It is not possible. Smart contracts can only interact with data that is in EVM state.

1
  • 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?
    – RagHaven
    Jan 21, 2018 at 0:19
0

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.

Your Answer

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

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