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...
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...
I'm developing a website using Web3 with Metamask, users can purchase tokens by sending ETH to an address. What I want to have done is that after the ETH is received it sends the tokens to the users ETH address automatically with backend code. T...
This is a follow up to these threads: How to set state of a react component with a specific item from a returned json object? How to return json data to a react state? I am using web3 to sign a transaction on Ethereum, which then sends a json obje...
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've tried to run the following snippet, but to no avail. I found the snippet here. var Web3PromiEvent = require('web3-core-promievent'); var myFunc = function(){ var promiEvent = Web3PromiEvent(); setTimeout(function() {...
©2020 All rights reserved.