How To Install Truffle On Windows
Truffle boxes prerequisites
Before you employ a Truffle box, y'all need to have Truffle and other useful tools installed in your computer. In this tutorial, I will evidence yous pace-by-step on how to install and configure the prerequisites to use any RSK Truffle box on RSK networks.
Overview
Here is a summary of the steps we will accept in this tutorial:
- POSIX compliant beat
- Gyre
- Node.js and NPM (Node Bundle Managing director)
- Code editor: Visual Studio Code (VSCode) or any other editor of your pick
- Truffle
- Create a wallet mnemonic
POSIX compliant shell
The Portable Operating System Interface (POSIX) is a family of standards specified by the IEEE Figurer Society for maintaining compatibility betwixt operating systems. POSIX defines the awarding programming interface (API), along with control line shells and utility interfaces, for software compatibility with variants of Unix and other operating systems. Source: Wikipedia
- Mac OSX and Linux distributions: Utilise the standard terminal
- Windows: If you use the standard
cmd
terminal, or PowerShell, the commands here may not work. Consider installing Git for Windows, which comes with Git Bash bundled. Hither is a tutorial on installing and using Git Bash.
curl
This is a system command that is probable already installed on your organization, which allows you to make network requests, such as HTTP requests, from your command line.
If curl --version
displays an fault, then download whorl.
In Windows:
C:\>curl --version curl 7.55.1 (Windows) libcurl/vii.55.1 WinSSL Release-Date: [unreleased] Protocols: dict file ftp ftps http https imap imaps pop3 pop3s smtp smtps telnet tftp Features: AsynchDNS IPv6 Largefile SSPI Kerberos SPNEGO NTLM SSL C:\>
Node.js and NPM
Another dependency is NPM, which comes arranged with Node.js.
To check if yous have node already installed, enter this command into your terminal:
node --version npm --version
C:\>node --version v10.16.3 C:\>npm --version v6.nine.0 C:\>
If there'southward no output like the one above, get to Node.js install.
Note that NPM is normally installed together with Node.js, so subsequently installing Node.js, there's no need to install it separately.
If you lot want to have more than ane version installed, the virtually fuss-free fashion to install and manage multiple versions of node
on your figurer is nvm.
Lawmaking editor
We need some software that is able to edit text files. Preferably i that has support for syntax highlighting for both Solidity and Javascript.
VS Code is a good pick if you don't already have one.
Visual Studio Code (VS Code)
In this tutorial, we will use VS Code to create our project.
Become to VS Code download if you would like to use it besides.
Verify if your VS Code installation was successful by typing the post-obit command into the final:
C:\>code -v 1.45.1 5763d909d5f12fe19f215cbfdd29a91c0fa9208a x64 C:\>
Truffle
Truffle is a popular evolution framework with a mission to make smart contract evolution easier for developers. Amongst its features, information technology has a smart contract lifecycle management, scriptable deployment & migrations, automated contract testing and simple network direction.
Information technology also makes developing on RSK easier, with the ability to configure custom networks for RSK.
To install Truffle, input the command below into the terminal and press enter
at your project location:
C:\>npm install -g truffle C:\Program Files\nodejs\truffle -> C:\Program Files\nodejs\node_modules\truffle\build\cli.bundled.js > truffle@5.1.28 postinstall C:\Program Files\nodejs\node_modules\truffle > node ./scripts/postinstall.js - Fetching solc version listing from solc-bin. Attempt #one + truffle@5.1.28 updated 1 parcel in 11.679s C:\>
When the installation is finished, close the terminal, open information technology once more and check the Truffle version:
C:\>truffle version Truffle v5.1.28 (core: 5.1.28) Solidity v0.5.16 (solc-js) Node v10.xvi.3 Web3.js v1.2.1 C:\>
Create a wallet mnemonic
To use testnet, nosotros need tRBTC and an accost to shop them. The best way is to create a wallet from a mnemonic, using the design defined at BIP39
At that place are a few ways to do this.
One is to create using a web wallet, such as Metamask or Not bad wallet. These wallets generate the mnemonic for you.
iancoleman.io/bip39
Another way is using this spider web app:
iancoleman.io/bip39
Note: In this tutorial, the method used to shop the mnemonic is not recommended to be used for any 'real' wallet because it's non secure enough to generate a individual key in a website, yet nosotros volition use this here for learning purposes, and considering we're using the Testnet, so no existent amounts are at pale.
In the Generate a random mnemonic
field, select 12 words
and click on the generate
button.
The result appears in the BIP39 Mnemonic
field. They should be 12 random words similar the words in the image:
My mnemonic is:
energy knife ice mouse merge rail cram brownish decorate atom dominion virus
Re-create these 12 words, we'll use it after.
RSK Networks have their own derivation path. Learn more than almost account based RSK addresses.
Source: https://developers.rsk.co/kb/truffle-boxes-prerequisites/
Posted by: geistfairie.blogspot.com
0 Response to "How To Install Truffle On Windows"
Post a Comment