web 3ジャバスクリプト
1015 ワード
私のプログラムのサポートはweb 3から行われます.日本法令外国語訳データベースシステム
今、我々はガナッシュを制御することができます現在、我々は我々の口座のガナッシュのバランスをとる方法をチェックします
Course Overviewです
読書ありがとう
今、我々はガナッシュを制御することができます
let Web3 = require('web3');
//to check web3 is import or not
console.log(" Web3", Web3);
//Now we will create a object named web3
let web3=new Web3(new Web3.providers.HttpProvider("Please give ganache url");
どのように、我々は1つの口座からもう一つの口座にエーテルを移すことができますか?web3.eth.getBalance("id of account").then(console.log);
//you will get the balance of the account
//you need to have a little understanding of javascript
//then can also acts as a Promise
//if we want to get the balance
web3.eth.getBalance("id of account").then(function(result){
console.log(web3.utils.fromWei(reults,"ether"));});
});
メインソースすべてのリソースは documentationsCourse Overviewです
読書ありがとう
Reference
この問題について(web 3ジャバスクリプト), 我々は、より多くの情報をここで見つけました https://dev.to/kaustavkarmakar2/web3js-with-javascript-26n1テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol