Creating Decentralized Apps Part 1
In order to create decentralized Apps such as Web applications, Websites, Mobile Apps.
we need a way to interact with the blockchain. Solidity Language is merely for creating a programmable interface that runs on the blockchain
So in order for us to interact with the Ethereum network (also called a node) we need to use a Client implementation. There are many client implementations written in languages such as C++,Go,Python, Java,Haskell etc.
Once you have a node using one of the clients, you can sync with the blockchain, create wallets and send and receive real ether.
So there are 2 well known client implementations.
1. Test RPC - Node.js based Ethereum client for testing and development
2. Geth - Command line interface written in GO language for running a full Ethereum node
Source: https://karl.tech/intro-guide-to-ethereum-testnets/
TestRPC is a lightweight Ethereum nodes used for small scale local testnets.
Geth is heavyweight Ethereum nodes used for large scale networked testnets.
So for this post, i will be using node.js to install a "Test RPC" client.
You can download Node.js from https://nodejs.org/
Follow the instructions on how to install. My Environment is Windows. i will be using the Command line with the following command to install test-rpc
To start the local Ethereum node run:
Results:
NOTE: keep this Command Window OPEN when doing the following:
So lets test this with Remix IDE and Meta Mask
From the screenshot above, you will see a list of "Private Keys" (10 items starting from 0)
copy one of them, open MetaMask and Change The Network to the "Listening on localhost:8545"
Paste the Private key and you should have a new account with 100 Ether for testing
Go ahead and create the contract from my previous post
Successfully Created the Contract. You should see the "Contract Created" is followed by a Hex value which is the "Contract Address"
We are DONE.
we need a way to interact with the blockchain. Solidity Language is merely for creating a programmable interface that runs on the blockchain
So in order for us to interact with the Ethereum network (also called a node) we need to use a Client implementation. There are many client implementations written in languages such as C++,Go,Python, Java,Haskell etc.
Once you have a node using one of the clients, you can sync with the blockchain, create wallets and send and receive real ether.
So there are 2 well known client implementations.
1. Test RPC - Node.js based Ethereum client for testing and development
2. Geth - Command line interface written in GO language for running a full Ethereum node
Source: https://karl.tech/intro-guide-to-ethereum-testnets/
TestRPC is a lightweight Ethereum nodes used for small scale local testnets.
Geth is heavyweight Ethereum nodes used for large scale networked testnets.
Lightweight | Heavyweight | |
---|---|---|
Example | ethereumjs-testrpc | Geth |
Use Case | Early Stage Dev | Late Stage Dev |
Speed | Fast | Slow |
Reliability | Mostly OK | Very Good |
So for this post, i will be using node.js to install a "Test RPC" client.
You can download Node.js from https://nodejs.org/
Follow the instructions on how to install. My Environment is Windows. i will be using the Command line with the following command to install test-rpc
c:/> npm install -g ethereumjs-testrpc
To start the local Ethereum node run:
c:/> testrpc
Results:
NOTE: keep this Command Window OPEN when doing the following:
So lets test this with Remix IDE and Meta Mask
From the screenshot above, you will see a list of "Private Keys" (10 items starting from 0)
copy one of them, open MetaMask and Change The Network to the "Listening on localhost:8545"
Paste the Private key and you should have a new account with 100 Ether for testing
Go ahead and create the contract from my previous post
Successfully Created the Contract. You should see the "Contract Created" is followed by a Hex value which is the "Contract Address"
We are DONE.
Comments
Post a Comment