Installing the Necessary Tools and Libraries
Before you can start developing with Chainlink, you’ll need to install the necessary tools and libraries on your computer. In this chapter, we’ll walk you through the steps to set up your development environment and get everything ready to go.
To install Node.js, visit the official Node.js website (https://nodejs.org/) and download the latest stable version for your operating system. Once the download is complete, follow the instructions to install Node.js on your computer.
Installing the Chainlink Software
Once you have Node.js installed, the next step is to install the Chainlink software. To do this, you’ll need to use the Node.js package manager (npm).
To install the Chainlink software, open a terminal window and enter the following command:
npm install -g chainlink
This will install the latest version of the Chainlink software on your computer. It may take a few minutes to complete, depending on your internet connection.
Chainlink contracts are written in Solidity, which is a programming language used to build smart contracts on Ethereum. So, in order to write and deploy Chainlink contracts, you’ll need to install Solidity on your computer.
To install Solidity, visit the official Solidity website (https://solidity.readthedocs.org/) and follow the instructions to install the Solidity compiler (solc) on your computer.
Installing a Code Editor
To write and edit your Chainlink contracts, you’ll need a code editor. There are many different code editors to choose from, but some popular options include Visual Studio Code, Sublime Text, and Atom.
To install a code editor, visit the website of the editor you want to use and download the latest version. Once the download is complete, follow the instructions to install the code editor on your computer.
Installing a Blockchain Simulator
To test and debug your Chainlink contracts, you’ll need a Blockchain simulator, such as Ganache or Truffle. These tools allow you to create a local Blockchain on your computer, which you can use to deploy and test your contracts without having to connect to a live Blockchain.
To install a Blockchain simulator, visit the website of the simulator you want to use and download the latest version. Once the download is complete, follow the instructions to install the simulator on your computer.
In this chapter, we’ve covered the steps to install the necessary tools and libraries for developing with Chainlink. With these tools installed, you’ll be ready to start writing and deploying your own Chainlink contracts. In the next chapter, we’ll show you how to set up a local Chainlink node and get everything configured and ready to go.
To review these concepts, we will go through a series of exercises designed to test your understanding and apply what you have learned.