Hacker News new | ask | show | jobs
Web3 JavaScript Functions for Ethereum DApps (medium.com)
7 points by alexroan 2221 days ago
2 comments

Important to note that libraries to integrate with Ethereum exist in many popular languages:

Ruby - https://github.com/izetex/web3-eth and https://github.com/DigixGlobal/ethereum-ruby

Python - https://github.com/ethereum/web3.py

TypeScript/JS - https://github.com/ethers-io/ethers.js/

Java - https://github.com/web3j/web3j

Go - https://github.com/ethereum/go-ethereum

PHP - https://github.com/sc0Vu/web3.php

& more.

Also - lots of tools to get started:

QuikNode.io - boot nodes or JSON RPC access

Infura - JSON RPC access

Ganache - Fork live network for local dev

OpenZeppelin - library for building smart contracts

Remix - IDE for ethereum.

The article above left a bit to be desired TBH

How are people using this in practice?
You often need an account to do something meaningful (getAccounts())

You often want to get an idea of how much it will cost to send your transaction (estimateGas())

If you want to interact with smart contracts like crypto kitties, lossless lotto, compound lending protocol you need to load it up into your web3 lib (Contract())

If you want to send a write transaction or interact with any way that changes the state of the chain, you want to send a transaction (sendTransaction() although sendRawTransaction() is one I like better)

If you want to think in ETH but operate in the smaller units of ETH called Wei - transaction cost is calculated in GigaWei IIRC - you would use (toWei())