Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
June 14, 2022 10:36 pm GMT

Create fake blockchaine to test youre smart-contract

To create a fake blockchain wich you can test youre smartcontract written with Solidity you need Ganach software or a Ganache CLI.

Ganache is the latest version of TestRPC: a fast and customizable blockchain emulator. It allows you to make calls to the blockchain without the overheads of running an actual Ethereum node.

Usage

Transactions are mined instantly.
No transaction cost.
Accounts can be re-cycled, reset and instantiated with a fixed amount of Ether (no need for faucets or mining).
Gas price and mining speed can be modified.
A convenient GUI gives you an overview of your testchain events.

To install ganache software visite this website : https://trufflesuite.com/ganache/

To get ganache-cli you need Node.js first

Installation

Install it here: https://nodejs.org/

Ganache can be installed via NPM:

npm install -g ganache-cli

Using Ganache CLI
Command Line

$ ganache-cli <options>

Note

If you have trouble using npm please try pnpm it save me alot.
I have a post discussing pnpm here: https://dev.to/mrhili/what-is-pnpm-2l87.


Original Link: https://dev.to/mrhili/create-fake-blockchaine-to-test-youre-smart-contract-39ng

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To