Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

web3.js get balance

// Get the Balance of an address on the Ropsten Ethereum TestNet
const Web3 = require('web3');
const infuraProjectId = "<INFURA_PROJECT_ID>";
const ropstenAddress = "<0xROPSTEN_ADDRESS>";
const web3 = new Web3(new Web3.providers.HttpProvider(
    'https://ropsten.infura.io/v3/' + infuraProjectId
));
web3.eth.getBalance( ropstenAddress ).then(console.log);

// REFERENCES:
// https://blog.infura.io/getting-started-with-infura-28e41844cc89/
Comment

PREVIOUS NEXT
Code Example
Javascript :: submit form automatically javascript 
Javascript :: jquery $(...)..each() is not a function 
Javascript :: spacebar event listener 
Javascript :: last element in array javascript 
Javascript :: difference between shift and unshift in javascript 
Javascript :: javascript change frame background 
Javascript :: how to cheack if a number is an integer or float in javascript 
Javascript :: a <route is only ever to be used as the child of <routes element" 
Javascript :: useHistory react testing 
Javascript :: regular expression to find a string between two characters 
Javascript :: file input change event not firing angular 
Javascript :: copy localstorage javascript 
Javascript :: get javascript min date 
Javascript :: add property to string js 
Javascript :: javascript object entries 
Javascript :: jquery change text color 
Javascript :: get only one value from object array javascript 
Javascript :: array left rotation javascript 
Javascript :: js get sum of array of objects 
Javascript :: express get query params from url 
Javascript :: deep copy object/array 
Javascript :: responsive grid using antd 
Javascript :: return the next higher prime number javascript 
Javascript :: vue property decorator emit 
Javascript :: add variables in javascript 
Javascript :: get buffer from file javascript 
Javascript :: difference between backtick and quotes 
Javascript :: how to add checkbox in alert box in javascript 
Javascript :: redux logger 
Javascript :: vue.js cdn script 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =