Skip to content

theirrationalone/solidity-smart-contract-ethersjs

Repository files navigation

SOLIDITY WITH ETHERS.JS

🚀🚀🚀

1. SETUP

a. Goto METAMASK and download & add install it as an extension.

b. Pin Metamask if you want, in your extension(s) section available on top-right of your browser.

c. Enable Test Networks ->

Follow Images below...

Step 1:

image1


Step 2:

image2

d. Goto here and signup or login here!


e. Create An App by following images given below...

alchemyImage

alchemyImage

alchemyImage

alchemyImage

alchemyImage




f. After Signing-up or logging in, Follow These steps: steps then scroll a bit until you don't find interface like this and follow steps given below from here... this


g. On Successful Configuration, Your Metamask'll look like this when you're on Alchemy... image


h. Now you're all done, You only need some balance, Go here and follow Images given below...



image



image



SETUP DONE!

2. SETTING ENVIRONMENT VARIABLES

Create a file .env and add keys given below with your credentials

  • GOERLI_JSON_RPC_URL=your-rpc-from-alchemy-app

  • METAMASK_PRIVATE_KEY=your-metamask-private-key

  • WALLET_PASSWORD=set-password-for-encrypting-environment-variables

3. RUNNING SCRIPTS

Note: Follow Steps below if You are running your project on vs code otherwise open your terminal / shell / bash / cmd, with admin privileges then go to your project's directory i.e. as on windows "C:/users/username/documents/your_project/" and then paste and run commands given below in sequence.

a. Copy code below, Go to Your Project, Open Terminal then paste it into terminal.

npm install --force

b. Copy code below, Go to Your Project, Open Terminal then Paste it into terminal then hit enter. After successful execution of script you can delete METAMASK_PRIVATE_KEY environment variable from .env file.


npm run wallet:encrypt

c. Copy code below, Go to Your Project, Open Terminal then Paste it into terminal then hit enter.


npm run contract:deploy

THANK YOU! :) 🏴‍☠️

About

Simple Smart Contract Project with Ethers.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published