How To Connect To The Ethereum Public Mainnet or Testnet With Web3?

Follow
  1. You can access the Ethereum mainnet or testnet (public chains) via web3, exactly like you do for the private chain. You have to connect your client code (Web3 JS) to a running Blockdaemon node through RPC.

Connecting a node

     2.  The accounts and transactions are handled by an Ethereum browser:  Mist  The Ethereum browser allows you to:

  • Connect to a node
  • Create an account
  • Fund an account
  • Send transaction

For example, every time your client will try to execute a sendTransaction or a contract written functions like you wrote

var contract1=web3.eth.contract(y).at(x);
contract1.transfer(to, amount, {from: frm});

it will open a popup asking the user to approve the transaction.

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.