Setup your env to start working w/ the blockchain

First you’ll need to get node/npm. If you don’t have it click here.
Warning: Recommend you install at least node v15.
Now go to the terminal and type the following commands:
Warning: Do not use the GitBash terminal
mkdir my-first-smart-contract
cd my…


This content originally appeared on DEV Community and was authored by Gustavo Gomes

  1. First you'll need to get node/npm. If you don't have it click here.
    Warning: Recommend you install at least node v15.

  2. Now go to the terminal and type the following commands:
    Warning: Do not use the GitBash terminal
    mkdir my-first-smart-contract
    cd my-first-smart-contract
    npm init -y
    npm install --save-dev hardhat

  3. Now let's install the Hardhat with the command:
    npx hardhat
    Warning: In case od error, use this command: yarn add hardhat

  4. Choose the option create a sample project and agree with all the questions.

  5. The sample project will ask you to install hardhat-waffle and hardhat-ethers. Install the dependencies with the command:
    npm install --save-dev @nomiclabs/hardhat-waffle ethereum-waffle chai @nomiclabs/hardhat-ethers ethers

  6. After that, you will run the command: npx hardhat accounts and it should print a lot of addresses like this:
    0xa0Ee7A142d267C1f36714E4a8F75612F20a79720
    These are addresses that Hardhat generates to simulate users on the Blockchain.

  7. After that we will see if everything is working, run the command:
    npx hardhat compile
    Then this command:
    npx hardhat test

  8. Once this is done, you will see something like this:
    Image description

That's it, your project is configured to create Smart Contracts with Ethereum! 🎉🎉


This content originally appeared on DEV Community and was authored by Gustavo Gomes


Print Share Comment Cite Upload Translate Updates
APA

Gustavo Gomes | Sciencx (2022-01-11T23:08:03+00:00) Setup your env to start working w/ the blockchain. Retrieved from https://www.scien.cx/2022/01/11/setup-your-env-to-start-working-w-the-blockchain/

MLA
" » Setup your env to start working w/ the blockchain." Gustavo Gomes | Sciencx - Tuesday January 11, 2022, https://www.scien.cx/2022/01/11/setup-your-env-to-start-working-w-the-blockchain/
HARVARD
Gustavo Gomes | Sciencx Tuesday January 11, 2022 » Setup your env to start working w/ the blockchain., viewed ,<https://www.scien.cx/2022/01/11/setup-your-env-to-start-working-w-the-blockchain/>
VANCOUVER
Gustavo Gomes | Sciencx - » Setup your env to start working w/ the blockchain. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/01/11/setup-your-env-to-start-working-w-the-blockchain/
CHICAGO
" » Setup your env to start working w/ the blockchain." Gustavo Gomes | Sciencx - Accessed . https://www.scien.cx/2022/01/11/setup-your-env-to-start-working-w-the-blockchain/
IEEE
" » Setup your env to start working w/ the blockchain." Gustavo Gomes | Sciencx [Online]. Available: https://www.scien.cx/2022/01/11/setup-your-env-to-start-working-w-the-blockchain/. [Accessed: ]
rf:citation
» Setup your env to start working w/ the blockchain | Gustavo Gomes | Sciencx | https://www.scien.cx/2022/01/11/setup-your-env-to-start-working-w-the-blockchain/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.