2

I am currently working with smart contracts and the implementation and communication to web apps using MetaMask. I am now confused about what to use and how to implement it. What exactly will be deprecated? What and how should I use it now? Can you tell me an actual and not deprecated way/tutorial to connect to MetaMask, ask for balances and connect to contracts etc.?

  • What do you exactly mean with „web3 deprecated“? – ivicaa Apr 5 '18 at 10:53
  • "MetaMask: web3 will be deprecated in the near future in favor of the ethereumProvider github.com/MetaMask/faq/blob/master/…" I get that in the console. – dkb Apr 5 '18 at 10:57
3

Web3 will not be deprecated,

I am not totally sure but as i understood this post : https://github.com/MetaMask/faq/blob/master/detecting_metamask.md#deprecation-of-global-web3js

MetaMask and mist will stop injecting a web3 global object as they do right now because it is chainging fast and a lot. they will instead inject an other API which is smaller and can let the users use a locally injected ( imported via code ) version of web3 or any other provider instead.

So you will be importing web3 for example : var web3 = require("web3");

then you will integrating it with MetaMask by initializing the provider by the given provider (the Ethereum Provider) : web3.setProvider(web3.currentProvider)

Please correct me if i am wrong.

0

Well smart contracts use events to communicate with the frontend. But, I suggest you start with the basics so learn how to call metamask using a button : https://github.com/MetaMask/TipButton/blob/master/index.html

Then, you can learn how to use Remix to deploy your smart contract and play with it a bit :

https://remix.ethereum.org/

and finally you can try this tutorial :

https://coursetro.com/courses/20/Developing-Ethereum-Smart-Contracts-for-Beginners

I hope this would help a bit. Best, Tarik

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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