I'm currently using 0.2x.x version of Web3 Javascript API. I deployed my custom ERC20 token by creating smart contract in solidity (on REMIX IDE). I installed the MetaMask and had a test on https://wallet.ethereum.org/ to send some custom ERC t...
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...
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...
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...
Context: I want to use blockies to render an identicon on the page, i get the defaultAccount from web3, for this, the user has to be logged on to metamask with a selected address from his wallet.   The problem: the web app seems to not detect the web...
I need to operate on Big Numbers but I need the results to be precise, like below:  const BN = require('bn.js'); var a = 11060622312717714974 var b = 1570481433500000000000; console.log(a/b); //0.0070428227146040415   When I use Big Number I...
I have been trying to use the web3 library with JavascriptCore in Swift. A web3 instance is created by running  var web3 = new Web3(new Web3.providers.HttpProvider("[the provider im using]"))  This is the code I am trying to do this in Swift...
I know that javascript is asynchronous and if i make a for loop after .then then the loop ends and only then do the object promise become clear, but I can't for the life of me fix this code snippet, maybe someone can help me. My goal is to loop a...
I am running web3 1.0.0-beta.27,  pragma solidity ^0.4.2;  contract Charity{      function ping() public constant returns (uint) {         return 200;     }   }   And I am compiling/calling it in typescript with:  import * as fs       from 'fs...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.