Hi first time posting in the chat!
I’m wondering if anyone can point me in the right direction of some solidity code that might exist as a template somewhere. But basically, I’m an engineering management student looking to see if smart contracts could be used to automatically re-order stock from a warehouse/factory simulation as part of my dissertation.

So if the minimum quantity = 20 and the stock levels hit 19 then the smart contract would be triggered to purchase set amount from supplier.

This smart contract is purely for research purposes so would only need to work on a rinkeby network. Does anyone know if a similar template already exists for this use case? Sorry, I am a real noob with coding, I understand the basics of remix after a Udemy course but not having html or javascript background made it difficult.

Any help would be hugely appreciated, thank you!

Jun 15, 2021, 9:34 PM
Well you need some kind of realtime server to invoke the reorder function in your solidity contract.
Jun 15, 2021, 9:37 PM
I think you are looking for something very specific and you'd spend less time coding it then looking for something similar, the logic seems pretty straightforward and a simple if might do the trick for you
Then you'll have to send the transactions to for for example lower the quantity and then the sc will trigger the purchase as a consequence
Jun 15, 2021, 9:39 PM
Ok, thanks for the response! Yeah, it's frustrating because it feels straight forward. And it only needs to work once or twice for some screenshots that will go onto my project. But I'm unsure how to write the code to do it.
Hey thanks for the response, what realtime server would be your recommendation for this use case?
Jun 15, 2021, 9:46 PM
search for solidity for supply chain
this is the first record on google https://github.com/MitchTODO/Ethereum-SupplyChain
Jun 15, 2021, 9:51 PM
Thank you 🙏
Jun 16, 2021, 1:51 AM

© 2024 Draquery.com All rights reserved.