I want to create a smart contract and when I transfer coin on it, it's automatically update on the DataBase (I use Cassandra), so you do your things on the website with it and you can win or loose some coin, the when it went about the withdraw, how can I retreive the data from the DB to know how many coin this address can withdraw ?
2 Answers
You could create an API service that writes the info to your DB, and call it from your smart contract using Chainlink's API oracle to connect your smart contract with the outside world.
-
1
You could use this: Alchemy Notify, it creates a subscription that can call webhooks whenever transactions happen within your contract