Installing testRPC/ganache-cli(Learn 'Solidity' - Part9)

in ethereum •  6 years ago  (edited)

 

testRPC/ganache-cli

testRPC/ganache-cli is a node.js Ethereum client for testing and development of the Smart Contracts. To make it work, we need to have node.js installed first. To check, open Command Prompt or Terminal and type

 

node -v

 

npm -v

 
 

Capture8.JPG

If you don't have the node or npm installed on your system, go to nodejs.org and click the 'Downloads' button. Find the appropriate version for your OS and system. Follow the installation steps and it will install node and node package manager on your system.

 
 

Now, we will install testRPC on our system globally which means we will be able to use it from anywhere on our system.

In the CMD, type 'npm install -g ethereumjs-testrpc'. It was renamed 'ganache-cli' last year so instead of 'testrpc', use 'ganache-cli', besides that, it is the same testRPC.

 

If you don't get redirected automatically to ganache-cli, you can type the following command in CMD,

 

'npm install -g ganache-cli'.

 

Once, the installation completes, you should see something like this,

Capture9.JPG

 

You can run the package with the command 'ganache-cli' and it will run the package.

 

Capture10.JPG

 

Once you run it, it provides you ten different accounts and private keys along with a local server at localhost:8545.

 

 

 
 


 

Previous Posts

 

Introduction To 'Solidity'(Learn 'Solidity' - Part 1)

 

Ethereum & Smart Contracts(Learn 'Solidity' - Part 2)

 

Tips To Learn 'Solidity' On Your Own(Learn 'Solidity - Part 3)

 

Basic Smart Contract(Learn 'Solidity' - Part 4)

 

Smart Contract VsnDApp(Learn 'Solidity' - Part 5)

 

Variables In 'Solidity'(Learn 'Solidity' - Part 6)

 

Visibility & Structs In 'Solidity'(Learn 'Solidity' - Part 7)

 

Understanding ERC20 &ERC223 Tokens(Learn 'Solidity' - Part 8)


 

Upcoming Posts

 

Installing Web3.js(Learn 'Solidity' - Part10)

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!