Hello I'm new to Solidity and Smart Contract. But I did create some simple smart contract. I just want to ask for any help or guide, is there a way for me to store the data from my solidity into a centralized database like MongoDB? Thank you 🙂

Sep 27, 2019, 6:40 AM
Good approach would be to put a event in setter function, and store data to mongodb within event listener
Sep 27, 2019, 7:05 AM
Do i need to use web3js and nodejs to achieve this?
Sep 27, 2019, 7:12 AM
Yep
Sep 27, 2019, 7:12 AM
Thank you abhi!
Sep 27, 2019, 7:13 AM
👍
Sep 27, 2019, 7:13 AM
Hello again Abhi. Is there a way to use data from MongodDB inside solidity smart contract? 🙂
Oct 13, 2019, 10:38 AM
Sure, use mongoose to read mongo and web3 to write to contract
Oct 13, 2019, 11:37 AM
Writing to contract needs gas?
Oct 13, 2019, 11:40 AM
Yes
Oct 13, 2019, 11:40 AM
Thanks again Abhi! 🙂
👆 this one
Oct 15, 2019, 2:45 PM
Instead of exposing the DB to other services
Oct 15, 2019, 2:52 PM

© 2024 Draquery.com All rights reserved.