Skip to content

Latest commit

 

History

History
59 lines (40 loc) · 869 Bytes

README.md

File metadata and controls

59 lines (40 loc) · 869 Bytes

How to run the project

1- Initiate node

npm init

2- Install the dependencies

npm i --save-dev hardhat
npm i --save-dev @nomicfoundation/hardhat-toolbox
npm i express
npm i dotenv
npm i ethers

3- Global dependecies to run the API

npm i -g nodemon

4- Set up the .env

  • QUICKNODE_API_KEY = "9a...51"
  • WALLET_PRIVATE_KEY = "f3...0p"

5- Compile the contracts

npx hardhat compile

6- Run the API script

nodemon server.js

7- Call the api

  • Post functions of the API can be called with the following paths :
localhost:3000/deploy
localhost:3000/requestOwnership

with arguments in the body of the API call

  • Get function of the API can be called with the following paths :
localhost:3000/contractAddress

with arguments in the body of the API call