I am a newbie to TEAL and smart contracts on Algorand. After reading through the documentation I have some fair idea about how the ASC1 works. So the question would be, I am designing a smart contract system where all the nodes create a transaction with their own separate hash value(hash value to some important data) in the note field which could to be fetched later by other nodes. Later for a node other than the transaction creator to fetch this data in the note field I want to create a contract which checks the cost set by the transaction creator and pays them to receive this data.
I am not aware if we can have such a complex logic build into TEAL. It’s more of a vending system where the nodes pay to receive this data from the transactions created by the owners. And if possible not to pay twice if the data is already paid for.