web 3ジャバスクリプト


私のプログラムのサポートはweb 3から行われます.日本法令外国語訳データベースシステム
今、我々はガナッシュを制御することができます
  • 現在、我々は我々の口座のガナッシュのバランスをとる方法をチェックします
  • 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"));});
    });
    
    メインソースすべてのリソースは documentations
    Course Overview
    です
    読書ありがとう