web3.js library, the Ethereum JavaScript API

preview_player
Показать описание

The Ethereum node must expose its a RPC layer.

The MetaMask extension exposes the web3 API by an injected web3 object which you can access via JavaScript.
The MetaMask extension does not support most synchronous web3 API methods. Make your method calls asynchronous!

In the examples asynchronous methods were used if they are available.

The demonstration Ethereum Dapp is made for educational purpose.

Save the contract address you will need it later.

- Use a test network.
- Have a test account with enough ethers to experiment with.

Notes:
- A version using callbacks which is not very readable because of using callback trees!
For educational purpose you can find this version at (but do not use it!):
- The original code has been refactored by using JavaScript Promises.
All code meaning: JavaScript, HTML and CSS can be found in this single web page.

Warnings:
- Use the Demonstration Ethereum Dapp on a test environment.

Check out all my other Ethereum related tutorial videos:

Subscribe to my YouTube channel:

The presentation used in this video tutorial can be found at:

An older version of the demonstration Ethereum Dapp (do not use this):

More information about RPC layer can be found at:

MetaMask web3 API can be found at:

#mobilefish #howto #ethereum
Рекомендации по теме
Комментарии
Автор

Thanks a lot.. This gem clarifies a LOT!

yazlmmerkezi
Автор

Excelente video sin duda queremos ver más información y nos quedamos pendiente a su canal éxito y gracias

SatoshiAlpha
Автор

i've learned a lot from you, sir... thanks very much!

ecilatnecniv
Автор

Great video. Thank you. Clear, comprehensive and so well documented. Do you offer technical consulting services?

brianpasf
Автор

The most amazing tutorial on the subject. thanks.

YishakFetllwork
Автор

Big thank you sir! Excellent video! Is there any chance you will be updating the demo's for the current day versions? It would really help the community if your video's were updated per the current versions and / or working with our current versions.

aStra
Автор

Someone could mention somewhere that this whole web3.js metamask thing only works when you HOST the bloody html and not when it's a local file. Noob mistake on my side.
Great video btw :) hmm, thinking of, I think there was a command to make chrome work with local files.

garymute
Автор

It says no ethereum node found. What can be the issue?

anshulpadyal
Автор

In your dapp example you are using Rinkeby network and it shows "waiting for transaction to be mined" while outputting result but in rinkeby network it does not support mining due to proof of authority. Please update me if I am wrong.

luvsup
Автор

How could web3.js use without metamask and running without running geth instance on my computer?

shahzadthathal
Автор

Hi
i included the web.min.js file but still getting "Error only" i tried TONS of ways to rectify but nothings happening. Please help me out

webdopamine
Автор

Please explain how to create new accounts on metamask using web3 in pure js

talhayusuf