I started learning ethereum and web3js and noticed some functions on Web3js are asynchronous. What i want to achieve is get the account balance of a wallet and use the data for something else. My code below  function getAccountBalance2(address){...
I have an issue with transactions on my local ethereum network - at some point, transaction hangs & spends a lot of ETH from my account.     Here's a sample code:  async function send(toAccount, weiVal) {   let account = await w3.getDefAccoun...
Does it is needed to install npm ethereumjs-tx while using a browser version of it which is directly downloaded from github. If yes then how we can import the ethereumjs-tx module in our script file.  Because both are two different things as my knowl...
compile.js :  const path = require('path'); const solc = require('solc'); const fs = require('fs-extra');  const buildPath = path.resolve(__dirname, 'build'); fs.removeSync(buildPath);  const campaignPath = path.resolv...
I have a node js process that creates a web3 websocket connection, like so:  web3 = new Web3('ws://localhost:7545')   When the process completes (I send it a SIGTERM), it does not exit, but rather hangs forever with no console output.  I regi...
I'm trying to start using Ethereum Web3.js with node 6.11.1 on a macosx  I installed web3 with the following command:     npm install web3   Then i launch this - apparently - simple node command:     Web3 = require('web3');   Well, it ret...
I need to make observable from   window.web3.eth.getCoinbase((error, result) => { ... });   Is it a good idea?  new Observable<string>(o => {     this.w.eth.getCoinbase((err, result) => {         o.next(result);         o.complete();...
currently i'm working on a ethereum dapp(voting), in my smart contract i have a function to fetch candidate list of type bytes32[] , on the java script side i'm not getting the values instead 0x only  How to parse the value , below is the cod...
not sure if I should post this on the Ethereum SE but I have a feeling it is more javascript related, so I'll try here:   I have a very simple smart contract that consists of essentially just a getNum function and a setNum function.  The smart co...
Problem  I would like to have a website that updates live the user's wealth from a private Ethereum blockchain.   Current Solution (broken)  I opened a websocket to a private ethereum blockchain that is mining, I would like to update my coinbase...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.