filmov
tv
web3.js library, the Ethereum JavaScript API
Показать описание
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
Комментарии