1

I want to develop a Dapp that allows user to send and receive my own token (smart contract).

So far, I managed to setup a simple Meteor app that uses web3. So now it can interact with the smart contract which I deployed on a testrpc. The app can send/receive the token.

Questions are:

(1) What is the best or workable approach so that a user of my Meteor-web3 app can setup his/her ethereum account and eventually he/she can transacts with the token/smart contract?

(2) I am thinking to convert the Meteor-web3 to mobile Dapp. Is this even possible on the live Ehteruem network.

Thank you in advance for the guidance.

2 Answers 2

1

The easiest way to have users interact with the Blockchain is to use the injected web3 from Metamask, which gives the app and them access to their accounts. Through Metamask, they can sign transactions (eg sending tokens) and send Ether. But of course, this requires users to have Chrome and Metamask.

The typical fallback is if there is no Metamask, DApps connect to the user’s local geth (http://localhost:8545). This gives them access to their accounts and the Blockchain, but then again you need your users to run a local geth node, and be familiar with terminal commands to unlock their accounts, etc.

There might also be some other light wallet clients, but I haven’t used these yet.

For my DApp, another thing I have done is created a remote geth node on AWS and use that as my web3 provider. (Digital Ocean also seems popular, mentioned in many posts here.) What this does is provide web3 to users who don’t have Chrome/Metamask or a local geth node running. They can even access Blockchain data from mobile. However, it’s read-only, they would still need Metamask or a local geth to sign and send transactions. Also note if you have an https site, you’ll need to create an nginx reverse proxy server to create an SSL geth node, which geth by default does not support.

1

If you want your app to be fully decentralized (which is probably a good assumption because thats the point of creating it), then you'd want your application to access a local Ethereum node on their computer and/or download it for them in the initialization of your application.

Once the user of your application has some type of node (full, light, etc), then your application can interact your local node through IPC/RPC methods. This will give your application full access to the Ethereum network and allow the user to interact with it (i.e. send transactions to spend/receive tokens, run contract code, etc). This is the best approach in my opinion, simply because it makes for a fully decentralized application. To make a really good application, you're probably going to want to build a user interface your app that doesn't require the user to know much about interacting with the Ethereum network.

The Ethereum light client that could be run on a mobile device is still in the development phase, but if you want to contribute that would be awesome! Once a reliable and efficient light client is implemented the real power of Dapps will shine on mobile devices!

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.