Hello,
I’m a bit new to solidity, so let me know if I am misunderstanding something.
I want to use Moralis data in a Smart Contract. Specifically, I want to run some queries about the data and then determine who would get a prize of AVAX, and store that value on the contract.
I am not sure how to approach this.
I do not want to query this information client-side because I do not want the possibility of the client manipulating it.
So here’s some ideas
- Query Moralis from the smart contract (Oracle), but I can’t find any tutorials of contracts pulling Moralis API…only things like Chainlink. Not sure if it’s even possible.
- Query in cloud code. I saw a thread that seems to say we can run contract function from cloud code, but I don’t see how you could have a client sign a transaction if we are using cloud code. Mostly I see the utility of getting data from the contract…so I don’t know how helpful that would be.
- Send the data to the contract on a regular basis. This would be executing a contract function to store data on the contract from moralis.
Are there other options? Which is sensible?