Giter VIP home page Giter VIP logo

dapp-university-js-for-blockchain's Introduction

Dapp University

This example will open your eyes on the topic of how to BECOME A HIGHLY PAID BLOCKCHAIN DEVELOPER

Youtube: "Javascript for Blockchain"

Code: https://github.com/dappuniversity/web...

Let's get started:

Useful docs&links we should be aware before!

Next step:

  • Check node $ node -v and web3 version $ npm ls web3
  • Initialize the project $ npm init
  • Install modules $ npm install
  • Install web3 $ npm install web3
  • If you are getting an " web3 module not found" or similar error,

    try running $ npm install --production windows-build-tools, then $ npm install web3, and finally, $ npm audit fix

Usage

Web3.js #2

$ node

var Web3 = require('web3') undefined var web3 = new Web3('https://mainnet.infura.io/v3/ea9dd948eceb46c888515813a41924ce') web3

// copy ABI from any coin on etherscan.io // e.g. from https://etherscan.io/address/0xd26114cd6EE289AccF82350c8d8487fedB8A0C07#code

var abi = //paste ABI here โš ๏ธ

// copy contract`s address

var contractAddress = '0xd26114cd6EE289AccF82350c8d8487fedB8A0C07' contractAddress var contract = new web3/eth.contract(abi, contractAddress) contract

contract.methods.name().call((err, result) => {console.log(result) }) contract.methods.symbol().call((err, result) => {console.log(result) }) contract.methods.totalSupply().call((err, result) => {console.log(result) }) contract.methods.mintingFinished().call((err, result) => {console.log(result) })

// find an address of token holder from etherscan.io

var accountAddress ='0xd26114cd6EE289AccF82350c8d8487fedB8A0C07' contract.methods.balanceOf(accountAddress).call((err, result) => {console.log(result) })

Web3.js #4

ropsten.infura.io/v3/ea9dd948eceb46c888515813a41924ce npm install ethereumjs-tx node app.js

dapp-university-js-for-blockchain's People

Contributors

monkrus avatar ebazhanov avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.