Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

7
  • So if there is a provider like meta or mist, I should just use them. Then if there is no provider, I should just send HTTP requests to my NodeJS server, right? I didn't really work with backend, so sorry if I got something wrong. One more question: in my contract there are functions that can be run by owner address only. Does it mean that if I want users get some info via my owner account I should add new functions, so they didn't get more info than they should? Or I just need to deploy contract from one account and then use another one to use it in nodejs server? Thank you anyway! Commented Jul 9, 2017 at 8:52
  • NodeJS will work as a middleware and there has to be a provider in a background for your DApp to work and your DApp's UI shall talk to NodeJS server through HTTP requests as you mentioned. Commented Jul 9, 2017 at 9:47
  • You don't need to deploy another contract. You can create another modifier like OnlyMember, which will not have owner privileges but would be able to access some information which you want them to access. Commented Jul 9, 2017 at 9:51
  • I implemented OnlyMember modifier in one of the contracts I wrote, you can take a look for the reference - github.com/inovizz/lms/blob/master/contracts/LMS.sol Commented Jul 9, 2017 at 9:52
  • thanks, but I meant that if I use nodejs server that interacts with the ethereum node using my deploying account, that means that all HTTP requests to the nodejs server will be processed by this server using my 'owner' contract, which means the msg.sender will be owner and the onlyMember modifier doesn't make much sense. That's why I asked maybe somehow I should use another contract on my ethereum node, not which I used to deploy the contract. Commented Jul 9, 2017 at 10:29