kenrogers / krt-exchange

A basic DEX built with React and Solidity

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

KRT Exchange

A simple DEX built using React, Hardhat, Tailwind, and Solidity.

Uses an ERC20 standard to create the Ken Rogers Token (KRT) and allows the user to exchange this token for ETH.

Setup

  1. Install dependencies with yarn
  2. Compile smart contracts with npx hardhat compile
  3. Test that everything is working with npx hardhat test

Once we verify that all test are passing, we can set up our Hardhat node with npx hardhat node.

That will give us a list of addresses and private keys that we can use for testing purposes.

image

Next up, deploy the smart contract to our local Hardhat network with our deploy.js script. We can do that by running npx hardhat run scripts/deploy.js --network localhost in another terminal window.

This will give us an address where our newly deployed contract lives.

Now that we've got the test network running and contract deployed, we can start up the React app with yarn start and connect to it with MetaMask to start exchanging some KRT for some ETH.

You're on your way to becoming mind-blowingly wealthy with the world's greatest token, the Kenny Rogers Token (KRT).

About

A basic DEX built with React and Solidity


Languages

Language:JavaScript 63.1%Language:Solidity 20.4%Language:HTML 12.1%Language:CSS 4.4%