Sorry in advance if I do not make sense as I am a traditional developer now entering in Solidity/Smart Contract world.

For learning purposes, I want to build a simple online commerce system where buyers and sellers can interact with each other. When a buyer buys an item, instead of the amount goes instantly to the seller, I would like it to go in an escrow account(I guess the amount can be stored within a contract or I have to transfer to another Escrow Wallet?)

I am going to use Python/Django as a Web application along with MySQL. The thing which is not clear to me that how a smart contract function will fetch the data from Django and execute stuff? For instance, there is a function in smart contract called releasePayment() which should release the amount after 5 Days if there is no dispute is raised. In web apps we can use Crons for that purpose, how will a smart contract knows that a certain date is passed and a certain state of the freelance project is saved in MySQL?

Thanks for your patience.

2 Answers 2


You can use oracle to tell smart contract what is happening in the outer world.

You can do an escrow wallet with smart contract yourself if you want. But be careful with transactions fees.

When a user interact with a contract it can send extra data to the transactions such as "I bought item number xxxx".

Then if you want to display it with MySql, you need to have a node that listen to event from your contract (Infura.io for example). Then you add transactions data in your database and you handle it as you want. But this part will be completely independent from smart contract.

  • Can you pls help me to learn where I can learn more about oracle things?
    – Volatil3
    Commented Jun 2, 2021 at 11:01
  • Like, can I put data from an external URL/API and use it in my smart contract?
    – Volatil3
    Commented Jun 2, 2021 at 11:30
  • Chainlink do oracle for Ethereum. You can put data in your contract, but it will not fetch from data (I think you can't make a timer for a function). You will need to tell the smart contract what data to use. If you want to store it on your smart contract it will be 20 000gas each entries.
    – user73804
    Commented Jun 2, 2021 at 12:42

you can learn more about Oracles here : https://github.com/ethereumbook/ethereumbook/blob/develop/11oracles.asciidoc

(sorry I cant post comments yet)

  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
    – clement
    Commented Jun 2, 2021 at 17:40
  • I fully agree but I didnt want to post it as an asnwer but couldnt post that as a comment as I dont have 50 reputations yet....
    – Cyril
    Commented Jun 3, 2021 at 1:51

Your Answer

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

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